Arduino sketch from truth table

With "only" 6 inputs, you could just expand the don't-care bits and create one giant table, and then do "port = table[inputs];"

A "clever" program would do this at runtime, translating a human-style table (like you provided) to the full lookup table. "0 1 x 0 0 x = 1", etc. And it should check for inconsistencies.