LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/mmulti.c
// Function: savesnatchhost
void savesnatchhost(int other)
{
	if (other == myconnectindex) return;

	memcpy(&otherhost[other], &snatchhost, sizeof(snatchhost));
	replyfrom4[other] = snatchreplyfrom4;
	replyfrom6[other] = snatchreplyfrom6;
}

// Assembly:
cmpl %edi, 0x746a8d(%rip)    # 0x79bb24
je 0x550e0
movslq %edi, %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq 0x7460a6(%rip), %rdi    # 0x79b150
addq %rcx, %rdi
leaq 0x7469dc(%rip), %rsi    # 0x79ba90
pushq $0x10
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
leaq 0x74688f(%rip), %rcx    # 0x79b950
movl 0x746a49(%rip), %edx    # 0x79bb10
movl %edx, (%rcx,%rax,4)
shlq $0x4, %rax
leaq 0x7468bb(%rip), %rcx    # 0x79b990
movups 0x746a38(%rip), %xmm0   # 0x79bb14
movups %xmm0, (%rax,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/test-dissect.c
// Function: r_symbol
static void r_symbol(unsigned mode, struct position *pos, struct symbol *sym)
{
	print_usage(pos, sym, mode);

	if (!sym->ident)
		sym->ident = built_in_ident("__asm__");

	printf("%c %c %-32.*s %s\n",
		symscope(sym), sym->kind, sym->ident->len, sym->ident->name,
		show_typename(sym->ctype.base_type));

	switch (sym->kind) {
	case 'd':
		break;
	case 's':
		if (sym->type == SYM_STRUCT || sym->type == SYM_UNION)
			break;
		goto err;
	case 't':
		break;
	case 'f':
		if (sym->type != SYM_BAD && sym->ctype.base_type->type != SYM_FN)
			goto err;
	case 'v':
		if (sym->type == SYM_NODE || sym->type == SYM_BAD)
			break;
		goto err;
	default:
		goto err;
	}

	return;
err:
	warning(*pos, "r_symbol bad sym type=%d kind=%d", sym->type, sym->kind);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %esi
movq %rbx, %rdi
callq 0xe6a7
cmpq $0x0, 0x18(%r14)
jne 0xe499
leaq 0x2bb74(%rip), %rdi     # 0x3a004
callq 0x1f179
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0xe775
movzbl %al, %ebp
movsbl 0xd0(%r14), %r15d
movq 0x18(%r14), %r12
movq 0x60(%r14), %rdi
movzbl 0x10(%r12), %r13d
addq $0x12, %r12
callq 0x1ac66
leaq 0x2bb42(%rip), %rdi     # 0x3a00c
movl %ebp, %esi
movl %r15d, %edx
movl %r13d, %ecx
movq %r12, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xe0f0
movzbl 0xd0(%r14), %eax
cmpl $0x64, %eax
je 0xe530
cmpl $0x66, %eax
je 0xe506
cmpl $0x73, %eax
je 0xe524
cmpl $0x74, %eax
je 0xe530
cmpl $0x76, %eax
jne 0xe53f
movzbl (%r14), %edx
jmp 0xe518
movzbl (%r14), %edx
cmpl $0x10, %edx
je 0xe518
movq 0x60(%r14), %rcx
cmpb $0x5, (%rcx)
jne 0xe543
cmpl $0x3, %edx
je 0xe530
cmpl $0x10, %edx
je 0xe530
jmp 0xe543
movzbl (%r14), %edx
leal -0x7(%rdx), %ecx
cmpl $0x2, %ecx
jae 0xe543
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl (%r14), %edx
movsbl %al, %ecx
movq (%rbx), %rdi
leaq 0x2bace(%rip), %rsi     # 0x3a01e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfc62
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/test-dissect.c
// Function: r_member
static void r_member(unsigned mode, struct position *pos, struct symbol *sym, struct symbol *mem)
{
	struct ident *ni, *si, *mi;

	print_usage(pos, sym, mode);

	ni = built_in_ident("?");
	si = sym->ident ?: ni;
	/* mem == NULL means entire struct accessed */
	mi = mem ? (mem->ident ?: ni) : built_in_ident("*");

	printf("%c m %.*s.%-*.*s %s\n",
		symscope(sym), si->len, si->name,
		32-1 - si->len, mi->len, mi->name,
		show_typename(mem ? mem->ctype.base_type : sym));

	if (sym->ident && sym->kind != 's')
		warning(*pos, "r_member bad sym type=%d kind=%d", sym->type, sym->kind);
	if (mem && mem->kind != 'm')
		warning(*pos, "r_member bad mem->kind = %d", mem->kind);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rax
movl %edi, %esi
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0xe6a7
leaq 0x3587a(%rip), %rdi     # 0x43e0c
callq 0x1f179
movq 0x18(%r15), %r12
testq %r12, %r12
cmoveq %rax, %r12
testq %r14, %r14
je 0xe5b7
movq %rax, %r13
movq 0x18(%r14), %rax
testq %rax, %rax
cmovneq %rax, %r13
jmp 0xe5c6
leaq 0x35b42(%rip), %rdi     # 0x44100
callq 0x1f179
movq %rax, %r13
movq %r15, %rdi
callq 0xe775
movzbl 0x10(%r12), %ebp
addq $0x12, %r12
pushq $0x1f
popq %rbx
subl %ebp, %ebx
leaq 0x12(%r13), %rcx
movq %rcx, 0x18(%rsp)
movzbl %al, %eax
movl %eax, 0xc(%rsp)
movzbl 0x10(%r13), %r13d
movq %r15, %rdi
testq %r14, %r14
je 0xe5fe
movq 0x60(%r14), %rdi
movq %r14, 0x20(%rsp)
callq 0x1ac66
movq %rax, %r10
leaq 0x2ba5e(%rip), %rdi     # 0x3a070
movl 0xc(%rsp), %esi
movl %ebp, %edx
movq %r12, %rcx
movl %ebx, %r8d
movl %r13d, %r9d
xorl %eax, %eax
pushq %r10
pushq 0x20(%rsp)
callq 0xe0f0
popq %rcx
popq %rdx
cmpq $0x0, 0x18(%r15)
je 0xe65e
movsbl 0xd0(%r15), %ecx
cmpl $0x73, %ecx
je 0xe65e
movzbl (%r15), %edx
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x2ba2e(%rip), %rsi     # 0x3a085
xorl %eax, %eax
callq 0xfc62
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xe674
movsbl 0xd0(%rax), %edx
cmpl $0x6d, %edx
jne 0xe683
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x2ba14(%rip), %rsi     # 0x3a0a6
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfc62
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/test-dissect.c
// Function: print_usage
static void print_usage(struct position *pos, struct symbol *sym, unsigned mode)
{
	static unsigned curr_stream = -1;
	static struct ident null;
	struct ident *ctx = &null;

	if (curr_stream != pos->stream) {
		curr_stream = pos->stream;
		printf("\nFILE: %s\n\n", stream_name(curr_stream));
	}

	if (dissect_ctx)
		ctx = dissect_ctx->ident;

	printf("%4d:%-3d %-16.*s %s ",
		pos->line, pos->pos, ctx->len, ctx->name, show_mode(mode));

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl (%rdi), %edi
shrl $0x6, %edi
andl $0x3fff, %edi           # imm = 0x3FFF
cmpl %edi, 0x4daff(%rip)     # 0x5c1c0
je 0xe6df
movl %edi, 0x4daf7(%rip)     # 0x5c1c0
callq 0x1e978
leaq 0x2b96a(%rip), %rdi     # 0x3a03f
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
leaq 0x52eca(%rip), %rax     # 0x615b0
movq (%rax), %rax
testq %rax, %rax
je 0xe6f4
movq 0x18(%rax), %r8
jmp 0xe6fb
leaq 0x52e8d(%rip), %r8      # 0x61588
movq (%r14), %rsi
movzbl 0x10(%r8), %ecx
cmpl $-0x1, %ebx
je 0xe746
movl %ebx, %eax
andl $0x3, %eax
leaq 0x2b94c(%rip), %rdx     # 0x3a060
movb (%rax,%rdx), %al
movb %al, 0x52e83(%rip)      # 0x615a0
leaq 0x52e7c(%rip), %r9      # 0x615a0
movl %ebx, %eax
shrl $0x2, %eax
andl $0x3, %eax
movb (%rax,%rdx), %al
movb %al, 0x52e6c(%rip)      # 0x615a1
shrl $0xa, %ebx
andl $0x3, %ebx
movb (%rbx,%rdx), %al
movb %al, 0x52e5e(%rip)      # 0x615a2
jmp 0xe74d
leaq 0x2d15f(%rip), %r9      # 0x3b8ac
addq $0x12, %r8
movl %esi, %edx
shrl $0x16, %edx
shrq $0x20, %rsi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq 0x2b8e4(%rip), %rdi     # 0x3a04b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe0f0
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/test-dissect.c
// Function: symscope
static char symscope(struct symbol *sym)
{
	if (sym_is_local(sym)) {
		if (!dissect_ctx)
			warning(sym->pos, "no context");
		return '.';
	}
	return ' ';
}

// Assembly:
pushq %rbx
movq 0x30(%rdi), %rax
leaq 0x51397(%rip), %rcx     # 0x5fb18
movb $0x20, %bl
cmpq %rax, (%rcx)
je 0xe7b5
leaq 0x51391(%rip), %rcx     # 0x5fb20
cmpq %rax, (%rcx)
je 0xe7b5
leaq 0x52e15(%rip), %rax     # 0x615b0
movb $0x2e, %bl
cmpq $0x0, (%rax)
jne 0xe7b5
movq 0x4(%rdi), %rdi
leaq 0x2b8b7(%rip), %rsi     # 0x3a065
xorl %eax, %eax
callq 0xfc62
movl %ebx, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/parsenum/main.c
// Function: parsenum_equal
static int
parsenum_equal(double x, double y)
{

#if defined(__clang__)
	_Pragma("clang diagnostic push")
	_Pragma("clang diagnostic ignored \"-Wconversion\"")
	_Pragma("clang diagnostic ignored \"-Wdouble-promotion\"")
#endif

	/* Check special status. */
	if (fpclassify(x) != fpclassify(y))
		return (0);

	/* Deal with NANs. */
	if (isnan(x) && isnan(y))
		return (1);

	/* If signs do not match, the numbers are not equal. */
	if (signbit(x) != signbit(y))
		return (0);

	/* Deal with infinities. */
	if (isinf(x) && isinf(y))
		return (1);

	/* Deal with zeros. */
	if ((fpclassify(x) == FP_ZERO) && (fpclassify(y) == FP_ZERO))
		return (1);

#if defined(__clang__)
	_Pragma("clang diagnostic pop")
#endif

	/* Deal with real numbers. */
	if ((fabs(x - y) < 1) && (fabs(x - y) <= fabs(x + y) * 1e-6))
		return (1);

	/* Not equal. */
	return (0);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movsd %xmm1, 0x8(%rsp)
movaps %xmm0, 0x10(%rsp)
callq 0x10c0
movl %eax, %ebx
movsd 0x8(%rsp), %xmm0
callq 0x10c0
cmpl %eax, %ebx
jne 0x37d3
movapd 0x10(%rsp), %xmm2
ucomisd %xmm2, %xmm2
pushq $0x1
popq %rax
movsd 0x8(%rsp), %xmm3
jnp 0x375f
ucomisd %xmm3, %xmm3
jp 0x37d5
movq %xmm2, %rcx
movq %xmm3, %rdx
movq %rdx, %rsi
xorq %rcx, %rsi
js 0x37d3
btrq $0x3f, %rcx
movabsq $0x7ff0000000000000, %rsi # imm = 0x7FF0000000000000
xorq %rsi, %rcx
btrq $0x3f, %rdx
xorq %rsi, %rdx
orq %rcx, %rdx
sete %cl
cmpl $0x2, %ebx
sete %dl
orb %cl, %dl
jne 0x37d5
movapd %xmm2, %xmm0
subsd %xmm3, %xmm0
andpd 0x975(%rip), %xmm0      # 0x4120
movsd 0x93d(%rip), %xmm1      # 0x40f0
ucomisd %xmm0, %xmm1
jbe 0x37d3
addsd %xmm3, %xmm2
andpd 0x95b(%rip), %xmm2      # 0x4120
mulsd 0x92b(%rip), %xmm2      # 0x40f8
ucomisd %xmm0, %xmm2
jae 0x37d5
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/bench/hotspot_read/main.c
// Function: sendbatch
static int
sendbatch(struct hotspotread_state * C)
{

	while (C->Nip < 4096) {
		/* Do we need to pick a new batch? */
		if (C->Y == 65536) {
			C->X = (size_t)random() % C->Xmax;
			C->Y = 0;
		}

		/* Generate a key. */
		mkkey(C->X, C->Y++, C->key->buf);

		/* Send the request. */
		if (proto_kvlds_request_get(C->Q, C->key,
		    callback_get, C))
			goto err0;
		C->Nip += 1;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x10(%rdi), %rax
xorl %ebx, %ebx
leaq 0x78(%rip), %r15        # 0x276d
pushq $-0x1
popq %rbp
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2760
movq 0x20(%r14), %rsi
cmpq $0x10000, %rsi          # imm = 0x10000
jne 0x2723
callq 0x2210
xorl %edx, %edx
divq 0x28(%r14)
movq %rdx, %rdi
movq %rdx, 0x18(%r14)
xorl %esi, %esi
jmp 0x2727
movq 0x18(%r14), %rdi
leaq 0x1(%rsi), %rax
movq %rax, 0x20(%r14)
movq 0x38(%r14), %rdx
incq %rdx
callq 0x50a0
movq (%r14), %rdi
movq 0x38(%r14), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x5b8e
testl %eax, %eax
jne 0x275e
movq 0x10(%r14), %rax
incq %rax
movq %rax, 0x10(%r14)
jmp 0x26f8
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/pattern_match/ac_auto/ac_auto.c
// Function: compare
int compare(void *args, int i, int j) {
    char **        args_patterns = (char **)(((void **)args)[0]);
    ac_tree_node **args_nodes = (ac_tree_node **)(((void **)args)[1]);

    int res = args_nodes[j]->match_number - args_nodes[i]->match_number;
    if (res == 0) {
        res = compare_string(args_patterns[i], args_patterns[j]);
    }
    return res;
}

// Assembly:
movq 0x8(%rdi), %r8
movslq %edx, %rcx
movq (%r8,%rcx,8), %rax
movl 0x1c(%rax), %eax
movslq %esi, %rdx
movq (%r8,%rdx,8), %rsi
subl 0x1c(%rsi), %eax
je 0x2fd7
retq
movq (%rdi), %rax
movq (%rax,%rdx,8), %rdi
movq (%rax,%rcx,8), %rsi
jmp 0x206d
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_04/celsius_fahrenheit.c
// Function: main
int main(void)
{
  float celsius, fahr;
  int lower, upper, step;

  lower = 0;
  upper = 300;
  step = 20;

  printf("Celsius\tFahr\n");
  printf("---------------\n");

  celsius = lower;
  while (celsius <= upper)
  {
    fahr = (9.0 / 5.0) * celsius + 32.0f;
    printf("%3.0f\t\t%6.1f\n", celsius, fahr);
    celsius = celsius + step;
  }

  return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xed6(%rip), %rdi       # 0x202e
callq 0x1030
leaq 0xed7(%rip), %rdi       # 0x203b
callq 0x1030
xorps %xmm0, %xmm0
leaq 0xead(%rip), %rbx       # 0x2020
movss 0xe89(%rip), %xmm1      # 0x2004
ucomiss %xmm0, %xmm1
jb 0x11c1
movss %xmm0, 0xc(%rsp)
cvtss2sd 0xc(%rsp), %xmm0
movaps %xmm0, %xmm1
mulsd 0xe79(%rip), %xmm1      # 0x2010
addsd 0xe79(%rip), %xmm1      # 0x2018
cvtsd2ss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
movq %rbx, %rdi
movb $0x2, %al
callq 0x1040
movss 0xc(%rsp), %xmm0
addss 0xe49(%rip), %xmm0      # 0x2008
jmp 0x1173
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-trace.c
// Function: handle_kill
static void handle_kill(int sig) {
  _u32 i;
  shmctl(shmid, IPC_RMID, 0);
  if (orig_pid > 0) kill(orig_pid,SIGKILL);
  for (i=0;i<proc_cnt;i++) kill(procs[i].pid,SIGKILL);
  fflush(outfile);
  debug("--- Tracer exiting on signal %d ---\n",sig);
  exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl 0x33ba(%rip), %edi      # 0x5128
xorl %esi, %esi
xorl %edx, %edx
callq 0x10c0
movl 0x33bb(%rip), %edi      # 0x5138
testl %edi, %edi
jle 0x1d89
pushq $0x9
popq %rsi
callq 0x1160
xorl %r14d, %r14d
pushq $0x9
popq %rbp
xorl %r15d, %r15d
movl 0x33a4(%rip), %eax      # 0x513c
cmpq %rax, %r15
jae 0x1db8
movq 0x339c(%rip), %rax      # 0x5140
movl (%rax,%r14), %edi
movl %ebp, %esi
callq 0x1160
incq %r15
addq $0x28, %r14
jmp 0x1d92
movq 0x3361(%rip), %rdi      # 0x5120
callq 0x1110
movq 0x3215(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x143c(%rip), %rsi      # 0x3211
movl %ebx, %edx
xorl %eax, %eax
callq 0x1170
pushq $0x1
popq %rdi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-trace.c
// Function: report_kids
static _u8 report_kids(void) {
  _s32 rno;
  _u32 i;

  static _s32 pid;
  static _u32 st;

  if (pid >= 0) {
    pid = waitpid(orig_pid,&st,WNOHANG);
    /* Process still running or just done? */
    if (pid >= 0) return 0;
  }

  /* Process gone at least a round ago... */

  rno = get_procentry(orig_pid,0);

  if (rno < 0) {

    if (WIFEXITED(st))     
      outf("--- Untraced process %u exited (code=%u) ---\n",orig_pid,WEXITSTATUS(st));
    else 
      outf("--- Untraced process %u killed (signal %u) ---\n",orig_pid,WTERMSIG(st));

  } else {

    if (WIFEXITED(st)) 
      outf("--- Process %u exited (code=%u) ---\n",orig_pid,WEXITSTATUS(st));
    else 
      outf("--- Process %u killed (signal %u) ---\n",orig_pid,WTERMSIG(st));

  }

  if (shmreg->child_crash)
    outf("--- (Child process %u crashed) ---\n",shmreg->child_crash);

  for (i=0;i<proc_cnt;i++) kill(procs[i].pid,SIGKILL);
    
  return 1;
  
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, 0x3211(%rip)      # 0x5148
js 0x1f5f
movl 0x31f9(%rip), %edi      # 0x5138
leaq 0x3206(%rip), %rsi      # 0x514c
pushq $0x1
popq %rdx
callq 0x1090
movl %eax, 0x31f4(%rip)      # 0x5148
testl %eax, %eax
js 0x1f5f
xorl %eax, %eax
jmp 0x2015
movl 0x31d3(%rip), %edi      # 0x5138
xorl %esi, %esi
callq 0x201b
movl 0x31da(%rip), %ebx      # 0x514c
movl %ebx, %ecx
andl $0x7f, %ecx
movq 0x31a2(%rip), %rdi      # 0x5120
movl 0x31b4(%rip), %edx      # 0x5138
testl %eax, %eax
js 0x1f95
testl %ecx, %ecx
je 0x1fa2
leaq 0x1495(%rip), %rsi      # 0x3428
jmp 0x1fb8
testl %ecx, %ecx
je 0x1fae
leaq 0x1433(%rip), %rsi      # 0x33d3
jmp 0x1fb8
movzbl %bh, %ecx
leaq 0x1457(%rip), %rsi      # 0x3403
jmp 0x1fb8
movzbl %bh, %ecx
leaq 0x13ed(%rip), %rsi      # 0x33a5
xorl %eax, %eax
callq 0x1170
movq 0x316a(%rip), %rax      # 0x5130
cmpl $0x0, 0x10(%rax)
je 0x1fe4
movq 0x314d(%rip), %rdi      # 0x5120
movl 0x10(%rax), %edx
leaq 0x1472(%rip), %rsi      # 0x344f
xorl %eax, %eax
callq 0x1170
xorl %r14d, %r14d
pushq $0x9
popq %rbx
xorl %r15d, %r15d
movl 0x3149(%rip), %eax      # 0x513c
cmpq %rax, %r15
jae 0x2013
movq 0x3141(%rip), %rax      # 0x5140
movl (%rax,%r14), %edi
movl %ebx, %esi
callq 0x1160
incq %r15
addq $0x28, %r14
jmp 0x1fed
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-trace.c
// Function: do_indent
static void do_indent(_u32 pid,_s32 level,_s8 cor) {
  _s32 i;

  if (level < 0) {  
    outf("[%05u] %+02d < ", pid,level);
  } else {
    outf("[%05u] %03d ", pid,level);
    for (i=0;i<level+cor;i++) outf("| ");
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movl %edi, %edx
movq 0x301e(%rip), %rdi      # 0x5120
testl %esi, %esi
js 0x215b
leaq 0x1400(%rip), %rsi      # 0x350d
xorl %r14d, %r14d
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1170
movsbl %bpl, %ebp
addl %ebx, %ebp
testl %ebp, %ebp
cmovlel %r14d, %ebp
leaq 0x13ee(%rip), %rbx      # 0x351a
pushq $0x2
popq %r14
pushq $0x1
popq %r15
subl $0x1, %ebp
jb 0x2150
movq 0x2fe0(%rip), %rcx      # 0x5120
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x11e0
jmp 0x2134
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x139b(%rip), %rsi      # 0x34fd
movl %ebx, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1170
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/cmd/blu.c
// Function: main
int main(int argc, const char* argv[]) {
	if (argc == 1) {
		repl();
	} else if (argc == 2) {
		if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0) {
			help();
		} else if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-v") == 0) {
			version();
		} else {
			runFile(argv[1]);
		}
	} else {
		help();
		exit(64);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
cmpl $0x2, %edi
je 0x2391
cmpl $0x1, %edi
jne 0x24f8
xorl %eax, %eax
callq 0x68cc
movq %rax, %rbx
leaq 0x6cc9(%rip), %r14      # 0x9015
movq 0xcc85(%rip), %r13      # 0xefd8
movq %rsp, %r15
leaq 0x6cbb(%rip), %r12      # 0x9018
movq %r14, %rdi
xorl %eax, %eax
callq 0x20f0
movq (%r13), %rdx
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x2120
testq %rax, %rax
je 0x24b1
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x69db
jmp 0x235d
movq 0x8(%rsi), %rbx
leaq 0x6c68(%rip), %rsi      # 0x9004
movq %rbx, %rdi
callq 0x2130
testl %eax, %eax
je 0x24c3
movb (%rbx), %bpl
cmpb $0x2d, %bpl
jne 0x23c5
cmpb $0x68, 0x1(%rbx)
jne 0x23c5
cmpb $0x0, 0x2(%rbx)
je 0x24c3
leaq 0x6c3f(%rip), %rsi      # 0x900b
movq %rbx, %rdi
callq 0x2130
testl %eax, %eax
je 0x24ca
cmpb $0x2d, %bpl
jne 0x23f2
cmpb $0x76, 0x1(%rbx)
jne 0x23f2
cmpb $0x0, 0x2(%rbx)
je 0x24ca
xorl %eax, %eax
callq 0x68cc
movq %rax, %r14
leaq 0x6c36(%rip), %rsi      # 0x9039
movq %rbx, %rdi
callq 0x21c0
testq %rax, %rax
je 0x2501
movq %rax, %r15
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x21a0
movq %r15, %rdi
callq 0x2150
movq %rax, %r13
movq %r15, %rdi
callq 0x2100
leaq 0x1(%r13), %rdi
callq 0x2170
testq %rax, %rax
je 0x2514
movq %rax, %r12
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq 0x2080
cmpq %r13, %rax
jb 0x2527
movb $0x0, (%r12,%rax)
movq %r15, %rdi
callq 0x20d0
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x69db
movl %eax, %ebx
movq %r12, %rdi
callq 0x2030
movq %r14, %rdi
callq 0x6963
cmpl $0x3, %ebx
je 0x2546
cmpl $0x2, %ebx
je 0x254a
cmpl $0x1, %ebx
jne 0x24e4
pushq $0x41
jmp 0x254c
pushq $0xa
popq %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x6963
jmp 0x24e4
callq 0x2552
jmp 0x24e4
leaq 0x6b5f(%rip), %rdi      # 0x9030
leaq 0x6b51(%rip), %rsi      # 0x9029
movl $0x1770, %edx           # imm = 0x1770
xorl %eax, %eax
callq 0x20f0
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2552
pushq $0x40
jmp 0x254c
movq 0xcaf0(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x6b2a(%rip), %rsi      # 0x903c
jmp 0x2538
movq 0xcadd(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x6b32(%rip), %rsi      # 0x9057
jmp 0x2538
movq 0xcaca(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x6b40(%rip), %rsi      # 0x9078
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2140
pushq $0x4a
jmp 0x254c
pushq $0x4b
jmp 0x254c
pushq $0x46
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/chunk.c
// Function: bluChunkInit
void bluChunkInit(bluChunk* chunk) {
	chunk->file = NULL;
	chunk->name = NULL;

	ByteBufferInit(&chunk->code);
	IntBufferInit(&chunk->lines);
	IntBufferInit(&chunk->columns);

	bluValueBufferInit(&chunk->constants);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x10, %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
callq 0x257c
leaq 0x20(%rbx), %rdi
callq 0x260c
leaq 0x30(%rbx), %rdi
callq 0x260c
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/chunk.c
// Function: bluChunkFree
void bluChunkFree(bluChunk* chunk) {
	ByteBufferFree(&chunk->code);
	IntBufferFree(&chunk->lines);
	IntBufferFree(&chunk->columns);

	bluValueBufferFree(&chunk->constants);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x2583
leaq 0x20(%rbx), %rdi
callq 0x2613
leaq 0x30(%rbx), %rdi
callq 0x2613
addq $0x40, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x26e7
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: at
static void at(bluCompiler* compiler, bool canAssign) {
	if (compiler->classCompiler == NULL) {
		error(compiler, "Cannot use '@' outside of a class.");
		return;
	}

	variable(compiler, false);
	if (check(compiler, TOKEN_IDENTIFIER)) {
		dot(compiler, canAssign);
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x29a2
movl %esi, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2d4b
movq 0x8(%rbx), %rax
cmpl $0x19, 0x40(%rax)
jne 0x29b7
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2b7b
leaq 0x671e(%rip), %rsi      # 0x90c7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x350f
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: caret
static void caret(bluCompiler* compiler, bool canAssign) {
	if (compiler->classCompiler == NULL) {
		error(compiler, "Cannot use '^' outside of a class.");
	} else if (!compiler->classCompiler->hasSuperclass) {
		// TODO : Every class will have superclass 'Object'
		error(compiler, "Cannot use '^' in a class with no superclass.");
	}

	if (match(compiler, TOKEN_LEFT_PAREN)) {
		namedVariable(compiler, syntheticToken(compiler, "@"), false);

		uint8_t argCount = argumentList(compiler);

		pushSuperclass(compiler);
		emitBytes(compiler, OP_SUPER, argCount);
		emitShort(compiler, makeConstant(compiler, OBJ_VAL(bluCopyString(compiler->vm, "__init", 6))));
		return;
	}

	consume(compiler, TOKEN_IDENTIFIER, "Expect superclass method name.");
	uint8_t name = identifierConstant(compiler, &compiler->parser->previous);

	// Push the receiver.
	namedVariable(compiler, syntheticToken(compiler, "@"), false);

	if (match(compiler, TOKEN_LEFT_PAREN)) {
		uint8_t argCount = argumentList(compiler);

		pushSuperclass(compiler);
		emitBytes(compiler, OP_SUPER, argCount);
		emitShort(compiler, name);
	} else {
		pushSuperclass(compiler);
		emitByte(compiler, OP_GET_SUPER);
		emitShort(compiler, name);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x29e1
cmpb $0x0, 0x28(%rax)
jne 0x29f0
leaq 0x6766(%rip), %rsi      # 0x9145
jmp 0x29e8
leaq 0x673a(%rip), %rsi      # 0x9122
movq %rbx, %rdi
callq 0x350f
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x30a5
testb %al, %al
je 0x2a73
leaq 0x676d(%rip), %rax      # 0x9173
movq %rax, 0x48(%rsp)
movb $0x1, 0x50(%rsp)
movups 0x40(%rsp), %xmm0
movups 0x50(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x35d0
movq %rbx, %rdi
callq 0x3666
movl %eax, %ebp
movq %rbx, %rdi
callq 0x36d5
movzbl %bpl, %edx
pushq $0x14
popq %rsi
movq %rbx, %rdi
callq 0x3710
movq (%rbx), %rdi
leaq 0x671d(%rip), %rsi      # 0x9175
pushq $0x6
popq %rdx
callq 0x58eb
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x374f
jmp 0x2b0c
leaq 0x6702(%rip), %rdx      # 0x917c
pushq $0x19
popq %rsi
movq %rbx, %rdi
callq 0x377a
movq 0x8(%rbx), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x379f
movl %eax, %ebp
leaq 0x66d5(%rip), %rax      # 0x9173
movq %rax, 0x28(%rsp)
movb $0x1, 0x30(%rsp)
movups 0x20(%rsp), %xmm0
movups 0x30(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x35d0
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x30a5
movq %rbx, %rdi
testb %al, %al
je 0x2af8
callq 0x3666
movl %eax, %r14d
movq %rbx, %rdi
callq 0x36d5
movzbl %r14b, %edx
pushq $0x14
popq %rsi
movq %rbx, %rdi
callq 0x3710
jmp 0x2b08
callq 0x36d5
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0x37c2
movzbl %bpl, %eax
movzwl %ax, %esi
movq %rbx, %rdi
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x372f
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: binary
static void binary(bluCompiler* compiler, bool canAssign) {
	bluTokenType operatorType = compiler->parser->previous.type;

	ParseRule* rule = getRule(operatorType);
	parsePrecedence(compiler, (Precedence)(rule->precedence + 1));

	switch (operatorType) {
	case TOKEN_EQUAL_EQUAL: emitByte(compiler, OP_EQUAL); break;
	case TOKEN_BANG_EQUAL: emitByte(compiler, OP_NOT_EQUAL); break;
	case TOKEN_GREATER: emitByte(compiler, OP_GREATER); break;
	case TOKEN_GREATER_EQUAL: emitByte(compiler, OP_GREATER_EQUAL); break;
	case TOKEN_LESS: emitByte(compiler, OP_LESS); break;
	case TOKEN_LESS_EQUAL: emitByte(compiler, OP_LESS_EQUAL); break;
	case TOKEN_MINUS: emitByte(compiler, OP_SUBTRACT); break;
	case TOKEN_PERCENT: emitByte(compiler, OP_REMINDER); break;
	case TOKEN_PLUS: emitByte(compiler, OP_ADD); break;
	case TOKEN_SLASH: emitByte(compiler, OP_DIVIDE); break;
	case TOKEN_STAR: emitByte(compiler, OP_MULTIPLY); break;
	case TOKEN_CARET: emitByte(compiler, OP_POWER); break;
	default: return;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x20(%rax), %r14d
imulq $0x18, %r14, %rax
leaq 0xc5e7(%rip), %rcx      # 0xf120
movl 0x10(%rax,%rcx), %esi
incl %esi
callq 0x3b37
leal -0x1(%r14), %eax
cmpl $0x17, %eax
ja 0x2b73
movl $0xffa801, %ecx         # imm = 0xFFA801
btl %eax, %ecx
jae 0x2b73
movl %eax, %eax
leaq 0x6b07(%rip), %rcx      # 0x9667
movzbl (%rax,%rcx), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x37c2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: dot
static void dot(bluCompiler* compiler, bool canAssign) {
	consume(compiler, TOKEN_IDENTIFIER, "Expect property name after '.'.");
	uint16_t name = identifierConstant(compiler, &compiler->parser->previous);

	if (canAssign && match(compiler, TOKEN_EQUAL)) {
		expression(compiler);
		emitByte(compiler, OP_SET_PROPERTY);
		emitShort(compiler, name);
	} else if (match(compiler, TOKEN_LEFT_PAREN)) {
		uint8_t argCount = argumentList(compiler);
		emitBytes(compiler, OP_INVOKE, argCount);
		emitShort(compiler, name);
	} else {
		emitByte(compiler, OP_GET_PROPERTY);
		emitShort(compiler, name);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x6836(%rip), %rdx      # 0x93c2
pushq $0x19
popq %rsi
callq 0x377a
movq 0x8(%rbx), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x379f
movl %eax, %ebp
testl %r14d, %r14d
je 0x2bc6
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0x30a5
testb %al, %al
je 0x2bc6
movq %rbx, %rdi
callq 0x38a1
pushq $0xe
jmp 0x2bef
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x30a5
testb %al, %al
je 0x2bed
movq %rbx, %rdi
callq 0x3666
movzbl %al, %edx
pushq $0x13
popq %rsi
movq %rbx, %rdi
callq 0x3710
jmp 0x2bf8
pushq $0xd
popq %rsi
movq %rbx, %rdi
callq 0x37c2
movzwl %bp, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x372f
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: array
static void array(bluCompiler* compiler, bool canAssign) {
	uint16_t len = 0;

	consumeNewlines(compiler);

	while (!check(compiler, TOKEN_RIGHT_BRACKET) && !check(compiler, TOKEN_EOF)) {
		if (len > 0) {
			consume(compiler, TOKEN_COMMA, "Expect ',' between expressions.");
			consumeNewlines(compiler);
		}

		expression(compiler);
		consumeNewlines(compiler);

		len++;
	}

	consume(compiler, TOKEN_RIGHT_BRACKET, "Expect ']' after array.");

	emitByte(compiler, OP_ARRAY);
	emitShort(compiler, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3e15
xorl %r15d, %r15d
leaq 0x67c2(%rip), %r14      # 0x93e2
pushq $0x3
popq %rbp
movq 0x8(%rbx), %rax
movl 0x40(%rax), %eax
cmpl $0x9, %eax
je 0x2c64
cmpl $0x2f, %eax
je 0x2c64
testw %r15w, %r15w
je 0x2c4f
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x377a
movq %rbx, %rdi
callq 0x3e15
movq %rbx, %rdi
callq 0x38a1
movq %rbx, %rdi
callq 0x3e15
incl %r15d
jmp 0x2c23
leaq 0x6797(%rip), %rdx      # 0x9402
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0x377a
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x37c2
movzwl %r15w, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x372f
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: subscript
static void subscript(bluCompiler* compiler, bool canAssign) {
	expression(compiler);
	consume(compiler, TOKEN_RIGHT_BRACKET, "Expect ']' after subscript operator.");

	if (canAssign && match(compiler, TOKEN_EQUAL)) {
		expression(compiler);
		emitByte(compiler, OP_SUBSCRIPT_SET);
	} else {
		emitByte(compiler, OP_SUBSCRIPT_GET);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x38a1
leaq 0x676e(%rip), %rdx      # 0x941a
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0x377a
movb $0x10, %r14b
testl %ebp, %ebp
je 0x2cd8
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0x30a5
testb %al, %al
je 0x2cd8
movq %rbx, %rdi
callq 0x38a1
movb $0x11, %r14b
movzbl %r14b, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x37c2
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: unary
static void unary(bluCompiler* compiler, bool canAssing) {
	bluTokenType operatorType = compiler->parser->previous.type;

	parsePrecedence(compiler, PREC_UNARY);

	switch (operatorType) {
	case TOKEN_BANG: emitByte(compiler, OP_NOT); break;
	case TOKEN_MINUS: emitByte(compiler, OP_NEGATE); break;
	default: __builtin_unreachable();
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x20(%rax), %ebp
pushq $0x9
popq %rsi
callq 0x3b37
xorl %esi, %esi
cmpl $0xd, %ebp
setne %sil
addl $0x25, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x37c2
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: and
static void and (bluCompiler * compiler, bool canAssign) {
	int32_t endJump = emitJump(compiler, OP_JUMP_IF_FALSE);
	emitByte(compiler, OP_POP);

	parsePrecedence(compiler, PREC_AND);

	patchJump(compiler, endJump);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x16
popq %rsi
callq 0x3e80
movl %eax, %ebp
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x37c2
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x3b37
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3ea3
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: or
static void or (bluCompiler * compiler, bool canAssign) {
	int32_t endJump = emitJump(compiler, OP_JUMP_IF_TRUE);
	emitByte(compiler, OP_POP);

	parsePrecedence(compiler, PREC_OR);

	patchJump(compiler, endJump);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x17
popq %rsi
callq 0x3e80
movl %eax, %ebp
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x37c2
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x3b37
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3ea3
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: bluCompile
bluObjFunction* bluCompile(bluVM* vm, const char* source, const char* file) {
	bluParser parser;
	bluParserInit(&parser, source);

	bluCompiler compiler;
	compiler.vm = vm;
	compiler.parser = &parser;
	compiler.classCompiler = NULL;
	compiler.file = file;
	initCompiler(&compiler, NULL, 0, TYPE_TOP_LEVEL);

	do {
		advance(&compiler);
	} while (check(&compiler, TOKEN_NEWLINE));

	while (!match(&compiler, TOKEN_EOF)) {
		declaration(&compiler);
	}

	bluObjFunction* function = endCompiler(&compiler);
	function->chunk.file = file;
	function->chunk.name = "__main";

#ifdef DEBUG_COMPILER_DISASSEMBLE
	bluDisassembleChunk(&function->chunk);
#endif

	freeCompiler(&compiler);

	return compiler.hadError ? NULL : function;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x5dac
leaq 0x8(%rsp), %r14
movq %r15, (%r14)
movq %r12, 0x8(%r14)
andq $0x0, 0x18(%r14)
movq %rbx, 0x20(%r14)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2f0e
movq %r14, %rdi
callq 0x301d
movq 0x10(%rsp), %rax
cmpl $0x8, 0x20(%rax)
je 0x2e93
cmpl $0x30, 0x40(%rax)
je 0x2e93
leaq 0x8(%rsp), %r14
pushq $0x2f
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x30a5
testb %al, %al
jne 0x2ecc
movq %r14, %rdi
callq 0x30c9
jmp 0x2eb4
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x34cb
movq %rax, %r15
movq %rbx, 0x28(%rax)
leaq 0x61d9(%rip), %rax      # 0x90c0
movq %rax, 0x30(%r15)
movq %r14, %rdi
callq 0x34f5
xorl %eax, %eax
cmpb $0x0, 0x59(%r14)
cmoveq %r15, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: initCompiler
static void initCompiler(bluCompiler* compiler, bluCompiler* enclosing, int8_t scopeDepth, bluFunctionType type) {
	if (enclosing != NULL) {
		compiler->vm = enclosing->vm;
		compiler->parser = enclosing->parser;

		compiler->classCompiler = enclosing->classCompiler;

		compiler->file = enclosing->file;
	}

	compiler->enclosing = enclosing;
	compiler->scopeDepth = scopeDepth;
	compiler->type = type;
	compiler->function = bluNewFunction(compiler->vm);

	compiler->hadError = false;
	compiler->panicMode = false;

	bluLocalBufferInit(&compiler->locals);
	bluUpvalueBufferInit(&compiler->upvalues);

	switch (type) {

	case TYPE_FUNCTION:
	case TYPE_METHOD:
	case TYPE_INITIALIZER: {
		bluToken previous = compiler->parser->previous;
		compiler->function->name = bluCopyString(compiler->vm, previous.start, previous.length);
		break;
	}

	case TYPE_ANONYMOUS:
	case TYPE_TOP_LEVEL: {
		compiler->function->name = NULL;
		break;
	}
	}

	bluLocal local;
	local.depth = compiler->scopeDepth;
	local.isUpvalue = false;

	if (type == TYPE_METHOD || type == TYPE_INITIALIZER) {
		// In a method, it holds the receiver, "@".
		local.name.start = "@";
		local.name.length = 1;
	} else {
		// In a function, it holds the function, but cannot be references, so has no name.
		local.name.start = "";
		local.name.length = 0;
	}

	bluLocalBufferWrite(&compiler->locals, local);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl %ecx, %ebp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x2f38
movq (%rsi), %rdi
movq %rdi, (%rbx)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rbx)
movups 0x18(%rsi), %xmm0
movups %xmm0, 0x18(%rbx)
jmp 0x2f3b
movq (%rbx), %rdi
movq %rsi, 0x10(%rbx)
movb %dl, 0x58(%rbx)
movl %ebp, 0x30(%rbx)
callq 0x5b0a
movq %rax, 0x28(%rbx)
andw $0x0, 0x59(%rbx)
leaq 0x38(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
pushq $0x1a
popq %rcx
btl %ebp, %ecx
jae 0x2fa3
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
movq 0x28(%rax), %rsi
movzbl 0x30(%rax), %edx
callq 0x58eb
movq 0x28(%rbx), %rcx
movq %rax, 0x78(%rcx)
addl $-0x3, %ebp
cmpl $0x2, %ebp
setb %al
leaq 0x61dd(%rip), %rdx      # 0x9173
leaq 0x6087(%rip), %rcx      # 0x9024
cmovbq %rdx, %rcx
jmp 0x2fb1
andq $0x0, 0x78(%rax)
leaq 0x6075(%rip), %rcx      # 0x9024
xorl %eax, %eax
movb 0x58(%rbx), %dl
movq %rcx, 0x40(%rsp)
movb %al, 0x48(%rsp)
movq 0x61(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rax, 0x49(%rsp)
movq %rcx, 0x50(%rsp)
movb %dl, 0x58(%rsp)
movb $0x0, 0x59(%rsp)
movl 0x32(%rsp), %eax
movl %eax, 0x5a(%rsp)
movzwl 0x36(%rsp), %eax
movw %ax, 0x5e(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x38(%rsp), %xmm0
movups 0x48(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x282b
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: advance
static void advance(bluCompiler* compiler) {
	compiler->parser->previous = compiler->parser->current;

	while (true) {
		compiler->parser->current = bluParserNextToken(compiler->parser);
		if (compiler->parser->current.type != TOKEN_ERROR) break;

		errorAtCurrent(compiler, compiler->parser->current.start);
	}

	skipNewlines(compiler);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movups 0x40(%rax), %xmm0
movups 0x50(%rax), %xmm1
movups %xmm1, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movq %rsp, %r14
movq 0x8(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x5dcd
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups %xmm1, 0x50(%r15)
movups %xmm0, 0x40(%r15)
movq 0x8(%rbx), %rax
cmpl $0x31, 0x40(%rax)
jne 0x307a
movq 0x48(%rax), %rsi
movq %rbx, %rdi
callq 0x3e05
jmp 0x3040
movl 0x20(%rax), %eax
cmpq $0x30, %rax
ja 0x309b
movabsq $0x1000000000930, %rcx  # imm = 0x1000000000930
btq %rax, %rcx
jae 0x309b
movq %rbx, %rdi
callq 0x3e15
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: endCompiler
static bluObjFunction* endCompiler(bluCompiler* compiler) {
	if (compiler->function->chunk.code.count == 0) {
		// We need to emit return when chunk is empty.
		emitReturn(compiler);
	} else if (compiler->function->chunk.code.data[compiler->function->chunk.code.count - 1] != OP_RETURN) {
		// We need to emit return when last opcode of a chunk isn't a return.
		emitReturn(compiler);
	}

	return compiler->function;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movslq 0x40(%rax), %rcx
testq %rcx, %rcx
je 0x34e7
movq 0x38(%rax), %rax
cmpb $0x30, -0x1(%rax,%rcx)
je 0x34ef
movq %rbx, %rdi
callq 0x441b
movq 0x28(%rbx), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: errorAt
static void errorAt(bluCompiler* compiler, bluToken* token, const char* message) {
	if (compiler->panicMode) return;
	compiler->panicMode = true;

	fprintf(stderr, "[line %d:%d] Error", token->line, token->column);

	if (token->type == TOKEN_EOF) {
		fprintf(stderr, " at end");
	} else if (token->type == TOKEN_NEWLINE) {
		fprintf(stderr, " at newline");
	} else if (token->type == TOKEN_ERROR) {
		// Nothing.
	} else {
		fprintf(stderr, " at '%.*s'", token->length, token->start);
	}

	fprintf(stderr, ": %s\n", message);

	compiler->hadError = true;
}

// Assembly:
cmpb $0x0, 0x5a(%rdi)
je 0x3523
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb $0x1, 0x5a(%rdi)
movq 0xbab9(%rip), %r12      # 0xeff8
movq (%r12), %rdi
movl 0x14(%rsi), %edx
movl 0x18(%rsi), %ecx
leaq 0x5b9a(%rip), %rsi      # 0x90ea
xorl %eax, %eax
callq 0x2140
movl (%r15), %eax
cmpl $0x31, %eax
je 0x35ab
cmpl $0x30, %eax
je 0x3578
cmpl $0x2f, %eax
jne 0x3590
movq (%r12), %rcx
leaq 0x5b89(%rip), %rdi      # 0x90fd
pushq $0x7
jmp 0x3585
movq (%r12), %rcx
leaq 0x5b82(%rip), %rdi      # 0x9105
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x2200
jmp 0x35ab
movq (%r12), %rdi
movzbl 0x10(%r15), %edx
movq 0x8(%r15), %rcx
leaq 0x5b6d(%rip), %rsi      # 0x9111
xorl %eax, %eax
callq 0x2140
movq (%r12), %rdi
leaq 0x5b66(%rip), %rsi      # 0x911c
movq %r14, %rdx
xorl %eax, %eax
callq 0x2140
movb $0x1, 0x59(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: namedVariable
static void namedVariable(bluCompiler* compiler, bluToken name, bool canAssign) {
	uint8_t getOp, setOp;

	int32_t arg = resolveLocal(compiler, &name);

	if (arg != -1) {
		getOp = OP_GET_LOCAL;
		setOp = OP_SET_LOCAL;
	} else if ((arg = resolveUpvalue(compiler, &name)) != -1) {
		getOp = OP_GET_UPVALUE;
		setOp = OP_SET_UPVALUE;
	} else {
		arg = identifierConstant(compiler, &name);
		getOp = OP_GET_GLOBAL;
		setOp = OP_SET_GLOBAL;
	}

	if (canAssign && match(compiler, TOKEN_EQUAL)) {
		expression(compiler);
		emitByte(compiler, setOp);
		emitShort(compiler, (uint16_t)arg);
	} else {
		emitByte(compiler, getOp);
		emitShort(compiler, (uint16_t)arg);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x30(%rsp), %r15
movq %r15, %rsi
callq 0x37d9
cmpl $-0x1, %eax
je 0x35fa
movl %eax, %ebp
movb $0x7, %r15b
movb $0x6, %r12b
jmp 0x3628
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3842
cmpl $-0x1, %eax
je 0x3614
movl %eax, %ebp
movb $0xc, %r15b
movb $0xb, %r12b
jmp 0x3628
movq %rbx, %rdi
movq %r15, %rsi
callq 0x379f
movzwl %ax, %ebp
movb $0xa, %r15b
movb $0x9, %r12b
testb %r14b, %r14b
je 0x3647
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0x30a5
testb %al, %al
je 0x3647
movq %rbx, %rdi
callq 0x38a1
movl %r15d, %r12d
movzbl %r12b, %esi
movq %rbx, %rdi
callq 0x37c2
movzwl %bp, %esi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x372f
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: argumentList
static uint8_t argumentList(bluCompiler* compiler) {
	uint8_t argCount = 0;

	if (!check(compiler, TOKEN_RIGHT_PAREN)) {
		do {
			expression(compiler);
			argCount++;

			if (argCount > 16) {
				error(compiler, "Cannot have more than 16 arguments.");
			}
		} while (match(compiler, TOKEN_COMMA));
	}

	consume(compiler, TOKEN_RIGHT_PAREN, "Expect ')' after arguments.");

	return argCount;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpl $0xa, 0x40(%rax)
jne 0x367e
xorl %ebp, %ebp
jmp 0x36b6
xorl %ebp, %ebp
leaq 0x5cd8(%rip), %r14      # 0x935f
pushq $0x3
popq %r15
movq %rbx, %rdi
callq 0x38a1
incb %bpl
cmpb $0x11, %bpl
jb 0x36a7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x350f
movq %rbx, %rdi
movl %r15d, %esi
callq 0x30a5
testb %al, %al
jne 0x368b
leaq 0x5cc6(%rip), %rdx      # 0x9383
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x377a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: makeConstant
static uint16_t makeConstant(bluCompiler* compiler, bluValue value) {
	int32_t constant = bluValueBufferWrite(&compiler->function->chunk.constants, value);
	if (constant > LOCALS_MAX) {
		error(compiler, "Too many constants in one chunk.");
		return 0;
	}

	return (uint16_t)constant;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
addq $0x68, %rdi
callq 0x276f
cmpl $0xffff, %eax           # imm = 0xFFFF
jl 0x3778
leaq 0x5c33(%rip), %rsi      # 0x93a1
movq %rbx, %rdi
callq 0x350f
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: consume
static void consume(bluCompiler* compiler, bluTokenType type, const char* message) {
	if (check(compiler, type)) {
		advance(compiler);
		return;
	}

	errorAtCurrent(compiler, message);
}

// Assembly:
movq 0x8(%rdi), %rax
cmpl $0x30, %esi
jne 0x378d
cmpl $0x8, 0x20(%rax)
je 0x301d
cmpl %esi, 0x40(%rax)
jne 0x3797
jmp 0x301d
movq %rdx, %rsi
jmp 0x3e05
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: resolveLocal
static int32_t resolveLocal(bluCompiler* compiler, bluToken* name) {
	for (int32_t i = compiler->locals.count - 1; i >= 0; i--) {
		bluLocal* local = &compiler->locals.data[i];
		if (identifiersEqual(name, &local->name)) {
			if (local->depth == -1) {
				error(compiler, "Cannot read local variable in its own initializer.");
			}

			return i;
		}
	}

	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movl 0x40(%rdi), %ebx
imulq $0x28, %rbx, %r12
addq $-0x28, %r12
pushq $-0x1
popq %rbp
testl %ebx, %ebx
jle 0x382f
movq 0x38(%r14), %r13
leaq (%r12,%r13), %rsi
movq %r15, %rdi
callq 0x38c9
decl %ebx
addq $-0x28, %r12
testb %al, %al
je 0x37f8
cmpb $-0x1, 0x48(%r13,%r12)
jne 0x3831
leaq 0x5976(%rip), %rsi      # 0x919b
movq %r14, %rdi
callq 0x350f
jmp 0x3831
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: resolveUpvalue
static int32_t resolveUpvalue(bluCompiler* compiler, bluToken* name) {
	// If we are at the top level, we didn't find it.
	if (compiler->enclosing == NULL) return -1;

	// See if it's a local variable in the immediately enclosing function.
	int32_t local = resolveLocal(compiler->enclosing, name);
	if (local != -1) {
		// Mark the local as an upvalue so we know to close it when it goes out of scope.
		compiler->enclosing->locals.data[local].isUpvalue = true;
		return addUpvalue(compiler, (uint16_t)local, true);
	}

	// See if it's an upvalue in the immediately enclosing function. In other words, if it's a local variable in a
	// non-immediately enclosing function. This "flattens" closures automatically: it adds upvalues to all of the
	// intermediate functions to get from the function where a local is declared all the way into the possibly deeply
	// nested function that is closing over it.
	int32_t upvalue = resolveUpvalue(compiler->enclosing, name);
	if (upvalue != -1) {
		return addUpvalue(compiler, (uint16_t)upvalue, false);
	}

	// If we got here, we walked all the way up the parent chain and
	// couldn't find it.
	return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x3899
movq %rsi, %r14
callq 0x37d9
movl %eax, %ebp
movq 0x10(%rbx), %rdi
cmpl $-0x1, %eax
je 0x3878
movq 0x38(%rdi), %rax
movl %ebp, %ecx
imulq $0x28, %rcx, %rcx
movb $0x1, 0x21(%rax,%rcx)
movl %ebp, %eax
jmp 0x3885
movq %r14, %rsi
callq 0x3842
cmpl $-0x1, %eax
je 0x3899
xorl %edx, %edx
cmpl $-0x1, %ebp
setne %dl
movzwl %ax, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x38ed
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/adamjedlicka[P]blu/src/vm/compiler/compiler.c
// Function: expression
static void expression(bluCompiler* compiler) {
	if (match(compiler, TOKEN_FN)) {
		function(compiler, TYPE_ANONYMOUS);
	} else {
		parsePrecedence(compiler, PREC_ASSIGNMENT);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x23
popq %rsi
callq 0x30a5
testb %al, %al
je 0x38bd
pushq $0x2
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x395a
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3b37