// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/example.c
// Function: fill_output
static void fill_output(struct bb_state *state, pseudo_t pseudo, struct storage *out)
{
	int i;
	struct storage_hash *in;
	struct instruction *def;

	/* Is that pseudo a constant value? */
	switch (pseudo->type) {
	case PSEUDO_VAL:
		write_val_to_storage(state, pseudo, out);
		return;
	case PSEUDO_REG:
		def = pseudo->def;
		if (def && (def->opcode == OP_SETVAL || def->opcode == OP_LABEL)) {
			write_val_to_storage(state, pseudo, out);
			return;
		}
	default:
		break;
	}

	/* See if we have that pseudo in a register.. */
	for (i = 0; i < REGNO; i++) {
		struct hardreg *reg = hardregs + i;
		pseudo_t p;

		FOR_EACH_PTR_TAG(reg->contains, p) {
			if (p == pseudo) {
				write_reg_to_storage(state, reg, pseudo, out);
				return;
			}
		} END_FOR_EACH_PTR(p);
	}

	/* Do we have it in another storage? */
	in = find_storage_hash(pseudo, state->internal);
	if (!in) {
		in = find_storage_hash(pseudo, state->inputs);
		/* Undefined? */
		if (!in)
			return;
	}
	switch (out->type) {
	case REG_UDEF:
		*out = *in->storage;
		break;
	case REG_REG:
		output_insn(state, "movl %s,%s", show_memop(in->storage), hardregs[out->regno].name);
		break;
	default:
		if (out == in->storage)
			break;
		if ((out->type == in->storage->type) && (out->regno == in->storage->regno))
			break;
		output_insn(state, "movl %s,%s", show_memop(in->storage), show_memop(out));
		break;
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x60(%rbp)
subl $0x3, %eax
je 0x15fe8
jmp 0x15fc8
movl -0x60(%rbp), %eax
subl $0x6, %eax
jne 0x1602f
jmp 0x15fd2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x16280
jmp 0x16271
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1602d
movq -0x30(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x48, %eax
je 0x16017
movq -0x30(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x47, %eax
jne 0x1602d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x16280
jmp 0x16271
jmp 0x1602f
jmp 0x16031
movl $0x0, -0x1c(%rbp)
cmpl $0x6, -0x1c(%rbp)
jge 0x1612a
movslq -0x1c(%rbp), %rcx
leaq 0x77153(%rip), %rax     # 0x8d1a0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x16080
jmp 0x1611a
jmp 0x16082
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x50(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x16102
movq -0x50(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
andq $-0x4, %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x160d1
cmpq $0x0, -0x40(%rbp)
jne 0x160d1
jmp 0x160f7
movq -0x40(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x160f5
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x16350
jmp 0x16271
jmp 0x160f7
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x16089
jmp 0x16104
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq -0x48(%rbp), %rax
jne 0x16082
jmp 0x1611c
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x16038
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x13f70
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x16169
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x13f70
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x16167
jmp 0x16271
jmp 0x16169
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x64(%rbp)
testl %eax, %eax
je 0x16182
jmp 0x16178
movl -0x64(%rbp), %eax
subl $0x1, %eax
je 0x161a9
jmp 0x161f5
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x1626f
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x142d0
movq -0x70(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq 0x10(%rax), %rcx
leaq 0x76fcc(%rip), %rax     # 0x8d1a0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
leaq 0x53134(%rip), %rsi     # 0x69319
leaq 0x534fa(%rip), %r8      # 0x696e6
movb $0x0, %al
callq 0x135a0
jmp 0x1626f
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x16205
jmp 0x1626f
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl (%rcx), %eax
jne 0x1622d
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x10(%rcx), %eax
jne 0x1622d
jmp 0x1626f
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x142d0
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
callq 0x142d0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rdx
movq %rax, %rcx
leaq 0x530b8(%rip), %rsi     # 0x69319
leaq 0x5347e(%rip), %r8      # 0x696e6
movb $0x0, %al
callq 0x135a0
jmp 0x16271
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)