LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ryancdotorg[P]bloomslice/bloomutl.c
// Function: bloom_pick_hash_wk
uint8_t bloom_pick_hash_wk(uint8_t width, uint8_t hashes) {
  if (hashes < 1 || width < 8 || width > 48) { // invalid parameters
    return 255;
  } else if (hashes <= hash1sN && width >= 8 && width <= 16) { // hash1s
    return BFS_TYPE_OFFSET + hashes;
  } else if (hashes <= hash2bN && width >  8 && width <= 16) { // hash2b
    return BFS_TYPE_OFFSET + hash1sN + hashes;
  } else if (hashes <= hash2sN && width > 16 && width <= 32) { // hash2s
    return BFS_TYPE_OFFSET + hash1sN + hash2bN + hashes;
  } else if (hashes <= hash3sN && width > 32 && width <= 48) { // hash3s
    return BFS_TYPE_OFFSET + hash1sN + hash2bN + hash2sN + hashes;
  } else { // no suitable hash found
    return 255;
  }
}

// Assembly:
testl %esi, %esi
sete %al
leal -0x31(%rdi), %ecx
cmpb $-0x29, %cl
setb %cl
orb %al, %cl
movb $-0x1, %al
je 0x5c66
retq
leaq 0x568d(%rip), %rcx      # 0xb2fa
movb (%rcx), %cl
cmpb %sil, %cl
setb %dl
cmpb $0x11, %dil
setae %r8b
orb %dl, %r8b
je 0x5cd0
leaq 0x567c(%rip), %rdx      # 0xb305
movb (%rdx), %dl
cmpb %sil, %dl
setb %r8b
leal -0x9(%rdi), %r9d
cmpb $0x8, %r9b
setae %r9b
orb %r8b, %r9b
jne 0x5ca8
addb %cl, %sil
jmp 0x5cd0
leaq 0x55e1(%rip), %r8       # 0xb290
movb (%r8), %r8b
cmpb %sil, %r8b
setb %r9b
leal -0x11(%rdi), %r10d
cmpb $0x10, %r10b
setae %r10b
orb %r9b, %r10b
jne 0x5cd6
addb %cl, %sil
addb %dl, %sil
incb %sil
movl %esi, %eax
retq
cmpb $0x21, %dil
jb 0x5c65
leaq 0x547d(%rip), %rdi      # 0xb160
cmpb %sil, (%rdi)
jb 0x5c65
addb %cl, %sil
addb %r8b, %dl
addb %sil, %dl
incb %dl
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ryancdotorg[P]bloomslice/bloomutl.c
// Function: bloom_pick_hash_wi
uint8_t bloom_pick_hash_wi(uint8_t width, uint64_t items, uint8_t *k) {
  double bits = 1ULL<<width;
  unsigned int opt = round((log(2.0) * bits) / (double)items);
  uint8_t kOpt = opt < 256 ? (opt > 0 ? opt : 1) : 255;

  if (width < 8 || width > 48) { // invalid parameters
    return 255;
  } else if (kOpt <= hash1sN && width >= 8 && width <= 16) { // hash1s
    *k = kOpt;
    return bloom_pick_hash_wk(width, kOpt);
  } else if (width == 8) {
    *k = hash1sN;
    return bloom_pick_hash_wk(width, hash1sN);
  } else if (kOpt <= hash2bN && width >  8 && width <= 16) { // hash2b
    *k = kOpt;
    return bloom_pick_hash_wk(width, kOpt);
  } else if (width <= 16) {
    *k = hash2bN;
    return bloom_pick_hash_wk(width, hash2bN);
  } else if (kOpt <= hash2sN && width > 16 && width <= 32) { // hash2s
    *k = kOpt;
    return bloom_pick_hash_wk(width, kOpt);
  } else if (width <= 32) {
    *k = hash2sN;
    return bloom_pick_hash_wk(width, hash2sN);
  } else if (kOpt <= hash3sN && width > 32 && width <= 48) { // hash3s
    *k = kOpt;
    return bloom_pick_hash_wk(width, kOpt);
  } else if (width <= 48) {
    *k = hash3sN;
    return bloom_pick_hash_wk(width, hash3sN);
  } else { // no suitable hash found
    return 255;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %edi, %ebx
movq %rbx, %rax
shlq $0x34, %rax
movabsq $0x3fe62e42fefa39ef, %rcx # imm = 0x3FE62E42FEFA39EF
addq %rax, %rcx
movq %rcx, %xmm0
movq %rsi, %xmm1
punpckldq 0x1307(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x130f(%rip), %xmm1     # 0x7040
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
callq 0x1050
cvttsd2si %xmm0, %rcx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovael %ecx, %eax
movl $0xff, %ecx
cmpl %ecx, %eax
cmovael %ecx, %eax
leal -0x31(%rbx), %ecx
cmpb $-0x29, %cl
jae 0x5d72
movb $-0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5581(%rip), %rcx      # 0xb2fa
movb (%rcx), %dl
cmpb $0x10, %bl
ja 0x5d8c
movzbl %dl, %esi
cmpl %esi, %eax
ja 0x5d8c
movb %al, (%r14)
jmp 0x5d96
cmpb $0x8, %bl
jne 0x5da8
movb %dl, (%r14)
movb (%rcx), %al
movzbl %bl, %edi
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5c51
leaq 0x5556(%rip), %rcx      # 0xb305
movb (%rcx), %dl
cmpb $0x10, %bl
ja 0x5dbd
movzbl %dl, %esi
cmpl %esi, %eax
jbe 0x5d87
cmpb $0x10, %bl
jbe 0x5d91
leaq 0x54c7(%rip), %rcx      # 0xb290
movb (%rcx), %dl
cmpb $0x20, %bl
ja 0x5dd7
movzbl %dl, %esi
cmpl %esi, %eax
jbe 0x5d87
cmpb $0x20, %bl
jbe 0x5d91
leaq 0x537d(%rip), %rcx      # 0xb160
movzbl (%rcx), %edx
cmpl %edx, %eax
jbe 0x5d87
movb %dl, (%r14)
jmp 0x5d94
// File: /workspace/github_c_makefile_star2_O1/ryancdotorg[P]bloomslice/hex.c
// Function: hex
unsigned char *
hex(unsigned char *buf, size_t buf_sz,
    unsigned char *hexed, size_t hexed_sz) {
  unsigned int i, j;
  --hexed_sz;
  for (i = j = 0; i < buf_sz && j < hexed_sz; ++i, j += 2) {
    snprintf(hexed+j, 3, "%02x", buf[i]);
  }
  hexed[j] = 0; // null terminate
  return hexed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
testq %rsi, %rsi
sete %al
decq %r14
sete %cl
orb %al, %cl
jne 0x6038
movq %rsi, %r15
movq %rdi, %r12
movl $0x2, %ebp
movl $0x1, %r13d
xorl %edi, %edi
xorl %eax, %eax
addq %rbx, %rdi
movzbl (%r12,%rax), %ecx
movl $0x3, %esi
leaq 0x209e(%rip), %rdx      # 0x80b8
xorl %eax, %eax
callq 0x10d0
movl %r13d, %eax
movl %ebp, %edi
cmpq %r15, %rax
jae 0x603a
addl $0x2, %ebp
incl %r13d
cmpq %rdi, %r14
ja 0x6006
jmp 0x603a
xorl %edi, %edi
movb $0x0, (%rbx,%rdi)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ryancdotorg[P]bloomslice/mmapf.c
// Function: _bloomslice_mmapf_strerror
char * mmapf_strerror(int errnum) {
  if (errnum < MMAPF_EXFIRST) {
    return strerror(errnum);
  } else if (errnum < MMAPF_EXLAST) {
    return errstr[errnum-MMAPF_EXFIRST];
  } else {
    return errstr[0];
  }
}

// Assembly:
cmpl $0x3e7, %edi            # imm = 0x3E7
jg 0x605d
jmp 0x1270
cmpl $0x3ea, %edi            # imm = 0x3EA
jg 0x607a
addl $0xfffffc18, %edi       # imm = 0xFFFFFC18
leaq 0x204e(%rip), %rcx      # 0x80c0
movslq (%rcx,%rdi,4), %rax
addq %rcx, %rax
retq
leaq 0x204f(%rip), %rax      # 0x80d0
retq
// File: /workspace/github_c_makefile_star2_O1/ryancdotorg[P]bloomslice/mmapf.c
// Function: _bloomslice_munmapf
int munmapf(mmapf_ctx *ctx) {
  // TODO error checking
  if (ctx->fd >= 0) {
    msync(ctx->mem, ctx->file_sz, MS_SYNC);
    fsync(ctx->fd);
    close(ctx->fd);
  }
  if (ctx->mem != NULL) {
    munmap(ctx->mem, ctx->mmap_sz);
  }
  ctx->file_sz = 0;
  ctx->mmap_sz = 0;
  ctx->mem = NULL;
  ctx->fd = -1;
  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
js 0x60ad
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movl $0x4, %edx
callq 0x10a0
movl 0x18(%rbx), %edi
callq 0x11e0
movl 0x18(%rbx), %edi
callq 0x1110
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x60be
movq 0x8(%rbx), %rsi
callq 0x11b0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ikbenlike[P]nngutils/src/whoami.c
// Function: main
int main(int argc, char **argv){
    struct passwd *pw = getpwuid(geteuid());
    if(pw == NULL){
        fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
        return 1;
    }
    puts(pw->pw_name);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x1060
movl %eax, %edi
callq 0x1050
testq %rax, %rax
je 0x11f7
movq (%rax), %rdi
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x10a0
movl $0x1, %eax
jmp 0x11f0
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/alarm_cond.c
// Function: alarm_thread
void *alarm_thread(void *arg)
{
	struct alarm *a;
	struct timespec cond_time = {0};
	time_t now;
	bool expired;

	(void)arg;
	pthread_mutex_lock(&g_alarm_mutex);
	while (1)
	{
		g_current_alarm = 0;
		while (g_alarm_list == NULL)
			pthread_cond_wait(&g_alarm_cond, &g_alarm_mutex);

		a = g_alarm_list;
		g_alarm_list = a->link;
		now = time(NULL);
		expired = false;
		
		if (a->time > now)
		{
			cond_time.tv_sec = a->time;
			g_current_alarm = a->time;
			while (g_current_alarm == a->time)
			{
				int s = pthread_cond_timedwait(
					&g_alarm_cond, &g_alarm_mutex, &cond_time);
				if (s == ETIMEDOUT)
				{
					expired = true;
					break;
				}
			}
			if (!expired)
				alarm_insert(a);
		}
		else
			expired = true;

		if (expired)
		{
			printf("(%d) %s\n", a->seconds, a->message);
			free(a);
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
leaq 0x2de6(%rip), %r14      # 0x40a8
movq %r14, %rdi
callq 0x1100
leaq 0x2dff(%rip), %r15      # 0x40d0
movl $0x1, %ebp
movq $0x0, 0x2e1f(%rip) # 0x4100
movq 0x2db8(%rip), %r13      # 0x40a0
testq %r13, %r13
jne 0x12fa
movq %r15, %rdi
movq %r14, %rsi
callq 0x1040
jmp 0x12e1
movq (%r13), %rax
movq %rax, 0x2d9b(%rip)      # 0x40a0
xorl %edi, %edi
callq 0x10a0
movq 0x8(%r13), %rcx
movb $0x1, %r12b
cmpq %rax, %rcx
jle 0x135c
movq %rcx, (%rsp)
movq %rcx, 0x2ddd(%rip)      # 0x4100
xorl %r12d, %r12d
movq 0x2dd3(%rip), %rax      # 0x4100
cmpq 0x8(%r13), %rax
jne 0x134e
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x10f0
movzbl %r12b, %r12d
cmpl $0x6e, %eax
cmovel %ebp, %r12d
jne 0x1326
testb $0x1, %r12b
jne 0x135c
movq %r13, %rdi
callq 0x124c
testb $0x1, %r12b
je 0x12d6
movl 0x10(%r13), %esi
leaq 0x14(%r13), %rdx
leaq 0xc8f(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1060
movq %r13, %rdi
callq 0x1030
jmp 0x12d6
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/alarm_cond.c
// Function: main
int main(void)
{
	int status;
	char line[128];
	struct alarm *a;
	pthread_t thread;

	status = pthread_create(&thread, NULL, alarm_thread, NULL);
	while (printf("Alarm> ") && fgets(line, sizeof(line), stdin))
	{
		if (strlen(line) <= 1)
			continue;

		if (!(a = malloc(sizeof(*a))))
		{
			fputs("Failed to allocate alarm\n", stderr);
			return EXIT_FAILURE;
		}
		if (sscanf(line, "%d %64[^\n]", &a->seconds, a->message) < 2)
		{
			fputs("Bad command\n", stderr);
			free(a);
		}
		else
		{
			pthread_mutex_lock(&g_alarm_mutex);
			a->time = time(NULL) + a->seconds;
			alarm_insert(a);
			pthread_mutex_unlock(&g_alarm_mutex);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq -0xfd(%rip), %rdx       # 0x12a4
xorl %r13d, %r13d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x10e0
leaq 0xc54(%rip), %rdi       # 0x200d
xorl %eax, %eax
callq 0x1060
testl %eax, %eax
je 0x1492
movq 0x2c09(%rip), %rbp      # 0x3fd8
leaq 0x10(%rsp), %rbx
leaq 0xc32(%rip), %r14       # 0x200d
leaq 0xc4d(%rip), %r15       # 0x202f
leaq 0x2cbf(%rip), %r12      # 0x40a8
movq (%rbp), %rdx
movq %rbx, %rdi
movl $0x80, %esi
callq 0x1080
testq %rax, %rax
je 0x148f
movq %rbx, %rdi
callq 0x1050
cmpq $0x2, %rax
jb 0x146e
movl $0x58, %edi
callq 0x10c0
testq %rax, %rax
je 0x14a7
movq %rax, %r13
leaq 0x10(%rax), %rdx
movq %rax, %rcx
addq $0x14, %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10d0
cmpl $0x1, %eax
jle 0x1485
movq %r12, %rdi
callq 0x1100
xorl %edi, %edi
callq 0x10a0
movslq 0x10(%r13), %rcx
addq %rax, %rcx
movq %rcx, 0x8(%r13)
movq %r13, %rdi
callq 0x124c
movq %r12, %rdi
callq 0x10b0
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
testl %eax, %eax
jne 0x13e9
jmp 0x1492
movq %r13, %rdi
callq 0x1120
jmp 0x146e
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1144
movl $0x1, %r13d
jmp 0x1492
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_08/date_conversion.c
// Function: main
int main(void)
{
  int day = day_of_year(2020, 10, 30);
  printf("day of the year: %d\n", day);

  int month_invalid = day_of_year(2020, 13, 1);
  if (month_invalid == -1)
  {
    printf("Warning: invalid month detected.\n");
  }

  int day_invalid = day_of_year(202, 12, 32);
  if (day_invalid == -2)
  {
    printf("Warning: invalid day detected.\n");
  }

  int month;
  int day_month;

  month_day(2020, 304, &month, &day_month);
  printf("month: %d, day: %d\n", month, day_month);

  month_day(2020, 366, &month, &day_month);
  printf("month: %d, day: %d\n", month, day_month);

  month_day(2020, 367, &month, &day_month);
  printf("month: %d, day: %d\n", month, day_month);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xeaa(%rip), %rdi       # 0x2004
xorl %ebx, %ebx
movl $0x130, %ebp            # imm = 0x130
movl $0x130, %esi            # imm = 0x130
xorl %eax, %eax
callq 0x1040
leaq 0xf45(%rip), %rdi       # 0x20b9
callq 0x1030
leaq 0xef9(%rip), %rdi       # 0x2079
callq 0x1030
leaq 0xea1(%rip), %rdi       # 0x202d
movl $0xc, %esi
movl $0x1f, %edx
xorl %eax, %eax
callq 0x1040
leaq 0xef6(%rip), %rdi       # 0x209a
callq 0x1030
leaq 0xf60(%rip), %r15       # 0x2110
xorl %eax, %eax
subl %eax, %ebp
movsbl 0xe(%rbx,%r15), %eax
incq %rbx
cmpl %eax, %ebp
jg 0x11b2
leaq 0xe51(%rip), %rdi       # 0x2019
xorl %r14d, %r14d
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1040
movl $0x16e, %edx            # imm = 0x16E
xorl %eax, %eax
subl %eax, %edx
movsbl 0xe(%r14,%r15), %eax
incq %r14
cmpl %eax, %edx
jg 0x11dd
leaq 0xe26(%rip), %rbx       # 0x2019
movq %rbx, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq 0x1040
leaq 0xe55(%rip), %rdi       # 0x205c
movl $0x7e4, %esi            # imm = 0x7E4
movl $0x16e, %edx            # imm = 0x16E
xorl %eax, %eax
callq 0x1040
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/paeq128/ref/encrypt.cpp
// Function: crypto_aead_encrypt_no_nonce(unsigned char*, unsigned long long*, unsigned char const*, unsigned long long, unsigned char const*, unsigned long long, unsigned char const*, unsigned char*, unsigned char const*)
int crypto_aead_encrypt_no_nonce(
		 unsigned char *c, unsigned long long *clen,
		 const unsigned char *m, unsigned long long mlen,
		 const unsigned char *ad, unsigned long long adlen,
		 const unsigned char *nsec,
		 unsigned char *npub,
		 const unsigned char *k
		 )
		 //Generates nonce out of plaintext and AD and put it into npub

	 {
		 Init();//Initializing GF(256) multiplication table for AES

		 if (clen == NULL)
			 return -1;
		 if ((mlen == 0) && (adlen == 0))
		 {
			 *clen = 0;
			 return 0;
		 }

		 //Assume that we do encryption and/or authentication so we need a key and a ciphertext pointer valid
		 if ((k == NULL) || (c == NULL))
			 return -2;

		 GenerateNonceRef(npub, m, mlen, ad, adlen, k);
		 return PAEQ128_ref_encrypt(c, clen, m, mlen, ad, adlen, npub, k);
	 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
callq 0x1060
testq %r13, %r13
je 0x1dec
movq %rbx, %rax
orq %r15, %rax
je 0x1df3
movq 0x50(%rsp), %r9
testq %r9, %r9
sete %al
testq %rbp, %rbp
sete %cl
orb %al, %cl
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jne 0x1dfd
movq 0x48(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x1040
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
pushq 0x50(%rsp)
pushq 0x50(%rsp)
callq 0x1070
addq $0x18, %rsp
jmp 0x1e01
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1dfd
movq $0x0, (%r13)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/ch5/lua_pcall.c
// Function: main
int main() {

  lua_State *L = luaL_newstate();
  luaL_openlibs(L);

  lua_register(L, "my_error_handler", my_error_handler);
  lua_register(L, "fn_that_throws",   fn_that_throws);
  lua_register(L, "middle_fn",        middle_fn);

  // Call middle_fn().
  lua_pushcfunction(L, my_error_handler);
  lua_getglobal(L, "middle_fn");
  int status = lua_pcall(L, 0, 0, -2);
  if (status != LUA_OK) {
    // Print the error.
    printf("Looks like lua_pcall() caught an error:\n%s\n",
           lua_tostring(L, -1));
    // Pop the error message from the stack.
    lua_pop(L, 1);
  }

  printf("Done!\n");

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x140e2
movq %rax, %rbx
movq %rax, %rdi
callq 0x142e4
leaq -0xad(%rip), %r14       # 0x47bc
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x52ad
leaq 0x1b7a8(%rip), %rsi     # 0x20025
movq %rbx, %rdi
callq 0x56e3
leaq -0x9c(%rip), %rsi       # 0x47f0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x52ad
leaq 0x1b779(%rip), %rsi     # 0x20016
movq %rbx, %rdi
callq 0x56e3
leaq -0x93(%rip), %rsi       # 0x4819
movq %rbx, %rdi
xorl %edx, %edx
callq 0x52ad
leaq 0x1b779(%rip), %r15     # 0x20036
movq %rbx, %rdi
movq %r15, %rsi
callq 0x56e3
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x52ad
movq %rbx, %rdi
movq %r15, %rsi
callq 0x537c
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5ba6
testl %eax, %eax
je 0x4928
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x4f65
leaq 0x1b72f(%rip), %rdi     # 0x20040
movq %rax, %rsi
xorl %eax, %eax
callq 0x4180
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4a6d
leaq 0x1b73d(%rip), %rdi     # 0x2006c
callq 0x40d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/keithnoguchi[P]pearls-in-action/0x2/sign_main.c
// Function: main
int main(void)
{
#define WORDMAX 100
	char word[WORDMAX], sig[WORDMAX];

	while (scanf("%s", word) != EOF) {
		sign(word, strlen(word), sig);
		printf("%s %s\n", sig, word);
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
leaq 0xd73(%rip), %rdi       # 0x2004
movq %rsp, %rsi
xorl %eax, %eax
callq 0x1080
cmpl $-0x1, %eax
je 0x12ed
movq %rsp, %rbx
leaq 0x70(%rsp), %r14
leaq 0xd58(%rip), %r15       # 0x2007
leaq 0xd4e(%rip), %r12       # 0x2004
movq %rbx, %rdi
callq 0x1030
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x119c
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1040
movq %r12, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1080
cmpl $-0x1, %eax
jne 0x12b6
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/chunk.c
// Function: init_chunk
void init_chunk(Chunk* chunk) {
    chunk->count = 0;
    chunk->capacity = 0;
    chunk->code = NULL;
    chunk->lines = NULL;
    init_value_array(&chunk->constants);
    chunk->labels = NULL;
    chunk->labels_count = 0;
    chunk->labels_capacity = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x20, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
callq 0x8a1c
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movq $0x0, 0x48(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/chunk.c
// Function: write_chunk
void write_chunk(Chunk* chunk, size_t add_size, uint8_t* bytes, size_t line) {
    if (chunk->capacity < chunk->count + add_size) {
        size_t old_capacity = chunk->capacity;
        chunk->capacity = GROW_CAPACITY(old_capacity);
        chunk->code = GROW_ARRAY(uint8_t, chunk->code,
            old_capacity, chunk->capacity);
        chunk->lines = GROW_ARRAY(size_t, chunk->lines,
            old_capacity, chunk->capacity);
    }

    for (int i = (int) add_size - 1; i >= 0; i--) {
        chunk->lines[chunk->count] = line;
        chunk->code[chunk->count] = bytes[i];
        chunk->count++;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x8(%rdi), %r13
movq (%rdi), %rax
addq %rsi, %rax
cmpq %rax, %r13
jae 0x45e3
leaq (,%r13,2), %rax
cmpq $0x8, %r13
movl $0x8, %edx
cmovaeq %rax, %rdx
movq %rdx, 0x8(%r12)
movq 0x10(%r12), %rdi
movq %r13, %rsi
callq 0x76c4
movq %rax, 0x10(%r12)
movq 0x8(%r12), %rdx
movq 0x18(%r12), %rdi
shlq $0x3, %r13
shlq $0x3, %rdx
movq %r13, %rsi
callq 0x76c4
movq %rax, 0x18(%r12)
testl %r15d, %r15d
jle 0x461d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
incq %r15
movq (%r12), %rax
movq 0x18(%r12), %rcx
movq %rbx, (%rcx,%rax,8)
movb -0x2(%r14,%r15), %al
movq (%r12), %rcx
movq 0x10(%r12), %rdx
movb %al, (%rdx,%rcx)
incq (%r12)
decq %r15
cmpq $0x1, %r15
jg 0x45f2
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/chunk.c
// Function: free_chunk
void free_chunk(Chunk* chunk) {
    FREE_ARRAY(uint8_t, chunk->code, chunk->capacity);
    FREE_ARRAY(size_t, chunk->lines, chunk->capacity);
    free_value_array(&chunk->constants);
    init_chunk(chunk);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
xorl %edx, %edx
callq 0x76c4
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdi
shlq $0x3, %rsi
xorl %edx, %edx
callq 0x76c4
leaq 0x20(%rbx), %r14
movq %r14, %rdi
callq 0x8a8c
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %r14, %rdi
callq 0x8a1c
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movq $0x0, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/chunk.c
// Function: set_chunk_label_offset
void set_chunk_label_offset(Chunk* chunk, size_t label, int32_t offset) {
    if (label > UINT16_MAX) {
        fprintf(stderr, "Label too large\n");
    }

    while (chunk->labels_capacity < label + 1) {
        size_t old_capacity = chunk->labels_capacity;
        chunk->labels_capacity = GROW_CAPACITY(old_capacity);
        chunk->labels = GROW_ARRAY(int32_t, chunk->labels,
            old_capacity, chunk->labels_capacity);
    }

    chunk->labels[label] = offset;

    if (chunk->labels_count <= label) {
        chunk->labels_count = label + 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x10000, %rsi          # imm = 0x10000
jae 0x4710
leaq 0x1(%r14), %r15
movq 0x48(%rbx), %rsi
cmpq %r15, %rsi
jae 0x46f5
movl $0x8, %r12d
leaq (%rsi,%rsi), %rdx
cmpq $0x8, %rsi
cmovbq %r12, %rdx
movq %rdx, 0x48(%rbx)
movq 0x38(%rbx), %rdi
shlq $0x2, %rsi
shlq $0x2, %rdx
callq 0x76c4
movq %rax, 0x38(%rbx)
movq 0x48(%rbx), %rsi
cmpq %r15, %rsi
jb 0x46c7
movq 0x38(%rbx), %rax
movl %ebp, (%rax,%r14,4)
cmpq %r14, 0x40(%rbx)
ja 0x4707
movq %r15, 0x40(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x4190
jmp 0x46b4
nop
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/common.c
// Function: read_file_ex
size_t read_file_ex(const char* path, uint8_t** dst_buf, size_t dst_buf_size, size_t dst_buf_offset, bool binary) {
    FILE* fd = fopen(path, binary ? "rb" : "r");
    if (fd == NULL) {
        fprintf(stderr, "Failed to open file\n");
        return 0;
    }

    uint8_t* cursor = *dst_buf + dst_buf_offset;
    size_t read_target_size = 0x1000;
    size_t buf_size = dst_buf_size;
    size_t read_size = 0;

    do {
        buf_size += read_target_size;
        *dst_buf = realloc(*dst_buf, buf_size);
        cursor = *dst_buf + dst_buf_offset + buf_size - dst_buf_size - read_target_size;
        read_size = fread(cursor, 1, read_target_size, fd);
    } while (read_size == read_target_size);

    return buf_size - dst_buf_size - read_target_size + read_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0x58fe(%rip), %rax      # 0xa031
leaq 0x6435(%rip), %rsi      # 0xab6f
testl %r8d, %r8d
cmovneq %rax, %rsi
callq 0x4140
testq %rax, %rax
je 0x47a5
movq %rax, %r12
addq $0x1000, %r14           # imm = 0x1000
xorl %r13d, %r13d
movl $0x1000, %ebp           # imm = 0x1000
leaq (%r14,%r13), %rsi
movq (%r15), %rdi
callq 0x4130
movq %rax, (%r15)
leaq (%rbx,%r13), %rdi
addq %rax, %rdi
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
movq %r12, %rcx
callq 0x4080
addq %rbp, %r13
cmpq %rbp, %rax
je 0x475d
addq %r13, %rax
addq $-0x1000, %rax          # imm = 0xF000
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x41ac
xorl %eax, %eax
jmp 0x4796
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/common.c
// Function: write_file
size_t write_file(const char* path, uint8_t* src_buf, size_t src_buf_size, bool binary) {
    FILE* fd = fopen(path, binary ? "wb" : "w");
    if (fd == NULL) {
        fprintf(stderr, "Failed to open file\n");
        return 0;
    }

    uint8_t* cursor = src_buf;
    size_t write_block_size = 0x1000;
    size_t write_size = 0;

    if (src_buf_size < write_block_size) {
        write_block_size = src_buf_size;
    }

    do {
        cursor = src_buf + write_size;
        write_size = fwrite(cursor, write_block_size, 1, fd) * write_block_size;
    } while (write_size == write_block_size && (size_t) (cursor - src_buf) < src_buf_size);

    return (size_t) (cursor - src_buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x5879(%rip), %rax      # 0xa049
leaq 0x7146(%rip), %rsi      # 0xb91d
testl %ecx, %ecx
cmovneq %rax, %rsi
callq 0x4140
testq %rax, %rax
je 0x482b
movq %rax, %r15
movl $0x1000, %r12d          # imm = 0x1000
cmpq %r12, %rbx
cmovbq %rbx, %r12
xorl %eax, %eax
movq %rax, %r13
leaq (%r14,%rax), %rdi
movl $0x1, %edx
movq %r12, %rsi
movq %r15, %rcx
callq 0x4170
cmpq %rbx, %r13
jae 0x481e
imulq %r12, %rax
cmpq %r12, %rax
je 0x47f9
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x41c8
xorl %r13d, %r13d
jmp 0x481e
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: and_
static void and_(bool can_assign) {
    UNUSED(can_assign);

    int ret = alloc_register();

    if (ret < 0) {
        error_alloc_register();
        return;
    }

    uint8_t reg = (uint8_t) ret;
    size_t label = take_label();

    emit_stack_pop(reg);

    emit_conditional_jump_ri(OP_JMPI_EQ, reg, CONSTANT_FALSE, label);

    parse_precedence(PREC_AND);

    set_label_here(label);

    free_register(reg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0x11faf(%rip), %r14     # 0x175a8
cmpb $0x1, 0x7a(%r15,%r14)
je 0x5615
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x55f9
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x5621
movb $0x0, 0x7a(%r15,%r14)
incl 0x11f77(%rip)           # 0x17598
testl %r15d, %r15d
js 0x56c3
movq 0x120f7(%rip), %rbx     # 0x17728
incq %rbx
movq %rbx, 0x120ed(%rip)     # 0x17728
cmpq $0x10000, %rbx          # imm = 0x10000
jb 0x5657
leaq 0x11f85(%rip), %rdi     # 0x175d0
leaq 0x4cc5(%rip), %rsi      # 0xa317
callq 0x6108
movzbl %r15b, %ebp
movl %ebp, %edi
callq 0x61cc
movl $0x2d, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x642f
movl $0x3, %edi
callq 0x606f
movq 0x11f1e(%rip), %rdi     # 0x175a0
movswl (%rdi), %edx
movq %rbx, %rsi
callq 0x469b
movzbl %r15b, %ebx
cmpb $0x1, 0x7a(%rbx,%r14)
jne 0x56ac
leaq 0x11f30(%rip), %rdi     # 0x175d0
leaq 0x4c4d(%rip), %rsi      # 0xa2f4
callq 0x6108
movb $0x1, 0x7a(%rbx,%r14)
decl 0x11ee0(%rip)           # 0x17598
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11f06(%rip), %rdi     # 0x175d0
leaq 0x4c07(%rip), %rsi      # 0xa2d8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6108
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: or_
static void or_(bool can_assign) {
    UNUSED(can_assign);

    int ret = alloc_register();

    if (ret < 0) {
        error_alloc_register();
        return;
    }

    uint8_t reg = (uint8_t) ret;
    size_t label = take_label();

    emit_stack_peek(reg);

    emit_conditional_jump_ri(OP_JMPI_NEQ, reg, CONSTANT_FALSE, label);

    emit_stack_pop(reg);

    parse_precedence(PREC_OR);

    set_label_here(label);

    free_register(reg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0x11eb7(%rip), %r14     # 0x175a8
cmpb $0x1, 0x7a(%r15,%r14)
je 0x570d
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x56f1
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x5719
movb $0x0, 0x7a(%r15,%r14)
incl 0x11e7f(%rip)           # 0x17598
testl %r15d, %r15d
js 0x57c9
movq 0x11fff(%rip), %rbx     # 0x17728
incq %rbx
movq %rbx, 0x11ff5(%rip)     # 0x17728
cmpq $0x10000, %rbx          # imm = 0x10000
jb 0x574f
leaq 0x11e8d(%rip), %rdi     # 0x175d0
leaq 0x4bcd(%rip), %rsi      # 0xa317
callq 0x6108
movzbl %r15b, %ebp
movl %ebp, %edi
callq 0x61cc
movl %ebp, %edi
callq 0x6180
movl $0x2f, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x642f
movl %ebp, %edi
callq 0x61cc
movl $0x2, %edi
callq 0x606f
movq 0x11e18(%rip), %rdi     # 0x175a0
movswl (%rdi), %edx
movq %rbx, %rsi
callq 0x469b
movzbl %r15b, %ebx
cmpb $0x1, 0x7a(%rbx,%r14)
jne 0x57b2
leaq 0x11e2a(%rip), %rdi     # 0x175d0
leaq 0x4b47(%rip), %rsi      # 0xa2f4
callq 0x6108
movb $0x1, 0x7a(%rbx,%r14)
decl 0x11dda(%rip)           # 0x17598
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11e00(%rip), %rdi     # 0x175d0
leaq 0x4b01(%rip), %rsi      # 0xa2d8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6108
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: advance
static void advance(void) {
    parser.previous2 = parser.previous;
    parser.previous = parser.current;

    while (true) {
        parser.current = scan_token();

        if (parser.current.type != TOKEN_ERROR) {
            break;
        }

        error_at_current(parser.current.start);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq 0x11ade(%rip), %rax     # 0x175f0
movq %rax, 0x11aff(%rip)     # 0x17618
movups 0x11ac0(%rip), %xmm0    # 0x175e0
movups %xmm0, 0x11ae1(%rip)    # 0x17608
movups 0x11aa2(%rip), %xmm0    # 0x175d0
movups %xmm0, 0x11ac3(%rip)    # 0x175f8
movups 0x11a6c(%rip), %xmm0    # 0x175a8
movups %xmm0, 0x11a8d(%rip)    # 0x175d0
movups 0x11a6e(%rip), %xmm0    # 0x175b8
movups %xmm0, 0x11a8f(%rip)    # 0x175e0
movq 0x11a70(%rip), %rax     # 0x175c8
movq %rax, 0x11a91(%rip)     # 0x175f0
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x805a
movq 0x20(%rbx), %rax
movq %rax, 0x11a53(%rip)     # 0x175c8
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x11a35(%rip)    # 0x175b8
movups %xmm0, 0x11a1e(%rip)    # 0x175a8
cmpl $0x29, 0x11a17(%rip)    # 0x175a8
jne 0x5be0
leaq 0x11a0e(%rip), %rbx     # 0x175a8
movq %rsp, %r14
movq 0x11a0c(%rip), %rsi     # 0x175b0
movq %rbx, %rdi
callq 0x6108
movq %r14, %rdi
callq 0x805a
movq 0x20(%rsp), %rax
movq %rax, 0x11a08(%rip)     # 0x175c8
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups %xmm1, 0x119e8(%rip)    # 0x175b8
movups %xmm0, 0x119d1(%rip)    # 0x175a8
cmpl $0x29, 0x119ca(%rip)    # 0x175a8
je 0x5b9d
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: parse_precedence
static void parse_precedence(Precedence precedence) {
    advance();
    ParseFn prefix_rule = get_rule(parser.previous.type)->prefix;
    if (prefix_rule == NULL) {
        error("Expected expression");
        return;
    }

    bool can_assign = precedence <= PREC_ASSIGNMENT;
    prefix_rule(can_assign);

    while (precedence <= get_rule(parser.current.type)->precedence) {
        advance();
        ParseFn infix_rule = get_rule(parser.previous.type)->infix;
        infix_rule(can_assign);
    }

    if (can_assign && match(TOKEN_EQUAL)) {
        error("Invalid target for assignment");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x5b04
movl 0x11550(%rip), %eax     # 0x175d0
leaq (%rax,%rax,2), %rax
leaq 0x11055(%rip), %r14     # 0x170e0
movq (%r14,%rax,8), %rax
testq %rax, %rax
je 0x60ef
xorl %edi, %edi
cmpl $0x2, %ebx
setb %dil
callq *%rax
movl 0x11503(%rip), %eax     # 0x175a8
leaq (%rax,%rax,2), %rcx
cmpl %ebx, 0x10(%r14,%rcx,8)
jb 0x60d1
xorl %ebp, %ebp
cmpl $0x2, %ebx
setb %bpl
callq 0x5b04
movl 0x1150c(%rip), %eax     # 0x175d0
leaq (%rax,%rax,2), %rax
movl %ebp, %edi
callq *0x8(%r14,%rax,8)
jmp 0x609f
cmpl $0x2, %ebx
setae %cl
cmpl $0xe, %eax
setne %al
orb %cl, %al
jne 0x6103
callq 0x5b04
leaq 0x40e5(%rip), %rsi      # 0xa1d2
jmp 0x60f6
leaq 0x40c8(%rip), %rsi      # 0xa1be
leaq 0x114d3(%rip), %rdi     # 0x175d0
popq %rbx
popq %r14
popq %rbp
jmp 0x6108
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: resolve_function
static Function* resolve_function(Token* name) {
    for (size_t i = 0; i < parser.functions_count; i++) {
        if (parser.functions[i]->name.length == name->length) {
            if (!strncmp(parser.functions[i]->name.start, name->start, name->length)) {
                return parser.functions[i];
            }
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x11611(%rip), %r12     # 0x17740
testq %r12, %r12
je 0x616b
movq %rdi, %rbx
movq 0x115fa(%rip), %r13     # 0x17738
movq 0x10(%rdi), %r14
xorl %ebp, %ebp
movq (%r13,%rbp,8), %r15
cmpq %r14, 0x10(%r15)
jne 0x6163
movq 0x8(%r15), %rdi
movq 0x8(%rbx), %rsi
movq %r14, %rdx
callq 0x4060
testl %eax, %eax
je 0x616e
incq %rbp
cmpq %rbp, %r12
jne 0x6144
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: emit_opcode
static void emit_opcode(uint16_t opcode) {
    uint8_t first_byte = (uint8_t) (opcode >> 8);
    if (first_byte == EXTENDED_OPCODE_TABLE1 || first_byte == EXTENDED_OPCODE_TABLE2) {
        EMIT(uint16_t, opcode);
    } else {
        EMIT(uint8_t, (uint8_t) opcode);
    }
}

// Assembly:
pushq %rax
movl %edi, %eax
andl $0xfe00, %eax           # imm = 0xFE00
cmpl $0xf800, %eax           # imm = 0xF800
jne 0x6244
leaq 0x6(%rsp), %rdx
movw %di, (%rdx)
movq 0x1136a(%rip), %rdi     # 0x175a0
movq 0x113ab(%rip), %rcx     # 0x175e8
movl $0x2, %esi
jmp 0x625f
leaq 0x5(%rsp), %rdx
movb %dil, (%rdx)
movq 0x1134d(%rip), %rdi     # 0x175a0
movq 0x1138e(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: emit_stack_push_value
static void emit_stack_push_value(int32_t val) {
    int ret = alloc_register();

    if (ret < 0) {
        error_alloc_register();
        return;
    }

    uint8_t reg = (uint8_t) ret;

    emit_leti(reg, val);
    emit_stack_push(reg);

    free_register(reg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
xorl %r15d, %r15d
leaq 0x1132d(%rip), %r14     # 0x175a8
cmpb $0x1, 0x7a(%r15,%r14)
je 0x6297
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x627b
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x62a3
movb $0x0, 0x7a(%r15,%r14)
incl 0x112f5(%rip)           # 0x17598
testl %r15d, %r15d
js 0x6347
leaq 0xa(%rsp), %rdx
movb $0x9, (%rdx)
movq 0x112e5(%rip), %rdi     # 0x175a0
movq 0x11326(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
leaq 0xb(%rsp), %rdx
movb %r15b, (%rdx)
movq 0x112c5(%rip), %rdi     # 0x175a0
movq 0x11306(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
leaq 0xc(%rsp), %rdx
movl %ebx, (%rdx)
movq 0x112a6(%rip), %rdi     # 0x175a0
movq 0x112e7(%rip), %rcx     # 0x175e8
movl $0x4, %esi
callq 0x4574
movzbl %r15b, %ebx
movl %ebx, %edi
callq 0x6180
cmpb $0x1, 0x7a(%rbx,%r14)
jne 0x6331
leaq 0x112ab(%rip), %rdi     # 0x175d0
leaq 0x3fc8(%rip), %rsi      # 0xa2f4
callq 0x6108
movb $0x1, 0x7a(%rbx,%r14)
decl 0x1125b(%rip)           # 0x17598
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x11282(%rip), %rdi     # 0x175d0
leaq 0x3f83(%rip), %rsi      # 0xa2d8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x6108
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: emit_conditional_jump_rr
static void emit_conditional_jump_rr(uint16_t opcode, uint8_t reg1, uint8_t reg2, size_t label) {
    emit_opcode(opcode);
    emit_register(reg1);
    emit_register(reg2);
    emit_word((int16_t) label);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
callq 0x6218
leaq 0xc(%rsp), %rdx
movb %r14b, (%rdx)
movq 0x11219(%rip), %rdi     # 0x175a0
movq 0x1125a(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
leaq 0xd(%rsp), %rdx
movb %bpl, (%rdx)
movq 0x111f9(%rip), %rdi     # 0x175a0
movq 0x1123a(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
leaq 0xe(%rsp), %rdx
movw %bx, (%rdx)
movq 0x111d9(%rip), %rdi     # 0x175a0
movq 0x1121a(%rip), %rcx     # 0x175e8
movl $0x2, %esi
callq 0x4574
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: emit_conditional_jump_ri
static void emit_conditional_jump_ri(uint16_t opcode, uint8_t reg, int32_t val, size_t label) {
    emit_opcode(opcode);
    emit_register(reg);
    emit_dword(val);
    emit_word((int16_t) label);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
callq 0x6218
leaq 0x1(%rsp), %rdx
movb %bpl, (%rdx)
movq 0x11155(%rip), %rdi     # 0x175a0
movq 0x11196(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
leaq 0x4(%rsp), %rdx
movl $0x0, (%rdx)
movq 0x11132(%rip), %rdi     # 0x175a0
movq 0x11173(%rip), %rcx     # 0x175e8
movl $0x4, %esi
callq 0x4574
leaq 0x2(%rsp), %rdx
movw %bx, (%rdx)
movq 0x11112(%rip), %rdi     # 0x175a0
movq 0x11153(%rip), %rcx     # 0x175e8
movl $0x2, %esi
callq 0x4574
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: let_declaration
static void let_declaration(void) {
    int ret = parse_variable("Expected variable name");

    if (ret < 0) {
        error_alloc_register();
        return;
    }

    uint8_t reg = (uint8_t) ret;

    bool initialized = false;

    if (match(TOKEN_EQUAL)) {
        expression();
        initialized = true;
    } else {
        emit_stack_push_value(0);
    }

    consume(TOKEN_SEMICOLON, "Expected ';' after variable declaration");

    Local* local = &current->locals[current->local_count - 1];
    define_variable(reg, local);

    local->initialized = initialized;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x403d(%rip), %rdi      # 0xa4ee
callq 0x6d97
testl %eax, %eax
js 0x64d8
movl %eax, %ebx
movl 0x110e6(%rip), %ebp     # 0x175a8
cmpl $0xe, %ebp
jne 0x64ef
callq 0x5b04
movl $0x1, %edi
callq 0x606f
jmp 0x64f6
leaq 0x110f1(%rip), %rdi     # 0x175d0
leaq 0x3df2(%rip), %rsi      # 0xa2d8
popq %rbx
popq %r14
popq %rbp
jmp 0x6108
xorl %edi, %edi
callq 0x6266
cmpl $0x7, 0x110ab(%rip)     # 0x175a8
jne 0x6506
callq 0x5b04
jmp 0x6519
leaq 0x1109b(%rip), %rdi     # 0x175a8
leaq 0x3ff1(%rip), %rsi      # 0xa505
callq 0x6108
movq 0x11068(%rip), %rax     # 0x17588
movq 0x3000(%rax), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
leaq (%rcx,%rax), %r14
addq $-0x30, %r14
movl 0x3008(%rax), %eax
testl %eax, %eax
jle 0x6556
movb $0x1, 0x2d(%r14)
movb %bl, 0x2e(%r14)
movl %eax, 0x28(%r14)
movzbl %bl, %edi
callq 0x61cc
cmpl $0xe, %ebp
sete 0x2c(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: emit_void_return
static void emit_void_return(void) {
    emit_stack_push_value(0);

    if (parser.current_function_label != entry_point_label) {
        emit_stack_swap();
    }

    emit_opcode(OP_RET);
}

// Assembly:
pushq %rax
xorl %edi, %edi
callq 0x6266
movq 0x107f8(%rip), %rax     # 0x17750
cmpq 0x10631(%rip), %rax     # 0x17590
je 0x6f66
callq 0x7023
leaq 0x7(%rsp), %rdx
movb $0x1, (%rdx)
movq 0x1062b(%rip), %rdi     # 0x175a0
movq 0x1066c(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: end_scope
static void end_scope(void) {
    current->scope_depth--;

    while (current->local_count > 0 && current->locals[current->local_count - 1].depth > current->scope_depth) {
        free_register(current->locals[current->local_count - 1].reg);
        current->local_count--;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x105f1(%rip), %rax     # 0x17588
decl 0x3008(%rax)
movq 0x3000(%rax), %rcx
testq %rcx, %rcx
je 0x7017
leaq 0x105f8(%rip), %r15     # 0x175a8
leaq 0x10619(%rip), %rbx     # 0x175d0
leaq 0x3336(%rip), %r14      # 0xa2f4
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl -0x8(%rcx,%rax), %edx
cmpl 0x3008(%rax), %edx
jle 0x7017
addq %rcx, %rax
addq $-0x30, %rax
movzbl 0x2e(%rax), %r12d
cmpb $0x1, 0x7a(%r12,%r15)
jne 0x6ff1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6108
movb $0x1, 0x7a(%r12,%r15)
decl 0x1059b(%rip)           # 0x17598
movq 0x10584(%rip), %rax     # 0x17588
movq 0x3000(%rax), %rcx
decq %rcx
movq %rcx, 0x3000(%rax)
jne 0x6fbe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: emit_stack_swap
static void emit_stack_swap(void) {
    int ret = alloc_register();

    if (ret < 0) {
        error_alloc_register();
        return;
    }

    uint8_t reg1 = (uint8_t) ret;

    ret = alloc_register();

    if (ret < 0) {
        free_register(reg1);
        error_alloc_register();
        return;
    }

    uint8_t reg2 = (uint8_t) ret;

    emit_stack_pop(reg1);
    emit_stack_pop(reg2);
    emit_stack_push(reg1);
    emit_stack_push(reg2);

    free_register(reg1);
    free_register(reg2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0x10570(%rip), %r14     # 0x175a8
cmpb $0x1, 0x7a(%r15,%r14)
je 0x7054
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x7038
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x7060
movb $0x0, 0x7a(%r15,%r14)
incl 0x10538(%rip)           # 0x17598
testl %r15d, %r15d
js 0x7158
xorl %r12d, %r12d
cmpb $0x1, 0x7a(%r12,%r14)
je 0x7088
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x706c
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x7094
movb $0x0, 0x7a(%r12,%r14)
incl 0x10504(%rip)           # 0x17598
testl %r12d, %r12d
js 0x712d
movzbl %r15b, %ebx
movl %ebx, %edi
callq 0x61cc
movl $0xff, %r13d
movl %r12d, %ebp
andl %r13d, %ebp
movl %ebp, %edi
callq 0x61cc
movl %ebx, %edi
callq 0x6180
movl %ebp, %edi
callq 0x6180
andl %r13d, %r15d
cmpb $0x1, 0x7a(%r15,%r14)
jne 0x70e7
leaq 0x104f5(%rip), %rdi     # 0x175d0
leaq 0x3212(%rip), %rsi      # 0xa2f4
callq 0x6108
decl 0x104ab(%rip)           # 0x17598
movb $0x1, 0x7a(%r15,%r14)
movzbl %r12b, %ebx
cmpb $0x1, 0x7a(%rbx,%r14)
jne 0x7112
leaq 0x104ca(%rip), %rdi     # 0x175d0
leaq 0x31e7(%rip), %rsi      # 0xa2f4
callq 0x6108
movb $0x1, 0x7a(%rbx,%r14)
decl 0x1047a(%rip)           # 0x17598
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl %r15b, %ebx
cmpb $0x1, 0x7a(%rbx,%r14)
jne 0x714c
leaq 0x10490(%rip), %rdi     # 0x175d0
leaq 0x31ad(%rip), %rsi      # 0xa2f4
callq 0x6108
movb $0x1, 0x7a(%rbx,%r14)
decl 0x10440(%rip)           # 0x17598
leaq 0x10471(%rip), %rdi     # 0x175d0
leaq 0x3172(%rip), %rsi      # 0xa2d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6108
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/interpreter.c
// Function: main
int main(int argc, const char* argv[]) {
    init_vm();

    int ret = 0;

    if (argc == 1) {
        repl();
    } else {
        bool bytecode_input = false;

        for (int i = 1; i < argc; i++) {
            if (strcmp(argv[i], "--bytecode") == 0) {
                bytecode_input = true;
                break;
            }
        }

        const char* input_file = argv[argc - 1];

        InterpretResult result;
        if (bytecode_input) {
            result = run_bytecode_file(input_file);
        } else {
            result = run_source_file(input_file);
        }

        switch (result) {
            case INTERPRET_RUNTIME_ERROR:
                fprintf(stderr, "Runtime error\n");
                __attribute__((fallthrough));
            case INTERPRET_COMPILE_ERROR:
                fprintf(stderr, "Compile error\n");
                ret = 1;
                break;
            default:
                break;
        }
    }

    free_vm();
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movl %edi, %ebp
callq 0x8b8c
cmpl $0x1, %ebp
jne 0x75d9
xorl %eax, %eax
leaq 0x10(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movq 0xfa30(%rip), %r12      # 0x16fd0
movq (%r12), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4150
movq %rax, %r15
testq %rax, %rax
js 0x75c3
movq 0x10(%rsp), %rdi
callq 0x9547
jmp 0x75cd
movl $0xa, %edi
callq 0x4040
testq %r15, %r15
jns 0x75a0
xorl %ebp, %ebp
jmp 0x769e
setg %r14b
jle 0x7626
movq 0x8(%rbx), %rdi
leaq 0x30eb(%rip), %rsi      # 0xa6d5
callq 0x40d0
testl %eax, %eax
je 0x7626
movl %ebp, %r15d
movl $0x2, %ecx
leaq 0x30d3(%rip), %r14      # 0xa6d5
movq %rcx, %r12
cmpq %rcx, %r15
je 0x761f
movq (%rbx,%r12,8), %rdi
movq %r14, %rsi
callq 0x40d0
leaq 0x1(%r12), %rcx
testl %eax, %eax
jne 0x7602
cmpq %r15, %r12
setb %r14b
movslq %ebp, %rax
movq -0x8(%rbx,%rax,8), %rdi
testb %r14b, %r14b
je 0x766a
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
movq %r14, %rsi
movl $0x1, %edx
callq 0x47ae
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x454c
movq (%r14), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x8c42
jmp 0x7688
leaq 0x10(%rsp), %r14
movq $0x0, (%r14)
movq %r14, %rsi
xorl %edx, %edx
callq 0x47ae
movq (%r14), %rdi
callq 0x9547
movl %eax, %ebx
movq (%r14), %rdi
callq 0x4030
cmpl $0x1, %ebx
je 0x76b7
xorl %ebp, %ebp
cmpl $0x2, %ebx
je 0x76b2
callq 0x8bce
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x4321
callq 0x4343
movl $0x1, %ebp
jmp 0x769e
nop
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/memory.c
// Function: reallocate
void* reallocate(void* pointer, size_t old_size, size_t new_size) {
    (void) old_size;

    if (new_size == 0) {
        free(pointer);
        return NULL;
    }

    void* result = realloc(pointer, new_size);
    if (result == NULL) exit(1);
    return result;
}

// Assembly:
pushq %rax
testq %rdx, %rdx
je 0x76e1
movq %rdx, %rsi
callq 0x4130
testq %rax, %rax
jne 0x76e8
movl $0x1, %edi
callq 0x4160
callq 0x4030
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/object.c
// Function: copy_string
ObjString* copy_string(const char* chars, size_t length) {
    uint32_t hash = hash_string(chars, length);

    char* heap_chars = ALLOCATE(char, length + 1);
    memcpy(heap_chars, chars, length);
    heap_chars[length] = '\0';

    return allocate_string(heap_chars, length, hash);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x811c9dc5, %ebp       # imm = 0x811C9DC5
testq %rsi, %rsi
je 0x7768
xorl %eax, %eax
movzbl (%r14,%rax), %ecx
xorl %ebp, %ecx
imull $0x1000193, %ecx, %ebp  # imm = 0x1000193
incq %rax
cmpq %rax, %rbx
jne 0x7753
leaq 0x1(%rbx), %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x76c4
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4100
movb $0x0, (%r15,%rbx)
movl $0x20, %edx
xorl %edi, %edi
xorl %esi, %esi
callq 0x76c4
movl $0x0, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x10(%rax)
movl %ebp, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/opcodes.c
// Function: get_opcode_definition
const OpcodeDefinition* get_opcode_definition(Opcode opcode) {
    for (size_t i = 0; i < NUM_OPCODES; i++) {
        if (opcodes[i].opcode == opcode) {
            return &opcodes[i];
        }
    }

    return NULL;
}

// Assembly:
xorl %eax, %eax
leaq 0x77df(%rip), %rcx      # 0xefa0
xorl %edx, %edx
movzwl (%rdx,%rcx), %esi
cmpl %edi, %esi
je 0x77d9
addq $0x40, %rdx
cmpq $0x7e40, %rdx           # imm = 0x7E40
jne 0x77c3
retq
addq %rdx, %rcx
movq %rcx, %rax
retq