LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rope.c
// Function: rope_init
rope_t *rope_init(int max_nodes, int block_len)
{
	rope_t *rope;
	rope = calloc(1, sizeof(rope_t));
	if (block_len < 32) block_len = 32;
	rope->max_nodes = (max_nodes+ 1)>>1<<1;
	rope->block_len = (block_len + 7) >> 3 << 3;
	rope->node = mp_init(sizeof(rpnode_t) * rope->max_nodes);
	rope->leaf = mp_init(rope->block_len);
	rope->root = mp_alloc(rope->node);
	rope->root->n = 1;
	rope->root->is_bottom = 1;
	rope->root->p = mp_alloc(rope->leaf);
	return rope;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl $0x1, %edi
movl $0x50, %esi
callq 0x2130
cmpl $0x21, %ebx
movl $0x20, %r12d
cmovgel %ebx, %r12d
movq %rax, %rbx
incl %ebp
andl $-0x2, %ebp
movl %ebp, (%rax)
addl $0x7, %r12d
andl $0x7ffffff8, %r12d      # imm = 0x7FFFFFF8
movl %r12d, 0x4(%rax)
shll $0x6, %ebp
movl $0x1, %edi
movl $0x28, %esi
callq 0x2130
movq %rax, %r15
movl %ebp, (%rax)
movl $0x100000, %eax         # imm = 0x100000
xorl %edx, %edx
idivl %ebp
movl %eax, 0x8(%r15)
movl %eax, 0x4(%r15)
movq $-0x1, %r13
movq %r13, 0x10(%r15)
movq %r15, 0x40(%rbx)
movl $0x1, %edi
movl $0x28, %esi
callq 0x2130
movq %rax, %r14
movl %r12d, (%rax)
movl $0x100000, %eax         # imm = 0x100000
xorl %edx, %edx
divl %r12d
movl %eax, 0x8(%r14)
movl %eax, 0x4(%r14)
movq %r13, 0x10(%r14)
movq %r14, 0x48(%rbx)
movq $0x0, 0x10(%r15)
cmpq $0x0, 0x18(%r15)
jne 0x14b0b
movq $0x1, 0x18(%r15)
movq 0x20(%r15), %rdi
movl $0x8, %esi
callq 0x21d0
movq %rax, 0x20(%r15)
movslq 0x8(%r15), %rdi
movslq (%r15), %rsi
callq 0x2130
movq 0x10(%r15), %rcx
movq 0x20(%r15), %rdx
movq %rax, (%rdx,%rcx,8)
movl $0x0, 0x4(%r15)
movq 0x20(%r15), %rax
movq (%rax,%rcx,8), %r12
movl $0x1, 0x4(%r15)
movq %r12, 0x38(%rbx)
movabsq $0x3fffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFF
andq 0x8(%r12), %rax
movabsq $-0x7fc0000000000000, %rcx # imm = 0x8040000000000000
orq %rax, %rcx
movq %rcx, 0x8(%r12)
movl 0x4(%r14), %eax
cmpl 0x8(%r14), %eax
jne 0x14bc3
movq 0x10(%r14), %rcx
movq 0x18(%r14), %rax
incq %rcx
movq %rcx, 0x10(%r14)
cmpq %rax, %rcx
jne 0x14ba3
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x1, %esi
cmovneq %rcx, %rsi
movq %rsi, 0x18(%r14)
movq 0x20(%r14), %rdi
shlq $0x3, %rsi
callq 0x21d0
movq %rax, 0x20(%r14)
movslq 0x8(%r14), %rdi
movslq (%r14), %rsi
callq 0x2130
movq 0x10(%r14), %rcx
movq 0x20(%r14), %rdx
movq %rax, (%rdx,%rcx,8)
movl $0x0, 0x4(%r14)
movq 0x10(%r14), %rax
movq 0x20(%r14), %rcx
movslq 0x4(%r14), %rdx
movslq (%r14), %rsi
imulq %rdx, %rsi
addq (%rcx,%rax,8), %rsi
leal 0x1(%rdx), %eax
movl %eax, 0x4(%r14)
movq %rsi, (%r12)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rope.c
// Function: rope_rank2a
void rope_rank2a(const rope_t *rope, int64_t x, int64_t y, int64_t *cx, int64_t *cy)
{
	rpnode_t *v;
	int64_t rest;
	v = rope_count_to_leaf(rope, x, cx, &rest);
	if (y < x || cy == 0) {
		rle_rank1a((const uint8_t*)v->p, rest, cx, v->c);
	} else if (rest + (y - x) <= v->l) {
		memcpy(cy, cx, 48);
		rle_rank2a((const uint8_t*)v->p, rest, rest + (y - x), cx, cy, v->c);
	} else {
		rle_rank1a((const uint8_t*)v->p, rest, cx, v->c);
		v = rope_count_to_leaf(rope, y, cy, &rest);
		rle_rank1a((const uint8_t*)v->p, rest, cy, v->c);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
leaq 0x8(%rsp), %rcx
movq %r14, %rdx
callq 0x15393
movq %r15, %rdx
subq %r13, %rdx
setge %cl
testq %rbx, %rbx
setne %sil
testb %sil, %cl
jne 0x152f2
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
addq $0x10, %rax
movq $-0x1, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
jmp 0x1537e
movq 0x8(%rsp), %rsi
addq %rsi, %rdx
movabsq $0x3fffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFF
andq 0x8(%rax), %rcx
cmpq %rcx, %rdx
jbe 0x15358
movq (%rax), %rdi
addq $0x10, %rax
movq $-0x1, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x16176
leaq 0x8(%rsp), %r14
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x15393
movq (%rax), %rdi
movq (%r14), %rsi
leaq 0x10(%rax), %r9
movq $-0x1, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
jmp 0x15381
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq (%rax), %rdi
addq $0x10, %rax
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x16176
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rope.c
// Function: rope_count_to_leaf
static rpnode_t *rope_count_to_leaf(const rope_t *rope, int64_t x, int64_t cx[6], int64_t *rest)
{
	rpnode_t *u, *v = 0, *p = rope->root;
	int64_t y = 0;
	int a;

	memset(cx, 0, 48);
	do {
		u = p;
		if (v && x - y > v->l>>1) {
			p += p->n - 1; y += v->l;
			for (a = 0; a != 6; ++a) cx[a] += v->c[a];
			for (; y >= x; --p) {
				y -= p->l;
				for (a = 0; a != 6; ++a) cx[a] -= p->c[a];
			}
			++p;
		} else {
			for (; y + p->l < x; ++p) {
				y += p->l;
				for (a = 0; a != 6; ++a) cx[a] += p->c[a];
			}
		}
		v = p; p = p->p;
	} while (!u->is_bottom);
	*rest = x - y;
	return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movabsq $0x3fffffffffffff, %r8  # imm = 0x3FFFFFFFFFFFFF
movq 0x38(%rdi), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdx)
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
xorl %eax, %eax
xorl %r9d, %r9d
testq %rax, %rax
je 0x15454
movq %rsi, %r11
subq %r9, %r11
movq 0x8(%rax), %r10
andq %r8, %r10
movq %r10, %rbx
shrq %rbx
cmpq %rbx, %r11
jbe 0x15454
movq 0x8(%rdi), %rbx
shrq $0x36, %rbx
andl $0x1ff, %ebx            # imm = 0x1FF
movl %ebx, %r11d
shll $0x6, %r11d
addq %rdi, %r11
addq $-0x40, %r11
xorl %r14d, %r14d
movq 0x10(%rax,%r14,8), %r15
addq %r15, (%rdx,%r14,8)
incq %r14
cmpq $0x6, %r14
jne 0x153f9
addq %r9, %r10
cmpq %rsi, %r10
jl 0x15448
shll $0x6, %ebx
leaq (%rdi,%rbx), %rax
addq $-0x30, %rax
movq 0x8(%r11), %r9
andq %r8, %r9
xorl %ebx, %ebx
movq (%rax,%rbx,8), %r14
subq %r14, (%rdx,%rbx,8)
incq %rbx
cmpq $0x6, %rbx
jne 0x15427
subq %r9, %r10
addq $-0x40, %r11
addq $-0x40, %rax
cmpq %rsi, %r10
jge 0x1541e
addq $0x40, %r11
movq %r11, %rax
movq %r10, %r9
jmp 0x15494
movq 0x8(%rdi), %r10
andq %r8, %r10
addq %r9, %r10
movq %rdi, %rax
cmpq %rsi, %r10
jae 0x15494
movq %rdi, %rax
movq %r10, %r9
xorl %r10d, %r10d
movq 0x10(%rax,%r10,8), %r11
addq %r11, (%rdx,%r10,8)
incq %r10
cmpq $0x6, %r10
jne 0x1546f
movq 0x48(%rax), %r10
andq %r8, %r10
addq $0x40, %rax
addq %r9, %r10
cmpq %rsi, %r10
jb 0x15469
cmpq $0x0, 0x8(%rdi)
movq (%rax), %rdi
jns 0x153b9
subq %r9, %rsi
movq %rsi, (%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rope.c
// Function: rope_itr_first
void rope_itr_first(const rope_t *rope, rpitr_t *i)
{
	memset(i, 0, sizeof(rpitr_t));
	i->rope = rope;
	for (i->pa[i->d] = rope->root; !i->pa[i->d]->is_bottom;) // descend to the leftmost leaf
		++i->d, i->pa[i->d] = i->pa[i->d - 1]->p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x3d0, %edx            # imm = 0x3D0
movq %rsi, %rdi
xorl %esi, %esi
callq 0x2100
movq %r14, (%rbx)
movq 0x38(%r14), %rax
movslq 0x3c8(%rbx), %rdx
movq %rax, 0x8(%rbx,%rdx,8)
cmpq $0x0, 0x8(%rax)
js 0x15504
leaq (%rbx,%rdx,8), %rcx
addq $0x10, %rcx
incl %edx
movl %edx, 0x3c8(%rbx)
movq (%rax), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
incl %edx
cmpq $0x0, 0x8(%rax)
jns 0x154eb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rope.c
// Function: rope_itr_next_block
const uint8_t *rope_itr_next_block(rpitr_t *i)
{
	const uint8_t *ret;
	assert(i->d < ROPE_MAX_DEPTH); // a B+ tree should not be that tall
	if (i->d < 0) return 0;
	ret = (uint8_t*)i->pa[i->d][i->ia[i->d]].p;
	while (i->d >= 0 && ++i->ia[i->d] == i->pa[i->d]->n) i->ia[i->d--] = 0; // backtracking
	if (i->d >= 0)
		while (!i->pa[i->d]->is_bottom) // descend to the leftmost leaf
			++i->d, i->pa[i->d] = i->pa[i->d - 1][i->ia[i->d - 1]].p;
	return ret;
}

// Assembly:
pushq %rax
movslq 0x3c8(%rdi), %rax
cmpq $0x50, %rax
jge 0x155d7
testl %eax, %eax
js 0x155d3
movq 0x8(%rdi,%rax,8), %rcx
movslq 0x288(%rdi,%rax,4), %rax
shlq $0x6, %rax
movq (%rcx,%rax), %rax
movl 0x3c8(%rdi), %ecx
testl %ecx, %ecx
js 0x1558b
movl %ecx, %ecx
movl 0x288(%rdi,%rcx,4), %edx
incl %edx
movl %edx, 0x288(%rdi,%rcx,4)
movslq 0x3c8(%rdi), %rcx
movq 0x8(%rdi,%rcx,8), %rsi
movq 0x8(%rsi), %rsi
shrq $0x36, %rsi
andl $0x1ff, %esi            # imm = 0x1FF
cmpl %esi, %edx
jne 0x1558b
leal -0x1(%rcx), %edx
movl %edx, 0x3c8(%rdi)
movl $0x0, 0x288(%rdi,%rcx,4)
jmp 0x1553b
cmpl $0x0, 0x3c8(%rdi)
js 0x155d5
movslq 0x3c8(%rdi), %rdx
movq 0x8(%rdi,%rdx,8), %rcx
cmpq $0x0, 0x8(%rcx)
js 0x155d5
leal 0x1(%rdx), %esi
movl %esi, 0x3c8(%rdi)
movslq 0x288(%rdi,%rdx,4), %r8
shlq $0x6, %r8
movq (%rcx,%r8), %rcx
movq %rcx, 0x10(%rdi,%rdx,8)
incq %rdx
incl %esi
cmpq $0x0, 0x8(%rcx)
jns 0x155aa
jmp 0x155d5
xorl %eax, %eax
popq %rcx
retq
leaq 0x294f(%rip), %rdi      # 0x17f2d
leaq 0x201a(%rip), %rsi      # 0x175ff
leaq 0x2957(%rip), %rcx      # 0x17f43
movl $0xd3, %edx
callq 0x20e0
nop
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rle.c
// Function: rle_split
void rle_split(uint8_t *block, uint8_t *new_block)
{
	int n = *(uint16_t*)block;
	uint8_t *end = block + 2 + n, *q = block + 2 + (n>>1);
	while (*q>>6 == 2) --q;
	memcpy(new_block + 2, q, end - q);
	*(uint16_t*)new_block = end - q;
	*(uint16_t*)block = q - block - 2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl (%rdi), %r15d
movl %r15d, %r12d
shrl %r12d
leaq (%r12,%rdi), %rsi
addq $0x3, %rsi
incq %r12
movb -0x1(%rsi), %al
decq %rsi
andb $-0x40, %al
decq %r12
negb %al
jo 0x15fcb
leaq 0x2(%r14), %rdi
subq %r12, %r15
movq %r15, %rdx
callq 0x2180
movw %r15w, (%r14)
movw %r12w, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rle.c
// Function: rle_count
void rle_count(const uint8_t *block, int64_t cnt[6])
{
	const uint8_t *q = block + 2, *end = q + *(uint16_t*)block;
	while (q < end) {
		int c;
		int64_t l;
		rle_dec1(q, c, l);
		cnt[c] += l;
	}
}

// Assembly:
movzwl (%rdi), %eax
testq %rax, %rax
je 0x16089
addq %rdi, %rax
addq $0x2, %rax
addq $0x2, %rdi
movzbl (%rdi), %ecx
testb %cl, %cl
js 0x16031
incq %rdi
movl %ecx, %edx
shrl $0x3, %edx
andl $0x7, %ecx
addq %rdx, (%rsi,%rcx,8)
cmpq %rax, %rdi
jb 0x16014
jmp 0x16089
movl %ecx, %edx
andl $-0x20, %edx
cmpl $0xc0, %edx
jne 0x16056
movl %ecx, %edx
andl $0x18, %edx
movzbl 0x1(%rdi), %r8d
andl $0x3f, %r8d
leaq (%r8,%rdx,8), %rdx
addq $0x2, %rdi
jmp 0x16023
movl %ecx, %r8d
shrl $0x2, %r8d
andl $0x4, %r8d
movl %ecx, %edx
shrl $0x3, %edx
andl $0x1, %edx
incq %rdi
xorl $-0x3, %r8d
shlq $0x6, %rdx
movzbl (%rdi), %r9d
andl $0x3f, %r9d
orq %r9, %rdx
incq %rdi
incl %r8d
jne 0x16070
jmp 0x16023
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rle.c
// Function: rle_print
void rle_print(const uint8_t *block, int expand)
{
	const uint16_t *p = (const uint16_t*)block;
	const uint8_t *q = block + 2, *end = block + 2 + *p;
	while (q < end) {
		int c;
		int64_t l, x;
		rle_dec1(q, c, l);
		if (expand) for (x = 0; x < l; ++x) putchar("$ACGTN"[c]);
		else printf("%c%ld", "$ACGTN"[c], (long)l);
	}
	putchar('\n');
}

// Assembly:
movzwl (%rdi), %eax
testq %rax, %rax
je 0x1616c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq (%rdi,%rax), %r13
addq $0x2, %r13
addq $0x2, %r14
leaq 0x12ff(%rip), %r15      # 0x173b8
movzbl (%r14), %eax
testb %al, %al
js 0x16107
incq %r14
movl %eax, %r12d
shrl $0x3, %r12d
andl $0x7, %eax
testl %ebx, %ebx
je 0x160ea
testq %r12, %r12
jle 0x16100
movsbl (%rax,%r15), %ebp
movl %ebp, %edi
callq 0x2050
decq %r12
jne 0x160dc
jmp 0x16100
movsbl (%rax,%r15), %esi
leaq 0x1e83(%rip), %rdi      # 0x17f79
movq %r12, %rdx
xorl %eax, %eax
callq 0x20c0
cmpq %r13, %r14
jb 0x160b9
jmp 0x1615e
movl %eax, %ecx
andl $-0x20, %ecx
cmpl $0xc0, %ecx
jne 0x1612b
movl %eax, %ecx
andl $0x18, %ecx
movzbl 0x1(%r14), %edx
andl $0x3f, %edx
leaq (%rdx,%rcx,8), %r12
addq $0x2, %r14
jmp 0x160cb
movl %eax, %ecx
shrl $0x2, %ecx
andl $0x4, %ecx
movl %eax, %r12d
shrl $0x3, %r12d
andl $0x1, %r12d
incq %r14
xorl $-0x3, %ecx
shlq $0x6, %r12
movzbl (%r14), %edx
andl $0x3f, %edx
orq %rdx, %r12
incq %r14
incl %ecx
jne 0x16144
jmp 0x160cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movl $0xa, %edi
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/chbarts[P]aa-tree/sort.c
// Function: usage
static void usage(char *pname)
{
    printf("Usage: %s [OPTION] [FILE...]\n", pname);
    puts("Sort files or, if no files on the command line, sort stdin.");
    puts("All files sorted together into one output.");
    puts("");
    puts("  -u, --uniqify     Only print identical lines once");
    puts("  -r, --reverse     Reverse the sense of the comparison");
    puts("  -n, --numer       Sort numerically, then non-numerically");
    puts("  -h, --help        Print this help");
    puts("  -v, --version     Print version information");
    puts("");
    puts("Report bugs to <chbarts@gmail.com>.");
}

// Assembly:
pushq %rax
movq %rdi, %rsi
leaq 0xc54(%rip), %rdi       # 0x3154
xorl %eax, %eax
callq 0x1090
leaq 0xc64(%rip), %rdi       # 0x3172
callq 0x1050
leaq 0xc94(%rip), %rdi       # 0x31ae
callq 0x1050
movl $0xa, %edi
callq 0x1040
leaq 0xca9(%rip), %rdi       # 0x31d9
callq 0x1050
leaq 0xcd1(%rip), %rdi       # 0x320d
callq 0x1050
leaq 0xcfd(%rip), %rdi       # 0x3245
callq 0x1050
leaq 0xd2c(%rip), %rdi       # 0x3280
callq 0x1050
leaq 0xd44(%rip), %rdi       # 0x32a4
callq 0x1050
movl $0xa, %edi
callq 0x1040
leaq 0xd5c(%rip), %rdi       # 0x32d2
popq %rax
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O1/chbarts[P]aa-tree/sort.c
// Function: version
static void version(void)
{
    puts("sort version 0.5.0");
    puts("Copyright 2014 Chris Barts.");
    puts("sort comes with NO WARRANTY to the extent permitted by law.");
    puts("You may redistribute this software under the terms");
    puts("of the GNU General Public License.");
    puts("For more information, see the file named COPYING");
    puts("in this program's distribution file.");
}

// Assembly:
pushq %rax
leaq 0xd72(%rip), %rdi       # 0x32f6
callq 0x1050
leaq 0xd79(%rip), %rdi       # 0x3309
callq 0x1050
leaq 0xd89(%rip), %rdi       # 0x3325
callq 0x1050
leaq 0xdb9(%rip), %rdi       # 0x3361
callq 0x1050
leaq 0xde0(%rip), %rdi       # 0x3394
callq 0x1050
leaq 0xdf7(%rip), %rdi       # 0x33b7
callq 0x1050
leaq 0xe1c(%rip), %rdi       # 0x33e8
popq %rax
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O1/chbarts[P]aa-tree/sort.c
// Function: nduplicate
static int nduplicate(void *orig, void *new)
{
    ll *val;
    tstruct *node = (tstruct *) orig, *node2 = (tstruct *) new;
    aa *ttree;

    aa_to_root(node2->tree);
    val = aa_get_here(node2->tree);
    ttree = node->tree;

    switch (aa_add(node->tree, val, duplicate)) {
    case 0:
        break;
    case 2:                    /* memory error */
        free(node);
        cleanup(node2->tree, false);
        free(node2);
        error(ttree, false);
        break;
    default:                   /* can't happen */
        fprintf(stderr, "can't happen\n");
        free(node);
        cleanup(ttree, false);
        cleanup(node2->tree, false);
        free(node2);
        exit(EXIT_FAILURE);
        break;
    }

    aa_free(node2->tree);
    free(node2);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rsi), %rdi
callq 0x1bde
movq 0x8(%rbx), %rdi
callq 0x1ad4
movq 0x8(%r15), %r14
leaq -0x64(%rip), %rdx       # 0x26c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x1540
testl %eax, %eax
jne 0x2754
movq 0x8(%rbx), %rdi
callq 0x1a8a
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x2, %eax
jne 0x2790
movq %r15, %rdi
callq 0x1030
movq 0x8(%rbx), %r15
leaq 0x6c(%rip), %rsi        # 0x27d8
movq %r15, %rdi
xorl %edx, %edx
callq 0x1974
movq %r15, %rdi
callq 0x1a8a
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
xorl %esi, %esi
callq 0x268b
leaq 0x8(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x12de
// File: /workspace/github_c_makefile_star2_O1/chbarts[P]aa-tree/sort.c
// Function: freedatan
static void *freedatan(void *data)
{
    tstruct *node = (tstruct *) data;
    cleanup(node->tree, false);
    free(node);
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
leaq 0x24(%rip), %rsi        # 0x27d8
movq %r14, %rdi
xorl %edx, %edx
callq 0x1974
movq %r14, %rdi
callq 0x1a8a
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/seam-carver.c
// Function: energy_at
unsigned int energy_at(
        const unsigned char *data,
        int w,
        int h,
        int x,
        int y) {
    int x0 = x == 0 ? x : x - 1;
    int x1 = x == w - 1 ? x : x + 1;
    int ix0 = (y * w + x0) * 3;
    int ix1 = (y * w + x1) * 3;
    unsigned int dxr = data[ix0    ] - data[ix1    ];
    unsigned int dxg = data[ix0 + 1] - data[ix1 + 1];
    unsigned int dxb = data[ix0 + 2] - data[ix1 + 2];
    unsigned int dx = dxr * dxr + dxg * dxg + dxb * dxb;

    int y0 = y == 0 ? y : y - 1;
    int y1 = y == h - 1 ? y : y + 1;
    int iy0 = (y0 * w + x) * 3;
    int iy1 = (y1 * w + x) * 3;
    unsigned int dyr = data[iy0    ] - data[iy1    ];
    unsigned int dyg = data[iy0 + 1] - data[iy1 + 1];
    unsigned int dyb = data[iy0 + 2] - data[iy1 + 2];
    unsigned int dy = dyr * dyr + dyg * dyg + dyb * dyb;

    return dx + dy;
}

// Assembly:
pushq %r14
pushq %rbx
xorl %r11d, %r11d
movl %ecx, %eax
subl $0x1, %eax
cmovbl %r11d, %eax
leal -0x1(%rsi), %r9d
xorl %r10d, %r10d
cmpl %ecx, %r9d
setne %r10b
movl %r8d, %r9d
imull %esi, %r9d
addl %r9d, %eax
cltq
leaq (%rax,%rax,2), %rbx
addl %ecx, %r9d
addl %r10d, %r9d
movslq %r9d, %rax
leaq (%rax,%rax,2), %r14
movzbl (%rdi,%rbx), %r9d
movzbl (%rdi,%r14), %eax
subl %eax, %r9d
movzbl 0x1(%rdi,%rbx), %eax
movzbl 0x1(%rdi,%r14), %r10d
subl %r10d, %eax
movzbl 0x2(%rdi,%rbx), %r10d
movzbl 0x2(%rdi,%r14), %ebx
subl %ebx, %r10d
imull %r9d, %r9d
imull %eax, %eax
imull %r10d, %r10d
movl %r8d, %ebx
subl $0x1, %ebx
cmovbl %r11d, %ebx
decl %edx
xorl %r11d, %r11d
cmpl %r8d, %edx
setne %r11b
addl %r8d, %r11d
imull %esi, %ebx
addl %ecx, %ebx
movslq %ebx, %rdx
leaq (%rdx,%rdx,2), %rdx
imull %esi, %r11d
addl %ecx, %r11d
movslq %r11d, %rcx
leaq (%rcx,%rcx,2), %rcx
movzbl (%rdi,%rdx), %esi
movzbl (%rdi,%rcx), %r8d
subl %r8d, %esi
movzbl 0x1(%rdi,%rdx), %r8d
movzbl 0x1(%rdi,%rcx), %r11d
subl %r11d, %r8d
movzbl 0x2(%rdi,%rdx), %edx
movzbl 0x2(%rdi,%rcx), %ecx
subl %ecx, %edx
imull %esi, %esi
imull %r8d, %r8d
imull %edx, %edx
addl %r8d, %edx
addl %r9d, %eax
addl %r10d, %eax
addl %esi, %eax
addl %edx, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/seam-carver.c
// Function: compute_energy
unsigned int * compute_energy(const unsigned char *data, int w, int h) {
    unsigned int *energy = malloc(w * h * sizeof(unsigned int));
    if (!energy) {
        fprintf(stderr, "Unable to allocate memory (%d)\n", __LINE__);
        return NULL;
    }

    for (int y = 0; y < h; y++)
    for (int x = 0; x < w; x++) {
        int i = y * w + x;
        energy[i] = energy_at(data, w, h, x, y);
    }

    return energy;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rdi, %r15
movl %edx, %eax
movl %esi, 0xc(%rsp)
imull %esi, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1130
testq %rax, %rax
je 0x5516
testl %ebx, %ebx
jle 0x5507
movl 0xc(%rsp), %r12d
movl %ebx, %ecx
movq %rcx, 0x20(%rsp)
leaq (,%r12,4), %rcx
movq %rcx, 0x18(%rsp)
xorl %r13d, %r13d
movq %rax, 0x10(%rsp)
movq %rax, %rbp
cmpl $0x0, 0xc(%rsp)
jle 0x54f3
xorl %r14d, %r14d
movq %r15, %rdi
movl %r12d, %esi
movl %ebx, %edx
movl %r14d, %ecx
movl %r13d, %r8d
callq 0x5390
movl %eax, (%rbp,%r14,4)
incq %r14
cmpq %r14, %r12
jne 0x54d3
incq %r13
addq 0x18(%rsp), %rbp
cmpq 0x20(%rsp), %r13
jne 0x54c9
movq 0x10(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x11eb
xorl %eax, %eax
jmp 0x5507
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/seam-carver.c
// Function: compute_vertical_seam_links
struct seam_link * compute_vertical_seam_links(
        const unsigned int *energy,
        int w,
        int h) {
    struct seam_link *links = malloc(w * h * sizeof(struct seam_link));
    if (!links) {
        fprintf(stderr, "Unable to allocate memory (%d)\n", __LINE__);
        return NULL;
    }

    for (int x = 0; x < w; x++) {
        links[x] = (struct seam_link) {
            .energy = energy[x],
            .parent_coordinate = -1
        };
    }

    for (int y = 1; y < h; y++)
    for (int x = 0; x < w; x++) {
        int i = y * w + x;

        int min_parent_energy = INT_MAX;
        int min_parent_x = -1;

        int parent_x = x == 0 ? x : x - 1;
        int parent_x_end = x == w - 1 ? x : x + 1;
        for (; parent_x <= parent_x_end; parent_x++) {
            int candidate_energy = links[(y - 1) * w + parent_x].energy;
            if (candidate_energy < min_parent_energy) {
                min_parent_energy = candidate_energy;
                min_parent_x = parent_x;
            }
        }

        links[i] = (struct seam_link) {
            .energy = energy[i] + min_parent_energy,
            .parent_coordinate = min_parent_x
        };
    }

    return links;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %edx, %eax
imull %esi, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1130
testq %rax, %rax
je 0x5664
movl %ebx, %ecx
testl %ebx, %ebx
jle 0x556d
xorl %edx, %edx
movl (%r14,%rdx,4), %esi
movl %esi, (%rax,%rdx,8)
movl $0xffffffff, 0x4(%rax,%rdx,8) # imm = 0xFFFFFFFF
incq %rdx
cmpq %rdx, %rcx
jne 0x5556
cmpl $0x2, %ebp
jl 0x5655
leal -0x1(%rbx), %edx
movslq %ebx, %rsi
movl %ebp, %edi
movq %rdi, 0x18(%rsp)
shlq $0x3, %rsi
movq %rsi, 0x20(%rsp)
movl $0x1, %esi
movq %rsi, 0x8(%rsp)
xorl %r9d, %r9d
movq %rax, %r10
movq %rbx, 0x10(%rsp)
testl %ebx, %ebx
jle 0x5633
movq 0x8(%rsp), %r11
imull 0x10(%rsp), %r11d
xorl %r12d, %r12d
movl %r12d, %ebx
subl $0x1, %ebx
cmovbl %r9d, %ebx
leaq 0x1(%r12), %rsi
cmpq %rdx, %r12
movl %esi, %edi
cmovel %r12d, %edi
cmpl %edi, %ebx
jbe 0x55e0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
jmp 0x561b
cmpq $0x1, %r12
movl %r12d, %r15d
adcl $-0x1, %r15d
movslq %r15d, %rbx
leaq (%r10,%rbx,8), %rbx
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl (%rbx), %r8d
cmpl %r13d, %r8d
cmovll %r8d, %r13d
cmovll %r15d, %ebp
addq $0x8, %rbx
leal 0x1(%r15), %r8d
cmpl %edi, %r15d
movl %r8d, %r15d
jb 0x55fd
addq %r11, %r12
addl (%r14,%r12,4), %r13d
movl %r13d, (%rax,%r12,8)
movl %ebp, 0x4(%rax,%r12,8)
movq %rsi, %r12
cmpq %rcx, %rsi
jne 0x55b7
movq 0x8(%rsp), %rsi
incq %rsi
addq 0x20(%rsp), %r10
movq %rsi, 0x8(%rsp)
cmpq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rbx
jne 0x55a1
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1206
xorl %eax, %eax
jmp 0x5655
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/seam-carver.c
// Function: get_minimal_seam
int * get_minimal_seam(
        const struct seam_link *seam_links,
        int num_seams,
        int seam_length) {
    int *minimal_seam = malloc(seam_length * sizeof(int));
    if (!minimal_seam) {
        fprintf(stderr, "Unable to allocate memory (%d)\n", __LINE__);

        goto cleanup;
    }

    int min_coordinate = -1;
    int min_energy = INT_MAX;

    for (int coordinate = 0; coordinate < num_seams; coordinate++) {
        int i = num_seams * (seam_length - 1) + coordinate;
        if (seam_links[i].energy < min_energy) {
            min_coordinate = coordinate;
            min_energy = seam_links[i].energy;
        }
    }

    int i = 0;
    int offset = min_coordinate;

    for (int d = 0; d < seam_length; d++) {
        minimal_seam[i++] = offset;

        struct seam_link end =
            seam_links[num_seams * (seam_length - 1 - d) + offset];

        offset = end.parent_coordinate;
    }

cleanup:
    return minimal_seam;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movslq %edx, %rdi
shlq $0x2, %rdi
callq 0x1130
movq %rax, %r15
testq %rax, %rax
je 0x56fc
testl %ebp, %ebp
jle 0x56c5
leal -0x1(%rbx), %eax
imull %ebp, %eax
cltq
movl %ebp, %ecx
leaq (%r14,%rax,8), %rdx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %edi, %edi
movl (%rdx,%rdi,8), %r8d
cmpl %esi, %r8d
cmovbl %r8d, %esi
cmovbl %edi, %eax
incq %rdi
cmpq %rdi, %rcx
jne 0x56ad
jmp 0x56ca
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ebx, %ebx
jle 0x56ee
movl %ebx, %ecx
decl %ebx
imull %ebp, %ebx
xorl %edx, %edx
movl %eax, (%r15,%rdx,4)
incq %rdx
addl %ebx, %eax
cltq
movl 0x4(%r14,%rax,8), %eax
subl %ebp, %ebx
cmpq %rdx, %rcx
jne 0x56d7
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1221
jmp 0x56ee
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/seam-carver.c
// Function: image_after_vertical_seam_removal
unsigned char * image_after_vertical_seam_removal(
        const unsigned char *original_data,
        const int *vertical_seam,
        int w,
        int h) {
    unsigned char *img = malloc((w - 1) * h * 3);
    if (!img) {
        fprintf(stderr, "Unable to allocate memory (%d)\n", __LINE__);
        return NULL;
    }

    for (int y = 0; y < h; y++) {
        int seamx = vertical_seam[h - 1 - y];

        for (int x = 0, imgx = 0; imgx < w - 1; x++, imgx++) {
            if (x == seamx) { x++; }

            int    i = (y *  w      + x   ) * 3;
            int imgi = (y * (w - 1) + imgx) * 3;

            img[imgi    ] = original_data[i    ];
            img[imgi + 1] = original_data[i + 1];
            img[imgi + 2] = original_data[i + 2];
        }
    }

    return img;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
leal -0x1(%rbx), %r12d
movl %ecx, %eax
imull %r12d, %eax
leal (%rax,%rax,2), %eax
movslq %eax, %rdi
callq 0x1130
testq %rax, %rax
je 0x57f1
testl %ebp, %ebp
jle 0x57e2
movl %ebp, %ecx
leaq (%r15,%rcx,4), %rdx
movq %rdx, 0x10(%rsp)
movl %r12d, %r8d
movq %rax, 0x8(%rsp)
movq %rax, %rsi
addq $0x2, %rsi
movslq %ebx, %rdi
leaq (%rdi,%rdi,2), %rdi
addq $-0x3, %rdi
leaq (%r8,%r8,2), %r8
xorl %r9d, %r9d
movq 0x10(%rsp), %rax
cmpl $0x2, %ebx
jl 0x57d2
movq %r9, %r10
notq %r10
movl (%rax,%r10,4), %r10d
movl %r9d, %r11d
imull %ebx, %r11d
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpl %r10d, %r12d
sete %r13b
leal (%r12,%r13), %ebp
addl %r11d, %ebp
movslq %ebp, %rbp
leaq (%rbp,%rbp,2), %rbp
movb (%r14,%rbp), %dl
movb %dl, -0x2(%rsi,%r15)
movb 0x1(%r14,%rbp), %dl
movb %dl, -0x1(%rsi,%r15)
movb 0x2(%r14,%rbp), %dl
movb %dl, (%rsi,%r15)
addl %r13d, %r12d
incl %r12d
addq $0x3, %r15
cmpq %r15, %r8
jne 0x578e
incq %r9
addq %rdi, %rsi
cmpq %rcx, %r9
jne 0x5772
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x123c
xorl %eax, %eax
jmp 0x57e2
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/seam-carver.c
// Function: write_energy
int write_energy(
        const unsigned int *energy,
        int w,
        int h,
        const char *filename) {
    int result = 0;

    unsigned char *energy_normalized = malloc(w * h);
    if (!energy_normalized) {
        fprintf(stderr, "Unable to allocate memory (%d)\n", __LINE__);

        result = 1;
        goto cleanup;
    }

    int max_energy = 1;
    for (int y = 0; y < h; y++)
    for (int x = 0; x < w; x++) {
        int i = y * w + x;
        max_energy = energy[i] > max_energy ? energy[i] : max_energy;
    }

    for (int y = 0; y < h; y++)
    for (int x = 0; x < w; x++) {
        int i = y * w + x;
        energy_normalized[i] = (char) ((double) energy[i] / max_energy * 255);
    }

    printf("Writing to '%s'\n", filename);
    if (!stbi_write_jpg(filename, w, h, 1, energy_normalized, 80)) {
        fprintf(stderr, "Unable to write output (%d)\n", __LINE__);

        result = 1;
        goto cleanup;
    }

cleanup:
    if (energy_normalized) { free(energy_normalized); }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
movl %edx, %eax
imull %esi, %eax
movslq %eax, %rdi
callq 0x1130
movq %rax, %rbx
testq %rax, %rax
je 0x5915
movl %r15d, %eax
movl %ebp, %ecx
testl %ebp, %ebp
jle 0x586d
leaq (,%rax,4), %rsi
movl $0x1, %edx
xorl %edi, %edi
movq %r12, %r8
testl %r15d, %r15d
jle 0x585c
xorl %r9d, %r9d
movl (%r8,%r9,4), %r10d
cmpl %edx, %r10d
cmoval %r10d, %edx
incq %r9
cmpq %r9, %rax
jne 0x5849
incq %rdi
addq %rsi, %r8
cmpq %rcx, %rdi
jne 0x5841
cvtsi2sd %edx, %xmm0
jmp 0x5875
movsd 0xe96b(%rip), %xmm0     # 0x141e0
testl %ebp, %ebp
jle 0x58c9
leaq (,%rax,4), %rdx
xorl %esi, %esi
movsd 0xe95d(%rip), %xmm1     # 0x141e8
movq %rbx, %rdi
testl %r15d, %r15d
jle 0x58bb
xorl %r8d, %r8d
movl (%r12,%r8,4), %r9d
xorps %xmm2, %xmm2
cvtsi2sd %r9, %xmm2
divsd %xmm0, %xmm2
mulsd %xmm1, %xmm2
cvttsd2si %xmm2, %r9d
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rax
jne 0x5896
incq %rsi
addq %rax, %rdi
addq %rdx, %r12
cmpq %rcx, %rsi
jne 0x588e
leaq 0xea3f(%rip), %rdi      # 0x1430f
xorl %r12d, %r12d
movq %r14, %rsi
xorl %eax, %eax
callq 0x1090
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl $0x1, %ecx
movq %rbx, %r8
movl $0x50, %r9d
callq 0x5318
testl %eax, %eax
je 0x591c
testq %rbx, %rbx
je 0x5909
movq %rbx, %rdi
callq 0x1030
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1276
jmp 0x5921
callq 0x1259
movl $0x1, %r12d
jmp 0x58fc
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/seam-carver.c
// Function: draw_vertical_seam
int draw_vertical_seam(
        const unsigned char *data,
        const int *minimal_vertical_seam,
        int w,
        int h,
        const char *filename) {
    int result = 0;

    unsigned char *data_with_seams = malloc(w * h * 3);
    if (!data_with_seams) {
        fprintf(stderr, "Unable to allocate memory (%d)\n", __LINE__);

        result = 1;
        goto cleanup;
    }

    memcpy(data_with_seams, data, w * h * 3);

    for (int y = h - 1; y >= 0; y--) {
        int x = minimal_vertical_seam[h - 1 - y];
        int i = (y * w + x) * 3;

        data_with_seams[i    ] = 255;
        data_with_seams[i + 1] = 0;
        data_with_seams[i + 2] = 0;
    }

    printf("Writing to '%s'\n", filename);
    if (!stbi_write_jpg(filename, w, h, 3, data_with_seams, 80)) {
        fprintf(stderr, "Unable to write output (%d)\n", __LINE__);

        result = 1;
        goto cleanup;
    }

cleanup:
    if (data_with_seams) { free(data_with_seams); }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, (%rsp)
movq %rdi, %r13
movl %edx, %eax
imull %ecx, %eax
leal (%rax,%rax,2), %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x1130
movq %rax, %rbx
testq %rax, %rax
je 0x5a0c
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1120
testl %r14d, %r14d
jle 0x59ba
movslq %r14d, %rax
shlq $0x2, %rax
leal -0x1(%r14), %ecx
movl %r14d, %esi
leaq 0x1(%rsi), %rdx
imull %ebp, %ecx
shlq $0x2, %rsi
subq %rsi, %rax
addq (%rsp), %rax
movl (%rax), %esi
addl %ecx, %esi
movslq %esi, %rsi
leaq (%rsi,%rsi,2), %rsi
movw $0xff, (%rbx,%rsi)
movb $0x0, 0x2(%rbx,%rsi)
decq %rdx
subl %ebp, %ecx
addq $0x4, %rax
cmpq $0x1, %rdx
jg 0x5995
leaq 0xe94e(%rip), %rdi      # 0x1430f
xorl %r12d, %r12d
movq %r15, %rsi
xorl %eax, %eax
callq 0x1090
movq %r15, %rdi
movl %ebp, %esi
movl %r14d, %edx
movl $0x3, %ecx
movq %rbx, %r8
movl $0x50, %r9d
callq 0x5318
testl %eax, %eax
je 0x5a13
testq %rbx, %rbx
je 0x59fa
movq %rbx, %rdi
callq 0x1030
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x12b0
jmp 0x5a18
callq 0x1293
movl $0x1, %r12d
jmp 0x59ed
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/./stb_image.h
// Function: stbi__jpeg_huff_decode
stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h)
{
   unsigned int temp;
   int c,k;

   if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);

   // look at the top FAST_BITS and determine what symbol ID it is,
   // if the code is <= FAST_BITS
   c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);
   k = h->fast[c];
   if (k < 255) {
      int s = h->size[k];
      if (s > j->code_bits)
         return -1;
      j->code_buffer <<= s;
      j->code_bits -= s;
      return h->values[k];
   }

   // naive test is to shift the code_buffer down so k bits are
   // valid, then test against maxcode. To speed this up, we've
   // preshifted maxcode left so that it has (16-k) 0s at the
   // end; in other words, regardless of the number of bits, it
   // wants to be compared against something shifted to have 16;
   // that way we don't need to shift inside the loop.
   temp = j->code_buffer >> 16;
   for (k=FAST_BITS+1 ; ; ++k)
      if (temp < h->maxcode[k])
         break;
   if (k == 17) {
      // error! code not found
      j->code_bits -= 16;
      return -1;
   }

   if (k > j->code_bits)
      return -1;

   // convert the huffman code to the symbol id
   c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k];
   STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]);

   // convert the id to a symbol
   j->code_bits -= k;
   j->code_buffer <<= k;
   return h->values[c];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0xf, 0x4824(%rdi)
jg 0xca8b
movq %rbx, %rdi
callq 0xc91f
movl 0x4820(%rbx), %esi
movl %esi, %eax
shrl $0x17, %eax
movzbl (%r14,%rax), %edx
cmpq $0xff, %rdx
je 0xcadc
movzbl 0x500(%r14,%rdx), %ecx
movl 0x4824(%rbx), %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %edi
jl 0xcb81
shll %cl, %esi
movl %esi, 0x4820(%rbx)
movl %edi, 0x4824(%rbx)
movzbl 0x400(%r14,%rdx), %eax
jmp 0xcb81
movl %esi, %eax
shrl $0x10, %eax
xorl %r8d, %r8d
movq %r8, %rcx
incq %r8
cmpl 0x62c(%r14,%rcx,4), %eax
jae 0xcae4
movl 0x4824(%rbx), %edi
cmpq $0x8, %r8
jne 0xcb10
addl $-0x10, %edi
movl %edi, 0x4824(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xcb81
leaq 0x9(%r8), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, %edi
jl 0xcb81
movb $0x17, %cl
subb %r8b, %cl
movl %esi, %eax
shrl %cl, %eax
leaq 0x5923(%rip), %r9       # 0x12450
andl 0x24(%r9,%r8,4), %eax
addl 0x670(%r14,%r8,4), %eax
cltq
movzbl 0x500(%r14,%rax), %r10d
movl %r10d, %ecx
negb %cl
movl %esi, %r11d
shrl %cl, %r11d
andl (%r9,%r10,4), %r11d
movzwl 0x200(%r14,%rax,2), %ecx
cmpl %ecx, %r11d
jne 0xcb89
subl %r8d, %edi
movl %edx, %ecx
shll %cl, %esi
addl $-0x9, %edi
movl %edi, 0x4824(%rbx)
movl %esi, 0x4820(%rbx)
movzbl 0x400(%r14,%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7ac3(%rip), %rdi      # 0x14653
leaq 0x78c3(%rip), %rsi      # 0x1445a
leaq 0x7b07(%rip), %rcx      # 0x146a5
movl $0x7a0, %edx            # imm = 0x7A0
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/./stb_image.h
// Function: stbi__extend_receive
stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)
{
   unsigned int k;
   int sgn;
   if (j->code_bits < n) stbi__grow_buffer_unsafe(j);

   sgn = (stbi__int32)j->code_buffer >> 31; // sign bit is always in MSB
   k = stbi_lrot(j->code_buffer, n);
   STBI_ASSERT(n >= 0 && n < (int) (sizeof(stbi__bmask)/sizeof(*stbi__bmask)));
   j->code_buffer = k & ~stbi__bmask[n];
   k &= stbi__bmask[n];
   j->code_bits -= n;
   return k + (stbi__jbias[n] & ~sgn);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl %esi, 0x4824(%rdi)
jge 0xcbc1
movq %r14, %rdi
callq 0xc91f
cmpl $0x11, %ebx
jae 0xcc0f
movl 0x4820(%r14), %esi
movl %esi, %edx
movl %ebx, %ecx
roll %cl, %edx
movl %ebx, %ecx
leaq 0x5874(%rip), %rax      # 0x12450
movl (%rax,%rcx,4), %eax
movl %eax, %edi
notl %edi
andl %edx, %edi
movl %edi, 0x4820(%r14)
subl %ebx, 0x4824(%r14)
andl %eax, %edx
xorl %eax, %eax
testl %esi, %esi
js 0xcc05
leaq 0x589e(%rip), %rax      # 0x124a0
movl (%rax,%rcx,4), %eax
addl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7ac9(%rip), %rdi      # 0x146df
leaq 0x783d(%rip), %rsi      # 0x1445a
leaq 0x7afa(%rip), %rcx      # 0x1471e
movl $0x7b5, %edx            # imm = 0x7B5
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/./stb_image.h
// Function: stbi__jpeg_get_bit
stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)
{
   unsigned int k;
   if (j->code_bits < 1) stbi__grow_buffer_unsafe(j);
   k = j->code_buffer;
   j->code_buffer <<= 1;
   --j->code_bits;
   return k & 0x80000000;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x4824(%rdi)
jg 0xcc43
movq %rbx, %rdi
callq 0xc91f
movl 0x4820(%rbx), %eax
leal (%rax,%rax), %ecx
movl %ecx, 0x4820(%rbx)
decl 0x4824(%rbx)
andl $0x80000000, %eax       # imm = 0x80000000
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/./stb_image.h
// Function: stbi__jpeg_get_bits
stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n)
{
   unsigned int k;
   if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
   k = stbi_lrot(j->code_buffer, n);
   j->code_buffer = k & ~stbi__bmask[n];
   k &= stbi__bmask[n];
   j->code_bits -= n;
   return k;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl %esi, 0x4824(%rdi)
jge 0xcc78
movq %r14, %rdi
callq 0xc91f
movl 0x4820(%r14), %eax
movl %ebx, %ecx
roll %cl, %eax
movl %ebx, %ecx
leaq 0x57c4(%rip), %rdx      # 0x12450
movl (%rdx,%rcx,4), %ecx
movl %ecx, %edx
notl %edx
andl %eax, %edx
movl %edx, 0x4820(%r14)
andl %ecx, %eax
subl %ebx, 0x4824(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/./stb_image.h
// Function: stbi__tga_read_rgb16
static void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out)
{
   stbi__uint16 px = (stbi__uint16)stbi__get16le(s);
   stbi__uint16 fiveBitMask = 31;
   // we have 3 channels with 5bits each
   int r = (px >> 10) & fiveBitMask;
   int g = (px >> 5) & fiveBitMask;
   int b = px & fiveBitMask;
   // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later
   out[0] = (stbi_uc)((r * 255)/31);
   out[1] = (stbi_uc)((g * 255)/31);
   out[2] = (stbi_uc)((b * 255)/31);

   // some people claim that the most significant bit might be used for alpha
   // (possibly if an alpha-bit is set in the "image descriptor byte")
   // but that only made 16bit test images completely translucent..
   // so let's treat all 15 and 16bit TGAs as RGB with no alpha.
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0xc296
movzbl %al, %ebp
movq %r14, %rdi
callq 0xc296
movzbl %al, %eax
movl %eax, %ecx
shll $0x8, %ecx
orl %ebp, %ecx
shrl $0x2, %eax
andl $0x1f, %eax
shrl $0x5, %ecx
andl $0x1f, %ecx
andl $0x1f, %ebp
movl %eax, %edx
shll $0x8, %edx
subl %eax, %edx
imulq $0x8421085, %rdx, %rax  # imm = 0x8421085
shrq $0x20, %rax
movb %al, (%rbx)
movl %ecx, %eax
shll $0x8, %eax
subl %ecx, %eax
imulq $0x8421085, %rax, %rax  # imm = 0x8421085
shrq $0x20, %rax
movb %al, 0x1(%rbx)
movl %ebp, %eax
shll $0x8, %eax
subl %ebp, %eax
imulq $0x8421085, %rax, %rax  # imm = 0x8421085
shrq $0x20, %rax
movb %al, 0x2(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/./stb_image.h
// Function: stbi__zreceive
stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n)
{
   unsigned int k;
   if (z->num_bits < n) stbi__fill_bits(z);
   k = z->code_buffer & ((1 << n) - 1);
   z->code_buffer >>= n;
   z->num_bits -= n;
   return k;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl %esi, 0x10(%rdi)
jge 0x107f8
movq %r14, %rdi
callq 0x10a1a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %ebx, %ecx
shll %cl, %eax
movl 0x14(%r14), %edx
notl %eax
andl %edx, %eax
shrl %cl, %edx
movl %edx, 0x14(%r14)
subl %ebx, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/avik-das[P]seam-carver/./stb_image.h
// Function: stbi__zhuffman_decode
stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z)
{
   int b,s;
   if (a->num_bits < 16) stbi__fill_bits(a);
   b = z->fast[a->code_buffer & STBI__ZFAST_MASK];
   if (b) {
      s = b >> 9;
      a->code_buffer >>= s;
      a->num_bits -= s;
      return b & 511;
   }
   return stbi__zhuffman_decode_slowpath(a, z);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0xf, 0x10(%rdi)
jg 0x10b0b
movq %rbx, %rdi
callq 0x10a1a
movl 0x14(%rbx), %edx
movl %edx, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movzwl (%r14,%rax,2), %eax
testl %eax, %eax
je 0x10b35
movl %eax, %ecx
shrl $0x9, %ecx
shrl %cl, %edx
movl %edx, 0x14(%rbx)
subl %ecx, 0x10(%rbx)
andl $0x1ff, %eax            # imm = 0x1FF
jmp 0x10bda
movl %edx, %eax
rolw $0x8, %ax
movl %eax, %ecx
shrl $0x4, %ecx
movl $0xf0f, %esi            # imm = 0xF0F
andl %esi, %ecx
andl %esi, %eax
shll $0x4, %eax
orl %ecx, %eax
movl $0x3333, %ecx           # imm = 0x3333
movl %eax, %esi
andl %ecx, %esi
shrl $0x2, %eax
andl %ecx, %eax
leal (%rax,%rsi,4), %eax
movl $0x5555, %ecx           # imm = 0x5555
movl %eax, %esi
andl %ecx, %esi
shrl %eax
andl %ecx, %eax
leal (%rax,%rsi,2), %edi
xorl %esi, %esi
movq %rsi, %rax
incq %rsi
cmpl %edi, 0x448(%r14,%rax,4)
jle 0x10b71
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x7, %rsi
je 0x10bda
movb $0x7, %cl
subb %sil, %cl
shrl %cl, %edi
movzwl 0x412(%r14,%rsi,2), %eax
subq %rax, %rdi
movzwl 0x476(%r14,%rsi,2), %eax
addq %rdi, %rax
movzbl 0x484(%r14,%rax), %ecx
addq $-0x9, %rcx
cmpq %rsi, %rcx
jne 0x10be2
leaq 0x9(%rsi), %rcx
shrl %cl, %edx
movl %edx, 0x14(%rbx)
movl 0x10(%rbx), %ecx
subl %esi, %ecx
addl $-0x9, %ecx
movl %ecx, 0x10(%rbx)
movzwl 0x5a4(%r14,%rax,2), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x42fb(%rip), %rdi      # 0x14ee4
leaq 0x386a(%rip), %rsi      # 0x1445a
leaq 0x42fd(%rip), %rcx      # 0x14ef4
movl $0xf97, %edx            # imm = 0xF97
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O1/w4kfu[P]HommI/Sound/sound.c
// Function: save_wav
int save_wav(char *filename, unsigned char *buf, unsigned int length_buf)
{
	struct wav_header *wheader = NULL;
	FILE *fout = NULL;

	if (!(wheader = Make_wav_header(length_buf)))
		return 0;
	if (!(fout = fopen(filename, "wb")))
	{
		perror("fopen()");
		return 0;
	}
	fwrite(wheader, sizeof (struct wav_header), 1, fout);
	fwrite(buf, length_buf, 1, fout);
	fclose(fout);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movl %edx, %edi
callq 0x11dc
xorl %r14d, %r14d
testq %rax, %rax
je 0x1293
movq %rax, %r12
leaq 0xdeb(%rip), %rsi       # 0x2039
movq %r15, %rdi
callq 0x1090
testq %rax, %rax
je 0x129f
movq %rax, %r15
movl $0x2c, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rax, %rcx
callq 0x10b0
movl %ebp, %esi
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rcx
callq 0x10b0
movq %r15, %rdi
callq 0x1040
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd96(%rip), %rdi       # 0x203c
callq 0x10a0
jmp 0x1293
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/w4kfu[P]HommI/Sound/main.c
// Function: getFileSize
int getFileSize(FILE *inFile)
{
        int fileSize = 0;

        fseek(inFile ,0, SEEK_END);
        fileSize = ftell(inFile);
        fseek(inFile, 0, SEEK_SET);
        return fileSize;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
movl $0x2, %edx
callq 0x1080
movq %rbx, %rdi
callq 0x1060
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1080
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/w4kfu[P]HommI/Sound/main.c
// Function: main
int main(int argc, char *argv[])
{
        FILE *fin = NULL;
        unsigned int filesize = 0;
        unsigned char *buf = NULL;

        if (argc != 3)
        {
                fprintf(stderr, "%s <*.82M> <outfile>\n", argv[0]);
                return EXIT_FAILURE;
        }
        if (!(fin = fopen(argv[1], "rb")))
        {
                perror("fopen()");
                return EXIT_FAILURE;
        }
        filesize = getFileSize(fin);
        if (!(buf = malloc(sizeof (char) * filesize)))
        {
                perror("malloc()");
                fclose(fin);
                return EXIT_FAILURE;
        }
        fread(buf, filesize, 1, fin);
        save_wav(argv[2], buf, filesize);
        fclose(fin);
        return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpl $0x3, %edi
jne 0x1360
movq 0x8(%r14), %rdi
leaq 0xd5a(%rip), %rsi       # 0x205a
callq 0x1090
testq %rax, %rax
je 0x136a
movq %rax, %rbx
movq %rax, %rdi
callq 0x12b0
movl %eax, %r15d
movq %r15, %rdi
callq 0x1070
testq %rax, %rax
je 0x1378
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x1030
movq 0x10(%r14), %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x1225
movq %rbx, %rdi
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x10d0
jmp 0x138c
leaq 0xccb(%rip), %rdi       # 0x203c
callq 0x10a0
jmp 0x138c
leaq 0xcb1(%rip), %rdi       # 0x2030
callq 0x10a0
movq %rbx, %rdi
callq 0x1040
movl $0x1, %eax
jmp 0x1354
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes128poetv2aes128ni/ref/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(unsigned char *c, unsigned long long *clen,
                        const unsigned char *m, unsigned long long mlen,
                        const unsigned char *ad, unsigned long long adlen,
                        const unsigned char *nsec,
                        const unsigned char *npub,
                        const unsigned char *k)
{
    poet_ctx_t ctx;
    (void)nsec;
    
    keysetup_encrypt_only(&ctx, k);
    
    if (npub) {
        unsigned char *header = malloc((size_t)(adlen + CRYPTO_NPUBBYTES));
        memcpy(header, ad, adlen);
        memcpy(header + adlen, npub, CRYPTO_NPUBBYTES);
        process_header(&ctx, header, adlen + CRYPTO_NPUBBYTES);
        free(header);
    } else {
        process_header(&ctx, ad, adlen);
    }
    
    unsigned char *tag = c + mlen;
    encrypt_final(&ctx, m, mlen, c, clen, tag);

    if (clen) {
        *clen = mlen + CRYPTO_ABYTES;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %r9, %r13
movq %r8, %rbp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq 0x2c0(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1050
cmpq $0x0, 0x2b8(%rsp)
je 0x1250
movq %r12, 0x8(%rsp)
leaq 0x10(%r13), %r12
movq %r12, %rdi
callq 0x1030
movq %rbp, %rsi
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rdx
callq 0x10c0
movq 0x2b8(%rsp), %rax
vmovups (%rax), %xmm0
vmovups %xmm0, (%rbp,%r13)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq 0x8(%rsp), %r12
callq 0x10b0
movq %rbp, %rdi
callq 0x1070
jmp 0x1260
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x10b0
leaq (%r15,%rbx), %r9
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x1060
testq %r14, %r14
je 0x1286
addq $0x10, %rbx
movq %rbx, (%r14)
xorl %eax, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq