LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/sha256.c
// Function: sha256_final
void
sha256_final(struct sha256_ctx *md, uint8_t *out) {
  unsigned i;

  if (md->curlen >= sizeof(md->buf)) return;

  /* increase the length of the message */
  md->length += md->curlen * 8;

  /* append the '1' bit */
  md->buf[md->curlen++] = (uint8_t)0x80;

  /* if the length is currently above 56 bytes we append zeros
   * then compress.  Then we can fall back to padding zeros and length
   * encoding like normal.
   */
  if (md->curlen > 56) {
    while (md->curlen < 64) {
      md->buf[md->curlen++] = (uint8_t)0;
    }
    sha256_transform(md->state, md->buf);
    md->curlen = 0;
  }

  /* pad upto 56 bytes of zeroes */
  while (md->curlen < 56) {
    md->buf[md->curlen++] = (uint8_t)0;
  }

  /* store length */
  put64_msb(md->length, md->buf + 56);
  sha256_transform(md->state, md->buf);

  /* copy output */
  for (i = 0; i < 8; i += 2) {
    put32_msb(md->state[i], out + (4 * i));
    put32_msb(md->state[i + 1], out + (4 * (i + 1)));
  }
}

// Assembly:
movl 0x28(%rdi), %eax
cmpq $0x3f, %rax
ja 0x5b02
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rax,8), %rcx
addq %rcx, (%rdi)
leaq 0x2c(%rdi), %r15
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%rdi)
movb $-0x80, 0x2c(%rdi,%rax)
cmpl $0x38, %eax
jb 0x5a89
movl 0x28(%r14), %eax
cmpq $0x3f, %rax
ja 0x5a75
leaq (%r14,%rax), %rdi
addq $0x2c, %rdi
movl $0x40, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x1080
movl $0x40, 0x28(%r14)
leaq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x3e46
movl $0x0, 0x28(%r14)
movl 0x28(%r14), %eax
cmpq $0x37, %rax
ja 0x5ab4
leaq (%r14,%rax), %rdi
addq $0x2c, %rdi
movl $0x37, %edx
subl %eax, %edx
incq %rdx
xorl %esi, %esi
callq 0x1080
movl $0x38, 0x28(%r14)
movq (%r14), %rax
movq %rax, %rcx
shrq $0x20, %rcx
bswapl %eax
bswapl %ecx
movl %ecx, 0x64(%r14)
movl %eax, 0x68(%r14)
leaq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x3e46
movq $-0x2, %rax
movl 0x10(%r14,%rax,4), %ecx
bswapl %ecx
movl %ecx, 0x8(%rbx,%rax,4)
movl 0x14(%r14,%rax,4), %ecx
bswapl %ecx
movl %ecx, 0xc(%rbx,%rax,4)
addq $0x2, %rax
cmpq $0x6, %rax
jb 0x5add
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/base32.c
// Function: base32_decode
int
base32_decode(uint8_t *output, const char *in, unsigned inlen) {
  unsigned i = 0, j = 0;
  unsigned v = 0, bits = 0;

  while (j < inlen) {
    if (in[j] & 0x80)
      goto PROTO;
    const uint8_t b = kValues[(int) in[j++]];
    if (b > 31)
      goto PROTO;

    v |= ((unsigned) b) << bits;
    bits += 5;

    if (bits >= 8) {
      output[i++] = v;
      bits -= 8;
      v >>= 8;
    }
  }

  return 1;

 PROTO:
  errno = EPROTO;
  return 0;
}

// Assembly:
pushq %rbx
xorl %eax, %eax
leaq 0x170b(%rip), %r8       # 0x7220
xorl %r9d, %r9d
xorl %ebx, %ebx
xorl %ecx, %ecx
cmpl %r9d, %edx
je 0x5b7b
movl %r9d, %r10d
movsbq (%rsi,%r10), %r10
testq %r10, %r10
js 0x5b6c
movzbl (%r10,%r8), %r10d
cmpl $0x1f, %r10d
ja 0x5b58
movl %r10d, %r11d
shll %cl, %r11d
orl %ebx, %r11d
cmpl $0x3, %ecx
jb 0x5b5d
movl %eax, %ebx
incl %eax
movb %r11b, (%rdi,%rbx)
addl $-0x3, %ecx
shrl $0x8, %r11d
jmp 0x5b60
movl %ebx, %r11d
jmp 0x5b60
addl $0x5, %ecx
incl %r9d
movl %r11d, %ebx
cmpb $0x20, %r10b
jb 0x5b1c
callq 0x1050
movl $0x47, (%rax)
xorl %eax, %eax
jmp 0x5b80
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/base32.c
// Function: base32_encode
void
base32_encode(char *output, const uint8_t *in, unsigned inlen) {
  unsigned i = 0, j = 0;
  unsigned v = 0, bits = 0;
  static const char kChars[] = "0123456789bcdfghjklmnpqrstuvwxyz";

  while (j < inlen) {
    v |= ((unsigned) in[j++]) << bits;
    bits += 8;

    while (bits >= 5) {
      output[i++] = kChars[v & 31];
      bits -= 5;
      v >>= 5;
    }
  }

  if (bits)
    output[i++] = kChars[v];
}

