Please note that the c, which is a structure, is passed by value in 2 registers: rcx and rdx. We had to rework quite many things in the decompiler to support such variables (we call them scattered variables). However, the output was worth it:

You are completely right, Arnaud already pointed out the discrepancy to me but I had no time to fix it.

The prototype of lighten() was manually specified as in the source code. Without it, the decompiler would assume a simple __int64 value (there is no way that the decompiler could come up with a complex type definition as color_t at its own). The rest was done automatically: based on the prototype the decompiler found out the input register (RCX) and produced a nice output.

This happens because the low part of RDI represents two things at the same time: the input argument a1 and the argument to lighten() call. I guess we will have to introduce a fake assignment to separate the different roles of RDI.2