// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/example.c
// Function: fill_reg
static struct hardreg *fill_reg(struct bb_state *state, struct hardreg *hardreg, pseudo_t pseudo)
{
	struct storage_hash *src;
	struct instruction *def;

	if (state->cc_target == pseudo) {
		flush_cc_cache_to_reg(state, pseudo, hardreg);
		return hardreg;
	}

	switch (pseudo->type) {
	case PSEUDO_VAL:
		output_insn(state, "movl $%lld,%s", pseudo->value, hardreg->name);
		break;
	case PSEUDO_SYM:
		src = find_pseudo_storage(state, pseudo, NULL);
		/* Static thing? */
		if (!src) {
			output_insn(state, "movl $<%s>,%s", show_pseudo(pseudo), hardreg->name);
			break;
		}
		switch (src->storage->type) {
		case REG_REG:
			/* Aiaiaiaiaii! Need to flush it to temporary memory */
			src = find_or_create_hash(pseudo, &state->internal);
			/* Fall through */
		default:
			alloc_stack(state, src->storage);
			/* Fall through */
		case REG_STACK:
		case REG_FRAME:
			flush_pseudo(state, pseudo, src->storage);
			output_insn(state, "leal %s,%s", show_memop(src->storage), hardreg->name);
			break;
		}
		break;
	case PSEUDO_ARG:
	case PSEUDO_REG:
		def = pseudo->def;
		if (def && (def->opcode == OP_SETVAL || def->opcode == OP_LABEL)) {
			output_insn(state, "movl $<%s>,%s", show_pseudo(def->target), hardreg->name);
			break;
		}
		src = find_pseudo_storage(state, pseudo, hardreg);
		if (!src)
			break;
		if (src->flags & TAG_DEAD)
			mark_reg_dead(state, pseudo, hardreg);
		output_insn(state, "mov.%d %s,%s", 32, show_memop(src->storage), hardreg->name);
		break;
	default:
		output_insn(state, "reload %s from %s", hardreg->name, show_pseudo(pseudo));
		break;
	}
	return hardreg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x13a70
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x14430
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x13cee
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x34(%rbp)
addl $-0x3, %eax
subl $0x2, %eax
jb 0x13bbb
jmp 0x13a88
movl -0x34(%rbp), %eax
subl $0x5, %eax
je 0x13acd
jmp 0x13a92
movl -0x34(%rbp), %eax
subl $0x6, %eax
jne 0x13caa
jmp 0x13aa0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
leaq 0x5588f(%rip), %rsi     # 0x69349
leaq 0x5589c(%rip), %r8      # 0x6935d
movb $0x0, %al
callq 0x135a0
jmp 0x13ce6
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x144a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x13b22
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20c10
movq -0x40(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
leaq 0x55857(%rip), %rsi     # 0x69366
leaq 0x55847(%rip), %r8      # 0x6935d
movb $0x0, %al
callq 0x135a0
jmp 0x13ce6
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
subl $0x1, %eax
je 0x13b43
jmp 0x13b36
movl -0x44(%rbp), %eax
addl $-0x2, %eax
subl $0x2, %eax
jb 0x13b69
jmp 0x13b58
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x14220
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x14290
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x145c0
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x142d0
movq -0x50(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
leaq 0x557d2(%rip), %rsi     # 0x6937a
leaq 0x557ae(%rip), %r8      # 0x6935d
movb $0x0, %al
callq 0x135a0
jmp 0x13ce6
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x13c27
movq -0x30(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x48, %eax
je 0x13bea
movq -0x30(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x47, %eax
jne 0x13c27
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x20c10
movq -0x58(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
leaq 0x55752(%rip), %rsi     # 0x69366
leaq 0x55742(%rip), %r8      # 0x6935d
movb $0x0, %al
callq 0x135a0
jmp 0x13ce6
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x144a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x13c48
jmp 0x13ce6
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x13c6b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x14600
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x142d0
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
leaq 0x555aa(%rip), %rsi     # 0x6923f
movl $0x20, %edx
leaq 0x556bc(%rip), %r9      # 0x6935d
movb $0x0, %al
callq 0x135a0
jmp 0x13ce6
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20c10
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
movq %rax, %rcx
leaq 0x556b3(%rip), %rsi     # 0x6938b
leaq 0x5567e(%rip), %r8      # 0x6935d
movb $0x0, %al
callq 0x135a0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)