// Assembly:
xorl %ecx, %ecx
testl %edx, %edx
je 0x5bf2
pushq %rbx
movl %edx, %eax
leaq 0x16f9(%rip), %r9       # 0x72a0
xorl %r10d, %r10d
xorl %r8d, %r8d
xorl %edx, %edx
movzbl (%rsi,%r10), %r11d
shll %cl, %r11d
orl %r11d, %r8d
orl $0x8, %ecx
movl %r8d, %r11d
andl $0x1f, %r11d
movb (%r11,%r9), %r11b
movl %edx, %ebx
incl %edx
movb %r11b, (%rdi,%rbx)
addl $-0x5, %ecx
shrl $0x5, %r8d
cmpl $0x4, %ecx
ja 0x5bbd
incq %r10
cmpq %rax, %r10
jne 0x5baf
testl %ecx, %ecx
sete %sil
movl %r8d, %eax
movl %edx, %ecx
popq %rbx
jmp 0x5bf7
movb $0x1, %sil
xorl %eax, %eax
testb %sil, %sil
jne 0x5c09
leaq 0x169d(%rip), %rdx      # 0x72a0
movb (%rax,%rdx), %al
movb %al, (%rdi,%rcx)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/9-File/simple_ls.c
// Function: main
int main(int argc, char **argv)
{
	DIR *dir;
	char *input = ".";
	struct dirent *entry;

	if(argc > 1)
		input = argv[1];

	if( (dir = opendir(input)) == NULL )
	{
		perror("opendir()");
		exit(1);
	}

	while( (entry = readdir(dir)) != NULL )
		printf("%ld\t\t%s\n",
			(long) entry->d_ino,
			entry->d_name);

	closedir(dir);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jl 0x11bb
movq 0x8(%rsi), %rdi
jmp 0x11c2
leaq 0xe42(%rip), %rdi       # 0x2004
callq 0x1030
testq %rax, %rax
je 0x1216
movq %rax, %rbx
movq %rax, %rdi
callq 0x1060
testq %rax, %rax
je 0x1204
leaq 0xe2d(%rip), %r14       # 0x2010
movq (%rax), %rsi
addq $0x13, %rax
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1040
movq %rbx, %rdi
callq 0x1060
testq %rax, %rax
jne 0x11e3
movq %rbx, %rdi
callq 0x1050
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/lseek2.c
// Function: testcase_prepare
void testcase_prepare(unsigned long nr_tasks, unsigned long nr)
{
	char buf[BUFLEN];
	int fd = mkstemp(tmpfile);

	memset(buf, 0, sizeof(buf));
	assert(fd >= 0);
	assert(write(fd, buf, sizeof(buf)) == sizeof(buf));
	close(fd);
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
leaq 0x2585(%rip), %rdi      # 0x5190
callq 0x21e0
movl %eax, %ebx
movq %rsp, %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x2140
testl %ebx, %ebx
js 0x2c4b
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebx, %edi
callq 0x20d0
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x2c6a
movl %ebx, %edi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
jmp 0x2150
leaq 0x626(%rip), %rdi       # 0x3278
leaq 0x627(%rip), %rsi       # 0x3280
leaq 0x62f(%rip), %rcx       # 0x328f
movl $0x13, %edx
callq 0x2130
leaq 0x652(%rip), %rdi       # 0x32c3
leaq 0x608(%rip), %rsi       # 0x3280
leaq 0x610(%rip), %rcx       # 0x328f
movl $0x14, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/lseek2.c
// Function: testcase
void testcase(unsigned long long *iterations)
{
	int fd = open(tmpfile, O_RDWR);

	assert(fd >= 0);

	while (1) {
		lseek(fd, 0, SEEK_SET);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x24fa(%rip), %rdi      # 0x5190
movl $0x2, %esi
xorl %eax, %eax
callq 0x2220
testl %eax, %eax
js 0x2cb8
movl %eax, %ebp
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2120
incq (%rbx)
jmp 0x2ca8
leaq 0x5b9(%rip), %rdi       # 0x3278
leaq 0x5ba(%rip), %rsi       # 0x3280
leaq 0x621(%rip), %rcx       # 0x32ee
movl $0x1c, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_unless
int test_unless() {
	size_t new_size = 0;
	const char document[] = 
		"xXx UNLESS @dne xXx\n"
		"<p>You should see this. 1/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS NOT @dne xXx\n"
		"<p>You should not see this. 1/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS @falsey xXx\n"
		"<p>You should see this. 2/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS NOT @falsey xXx\n"
		"<p>You should not see this. 2/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS @truthy xXx\n"
		"<p>You should not see this. 3/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS NOT @truthy xXx\n"
		"<p>You should see this. 3/3</p>\n"
		"xXx ENDLESS xXx\n";

	const char document_correct[] = "\n<p>You should see this. 1/3</p>\n"
		"\n<p>You should see this. 2/3</p>\n"
		"\n<p>You should see this. 3/3</p>\n";

	greshunkel_ctext *ctext = gshkl_init_context();
	gshkl_add_string(ctext, "truthy", "TRUE");
	gshkl_add_string(ctext, "falsey", "FALSE");
	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, document_correct);
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0x3ea4(%rip), %rsi      # 0x51e0
leaq 0x10(%rsp), %r14
movl $0x1bd, %edx            # imm = 0x1BD
movq %r14, %rdi
callq 0x1190
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
leaq 0x3cac(%rip), %rsi      # 0x500b
leaq 0x3cac(%rip), %rdx      # 0x5012
movq %rax, %rdi
callq 0x1f63
leaq 0x3ca2(%rip), %rsi      # 0x5017
leaq 0x3ca2(%rip), %rdx      # 0x501e
movq %r15, %rdi
callq 0x1f63
movl $0x1bc, %edx            # imm = 0x1BC
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24d1
movq %rax, %rbx
movq %r15, %rdi
callq 0x246c
leaq 0x3ff7(%rip), %rsi      # 0x53a0
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_template_include
int test_template_include() {
	size_t new_size = 0;
	const char document[] = "xXx SCREAM _include.html xXx";
	const char document_correct[] = 
"<p>This is a test include file with it's own context and strings and stuff.</p>\n"
"\n"
"    <li>This is a test. a</li>\n"
"    <li>This is a test. b</li>\n"
"    <li>This is a test. c</li>\n"
"    <li>This is a test. 1</li>\n"
"    <li>This is a test. 2</li>\n"
"    <li>This is a test. 3</li>";

	greshunkel_ctext *ctext = gshkl_init_context();
	gshkl_add_string(ctext, "TEST", "This is a test.");
	greshunkel_var loop_test = gshkl_add_array(ctext, "LOOP_TEST");

	gshkl_add_string_to_loop(&loop_test, "a");
	gshkl_add_string_to_loop(&loop_test, "b");
	gshkl_add_string_to_loop(&loop_test, "c");

	gshkl_add_int_to_loop(&loop_test, 1);
	gshkl_add_int_to_loop(&loop_test, 2);
	gshkl_add_int_to_loop(&loop_test, 3);

	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, document_correct);
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movups 0x402a(%rip), %xmm0     # 0x541d
leaq 0x10(%rsp), %r14
movups %xmm0, 0xd(%r14)
movaps 0x400c(%rip), %xmm0     # 0x5410
movaps %xmm0, (%r14)
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
leaq 0x3c83(%rip), %rsi      # 0x509c
leaq 0x3c04(%rip), %rdx      # 0x5024
movq %rax, %rdi
callq 0x1f63
leaq 0x3c68(%rip), %rdx      # 0x5097
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x217d
leaq 0x3bee(%rip), %rsi      # 0x5034
movq %r12, %rdi
callq 0x23a2
leaq 0x3c3c(%rip), %rsi      # 0x5091
movq %r12, %rdi
callq 0x23a2
leaq 0x4de9(%rip), %rsi      # 0x624d
movq %r12, %rdi
callq 0x23a2
movq %r12, %rdi
movl $0x1, %esi
callq 0x2248
movq %r12, %rdi
movl $0x2, %esi
callq 0x2248
movq %r12, %rdi
movl $0x3, %esi
callq 0x2248
movl $0x1c, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24d1
movq %rax, %rbx
movq %r15, %rdi
callq 0x246c
leaq 0x3f78(%rip), %rsi      # 0x5430
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_filters
int test_filters() {
	size_t new_size = 0;
	const char document[] = "<li>XxX return_z xXx @ONE xXx XxX XxX return_z XxX</li>";

	greshunkel_ctext *ctext = gshkl_init_context();
	gshkl_add_int(ctext, "ONE", 1);
	gshkl_add_filter(ctext, "return_z", &return_z, NULL);

	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, "<li>z z</li>");
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movaps 0x4061(%rip), %xmm0     # 0x5560
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x20(%r14)
movaps 0x4040(%rip), %xmm0     # 0x5550
movaps %xmm0, 0x10(%r14)
movaps 0x4024(%rip), %xmm0     # 0x5540
movaps %xmm0, (%r14)
movabsq $0x3e696c2f3c5878, %rax # imm = 0x3E696C2F3C5878
movq %rax, 0x30(%r14)
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
leaq 0x3af7(%rip), %rsi      # 0x5036
movq %rax, %rdi
movl $0x1, %edx
callq 0x2086
leaq 0x3ae7(%rip), %rsi      # 0x503a
leaq -0x24e(%rip), %rdx      # 0x130c
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x1ef6
movl $0x37, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24d1
movq %rax, %rbx
movq %r15, %rdi
callq 0x246c
leaq 0x3aba(%rip), %rsi      # 0x5043
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_variable_interpolation
int test_variable_interpolation() {
	const char templ_a[] = "xXx @image xXx";
	const char templ_b[] = "xXx @image_date xXx";

	greshunkel_ctext *ctext = gshkl_init_context();
	gshkl_add_string(ctext, "image", "test");
	gshkl_add_string(ctext, "image_date", "definitely_not_test");

	size_t a_siz = 0, b_siz = 0;
	char *a_rendered = gshkl_render(ctext, templ_a, strlen(templ_a), &a_siz);
	char *b_rendered = gshkl_render(ctext, templ_b, strlen(templ_b), &b_siz);
	gshkl_free_context(ctext);

	int ret = strcmp(a_rendered, b_rendered);
	if (!ret) {
		free(a_rendered);
		free(b_rendered);
		return 1;
	}

	free(a_rendered);
	free(b_rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movabsq $0x78587820656761, %rax # imm = 0x78587820656761
leaq 0x10(%rsp), %r15
movq %rax, 0x7(%r15)
movabsq $0x616d694020785878, %rax # imm = 0x616D694020785878
movq %rax, (%r15)
movaps 0x489d(%rip), %xmm0     # 0x6120
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movl $0x785878, 0x10(%rbx)   # imm = 0x785878
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x1d48
movq %rax, %r14
leaq 0x3829(%rip), %rsi      # 0x50cf
leaq 0x3902(%rip), %rdx      # 0x51af
movq %rax, %rdi
callq 0x1f63
leaq 0x3819(%rip), %rsi      # 0x50d5
leaq 0x381d(%rip), %rdx      # 0x50e0
movq %r14, %rdi
callq 0x1f63
leaq 0x8(%rsp), %rcx
movq %r13, (%rcx)
movq %rsp, %r12
movq %r13, (%r12)
movl $0xe, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x24d1
movq %rax, %r15
movl $0x13, %edx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x24d1
movq %rax, %rbx
movq %r14, %rdi
callq 0x246c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
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/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_subcontext_interpolation
int test_subcontext_interpolation() {
	size_t new_size = 0;
	const char document[] = 
		"xXx @image.name xXx\n"
		"xXx @image.id xXx";
	const char document_correct[] = "test_name\n1";

	greshunkel_ctext *ctext = gshkl_init_context();
	greshunkel_ctext *sub = gshkl_init_context();
	gshkl_add_string(sub, "name", "test_name");
	gshkl_add_int(sub, "id", 1);
	gshkl_add_sub_context(ctext, "image", sub);

	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, document_correct);
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movaps 0x47f2(%rip), %xmm0     # 0x6150
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps 0x47d1(%rip), %xmm0     # 0x6140
movaps %xmm0, (%r14)
movabsq $0x7858782064692e, %rax # imm = 0x7858782064692E
movq %rax, 0x1e(%r14)
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
xorl %eax, %eax
callq 0x1d48
movq %rax, %r12
leaq 0x36dc(%rip), %rsi      # 0x5078
leaq 0x36d0(%rip), %rdx      # 0x5073
movq %rax, %rdi
callq 0x1f63
leaq 0x374e(%rip), %rsi      # 0x5100
movq %r12, %rdi
movl $0x1, %edx
callq 0x2086
leaq 0x3709(%rip), %rsi      # 0x50cf
movq %r15, %rdi
movq %r12, %rdx
callq 0x1df6
movl $0x25, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24d1
movq %rax, %rbx
movq %r15, %rdi
callq 0x246c
leaq 0x36fe(%rip), %rsi      # 0x50f4
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_loop_in_unless
int test_loop_in_unless() {
	size_t new_size = 0;
	const char document[] =
		"xXx UNLESS NOT @errors xXx\n"
		"    xXx LOOP error errors xXx\n"
		"        xXx @error xXx\n"
		"    xXx BBL xXx\n"
		"xXx ENDLESS xXx\n";
	const char document_correct[] = "\n        1\n    \n        2\n    \n        3\n    \n";

	greshunkel_ctext *ctext = gshkl_init_context();
	greshunkel_var loop = gshkl_add_array(ctext, "errors");
	gshkl_add_string_to_loop(&loop, "1");
	gshkl_add_string_to_loop(&loop, "2");
	gshkl_add_string_to_loop(&loop, "3");

	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, document_correct);
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x290, %rsp            # imm = 0x290
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0x4731(%rip), %rsi      # 0x6170
leaq 0x10(%rsp), %r14
movl $0xe, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movb $0x0, 0x70(%r14)
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
leaq 0x369e(%rip), %rdx      # 0x5103
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x217d
leaq 0x367f(%rip), %rsi      # 0x50fe
movq %r12, %rdi
callq 0x23a2
leaq 0x367c(%rip), %rsi      # 0x510a
movq %r12, %rdi
callq 0x23a2
leaq 0x366f(%rip), %rsi      # 0x510c
movq %r12, %rdi
callq 0x23a2
movl $0x70, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24d1
movq %rax, %rbx
movq %r15, %rdi
callq 0x246c
leaq 0x4726(%rip), %rsi      # 0x61f0
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x290, %rsp            # imm = 0x290
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_init_context
greshunkel_ctext *gshkl_init_context() {
	greshunkel_ctext *ctext = calloc(1, sizeof(struct greshunkel_ctext));
	assert(ctext != NULL);
	ctext->values = vector_new(sizeof(struct greshunkel_tuple), 32);
	assert(ctext->values != NULL);
	ctext->filter_functions = vector_new(sizeof(struct greshunkel_filter), 8);
	assert(ctext->filter_functions != NULL);
	return ctext;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x1160
testq %rax, %rax
je 0x1d94
movq %rax, %rbx
movl $0x230, %edi            # imm = 0x230
movl $0x20, %esi
callq 0x4a60
movq %rax, (%rbx)
testq %rax, %rax
je 0x1db3
movl $0x30, %edi
movl $0x8, %esi
callq 0x4a60
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x1dd2
movq %rbx, %rax
popq %rbx
retq
leaq 0x4495(%rip), %rdi      # 0x6230
leaq 0x449c(%rip), %rsi      # 0x623e
leaq 0x44a6(%rip), %rcx      # 0x624f
movl $0x33, %edx
callq 0x1110
leaq 0x44bc(%rip), %rdi      # 0x6276
leaq 0x447d(%rip), %rsi      # 0x623e
leaq 0x4487(%rip), %rcx      # 0x624f
movl $0x35, %edx
callq 0x1110
leaq 0x44b3(%rip), %rdi      # 0x628c
leaq 0x445e(%rip), %rsi      # 0x623e
leaq 0x4468(%rip), %rcx      # 0x624f
movl $0x37, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
testq %rdi, %rdi
je 0x1e99
movq %rdx, %r12
testq %rdx, %rdx
je 0x1eb8
movq %rsi, %r14
testq %rsi, %rsi
je 0x1ed7
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movl $0x230, %edx            # imm = 0x230
movq %r15, %rdi
xorl %esi, %esi
callq 0x1120
movl $0x2, 0x20(%r15)
movq %r12, 0x28(%r15)
movl $0x20, %r12d
movl $0x20, %esi
movq %r14, %rdi
callq 0x1130
cmpq $0x20, %rax
cmovbq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1050
movq (%rbx), %rdi
movl $0x230, %edx            # imm = 0x230
movq %r15, %rsi
callq 0x4aa7
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x440c(%rip), %rdi      # 0x62ac
leaq 0x4397(%rip), %rsi      # 0x623e
leaq 0x440d(%rip), %rcx      # 0x62bb
movl $0x51, %edx
callq 0x1110
leaq 0x4457(%rip), %rdi      # 0x6316
leaq 0x4378(%rip), %rsi      # 0x623e
leaq 0x43ee(%rip), %rcx      # 0x62bb
movl $0x52, %edx
callq 0x1110
leaq 0x4875(%rip), %rdi      # 0x6753
leaq 0x4359(%rip), %rsi      # 0x623e
leaq 0x43cf(%rip), %rcx      # 0x62bb
movl $0x53, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x38, %rsp
testq %rsi, %rsi
je 0x1f44
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %rdx, 0x20(%r14)
movq %rcx, 0x28(%r14)
movl $0x1f, %edx
movq %r14, %rdi
callq 0x1050
movq 0x8(%rbx), %rdi
movl $0x30, %edx
movq %r14, %rsi
callq 0x4aa7
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x4808(%rip), %rdi      # 0x6753
leaq 0x42ec(%rip), %rsi      # 0x623e
leaq 0x43cb(%rip), %rcx      # 0x6324
movl $0x68, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
testq %rdi, %rdi
je 0x2029
movq %rsi, %r12
testq %rsi, %rsi
je 0x2048
movq %rdx, %r15
testq %rdx, %rdx
je 0x2067
movq %rdi, %rbx
movq %rsp, %r14
movl $0x230, %edx            # imm = 0x230
movq %r14, %rdi
xorl %esi, %esi
callq 0x1120
movl $0x1, 0x20(%r14)
movl $0x1f, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1050
leaq 0x230(%rsp), %r12
movl $0x208, %edx            # imm = 0x208
movq %r12, %rdi
xorl %esi, %esi
callq 0x1120
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
movq %r15, %rsi
callq 0x1050
movb $0x0, 0x200(%r12)
leaq 0x28(%rsp), %rdi
movl $0x208, %edx            # imm = 0x208
movq %r12, %rsi
callq 0x1190
movq (%rbx), %rdi
movl $0x230, %edx            # imm = 0x230
movq %r14, %rsi
callq 0x4aa7
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4200(%rip), %rdi      # 0x6230
leaq 0x4207(%rip), %rsi      # 0x623e
leaq 0x434d(%rip), %rcx      # 0x638b
movl $0x76, %edx
callq 0x1110
leaq 0x4704(%rip), %rdi      # 0x6753
leaq 0x41e8(%rip), %rsi      # 0x623e
leaq 0x432e(%rip), %rcx      # 0x638b
movl $0x77, %edx
callq 0x1110
leaq 0x436c(%rip), %rdi      # 0x63da
leaq 0x41c9(%rip), %rsi      # 0x623e
leaq 0x430f(%rip), %rcx      # 0x638b
movl $0x78, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
testq %rdi, %rdi
je 0x213f
movq %rsi, %r15
testq %rsi, %rsi
je 0x215e
movl %edx, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movl $0x230, %edx            # imm = 0x230
movq %r14, %rdi
xorl %esi, %esi
callq 0x1120
movl $0x1, 0x20(%r14)
movl $0x1f, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1050
leaq 0x230(%rsp), %r15
movl $0x208, %edx            # imm = 0x208
movq %r15, %rdi
xorl %esi, %esi
callq 0x1120
leaq 0x4866(%rip), %rdx      # 0x695b
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10f0
leaq 0x28(%rsp), %rdi
movl $0x208, %edx            # imm = 0x208
movq %r15, %rsi
callq 0x1190
movq (%rbx), %rdi
movl $0x230, %edx            # imm = 0x230
movq %r14, %rsi
callq 0x4aa7
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x40ea(%rip), %rdi      # 0x6230
leaq 0x40f1(%rip), %rsi      # 0x623e
leaq 0x4294(%rip), %rcx      # 0x63e8
movl $0x90, %edx
callq 0x1110
leaq 0x45ee(%rip), %rdi      # 0x6753
leaq 0x40d2(%rip), %rsi      # 0x623e
leaq 0x4275(%rip), %rcx      # 0x63e8
movl $0x91, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
testq %rsi, %rsi
je 0x2229
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
leaq 0x8(%rsp), %r13
movl $0x230, %edx            # imm = 0x230
movq %r13, %rdi
xorl %esi, %esi
callq 0x1120
movl $0x230, %edi            # imm = 0x230
movl $0x10, %esi
callq 0x4a60
movq %rax, 0x28(%r13)
movl $0x20, %ebp
movl $0x20, %esi
movq %r12, %rdi
callq 0x1130
cmpq $0x20, %rax
cmovbq %rax, %rbp
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1050
movq (%r15), %rdi
movl $0x230, %edx            # imm = 0x230
movq %r13, %rsi
callq 0x4aa7
movl $0x208, %edx            # imm = 0x208
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1190
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4000(%rip), %rdi      # 0x6230
leaq 0x4007(%rip), %rsi      # 0x623e
leaq 0x41ee(%rip), %rcx      # 0x642c
movl $0xa3, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
testq %rdi, %rdi
je 0x22e5
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movl $0x230, %edx            # imm = 0x230
movq %r14, %rdi
xorl %esi, %esi
callq 0x1120
movl $0x1, 0x20(%r14)
leaq 0x230(%rsp), %r15
movl $0x208, %edx            # imm = 0x208
movq %r15, %rdi
xorl %esi, %esi
callq 0x1120
leaq 0x46c0(%rip), %rdx      # 0x695b
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10f0
leaq 0x28(%rsp), %rdi
movl $0x208, %edx            # imm = 0x208
movq %r15, %rsi
callq 0x1190
movq (%rbx), %rdi
movl $0x230, %edx            # imm = 0x230
movq %r14, %rsi
callq 0x4aa7
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4181(%rip), %rdi      # 0x646d
leaq 0x3f4b(%rip), %rsi      # 0x623e
leaq 0x4180(%rip), %rcx      # 0x647a
movl $0xb4, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
testq %rdi, %rdi
je 0x2364
movq %rsi, %r14
testq %rsi, %rsi
je 0x2383
movq %rdi, %rbx
movq %rsp, %r15
movl $0x230, %edx            # imm = 0x230
movq %r15, %rdi
xorl %esi, %esi
callq 0x1120
movl $0x2, 0x20(%r15)
movq %r14, 0x28(%r15)
movq (%rbx), %rdi
movl $0x230, %edx            # imm = 0x230
movq %r15, %rsi
callq 0x4aa7
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4102(%rip), %rdi      # 0x646d
leaq 0x3ecc(%rip), %rsi      # 0x623e
leaq 0x4138(%rip), %rcx      # 0x64b1
movl $0xc5, %edx
callq 0x1110
leaq 0x3ea6(%rip), %rdi      # 0x6230
leaq 0x3ead(%rip), %rsi      # 0x623e
leaq 0x4119(%rip), %rcx      # 0x64b1
movl $0xc6, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x440, %rsp            # imm = 0x440
testq %rdi, %rdi
je 0x244d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x210(%rsp), %r15
movl $0x230, %edx            # imm = 0x230
movq %r15, %rdi
xorl %esi, %esi
callq 0x1120
movl $0x1, 0x20(%r15)
leaq 0x8(%rsp), %rdi
movl $0x208, %edx            # imm = 0x208
xorl %esi, %esi
callq 0x1120
testq %r14, %r14
je 0x2404
leaq 0x8(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
movq %r14, %rsi
callq 0x1050
leaq 0x8(%rsp), %rsi
movb $0x0, 0x200(%rsi)
leaq 0x238(%rsp), %rdi
movl $0x208, %edx            # imm = 0x208
callq 0x1190
movq (%rbx), %rdi
leaq 0x210(%rsp), %rsi
movl $0x230, %edx            # imm = 0x230
callq 0x4aa7
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x440, %rsp            # imm = 0x440
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4019(%rip), %rdi      # 0x646d
leaq 0x3de3(%rip), %rsi      # 0x623e
leaq 0x409d(%rip), %rcx      # 0x64ff
movl $0xd4, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x24b4
xorl %r14d, %r14d
movl %r14d, %esi
callq 0x4baf
movl 0x20(%rax), %ecx
cmpl $0x2, %ecx
je 0x249f
testl %ecx, %ecx
jne 0x24a8
movq 0x28(%rax), %rdi
callq 0x4cdf
jmp 0x24a8
movq 0x28(%rax), %rdi
callq 0x246c
incl %r14d
movq (%rbx), %rdi
cmpq %r14, 0x10(%rdi)
ja 0x2480
callq 0x4cdf
movq 0x8(%rbx), %rdi
callq 0x4cdf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq %rsp, %r12
leaq 0xf(,%rdx,8), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
leaq (,%rdx,8), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x1120
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x11c0
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x3bf2
movl $0x0, %eax
testq %r14, %r14
je 0x3bf2
addq $0x10, %rbx
xorl %eax, %eax
xorl %ecx, %ecx
movslq (%r12,%rcx,8), %rdx
movl %edx, -0x10(%rbx)
movl 0x4(%r12,%rcx,8), %esi
movl %esi, -0xc(%rbx)
subl %edx, %esi
movslq %esi, %rsi
movq %rsi, -0x8(%rbx)
addq %r15, %rdx
movq %rdx, (%rbx)
incq %rcx
movl %ecx, %edx
addq $0x18, %rbx
cmpq %r14, %rdx
jb 0x3bc6
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x20(%rsp)
xorl %eax, %eax
testl %edx, %edx
sete %al
shll $0x3, %eax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %r12
testq %rdi, %rdi
je 0x3cc4
movq %rdi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq (%rdi,%rax), %r14
cmpq $0x0, 0x10(%r14)
setne %bl
je 0x3ca5
xorl %r13d, %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0x4baf
testq %rax, %rax
je 0x3cd9
movq %rax, %rbp
movb %bl, 0xf(%rsp)
movq %r14, %rbx
movq %rax, %rdi
callq 0x10c0
movq %rax, %r14
movq %r12, %rdi
callq 0x10c0
cmpq %rax, %r14
cmovbeq %rax, %r14
movq %rbp, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1060
testl %eax, %eax
cmoveq %rbp, %r15
je 0x3cb0
incl %r13d
movq %rbx, %r14
cmpq %r13, 0x10(%rbx)
seta %bl
ja 0x3c4c
movq 0x10(%rsp), %rdi
movq 0x10(%rdi), %rdi
jmp 0x3cb9
movq 0x10(%rsp), %rdi
movb 0xf(%rsp), %bl
testb $0x1, %bl
je 0x3c28
jmp 0x3cc7
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a6d(%rip), %rdi      # 0x674d
leaq 0x2557(%rip), %rsi      # 0x623e
leaq 0x2a72(%rip), %rcx      # 0x6760
movl $0x139, %edx            # imm = 0x139
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
imulq %rdi, %rsi
incq %rsi
movl $0x1, %edi
callq 0x1160
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x1160
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq $0x0, 0x10(%rax)
movq %r15, 0x18(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x4b41
movq %rdx, %r14
movq %rdi, %rbx
movq (%rdi), %rax
cmpq %rdx, %rax
jb 0x4b41
movq %rsi, %r15
movq 0x8(%rbx), %rsi
cmpq %rsi, 0x10(%rbx)
jne 0x4af4
addq %rsi, %rsi
movq %rsi, 0x8(%rbx)
movq 0x18(%rbx), %rdi
imulq %rax, %rsi
incq %rsi
callq 0x11d0
testq %rax, %rax
je 0x4b41
movq %rax, 0x18(%rbx)
testq %r14, %r14
sete %al
testq %r15, %r15
sete %cl
movq (%rbx), %rdx
movq 0x10(%rbx), %rdi
imulq %rdx, %rdi
addq 0x18(%rbx), %rdi
orb %al, %cl
jne 0x4b31
movq %r15, %rsi
movq %r14, %rdx
callq 0x1190
movq (%rbx), %rax
imulq 0x10(%rbx), %rax
addq 0x18(%rbx), %rax
movb $0x0, (%r14,%rax)
jmp 0x4b38
xorl %esi, %esi
callq 0x1120
incq 0x10(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x4ba8
movq %rdi, %rbx
movq (%rdi), %rax
cmpq $0x8, %rax
jne 0x4ba8
movq %rsi, %r14
movq 0x8(%rbx), %rsi
cmpq %rsi, 0x10(%rbx)
jne 0x4b8f
addq %rsi, %rsi
movq %rsi, 0x8(%rbx)
movq 0x18(%rbx), %rdi
imulq %rax, %rsi
callq 0x11d0
testq %rax, %rax
je 0x4ba8
movq %rax, 0x18(%rbx)
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
imulq 0x10(%rbx), %rax
movq %r14, (%rcx,%rax)
incq 0x10(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x4cce
movq %rdi, %rbx
movq (%rdi), %r12
movq %r12, %rdi
callq 0x11a0
testq %rax, %rax
je 0x4cce
movq %rax, %rdi
movq 0x10(%rbx), %rbp
movq %rbp, %rax
shrq %rax
testl %eax, %eax
je 0x4cc4
movq $-0x1, %rcx
xorl %r15d, %r15d
movq %rdi, %r13
cmpq %r15, 0x8(%rbx)
jae 0x4c2b
movq $0x0, 0x8(%rsp)
jmp 0x4c3b
movq (%rbx), %rax
imulq %r15, %rax
addq 0x18(%rbx), %rax
movq %rax, 0x8(%rsp)
addq %rcx, %rbp
movl %ebp, %esi
cmpq %rsi, 0x8(%rbx)
movq %rcx, 0x10(%rsp)
jae 0x4c4f
xorl %esi, %esi
jmp 0x4c57
imulq (%rbx), %rsi
addq 0x18(%rbx), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x1190
movq 0x18(%rbx), %r14
movl %ebp, %edi
imulq (%rbx), %rdi
addq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x1190
xorl %ebp, %ebp
testq %r14, %r14
je 0x4cce
movq 0x18(%rbx), %r14
movq (%rbx), %rdi
imulq %r15, %rdi
addq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1190
testq %r14, %r14
je 0x4cce
movq %r13, %rdi
incq %r15
movq 0x10(%rbx), %rbp
movq %rbp, %rax
shrq %rax
movl %eax, %eax
movq 0x10(%rsp), %rcx
decq %rcx
cmpq %rax, %r15
jb 0x4c17
callq 0x1030
movl $0x1, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movl $0x18, %edi
callq 0x10c0
testq %rax, %rax
je 0x1b50
movq %rbx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x72, 0x10(%rax)
popq %rbx
retq
callq 0x1c77
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movl 0xc(%rdi), %ecx
testl %ecx, %ecx
jle 0x1b72
decl %ecx
movl %ecx, 0xc(%rbx)
movl 0x8(%rbx), %edx
xorl %eax, %eax
btl %ecx, %edx
setb %al
jmp 0x1ba3
movq (%rbx), %rdi
callq 0x1140
cmpl $-0x1, %eax
je 0x1b91
movl $0x7, 0xc(%rbx)
movl %eax, 0x8(%rbx)
shrl $0x7, %eax
andl $0x1, %eax
jmp 0x1ba3
callq 0x1040
movq %rax, %rcx
movl $0x2, %eax
cmpl $0x0, (%rcx)
jne 0x1ba5
popq %rbx
retq
callq 0x1cc0
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
cmpb $0x77, 0x10(%rdi)
jne 0x1bf7
movl 0xc(%rbx), %eax
cmpl $0x7, %eax
jg 0x1bd2
movl 0x8(%rbx), %ecx
addl $-0x8, %eax
addl %ecx, %ecx
incl %eax
jne 0x1bc2
movl $0x8, 0xc(%rbx)
movl %ecx, 0x8(%rbx)
movzbl 0x8(%rbx), %edi
movq (%rbx), %rsi
callq 0x10a0
cmpl $-0x1, %eax
je 0x1c13
incq 0x24e6(%rip)            # 0x40d0
movq (%rbx), %rdi
callq 0x10d0
cmpl $-0x1, %eax
je 0x1c13
movq (%rbx), %rdi
callq 0x1060
cmpl $-0x1, %eax
je 0x1c0d
movq %rbx, %rdi
popq %rbx
jmp 0x1030
cmpb $0x77, 0x10(%rbx)
jne 0x1c18
callq 0x1d13
callq 0x1cc0
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %eax
cmpl $0x8, %eax
jne 0x1c5a
movzbl %cl, %edi
movq (%rbx), %rsi
callq 0x10a0
cmpl $-0x1, %eax
je 0x1c72
incq 0x2487(%rip)            # 0x40d0
movl $0x1, 0xc(%rbx)
andl $0x1, %r14d
movl %r14d, 0x8(%rbx)
jmp 0x1c6a
andl $0x1, %r14d
leal (%r14,%rcx,2), %ecx
movl %ecx, 0x8(%rbx)
incl %eax
movl %eax, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x1d13
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq 0x232d(%rip), %r14      # 0x3ff8
movq (%r14), %rdi
leaq 0x5a6(%rip), %rsi       # 0x227b
leaq 0x2404(%rip), %rbx      # 0x40e0
leaq 0x339d(%rip), %rcx      # 0x5080
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10b0
movq %rbx, %rdi
callq 0x10f0
movq (%r14), %rdi
leaq 0x54c(%rip), %rsi       # 0x224b
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10b0
movl $0x1, %edi
callq 0x1120