// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/example.c
// Function: final_pseudo_flush
static int final_pseudo_flush(struct bb_state *state, pseudo_t pseudo, struct hardreg *reg)
{
	struct storage_hash *hash;
	struct storage *out;
	struct hardreg *dst;

	/*
	 * Since this pseudo is live at exit, we'd better have output 
	 * storage for it..
	 */
	hash = find_storage_hash(pseudo, state->outputs);
	if (!hash)
		return 1;
	out = hash->storage;

	/* If the output is in a register, try to get it there.. */
	if (out->type == REG_REG) {
		dst = hardregs + out->regno;
		/*
		 * Two good cases: nobody is using the right register,
		 * or we've already set it aside for output..
		 */
		if (!dst->contains || dst->busy > VERY_BUSY)
			goto copy_to_dst;

		/* Aiee. Try to keep it in a register.. */
		dst = empty_reg(state);
		if (dst)
			goto copy_to_dst;

		return 0;
	}

	/* If the output is undefined, let's see if we can put it in a register.. */
	if (out->type == REG_UDEF) {
		dst = empty_reg(state);
		if (dst) {
			out->type = REG_REG;
			out->regno = dst - hardregs;
			goto copy_to_dst;
		}
		/* Uhhuh. Not so good. No empty registers right now */
		return 0;
	}

	/* If we know we need to flush it, just do so already .. */
	output_insn(state, "movl %s,%s", reg->name, show_memop(out));
	return 1;

copy_to_dst:
	if (reg == dst)
		return 1;
	output_insn(state, "movl %s,%s", reg->name, dst->name);
	add_pseudo_reg(state, pseudo, dst);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x13f70
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x15e2c
movl $0x1, -0x4(%rbp)
jmp 0x15f90
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x15ea3
movq -0x30(%rbp), %rax
movslq 0x10(%rax), %rcx
leaq 0x77350(%rip), %rax     # 0x8d1a0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x15e79
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x3e8, %eax            # imm = 0x3E8
jle 0x15e7e
jmp 0x15f3e
movq -0x10(%rbp), %rdi
callq 0x13d80
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x15e97
jmp 0x15f3e
movl $0x0, -0x4(%rbp)
jmp 0x15f90
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x15ef9
movq -0x10(%rbp), %rdi
callq 0x13d80
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x15eed
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movq -0x38(%rbp), %rax
leaq 0x772cb(%rip), %rcx     # 0x8d1a0
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x15f3e
movl $0x0, -0x4(%rbp)
jmp 0x15f90
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0x142d0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq %rax, %rcx
leaq 0x533f2(%rip), %rsi     # 0x69319
leaq 0x537a5(%rip), %r8      # 0x696d3
movb $0x0, %al
callq 0x135a0
movl $0x1, -0x4(%rbp)
jmp 0x15f90
movq -0x20(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x15f51
movl $0x1, -0x4(%rbp)
jmp 0x15f90
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %rax
movq (%rax), %rcx
leaq 0x533af(%rip), %rsi     # 0x69319
leaq 0x53762(%rip), %r8      # 0x696d3
movb $0x0, %al
callq 0x135a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x126b0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)