LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_sub_context
int gshkl_add_sub_context(greshunkel_ctext *parent, const char name[const], const greshunkel_ctext *child) {
	assert(parent != NULL);
	assert(child != NULL);
	assert(name != NULL);

	/* Create a new tuple to hold type and name and shit. */
	greshunkel_tuple _stack_tuple = {
		.name = {0},
		.type = GSHKL_SUBCTEXT,
		.value = {
			.sub_ctext = child
		}
	};
	const size_t name_len = strnlen(name, WISDOM_OF_WORDS) < WISDOM_OF_WORDS ? strnlen(name, WISDOM_OF_WORDS) : WISDOM_OF_WORDS;
	strncpy(_stack_tuple.name, name, name_len);

	return _gshkl_add_var_to_context(parent, &_stack_tuple);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x21a0
jmp 0x21bf
leaq 0x60f4(%rip), %rdi      # 0x829b
leaq 0x607f(%rip), %rsi      # 0x822d
movl $0x51, %edx
leaq 0x60f0(%rip), %rcx      # 0x82aa
callq 0x1100
cmpq $0x0, -0x18(%rbp)
je 0x21c8
jmp 0x21e7
leaq 0x6136(%rip), %rdi      # 0x8305
leaq 0x6057(%rip), %rsi      # 0x822d
movl $0x52, %edx
leaq 0x60c8(%rip), %rcx      # 0x82aa
callq 0x1100
cmpq $0x0, -0x10(%rbp)
je 0x21f0
jmp 0x220f
leaq 0x65c4(%rip), %rdi      # 0x87bb
leaq 0x602f(%rip), %rsi      # 0x822d
movl $0x53, %edx
leaq 0x60a0(%rip), %rcx      # 0x82aa
callq 0x1100
leaq -0x248(%rbp), %rdi
xorl %esi, %esi
movl $0x230, %edx            # imm = 0x230
callq 0x1110
movl $0x2, -0x228(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x1120
cmpq $0x20, %rax
jae 0x2262
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x1120
movq %rax, -0x258(%rbp)
jmp 0x2270
movl $0x20, %eax
movq %rax, -0x258(%rbp)
jmp 0x2270
movq -0x258(%rbp), %rax
movq %rax, -0x250(%rbp)
leaq -0x248(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x250(%rbp), %rdx
callq 0x1050
movq -0x8(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x22b0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_filter
int gshkl_add_filter(greshunkel_ctext *ctext,
		const char name[const],
		char *(*filter_func)(const char *argument),
		void (*clean_up)(char *filter_result)) {
	assert(name != NULL);

	greshunkel_filter new_filter = {
		.filter_func = filter_func,
		.clean_up = clean_up,
		.name = {0}
	};
	strncpy(new_filter.name, name, sizeof(new_filter.name) - 1);

	vector_append(ctext->filter_functions, &new_filter, sizeof(struct greshunkel_filter));
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2321
jmp 0x2340
leaq 0x6493(%rip), %rdi      # 0x87bb
leaq 0x5efe(%rip), %rsi      # 0x822d
movl $0x68, %edx
leaq 0x5fd8(%rip), %rcx      # 0x8313
callq 0x1100
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1110
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1f, %edx
callq 0x1050
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x50(%rbp), %rsi
movl $0x30, %edx
callq 0x5e70
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_string
int gshkl_add_string(greshunkel_ctext *ctext, const char name[const], const char value[const]) {
	assert(ctext != NULL);
	assert(name != NULL);
	assert(value != NULL);

	/* Create a new tuple to hold type and name and shit. */
	greshunkel_tuple _stack_tuple = {
		.name = {0},
		.type = GSHKL_STR,
		.value =  {{0}}
	};
	strncpy(_stack_tuple.name, name, WISDOM_OF_WORDS - 1);

	/* Copy the value of the string into the var object: */
	greshunkel_var _stack_var = {{0}};
	if (value != NULL)
		strncpy(_stack_var.str, value, MAX_GSHKL_STR_SIZE);
	_stack_var.str[MAX_GSHKL_STR_SIZE] = '\0';

	/* Copy the var object itself into the tuple's var space: */
	memcpy(&_stack_tuple.value, &_stack_var, sizeof(greshunkel_var));

	/* Push that onto our values stack. */
	return _gshkl_add_var_to_context(ctext, &_stack_tuple);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x23b0
jmp 0x23cf
leaq 0x5e68(%rip), %rdi      # 0x821f
leaq 0x5e6f(%rip), %rsi      # 0x822d
movl $0x76, %edx
leaq 0x5fb0(%rip), %rcx      # 0x837a
callq 0x1100
cmpq $0x0, -0x10(%rbp)
je 0x23d8
jmp 0x23f7
leaq 0x63dc(%rip), %rdi      # 0x87bb
leaq 0x5e47(%rip), %rsi      # 0x822d
movl $0x77, %edx
leaq 0x5f88(%rip), %rcx      # 0x837a
callq 0x1100
cmpq $0x0, -0x18(%rbp)
je 0x2400
jmp 0x241f
leaq 0x5fc2(%rip), %rdi      # 0x83c9
leaq 0x5e1f(%rip), %rsi      # 0x822d
movl $0x78, %edx
leaq 0x5f60(%rip), %rcx      # 0x837a
callq 0x1100
leaq -0x248(%rbp), %rdi
xorl %esi, %esi
movl $0x230, %edx            # imm = 0x230
callq 0x1110
movl $0x1, -0x228(%rbp)
leaq -0x248(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1f, %edx
callq 0x1050
leaq -0x450(%rbp), %rdi
xorl %esi, %esi
movl $0x208, %edx            # imm = 0x208
callq 0x1110
cmpq $0x0, -0x18(%rbp)
je 0x2480
leaq -0x450(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x1050
movb $0x0, -0x250(%rbp)
leaq -0x248(%rbp), %rdi
addq $0x28, %rdi
leaq -0x450(%rbp), %rsi
movl $0x208, %edx            # imm = 0x208
callq 0x1180
movq -0x8(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x22b0
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_int
int gshkl_add_int(greshunkel_ctext *ctext, const char name[const], const int value) {
	assert(ctext != NULL);
	assert(name != NULL);

	greshunkel_tuple _stack_tuple = {
		.name = {0},
		.type = GSHKL_STR,
		.value = {{0}}
	};
	strncpy(_stack_tuple.name, name, WISDOM_OF_WORDS - 1);

	greshunkel_var _stack_var = {{0}};
	snprintf(_stack_var.str, MAX_GSHKL_STR_SIZE, "%i", value);

	memcpy(&_stack_tuple.value, &_stack_var, sizeof(greshunkel_var));

	return _gshkl_add_var_to_context(ctext, &_stack_tuple);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x24df
jmp 0x24fe
leaq 0x5d39(%rip), %rdi      # 0x821f
leaq 0x5d40(%rip), %rsi      # 0x822d
movl $0x90, %edx
leaq 0x5ede(%rip), %rcx      # 0x83d7
callq 0x1100
cmpq $0x0, -0x10(%rbp)
je 0x2507
jmp 0x2526
leaq 0x62ad(%rip), %rdi      # 0x87bb
leaq 0x5d18(%rip), %rsi      # 0x822d
movl $0x91, %edx
leaq 0x5eb6(%rip), %rcx      # 0x83d7
callq 0x1100
leaq -0x248(%rbp), %rdi
xorl %esi, %esi
movl $0x230, %edx            # imm = 0x230
callq 0x1110
movl $0x1, -0x228(%rbp)
leaq -0x248(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1f, %edx
callq 0x1050
leaq -0x450(%rbp), %rdi
xorl %esi, %esi
movl $0x208, %edx            # imm = 0x208
callq 0x1110
leaq -0x450(%rbp), %rdi
movl -0x14(%rbp), %ecx
movl $0x200, %esi            # imm = 0x200
leaq 0x6442(%rip), %rdx      # 0x89c3
movb $0x0, %al
callq 0x10e0
leaq -0x248(%rbp), %rdi
addq $0x28, %rdi
leaq -0x450(%rbp), %rsi
movl $0x208, %edx            # imm = 0x208
callq 0x1180
movq -0x8(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x22b0
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_array
greshunkel_var gshkl_add_array(greshunkel_ctext *ctext, const char name[]) {
	assert(ctext != NULL);

	greshunkel_tuple _stack_tuple = {
		.name = {0},
		.type = GSHKL_ARR,
		.value = {
			.arr = vector_new(sizeof(greshunkel_tuple), 16)
		}
	};
	const size_t name_len = strnlen(name, WISDOM_OF_WORDS) < WISDOM_OF_WORDS ? strnlen(name, WISDOM_OF_WORDS) : WISDOM_OF_WORDS;
	strncpy(_stack_tuple.name, name, name_len);

	_gshkl_add_var_to_context(ctext, &_stack_tuple);
	return _stack_tuple.value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x258(%rbp)
movq %rdi, -0x250(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x25ea
jmp 0x2609
leaq 0x5c2e(%rip), %rdi      # 0x821f
leaq 0x5c35(%rip), %rsi      # 0x822d
movl $0xa3, %edx
leaq 0x5e17(%rip), %rcx      # 0x841b
callq 0x1100
leaq -0x240(%rbp), %rdi
xorl %esi, %esi
movl $0x230, %edx            # imm = 0x230
callq 0x1110
movl $0x0, -0x220(%rbp)
movl $0x230, %edi            # imm = 0x230
movl $0x10, %esi
callq 0x5de0
movq %rax, -0x218(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x1120
cmpq $0x20, %rax
jae 0x2667
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x1120
movq %rax, -0x260(%rbp)
jmp 0x2675
movl $0x20, %eax
movq %rax, -0x260(%rbp)
jmp 0x2675
movq -0x260(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x240(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x248(%rbp), %rdx
callq 0x1050
movq -0x8(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x22b0
movq -0x258(%rbp), %rdi
leaq -0x240(%rbp), %rsi
addq $0x28, %rsi
movl $0x208, %edx            # imm = 0x208
callq 0x1180
movq -0x250(%rbp), %rax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_int_to_loop
int gshkl_add_int_to_loop(greshunkel_var *loop, const int value) {
	assert(loop != NULL);

	greshunkel_tuple _stack_tuple = {
		.name = {0},
		.type = GSHKL_STR,
		.value = {{0}}
	};

	greshunkel_var _stack_var = {{0}};
	snprintf(_stack_var.str, MAX_GSHKL_STR_SIZE, "%i", value);

	memcpy(&_stack_tuple.value, &_stack_var, sizeof(greshunkel_var));

	return _gshkl_add_var_to_loop(loop, &_stack_tuple);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x26fb
jmp 0x271a
leaq 0x5d5a(%rip), %rdi      # 0x845c
leaq 0x5b24(%rip), %rsi      # 0x822d
movl $0xb4, %edx
leaq 0x5d54(%rip), %rcx      # 0x8469
callq 0x1100
leaq -0x240(%rbp), %rdi
xorl %esi, %esi
movl $0x230, %edx            # imm = 0x230
callq 0x1110
movl $0x1, -0x220(%rbp)
leaq -0x448(%rbp), %rdi
xorl %esi, %esi
movl $0x208, %edx            # imm = 0x208
callq 0x1110
leaq -0x448(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl $0x200, %esi            # imm = 0x200
leaq 0x6263(%rip), %rdx      # 0x89c3
movb $0x0, %al
callq 0x10e0
leaq -0x240(%rbp), %rdi
addq $0x28, %rdi
leaq -0x448(%rbp), %rsi
movl $0x208, %edx            # imm = 0x208
callq 0x1180
movq -0x8(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x27a0
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_sub_context_to_loop
int gshkl_add_sub_context_to_loop(greshunkel_var *loop, const greshunkel_ctext *ctext) {
	assert(loop != NULL);
	assert(ctext != NULL);

	greshunkel_tuple _stack_tuple = {
		.name = {0},
		.type = GSHKL_SUBCTEXT,
		.value = {
			.sub_ctext = ctext
		}
	};

	return _gshkl_add_var_to_loop(loop, &_stack_tuple);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x280c
jmp 0x282b
leaq 0x5c49(%rip), %rdi      # 0x845c
leaq 0x5a13(%rip), %rsi      # 0x822d
movl $0xc5, %edx
leaq 0x5c7a(%rip), %rcx      # 0x84a0
callq 0x1100
cmpq $0x0, -0x10(%rbp)
je 0x2834
jmp 0x2853
leaq 0x59e4(%rip), %rdi      # 0x821f
leaq 0x59eb(%rip), %rsi      # 0x822d
movl $0xc6, %edx
leaq 0x5c52(%rip), %rcx      # 0x84a0
callq 0x1100
leaq -0x240(%rbp), %rdi
xorl %esi, %esi
movl $0x230, %edx            # imm = 0x230
callq 0x1110
movl $0x2, -0x220(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x27a0
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_string_to_loop
int gshkl_add_string_to_loop(greshunkel_var *loop, const char *value) {
	assert(loop != NULL);

	greshunkel_tuple _stack_tuple = {
		.name = {0},
		.type = GSHKL_STR,
		.value = {{0}}
	};

	greshunkel_var _stack_var = {{0}};
	if (value != NULL)
		strncpy(_stack_var.str, value, MAX_GSHKL_STR_SIZE);
	_stack_var.str[MAX_GSHKL_STR_SIZE] = '\0';

	memcpy(&_stack_tuple.value, &_stack_var, sizeof(union greshunkel_var));

	return _gshkl_add_var_to_loop(loop, &_stack_tuple);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x28bc
jmp 0x28db
leaq 0x5b99(%rip), %rdi      # 0x845c
leaq 0x5963(%rip), %rsi      # 0x822d
movl $0xd4, %edx
leaq 0x5c18(%rip), %rcx      # 0x84ee
callq 0x1100
leaq -0x240(%rbp), %rdi
xorl %esi, %esi
movl $0x230, %edx            # imm = 0x230
callq 0x1110
movl $0x1, -0x220(%rbp)
leaq -0x448(%rbp), %rdi
xorl %esi, %esi
movl $0x208, %edx            # imm = 0x208
callq 0x1110
cmpq $0x0, -0x10(%rbp)
je 0x2927
leaq -0x448(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x1050
movb $0x0, -0x248(%rbp)
leaq -0x240(%rbp), %rdi
addq $0x28, %rdi
leaq -0x448(%rbp), %rsi
movl $0x208, %edx            # imm = 0x208
callq 0x1180
movq -0x8(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x27a0
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_free_context
void gshkl_free_context(greshunkel_ctext *ctext) {
	unsigned int i;
	for (i = 0; i < ctext->values->count; i++) {
		greshunkel_tuple *next = (greshunkel_tuple *)vector_get(ctext->values, i);
		if (next->type == GSHKL_ARR) {
			_gshkl_free_arr(next);
		} else if (next->type == GSHKL_SUBCTEXT) {
			gshkl_free_context((struct greshunkel_ctext *)next->value.sub_ctext);
		}
	}
	vector_free(ctext->values);
	vector_free(ctext->filter_functions);

	free(ctext);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jae 0x29e1
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x60b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x29bb
movq -0x18(%rbp), %rdi
callq 0x2a10
jmp 0x29d4
movq -0x18(%rbp), %rax
cmpl $0x2, 0x20(%rax)
jne 0x29d2
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2970
jmp 0x29d4
jmp 0x29d6
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2983
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x6280
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x6280
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: read_line
static line read_line(const char *buf) {
	char c = '\0';

	size_t num_read = 0;
	while (1) {
		c = buf[num_read];
		num_read++;
		if (c == '\0' || c == '\n' || c == '\r')
			break;
	}

	line to_return = {
		.size = num_read,
		.data = calloc(1, num_read + 1)
	};
	strncpy(to_return.data, buf, num_read);

	return to_return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movsbl -0x19(%rbp), %eax
cmpl $0x0, %eax
je 0x300d
movsbl -0x19(%rbp), %eax
cmpl $0xa, %eax
je 0x300d
movsbl -0x19(%rbp), %eax
cmpl $0xd, %eax
jne 0x300f
jmp 0x3011
jmp 0x2fd8
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rsi
incq %rsi
movl $0x1, %edi
callq 0x1150
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1050
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: destroy_regex
static inline void _destroy_regex(struct compiled_regex *all_regex) {
	regfree(&all_regex->c_var_regex);
	regfree(&all_regex->c_cvar_regex);
	regfree(&all_regex->c_loop_regex);
	regfree(&all_regex->c_filter_regex);
	regfree(&all_regex->c_filter_no_args_regex);
	regfree(&all_regex->c_include_regex);
	regfree(&all_regex->c_conditional_regex);
	regfree(&all_regex->c_conditional_inverse_regex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10a0
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
callq 0x10a0
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
callq 0x10a0
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x10a0
movq -0x8(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x10a0
movq -0x8(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
callq 0x10a0
movq -0x8(%rbp), %rdi
addq $0x180, %rdi            # imm = 0x180
callq 0x10a0
movq -0x8(%rbp), %rdi
addq $0x1c0, %rdi            # imm = 0x1C0
callq 0x10a0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: regexec_2_0_beta
static int regexec_2_0_beta(const regex_t *preg, const char *string, size_t nmatch, match_t pmatch[]) {
	unsigned int i;
	regmatch_t matches[nmatch];
	memset(matches, 0, sizeof(matches));

	if (regexec(preg, string, nmatch, matches, 0) != 0) {
		return 1;
	}
	for (i = 0; i < nmatch; i++) {
		pmatch[i].rm_so = matches[i].rm_so;
		pmatch[i].rm_eo = matches[i].rm_eo;
		pmatch[i].len = matches[i].rm_eo - matches[i].rm_so;
		pmatch[i].start = string + matches[i].rm_so;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdx
movq %rsp, %rax
movq %rax, -0x38(%rbp)
leaq 0xf(,%rdx,8), %rax
andq $-0x10, %rax
movq %rsp, %rdi
subq %rax, %rdi
movq %rdi, -0x50(%rbp)
movq %rdi, %rsp
movq %rdx, -0x40(%rbp)
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x1110
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %r8d, %r8d
callq 0x11b0
cmpl $0x0, %eax
je 0x468b
movl $0x1, -0x4(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x472f
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpq -0x20(%rbp), %rax
jae 0x4721
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl (%rax,%rcx,8), %edx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rcx
movl %edx, (%rcx)
movl -0x2c(%rbp), %ecx
movl 0x4(%rax,%rcx,8), %edx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rcx
movl %edx, 0x4(%rcx)
movl -0x2c(%rbp), %ecx
movl 0x4(%rax,%rcx,8), %ecx
movl -0x2c(%rbp), %edx
subl (%rax,%rdx,8), %ecx
movslq %ecx, %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rcx
movq %rdx, 0x8(%rcx)
movq -0x18(%rbp), %rcx
movl -0x2c(%rbp), %edx
movslq (%rax,%rdx,8), %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4692
movl $0x0, -0x4(%rbp)
movl $0x1, -0x44(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: find_needle
static const void *find_needle(const greshunkel_ctext *ctext, const char *needle, int find_values) {
	const greshunkel_ctext *current_ctext = ctext;
	while (current_ctext != NULL) {
		vector *current_vector;
		current_vector = (find_values) ? current_ctext->values : current_ctext->filter_functions;
		unsigned int i;
		for (i = 0; i < current_vector->count; i++) {
			const greshunkel_named_item *item = (greshunkel_named_item *)vector_get(current_vector, i);
			assert(item->name != NULL);
			const size_t larger = strlen(item->name) > strlen(needle) ? strlen(item->name) : strlen(needle);
			if (strncmp(item->name, needle, larger) == 0)
				return item;
		}
		current_ctext = current_ctext->parent;
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4867
cmpl $0x0, -0x1c(%rbp)
je 0x4779
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x4785
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x4856
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x60b0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, %rax
je 0x47c1
jmp 0x47e0
leaq 0x3fed(%rip), %rdi      # 0x87b5
leaq 0x3a5e(%rip), %rsi      # 0x822d
movl $0x139, %edx            # imm = 0x139
leaq 0x3fed(%rip), %rcx      # 0x87c8
callq 0x1100
movq -0x40(%rbp), %rdi
callq 0x10b0
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10b0
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
jbe 0x4811
movq -0x40(%rbp), %rdi
callq 0x10b0
movq %rax, -0x60(%rbp)
jmp 0x481e
movq -0x18(%rbp), %rdi
callq 0x10b0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x1060
cmpl $0x0, %eax
jne 0x4846
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x486f
jmp 0x4848
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x4794
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x475b
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: vishnu
static void vishnu(line *new_line_to_add, const match_t match, const char *result, const line *operating_line) {
	char *p;
	const size_t sizes[3] = {match.rm_so, strlen(result), operating_line->size - match.rm_eo};

	new_line_to_add->size = sizes[0] + sizes[1] + sizes[2];
	new_line_to_add->data = p = calloc(1, new_line_to_add->size + 1);

	memcpy(p, operating_line->data, sizes[0]);
	p += sizes[0];
	memcpy(p, result, sizes[1]);
	p += sizes[1];
	memcpy(p, operating_line->data + match.rm_eo, sizes[2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movslq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10b0
movq -0x48(%rbp), %rcx
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rcx
addq -0x38(%rbp), %rcx
addq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rsi
addq $0x1, %rsi
movl $0x1, %edi
callq 0x1150
movq %rax, %rcx
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x40(%rbp), %rdx
callq 0x1180
movq -0x40(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x1180
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
addq -0x20(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rsi
movslq 0x4(%rax), %rax
addq %rax, %rsi
movq -0x30(%rbp), %rdx
callq 0x1180
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/vector.c
// Function: vector_new
vector *vector_new(const size_t item_size, const size_t initial_element_count) {
	vector _vec = {
		.item_size = item_size,
		.max_size = initial_element_count,
		.count = 0,
		.items = calloc(1, initial_element_count * item_size + 1)
	};

	vector *to_return = calloc(1, sizeof(vector));
	memcpy(to_return, &_vec, sizeof(vector));

	return to_return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rsi
imulq -0x8(%rbp), %rsi
addq $0x1, %rsi
movl $0x1, %edi
callq 0x1150
movq %rax, -0x18(%rbp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x1150
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/vector.c
// Function: vector_append
inline int vector_append(vector *vec, const void *item, const size_t item_size) {
	if (vec == NULL)
		return 0;

	if (item_size > vec->item_size)
		return 0;

	if (vec->count == vec->max_size) {
		vec->max_size *= 2;
		void *array = realloc(vec->items, vec->max_size * vec->item_size + 1);
		if (!array)
			return 0;
		vec->items = array;
	}

	if (item_size != 0 && item != NULL) {
		memcpy(nth(vec->count), item, item_size);
		memset(nth(vec->count) + item_size, '\0', sizeof(char));
	} else {
		/* Just zero out the memory so we can check for NULLs. */
		memset(nth(vec->count), 0, vec->item_size);
	}
	vec->count++;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5e97
movl $0x0, -0x4(%rbp)
jmp 0x5fb8
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x5eb0
movl $0x0, -0x4(%rbp)
jmp 0x5fb8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x5f15
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shlq %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
imulq (%rax), %rsi
addq $0x1, %rsi
callq 0x11c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x5f09
movl $0x0, -0x4(%rbp)
jmp 0x5fb8
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x5f78
cmpq $0x0, -0x18(%rbp)
je 0x5f78
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
imulq (%rcx), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1180
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
imulq (%rcx), %rax
addq %rax, %rdi
addq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x1110
jmp 0x5fa1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
imulq (%rcx), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
xorl %esi, %esi
callq 0x1110
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/vector.c
// Function: vector_append_ptr
inline int vector_append_ptr(vector *vec, const void *pointer) {
	if (vec == NULL)
		return 0;

	if (vec->item_size != sizeof(pointer))
		return 0;

	if (vec->count == vec->max_size) {
		vec->max_size *= 2;
		void *array = realloc(vec->items, (vec->max_size * vec->item_size));
		if (!array)
			return 0;
		vec->items = array;
	}

	memcpy(nth(vec->count), &pointer, sizeof(void *));
	vec->count++;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5ff3
movl $0x0, -0x4(%rbp)
jmp 0x609e
movq -0x10(%rbp), %rax
cmpq $0x8, (%rax)
je 0x6009
movl $0x0, -0x4(%rbp)
jmp 0x609e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x6067
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shlq %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
imulq (%rax), %rsi
callq 0x11c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x605b
movl $0x0, -0x4(%rbp)
jmp 0x609e
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x10(%rbp), %rdx
imulq (%rdx), %rcx
movq -0x18(%rbp), %rdx
movq %rdx, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/vector.c
// Function: vector_get
inline const void *vector_get(const vector *vec, const unsigned int i) {
	if (vec == NULL)
		return NULL;
	if (i > vec->max_size)
		return NULL;
	return nth(i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x60cc
movq $0x0, -0x8(%rbp)
jmp 0x60fd
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x60e3
movq $0x0, -0x8(%rbp)
jmp 0x60fd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rdx
imulq (%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/vector.c
// Function: vector_reverse
int vector_reverse(vector *vec) {
	if (vec == NULL)
		return 0;

	const size_t item_size = vec->item_size;
	unsigned int i = 0;

	unsigned char *buf = malloc(item_size);
	if (!buf)
		return 0;

	for (;i < (unsigned int)(vec->count / 2); i++) {
		const void *item = vector_get(vec, i);
		const unsigned int offset = vec->count - i - 1;
		if (!memcpy(buf, vector_get(vec, offset), item_size))
			return 0;

		if (!memcpy(nth(offset), item, item_size))
			return 0;

		if (!memcpy(nth(i), buf, item_size))
			return 0;
	}
	free(buf);

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x612f
movl $0x0, -0x4(%rbp)
jmp 0x626c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1190
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6161
movl $0x0, -0x4(%rbp)
jmp 0x626c
jmp 0x6163
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shrq %rcx
cmpl %ecx, %eax
jae 0x625c
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x60b0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x60b0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0x1180
movq -0x40(%rbp), %rax
cmpq $0x0, %rax
jne 0x61d8
movl $0x0, -0x4(%rbp)
jmp 0x626c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
imulq (%rcx), %rax
addq %rax, %rdi
movq %rdi, -0x48(%rbp)
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1180
movq -0x48(%rbp), %rax
cmpq $0x0, %rax
jne 0x6212
movl $0x0, -0x4(%rbp)
jmp 0x626c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
imulq (%rcx), %rax
addq %rax, %rdi
movq %rdi, -0x50(%rbp)
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1180
movq -0x50(%rbp), %rax
cmpq $0x0, %rax
jne 0x624c
movl $0x0, -0x4(%rbp)
jmp 0x626c
jmp 0x624e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6163
movq -0x28(%rbp), %rdi
callq 0x1030
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/vector.c
// Function: vector_free
void vector_free(vector *vec) {
	if (vec == NULL)
		return;
	free(vec->items);
	free(vec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x6295
jmp 0x62ab
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: bsOpenReadStream
static BitStream* bsOpenReadStream ( FILE* stream )
{
   BitStream *bs = malloc ( sizeof(BitStream) );
   if (bs == NULL) mallocFail ( sizeof(BitStream) );
   bs->handle = stream;
   bs->buffer = 0;
   bs->buffLive = 0;
   bs->mode = 'r';
   return bs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x18, %edi
callq 0x10b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1adb
movl $0x18, %edi
callq 0x1f60
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movb $0x72, 0x10(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: bsGetBit
static Int32 bsGetBit ( BitStream* bs )
{
   if (bs->buffLive > 0) {
      bs->buffLive --;
      return ( ((bs->buffer) >> (bs->buffLive)) & 0x1 );
   } else {
      Int32 retVal = getc ( bs->handle );
      if ( retVal == EOF ) {
         if (errno != 0) readError();
         return 2;
      }
      bs->buffLive = 7;
      bs->buffer = retVal;
      return ( ((bs->buffer) >> 7) & 0x1 );
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x1b4b
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
sarl %cl, %eax
andl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b9d
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1120
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x1b78
callq 0x1040
cmpl $0x0, (%rax)
je 0x1b6f
callq 0x1fc0
movl $0x2, -0x4(%rbp)
jmp 0x1b9d
movq -0x10(%rbp), %rax
movl $0x7, 0xc(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
sarl $0x7, %eax
andl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: tooManyBlocks
static void tooManyBlocks ( Int32 max_handled_blocks )
{
   fprintf ( stderr,
             "%s: `%s' appears to contain more than %d blocks\n",
            progName, inFileName, max_handled_blocks );
   fprintf ( stderr,
             "%s: and cannot be handled.  To fix, increase\n",
             progName );
   fprintf ( stderr, 
             "%s: BZ_MAX_HANDLED_BLOCKS in bzip2recover.c, and recompile.\n",
             progName );
   exit ( 1 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq 0x3436(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movl -0x4(%rbp), %r8d
leaq 0x16e1(%rip), %rsi      # 0x32b1
leaq 0x34f9(%rip), %rdx      # 0x50d0
leaq 0x4492(%rip), %rcx      # 0x6070
movb $0x0, %al
callq 0x10a0
movq 0x340c(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x16ec(%rip), %rsi      # 0x32e2
leaq 0x34d3(%rip), %rdx      # 0x50d0
movb $0x0, %al
callq 0x10a0
movq 0x33ed(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x16fb(%rip), %rsi      # 0x3310
leaq 0x34b4(%rip), %rdx      # 0x50d0
movb $0x0, %al
callq 0x10a0
movl $0x1, %edi
callq 0x1110
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: bsClose
static void bsClose ( BitStream* bs )
{
   Int32 retVal;

   if ( bs->mode == 'w' ) {
      while ( bs->buffLive < 8 ) {
         bs->buffLive++;
         bs->buffer <<= 1;
      };
      retVal = putc ( (UChar) (bs->buffer), bs->handle );
      if (retVal == EOF) writeError();
      bytesOut++;
      retVal = fflush ( bs->handle );
      if (retVal == EOF) writeError();
   }
   retVal = fclose ( bs->handle );
   if (retVal == EOF) {
      if (bs->mode == 'w') writeError(); else readError();
   }
   free ( bs );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x10(%rax), %eax
cmpl $0x77, %eax
jne 0x1cc2
jmp 0x1c4b
movq -0x8(%rbp), %rax
cmpl $0x8, 0xc(%rax)
jge 0x1c70
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movl %ecx, 0x8(%rax)
jmp 0x1c4b
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movzbl %al, %edi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
callq 0x1090
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
jne 0x1c94
callq 0x2020
movq 0x3425(%rip), %rax      # 0x50c0
addq $0x1, %rax
movq %rax, 0x341a(%rip)      # 0x50c0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x10c0
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
jne 0x1cc0
callq 0x2020
jmp 0x1cc2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1060
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
jne 0x1cf2
movq -0x8(%rbp), %rax
movsbl 0x10(%rax), %eax
cmpl $0x77, %eax
jne 0x1ceb
callq 0x2020
jmp 0x1cf0
callq 0x1fc0
jmp 0x1cf2
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: bsPutBit
static void bsPutBit ( BitStream* bs, Int32 bit )
{
   if (bs->buffLive == 8) {
      Int32 retVal = putc ( (UChar) bs->buffer, bs->handle );
      if (retVal == EOF) writeError();
      bytesOut++;
      bs->buffLive = 1;
      bs->buffer = bit & 0x1;
   } else {
      bs->buffer = ( (bs->buffer << 1) | (bit & 0x1) );
      bs->buffLive++;
   };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x8, 0xc(%rax)
jne 0x1d79
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movzbl %al, %edi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
callq 0x1090
movl %eax, -0x10(%rbp)
cmpl $-0x1, -0x10(%rbp)
jne 0x1d4d
callq 0x2020
movq 0x336c(%rip), %rax      # 0x50c0
addq $0x1, %rax
movq %rax, 0x3361(%rip)      # 0x50c0
movq -0x8(%rbp), %rax
movl $0x1, 0xc(%rax)
movl -0xc(%rbp), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x1d9e
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movl -0xc(%rbp), %eax
andl $0x1, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: endsInBz2
static Bool endsInBz2 ( Char* name )
{
   Int32 n = strlen ( name );
   if (n <= 4) return False;
   return
      (name[n-4] == '.' &&
       name[n-3] == 'b' &&
       name[n-2] == 'z' &&
       name[n-1] == '2');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1070
movl %eax, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jg 0x1e74
movb $0x0, -0x1(%rbp)
jmp 0x1eea
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x4, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x2e, %ecx
movb %al, -0x15(%rbp)
jne 0x1edf
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x3, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x62, %ecx
movb %al, -0x15(%rbp)
jne 0x1edf
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x7a, %ecx
movb %al, -0x15(%rbp)
jne 0x1edf
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x32, %eax
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: bsOpenWriteStream
static BitStream* bsOpenWriteStream ( FILE* stream )
{
   BitStream *bs = malloc ( sizeof(BitStream) );
   if (bs == NULL) mallocFail ( sizeof(BitStream) );
   bs->handle = stream;
   bs->buffer = 0;
   bs->buffLive = 0;
   bs->mode = 'w';
   return bs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x18, %edi
callq 0x10b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1f2b
movl $0x18, %edi
callq 0x1f60
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movb $0x77, 0x10(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: mallocFail
static void mallocFail ( Int32 n )
{
   fprintf ( stderr,
             "%s: malloc failed on request for %d bytes.\n",
            progName, n );
   fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n",
             progName );
   exit ( 1 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq 0x3086(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movl -0x4(%rbp), %ecx
leaq 0x12a0(%rip), %rsi      # 0x321f
leaq 0x314a(%rip), %rdx      # 0x50d0
movb $0x0, %al
callq 0x10a0
movq 0x3064(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x12ad(%rip), %rsi      # 0x324b
leaq 0x312b(%rip), %rdx      # 0x50d0
movb $0x0, %al
callq 0x10a0
movl $0x1, %edi
callq 0x1110
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coapp-packages[P]bzip2/bzip2recover.c
// Function: readError
static void readError ( void )
{
   fprintf ( stderr,
             "%s: I/O error reading `%s', possible reason follows.\n",
            progName, inFileName );
   perror ( progName );
   fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n",
             progName );
   exit ( 1 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x302d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x12a6(%rip), %rsi      # 0x327b
leaq 0x30f4(%rip), %rdx      # 0x50d0
leaq 0x408d(%rip), %rcx      # 0x6070
movb $0x0, %al
callq 0x10a0
leaq 0x30df(%rip), %rdi      # 0x50d0
callq 0x10e0
movq 0x2ffb(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1244(%rip), %rsi      # 0x324b
leaq 0x30c2(%rip), %rdx      # 0x50d0
movb $0x0, %al
callq 0x10a0
movl $0x1, %edi
callq 0x1110
nop
// File: /workspace/github_c_makefile_star2_O0/rsa9000[P]regfanalysistools/regfwalk.c
// Function: regf_scan_data
static int regf_scan_data(const void *data, unsigned data_sz)
{
	const struct regf_hbin *hbin;
	const struct regf_cell *rc;
	struct cell *cell;
	unsigned hoff, cell_sz;

	for (hbin = data, hoff = 0;
	     hoff < data_sz;
	     hoff += hbin->sz, hbin = (void *)hbin + hbin->sz) {
		if (strncmp(hbin->sign, "hbin", 4) != 0) {
			fprintf(stderr, "hbin signature missed at 0x%08X\n",
				(unsigned)((void *)hbin - (void *)data));
			return -1;
		}

		for (rc = (void *)hbin->data;
		     (void *)rc < (void *)hbin + hbin->sz;
		     rc = (void *)rc + cell_sz) {
			cell_sz = rc->sz > 0 ? rc->sz : -rc->sz;
			cell = cache_cell_alloc((void *)rc - (void *)data, cell_sz);
			if (rc->sz > 0)
				cell->type = CT_FREE;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x1962
movq -0x20(%rbp), %rdi
leaq 0x4a95(%rip), %rsi      # 0x630a
movl $0x4, %edx
callq 0x1040
cmpl $0x0, %eax
je 0x18b5
movq 0x776d(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, %edx
leaq 0x4a6d(%rip), %rsi      # 0x630f
movb $0x0, %al
callq 0x10e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1969
movq -0x20(%rbp), %rax
addq $0x24, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rdx
movl 0x8(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x193c
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x18ec
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x18f7
movq -0x28(%rbp), %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, %edi
movl -0x38(%rbp), %esi
callq 0x1bb0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x192a
movq -0x30(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0x192c
movq -0x28(%rbp), %rax
movl -0x38(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x18c1
jmp 0x193e
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x185e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rsa9000[P]regfanalysistools/regfwalk.c
// Function: regf_parse_root
static int regf_parse_root(void)
{
	struct cell *cell;

	cell = cache_cell_find(st.root_off);
	if (!cell) {
		PR_ERR(st.root_off, "root", "could not find root key cell\n",
		       st.root_off);
		return -1;
	}
	cache_cell_updref(cell, CT_NK);

	return regf_parse_nk("", st.root_off);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0x777e(%rip), %edi      # 0x910c
callq 0x1c10
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x19c8
movl 0x7768(%rip), %esi      # 0x910c
movl 0x7762(%rip), %ecx      # 0x910c
leaq 0x497f(%rip), %rdi      # 0x6330
leaq 0x47bd(%rip), %rdx      # 0x6175
movb $0x0, %al
callq 0x4c10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x19eb
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x1c70
movl 0x7730(%rip), %esi      # 0x910c
leaq 0x48e1(%rip), %rdi      # 0x62c4
callq 0x1ca0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rsa9000[P]regfanalysistools/regfwalk.c
// Function: cache_cell_alloc
static struct cell *cache_cell_alloc(unsigned off, unsigned len)
{
	struct cell *c = calloc(1, sizeof(*c));

	c->tree.key = off;
	c->len = len;

	rbtree_insert(&st.cells, &c->tree);

	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x10d0
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rsi
leaq 0x7500(%rip), %rdi      # 0x90f0
addq $0x28, %rdi
callq 0x4060
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)