LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/saulvargas[P]re-C-sys/test_ib.c
// Function: main
int main(int argc, char** argv) {
    FILE* user_data;
    FILE* item_data;
    int N_users;
    int N_items;
    int N_prefs;
    int binary;
    recdata_t* recdata;
    recdata_t* cerdata;
    int uid;
    int i;
    similarity_t* similarity;
    recommender_t* recommender;
    idpairs_t* pairs;

    if (!read_args(argc, argv, &user_data, &item_data, &N_users, &N_items, &N_prefs, &binary)) {
        return EXIT_FAILURE;
    }

    recdata = recdata_simple_create(user_data, item_data, N_users, N_items, N_prefs, binary);
    cerdata = recdata_transposed_create(recdata);
    
    fclose(user_data);
    fclose(item_data);

    if (!binary) {
        similarity = similarity_veccosine_create(cerdata);
    } else {
        similarity = similarity_setcosine_create(cerdata);
    }

    recommender = recommender_ib_create(recdata, similarity, 10, binary);

    for (uid = 0; uid < recdata->N_users; uid++) {
        pairs = recommender_recommend(recommender, uid, 100);

        for (i = 0; i < idpairs_size(pairs); i++) {
            printf("%d\t%d\t%.4f\n", uid, idpairs_keys(pairs)[i], idpairs_values(pairs)[i]);
        }
        
        idpairs_close_deep(pairs);
    }
 
    recommender_close(recommender);
 
    similarity_close(similarity);
    
    recdata_close(recdata);
    recdata_close(cerdata);
    
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0xc(%rsp), %rax
leaq 0x1c(%rsp), %r10
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x24(%rsp), %r8
leaq 0x20(%rsp), %r9
pushq %rax
pushq %r10
callq 0x26e4
addq $0x10, %rsp
testl %eax, %eax
je 0x12a3
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %ecx
movl 0x1c(%rsp), %r8d
movl 0xc(%rsp), %r9d
callq 0x16ed
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0x17cd
movq %rax, %rbx
movq 0x30(%rsp), %rdi
callq 0x1060
movq 0x28(%rsp), %rdi
callq 0x1060
cmpl $0x0, 0xc(%rsp)
movq %rbx, 0x40(%rsp)
movq %rbx, %rdi
je 0x12ad
callq 0x19ab
jmp 0x12b2
movl $0x1, %eax
jmp 0x137b
callq 0x1c76
movl 0xc(%rsp), %ecx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %rax, 0x38(%rsp)
movq %rax, %rsi
movl $0xa, %edx
callq 0x253e
movq %rax, %r12
cmpl $0x0, (%rbx)
jle 0x1353
xorl %r13d, %r13d
leaq 0x1d22(%rip), %rbp      # 0x3004
movq %r12, %rdi
movl %r13d, %esi
movl $0x64, %edx
callq 0x2124
movq %rax, %r14
movq %rax, %rdi
callq 0x2601
testl %eax, %eax
jle 0x133e
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x2604
movl (%rax,%rbx,4), %r15d
movq %r14, %rdi
callq 0x2609
movsd (%rax,%rbx,8), %xmm0
movq %rbp, %rdi
movl %r13d, %esi
movl %r15d, %edx
movb $0x1, %al
callq 0x1080
incq %rbx
movq %r14, %rdi
callq 0x2601
cltq
cmpq %rax, %rbx
jl 0x1303
movq %r14, %rdi
callq 0x25dd
incl %r13d
movq 0x10(%rsp), %rax
cmpl (%rax), %r13d
jl 0x12e2
movq %r12, %rdi
callq 0x2209
movq 0x38(%rsp), %rdi
callq 0x1834
movq 0x10(%rsp), %rdi
callq 0x13c4
movq 0x40(%rsp), %rdi
callq 0x13c4
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/example.c
// Function: main
int main(int argc, char **argv)
{
	struct string_list *filelist = NULL;
	char *file;

	compile(sparse_initialize(argc, argv, &filelist));
	dbg_dead = 1;
	FOR_EACH_PTR(filelist, file) {
		compile(sparse(file));
	} END_FOR_EACH_PTR(file);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %rbx, %rdx
callq 0x17a06
movq %rax, %rdi
callq 0xfa5e
leaq 0x5edb0(%rip), %rax     # 0x6e7a8
movl $0x1, (%rax)
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xfa52
movq %rbx, %r14
movzwl (%r14), %eax
testb %al, %al
jle 0xfa49
xorl %r15d, %r15d
movq 0x18(%r14,%r15,8), %rdi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0xfa29
testq %rdi, %rdi
je 0xfa3a
callq 0x17d3e
movq %rax, %rdi
callq 0xfa5e
movzwl (%r14), %eax
incq %r15
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r15
jl 0xfa14
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0xfa09
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/example.c
// Function: generate_list
static void generate_list(struct basic_block_list *list, unsigned long generation)
{
	struct basic_block *bb;
	FOR_EACH_PTR(list, bb) {
		if (bb->generation == generation)
			continue;
		output_bb(bb, generation);
	} END_FOR_EACH_PTR(bb);
}

// Assembly:
testq %rdi, %rdi
je 0x110e9
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, %r15
movzwl (%r15), %eax
testb %al, %al
jle 0x110d5
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %rdi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x110b4
testq %rdi, %rdi
je 0x110c6
cmpq %rbx, 0x8(%rdi)
je 0x110c6
movq %rbx, %rsi
callq 0xfe39
movzwl (%r15), %eax
incq %r12
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r12
jl 0x1109f
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x11094
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/example.c
// Function: address
static const char *address(struct bb_state *state, struct instruction *memop)
{
	struct operand *op = get_address_operand(state, memop);
	const char *str = show_op(state, op);
	put_operand(state, op);
	return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x30(%rsi), %rsi
callq 0x11e17
movq %rax, %rbx
cmpl $0x4, (%rax)
jne 0x113f1
movl 0x38(%r14), %eax
addl %eax, 0x8(%rbx)
jmp 0x11424
movq %rbx, %rdi
callq 0x11de8
movq 0x30(%r14), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x11440
movl $0x4, (%rbx)
movq %rax, 0x18(%rbx)
incw 0x10(%rax)
movl 0x38(%r14), %eax
movl %eax, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x11c8a
movq %rax, %r14
movq %rbx, %rdi
callq 0x11de8
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/example.c
// Function: getreg
static struct hardreg *getreg(struct bb_state *state, pseudo_t pseudo, pseudo_t target)
{
	struct hardreg *reg;

	reg = find_in_reg(state, pseudo);
	if (reg)
		return reg;
	reg = target_reg(state, pseudo, target);
	return fill_reg(state, reg, pseudo);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1148c
movq %rax, %r12
testq %rax, %rax
jne 0x1147d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1154a
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x11636
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/example.c
// Function: find_in_reg
static struct hardreg *find_in_reg(struct bb_state *state, pseudo_t pseudo)
{
	int i;
	struct hardreg *reg;

	for (i = 0; i < REGNO; i++) {
		pseudo_t p;

		reg = hardregs + i;
		FOR_EACH_PTR_TAG(reg->contains, p) {
			if (p == pseudo) {
				last_reg = i;
				output_comment(state, "found pseudo %s in reg %s (busy=%d)", show_pseudo(pseudo), reg->name, reg->busy);
				return reg;
			}
		} END_FOR_EACH_PTR(p);
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x54d11(%rip), %rcx     # 0x661b0
leaq (%rax,%rax,2), %rdi
movq 0x8(%rcx,%rdi,8), %rdx
testq %rdx, %rdx
je 0x11504
leaq (%rcx,%rdi,8), %r14
movq %rdx, %rdi
movzwl (%rdi), %r9d
movsbl %r9b, %r8d
testw %r8w, %r8w
jle 0x114fb
movzwl %r8w, %r8d
movzwl %r9w, %r9d
xorl %r10d, %r10d
cmpl $0x100, %r9d            # imm = 0x100
setb %bpl
movq 0x18(%rdi,%r10,8), %r11
andq $-0x4, %r11
setne %r15b
orb %bpl, %r15b
cmpb $0x1, %r15b
jne 0x114f3
cmpq %rsi, %r11
je 0x11512
incq %r10
cmpq %r10, %r8
jne 0x114cd
movq 0x10(%rdi), %rdi
cmpq %rdx, %rdi
jne 0x114b4
incq %rax
cmpq $0x6, %rax
jne 0x1149f
xorl %r14d, %r14d
jmp 0x1153c
movl %eax, 0x5a0a8(%rip)     # 0x6b5c0
movq %rsi, %rdi
callq 0x17f3c
movq (%r14), %rcx
movzwl 0x10(%r14), %r8d
leaq 0x33d4e(%rip), %rsi     # 0x4527d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x110ea
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/example.c
// Function: target_reg
static struct hardreg *target_reg(struct bb_state *state, pseudo_t pseudo, pseudo_t target)
{
	int i;
	int unable_to_find_reg = 0;
	struct hardreg *reg;

	/* First, see if we have a preferred target register.. */
	reg = preferred_reg(state, target);
	if (reg && !reg->contains)
		goto found;

	reg = empty_reg(state);
	if (reg)
		goto found;

	i = last_reg;
	do {
		i++;
		if (i >= REGNO)
			i = 0;
		reg = hardregs + i;
		if (!reg->busy) {
			flush_reg(state, reg);
			last_reg = i;
			goto found;
		}
	} while (i != last_reg);
	assert(unable_to_find_reg);

found:
	add_pseudo_reg(state, pseudo, reg);
	return reg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rsi
movq %rdx, %rdi
callq 0x119f0
testq %rax, %rax
je 0x1158d
movq 0x18(%rax), %rax
cmpl $0x1, (%rax)
jne 0x1158d
movslq 0x10(%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0x54c2f(%rip), %rcx     # 0x661b0
cmpq $0x0, 0x8(%rcx,%rax,8)
je 0x11615
xorl %eax, %eax
leaq 0x54c1a(%rip), %r15     # 0x661b0
cmpq $0x0, 0x8(%rax,%r15)
je 0x115f8
addq $0x18, %rax
cmpl $0x90, %eax
jne 0x11596
movl 0x5a011(%rip), %eax     # 0x6b5c0
xorl %ecx, %ecx
movl %eax, %r12d
cmpl $0x5, %r12d
leal 0x1(%r12), %edx
movl %edx, %r12d
cmovgel %ecx, %r12d
movslq %r12d, %rdx
leaq (%rdx,%rdx,2), %rdx
cmpw $0x0, 0x10(%r15,%rdx,8)
je 0x115fd
cmpl %eax, %r12d
jne 0x115b4
leaq 0x33cc1(%rip), %rdi     # 0x452a1
leaq 0x33ccd(%rip), %rsi     # 0x452b4
leaq 0x33cd0(%rip), %rcx     # 0x452be
movl $0x202, %edx            # imm = 0x202
callq 0xf120
addq %rax, %r15
jmp 0x11619
leaq (%r15,%rdx,8), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x11810
movl %r12d, 0x59fad(%rip)    # 0x6b5c0
jmp 0x11619
leaq (%rcx,%rax,8), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x111a6
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11a37
movq %rsi, %rcx
movzwl (%rcx), %eax
movsbl %al, %edx
testw %dx, %dx
jle 0x11a2e
movzwl %dx, %edx
movzwl %ax, %r8d
xorl %r9d, %r9d
movq 0x18(%rcx,%r9,8), %rax
cmpl $0x100, %r8d            # imm = 0x100
jb 0x11a20
testq %rax, %rax
je 0x11a26
cmpq %rdi, 0x8(%rax)
je 0x11a39
incq %r9
cmpq %r9, %rdx
jne 0x11a0d
movq 0x10(%rcx), %rcx
cmpq %rsi, %rcx
jne 0x119f8
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x119f0
movq %rax, %r15
testq %rax, %rax
jne 0x11a8f
xorl %edi, %edi
callq 0x30bec
movq %rax, %r12
xorl %edi, %edi
callq 0x30c3d
movq %rax, %r15
leaq 0x18(%rax), %rsi
movq %r12, 0x18(%rax)
addq $0x8, %r12
movq %r12, %rdi
callq 0x283f0
movq %r14, 0x8(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x283f0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x119f0
testq %rax, %rax
jne 0x11b3c
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x119f0
testq %rax, %rax
je 0x11b8c
movq 0x18(%rax), %rcx
cmpl $0x0, (%rcx)
jne 0x11ba8
testq %rbx, %rbx
je 0x11b72
testb $0x1, 0x13(%rbx)
jne 0x11b72
movl $0x1, (%rcx)
leaq 0x54653(%rip), %rcx     # 0x661b0
subq %rcx, %rbx
shrq $0x3, %rbx
imull $0xaaaaaaab, %ebx, %edx # imm = 0xAAAAAAAB
movq 0x18(%rax), %rcx
xorl %eax, %eax
jmp 0x11b87
movl $0x2, (%rcx)
movl 0x59a46(%rip), %edx     # 0x6b5c4
leal 0x4(%rdx), %esi
movl %esi, 0x59a3d(%rip)     # 0x6b5c4
movl %edx, 0x10(%rcx)
jmp 0x11ba8
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x119f0
testq %rax, %rax
je 0x11ba6
movq 0x18(%rax), %rcx
cmpl $0x2, (%rcx)
je 0x11b3c
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11c7b
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x338d9(%rip), %r12     # 0x454b3
movq (%rsp), %r13
movzwl (%r13), %eax
testb %al, %al
jle 0x11c6d
xorl %ebp, %ebp
movq 0x18(%r13,%rbp,8), %rcx
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
setb %sil
movq %rcx, %rdx
andq $-0x4, %rdx
setne %dil
orb %sil, %dil
cmpb $0x1, %dil
jne 0x11c5e
cmpq %r14, %rdx
jne 0x11c5e
andl $0x1, %ecx
jne 0x11c5e
movq %r14, %rdi
callq 0x17f3c
movq (%rbx), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x110ea
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)
movzwl (%r13), %eax
incq %rbp
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %rbp
jl 0x11bed
movq 0x10(%r13), %r13
cmpq (%rsp), %r13
jne 0x11bde
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5a528(%rip), %eax     # 0x6c1c0
incl %eax
andl $0x3, %eax
movl %eax, 0x5a51d(%rip)     # 0x6c1c0
leaq 0x5a116(%rip), %rcx     # 0x6bdc0
leaq (%rcx,%rax,4), %rbx
movl (%rdi), %eax
cmpq $0x4, %rax
ja 0x11dd9
movq %rdi, %r14
leaq 0x334a0(%rip), %rcx     # 0x45164
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %edx
movq %rbx, %r15
testl %edx, %edx
je 0x11cef
leaq 0x33904(%rip), %rsi     # 0x455e3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf2e0
movslq %eax, %r15
addq %rbx, %r15
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x11d34
cmpl $0x0, 0x8(%r14)
leaq 0x34645(%rip), %rcx     # 0x46349
leaq 0x35d5f(%rip), %r12     # 0x47a6a
cmoveq %rcx, %r12
movq 0x18(%rax), %rdi
callq 0x343d5
leaq 0x37149(%rip), %rsi     # 0x48e68
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 0x11d86
movq (%rax), %rdx
movq 0x20(%r14), %rax
leaq 0x345fe(%rip), %r8      # 0x46349
leaq 0x33790(%rip), %rcx     # 0x454e2
testq %rax, %rax
cmoveq %r8, %rcx
jne 0x11d99
jmp 0x11d9c
movq 0x8(%r14), %rdx
leaq 0x3376c(%rip), %rsi     # 0x454d4
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf2e0
jmp 0x11dd9
leaq 0x39ac8(%rip), %rbx     # 0x4b843
jmp 0x11dd9
movq 0x8(%r14), %rax
movq (%rax), %rbx
jmp 0x11dd9
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x11dd9
leaq 0x345b3(%rip), %rcx     # 0x46349
movq %rcx, %rdx
movq (%rax), %r8
leaq 0x33737(%rip), %rsi     # 0x454da
movq %r15, %rdi
xorl %eax, %eax
callq 0xf2e0
movslq %eax, %r12
addq %r15, %r12
movl 0xc(%r14), %edx
cmpl $0x2, %edx
jb 0x11dd2
leaq 0x33721(%rip), %rsi     # 0x454e4
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_O3/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 0x11e09
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x11dff
decw 0x10(%rax)
movq 0x20(%rdi), %rax
testq %rax, %rax
jne 0x11e12
retq
cmpl $0x1, %eax
jne 0x11e08
movq 0x8(%rdi), %rax
decw 0x10(%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %edi
movl $0x28, %esi
callq 0xf1b0
movq %rax, %rbx
movl 0x4(%r14), %eax
cmpl $0x5, %eax
je 0x11e55
cmpl $0x6, %eax
jne 0x11e6e
movl $0x2, (%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x8(%rbx)
jmp 0x11f28
movq 0x18(%r14), %rax
movl $0x4, (%rbx)
testb $0x18, 0x68(%rax)
je 0x11e91
movq %rax, 0x10(%rbx)
jmp 0x11f28
movq %r15, %rdi
movq %r14, %rsi
callq 0x1148c
testq %rax, %rax
je 0x11eba
movl $0x1, (%rbx)
movq %rax, 0x8(%rbx)
incw 0x10(%rax)
jmp 0x11f28
leaq 0x543a8(%rip), %rax     # 0x66240
movq %rax, 0x18(%rbx)
movl (%r14), %eax
testl %eax, %eax
jns 0x11eb5
movl 0x5971b(%rip), %eax     # 0x6b5c4
leal 0x4(%rax), %ecx
movl %ecx, 0x59712(%rip)     # 0x6b5c4
movl %eax, (%r14)
movl %eax, 0x8(%rbx)
jmp 0x11f28
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x11b0c
testq %rax, %rax
je 0x11f28
movq 0x18(%rax), %rax
movl (%rax), %ecx
cmpl $0x3, %ecx
je 0x11f11
cmpl $0x2, %ecx
je 0x11efc
cmpl $0x1, %ecx
jne 0x11f28
movl $0x1, (%rbx)
movslq 0x10(%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0x542ba(%rip), %rcx     # 0x661b0
leaq (%rcx,%rax,8), %rax
jmp 0x11e84
movl $0x3, (%rbx)
movl 0x10(%rax), %eax
movl %eax, 0x8(%rbx)
leaq 0x54349(%rip), %rax     # 0x66258
jmp 0x11f24
movl $0x3, (%rbx)
movl 0x10(%rax), %eax
movl %eax, 0x8(%rbx)
leaq 0x5431c(%rip), %rax     # 0x66240
movq %rax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11f4c
movq %rdi, %rbx
movq $0x0, 0x28(%rdi)
cmpl $0x0, 0x24(%rdi)
je 0x11f4e
popq %rbx
retq
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x1154a
movslq 0x20(%rbx), %rcx
movl $0x0, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
leaq 0x4b74d(%rip), %rdx     # 0x5d6c0
movq (%rdx,%rcx,8), %rdx
movq (%rax), %rcx
leaq 0x3343e(%rip), %rsi     # 0x453bf
leaq 0x33443(%rip), %r8      # 0x453cb
xorl %eax, %eax
popq %rbx
jmp 0x11320
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rsi, %rsi
je 0x11fef
pushq %rbx
movq %rsi, %rcx
movzwl (%rcx), %eax
movsbl %al, %edx
testw %dx, %dx
jle 0x11fdd
movzwl %dx, %edx
movzwl %ax, %r8d
xorl %r9d, %r9d
cmpl $0x100, %r8d            # imm = 0x100
setb %r11b
movq 0x18(%rcx,%r9,8), %rax
movq %rax, %r10
andq $-0x4, %r10
setne %bl
orb %r11b, %bl
cmpb $0x1, %bl
jne 0x11fd5
cmpq %rdi, %r10
je 0x11fea
incq %r9
cmpq %r9, %rdx
jne 0x11fae
movq 0x10(%rcx), %rcx
cmpq %rsi, %rcx
jne 0x11f99
xorl %eax, %eax
jmp 0x11fed
andl $0x1, %eax
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4b6a8(%rip), %rcx     # 0x5d6c0
movq (%rcx,%rax,8), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsi), %r12
movl $0x1, %edi
movl $0x28, %esi
callq 0xf1b0
movq %rax, %r15
movl $0x1, (%rax)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x11440
movq %rax, %r12
movq %rax, 0x8(%r15)
incw 0x10(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11e17
movq %rax, %r13
movq 0x20(%r14), %rbp
movq %r12, %rdi
callq 0x120e5
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x121fa
movq %rax, %rbp
movl (%r14), %r12d
shrl $0x8, %r12d
movq %r13, %rdi
callq 0x11c8a
movq (%rbp), %r9
leaq 0x3349e(%rip), %rcx     # 0x45539
movq %rcx, (%rsp)
leaq 0x33481(%rip), %rsi     # 0x45527
movq 0x10(%rsp), %rdx
movl %r12d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x11320
movq %r15, %rdi
callq 0x11de8
movq %r13, %rdi
callq 0x11de8
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 0x111a6
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0x12(%rdi)
je 0x121cc
movq %rdi, %rbx
addq $0x8, %rdi
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x121c1
movl $0xf0f0f0f0, %ecx       # imm = 0xF0F0F0F0
movl $0xff0000, %edx         # imm = 0xFF0000
movq %rax, %rsi
movzwl (%rsi), %r11d
movsbl %r11b, %ebp
testw %bp, %bp
jle 0x121b4
leaq 0x18(%rsi), %r8
leaq 0x10(%rsi), %r9
xorl %r10d, %r10d
movslq %r10d, %r14
movq (%r8,%r14,8), %r15
movzwl %r11w, %r12d
cmpl $0x100, %r12d           # imm = 0x100
setae %r12b
cmpq $0x4, %r15
setb %r13b
testb %r13b, %r12b
jne 0x121a4
andl $0x1, %r15d
je 0x121a4
leaq (%r8,%r14,8), %r11
movswq %bp, %r14
leaq (%r9,%r14,8), %r14
cmpq %r14, %r11
jae 0x12186
leaq 0x8(%r11), %r15
movq 0x8(%r11), %r12
movq %r12, (%r11)
movq %r15, %r11
cmpq %r14, %r15
jb 0x12171
jmp 0x12189
movq %r11, %r15
movq %rcx, (%r15)
decb (%rsi)
decl %r10d
movl 0x10(%rbx), %r11d
addl %edx, %r11d
shrl $0x10, %r11d
movb %r11b, 0x12(%rbx)
movzwl (%rsi), %r11d
incl %r10d
movsbl %r11b, %ebp
movsbl %r11b, %r14d
cmpl %r14d, %r10d
jl 0x12137
movq 0x10(%rsi), %rsi
cmpq %rax, %rsi
jne 0x1211b
callq 0x282e3
cmpb $0x0, 0x12(%rbx)
jne 0x121db
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33360(%rip), %rdi     # 0x45542
leaq 0x330cb(%rip), %rsi     # 0x452b4
leaq 0x3335d(%rip), %rcx     # 0x4554d
movl $0x36d, %edx            # imm = 0x36D
callq 0xf120
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x12312
movl $0xffffff, %eax         # imm = 0xFFFFFF
andl 0x10(%rbx), %eax
cmpl $0x10001, %eax          # imm = 0x10001
je 0x12312
movq %rdx, %r15
movq %rdi, %r14
movq 0x10(%rdi), %rsi
movq %rdx, %rdi
callq 0x119f0
testq %rax, %rax
je 0x1225b
movq 0x18(%rax), %rax
cmpl $0x1, (%rax)
jne 0x1225b
movslq 0x10(%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0x53f5d(%rip), %rcx     # 0x661b0
cmpq $0x0, 0x8(%rcx,%rax,8)
je 0x122cf
xorl %r12d, %r12d
leaq 0x53f4b(%rip), %r13     # 0x661b0
cmpq $0x0, 0x8(%r12,%r13)
je 0x1228a
addq $0x18, %r12
cmpq $0x90, %r12
jne 0x12265
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11810
jmp 0x12312
movq %r15, %rdi
callq 0x17f3c
leaq (%r12,%r13), %r15
movq (%r12,%r13), %rcx
leaq 0x332f3(%rip), %rsi     # 0x45594
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x110ea
movq (%rbx), %rdx
movq (%r12,%r13), %rcx
leaq 0x33079(%rip), %rsi     # 0x45335
leaq 0x332e2(%rip), %r8      # 0x455a5
xorl %eax, %eax
callq 0x11320
movq %r15, %rbx
jmp 0x12312
leaq (%rcx,%rax,8), %r12
movq %r15, %rdi
callq 0x17f3c
movq (%r12), %rcx
leaq 0x3328c(%rip), %rsi     # 0x45572
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x110ea
movq (%rbx), %rdx
movq (%r12), %rcx
leaq 0x33034(%rip), %rsi     # 0x45335
leaq 0x332a6(%rip), %r8      # 0x455ae
xorl %eax, %eax
callq 0x11320
movq %r12, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11e17
movq %rax, %rbx
cmpl $0x4, (%rax)
jne 0x1239d
movl 0x8(%rbx), %ebp
testl %ebp, %ebp
je 0x123be
cmpq $0x0, 0x10(%rbx)
je 0x12352
cmpq $0x0, 0x18(%rbx)
je 0x123db
movq %rbx, %rdi
callq 0x11c8a
movq %rbx, %rdi
callq 0x11de8
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1154a
movq %rax, %r14
movq %rbx, %rdi
callq 0x11c8a
movq (%r14), %rcx
leaq 0x33262(%rip), %rsi     # 0x455e6
leaq 0x3326b(%rip), %r8      # 0x455f6
movq %rax, %rdx
xorl %eax, %eax
callq 0x11320
movq (%r14), %rbx
movq %rbx, %rax
jmp 0x123b3
movq %rbx, %rdi
callq 0x11c8a
movq %rax, %r14
movq %rbx, %rdi
callq 0x11de8
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x12340
cmpq $0x0, 0x10(%rbx)
jne 0x12340
movq (%rax), %rbx
jmp 0x12398
movq %rbx, %rdi
callq 0x11c8a
leaq 0x59de6(%rip), %rbx     # 0x6c1d0
leaq 0x331ea(%rip), %rsi     # 0x455db
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xf2e0
testl %ebp, %ebp
je 0x12398
movslq %eax, %rdi
leaq 0x59dc4(%rip), %rbx     # 0x6c1d0
addq %rbx, %rdi
leaq 0x331ca(%rip), %rsi     # 0x455e0
movl %ebp, %edx
xorl %eax, %eax
callq 0xf2e0
jmp 0x12398
// File: /workspace/github_c_makefile_star2_O3/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 0x12a4c
testl %eax, %eax
jne 0x12a26
movl $0x2, (%rbx)
movl 0x58baa(%rip), %eax     # 0x6b5c4
leal 0x4(%rax), %ecx
movl %ecx, 0x58ba1(%rip)     # 0x6b5c4
movl %eax, 0x10(%rbx)
callq 0x17f3c
movq %rax, %r14
movq %rbx, %rdi
callq 0x11a9e
leaq 0x328f8(%rip), %rsi     # 0x45335
leaq 0x32cca(%rip), %r8      # 0x4570e
movq %r14, %rdx
movq %rax, %rcx
jmp 0x12a75
movslq 0x10(%rbx), %rax
leaq (%rax,%rax,2), %rbx
leaq 0x53755(%rip), %r14     # 0x661b0
callq 0x17f3c
movq (%r14,%rbx,8), %rcx
leaq 0x328ca(%rip), %rsi     # 0x45335
leaq 0x32c9c(%rip), %r8      # 0x4570e
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11320
nop
// File: /workspace/github_c_makefile_star2_O3/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
movl %esi, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq $0x0, (%r15)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
leaq 0x41745(%rip), %rcx     # 0x72400
movq (%rcx,%rax,8), %r13
testq %r13, %r13
je 0x30d15
movq %r13, %rbp
movzwl (%rbp), %eax
testb %al, %al
jle 0x30d0c
xorl %r12d, %r12d
movq 0x18(%rbp,%r12,8), %rsi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x30ce7
testq %rsi, %rsi
je 0x30cfd
cmpq %r14, (%rsi)
jne 0x30cfd
cmpl %ebx, 0x10(%rsi)
jne 0x30cfd
movq %r15, %rdi
callq 0x283f0
movzwl (%rbp), %eax
incq %r12
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r12
jl 0x30cd2
movq 0x10(%rbp), %rbp
cmpq %r13, %rbp
jne 0x30cc7
movq 0x10(%rsp), %rax
incq %rax
cmpq $0x40, %rax
jne 0x30caf
leaq 0x7b2(%rip), %rsi       # 0x314dc
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2fb7c
movq (%rbx), %rax
testq %rax, %rax
je 0x30e13
xorl %r11d, %r11d
movl $0xf0f0f0f0, %ecx       # imm = 0xF0F0F0F0
movq %rax, %rdx
movzwl (%rdx), %r10d
movsbl %r10b, %ebx
testw %bx, %bx
jle 0x30e00
leaq 0x18(%rdx), %rsi
leaq 0x10(%rdx), %rdi
xorl %r8d, %r8d
movslq %r8d, %r14
movq (%rsi,%r14,8), %r9
movzwl %r10w, %ebp
cmpl $0x100, %ebp            # imm = 0x100
jb 0x30d87
testq %r9, %r9
jne 0x30d87
movq %r11, %r9
jmp 0x30de7
testq %r11, %r11
je 0x30de7
movq 0x8(%r9), %r15
cmpq 0x8(%r11), %r15
jne 0x30de7
cmpq %r11, %r9
jne 0x30e32
leaq (%rsi,%r14,8), %r10
movswq %bx, %r11
leaq (%rdi,%r11,8), %r11
cmpq %r11, %r10
jae 0x30dc5
leaq 0x8(%r10), %rbx
movq 0x8(%r10), %r14
movq %r14, (%r10)
movq %rbx, %r10
cmpq %r11, %rbx
jb 0x30db0
jmp 0x30dc8
movq %r10, %rbx
movq %rcx, (%rbx)
movl (%rdx), %r10d
leal -0x1(%r10), %r11d
movzbl %r11b, %r11d
andl $0xffffff00, %r10d      # imm = 0xFFFFFF00
orl %r11d, %r10d
movw %r10w, (%rdx)
decl %r8d
incl %r8d
movsbl %r10b, %ebx
movsbl %r10b, %ebp
movq %r9, %r11
cmpl %ebp, %r8d
jl 0x30d6a
jmp 0x30e03
movq %r11, %r9
movq 0x10(%rdx), %rdx
movq %r9, %r11
cmpq %rax, %rdx
jne 0x30d4e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x282e3
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c133(%rip), %rdi     # 0x4cf6c
leaq 0x1c13a(%rip), %rsi     # 0x4cf7a
leaq 0x1c13d(%rip), %rcx     # 0x4cf84
movl $0x3f, %edx
callq 0xf120
// File: /workspace/github_c_makefile_star2_O3/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 0x41599(%rip), %rax     # 0x72400
movq (%rax,%rcx,8), %rcx
testq %rcx, %rcx
je 0x30ec5
pushq %rbx
xorl %eax, %eax
movq %rcx, %r8
movzwl (%r8), %r10d
movsbl %r10b, %r9d
testw %r9w, %r9w
jle 0x30eba
movzwl %r9w, %r9d
movzwl %r10w, %r10d
xorl %r11d, %r11d
movq 0x18(%r8,%r11,8), %rbx
cmpl $0x100, %r10d           # imm = 0x100
jb 0x30ea2
testq %rbx, %rbx
je 0x30eb2
cmpq %rdi, (%rbx)
jne 0x30eb2
cmpq %rsi, 0x8(%rbx)
jne 0x30eb2
cmpl %edx, 0x10(%rbx)
je 0x30ec8
incq %r11
cmpq %r11, %r9
jne 0x30e8f
movq 0x10(%r8), %r8
cmpq %rcx, %r8
jne 0x30e76
jmp 0x30ecc
xorl %eax, %eax
retq
movq 0x18(%rbx), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x41506(%rip), %rax     # 0x72400
leaq (%rax,%rcx,8), %r13
leaq 0x38fab(%rip), %rdi     # 0x69eb0
movl $0x28, %esi
callq 0x36040
movq %rax, %rbp
leaq 0x18(%rax), %rsi
movq %r12, 0x18(%rax)
addq $0x8, %r12
movq %r12, %rdi
callq 0x283f0
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 0x283f0
// File: /workspace/github_c_makefile_star2_O3/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
leaq 0x4149f(%rip), %rax     # 0x72400
movq %rcx, 0x10(%rsp)
leaq (%rax,%rcx,8), %rbx
movq %rbx, %rdi
leaq 0x586(%rip), %rsi       # 0x314fa
callq 0x2fb7c
movq %rbx, 0x8(%rsp)
movq (%rbx), %r8
testq %r8, %r8
je 0x3107e
movq %r8, %r15
xorl %ebx, %ebx
movq %r8, 0x18(%rsp)
movzwl (%r15), %eax
testb %al, %al
jle 0x3106b
xorl %ebp, %ebp
movq 0x18(%r15,%rbp,8), %r14
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x30fbf
testq %r14, %r14
jne 0x30fbf
movq %rbx, %r14
jmp 0x31053
testq %rbx, %rbx
je 0x31053
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rcx
cmpq %rcx, %rdi
je 0x30fb7
movq (%rbx), %r12
cmpq (%r14), %r12
jne 0x31053
movl 0x10(%rbx), %edx
cmpl 0x10(%r14), %edx
jne 0x31053
movl (%rdi), %esi
testl %esi, %esi
je 0x31053
cmpl (%rcx), %esi
jne 0x31053
movl 0x10(%rdi), %esi
cmpl 0x10(%rcx), %esi
jne 0x31053
testl %edx, %edx
leaq 0x14706(%rip), %r13     # 0x45707
leaq 0x1cf0b(%rip), %rax     # 0x4df13
cmoveq %rax, %r13
callq 0x310a9
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rdi
callq 0x17f3c
movq %rax, %rbx
movq 0x8(%r14), %rdi
callq 0x17f3c
leaq 0x1bfe5(%rip), %rdi     # 0x4d017
movq %r13, %rsi
movq %r12, %rdx
movq 0x20(%rsp), %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xf0f0
movq 0x18(%rsp), %r8
movzwl (%r15), %eax
incq %rbp
movzwl %ax, %ecx
movsbq %cl, %rcx
movq %r14, %rbx
cmpq %rcx, %rbp
jl 0x30fa2
jmp 0x3106e
movq %rbx, %r14
movq 0x10(%r15), %r15
movq %r14, %rbx
cmpq %r8, %r15
jne 0x30f94
movq 0x8(%rsp), %rdi
callq 0x2888a
movq 0x10(%rsp), %rcx
incq %rcx
cmpq $0x40, %rcx
jne 0x30f5a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x310d7
movl (%rdi), %edx
movl 0x4(%rdi), %r8d
movl 0x10(%rdi), %ecx
leaq 0x41541(%rip), %rbx     # 0x72600
cmpl $0x5, %edx
je 0x310e9
cmpl $0x2, %edx
je 0x310e0
cmpl $0x1, %edx
jne 0x31101
leaq 0x1beff(%rip), %rsi     # 0x4cfd4
jmp 0x310f0
leaq 0x1b078(%rip), %rbx     # 0x4c156
jmp 0x31112
leaq 0x1bef8(%rip), %rsi     # 0x4cfdf
jmp 0x310f0
leaq 0x1befb(%rip), %rsi     # 0x4cfeb
movq %rbx, %rdi
movl %ecx, %edx
movl %r8d, %ecx
xorl %eax, %eax
callq 0xf2e0
jmp 0x31112
leaq 0x1beee(%rip), %rsi     # 0x4cff6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf2e0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3150c
xorl %eax, %eax
cmpq %rdx, %rcx
jmp 0x31548
movl 0x10(%rdi), %ecx
movl 0x10(%rsi), %edx
cmpl %edx, %ecx
jne 0x3153e
movq 0x18(%rdi), %rcx
movq 0x18(%rsi), %rax
movl (%rcx), %edx
movl (%rax), %esi
cmpl %esi, %edx
jne 0x31544
movl 0x10(%rax), %edx
xorl %eax, %eax
cmpl %edx, 0x10(%rcx)
je 0x3153d
setge %al
movzbl %al, %eax
leal -0x1(,%rax,2), %eax
retq
xorl %eax, %eax
cmpl %edx, %ecx
jmp 0x31548
xorl %eax, %eax
cmpl %esi, %edx
sbbl %eax, %eax
orl $0x1, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x3a4f
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x40(%rdi), %rax
addq $0x2, %rcx
cmpq %rcx, %rax
ja 0x3b19
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x4458
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3a85
movq 0x8(%rbx), %rcx
movq 0x40(%rbx), %rax
leaq 0x1(%rcx), %rdx
cmpq %rdx, %rax
jne 0x3a8e
movl $0x0, 0x14(%rbx)
jmp 0x3ab8
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3a72
movq %rax, %rbx
leaq 0x99e6(%rip), %rdi      # 0xd449
xorl %eax, %eax
callq 0xacd8
movl $0x0, (%rbx)
jmp 0x3a80
leaq 0x99d0(%rip), %rdi      # 0xd449
xorl %eax, %eax
callq 0xadf7
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpq %rcx, %rax
jne 0x3a9c
movl $0x0, 0x10(%rbx)
jmp 0x3ac9
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 0x3ac9
movq %rbx, %rdi
callq 0x42aa
testl %eax, %eax
jne 0x3a85
leaq 0x40(%rbx), %rsi
movl 0x38(%rbx), %edi
leaq -0xdb(%rip), %r8        # 0x39fc
movl $0x8, %edx
movl $0x8, %ecx
movq %rbx, %r9
callq 0x8124
movq %rax, 0x48(%rbx)
xorl %ebp, %ebp
testq %rax, %rax
jne 0x3a85
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3b0d
movq %rax, %rbx
leaq 0x987e(%rip), %rdi      # 0xd386
jmp 0x3a63
leaq 0x9872(%rip), %rdi      # 0xd386
jmp 0x3a79
leaq 0x994b(%rip), %rdi      # 0xd46b
leaq 0x98bd(%rip), %rsi      # 0xd3e4
leaq 0x995c(%rip), %rcx      # 0xd48a
movl $0x27, %edx
callq 0x2220
// File: /workspace/github_c_makefile_star2_O3/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 0x3ddf
movq %rdi, %rbx
cmpq $0x0, 0x70(%rdi)
jne 0x3dfe
movq 0x60(%rbx), %rdi
callq 0x7b02
movq 0x58(%rbx), %rdi
callq 0x7ecb
movl 0x54(%rbx), %edi
callq 0x2240
testl %eax, %eax
je 0x3dc0
callq 0x20a0
movq %rax, %r14
movl (%rax), %eax
cmpl $0x4, %eax
je 0x3d91
leaq 0xa679(%rip), %rdi      # 0xe42c
testl %eax, %eax
jne 0x3dc4
xorl %eax, %eax
callq 0xadf7
jmp 0x3dd2
xorl %eax, %eax
jmp 0x3dd7
xorl %eax, %eax
callq 0xacd8
movl $0x0, (%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x95e7(%rip), %rdi      # 0xd3cd
leaq 0x95f7(%rip), %rsi      # 0xd3e4
leaq 0x95fb(%rip), %rcx      # 0xd3ef
movl $0x18c, %edx            # imm = 0x18C
callq 0x2220
leaq 0x9616(%rip), %rdi      # 0xd41b
leaq 0x95d8(%rip), %rsi      # 0xd3e4
leaq 0x95dc(%rip), %rcx      # 0xd3ef
movl $0x18d, %edx            # imm = 0x18D
callq 0x2220