LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: preferred_reg
static struct hardreg *preferred_reg(struct bb_state *state, pseudo_t target)
{
	struct storage_hash *dst;

	dst = find_storage_hash(target, state->outputs);
	if (dst) {
		struct storage *storage = dst->storage;
		if (storage->type == REG_REG)
			return hardregs + storage->regno;
	}
	return NULL;
}

// Assembly:
pushq %rax
movq %rsi, %rax
movq 0x10(%rdi), %rsi
movq %rax, %rdi
callq 0x112e7
testq %rax, %rax
je 0x110f2
movq 0x18(%rax), %rax
cmpl $0x1, (%rax)
jne 0x110f2
movslq 0x10(%rax), %rax
imulq $0x18, %rax, %rcx
leaq 0x4f0c3(%rip), %rax     # 0x601b0
addq %rcx, %rax
jmp 0x110f4
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: empty_reg
static struct hardreg *empty_reg(struct bb_state *state)
{
	int i;
	struct hardreg *reg = hardregs;

	for (i = 0; i < REGNO; i++, reg++) {
		if (!reg->contains)
			return reg;
	}
	return NULL;
}

// Assembly:
xorl %eax, %eax
leaq 0x4f0b1(%rip), %rcx     # 0x601b0
xorl %edx, %edx
cmpl $0x90, %edx
je 0x1111d
cmpq $0x0, 0x8(%rdx,%rcx)
je 0x11117
addq $0x18, %rdx
jmp 0x11101
addq %rdx, %rcx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: find_storage_hash
static struct storage_hash *find_storage_hash(pseudo_t pseudo, struct storage_hash_list *list)
{
	struct storage_hash *entry;
	FOR_EACH_PTR(list, entry) {
		if (entry->pseudo == pseudo)
			return entry;
	} END_FOR_EACH_PTR(entry);
	return NULL;
}

// Assembly:
testq %rsi, %rsi
je 0x11333
movq %rsi, %rcx
movzwl (%rcx), %edx
movsbl %dl, %eax
testw %ax, %ax
movl $0x0, %r8d
cmovgl %eax, %r8d
movzwl %r8w, %r8d
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x1132a
movq 0x18(%rcx,%r9,8), %rax
cmpw $0x100, %dx             # imm = 0x100
jb 0x1131f
testq %rax, %rax
je 0x11325
cmpq %rdi, 0x8(%rax)
je 0x11335
incq %r9
jmp 0x11309
movq 0x10(%rcx), %rcx
cmpq %rsi, %rcx
jne 0x112ef
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: find_or_create_hash
static struct storage_hash *find_or_create_hash(pseudo_t pseudo, struct storage_hash_list **listp)
{
	struct storage_hash *entry;

