Add C-equivalent code for input_array.asm