LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/keithnoguchi[P]pearls-in-action/0x4/main_test.c
// Function: main
int main(void)
{
	int fail = 0;
	int i = 0;

	printf("===============================\n");
	printf("Programming Pearls, Chapter 0x4\n");
	printf("===============================\n");

	if (test_bsearch_0(&i))
		fail++;
	if (test_bsearch_2(&i))
		fail++;
	if (test_bsearch_3(&i))
		fail++;
	if (test_bsearch_10(&i))
		fail++;
	if (test_bsearch_1024(&i))
		fail++;
	if (test_bsearch_with_try_0(&i))
		fail++;
	if (test_bsearch_with_try_2(&i))
		fail++;
	if (test_bsearch_with_try_3(&i))
		fail++;
	if (test_bsearch_with_try_10(&i))
		fail++;
	if (test_bsearch_with_try_1024(&i))
		fail++;
	if (test_bsearch_recursive_0(&i))
		fail++;
	if (test_bsearch_recursive_2(&i))
		fail++;
	if (test_bsearch_recursive_3(&i))
		fail++;
	if (test_bsearch_recursive_10(&i))
		fail++;
	if (test_bsearch_recursive_1024(&i))
		fail++;
	if (test_bsearch_recursive_with_try_0(&i))
		fail++;
	if (test_bsearch_recursive_with_try_2(&i))
		fail++;
	if (test_bsearch_recursive_with_try_3(&i))
		fail++;
	if (test_bsearch_recursive_with_try_10(&i))
		fail++;
	if (test_bsearch_recursive_with_try_1024(&i))
		fail++;

	puts("");

	return fail;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
leaq 0x1e9e(%rip), %r14      # 0x4024
movq %r14, %rdi
callq 0x2040
leaq 0x1e6f(%rip), %rdi      # 0x4004
callq 0x2040
movq %r14, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x23c0
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
movq %rbx, %rdi
callq 0x2484
leal 0x1(%r14), %ebp
testl %eax, %eax
cmovel %r14d, %ebp
movq %rbx, %rdi
callq 0x2544
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2604
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x26c4
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2781
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2862
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x293f
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2a1c
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2af9
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2bd6
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2c9a
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2d5a
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2e1a
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2eda
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x2f97
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x3078
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x3155
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x3232
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x330f
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movl $0xa, %edi
callq 0x2030
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/keithnoguchi[P]pearls-in-action/0x4/bsearch.c
// Function: bsearch
static int __bsearch(int v, const int a[], int n, int *try)
{
	int l, h;

	l = 0, h = n-1;
	while (l <= h) {
		int m = (l+h)/2;

		if (try)
			(*try)++;
		if (v < a[m])
			h = m-1;
		else if (v > a[m])
			l = m+1;
		else
			return m;
	}
	return -1;
}

// Assembly:
decl %edx
xorl %ecx, %ecx
cmpl %edx, %ecx
jg 0x2314
leal (%rdx,%rcx), %r8d
shrl %r8d
movl (%rsi,%r8,4), %r9d
cmpl %edi, %r9d
jle 0x22fb
decl %r8d
movb $0x1, %r9b
movl %r8d, %edx
jmp 0x230e
jge 0x2308
incl %r8d
movb $0x1, %r9b
movl %r8d, %ecx
jmp 0x230e
xorl %r9d, %r9d
movl %r8d, %eax
testb %r9b, %r9b
jne 0x22dc
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/keithnoguchi[P]pearls-in-action/0x4/bsearch.c
// Function: _bsearch_recursive
static int __bsearch_recursive(int v, const int a[], int l, int h, int *try)
{
	int m;

	if (l > h)
		return -1; /* base case */

	if (try)
		(*try)++;

	m = (l+h)/2;
	if (v < a[m])
		return __bsearch_recursive(v, a, l, m-1, try);
	else if (v > a[m])
		return __bsearch_recursive(v, a, m+1, h, try);
	else
		return m;
}

// Assembly:
cmpl %ecx, %edx
jg 0x23a1
testq %r8, %r8
je 0x2389
incl (%r8)
leal (%rcx,%rdx), %eax
shrl %eax
cmpl %edi, (%rsi,%rax,4)
jle 0x2399
decl %eax
movl %eax, %ecx
jmp 0x237d
jge 0x23a6
incl %eax
movl %eax, %edx
jmp 0x237d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/keithnoguchi[P]pearls-in-action/0x4/bsearch_test.c
// Function: test_bsearch_0
int test_bsearch_0(int *i)
{
	const struct test {
		const char	*name;
		const int	array[1];
		int		value;
		int		want;
	} tests[] = {
		{
			.name	= "no entry",
			.array	= {},
			.value	= 10,
			.want	= -1,
		},
		{ /* sentry */ },
	};
	const struct test *t;
	int fail = 0;

	for (t = tests; t->name; t++) {
		int got;

		print_title(i, "test_bsearch_0", t->name);
		got = bsearch(t->value, t->array, 0);
		if (got != t->want) {
			printf("FAIL: %d!=%d\n", got, t->want);
			fail++;
		} else
			puts("PASS");
	}
	return fail;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movaps 0x45cb(%rip), %xmm0     # 0x69a0
movaps %xmm0, (%rsp)
movaps 0x45e0(%rip), %xmm0     # 0x69c0
movaps %xmm0, 0x20(%rsp)
movaps 0x45c4(%rip), %xmm0     # 0x69b0
movaps %xmm0, 0x10(%rsp)
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x2471
movq %rdi, %rbx
leaq 0xc(%rsp), %r12
leaq 0x1e88(%rip), %r14      # 0x4291
leaq 0x1c3d(%rip), %r15      # 0x404d
leaq 0x1c45(%rip), %r13      # 0x405c
xorl %ebp, %ebp
movl (%rbx), %esi
incl %esi
movl %esi, (%rbx)
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
movl (%r12), %edi
leaq -0x4(%r12), %rsi
xorl %edx, %edx
callq 0x22d8
movl 0x4(%r12), %edx
cmpl %edx, %eax
jne 0x2453
leaq 0x1c1e(%rip), %rdi      # 0x406a
callq 0x2040
jmp 0x2461
movq %r13, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x2050
incl %ebp
movq 0xc(%r12), %rcx
addq $0x18, %r12
testq %rcx, %rcx
jne 0x2419
jmp 0x2473
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/keithnoguchi[P]pearls-in-action/0x4/bsearch_test.c
// Function: test_bsearch_with_try_0
int test_bsearch_with_try_0(int *i)
{
	const struct test {
		const char	*name;
		const int	array[1];
		int		value;
		int		want;
		int		try;
	} tests[] = {
		{
			.name	= "no entry",
			.array	= {},
			.value	= 10,
			.want	= -1,
			.try	= 0,
		},
		{ /* sentry */ },
	};
	const struct test *t;
	int fail = 0;

	for (t = tests; t->name; t++) {
		int got;
		int try;

		print_title(i, "test_bsearch_with_try_0", t->name);
		got = bsearch_with_try(t->value, t->array, 0, &try);
		if (got != t->want) {
			printf("FAIL: %d!=%d\n", got, t->want);
			fail++;
		} else if (try != t->try) {
			printf("FAIL: try(%d)!=%d\n", try, t->try);
			fail++;
		} else
			puts("PASS");
	}
	return fail;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movaps 0x46ea(%rip), %xmm0     # 0x6e80
movaps %xmm0, 0x10(%rsp)
movaps 0x46fe(%rip), %xmm0     # 0x6ea0
movaps %xmm0, 0x30(%rsp)
movaps 0x46e2(%rip), %xmm0     # 0x6e90
movaps %xmm0, 0x20(%rsp)
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x284f
movq %rdi, %rbx
leaq 0x28(%rsp), %r13
leaq 0x1ac1(%rip), %r14      # 0x4291
leaq 0x18fc(%rip), %r15      # 0x40d3
leaq 0xc(%rsp), %r12
xorl %ebp, %ebp
movl (%rbx), %esi
incl %esi
movl %esi, (%rbx)
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
movl -0xc(%r13), %edi
leaq -0x10(%r13), %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x231a
movl -0x8(%r13), %edx
cmpl %edx, %eax
jne 0x2825
movl 0xc(%rsp), %esi
movl -0x4(%r13), %edx
cmpl %edx, %esi
jne 0x2830
leaq 0x184c(%rip), %rdi      # 0x406a
callq 0x2040
jmp 0x2840
leaq 0x1830(%rip), %rdi      # 0x405c
movl %eax, %esi
jmp 0x2837
leaq 0x18b4(%rip), %rdi      # 0x40eb
xorl %eax, %eax
callq 0x2050
incl %ebp
movq (%r13), %rcx
addq $0x18, %r13
testq %rcx, %rcx
jne 0x27de
jmp 0x2851
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_init
void hg_hashset_init(struct hg_hashset* set, size_t capacity, hg_hash_hashfunc hash, hg_hash_eqfunc eq) {
    if (capacity < HG_HASHSET_MIN_CAPACITY) {
        capacity = HG_HASHSET_MIN_CAPACITY;
    }

    set->capacity = capacity;
    set->len      = 0;
    set->tomb_cnt = 0;
    set->hash     = hash;
    set->eq       = eq;
    set->buckets  = hg_alloc(capacity * sizeof(struct hg_hashset_bucket));

    // TODO: use calloc
    memset(set->buckets, 0, capacity * sizeof(struct hg_hashset_bucket));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x9, %rsi
movl $0x8, %r14d
cmovaeq %rsi, %r14
movq %r14, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rdx, 0x18(%rdi)
movq %rcx, 0x20(%rdi)
shlq $0x4, %r14
movq %r14, %rdi
callq 0x10c0
movq %rax, 0x28(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O1/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_put
void hg_hashset_put(struct hg_hashset* set, void* item) {
    hashset_adjust(set);

    struct hg_hashset_bucket* bucket = hashset_find(set, item);

    switch (bucket->state) {
    case HG_HASHSET_BUCKET_EMPTY:
        bucket->state = HG_HASHSET_BUCKET_OCCUPIED;
        bucket->item  = item;
        set->len++;
        break;
    case HG_HASHSET_BUCKET_OCCUPIED:
        bucket->item = item;
        break;
    case HG_HASHSET_BUCKET_TOMBSTONE:
        bucket->state = HG_HASHSET_BUCKET_OCCUPIED;
        bucket->item  = item;
        set->tomb_cnt--;
        break;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movq %r15, %rax
shrq $0x2, %rax
movq %r15, %rcx
subq %rax, %rcx
cmpq 0x8(%rdi), %rcx
jae 0x1982
addq %r15, %r15
jmp 0x198c
xorl %ecx, %ecx
cmpq 0x10(%r14), %rax
cmovaeq %rcx, %r15
testq %r15, %r15
je 0x1a31
movups 0x18(%r14), %xmm0
cmpq $0x9, %r15
movl $0x8, %r12d
cmovbq %r12, %r15
movq %r15, (%rsp)
xorps %xmm1, %xmm1
movups %xmm1, 0x8(%rsp)
movups %xmm0, 0x18(%rsp)
shlq $0x4, %r15
movq %r15, %rdi
callq 0x10c0
movq %rax, 0x28(%rsp)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x10a0
cmpq $0x0, (%r14)
je 0x1a07
xorl %r13d, %r13d
movq %rsp, %r15
movq 0x28(%r14), %rax
cmpl $0x1, (%rax,%r12)
jne 0x19fb
movq -0x8(%rax,%r12), %rsi
movq %r15, %rdi
callq 0x1954
incq %r13
addq $0x10, %r12
cmpq (%r14), %r13
jb 0x19e3
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x1a7e
callq 0x1030
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups 0x20(%rsp), %xmm2
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1a9d
movl 0x8(%rax), %ecx
cmpl $0x2, %ecx
je 0x1a62
cmpl $0x1, %ecx
je 0x1a5d
testl %ecx, %ecx
jne 0x1a70
movl $0x1, 0x8(%rax)
movq %rbx, (%rax)
incq 0x8(%r14)
jmp 0x1a70
movq %rbx, (%rax)
jmp 0x1a70
movl $0x1, 0x8(%rax)
movq %rbx, (%rax)
decq 0x10(%r14)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x157f(%rip), %rdi      # 0x3004
leaq 0x157a(%rip), %rsi      # 0x3006
leaq 0x157f(%rip), %rcx      # 0x3012
movl $0xf, %edx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hashset_find
static struct hg_hashset_bucket* hashset_find(struct hg_hashset* set, void* item) {
    uint32_t hash = set->hash(item) % set->capacity;

    struct hg_hashset_bucket* tombstone = NULL;
    for (size_t i = 0; i < set->capacity; i++) {
        struct hg_hashset_bucket* bucket = &set->buckets[hash];
        switch (bucket->state) {
        case HG_HASHSET_BUCKET_EMPTY:
            // If we found an empty bucket, we can stop searching, because we know the item is not in the set.
            return tombstone ? tombstone : bucket;
        case HG_HASHSET_BUCKET_OCCUPIED:
            if (set->eq(bucket->item, item))
                return bucket;
            break;
        case HG_HASHSET_BUCKET_TOMBSTONE:
            if (!tombstone)
                tombstone = bucket;
            break;
        }

        hash = (hash + 1) % set->capacity;
    }
    unreachable_();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq %rsi, %rdi
callq *0x18(%r14)
cmpq $0x0, (%r14)
setne %bpl
je 0x1b4e
movl %eax, %eax
xorl %r13d, %r13d
xorl %edx, %edx
divq (%r14)
movq %rdx, %r15
xorl %ebx, %ebx
movq 0x28(%r14), %rax
movl %r15d, %ecx
shlq $0x4, %rcx
leaq (%rax,%rcx), %r12
movl 0x8(%rax,%rcx), %eax
cmpl $0x2, %eax
je 0x1b1e
cmpl $0x1, %eax
je 0x1b01
testl %eax, %eax
jne 0x1b2c
testq %rbx, %rbx
cmovneq %rbx, %r12
jmp 0x1b17
movq %rsi, 0x10(%rsp)
movq (%r12), %rdi
movq 0x8(%rsp), %rsi
callq *0x20(%r14)
testb %al, %al
je 0x1b27
xorl %eax, %eax
movq %r12, %rsi
jmp 0x1b3c
testq %rbx, %rbx
cmoveq %r12, %rbx
jmp 0x1b2c
movq 0x10(%rsp), %rsi
incl %r15d
movq %r15, %rax
xorl %edx, %edx
divq (%r14)
movb $0x1, %al
movq %rdx, %r15
testb %al, %al
je 0x1b4e
incq %r13
cmpq (%r14), %r13
setb %bpl
jb 0x1ad7
jmp 0x1b4e
testb $0x1, %bpl
je 0x1b66
movq %rsi, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1100
// File: /workspace/github_c_makefile_star2_O1/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_remove
void* hg_hashset_remove(struct hg_hashset* set, void* item) {
    struct hg_hashset_bucket* bucket = hashset_find(set, item);
    if (bucket->state != HG_HASHSET_BUCKET_OCCUPIED)
        return NULL;

    bucket->state = HG_HASHSET_BUCKET_TOMBSTONE;
    set->tomb_cnt++;
    return bucket->item;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1a9d
cmpl $0x1, 0x8(%rax)
jne 0x1bae
movl $0x2, 0x8(%rax)
incq 0x10(%rbx)
movq (%rax), %rax
jmp 0x1bb0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_clear
void hg_hashset_clear(struct hg_hashset* set) {
    for (size_t i = 0; i < set->capacity; i++) {
        set->buckets[i].state = HG_HASHSET_BUCKET_EMPTY;
    }

    set->len      = 0;
    set->tomb_cnt = 0;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x1bd1
movq 0x28(%rdi), %rcx
addq $0x8, %rcx
movl $0x0, (%rcx)
addq $0x10, %rcx
decq %rax
jne 0x1bc2
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_foreach
void hg_hashset_foreach(struct hg_hashset* set, void (*fn)(void*)) {
    for (size_t i = 0; i < set->capacity; i++) {
        struct hg_hashset_bucket* bucket = &set->buckets[i];
        if (bucket->state == HG_HASHSET_BUCKET_OCCUPIED)
            fn(bucket->item);
    }
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x1c1f
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x28(%r14), %rax
cmpl $0x1, (%rax,%r15)
jne 0x1c08
movq -0x8(%rax,%r15), %rdi
callq *%rbx
incq %r12
addq $0x10, %r15
cmpq (%r14), %r12
jb 0x1bf6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/yangtau[P]hedgehog/src/test/hashset_test.c
// Function: test_hashset_init
void test_hashset_init() {
    struct hg_hashset set;
    size_t Ns[] = {1, 2, 3, 4, 5, 7, 11, 13, 17, 19};

    for (size_t i = 0; i < sizeof(Ns) / sizeof(size_t); i++) {
        size_t N = Ns[i];

        test_println("hashset init %zu items", N);

        hg_hashset_init(&set, N, hash_int, eq_int);
        test_assert(hg_hashset_len(&set) == 0);

        // put N
        for (size_t i = 0; i < N; i++) {
            hg_hashset_put(&set, (void*)(uint64_t)i);
        }
        test_assert(hg_hashset_len(&set) == (size_t)N);

        // continas N?
        test_assert(!hg_hashset_contains(&set, (void*)(uint64_t)N));

        hg_hashset_destroy(&set);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq -0x64d(%rip), %r15      # 0x1c2e
leaq 0x8(%rsp), %r12
xorl %ebx, %ebx
leaq 0x11a7(%rip), %rax      # 0x3430
movq (%rax,%rbx,8), %r14
leaq 0x10bb(%rip), %rdi      # 0x334f
movq %r14, %rsi
xorl %eax, %eax
callq 0x1080
movq %r12, %rdi
movq %r14, %rsi
leaq -0x68b(%rip), %rdx      # 0x1c20
movq %r15, %rcx
callq 0x18dc
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x2314
cmpq $0x1, %r14
movq %r14, %r13
adcq $0x0, %r13
xorl %ebp, %ebp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x1954
incq %rbp
cmpq %rbp, %r13
jne 0x22cc
movq 0x10(%rsp), %rax
subq 0x18(%rsp), %rax
cmpq %r14, %rax
jne 0x231b
movq %r12, %rdi
movq %r14, %rsi
callq 0x1b80
testb %al, %al
jne 0x2322
movq %r12, %rdi
callq 0x1927
incq %rbx
cmpq $0xa, %rbx
jne 0x2282
jmp 0x2329
callq 0x173a
jmp 0x22bf
callq 0x1772
jmp 0x22ee
callq 0x17aa
jmp 0x22fd
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dar-extract_pc.c
// Function: main
int main( int argc, char **argv ) {
	
	char name[32];
	uint32_t size, len;
	unsigned int remember;
	
	if( argc < 2 ) {
		printf("Not enough args!\nUse: %s PAK-file\n", argv[0]);
		return 1;
	}
	
	uint32_t numFiles, workfiles;
	FILE *f, *o;
	
	if( !(f = fopen( argv[1], "rb" ))) {
		printf("Couldnt open file %s\n", argv[1]);
		return 1;
	}
	
	fread( &numFiles, 4, 1, f );
	
	printf("Number of files: %u\n", numFiles );
	
	for( workfiles = 0; workfiles < numFiles; workfiles++ ) {
		remember = ftell(f);
		len = 0;
		while(fgetc(f)) len++;
		len++;
		fseek(f, remember, SEEK_SET);
		if((remember+len)%4) len+= 4-((remember+len)%4);
		if(len > 32) {
			printf("namelen > 32!\n");
			return 1;
		}
		fread(name, len, 1, f );
		fread( &size, 4, 1, f );
		printf("Current file: %s - Size %08x\n", name, size);
		
		if( !(o = fopen( name, "wb" ))) {
			printf("Couldnt open output %s\n", name);
			return 1;
		}
		
		writeFile( f, size, o );
		fclose(o);
		fseek(f, 1, SEEK_CUR);
	}
	printf("Done.\n");
	fclose(f);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
cmpl $0x1, %edi
jg 0x12c0
movq (%r14), %rsi
leaq 0xd97(%rip), %rdi       # 0x2052
jmp 0x1441
movq 0x8(%r14), %rdi
leaq 0xdaa(%rip), %rsi       # 0x2075
callq 0x10a0
testq %rax, %rax
je 0x141a
movq %rax, %rbx
leaq 0xc(%rsp), %r14
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rax, %rcx
callq 0x1040
movl (%r14), %ebp
leaq 0xd8e(%rip), %rdi       # 0x208e
movl %ebp, %esi
xorl %eax, %eax
callq 0x1060
movl %ebp, 0x4(%rsp)
testl %ebp, %ebp
je 0x1402
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x1080
movq %rax, %r15
xorl %ebp, %ebp
movl $0x4, %r12d
movl %r15d, %r14d
movq %rbx, %rdi
callq 0x1070
incl %ebp
incl %r12d
incb %r14b
testl %eax, %eax
jne 0x132e
movl %r15d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1090
leal (%r15,%rbp), %eax
movzbl %r14b, %ecx
andl $0x3, %ecx
subl %ecx, %r12d
testb $0x3, %al
cmovel %ebp, %r12d
cmpl $0x21, %r12d
jae 0x1427
movl %r12d, %esi
movl $0x1, %edx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x1040
movl $0x4, %esi
movl $0x1, %edx
leaq 0x8(%rsp), %rdi
movq %rbx, %rcx
callq 0x1040
movl 0x8(%rsp), %r15d
leaq 0xcfb(%rip), %rdi       # 0x20a3
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1060
movq %r14, %rdi
leaq 0xd02(%rip), %rsi       # 0x20c1
callq 0x10a0
testq %rax, %rax
je 0x1435
movq %rax, %r12
movq %rbx, %rdi
movl %r15d, %esi
movq %rax, %rdx
callq 0x11cc
movq %r12, %rdi
callq 0x1050
movl $0x1, %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1090
incl %r13d
cmpl 0x4(%rsp), %r13d
jne 0x1318
leaq 0xcd3(%rip), %rdi       # 0x20dc
callq 0x1030
movq %rbx, %rdi
callq 0x1050
xorl %eax, %eax
jmp 0x144d
movq 0x8(%r14), %rsi
leaq 0xc53(%rip), %rdi       # 0x2078
jmp 0x1441
leaq 0xcb4(%rip), %rdi       # 0x20e2
callq 0x1030
jmp 0x1448
leaq 0xc88(%rip), %rdi       # 0x20c4
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1060
movl $0x1, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sushant8421[P]create_your_own_shell/searchstring.c
// Function: main
int main(int argc, char *argv[]) {
	int result, errno;

	if(argc < 4 || argc > 4) {
		Usage(argv[0]);
		exit(1);
	}

	result = Search_in_File(argv[2], argv[3] , argv[1]);
	if(result == -1) {
		perror("Error");
		printf("Error number = %d\n", errno);
		exit(1);
	}
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x4, %edi
jne 0x121f
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rdi
movq 0x18(%rsi), %rsi
callq 0x1244
cmpl $-0x1, %eax
je 0x122e
xorl %eax, %eax
popq %rbp
retq
callq 0x1233
movl $0x1, %edi
callq 0x10b0
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O1/veltzer[P]xmeltdown/src/dance.c
// Function: ReadRoutineFile
int*ReadRoutineFile(char* filename)
{
	FILE* infile;
	int okayflag=1;
	int* retval;
	int numread=0;

	infile=fopen(filename, "r");
	if (infile == NULL) {
		fprintf(stderr, "Cannot open file %s\n", filename);
		exit(1);
	}
	retval=(int *) calloc (1, sizeof (int));
	numread=0;
	while (okayflag >= 0) {
		okayflag=fscanf(infile, "%d\n", &(retval[numread]));
		if (okayflag >= 0) {
			numread++;
			retval=(int *) realloc (retval, (numread+1)*sizeof (int));
		}
	}
	retval[numread]=-1;
	return (retval);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x17f1(%rip), %rsi      # 0x3063
callq 0x10b0
testq %rax, %rax
je 0x18ed
movq %rax, %rbx
movl $0x1, %edi
movl $0x4, %esi
callq 0x1170
movq %rax, %r14
leaq 0x1841(%rip), %r15      # 0x30d9
xorl %r12d, %r12d
movslq %r12d, %r13
leaq (%r14,%r13,4), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1050
movl %eax, %ebp
testl %eax, %eax
js 0x18cc
leal 0x1(%r13), %r12d
leaq 0x8(,%r13,4), %rsi
movq %r14, %rdi
callq 0x11a0
movq %rax, %r14
testl %ebp, %ebp
jns 0x189b
movslq %r12d, %rax
movl $0xffffffff, (%r14,%rax,4) # imm = 0xFFFFFFFF
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1234
// File: /workspace/github_c_makefile_star2_O1/veltzer[P]xmeltdown/src/dance.c
// Function: clock_usleep
void clock_usleep (unsigned long usecs)
{
	struct timeval tv;
	tv.tv_sec=usecs/1000000L;
	tv.tv_usec=usecs%1000000L;
	(void) select (0, 0, 0, 0, &tv);
}

// Assembly:
subq $0x18, %rsp
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %rdi, %rax
mulq %rcx
shrq $0x12, %rdx
leaq 0x8(%rsp), %r8
movq %rdx, (%r8)
imulq $0xf4240, %rdx, %rax    # imm = 0xF4240
subq %rax, %rdi
movq %rdi, 0x8(%r8)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1080
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/veltzer[P]xmeltdown/src/dance.c
// Function: HandleKeyPress
void HandleKeyPress(XKeyEvent* pevent)
{
	char charback;
	/* int	i; */

	XLookupString(pevent, &charback, 1, NULL, NULL);
	if (charback == 'q')
		exit(0);
	if (charback == '+') {
		steps++;
		printf ("Dancing at speed %d\n", steps);
	}
	if (charback == '-') {
		steps--;
		printf ("Dancing at speed %d\n", steps);
	}
	if (charback >= '1' && charback <= '9') {
		steps=(int) (charback-'1')+1;
		printf ("Dancing at speed %d\n", steps);
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xf(%rsp), %rbx
movq %rbx, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1070
movzbl (%rbx), %eax
cmpl $0x2b, %eax
je 0x1d0f
cmpl $0x71, %eax
jne 0x1d2b
xorl %edi, %edi
callq 0x1090
movl 0x341b(%rip), %esi      # 0x5130
incl %esi
movl %esi, 0x3413(%rip)      # 0x5130
leaq 0x132a(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1030
cmpb $0x2d, 0xf(%rsp)
jne 0x1d4e
movl 0x33f8(%rip), %esi      # 0x5130
decl %esi
movl %esi, 0x33f0(%rip)      # 0x5130
leaq 0x1307(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1030
movzbl 0xf(%rsp), %esi
leal -0x31(%rsi), %eax
cmpb $0x8, %al
ja 0x1d71
addl $-0x30, %esi
movl %esi, 0x33cd(%rip)      # 0x5130
leaq 0x12e4(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1030
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/veltzer[P]xmeltdown/src/dance.c
// Function: RandomMove
void RandomMove()
{
	int i;
	int randnum;
	static int lastnum=999;
	do {
		randnum=rand()%numread;
	} while (randnum == lastnum);
	lastnum=randnum;
	for (i=0; i < PLAYERS; i++) {
		fromskel[i]=tweenskel[0];
		toskel[i]=skellist[randnum];
	}
}

// Assembly:
pushq %rax
callq 0x11b0
cltd
idivl 0x3884(%rip)            # 0x5608
cmpl 0x3386(%rip), %edx      # 0x5110
je 0x1d78
movl %edx, 0x337e(%rip)      # 0x5110
movq 0x37f7(%rip), %rax      # 0x5590
movq 0x3828(%rip), %rcx      # 0x55c8
movslq %edx, %rdx
xorl %esi, %esi
leaq 0x3824(%rip), %rdi      # 0x55d0
leaq 0x383d(%rip), %r8       # 0x55f0
movq %rax, (%rsi,%rdi)
movq (%rcx,%rdx,8), %r9
movq %r9, (%rsi,%r8)
addq $0x8, %rsi
cmpq $0x18, %rsi
jne 0x1db3
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/apps/parasail_aligner.cpp
// Function: pair_check(unsigned long&, std::set<std::pair<int, int>, std::less<std::pair<int, int>>, std::allocator<std::pair<int, int>>>&, int const&, int const&, int const*, unsigned char const*, int const*, std::vector<int, std::allocator<int>> const&, char const&)
inline static void pair_check(
        unsigned long &count_generated,
        PairSet &pairs,
        const int &i,
        const int &j,
        const int * const restrict SA,
        const unsigned char * const restrict BWT,
        const int * const restrict SID,
        const vector<int> &DB,
        const char &sentinal)
{
    const int &sidi = SID[SA[i]];
    const int &sidj = SID[SA[j]];
    if (BWT[i] != BWT[j] || BWT[i] == sentinal) {
        if (DB.empty()) {
            if (sidi != sidj) {
                ++count_generated;
                if (sidi < sidj) {
                    pairs.insert(make_pair(sidi,sidj));
                }
                else {
                    pairs.insert(make_pair(sidj,sidi));
                }
            }
        }
        else {
            if (sidi != sidj && DB[sidi] != DB[sidj]) {
                ++count_generated;
                if (sidi > sidj) {
                    pairs.insert(make_pair(sidi,sidj));
                }
                else {
                    pairs.insert(make_pair(sidj,sidi));
                }
            }
        }
    }
}

// Assembly:
pushq %rax
movslq (%rdx), %rax
movslq (%rcx), %rcx
movzbl (%r9,%rax), %edx
cmpb (%r9,%rcx), %dl
jne 0x302b38
movq 0x20(%rsp), %r9
movsbl (%r9), %r9d
cmpl %r9d, %edx
jne 0x302ba8
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %rdx
movslq (%r8,%rcx,4), %r11
movslq (%r8,%rax,4), %rax
movq (%r10), %r9
movslq (%rdx,%rax,4), %rax
movl %eax, %ecx
movslq (%rdx,%r11,4), %r8
movl %r8d, %edx
cmpq 0x8(%r10), %r9
je 0x302b85
cmpl %edx, %ecx
je 0x302ba8
movl (%r9,%rax,4), %r10d
cmpl (%r9,%r8,4), %r10d
je 0x302ba8
incq (%rdi)
cmpl %r8d, %eax
jg 0x302b90
shlq $0x20, %rcx
orq %rdx, %rcx
movq %rsp, %rax
movq %rcx, (%rax)
jmp 0x302b9d
cmpl %edx, %ecx
je 0x302ba8
incq (%rdi)
cmpl %edx, %ecx
jge 0x302b76
shlq $0x20, %rdx
orq %rcx, %rdx
movq %rsp, %rax
movq %rdx, (%rax)
movq %rsi, %rdi
movq %rax, %rsi
callq 0x3041c8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/traceback.c
// Function: parasail_traceback_free
void parasail_traceback_free(parasail_traceback_t *traceback)
{
    free(traceback->query);
    free(traceback->comp);
    free(traceback->ref);
    free(traceback);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x29e2e0
movq 0x8(%rbx), %rdi
callq 0x29e2e0
movq 0x10(%rbx), %rdi
callq 0x29e2e0
movq %rbx, %rdi
popq %rbx
jmp 0x29e2e0
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/backoff.c
// Function: lock_forward
void *lock_forward(void *arg)
{
	(void)arg;

	for (int iterate = 0; iterate < ITERATIONS; iterate++)
	{
		int backoffs = 0;
		for (int i = 0; i < 3; i++)
		{
			if (i == 0 || !backoff)
				pthread_mutex_lock(&mutex[i]);
			else
			{
				if (pthread_mutex_trylock(&mutex[i]) == EBUSY)
				{
					backoffs++;
					while (--i >= 0)
						pthread_mutex_unlock(&mutex[i]);
				}

				switch (yf)
				{
					case YIELD:
						sched_yield();
						break;
					case SLEEP:
						sleep(1);
						break;
					default:
						break;
				}
			}
		}

		printf("F: %d\n", backoffs);
		pthread_mutex_unlock(&mutex[2]);
		pthread_mutex_unlock(&mutex[1]);
		pthread_mutex_unlock(&mutex[0]);
		sched_yield();
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2ec2(%rip), %rbx      # 0x4090
leaq 0x2ee3(%rip), %r12      # 0x40b8
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %ebp, %ebp
movslq %r13d, %rax
testl %r13d, %r13d
je 0x1232
cmpb $0x0, 0x2e84(%rip)      # 0x4070
je 0x1232
leaq (%rax,%rax,4), %rax
leaq (%rbx,%rax,8), %rdi
callq 0x1040
cmpl $0x10, %eax
jne 0x1251
incl %ebp
leal -0x1(%r13), %eax
testl %r13d, %r13d
jle 0x124e
movl %eax, %r15d
leaq (%r15,%r15,4), %rax
incq %r15
leaq (%rbx,%rax,8), %r13
movq %r13, %rdi
callq 0x1060
addq $-0x28, %r13
decq %r15
jg 0x1219
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x1251
leaq (%rax,%rax,4), %rax
leaq (%rbx,%rax,8), %rdi
callq 0x10b0
leal 0x1(%r13), %eax
cmpl $0x2, %r13d
movl %eax, %r13d
jl 0x11dd
jmp 0x1274
movl %eax, %r13d
movl 0x2eb1(%rip), %eax      # 0x4108
cmpl $-0x1, %eax
je 0x1268
cmpl $0x1, %eax
jne 0x123f
callq 0x1050
jmp 0x123f
movl $0x1, %edi
callq 0x10a0
jmp 0x123f
leaq 0xd89(%rip), %rdi       # 0x2004
movl %ebp, %esi
xorl %eax, %eax
callq 0x1030
leaq 0x2e55(%rip), %rdi      # 0x40e0
callq 0x1060
movq %r12, %rdi
callq 0x1060
movq %rbx, %rdi
callq 0x1060
callq 0x1050
incl %r14d
cmpl $0xa, %r14d
jne 0x11d8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/backoff.c
// Function: lock_backward
void *lock_backward(void *arg)
{
	(void)arg;

	for (int iterate = 0; iterate < ITERATIONS; iterate++)
	{
		int backoffs = 0;
		for (int i = 2; i >= 0 ; i--)
		{
			if (i == 2 || !backoff)
				pthread_mutex_lock(&mutex[i]);
			else
			{
				if (pthread_mutex_trylock(&mutex[i]) == EBUSY)
				{
					backoffs++;
					while (++i < 3)
						pthread_mutex_unlock(&mutex[i]);
				}

				switch (yf)
				{
					case YIELD:
						sched_yield();
						break;
					case SLEEP:
						sleep(1);
						break;
					default:
						break;
				}
			}
		}

		printf("B: %d\n", backoffs);
		pthread_mutex_unlock(&mutex[0]);
		pthread_mutex_unlock(&mutex[1]);
		pthread_mutex_unlock(&mutex[2]);
		sched_yield();
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2dbb(%rip), %rbx      # 0x4090
xorl %r14d, %r14d
movl $0x2, %r13d
xorl %ebp, %ebp
movl %r13d, %r12d
cmpl $0x2, %r13d
je 0x133f
cmpb $0x0, 0x2d80(%rip)      # 0x4070
je 0x133f
leaq (%r12,%r12,4), %rax
leaq (%rbx,%rax,8), %rdi
callq 0x1040
cmpl $0x10, %eax
jne 0x135d
incl %ebp
cmpl $0x1, %r13d
ja 0x135a
leaq (%r12,%r12,4), %rax
leaq (%rbx,%rax,8), %r13
addq $0x28, %r13
addq $0x2, %r12
movq %r12, %r15
movq %r13, %rdi
callq 0x1060
addq $0x28, %r13
incq %r15
cmpl $0x3, %r12d
movq %r15, %r12
jne 0x131f
movl $0x3, %r13d
jmp 0x135d
leaq (%r12,%r12,4), %rax
leaq (%rbx,%rax,8), %rdi
callq 0x10b0
leal -0x1(%r13), %eax
testl %r13d, %r13d
movl %eax, %r13d
jg 0x12e0
jmp 0x1380
incl %r13d
movl 0x2da5(%rip), %eax      # 0x4108
cmpl $-0x1, %eax
je 0x1374
cmpl $0x1, %eax
jne 0x134c
callq 0x1050
jmp 0x134c
movl $0x1, %edi
callq 0x10a0
jmp 0x134c
leaq 0xc84(%rip), %rdi       # 0x200b
movl %ebp, %esi
xorl %eax, %eax
callq 0x1030
movq %rbx, %rdi
callq 0x1060
leaq 0x2d19(%rip), %rdi      # 0x40b8
callq 0x1060
leaq 0x2d35(%rip), %rdi      # 0x40e0
callq 0x1060
callq 0x1050
incl %r14d
cmpl $0xa, %r14d
jne 0x12d8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/backoff.c
// Function: main
int main(int argc, const char **argv)
{
	pthread_t forward, backward;

	if (argc > 1)
		backoff = atoi(argv[1]);
	if (argc > 2)
		yf = atoi(argv[2]);

	pthread_create(&forward, NULL, lock_forward, NULL);
	pthread_create(&backward, NULL, lock_backward, NULL);

	pthread_exit(NULL);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2, %edi
jl 0x13f5
movq 0x8(%rbx), %rdi
callq 0x1090
testl %eax, %eax
setne 0x2c7b(%rip)            # 0x4070
cmpl $0x3, %ebp
jl 0x1409
movq 0x10(%rbx), %rdi
callq 0x1090
movl %eax, 0x2cff(%rip)      # 0x4108
leaq -0x254(%rip), %rdx      # 0x11bc
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
leaq -0x162(%rip), %rdx      # 0x12c3
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
xorl %edi, %edi
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/vanhauser-thc[P]vulntest/encrypt.c
// Function: encrypt
int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, unsigned char *iv, unsigned char *ciphertext) {
  EVP_CIPHER_CTX *ctx;
  int len;
  int ciphertext_len;

  /* Create and initialise the context */
  if (!(ctx = EVP_CIPHER_CTX_new()))
    exit(-1);

  /*
   * Initialise the encryption operation. IMPORTANT - ensure you use a key
   * and IV size appropriate for your cipher
   * In this example we are using 256 bit AES (i.e. a 256 bit key). The
   * IV size for *most* modes is the same as the block size. For AES this
   * is 128 bits
   */
  if (1 != EVP_EncryptInit_ex(ctx, EVP_des_ecb(), NULL, key, iv))
    exit(-1);

  /*
   * Provide the message to be encrypted, and obtain the encrypted output.
   * EVP_EncryptUpdate can be called multiple times if necessary
   */
  if (1 != EVP_EncryptUpdate(ctx, ciphertext, &len, plaintext, plaintext_len))
    exit(-1);
  ciphertext_len = len;

  /*
   * Finalise the encryption. Further ciphertext bytes may be written at
   * this stage.
   */
  if (1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &len))
    exit(-1);
  ciphertext_len += len;

  /* Clean up */
  EVP_CIPHER_CTX_free(ctx);

  return ciphertext_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %r15
callq 0x1080
testq %rax, %rax
je 0x1254
movq %rax, %rbx
callq 0x10a0
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %r13, %rcx
movq %r12, %r8
callq 0x1090
cmpl $0x1, %eax
jne 0x1254
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl %ebp, %r8d
callq 0x10b0
cmpl $0x1, %eax
jne 0x1254
leaq 0x4(%rsp), %rdx
movslq (%rdx), %r15
addq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1050
cmpl $0x1, %eax
jne 0x1254
addl 0x4(%rsp), %r15d
movq %rbx, %rdi
callq 0x1070
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1030
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_06/getop.c
// Function: main
int main(void)
{
  char s[100] = "";

  int type = getop(s);

  printf("%d ", type);
  puts(s);

  return 0;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl $0x0, 0x60(%rbx)
movq %rbx, %rdi
callq 0x11cd
leaq 0xe50(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_06/getop.c
// Function: getop
int getop(char *s)
{
  char c;

  // Skip blanks (spaces and tabs)
  while ((*s = c = getchar()) == ' ' || c == '\t')
    ;

  *(s + 1) = '\0';

  // Not a number
  if (!isdigit(c) && c != '.')
    return c;

  // Collect the integer part
  if (isdigit(c) && c != '.')
    while (isdigit(*(++s) = c = getchar()))
      ;

  // Collect the fraction part
  if (c == '.')
  {
    while (isdigit(*(++s) = c = getchar()))
      ;
  }

  if (c != EOF)
    ungetc(c, stdin);

  *s = '\0';

  return NUMBER;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x1050
movl %eax, %r14d
movb %r14b, (%rbx)
movl %eax, %r12d
shll $0x18, %r12d
cmpl $0x9000000, %r12d       # imm = 0x9000000
je 0x11d8
cmpl $0x20000000, %r12d      # imm = 0x20000000
je 0x11d8
movl %r12d, %ebp
sarl $0x18, %ebp
movb $0x0, 0x1(%rbx)
callq 0x1070
movq %rax, %r15
movq (%rax), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x2e000000, %r12d      # imm = 0x2E000000
je 0x122b
movl %eax, %ecx
andl $0x800, %ecx            # imm = 0x800
je 0x129b
cmpl $0x2e000000, %r12d      # imm = 0x2E000000
je 0x1259
andl $0x800, %eax            # imm = 0x800
je 0x1259
movq (%r15), %r12
callq 0x1050
movl %eax, %r14d
movb %r14b, 0x1(%rbx)
incq %rbx
movsbq %r14b, %rax
testb $0x8, 0x1(%r12,%rax,2)
jne 0x123b
cmpb $0x2e, %r14b
jne 0x127d
movq (%r15), %r12
callq 0x1050
movl %eax, %r14d
movb %r14b, 0x1(%rbx)
incq %rbx
movsbq %r14b, %rax
testb $0x8, 0x1(%r12,%rax,2)
jne 0x125f
cmpb $-0x1, %r14b
je 0x1296
movsbl %r14b, %edi
movq 0x2d52(%rip), %rax      # 0x3fe0
movq (%rax), %rsi
callq 0x1060
movb $0x0, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/martin-decky[P]ichiglyph/interpreter/brainfuck/brainfuck.c
// Function: opcode_decode
static instruction_t opcode_decode(uint8_t opcode)
{
	switch (opcode) {
	case '>':
		return INST_DP_INC;
	case '<':
		return INST_DP_DEC;
	case '+':
		return INST_VAL_INC;
	case '-':
		return INST_VAL_DEC;
	case '.':
		return INST_VAL_OUTPUT;
	case ',':
		return INST_VAL_ACCEPT;
	case '[':
		return INST_JMP_FORWARD;
	case ']':
		return INST_JMP_BACK;
	default:
		return INST_NOP;
	}
}

// Assembly:
cmpl $0x3b, %edi
jg 0x16d9
addl $-0x2b, %edi
cmpl $0x3, %edi
ja 0x1719
leaq 0x95a(%rip), %rax       # 0x2024
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x2, %eax
retq
cmpl $0x5a, %edi
jg 0x16eb
cmpl $0x3c, %edi
je 0x16fb
xorl %eax, %eax
cmpl $0x3e, %edi
jne 0x1719
retq
cmpl $0x5b, %edi
je 0x1701
cmpl $0x5d, %edi
jne 0x1719
movl $0x7, %eax
retq
movl $0x1, %eax
retq
movl $0x6, %eax
retq
movl $0x3, %eax
retq
movl $0x4, %eax
retq
movl $0x5, %eax
retq
movl $0x8, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/vi[P]simple_cbor_stream_parse/simple_example.c
// Function: main
int main() {
    
    struct scsp_callbacks cb;
    memset(&cb, 0, sizeof(cb));
    
    cb.array_opened = &array_opened;
    cb.array_closed = &array_closed;
    cb.integer = &integer;
    cb.string_chunk = &string_chunk;
    
    const char *cbor_data = 
        "\x9F"                        // [
            "\x1A" "\x00\x12\xD6\x87" //     1234567,
            "\x63" "ABC"              //     "ABC",
            "\x84"                    //     [
                "\x05"                //         5,
                "\x05"                //         5,
                "\x29"                //         -10,
                "\x29"                //         -10,
                                      //     ]
        "\xFF"                        // ]
    ;
    size_t cbor_data_len = 2+5+4+1+4;
    
    assert(scsp_parse_from_memory(cbor_data, cbor_data_len, &cb, (void*)0x5645) == 0);
    
    return 0;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rsp, %rbx
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1060
leaq -0x111(%rip), %rax      # 0x119c
movq %rax, 0x38(%rbx)
leaq -0xed(%rip), %rax       # 0x11cb
movq %rax, 0x48(%rbx)
leaq -0xcc(%rip), %rax       # 0x11f7
movq %rax, (%rbx)
leaq -0x9e(%rip), %rax       # 0x122f
movq %rax, 0x28(%rbx)
leaq 0x1ebe(%rip), %rdi      # 0x3196
movl $0x10, %esi
movl $0x5645, %ecx           # imm = 0x5645
movq %rbx, %rdx
callq 0x200e
testq %rax, %rax
jne 0x12fa
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
leaq 0x1e40(%rip), %rdi      # 0x3141
leaq 0x1d16(%rip), %rsi      # 0x301e
leaq 0x1e7c(%rip), %rcx      # 0x318b
movl $0x33, %edx
callq 0x1050
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/seojangho[P]clee/sandbox.c
// Function: onSeccomp
void onSeccomp() {
    printf("[Detected] %s(%d)\n", clee_syscall_name(), clee_syscall_num());
    if (option_enforcing) {
        printf("No mercy!...\n");
        clee_behave(terminate, 0);
    } else {
        getchar();
    }
}

// Assembly:
pushq %rbx
xorl %eax, %eax
callq 0x39f2
movq %rax, %rbx
xorl %eax, %eax
callq 0x39e2
leaq 0x1985(%rip), %rdi      # 0x717b
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3090
cmpb $0x1, 0x5ae6(%rip)      # 0xb2f0
jne 0x5822
leaq 0x19a7(%rip), %rdi      # 0x71ba
callq 0x3060
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0x3baf
popq %rbx
jmp 0x3120
// File: /workspace/github_c_makefile_star2_O1/seojangho[P]clee/sandbox.c
// Function: showpolicy
void showpolicy() {
    printf("List of forbidden system calls:\n");
    int i;
    for (i = 0;; i++)
    {
        if (forbidden[i] == -1) {
            break;
        }
        printf("%s(%d)\n", clee_syscall_num2name(forbidden[i]), forbidden[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x18da(%rip), %rdi      # 0x72ac
callq 0x3060
leaq 0x1422(%rip), %r14      # 0x6e00
leaq 0x17a1(%rip), %rbx      # 0x7186
xorl %r15d, %r15d
movl (%r15,%r14), %ebp
movl %ebp, %edi
callq 0x3cda
movq %rbx, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x3090
addq $0x4, %r15
cmpq $0x344, %r15            # imm = 0x344
jne 0x59e8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/rouming[P]io/io-test.c
// Function: on_signal
static int on_signal(struct io_req *req, int err)
{
	int rc;
	struct signalfd_siginfo *siginfo;
	struct loop_ctx *ctx = req->data;

	if (err < 0)
		return err;
	assert(err == sizeof(struct signalfd_siginfo));
	siginfo = req->buf.iov[0].iov_base;
	if (siginfo->ssi_signo == SIGINT) {
		/* Graceful exit */
		ctx->shutdown = true;
		return err;
	}

	/* Repeat signal REQ_RD request */
	req->buf.pos.iov_off = 0;
	req->buf.pos.iov_ind = 0;
	rc = io_queue_submit(req);
	assert(rc == 0);

	actions[action_ind++](ctx);
	action_ind %= ARRAY_SIZE(actions);

	return err;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %esi, %esi
js 0x1715
cmpl $0x80, %ebx
jne 0x171f
movq 0x18(%rdi), %r14
movq 0x28(%rdi), %rax
cmpl $0x2, (%rax)
jne 0x16c0
movb $0x1, 0x2f0(%r14)
jmp 0x1715
xorps %xmm0, %xmm0
movups %xmm0, 0x128(%rdi)
callq 0x3ef1
testl %eax, %eax
jne 0x173e
movslq 0x6ab6(%rip), %rax      # 0x8190
leal 0x1(%rax), %ecx
movl %ecx, 0x6aad(%rip)      # 0x8190
leaq 0x63f6(%rip), %rcx      # 0x7ae0
movq %r14, %rdi
callq *(%rcx,%rax,8)
movslq 0x6a99(%rip), %rcx      # 0x8190
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
movq %rcx, %rax
mulq %rdx
shrq %rdx
leal (%rdx,%rdx,2), %eax
subl %eax, %ecx
movl %ecx, 0x6a7b(%rip)      # 0x8190
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3a68(%rip), %rdi      # 0x518e
leaq 0x3a04(%rip), %rsi      # 0x5131
leaq 0x3a81(%rip), %rcx      # 0x51b5
movl $0x181, %edx            # imm = 0x181
callq 0x10a0
leaq 0x3a94(%rip), %rdi      # 0x51d9
leaq 0x39e5(%rip), %rsi      # 0x5131
leaq 0x3a62(%rip), %rcx      # 0x51b5
movl $0x18d, %edx            # imm = 0x18D
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/rouming[P]io/io-test.c
// Function: do_vari_len_req1
static void do_vari_len_req1(struct loop_ctx *ctx)
{
	int rc;
	struct io_req *m_s_req1, *s_m_req1;

	/* Write master->slave, part1 */
	m_s_req1 = io_req_create(&ctx->master, REQ_WR, ctx,
				 on_write_vari_len_req1_1__master_to_slave);
	assert(m_s_req1);
	m_s_req1->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = "<msg>",
			.iov_len  = strlen("<msg>")
		},
		.iov[1] = {
			.iov_base = "1 vari length 1",
			.iov_len  = strlen("1 vari length 1")
		},
		.iov_num  = 2,
		.is_vari_len = false
	};
	rc = io_queue_submit(m_s_req1);
	assert(rc == 0);

	/* Read slave<-master, part1 */
	s_m_req1 = io_req_create(&ctx->slave, REQ_RD, ctx,
				 on_read_vari_len_req1_1__slave_from_master);
	s_m_req1->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = NULL,
			.iov_len  = 0
		},
		.iov_num  = 1,
		.is_vari_len = true
	};
	rc = io_queue_submit(s_m_req1);
	assert(rc == 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
leaq 0x2ba(%rip), %rcx       # 0x1c81
movl $0x1, %esi
movq %rdi, %rdx
callq 0x41cc
testq %rax, %rax
je 0x1abc
movq %rax, %r14
movq %rax, %r15
addq $0x28, %r15
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r12
movups %xmm0, 0x110(%r12)
movups %xmm0, 0x100(%r12)
leaq 0x60f0(%rip), %rsi      # 0x7af8
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x1140
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
movq %r12, %rsi
callq 0x1140
movq $0x2, 0x148(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movups %xmm0, 0x160(%r14)
movq %r14, %rdi
callq 0x3ef1
testl %eax, %eax
jne 0x1adb
leaq 0x178(%rbx), %rdi
leaq 0x341(%rip), %rcx       # 0x1da2
xorl %esi, %esi
movq %rbx, %rdx
callq 0x41cc
movq %rax, %rbx
leaq 0x28(%rax), %rdi
movl $0x120, %edx            # imm = 0x120
xorl %esi, %esi
callq 0x10b0
movq $0x1, 0x148(%rbx)
movb $0x1, 0x150(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x151(%rbx)
movups %xmm0, 0x160(%rbx)
movq %rbx, %rdi
callq 0x3ef1
testl %eax, %eax
jne 0x1afa
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x371e(%rip), %rdi      # 0x51e1
leaq 0x3667(%rip), %rsi      # 0x5131
leaq 0x3835(%rip), %rcx      # 0x5306
movl $0x11f, %edx            # imm = 0x11F
callq 0x10a0
leaq 0x36f7(%rip), %rdi      # 0x51d9
leaq 0x3648(%rip), %rsi      # 0x5131
leaq 0x3816(%rip), %rcx      # 0x5306
movl $0x12d, %edx            # imm = 0x12D
callq 0x10a0
leaq 0x36d8(%rip), %rdi      # 0x51d9
leaq 0x3629(%rip), %rsi      # 0x5131
leaq 0x37f7(%rip), %rcx      # 0x5306
movl $0x13b, %edx            # imm = 0x13B
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/rouming[P]io/io-test.c
// Function: do_vari_len_req2
static void do_vari_len_req2(struct loop_ctx *ctx)
{
	int rc;
	struct io_req *s_m_req;

	/*
	 * Here we test, that on the previous action
	 * something was stashed and here we submit
	 * new read request out of the IO loop, i.e.
	 * prewait actions should be called.
	 */

	/* Read slave<-master, reuse callback from do_vari_len_req1 */
	s_m_req = io_req_create(&ctx->slave, REQ_RD, ctx,
				on_read_vari_len_req2__slave_from_master);
	s_m_req->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = NULL,
			.iov_len  = 0
		},
		.iov_num  = 1,
		.is_vari_len = true
	};
	rc = io_queue_submit(s_m_req);
	assert(rc == 0);
}

// Assembly:
pushq %rbx
movq %rdi, %rdx
addq $0x178, %rdi            # imm = 0x178
leaq 0x5d7(%rip), %rcx       # 0x2102
xorl %esi, %esi
callq 0x41cc
movq %rax, %rbx
leaq 0x28(%rax), %rdi
movl $0x120, %edx            # imm = 0x120
xorl %esi, %esi
callq 0x10b0
movq $0x1, 0x148(%rbx)
movb $0x1, 0x150(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x151(%rbx)
movups %xmm0, 0x160(%rbx)
movq %rbx, %rdi
callq 0x3ef1
testl %eax, %eax
jne 0x1b76
popq %rbx
retq
leaq 0x365c(%rip), %rdi      # 0x51d9
leaq 0x35ad(%rip), %rsi      # 0x5131
leaq 0x39b4(%rip), %rcx      # 0x553f
movl $0x170, %edx            # imm = 0x170
callq 0x10a0