	entry = find_storage_hash(pseudo, *listp);
	if (!entry) {
		entry = alloc_storage_hash(alloc_storage());
		entry->pseudo = pseudo;
		add_ptr_list(listp, entry);
	}
	return entry;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
callq 0x112e7
movq %rax, %r15
testq %rax, %rax
jne 0x11389
callq 0x1095d
movq %rax, %r12
xorl %edi, %edi
callq 0x2c011
movq %rax, %r15
leaq 0x18(%rax), %rsi
movq %r12, 0x18(%rax)
addq $0x8, %r12
movq %r12, %rdi
callq 0x253e5
movq %r14, 0x8(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x253e5
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: flush_cc_cache_to_reg
static void flush_cc_cache_to_reg(struct bb_state *state, pseudo_t pseudo, struct hardreg *reg)
{
	int opcode = state->cc_opcode;

	state->cc_opcode = 0;
	state->cc_target = NULL;
	output_insn(state, "%s %s", opcodes[opcode], reg->name);
}

// Assembly:
movslq 0x20(%rdi), %rax
andl $0x0, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
leaq 0x462a6(%rip), %rcx     # 0x576c0
movq (%rcx,%rax,8), %rdx
movq (%rsi), %rcx
leaq 0x2bf97(%rip), %rsi     # 0x3d3bf
leaq 0x2bf9c(%rip), %r8      # 0x3d3cb
xorl %eax, %eax
jmp 0x10bf5
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: find_pseudo_storage
static struct storage_hash *find_pseudo_storage(struct bb_state *state, pseudo_t pseudo, struct hardreg *reg)
{
	struct storage_hash *src;

	src = find_storage_hash(pseudo, state->internal);
	if (!src) {
		src = find_storage_hash(pseudo, state->inputs);
		if (!src) {
			src = find_storage_hash(pseudo, state->outputs);
			/* Undefined? Screw it! */
			if (!src)
				return NULL;

			/*
			 * If we found output storage, it had better be local stack
			 * that we flushed to earlier..
			 */
			if (src->storage->type != REG_STACK)
				return NULL;
		}
	}

	/*
	 * Incoming pseudo with out any pre-set storage allocation?
	 * We can make up our own, and obviously prefer to get it
	 * in the register we already selected (if it hasn't been
	 * used yet).
	 */
	if (src->storage->type == REG_UDEF) {
		if (reg && !reg->used) {
			src->storage->type = REG_REG;
			src->storage->regno = reg - hardregs;
			return NULL;
		}
		alloc_stack(state, src->storage);
	}
	return src;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %rsi
movq %r14, %rdi
callq 0x112e7
testq %rax, %rax
jne 0x11466
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x112e7
testq %rax, %rax
je 0x114ba
movq %rax, %rcx
movq 0x18(%rcx), %rdx
cmpl $0x0, (%rdx)
jne 0x114d9
testq %rbx, %rbx
je 0x114a0
testb $0x1, 0x13(%rbx)
jne 0x114a0
movl $0x1, (%rdx)
leaq 0x4ed26(%rip), %rax     # 0x601b0
subq %rax, %rbx
pushq $0x18
popq %rsi
movq %rbx, %rax
cqto
idivq %rsi
movq 0x18(%rcx), %rdx
xorl %ecx, %ecx
jmp 0x114b5
movl $0x2, (%rdx)
movl 0x54118(%rip), %eax     # 0x655c4
leal 0x4(%rax), %esi
movl %esi, 0x5410f(%rip)     # 0x655c4
movl %eax, 0x10(%rdx)
jmp 0x114d9
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x112e7
testq %rax, %rax
je 0x114d7
movq %rax, %rcx
movq 0x18(%rax), %rax
cmpl $0x2, (%rax)
je 0x11469
xorl %ecx, %ecx
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: mark_reg_dead
static void mark_reg_dead(struct bb_state *state, pseudo_t pseudo, struct hardreg *reg)
{
	pseudo_t p;

	FOR_EACH_PTR_TAG(reg->contains, p) {
		if (p != pseudo)
			continue;
		if (CURRENT_TAG(p) & TAG_DEAD)
			continue;
		output_comment(state, "marking pseudo %s in reg %s dead", show_pseudo(pseudo), reg->name);
		TAG_CURRENT(p, TAG_DEAD);
		reg->dead++;
	} END_FOR_EACH_PTR(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdx), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x1159b
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2bfa5(%rip), %r12     # 0x3d4b3
movq (%rsp), %r13
xorl %ebp, %ebp
movl (%r13), %ecx
movsbq %cl, %rax
cmpq %rax, %rbp
jge 0x1158d
movq 0x18(%r13,%rbp,8), %rax
cmpw $0x100, %cx             # imm = 0x100
setb %dl
movq %rax, %rcx
andq $-0x4, %rcx
setne %sil
orb %dl, %sil
cmpb $0x1, %sil
jne 0x11588
cmpq %r14, %rcx
jne 0x11588
andl $0x1, %eax
jne 0x11588
movq %r14, %rdi
callq 0x1734a
movq (%rbx), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x109c1
movq 0x18(%r13,%rbp,8), %rax
andq $-0x4, %rax
incq %rax
movq %rax, 0x18(%r13,%rbp,8)
movl 0x10(%rbx), %eax
movl $0x10000, %ecx          # imm = 0x10000
addl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x12(%rbx)
incq %rbp
jmp 0x11514
movq 0x10(%r13), %r13
cmpq (%rsp), %r13
jne 0x11512
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: show_op
static const char *show_op(struct bb_state *state, struct operand *op)
{
	static char buf[256][4];
	static int bufnr;
	char *p, *ret;
	int nr;

	nr = (bufnr + 1) & 3;
	bufnr = nr;
	ret = p = buf[nr];

	switch (op->type) {
	case OP_UNDEF:
		return "undef";
	case OP_REG:
		return op->reg->name;
	case OP_VAL:
		sprintf(p, "$%lld", op->value);
		break;
	case OP_MEM:
	case OP_ADDR:
		if (op->offset)
			p += sprintf(p, "%d", op->offset);
		if (op->sym)
			p += sprintf(p, "%s%s",
				op->offset ? "+" : "",
				show_ident(op->sym->ident));
		if (op->base || op->index) {
			p += sprintf(p, "(%s%s%s",
				op->base ? op->base->name : "",
				(op->base && op->index) ? "," : "",
				op->index ? op->index->name : "");
			if (op->scale > 1)
				p += sprintf(p, ",%d", op->scale);
			*p++ = ')';
			*p = '\0';
		}
		break;
	}
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x54c08(%rip), %eax     # 0x661c0
incl %eax
andl $0x3, %eax
movl %eax, 0x54bfd(%rip)     # 0x661c0
leaq 0x547f6(%rip), %rcx     # 0x65dc0
leaq (%rcx,%rax,4), %rbx
movl (%rdi), %eax
cmpq $0x4, %rax
ja 0x116f9
movq %rdi, %r14
leaq 0x2bb80(%rip), %rcx     # 0x3d164
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %edx
movq %rbx, %r15
testl %edx, %edx
je 0x1160f
leaq 0x2bfe4(%rip), %rsi     # 0x3d5e3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf2e0
movslq %eax, %r15
addq %rbx, %r15
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x11654
cmpl $0x0, 0x8(%r14)
leaq 0x2cd25(%rip), %rcx     # 0x3e349
leaq 0x2e49f(%rip), %r12     # 0x3faca
cmoveq %rcx, %r12
movq 0x18(%rax), %rdi
callq 0x2f4f9
leaq 0x2f889(%rip), %rsi     # 0x40ec8
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xf2e0
cltq
addq %rax, %r15
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x116a6
movq (%rax), %rdx
movq 0x20(%r14), %rax
leaq 0x2ccde(%rip), %r8      # 0x3e349
leaq 0x2be70(%rip), %rcx     # 0x3d4e2
testq %rax, %rax
cmoveq %r8, %rcx
jne 0x116b9
jmp 0x116bc
movq 0x8(%r14), %rdx
leaq 0x2be4c(%rip), %rsi     # 0x3d4d4
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf2e0
jmp 0x116f9
leaq 0x32208(%rip), %rbx     # 0x438a3
jmp 0x116f9
movq 0x8(%r14), %rax
movq (%rax), %rbx
jmp 0x116f9
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x116f9
leaq 0x2cc93(%rip), %rcx     # 0x3e349
movq %rcx, %rdx
movq (%rax), %r8
leaq 0x2be17(%rip), %rsi     # 0x3d4da
movq %r15, %rdi
xorl %eax, %eax
callq 0xf2e0
movslq %eax, %r12
addq %r15, %r12
movl 0xc(%r14), %edx
cmpl $0x2, %edx
jb 0x116f2
leaq 0x2be01(%rip), %rsi     # 0x3d4e4
movq %r12, %rdi
xorl %eax, %eax
callq 0xf2e0
cltq
addq %rax, %r12
movw $0x29, (%r12)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: put_operand
static void put_operand(struct bb_state *state, struct operand *op)
{
	switch (op->type) {
	case OP_REG:
		op->reg->busy--;
		break;
	case OP_ADDR:
	case OP_MEM:
		if (op->base)
			op->base->busy--;
		if (op->index)
			op->index->busy--;
		break;
	default:
		break;
	}
}

// Assembly:
movl (%rdi), %eax
leal -0x3(%rax), %ecx
cmpl $0x2, %ecx
jae 0x11729
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x1171f
decw 0x10(%rax)
movq 0x20(%rdi), %rax
testq %rax, %rax
jne 0x11732
retq
cmpl $0x1, %eax
jne 0x11728
movq 0x8(%rdi), %rax
decw 0x10(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: get_generic_operand
static struct operand *get_generic_operand(struct bb_state *state, pseudo_t pseudo)
{
	struct hardreg *reg;
	struct storage *src;
	struct storage_hash *hash;
	struct operand *op = malloc(sizeof(*op));

	memset(op, 0, sizeof(*op));
	switch (pseudo->type) {
	case PSEUDO_VAL:
		op->type = OP_VAL;
		op->value = pseudo->value;
		break;

	case PSEUDO_SYM: {
		struct symbol *sym = pseudo->sym;
		op->type = OP_ADDR;
		if (sym->ctype.modifiers & MOD_NONLOCAL) {
			op->sym = sym;
			break;
		}
		op->base = hardregs + REG_EBP;
		op->offset = get_sym_frame_offset(state, pseudo);
		break;
	}

	default:
		reg = find_in_reg(state, pseudo);
		if (reg) {
			op->type = OP_REG;
			op->reg = reg;
			reg->busy++;
			break;
		}
		hash = find_pseudo_storage(state, pseudo, NULL);
		if (!hash)
			break;
		src = hash->storage;
		switch (src->type) {
		case REG_REG:
			op->type = OP_REG;
			op->reg = hardregs + src->regno;
			op->reg->busy++;
			break;
		case REG_FRAME:
			op->type = OP_MEM;
			op->offset = src->offset;
			op->base = hardregs + REG_EBP;
			break;
		case REG_STACK:
			op->type = OP_MEM;
			op->offset = src->offset;
			op->base = hardregs + REG_ESP;
			break;
		default:
			break;
		}
	}
	return op;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0xf1b0
movq %rax, %rbx
movl 0x4(%r14), %eax
cmpl $0x5, %eax
je 0x11771
cmpl $0x6, %eax
jne 0x1178a
movl $0x2, (%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x8(%rbx)
jmp 0x1184d
movq 0x18(%r14), %rax
movl $0x4, (%rbx)
testb $0x18, 0x68(%rax)
je 0x117ad
movq %rax, 0x10(%rbx)
jmp 0x1184d
movq %r15, %rdi
movq %r14, %rsi
callq 0x10d8b
testq %rax, %rax
je 0x117d6
movl $0x1, (%rbx)
movq %rax, 0x8(%rbx)
incw 0x10(%rax)
jmp 0x1184d
leaq 0x4ea8c(%rip), %rax     # 0x60240
movq %rax, 0x18(%rbx)
movl (%r14), %eax
testl %eax, %eax
jns 0x117d1
movl 0x53dff(%rip), %eax     # 0x655c4
leal 0x4(%rax), %ecx
movl %ecx, 0x53df6(%rip)     # 0x655c4
movl %eax, (%r14)
movl %eax, 0x8(%rbx)
jmp 0x1184d
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x11436
testq %rax, %rax
je 0x1184d
movq 0x18(%rax), %rax
movl (%rax), %ecx
cmpl $0x3, %ecx
je 0x11836
cmpl $0x2, %ecx
je 0x11821
cmpl $0x1, %ecx
jne 0x1184d
movl $0x1, (%rbx)
movslq 0x10(%rax), %rax
imulq $0x18, %rax, %rax
leaq 0x4e99e(%rip), %rcx     # 0x601b0
leaq (%rcx,%rax), %rdx
movq %rdx, 0x8(%rbx)
incw 0x10(%rax,%rcx)
jmp 0x1184d
movl $0x3, (%rbx)
movl 0x10(%rax), %eax
movl %eax, 0x8(%rbx)
leaq 0x4ea24(%rip), %rax     # 0x60258
jmp 0x11849
movl $0x3, (%rbx)
movl 0x10(%rax), %eax
movl %eax, 0x8(%rbx)
leaq 0x4e9f7(%rip), %rax     # 0x60240
movq %rax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: flush_cc_cache
static void flush_cc_cache(struct bb_state *state)
{
	pseudo_t pseudo = state->cc_target;

	if (pseudo) {
		struct hardreg *dst;

		state->cc_target = NULL;

		if (!state->cc_dead) {
			dst = target_reg(state, pseudo, pseudo);
			flush_cc_cache_to_reg(state, pseudo, dst);
		}
	}
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rdx
testq %rdx, %rdx
je 0x1186e
movq %rdi, %rbx
andq $0x0, 0x28(%rdi)
cmpl $0x0, 0x24(%rdi)
je 0x11870
popq %rbx
retq
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x10e53
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x11406
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: is_dead_reg
static int is_dead_reg(struct bb_state *state, pseudo_t pseudo, struct hardreg *reg)
{
	pseudo_t p;
	FOR_EACH_PTR_TAG(reg->contains, p) {
		if (p == pseudo)
			return CURRENT_TAG(p) & TAG_DEAD;
	} END_FOR_EACH_PTR(p);
	return 0;
}

// Assembly:
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x118f0
pushq %rbx
movq %rcx, %rdx
movzwl (%rdx), %esi
movsbl %sil, %eax
testw %ax, %ax
movl $0x0, %r8d
cmovgl %eax, %r8d
movzwl %r8w, %r8d
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x118de
cmpw $0x100, %si             # imm = 0x100
setb %r11b
movq 0x18(%rdx,%r9,8), %rax
movq %rax, %r10
andq $-0x4, %r10
setne %bl
orb %r11b, %bl
incq %r9
cmpb $0x1, %bl
jne 0x118af
cmpq %rdi, %r10
jne 0x118af
jmp 0x118eb
movq 0x10(%rdx), %rdx
cmpq %rcx, %rdx
jne 0x11894
xorl %eax, %eax
jmp 0x118ee
andl $0x1, %eax
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: do_binop
static void do_binop(struct bb_state *state, struct instruction *insn, pseudo_t val1, pseudo_t val2)
{
	const char *op = opcodes[insn->opcode];
	struct operand *src = get_register_operand(state, val1, insn->target);
	struct operand *src2 = get_generic_operand(state, val2);
	struct hardreg *dst;

	dst = target_copy_reg(state, src->reg, insn->target);
	output_insn(state, "%s.%d %s,%s", op, insn->size, show_op(state, src2), dst->name);
	put_operand(state, src);
	put_operand(state, src2);
	add_pseudo_reg(state, insn->target, dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
andl $0x7f, %eax
leaq 0x45da7(%rip), %rcx     # 0x576c0
movq (%rcx,%rax,8), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsi), %r15
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0xf1b0
movq %rax, %r12
movl $0x1, (%rax)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x10d3f
movq %rax, %r15
movq %rax, 0x8(%r12)
incw 0x10(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11737
movq %rax, %r13
movq 0x20(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x119d8
movq %rax, %rbp
movl (%r14), %r15d
shrl $0x8, %r15d
movq %r13, %rdi
callq 0x115aa
movq (%rbp), %r9
leaq 0x2bbab(%rip), %rcx     # 0x3d539
movq %rcx, (%rsp)
leaq 0x2bb8e(%rip), %rsi     # 0x3d527
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x10bf5
movq %r12, %rdi
callq 0x11708
movq %r13, %rdi
callq 0x11708
movq 0x20(%r14), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10a7d
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: kill_dead_reg
static void kill_dead_reg(struct hardreg *reg)
{
	if (reg->dead) {
		pseudo_t p;
		
		FOR_EACH_PTR_TAG(reg->contains, p) {
			if (CURRENT_TAG(p) & TAG_DEAD) {
				DELETE_CURRENT_PTR(p);
				reg->dead--;
			}
		} END_FOR_EACH_PTR(p);
		PACK_PTR_LIST(&reg->contains);
		assert(!reg->dead);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpb $0x0, 0x12(%rdi)
je 0x11ac4
movq %rdi, %rbx
addq $0x8, %rdi
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x11ab9
movl $0xf0f0f0f0, %ecx       # imm = 0xF0F0F0F0
movl $0xff0000, %edx         # imm = 0xFF0000
movq %rax, %rsi
leaq 0x18(%rsi), %r9
leaq 0x10(%rsi), %r8
xorl %r10d, %r10d
movl (%rsi), %r11d
movsbl %r11b, %ebp
cmpl %ebp, %r10d
jge 0x11aad
movslq %r10d, %r14
movq (%r9,%r14,8), %r15
cmpw $0x100, %r11w           # imm = 0x100
setae %bpl
cmpq $0x4, %r15
setb %r12b
testb %r12b, %bpl
jne 0x11aa8
andl $0x1, %r15d
je 0x11aa8
movsbl %r11b, %ebp
leaq (%r9,%r14,8), %r11
movswq %bp, %r14
leaq (%r8,%r14,8), %r14
cmpq %r14, %r11
jae 0x11a91
movq 0x8(%r11), %r15
movq %r15, (%r11)
addq $0x8, %r11
jmp 0x11a7f
movq %rcx, (%r11)
decb (%rsi)
decl %r10d
movl 0x10(%rbx), %r11d
addl %edx, %r11d
shrl $0x10, %r11d
movb %r11b, 0x12(%rbx)
incl %r10d
jmp 0x11a3f
movq (%r8), %rsi
cmpq %rax, %rsi
jne 0x11a34
callq 0x2530c
cmpb $0x0, 0x12(%rbx)
jne 0x11acd
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ba6e(%rip), %rdi     # 0x3d542
leaq 0x2b7d9(%rip), %rsi     # 0x3d2b4
leaq 0x2ba6b(%rip), %rcx     # 0x3d54d
movl $0x36d, %edx            # imm = 0x36D
callq 0xf120
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: copy_reg
static struct hardreg *copy_reg(struct bb_state *state, struct hardreg *src, pseudo_t target)
{
	int i;
	struct hardreg *reg;

	/* If the container has been killed off, just re-use it */
	if (!src->contains)
		return src;

	/* If "src" only has one user, and the contents are dead, we can re-use it */
	if (src->busy == 1 && src->dead == 1)
		return src;

	reg = preferred_reg(state, target);
	if (reg && !reg->contains) {
		output_comment(state, "copying %s to preferred target %s", show_pseudo(target), reg->name);
		move_reg(state, src, reg);
		return reg;
	}

	for (i = 0; i < REGNO; i++) {
		reg = hardregs + i;
		if (!reg->contains) {
			output_comment(state, "copying %s to %s", show_pseudo(target), reg->name);
			output_insn(state, "movl %s,%s", src->name, reg->name);
			return reg;
		}
	}

	flush_reg(state, src);
	return src;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x11bac
movl $0xffffff, %eax         # imm = 0xFFFFFF
andl 0x10(%rbx), %eax
cmpl $0x10001, %eax          # imm = 0x10001
je 0x11bac
movq %rdx, %r12
movq %rdi, %r14
movq %rdx, %rsi
callq 0x110c0
testq %rax, %rax
je 0x11b39
movq %rax, %r15
cmpq $0x0, 0x8(%rax)
je 0x11bc1
pushq $-0x18
popq %rax
leaq 0x4e66d(%rip), %r13     # 0x601b0
leaq 0x18(%rax), %rbp
cmpq $0x90, %rbp
je 0x11ba1
cmpq $0x0, 0x20(%rax,%r13)
movq %rbp, %rax
jne 0x11b43
movq %r12, %rdi
callq 0x1734a
movq %r13, %r15
addq %rbp, %r15
movq (%rbp,%r13), %rcx
leaq 0x2ba1f(%rip), %rsi     # 0x3d594
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x109c1
movq (%rbx), %rdx
movq (%rbp,%r13), %rcx
leaq 0x2b7a4(%rip), %rsi     # 0x3d335
leaq 0x2ba0d(%rip), %r8      # 0x3d5a5
xorl %eax, %eax
callq 0x10bf5
jmp 0x11baf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1111e
movq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x1734a
movq (%r15), %rcx
leaq 0x2b99f(%rip), %rsi     # 0x3d572
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x109c1
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x11bf0
jmp 0x11baf
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: generic
static const char *generic(struct bb_state *state, pseudo_t pseudo)
{
	struct hardreg *reg;
	struct operand *op = get_generic_operand(state, pseudo);
	static char buf[100];
	const char *str;

	switch (op->type) {
	case OP_ADDR:
		if (!op->offset && op->base && !op->sym)
			return op->base->name;
		if (op->sym && !op->base) {
			int len = sprintf(buf, "$ %s", show_op(state, op));
			if (op->offset)
				sprintf(buf + len, " + %d", op->offset);
			return buf;
		}
		str = show_op(state, op);
		put_operand(state, op);
		reg = target_reg(state, pseudo, NULL);
		output_insn(state, "lea %s,%s", show_op(state, op), reg->name);
		return reg->name;		

	default:
		str = show_op(state, op);
	}
	put_operand(state, op);
	return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x11737
movq %rax, %rbx
cmpl $0x4, (%rax)
jne 0x11c8c
movl 0x8(%rbx), %ebp
testl %ebp, %ebp
je 0x11cad
cmpq $0x0, 0x10(%rbx)
je 0x11c41
cmpq $0x0, 0x18(%rbx)
je 0x11cca
movq %rbx, %rdi
callq 0x115aa
movq %rbx, %rdi
callq 0x11708
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x10e53
movq %rax, %r14
movq %rbx, %rdi
callq 0x115aa
movq (%r14), %rcx
leaq 0x2b973(%rip), %rsi     # 0x3d5e6
leaq 0x2b97c(%rip), %r8      # 0x3d5f6
movq %rax, %rdx
xorl %eax, %eax
callq 0x10bf5
movq (%r14), %rbx
movq %rbx, %rax
jmp 0x11ca2
movq %rbx, %rdi
callq 0x115aa
movq %rax, %r14
movq %rbx, %rdi
callq 0x11708
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x11c2f
cmpq $0x0, 0x10(%rbx)
jne 0x11c2f
movq (%rax), %rbx
jmp 0x11c87
movq %rbx, %rdi
callq 0x115aa
leaq 0x544f7(%rip), %rbx     # 0x661d0
leaq 0x2b8fb(%rip), %rsi     # 0x3d5db
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xf2e0
testl %ebp, %ebp
je 0x11c87
movslq %eax, %rdi
leaq 0x544d5(%rip), %rbx     # 0x661d0
addq %rbx, %rdi
leaq 0x2b8db(%rip), %rsi     # 0x3d5e0
movl %ebp, %edx
xorl %eax, %eax
callq 0xf2e0
jmp 0x11c87
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: write_val_to_storage
static void write_val_to_storage(struct bb_state *state, pseudo_t src, struct storage *storage)
{
	struct hardreg *out;

	switch (storage->type) {
	case REG_UDEF:
		alloc_stack(state, storage);
	default:
		output_insn(state, "movl %s,%s", show_pseudo(src), show_memop(storage));
		break;
	case REG_REG:
		out = hardregs + storage->regno;
		output_insn(state, "movl %s,%s", show_pseudo(src), out->name);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rdi
movl (%rdx), %eax
cmpl $0x1, %eax
je 0x12301
testl %eax, %eax
jne 0x122db
movl $0x2, (%rbx)
movl 0x532f5(%rip), %eax     # 0x655c4
leal 0x4(%rax), %ecx
movl %ecx, 0x532ec(%rip)     # 0x655c4
movl %eax, 0x10(%rbx)
callq 0x1734a
movq %rax, %r14
movq %rbx, %rdi
callq 0x11398
leaq 0x2b043(%rip), %rsi     # 0x3d335
leaq 0x2b415(%rip), %r8      # 0x3d70e
movq %r14, %rdx
movq %rax, %rcx
jmp 0x1232a
movslq 0x10(%rbx), %rax
imulq $0x18, %rax, %rbx
leaq 0x4dea0(%rip), %r14     # 0x601b0
callq 0x1734a
movq (%rbx,%r14), %rcx
leaq 0x2b015(%rip), %rsi     # 0x3d335
leaq 0x2b3e7(%rip), %r8      # 0x3d70e
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10bf5
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/example.c
// Function: replace_asm_arg
static void replace_asm_arg(char **dst_p, struct asm_arg *arg)
{
	char *dst = *dst_p;
	int len = strlen(arg->value);

	memcpy(dst, arg->value, len);
	*dst_p = dst + len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rsi), %r15
movq %r15, %rdi
callq 0xf0d0
movslq %eax, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xf1e0
addq %r12, %r14
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/storage.c
// Function: gather_storage
struct storage_hash_list *gather_storage(struct basic_block *bb, enum inout_enum inout)
{
	int i;
	struct storage_hash *entry, *prev;
	struct storage_hash_list *list = NULL;

	for (i = 0; i < MAX_STORAGE_HASH; i++) {
		struct storage_hash *hash;
		FOR_EACH_PTR(storage_hash_table[i], hash) {
			if (hash->bb == bb && hash->inout == inout)
				add_ptr_list(&list, hash);
		} END_FOR_EACH_PTR(hash);
	}
	sort_hash_list(&list);

	prev = NULL;
	FOR_EACH_PTR(list, entry) {
		if (prev && entry->pseudo == prev->pseudo) {
			assert(entry == prev);
			DELETE_CURRENT_PTR(entry);
		}
		prev = entry;
	} END_FOR_EACH_PTR(entry);
	PACK_PTR_LIST(&list);
	return list;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
movl %esi, %ebp
movq %rdi, %r14
xorl %eax, %eax
cmpq $0x40, %rax
je 0x2c0e8
movq %rax, 0x10(%rsp)
leaq 0x4036e(%rip), %rcx     # 0x6c400
movq (%rcx,%rax,8), %r12
testq %r12, %r12
je 0x2c0de
movq %r12, %r13
xorl %r15d, %r15d
movl (%r13), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x2c0d5
movq 0x18(%r13,%r15,8), %rsi
cmpw $0x100, %ax             # imm = 0x100
jb 0x2c0be
testq %rsi, %rsi
je 0x2c0d0
cmpq %r14, (%rsi)
jne 0x2c0d0
cmpl %ebp, 0x10(%rsi)
jne 0x2c0d0
movq %rbx, %rdi
callq 0x253e5
incq %r15
jmp 0x2c0a1
movq 0x10(%r13), %r13
cmpq %r12, %r13
jne 0x2c09e
movq 0x10(%rsp), %rax
incq %rax
jmp 0x2c080
leaq 0x6e6(%rip), %rsi       # 0x2c7d5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2b0d0
movq (%rbx), %rax
testq %rax, %rax
je 0x2c1ad
xorl %r11d, %r11d
movl $0xf0f0f0f0, %ecx       # imm = 0xF0F0F0F0
movq %rax, %rdx
leaq 0x18(%rdx), %rdi
leaq 0x10(%rdx), %rsi
movzwl (%rdx), %r9d
xorl %r8d, %r8d
movsbl %r9b, %r10d
cmpl %r10d, %r8d
jge 0x2c1a1
movslq %r8d, %rbx
movq (%rdi,%rbx,8), %r10
cmpw $0x100, %r9w            # imm = 0x100
jb 0x2c144
testq %r10, %r10
jne 0x2c144
movq %r11, %r10
jmp 0x2c199
testq %r11, %r11
je 0x2c199
movq 0x8(%r10), %r14
cmpq 0x8(%r11), %r14
jne 0x2c199
cmpq %r11, %r10
jne 0x2c1cc
movsbl %r9b, %r11d
leaq (%rdi,%rbx,8), %r9
movswq %r11w, %r11
leaq (%rsi,%r11,8), %r11
cmpq %r11, %r9
jae 0x2c17a
movq 0x8(%r9), %rbx
movq %rbx, (%r9)
addq $0x8, %r9
jmp 0x2c168
movq %rcx, (%r9)
movl (%rdx), %r9d
leal -0x1(%r9), %r11d
movzbl %r11b, %r11d
andl $0xffffff00, %r9d       # imm = 0xFFFFFF00
orl %r11d, %r9d
movw %r9w, (%rdx)
decl %r8d
incl %r8d
movq %r10, %r11
jmp 0x2c122
movq (%rsi), %rdx
cmpq %rax, %rdx
jne 0x2c113
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2530c
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18f69(%rip), %rdi     # 0x4513c
leaq 0x18f70(%rip), %rsi     # 0x4514a
leaq 0x18f73(%rip), %rcx     # 0x45154
pushq $0x3f
popq %rdx
callq 0xf120
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/storage.c
// Function: lookup_storage
struct storage *lookup_storage(struct basic_block *bb, pseudo_t pseudo, enum inout_enum inout)
{
	struct storage_hash_list *list = storage_hash_table[storage_hash(bb,pseudo,inout)];
	struct storage_hash *hash;

	FOR_EACH_PTR(list, hash) {
		if (hash->bb == bb && hash->pseudo == pseudo && hash->inout == inout)
			return hash->storage;
	} END_FOR_EACH_PTR(hash);
	return NULL;
}

// Assembly:
leal (%rsi,%rdi), %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0x6, %ecx
addl %eax, %ecx
andl $0x3f, %ecx
leaq 0x40201(%rip), %rax     # 0x6c400
movq (%rax,%rcx,8), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x2c267
pushq %rbx
movq %rcx, %r8
movzwl (%r8), %r9d
movsbl %r9b, %r10d
testw %r10w, %r10w
movl $0x0, %r11d
cmovgl %r10d, %r11d
movzwl %r11w, %r10d
xorl %r11d, %r11d
cmpq %r11, %r10
je 0x2c257
movq 0x18(%r8,%r11,8), %rbx
cmpw $0x100, %r9w            # imm = 0x100
jb 0x2c242
testq %rbx, %rbx
je 0x2c252
cmpq %rdi, (%rbx)
jne 0x2c252
cmpq %rsi, 0x8(%rbx)
jne 0x2c252
cmpl %edx, 0x10(%rbx)
je 0x2c262
incq %r11
jmp 0x2c22b
movq 0x10(%r8), %r8
cmpq %rcx, %r8
jne 0x2c20e
jmp 0x2c266
movq 0x18(%rbx), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/storage.c
// Function: add_storage
void add_storage(struct storage *storage, struct basic_block *bb, pseudo_t pseudo, enum inout_enum inout)
{
	struct storage_hash_list **listp = storage_hash_table + storage_hash(bb,pseudo,inout);
	struct storage_hash *hash = alloc_storage_hash(storage);

	hash->bb = bb;
	hash->pseudo = pseudo;
	hash->inout = inout;

	add_ptr_list(listp, hash);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leal (%rdx,%rsi), %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x6, %ecx
addl %eax, %ecx
andl $0x3f, %ecx
leaq 0x4016c(%rip), %rax     # 0x6c400
leaq (%rax,%rcx,8), %r13
xorl %edi, %edi
callq 0x2c011
movq %rax, %rbp
leaq 0x18(%rax), %rsi
movq %r12, 0x18(%rax)
addq $0x8, %r12
movq %r12, %rdi
callq 0x253e5
movq %r15, (%rbp)
movq %r14, 0x8(%rbp)
movl %ebx, 0x10(%rbp)
movq %r13, %rdi
movq %rbp, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x253e5
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/storage.c
// Function: free_storage
void free_storage(void)
{
	int i;

	for (i = 0; i < MAX_STORAGE_HASH; i++) {
		vrfy_storage(storage_hash_table + i);
		free_ptr_list(storage_hash_table + i);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %ecx, %ecx
cmpq $0x40, %rcx
je 0x2c418
leaq 0x40105(%rip), %rax     # 0x6c400
movq %rcx, 0x10(%rsp)
leaq (%rax,%rcx,8), %rbx
movq %rbx, %rdi
leaq 0x4e5(%rip), %rsi       # 0x2c7f3
callq 0x2b0d0
movq %rbx, 0x8(%rsp)
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x2c401
movq %rsi, %r14
xorl %ebx, %ebx
movq %rsi, 0x18(%rsp)
xorl %r15d, %r15d
movl (%r14), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x2c3f4
movq 0x18(%r14,%r15,8), %rbp
cmpw $0x100, %ax             # imm = 0x100
jb 0x2c359
testq %rbp, %rbp
jne 0x2c359
movq %rbx, %rbp
jmp 0x2c3e9
testq %rbx, %rbx
je 0x2c3e9
movq 0x18(%rbx), %rdi
movq 0x18(%rbp), %rax
cmpq %rax, %rdi
je 0x2c351
movq (%rbx), %r12
cmpq (%rbp), %r12
jne 0x2c3e9
movl 0x10(%rbx), %ecx
cmpl 0x10(%rbp), %ecx
jne 0x2c3e9
movl (%rdi), %edx
testl %edx, %edx
je 0x2c3e9
cmpl (%rax), %edx
jne 0x2c3e9
movl 0x10(%rdi), %edx
cmpl 0x10(%rax), %edx
jne 0x2c3e9
testl %ecx, %ecx
leaq 0x1136c(%rip), %r13     # 0x3d707
leaq 0x19d21(%rip), %rax     # 0x460c3
cmoveq %rax, %r13
callq 0x2c427
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rdi
callq 0x1734a
movq %rax, %rbx
movq 0x8(%rbp), %rdi
callq 0x1734a
leaq 0x18e1b(%rip), %rdi     # 0x451e7
movq %r13, %rsi
movq %r12, %rdx
movq 0x20(%rsp), %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xf0f0
movq 0x18(%rsp), %rsi
incq %r15
movq %rbp, %rbx
jmp 0x2c331
movq 0x10(%r14), %r14
cmpq %rsi, %r14
jne 0x2c32e
movq 0x8(%rsp), %rdi
callq 0x2582c
movq 0x10(%rsp), %rcx
incq %rcx
jmp 0x2c2ea
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/storage.c
// Function: show_storage
const char *show_storage(struct storage *s)
{
	static char buffer[1024];
	if (!s)
		return "none";
	switch (s->type) {
	case REG_REG:
		sprintf(buffer, "reg%d (%d)", s->regno, s->name);
		break;
	case REG_STACK:
		sprintf(buffer, "%d(SP) (%d)", s->offset, s->name);
		break;
	case REG_ARG:
		sprintf(buffer, "ARG%d (%d)", s->regno, s->name);
		break;
	default:
		sprintf(buffer, "%d:%d (%d)", s->type, s->regno, s->name);
		break;
	}
	return buffer;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2c455
movl (%rdi), %edx
movl 0x4(%rdi), %r8d
movl 0x10(%rdi), %ecx
leaq 0x401c3(%rip), %rbx     # 0x6c600
cmpl $0x5, %edx
je 0x2c467
cmpl $0x2, %edx
je 0x2c45e
cmpl $0x1, %edx
jne 0x2c47f
leaq 0x18d51(%rip), %rsi     # 0x451a4
jmp 0x2c46e
leaq 0x17d5a(%rip), %rbx     # 0x441b6
jmp 0x2c490
leaq 0x18d4a(%rip), %rsi     # 0x451af
jmp 0x2c46e
leaq 0x18d4d(%rip), %rsi     # 0x451bb
movq %rbx, %rdi
movl %ecx, %edx
movl %r8d, %ecx
xorl %eax, %eax
callq 0xf2e0
jmp 0x2c490
leaq 0x18d40(%rip), %rsi     # 0x451c6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf2e0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/storage.c
// Function: storage_hash_cmp
static int storage_hash_cmp(const void *_a, const void *_b)
{
	const struct storage_hash *a = _a;
	const struct storage_hash *b = _b;
	struct storage *aa = a->storage;
	struct storage *bb = b->storage;

	if (a->bb != b->bb)
		return a->bb < b->bb ? -1 : 1;
	if (a->inout != b->inout)
		return a->inout < b->inout ? -1 : 1;
	if (aa->type != bb->type)
		return aa->type < bb->type ? -1 : 1;
	if (aa->regno != bb->regno)
		return aa->regno < bb->regno ? -1 : 1;
	return 0;
}

// Assembly:
movq (%rdi), %rcx
movq (%rsi), %rdx
cmpq %rdx, %rcx
je 0x2c805
xorl %eax, %eax
cmpq %rdx, %rcx
jmp 0x2c841
movl 0x10(%rdi), %ecx
movl 0x10(%rsi), %edx
cmpl %edx, %ecx
jne 0x2c837
movq 0x18(%rdi), %rcx
movq 0x18(%rsi), %rax
movl (%rcx), %edx
movl (%rax), %esi
cmpl %esi, %edx
jne 0x2c83d
movl 0x10(%rax), %edx
xorl %eax, %eax
cmpl %edx, 0x10(%rcx)
je 0x2c836
setge %al
movzbl %al, %eax
leal -0x1(,%rax,2), %eax
retq
xorl %eax, %eax
cmpl %edx, %ecx
jmp 0x2c841
xorl %eax, %eax
cmpl %esi, %edx
sbbl %eax, %eax
orl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/lbs/dispatch.c
// Function: workdone
static int
workdone(void * cookie, ssize_t lenread)
{
	struct dispatch_state * D = cookie;

	/* If we failed to read a thread ID, something is seriously wrong. */
	if (lenread != sizeof(size_t)) {
		warnp("workdone failed to read thread ID");
		goto err0;
	}

	/* Sanity-check the thread ID. */
	assert(D->wakeupID <= D->nreaders + 2);

	/* Send a response for whatever work was finished. */
	if (dispatch_response_send(D, D->workers[D->wakeupID]))
		goto err0;

	/* Mark the thread as available for more work. */
	if (D->wakeupID == D->nreaders + 1) {
		D->deleter_busy = 0;
	} else if (D->wakeupID == D->nreaders) {
		D->writer_busy = 0;
	} else {
		D->readers_idle[D->nreaders_idle++] = D->wakeupID;
	}

	/*
	 * If this was a read thread, check if there is pending work which
	 * should now be scheduled for this thread.
	 */
	if ((D-> wakeupID < D->nreaders) && dispatch_request_pokereadq(D))
		goto err0;

	/* Read the ID of another thread with completed work. */
	if ((D->wakeup_cookie = network_read(D->spair[0],
	    (uint8_t *)&D->wakeupID, sizeof(size_t), sizeof(size_t),
	    workdone, D)) == NULL) {
		warnp("Error reading thread ID from socket");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpq $0x8, %rsi
jne 0x3441
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x40(%rdi), %rax
addq $0x2, %rcx
cmpq %rcx, %rax
ja 0x3530
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x3df4
pushq $-0x1
popq %rbp
testl %eax, %eax
je 0x3479
movl %ebp, %eax
jmp 0x3472
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3461
movq %rax, %rbx
leaq 0x9030(%rip), %rdi      # 0xc485
xorl %eax, %eax
callq 0x9d39
andl $0x0, (%rbx)
jmp 0x346f
leaq 0x901d(%rip), %rdi      # 0xc485
xorl %eax, %eax
callq 0x9ec8
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x8(%rbx), %rcx
movq 0x40(%rbx), %rax
leaq 0x1(%rcx), %rdx
cmpq %rdx, %rax
jne 0x3490
andl $0x0, 0x14(%rbx)
jmp 0x34b7
cmpq %rcx, %rax
jne 0x349b
andl $0x0, 0x10(%rbx)
jmp 0x34cc
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x18(%rbx)
movq %rax, (%rdx,%rcx,8)
movq 0x8(%rbx), %rcx
movq 0x40(%rbx), %rax
cmpq %rcx, %rax
jae 0x34cc
movq %rbx, %rdi
callq 0x3c5e
testl %eax, %eax
jne 0x343d
leaq 0x40(%rbx), %rsi
movl 0x38(%rbx), %edi
leaq -0xd4(%rip), %r8        # 0x3406
pushq $0x8
popq %rcx
movq %rcx, %rdx
movq %rbx, %r9
callq 0x75e8
movq %rax, %rcx
movq %rax, 0x48(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x3472
callq 0x20a0
cmpl $0x0, (%rax)
je 0x351d
movq %rax, %rbx
leaq 0x8eb4(%rip), %rdi      # 0xc3c2
xorl %eax, %eax
callq 0x9d39
andl $0x0, (%rbx)
jmp 0x343d
leaq 0x8e9e(%rip), %rdi      # 0xc3c2
xorl %eax, %eax
callq 0x9ec8
jmp 0x343d
leaq 0x8f70(%rip), %rdi      # 0xc4a7
leaq 0x8ee2(%rip), %rsi      # 0xc420
leaq 0x8f81(%rip), %rcx      # 0xc4c6
pushq $0x27
popq %rdx
callq 0x2220
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/lbs/dispatch.c
// Function: dispatch_close
int
dispatch_close(struct dispatch_state * D)
{

	/* Sanity check. */
	assert(D->read_cookie == NULL);
	assert(D->npending == 0);

	/* Free the buffered reader for the connection. */
	netbuf_read_free(D->readq);

	/* Free the buffered writer for the connection. */
	netbuf_write_free(D->writeq);

	/* Close the connection. */
	while (close(D->sconn)) {
		if (errno == EINTR)
			continue;
		warnp("close");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x68(%rdi)
jne 0x37cb
movq %rdi, %rbx
cmpq $0x0, 0x70(%rdi)
jne 0x37ea
movq 0x60(%rbx), %rdi
callq 0x6ffb
movq 0x58(%rbx), %rdi
callq 0x73b0
movl 0x54(%rbx), %edi
callq 0x2240
testl %eax, %eax
je 0x37b1
callq 0x20a0
movq %rax, %r14
movl (%rax), %eax
cmpl $0x4, %eax
je 0x3782
leaq 0x9cc8(%rip), %rdi      # 0xd46c
testl %eax, %eax
jne 0x37b5
xorl %eax, %eax
callq 0x9ec8
jmp 0x37c0
xorl %eax, %eax
jmp 0x37c3
xorl %eax, %eax
callq 0x9d39
andl $0x0, (%r14)
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8c37(%rip), %rdi      # 0xc409
leaq 0x8c47(%rip), %rsi      # 0xc420
leaq 0x8c4b(%rip), %rcx      # 0xc42b
movl $0x18c, %edx            # imm = 0x18C
callq 0x2220
leaq 0x8c66(%rip), %rdi      # 0xc457
leaq 0x8c28(%rip), %rsi      # 0xc420
leaq 0x8c2c(%rip), %rcx      # 0xc42b
movl $0x18d, %edx            # imm = 0x18D
callq 0x2220
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/lbs/dispatch.c
// Function: dispatch_done
int
dispatch_done(struct dispatch_state * D)
{
	size_t i;
	int rc = 0;	/* No errors yet. */

	/* Shut down the worker threads. */
	for (i = 0; i < D->nreaders + 2; i++) {
		if (worker_kill(D->workers[i])) {
			warnp("Cannot destroy worker thread");
			rc = -1;
		}
	}
	free(D->workers);

	/* Stop reading work completion messages. */
	network_read_cancel(D->wakeup_cookie);

	/* Close the work completion message conduit. */
	while (close(D->spair[1])) {
		if (errno == EINTR)
			continue;
		warnp("close");
		rc = -1;
	}
	while (close(D->spair[0])) {
		if (errno == EINTR)
			continue;
		warnp("close");
		rc = -1;
	}

	/* Free allocated memory. */
	free(D->readers_idle);
	free(D);

	/* Return success, or failure if anything went wrong. */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8c4a(%rip), %r14      # 0xc468
pushq $-0x1
popq %r12
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
addq $0x2, %rax
cmpq %rax, %r13
jae 0x3873
movq (%rdi,%r13,8), %rdi
callq 0x4489
testl %eax, %eax
je 0x386e
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3861
movq %rax, %r15
movq %r14, %rdi
xorl %eax, %eax
callq 0x9d39
andl $0x0, (%r15)
jmp 0x386b
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ec8
movl %r12d, %ebp
incq %r13
jmp 0x3827
callq 0x2040
movq 0x48(%rbx), %rdi
callq 0x78bb
leaq 0x9be4(%rip), %r14      # 0xd46c
pushq $-0x1
popq %r12
movl 0x3c(%rbx), %edi
callq 0x2240
testl %eax, %eax
je 0x38ca
callq 0x20a0
movq %rax, %r15
movl (%rax), %eax
cmpl $0x4, %eax
je 0x388c
movq %r14, %rdi
testl %eax, %eax
jne 0x38ba
xorl %eax, %eax
callq 0x9ec8
movl %r12d, %ebp
jmp 0x388c
xorl %eax, %eax
callq 0x9d39
andl $0x0, (%r15)
movl %r12d, %ebp
jmp 0x388c
leaq 0x9b9b(%rip), %r14      # 0xd46c
pushq $-0x1
popq %r12
movl 0x38(%rbx), %edi
callq 0x2240
testl %eax, %eax
je 0x3910
callq 0x20a0
movq %rax, %r15
movl (%rax), %eax
cmpl $0x4, %eax
je 0x38d5
movq %r14, %rdi
testl %eax, %eax
jne 0x3900
xorl %eax, %eax
callq 0x9ec8
jmp 0x390b
xorl %eax, %eax
callq 0x9d39
andl $0x0, (%r15)
movl %r12d, %ebp
jmp 0x38d5
movq 0x20(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_params
int
dispatch_request_params(struct dispatch_state * dstate,
    struct proto_lbs_request * R)
{
	uint64_t blkno;

	/* Sanity check. */
	assert(dstate->blocklen <= UINT32_MAX);

	/* Figure out what the first available block number is. */
	if ((blkno = storage_nextblock(dstate->sstate)) == (uint64_t)(-1))
		goto err1;

	/* Send the response packet back. */
	dstate->npending--;
	if (proto_lbs_response_params(dstate->writeq, R->ID,
	    (uint32_t)dstate->blocklen, blkno))
		goto err1;

	/* Free the request structure. */
	free(R);

	/* Success! */
	return (0);

err1:
	free(R);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x2c(%rdi)
jne 0x3b45
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rdi), %rdi
callq 0x47dc
cmpq $-0x1, %rax
je 0x3b26
decq 0x70(%r14)
movq 0x58(%r14), %rdi
movq (%rbx), %rsi
movl 0x28(%r14), %edx
movq %rax, %rcx
callq 0xa17c
testl %eax, %eax
je 0x3b33
movq %rbx, %rdi
callq 0x2040
pushq $-0x1
popq %rax
jmp 0x3b3d
movq %rbx, %rdi
callq 0x2040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8a5a(%rip), %rdi      # 0xc5a6
leaq 0x8a72(%rip), %rsi      # 0xc5c5
leaq 0x8a7e(%rip), %rcx      # 0xc5d8
pushq $0x19
popq %rdx
callq 0x2220
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_params2
int
dispatch_request_params2(struct dispatch_state * dstate,
    struct proto_lbs_request * R)
{
	uint64_t blkno;
	uint64_t lastblk;

	/* Sanity check. */
	assert(dstate->blocklen <= UINT32_MAX);

	/* Figure out what the first available block number is. */
	if ((blkno = storage_nextblock(dstate->sstate)) == (uint64_t)(-1))
		goto err1;

	/*
	 * If we have blocks, the last block written is the one immediately
	 * prior to the first available block number.  Otherwise, we send a
	 * (uint64_t)(-1) back.
	 */
	if (blkno != 0)
		lastblk = blkno - 1;
	else
		lastblk = (uint64_t)(-1);

	/* Send the response packet back. */
	dstate->npending--;
	if (proto_lbs_response_params2(dstate->writeq, R->ID,
	    (uint32_t)dstate->blocklen, blkno, lastblk))
		goto err1;

	/* Free the request structure. */
	free(R);

	/* Success! */
	return (0);

err1:
	free(R);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x2c(%rdi)
jne 0x3bcc
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rdi), %rdi
callq 0x47dc
cmpq $-0x1, %rax
je 0x3bad
testq %rax, %rax
jne 0x3b8c
pushq $-0x1
popq %r8
jmp 0x3b92
movq %rax, %r8
decq %r8
decq 0x70(%r14)
movq 0x58(%r14), %rdi
movq (%rbx), %rsi
movl 0x28(%r14), %edx
movq %rax, %rcx
callq 0xa1d9
testl %eax, %eax
je 0x3bba
movq %rbx, %rdi
callq 0x2040
pushq $-0x1
popq %rax
jmp 0x3bc4
movq %rbx, %rdi
callq 0x2040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x89d3(%rip), %rdi      # 0xc5a6
leaq 0x89eb(%rip), %rsi      # 0xc5c5
leaq 0x8a48(%rip), %rcx      # 0xc629
pushq $0x3e
popq %rdx
callq 0x2220
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_get
int
dispatch_request_get(struct dispatch_state * dstate,
    struct proto_lbs_request * R)
{
	struct readq * rq;

	/* Add the read request to the pending read queue. */
	if ((rq = malloc(sizeof(struct readq))) == NULL)
		goto err1;
	rq->next = NULL;
	rq->reqID = R->ID;
	rq->blkno = R->r.get.blkno;
	if (dstate->readq_head == NULL)
		dstate->readq_head = rq;
	else
		*(dstate->readq_tail) = rq;
	dstate->readq_tail = &rq->next;

	/* Free the request structure. */
	free(R);

	/* Poke the queue. */
	if (dispatch_request_pokereadq(dstate))
		goto err0;

	/* Success! */
	return (0);

err1:
	free(R);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x2380
testq %rax, %rax
je 0x3c23
andq $0x0, (%rax)
movq (%r14), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, 0x78(%rbx)
je 0x3c2d
movq 0x80(%rbx), %rcx
jmp 0x3c31
movq %r14, %rdi
callq 0x2040
jmp 0x3c4f
leaq 0x78(%rbx), %rcx
movq %rax, (%rcx)
movq %rax, 0x80(%rbx)
movq %r14, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x3c5e
testl %eax, %eax
je 0x3c54
pushq $-0x1
popq %rax
jmp 0x3c56
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_pokereadq
int
dispatch_request_pokereadq(struct dispatch_state * dstate)
{
	struct readq * R;
	struct workctl * reader;
	uint8_t * buf;

	/* Loop as long as we can launch a read. */
	while ((dstate->nreaders_idle > 0) && (dstate->readq_head != NULL)) {
		/* Grab the first read from the queue. */
		R = dstate->readq_head;

		/* Allocate a buffer to read the block into. */
		if ((buf = malloc(dstate->blocklen)) == NULL)
			goto err0;

		/* Grab an idle reader. */
		reader = dstate->workers[
		    dstate->readers_idle[dstate->nreaders_idle - 1]];
		dstate->nreaders_idle -= 1;

		/* Give the reader the work. */
		if (worker_assign(reader, 0, R->blkno, 0, buf, R->reqID))
			goto err1;

		/* Remove the work from the queue. */
		dstate->readq_head = R->next;

		/* Free the dequeued read queue entry. */
		free(R);
	}

	/* Success! */
	return (0);

err1:
	dstate->nreaders_idle += 1;
	free(buf);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $-0x1
popq %rbx
movq 0x18(%r14), %r13
testq %r13, %r13
je 0x3cd0
movq 0x78(%r14), %r15
testq %r15, %r15
je 0x3cd0
movq 0x28(%r14), %rdi
callq 0x2380
testq %rax, %rax
je 0x3ce0
movq %rax, %r12
movq (%r14), %rax
movq 0x20(%r14), %rcx
movq -0x8(%rcx,%r13,8), %rcx
decq %r13
movq (%rax,%rcx,8), %rdi
movq %r13, 0x18(%r14)
movq 0x8(%r15), %r9
movq 0x10(%r15), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
movq %r12, %r8
callq 0x4284
testl %eax, %eax
jne 0x3cd4
movq (%r15), %rax
movq %rax, 0x78(%r14)
movq %r15, %rdi
callq 0x2040
jmp 0x3c6d
xorl %ebx, %ebx
jmp 0x3ce0
incq 0x18(%r14)
movq %r12, %rdi
callq 0x2040
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq