LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_get_ptr
void subtilis_riscos_get_ptr(subtilis_ir_section_t *s, size_t start,
			     void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t handle;
	subtilis_arm_reg_t one;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *bget = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_arm_reg(bget->operands[0].reg);
	handle = subtilis_arm_ir_to_arm_reg(bget->operands[1].reg);

	subtilis_arm_add_mov_imm(arm_s, SUBTILIS_ARM_CCODE_AL, false, 0, 0,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 1, handle,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_Args 2 */
	/* read_mask = 0x3 = r0, r1 */
	/* write_mask = 0x5 = r0, r2 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0x20000 + 0x9, 0x3,
			     0x5, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	one = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
	subtilis_arm_gen_sete_load_reg(arm_s, s, SUBTILIS_ARM_CCODE_VS, one,
				       err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, dest, 2,
				 err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq 0x10(%r13), %rdi
callq 0x4eff7
movq %rax, %r14
movq 0x18(%r13), %rdi
callq 0x4eff7
movq %rax, %r13
movq %r15, 0x8(%rsp)
movl $0x0, (%rsp)
movq %rbx, %rdi
movl $0xd, %esi
movl $0xf, %edx
movl $0xe, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x50249
cmpl $0x0, (%r15)
jne 0x716ec
movq %r15, (%rsp)
movl $0x1, %r8d
movq %rbx, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
movq %r13, %r9
callq 0x5060d
cmpl $0x0, (%r15)
jne 0x716ec
movl $0x20009, %edx          # imm = 0x20009
movq %rbx, %rdi
movl $0xe, %esi
movl $0x3, %ecx
movl $0x5, %r8d
movq %r15, %r9
callq 0x505b2
cmpl $0x0, (%r15)
jne 0x716ec
movq (%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%rbx)
callq 0x4eff7
movq %rbx, %rdi
movq %r12, %rsi
movl $0x6, %edx
movq %rax, %rcx
movq %r15, %r8
callq 0x526e6
cmpl $0x0, (%r15)
jne 0x716ec
movq %r15, (%rsp)
movl $0x2, %r9d
movq %rbx, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x5060d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_set_ptr
void subtilis_riscos_set_ptr(subtilis_ir_section_t *s, size_t start,
			     void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t handle;
	subtilis_arm_reg_t one;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *bget = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_arm_reg(bget->operands[0].reg);
	handle = subtilis_arm_ir_to_arm_reg(bget->operands[1].reg);

	subtilis_arm_add_mov_imm(arm_s, SUBTILIS_ARM_CCODE_AL, false, 0, 1,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 1, handle,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, 2, dest,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_Args 2 */
	/* read_mask = 0x7 = r0, r1, r2 */
	/* write_mask = 0x0*/
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0x20000 + 0x9, 0x3,
			     0x0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	one = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
	subtilis_arm_gen_sete_load_reg(arm_s, s, SUBTILIS_ARM_CCODE_VS, one,
				       err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq 0x10(%r13), %rdi
callq 0x4eff7
movq %rax, %r12
movq 0x18(%r13), %rdi
callq 0x4eff7
movq %rax, %r13
movq %rbx, 0x8(%rsp)
movl $0x1, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0xf, %edx
movl $0xe, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x50249
cmpl $0x0, (%rbx)
jne 0x717cc
movq %rbx, (%rsp)
movl $0x1, %r8d
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
movq %r13, %r9
callq 0x5060d
cmpl $0x0, (%rbx)
jne 0x717cc
movq %rbx, (%rsp)
movl $0x2, %r8d
movq %r14, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
movq %r12, %r9
callq 0x5060d
cmpl $0x0, (%rbx)
jne 0x717cc
movl $0x20009, %edx          # imm = 0x20009
movq %r14, %rdi
movl $0xe, %esi
movl $0x3, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x505b2
cmpl $0x0, (%rbx)
je 0x717da
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%r14)
callq 0x4eff7
movq %r14, %rdi
movq %r15, %rsi
movl $0x6, %edx
movq %rax, %rcx
movq %rbx, %r8
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x526e6
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_signx8to32
void subtilis_riscos_signx8to32(subtilis_ir_section_t *s, size_t start,
				void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t src;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *signx = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_arm_reg(signx->operands[0].reg);
	src = subtilis_arm_ir_to_arm_reg(signx->operands[1].reg);

	subtilis_arm_gen_signx8to32_helper(arm_s, dest, src, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movq 0x10(%r12), %rdi
callq 0x4eff7
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4eff7
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5279b
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_oscli
void subtilis_riscos_oscli(subtilis_ir_section_t *s, size_t start,
			   void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t buffer;
	subtilis_arm_reg_t one;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *openf = &s->ops[start]->op.instr;

	buffer = subtilis_arm_ir_to_arm_reg(openf->operands[0].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 0, buffer,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_CLI */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0x1 = r0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0x20000 + 0x5, 0x1,
			     0x1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	one = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
	subtilis_arm_gen_sete_load_reg(arm_s, s, SUBTILIS_ARM_CCODE_VS, one,
				       err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4eff7
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x5060d
cmpl $0x0, (%rbx)
jne 0x718c0
movl $0x20005, %edx          # imm = 0x20005
movq %r14, %rdi
movl $0xe, %esi
movl $0x1, %ecx
movl $0x1, %r8d
movq %rbx, %r9
callq 0x505b2
cmpl $0x0, (%rbx)
je 0x718ca
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq (%r14), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%r14)
callq 0x4eff7
movq %r14, %rdi
movq %r15, %rsi
movl $0x6, %edx
movq %rax, %rcx
movq %rbx, %r8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x526e6
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_osargs
void subtilis_riscos_osargs(subtilis_ir_section_t *s, size_t start,
			    void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t buffer;
	subtilis_arm_reg_t one;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *osargs = &s->ops[start]->op.instr;

	buffer = subtilis_arm_ir_to_arm_reg(osargs->operands[0].reg);

	/* OS_GetEnv */
	/* read_mask = 0x0 = */
	/* write_mask = 0x7 = r0, r1, r2 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0x20000 + 0x10, 0x0,
			     0x7, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	one = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
	subtilis_arm_gen_sete_load_reg(arm_s, s, SUBTILIS_ARM_CCODE_VS, one,
				       err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, buffer, 0,
				 err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4eff7
movq %rax, %r15
movl $0x20010, %edx          # imm = 0x20010
movq %rbx, %rdi
movl $0xe, %esi
xorl %ecx, %ecx
movl $0x7, %r8d
movq %r14, %r9
callq 0x505b2
cmpl $0x0, (%r14)
jne 0x71989
movq (%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%rbx)
callq 0x4eff7
movq %rbx, %rdi
movq %r12, %rsi
movl $0x6, %edx
movq %rax, %rcx
movq %r14, %r8
callq 0x526e6
cmpl $0x0, (%r14)
jne 0x71989
movq %r14, (%rsp)
movq %rbx, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x5060d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: prv_init_heap
static void prv_init_heap(subtilis_arm_section_t *arm_s, uint32_t stack_size,
			  subtilis_error_t *err)
{
	subtilis_arm_instr_t *instr;
	subtilis_arm_data_instr_t *datai;

	/*
	 * On entry,
	 * R11 = heap start
	 * R13 is the top of the stack
	 */

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 1, 11,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_sub_imm(arm_s, SUBTILIS_ARM_CCODE_AL, false, 3, 13,
				 stack_size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	instr =
	    subtilis_arm_section_add_instr(arm_s, SUBTILIS_ARM_INSTR_SUB, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	datai = &instr->operands.data;
	datai->ccode = SUBTILIS_ARM_CCODE_AL;
	datai->status = false;
	datai->dest = 3;
	datai->op1 = 3;
	datai->op2.type = SUBTILIS_ARM_OP2_REG;
	datai->op2.op.reg = 1;

	subtilis_arm_heap_init(arm_s, err);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
subq $0x8, %rsp
movl $0x1, %r8d
movl $0xb, %r9d
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
pushq %rbx
callq 0x5060d
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x71c4a
subq $0x8, %rsp
movl $0x3, %r9d
movq %r14, %rdi
movl $0x2, %esi
movl $0x4, %edx
movl $0xe, %ecx
xorl %r8d, %r8d
pushq %rbx
pushq $0x2000                 # imm = 0x2000
pushq $0xd
callq 0x4fe13
addq $0x20, %rsp
cmpl $0x0, (%rbx)
jne 0x71c4a
movq %r14, %rdi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x4f73a
cmpl $0x0, (%rbx)
je 0x71c52
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xe, 0x8(%rax)
movb $0x0, 0xc(%rax)
movl $0x3, %ecx
movq %rcx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movl $0x0, 0x20(%rax)
movq $0x1, 0x28(%rax)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x60bfe
// File: /workspace/github_c_makefile_star2_O1/cyb70289[P]tt/tests/integer.c
// Function: rand_int
struct tt_int *rand_int(int msb)
{
	struct tt_int *ti = tt_int_alloc();
	if (_tt_int_realloc(ti, msb))
		return NULL;

	ti->msb = msb;
#ifdef _TT_LP64_
	for (int i = 0; i < msb-1; i++) {
		ti->buf[i] = rand() & ~(1<<31);
		ti->buf[i] <<= 32;
		ti->buf[i] |= rand();
	}
	do {
		ti->buf[msb-1] = rand() & ~(1<<31);
	} while (ti->buf[msb-1] == 0);
	ti->buf[msb-1] <<= 32;
	ti->buf[msb-1] |= rand();
#else
	for (int i = 0; i < msb-1; i++)
		ti->buf[i] = rand() & ~(1<<31);
	do {
		ti->buf[msb-1] = rand() & ~(1<<31);
	} while (ti->buf[msb-1] == 0);
#endif

	return ti;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
callq 0x5bfc
movq %rax, %rbx
movq %rax, %rdi
movl %r14d, %esi
callq 0x5c72
testl %eax, %eax
je 0x2d01
xorl %ebx, %ebx
jmp 0x2d70
movl %r14d, 0x8(%rbx)
leal -0x1(%r14), %ebp
cmpl $0x2, %r14d
jl 0x2d42
movl %ebp, %r14d
xorl %r15d, %r15d
callq 0x2210
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0x10(%rbx), %rcx
shlq $0x20, %rax
movq %rax, (%rcx,%r15,8)
callq 0x2210
cltq
movq 0x10(%rbx), %rcx
orq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x2d15
movslq %ebp, %r14
callq 0x2210
movq 0x10(%rbx), %rcx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, (%rcx,%r14,8)
je 0x2d45
shlq $0x20, %rax
movq %rax, (%rcx,%r14,8)
callq 0x2210
cltq
movq 0x10(%rbx), %rcx
orq %rax, (%rcx,%r14,8)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cyb70289[P]tt/tests/integer.c
// Function: gen_exp10
void gen_exp10(int e)
{
	char *s = malloc(e+2);
	memset(s+1, '0', e);
	s[0] = '1';
	s[e+1] = '\0';

	struct tt_int *ti = tt_int_alloc();
	tt_int_from_string(ti, s);

	int c = 0;
	_tt_word sh = 0;
	const int shift = _tt_word_bits - _tt_int_word_bits(ti->buf[ti->msb-1]);
	printf("#define dec9_shift_%d\t%d\n", e/9, shift);

#ifdef _TT_LP64_
	printf("static const uint64_t dec9_norm_%d[] = {", e/9);
	for (int i = 0; i < ti->msb; i++) {
		if (c == 0)
			printf("\n\t");
		printf("0x%016llX,",
				((ti->buf[i] << shift) | sh) & ~(1ULL << 63));
		sh = ti->buf[i] >> (63 - shift);
		c++;
		if (c == 3)
			c = 0;
		else
			printf(" ");
	}
#else
	printf("static const uint dec9_norm_%d[] = {", e/9);
	for (int i = 0; i < ti->msb; i++) {
		if (c == 0)
			printf("\n\t");
		printf("0x%08X,", ((ti->buf[i] << shift) | sh) & ~(1 << 31));
		sh = ti->buf[i] >> (31 - shift);
		c++;
		if (c == 6)
			c = 0;
		else
			printf(" ");
	}
#endif
	printf("\n};\n\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
leal 0x2(%rbx), %eax
movslq %eax, %rdi
callq 0x2190
movq %rax, %r14
leaq 0x1(%rax), %rdi
movslq %ebx, %r15
movl $0x30, %esi
movq %r15, %rdx
callq 0x2100
movb $0x31, (%r14)
movb $0x0, 0x1(%r14,%r15)
callq 0x5bfc
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x60c4
movq 0x10(%rbx), %rax
movslq 0x8(%rbx), %rcx
movq -0x8(%rax,%rcx,8), %rdi
callq 0x5d89
movl %eax, %ebp
movl $0x3f, %r14d
subl %eax, %r14d
imulq $0x38e38e39, %r15, %r15 # imm = 0x38E38E39
movq %r15, %rax
shrq $0x3f, %rax
sarq $0x21, %r15
addl %eax, %r15d
leaq 0x9201(%rip), %rdi      # 0xc004
movl %r15d, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x20d0
leaq 0x9207(%rip), %rdi      # 0xc01e
movl %r15d, %esi
xorl %eax, %eax
callq 0x20d0
cmpl $0x0, 0x8(%rbx)
jle 0x2eab
movl %r14d, %eax
movq %rax, (%rsp)
movl %ebp, %r15d
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
jne 0x2e50
leaq 0x91fe(%rip), %rdi      # 0xc047
xorl %eax, %eax
callq 0x20d0
movq 0x10(%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq (%rsp), %rcx
shlq %cl, %rsi
orq %r13, %rsi
btrq $0x3f, %rsi
xorl %r14d, %r14d
leaq 0x91d9(%rip), %rdi      # 0xc04a
xorl %eax, %eax
callq 0x20d0
movq 0x10(%rbx), %rax
movq (%rax,%rbp,8), %r13
movl %r15d, %ecx
shrq %cl, %r13
incl %r12d
cmpl $0x3, %r12d
je 0x2e9c
movl $0x20, %edi
callq 0x2040
movl %r12d, %r14d
incq %rbp
movslq 0x8(%rbx), %rax
movl %r14d, %r12d
cmpq %rax, %rbp
jl 0x2e3d
leaq 0x93e5(%rip), %rdi      # 0xc297
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2070
// File: /workspace/github_c_makefile_star2_O1/cyb70289[P]tt/tests/integer.c
// Function: gen_int_str
static char *gen_int_str(int *radix)
{
	const int _radix[] = { 2, 8, 10, 16, 10 };
	const char *prefix[] = { "0b", "0", "", "0x", "" };

	const int sign = rand() & 1;
	const int ridx = rand() % 5;
	const int digs = rand() % MAX_DIGS + 1;

	char *str = malloc(sign + strlen(prefix[ridx]) + digs + 1);
	char *s = str;
	if (sign)
		*s++ = '-';
	*s = '\0';
	strcat(s, prefix[ridx]);
	s += strlen(prefix[ridx]);

	*s = bin2asc[rand() % _radix[ridx]];
	if (*s == '0')
		*s = '1';
	s++;
	for (int i = 1; i < digs; i++)
		*s++ = bin2asc[rand() % _radix[ridx]];
	*s = '\0';

	*radix = _radix[ridx];
	return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
callq 0x2210
movl %eax, %r15d
andl $0x1, %r15d
callq 0x2210
movslq %eax, %rbx
imulq $0x66666667, %rbx, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x21, %rax
addl %ecx, %eax
leal (%rax,%rax,4), %eax
subl %eax, %ebx
callq 0x2210
movslq %eax, %rbp
imulq $0x68db8bad, %rbp, %rax # imm = 0x68DB8BAD
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x2b, %rax
addl %ecx, %eax
imull $0x1388, %eax, %eax     # imm = 0x1388
subl %eax, %ebp
movslq %ebx, %rbx
leaq 0x19565(%rip), %rax     # 0x1cc10
movq (%rax,%rbx,8), %r13
movq %r13, %rdi
callq 0x20c0
movslq %ebp, %rcx
addq %r15, %rax
leaq (%rcx,%rax), %rdi
addq $0x2, %rdi
callq 0x2190
movq %rax, %r14
movq %rax, %r12
testl %r15d, %r15d
je 0x36df
movq %r14, %r12
incq %r12
movb $0x2d, (%r14)
movb $0x0, (%r12)
movq %r12, %rdi
movq %r13, %rsi
callq 0x21d0
movq %r13, %rdi
callq 0x20c0
movq %rax, %r15
callq 0x2210
leaq 0x8bca(%rip), %rcx      # 0xc2d0
movl (%rcx,%rbx,4), %r13d
cltd
idivl %r13d
movslq %edx, %rax
leaq 0x8bd8(%rip), %rbx      # 0xc2f0
testl %eax, %eax
movzbl (%rax,%rbx), %eax
movl $0x31, %ecx
cmovnel %eax, %ecx
addq %r12, %r15
incq %r15
movb %cl, -0x1(%r15)
testl %ebp, %ebp
jle 0x374d
callq 0x2210
cltd
idivl %r13d
movslq %edx, %rax
movb (%rax,%rbx), %al
movb %al, (%r15)
incq %r15
decl %ebp
jne 0x3734
movb $0x0, (%r15)
movq (%rsp), %rax
movl %r13d, (%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/rafa9811[P]theIndiependenceGame/m_background.c
// Function: printScreen
int printScreen(char *draw){
    char line[SCREEN_LINE*2],*ini;
    int i=0,linenumber=0;
    ini=draw;
    while(linenumber<SCREENY){
      draw = ini + i;
      memcpy(line,draw,SCREEN_LINE);
      printf("%s\n",line);
      i+=SCREEN_LINE;
      linenumber++;
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
xorl %r15d, %r15d
movq %rsp, %r14
leaq (%rbx,%r15), %rsi
movl $0x50, %edx
movq %r14, %rdi
callq 0x1100
movq %r14, %rdi
callq 0x1070
addq $0x50, %r15
cmpl $0xd20, %r15d           # imm = 0xD20
jne 0x15a1
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/hashtab.c
// Function: ht_init
hashtab_t *ht_init(size_t size, int (*hash_func) (void *, size_t, size_t))
{
    hashtab_t *new_ht = (hashtab_t *) malloc(sizeof(hashtab_t));

    new_ht->arr =
	(hashtab_node_t **) malloc(sizeof(hashtab_node_t *) * size);

    new_ht->size = size;
    new_ht->count = 0;

    /* all entries are empty */
    int i = 0;
    for (i = 0; i < (int) size; i++) {
	new_ht->arr[i] = NULL;
    }

    if (hash_func == NULL)
	new_ht->hash_func = &ht_hash;
    else
	new_ht->hash_func = hash_func;

    return new_ht;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movl $0x20, %edi
callq 0x1170
movq %rax, %r14
leaq (,%r15,8), %rdi
callq 0x1170
movq %rax, (%r14)
movq %r15, 0x8(%r14)
movl $0x0, 0x10(%r14)
testl %r15d, %r15d
jle 0x1e2d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
shlq $0x3, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1100
testq %rbx, %rbx
leaq 0x11(%rip), %rax        # 0x1e48
cmovneq %rbx, %rax
movq %rax, 0x18(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/hashtab.c
// Function: ht_hash
int ht_hash(void *key, size_t keylen, size_t hashtab_size)
{
    int sum = 0;

    /* very simple hash function for now */
    int i;
    for (i = 0; i < (int) keylen; i++) {
	sum += ((unsigned char *) key)[i] * (i + 1);
    }

    return (sum % (int) hashtab_size);
}

// Assembly:
movq %rdx, %rcx
testl %esi, %esi
jle 0x1e6f
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rdi,%rdx), %r8d
incq %rdx
imull %edx, %r8d
addl %r8d, %eax
cmpq %rdx, %rsi
jne 0x1e59
jmp 0x1e71
xorl %eax, %eax
cltd
idivl %ecx
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/hashtab.c
// Function: ht_search
void *ht_search(hashtab_t * hashtable, void *key, size_t keylen)
{
    int index = ht_hash(key, keylen, hashtable->size);

    if (hashtable->arr[index] == NULL)
	return NULL;

    hashtab_node_t *last_node = hashtable->arr[index];
    while (last_node != NULL) {
	/* only compare matching keylens */
	if (last_node->keylen == keylen) {
	    /* compare keys */
	    if (memcmp(key, last_node->key, keylen) == 0) {
		return last_node->value;
	    }
	}

	last_node = last_node->next;
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq 0x8(%rdi), %rcx
testl %ebx, %ebx
jle 0x1eb2
movl %ebx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %eax, %eax
movzbl (%r14,%rsi), %r8d
incq %rsi
movl %esi, %r9d
imull %r8d, %r9d
addl %r9d, %eax
cmpq %rsi, %rdx
jne 0x1e99
jmp 0x1eb4
xorl %eax, %eax
cltd
idivl %ecx
movq (%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %r12
xorl %r15d, %r15d
testq %r12, %r12
je 0x1eef
cmpq %rbx, 0x8(%r12)
jne 0x1ee3
movq (%r12), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1180
testl %eax, %eax
je 0x1eea
movq 0x20(%r12), %r12
jmp 0x1ec4
movq 0x10(%r12), %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/hashtab.c
// Function: ht_remove
void ht_remove(hashtab_t * hashtable, void *key, size_t keylen)
{
    hashtab_node_t *last_node, *next_node;
    int index = ht_hash(key, keylen, hashtable->size);
    next_node = hashtable->arr[index];
    last_node = NULL;

    while (next_node != NULL) {
	if (next_node->keylen == keylen) {
	    /* compare keys */
	    if (memcmp(key, next_node->key, keylen) == 0) {
		/* free node memory */
		free(next_node->value);
		free(next_node->key);

		/* adjust the list pointers */
		if (last_node != NULL)
		    last_node->next = next_node->next;
		else
		    hashtable->arr[index] = next_node->next;

		/* free the node */
		free(next_node);
		break;
	    }
	}

	last_node = next_node;
	next_node = next_node->next;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
testl %r14d, %r14d
jle 0x20e8
movl %r14d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %eax, %eax
movzbl (%r15,%rsi), %edi
incq %rsi
movl %esi, %r8d
imull %edi, %r8d
addl %r8d, %eax
cmpq %rsi, %rdx
jne 0x20cf
jmp 0x20ea
xorl %eax, %eax
cltd
idivl %ecx
movq (%rbx), %rax
movslq %edx, %r13
movq (%rax,%r13,8), %rax
testq %rax, %rax
je 0x2127
xorl %ebp, %ebp
movq %rax, %r12
cmpq %r14, 0x8(%rax)
jne 0x211a
movq (%r12), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x1180
testl %eax, %eax
je 0x2136
movq 0x20(%r12), %rax
movq %r12, %rbp
testq %rax, %rax
jne 0x20fe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r12), %rdi
callq 0x1030
movq (%r12), %rdi
callq 0x1030
movq 0x20(%r12), %rax
testq %rbp, %rbp
je 0x2159
addq $0x20, %rbp
jmp 0x2163
shlq $0x3, %r13
addq (%rbx), %r13
movq %r13, %rbp
movq %rax, (%rbp)
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/hashtab.c
// Function: ht_grow
void *ht_grow(hashtab_t * old_ht, size_t new_size)
{
    /* create new hashtable */
    hashtab_t *new_ht = ht_init(new_size, old_ht->hash_func);
    if (new_ht == NULL)
	return NULL;

    void *ret;			/* captures return values */

    /* Iterate through the old hashtable. */
    hashtab_iter_t ii;
    ht_iter_init(old_ht, &ii);
    for (; ii.key != NULL; ht_iter_inc(&ii)) {
	ret = ht_insert(new_ht, ii.key, ii.keylen, ii.value, ii.vallen);
	if (ret == NULL) {
	    /* Insert failed. Destroy new hashtable and return. */
	    ht_destroy(new_ht);
	    return NULL;
	}
    }

    /* Destroy the old hashtable. */
    ht_destroy(old_ht);

    return new_ht;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rax
movq %rdi, %r14
movq 0x18(%rdi), %rsi
movq %rax, %rdi
callq 0x1ddc
testq %rax, %rax
je 0x220e
movq %rax, %rbx
leaq 0x8(%rsp), %r15
movq %r14, 0x20(%r15)
movq $0x0, 0x28(%r15)
movl $0xffffffff, 0x30(%r15) # imm = 0xFFFFFFFF
movq %r15, %rdi
callq 0x22a4
movq (%r15), %rsi
testq %rsi, %rsi
je 0x21fc
leaq 0x8(%rsp), %r15
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %r8
movq %rbx, %rdi
callq 0x1efe
testq %rax, %rax
je 0x2206
movq %r15, %rdi
callq 0x22a4
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
jne 0x21ce
movq %r14, %rdi
callq 0x2238
jmp 0x2210
movq %rbx, %rdi
callq 0x2238
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/hashtab.c
// Function: ht_destroy
void ht_destroy(hashtab_t * hashtable)
{
    hashtab_node_t *next_node, *last_node;

    /* Free each linked list in hashtable. */
    int i;
    for (i = 0; i < (int) hashtable->size; i++) {
	next_node = hashtable->arr[i];
	while (next_node != NULL) {
	    /* destroy node */
	    free(next_node->key);
	    free(next_node->value);
	    last_node = next_node;
	    next_node = next_node->next;
	    free(last_node);
	}
    }

    free(hashtable->arr);
    free(hashtable);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x2289
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x227d
movq (%r14), %rdi
callq 0x1030
movq 0x10(%r14), %rdi
callq 0x1030
movq 0x20(%r14), %r12
movq %r14, %rdi
callq 0x1030
movq %r12, %r14
testq %r12, %r12
jne 0x2258
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x224c
movq (%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/hashtab.c
// Function: ht_iter_inc
void ht_iter_inc(hashtab_iter_t * ii)
{
    hashtab_t *hashtable = ii->internal.hashtable;
    int index = ii->internal.index;

    /* attempt to grab the next node */
    if (ii->internal.node == NULL || ii->internal.node->next == NULL)
	index++;
    else {
	/* next node in the list */
	ii->internal.node = ii->internal.node->next;
	ii->key = ii->internal.node->key;
	ii->value = ii->internal.node->value;
	ii->keylen = ii->internal.node->keylen;
	ii->vallen = ii->internal.node->vallen;
	return;
    }

    /* find next node */
    while (hashtable->arr[index] == NULL && index < (int) hashtable->size)
	index++;

    if (index >= (int) hashtable->size) {
	/* end of hashtable */
	ii->internal.node = NULL;
	ii->internal.index = (int) hashtable->size;

	ii->key = NULL;
	ii->value = NULL;
	ii->keylen = 0;
	ii->vallen = 0;
	return;
    }

    /* point to the next item in the hashtable */
    ii->internal.node = hashtable->arr[index];
    ii->internal.index = index;
    ii->key = ii->internal.node->key;
    ii->value = ii->internal.node->value;
    ii->keylen = ii->internal.node->keylen;
    ii->vallen = ii->internal.node->vallen;
}

// Assembly:
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rdx
movslq 0x30(%rdi), %rcx
testq %rdx, %rdx
je 0x22c4
movq 0x20(%rdx), %rdx
testq %rdx, %rdx
je 0x22c4
movq %rdx, 0x28(%rdi)
jmp 0x22f8
movq (%rax), %rsi
leal 0x1(%rcx), %r9d
movl %r9d, %r8d
movq 0x8(%rsi,%rcx,8), %rdx
testq %rdx, %rdx
jne 0x22e8
incq %rcx
movslq 0x8(%rax), %r10
leal 0x1(%r8), %r9d
cmpq %r10, %rcx
jl 0x22cb
movl 0x8(%rax), %eax
cmpl %eax, %r8d
jge 0x2317
movq %rdx, 0x28(%rdi)
movl %r8d, 0x30(%rdi)
movq (%rdx), %rax
movq %rax, (%rdi)
movq 0x10(%rdx), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rdx), %rax
movq %rax, 0x10(%rdi)
movq 0x18(%rdx), %rax
movq %rax, 0x18(%rdi)
retq
movq $0x0, 0x28(%rdi)
movl %eax, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/lex.c
// Function: string
static void string(Lex* lex, Token* token) {
    const Lex start_lex = *lex;
    while (!is_at_end(lex) && peek(lex) != '"') {
        if (peek(lex) == '\n') {
            newline(lex);
        } else {
            advance(lex);
        }
    }

    if (is_at_end(lex)) {
        init_token_err(lex, token, "Unterminated string");
        return;
    }
    init_token(lex, token, TOKEN_STRING, &start_lex);

    // Consume closing quote
    advance(lex);
}

// Assembly:
pushq %rbx
leaq 0x10(%rdi), %rcx
movq 0x20(%rdi), %rax
movq 0x8(%rdi), %r8
cmpq %r8, %rax
sete %r11b
je 0x2bf9
leaq 0x18(%rdi), %r9
movups 0x10(%rdi), %xmm0
movq (%rdi), %r10
movq %rax, %rdx
movzbl (%r10,%rdx), %ebx
cmpl $0xa, %ebx
je 0x2bd3
cmpl $0x22, %ebx
je 0x2bf3
incq %rdx
movq %rdx, 0x20(%rdi)
movq %r9, %r11
jmp 0x2be5
incq %rdx
movq %rdx, 0x20(%rdi)
movq $0x1, 0x18(%rdi)
movq %rcx, %r11
incq (%r11)
cmpq %r8, %rdx
sete %r11b
jne 0x2bb8
jmp 0x2bf9
testb $0x1, %r11b
je 0x2c1b
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movl $0x27, 0x20(%rsi)
leaq 0x48ab(%rip), %rax      # 0x74b8
movq %rax, 0x10(%rsi)
movq $0x13, 0x18(%rsi)
popq %rbx
retq
movups %xmm0, (%rsi)
movl $0x15, 0x20(%rsi)
movq %rdx, %rcx
subq %rax, %rcx
addq (%rdi), %rax
movq %rax, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
incq %rdx
movq %rdx, 0x20(%rdi)
incq 0x18(%rdi)
jmp 0x2c19
nop
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/main.c
// Function: main
int main(int argc, const char* argv[]) {
    if (argc == 2 && strcmp(argv[1], "repl") == 0) {
        vm_repl();
    } else if (argc == 3) {
        char* source = NULL;
        size_t source_len = 0;
        if (strcmp(argv[2], "-") == 0) {
            read_stdin(&source, &source_len);
        } else {
            read_file(argv[2], &source, &source_len);
        }

        if (strcmp(argv[1], "dump") == 0) {
            return (int)vm_interpret(source, source_len, vm_dump);
        }
        if (strcmp(argv[1], "run") == 0) {
            return (int)vm_interpret(source, source_len, vm_run_bytecode);
        }
    } else {
        cli_help(argv);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
cmpl $0x3, %edi
je 0x2c80
movl %edi, %ebp
cmpl $0x2, %edi
jne 0x2d28
movq 0x8(%rbx), %rdi
leaq 0x4862(%rip), %rsi      # 0x74cc
callq 0x1120
testl %eax, %eax
je 0x2d18
cmpl $0x3, %ebp
jne 0x2d28
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
movq 0x10(%rbx), %r14
leaq 0x483b(%rip), %rsi      # 0x74d1
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x2cb4
leaq 0x8(%rsp), %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq 0x4794
jmp 0x2cc1
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x46e2
movq 0x8(%rbx), %rbx
leaq 0x4807(%rip), %rsi      # 0x74d3
movq %rbx, %rdi
callq 0x1120
testl %eax, %eax
je 0x2d01
leaq 0x47f9(%rip), %rsi      # 0x74d8
movq %rbx, %rdi
callq 0x1120
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x2d1f
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
leaq 0x23e0(%rip), %rdx      # 0x50df
jmp 0x2d11
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
leaq 0x1f6b(%rip), %rdx      # 0x4c7c
callq 0x5fbe
jmp 0x2d1f
callq 0x6486
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq (%rbx), %rsi
leaq 0x47aa(%rip), %rdi      # 0x74dc
xorl %eax, %eax
callq 0x10b0
xorl %edi, %edi
callq 0x11e0
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: parser_compile
Result parser_compile(char* source, size_t source_len, ObjFunction** fn,
                      Vm* vm) {
    LOG("source_len=%zu source=`%.*s`\n", source_len, (int)source_len, source);

    Parser parser = {.lex = {
                         .source = source,
                         .source_len = source_len,
                         .line = 1,
                         .column = 1,
                         .pos = 0,
                     }};

    Compiler compiler;
    memset(&compiler, 0, sizeof(compiler));
    compiler_init(&compiler, TYPE_SCRIPT, &parser);

    advance(&parser);

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

    if (parser.state == PARSER_STATE_OK) {
        *fn = compiler_end(&parser);
    }

    free(source);

    return parser.state == PARSER_STATE_OK ? RES_OK : RES_PARSE_ERR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30b8, %rsp           # imm = 0x30B8
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
xorl %ebp, %ebp
movl $0x88, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x1100
movq %rbx, 0x8(%r12)
movq %r13, 0x10(%r12)
movl $0x1, %eax
movq %rax, 0x18(%r12)
movq %rax, 0x20(%r12)
leaq 0x90(%rsp), %r13
movl $0x3028, %edx           # imm = 0x3028
movq %r13, %rdi
xorl %esi, %esi
callq 0x1100
movq 0x80(%r12), %rax
movq %rax, 0x3020(%r13)
movl $0x1, 0x3018(%r13)
movl $0x0, 0x3000(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x3008(%r13)
leaq 0x4816(%rip), %rdi      # 0x75f0
movl $0x8, %esi
callq 0x49a4
movq %rax, 0x3010(%r13)
movq %r13, 0x80(%r12)
movslq 0x3000(%r13), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x3000(%r13)
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movq %rbp, 0xb8(%rsp,%rax)
leaq 0x66c8(%rip), %rcx      # 0x94e3
movq %rcx, 0xa0(%rsp,%rax)
movq %rbp, 0xa8(%rsp,%rax)
movq %r12, %rdi
callq 0x2f64
cmpl $0x28, 0x50(%r12)
je 0x2e52
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2fb8
cmpl $0x28, 0x58(%rsp)
jne 0x2e40
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2f64
cmpl $0x0, (%r15)
jne 0x2ea0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x7, %esi
callq 0x384f
movq %r15, %rdi
xorl %esi, %esi
callq 0x384f
movq 0x80(%r15), %rax
movq 0x3010(%rax), %rcx
movq 0x3020(%rax), %rax
movq %rax, 0x80(%r15)
movq %rcx, (%r14)
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
cmpl $0x0, 0x8(%rsp)
setne %al
addq $0x30b8, %rsp           # imm = 0x30B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: compiler_init
static void compiler_init(Compiler* c, FunctionType type, Parser* p) {
    const char* const fn_name =
        type == TYPE_SCRIPT ? "<script>" : p->previous.source;
    const size_t fn_name_len = type == TYPE_SCRIPT ? 8 : p->previous.source_len;
    LOG("fn_name=`%.*s` fn_name_len=%zu\n", (int)fn_name_len, fn_name,
        fn_name_len);

    c->enclosing = p->compiler;
    c->fn = NULL;
    c->fn_type = type;
    c->locals_len = 0;
    c->scope_depth = 0;
    c->fn = value_make_fn(fn_name, fn_name_len);

    p->compiler = c;

    Local* const local = &c->locals[c->locals_len++];
    local->depth = 0;
    local->name.source = "";
    local->name.source_len = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x1, %esi
jne 0x2edc
leaq 0x4716(%rip), %rdi      # 0x75f0
jmp 0x2ee0
movq 0x68(%r14), %rdi
movl $0x8, %eax
cmpl $0x1, %esi
je 0x2eee
movq 0x70(%r14), %rax
movq 0x80(%r14), %rcx
movq %rcx, 0x3020(%rbx)
movl %esi, 0x3018(%rbx)
movl $0x0, 0x3000(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x3008(%rbx)
movq %rax, %rsi
callq 0x49a4
movq %rax, 0x3010(%rbx)
movq %rbx, 0x80(%r14)
movslq 0x3000(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x3000(%rbx)
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
xorl %ecx, %ecx
movq %rcx, 0x28(%rbx,%rax)
leaq 0x6591(%rip), %rdx      # 0x94e3
movq %rdx, 0x10(%rbx,%rax)
movq %rcx, 0x18(%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: advance
static void advance(Parser* parser) {
    parser->previous = parser->current;

    while (true) {
        lex_scan_token(&parser->lex, &parser->current);
        if (parser->current.type != TOKEN_ERROR) {
            return;
        }

        error(parser, &parser->current, parser->current.source,
              parser->current.source_len);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
movq 0x50(%rdi), %rax
movq %rax, 0x78(%rdi)
movups 0x30(%rdi), %xmm0
movups 0x40(%rdi), %xmm1
movups %xmm1, 0x68(%rdi)
movups %xmm0, 0x58(%rdi)
leaq 0x8(%rdi), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2330
cmpl $0x27, 0x50(%rbx)
jne 0x2fb2
movq 0x40(%rbx), %rdx
movq 0x48(%rbx), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31f4
jmp 0x2f8c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: declaration
static void declaration(Parser* parser, Vm* vm) {
    if (match(parser, TOKEN_VAR)) {
        var_declaration(parser, vm);
    } else if (match(parser, TOKEN_FUN)) {
        fn_declaration(parser, vm);
    } else {
        statement(parser, vm);
    }

    if (parser->state == PARSER_STATE_PANIC_MODE) {
        sync(parser);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3028, %rsp           # imm = 0x3028
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x25, 0x50(%rdi)
jne 0x2fed
movq %rbx, %rdi
callq 0x2f64
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3246
jmp 0x31a0
cmpl $0x1c, 0x50(%rbx)
jne 0x308e
movq %rbx, %rdi
callq 0x2f64
leaq 0x48f1(%rip), %rdx      # 0x78f7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36bd
movl %eax, %ebp
movq 0x80(%rbx), %rax
movq 0x3008(%rax), %rcx
testq %rcx, %rcx
je 0x303a
movslq 0x3000(%rax), %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
movq %rcx, -0x8(%rdx,%rax)
movq %rsp, %r15
movl $0x3028, %edx           # imm = 0x3028
movq %r15, %rdi
xorl %esi, %esi
callq 0x1100
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2ec4
movq 0x80(%rbx), %rax
incq 0x3008(%rax)
leaq 0x48a0(%rip), %rdx      # 0x790e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x397b
cmpl $0x2, 0x50(%rbx)
jne 0x309e
movq %rbx, %rdi
callq 0x2f64
jmp 0x3125
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32af
jmp 0x31a0
leaq 0x58(%rbx), %r15
leaq 0x456b(%rip), %r12      # 0x7614
leaq 0x48a4(%rip), %r13      # 0x7954
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x36bd
movzbl %al, %esi
movq %rbx, %rdi
callq 0x39ba
movq 0x80(%rbx), %rax
movq 0x3010(%rax), %rax
cmpb $-0x1, 0x10(%rax)
jne 0x30f0
movl $0x3d, %ecx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x31f4
movq 0x80(%rbx), %rax
movq 0x3010(%rax), %rax
incb 0x10(%rax)
cmpl $0x5, 0x50(%rbx)
jne 0x3111
movq %rbx, %rdi
callq 0x2f64
jmp 0x30b0
leaq 0x4636(%rip), %rdx      # 0x774e
movq %rbx, %rdi
movl $0x2, %esi
callq 0x397b
leaq 0x4802(%rip), %rdx      # 0x792e
movq %rbx, %rdi
movl $0x3, %esi
callq 0x397b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4485
movq %rbx, %rdi
movl $0x7, %esi
callq 0x384f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x384f
movq 0x80(%rbx), %rax
movq 0x3010(%rax), %rdx
movq 0x3020(%rax), %rax
movq %rax, 0x80(%rbx)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x39f0
movzbl %al, %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4152
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x39ba
cmpl $0x2, (%rbx)
jne 0x31b3
movl $0x3, (%rbx)
movl 0x50(%rbx), %eax
cmpl $0x28, %eax
jne 0x31c5
addq $0x3028, %rsp           # imm = 0x3028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $0x6339000000, %r14     # imm = 0x6339000000
cmpl $0x9, 0x78(%rbx)
je 0x31b3
cmpl $0x26, %eax
ja 0x31e2
movl %eax, %eax
btq %rax, %r14
jb 0x31b3
movq %rbx, %rdi
callq 0x2f64
movl 0x50(%rbx), %eax
cmpl $0x28, %eax
jne 0x31cf
jmp 0x31b3
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: error
static void error(Parser* parser, const Token* token, const char* err,
                  size_t err_len) {
    switch (parser->state) {
        case PARSER_STATE_OK:
            LOG("new parser error, entering error mode err=`%.*s`\n",
                (int)err_len, err);
            parser->state = PARSER_STATE_ERROR;

            fprintf(stderr, "%zu:%zu:%.*s, got: `%.*s`\n", token->line,
                    token->column, (int)err_len, err, (int)token->source_len,
                    token->source);
            return;
        case PARSER_STATE_ERROR:
            LOG("new parser error, entering panic mode err=`%.*s`\n",
                (int)err_len, err);
            parser->state = PARSER_STATE_PANIC_MODE;
            return;
        case PARSER_STATE_PANIC_MODE:
        case PARSER_STATE_SYNCED:
            LOG("new parser error in panic mode, skipping err=`%.*s`\n",
                (int)err_len, err);
            return;
    }
}

// Assembly:
movl (%rdi), %eax
cmpl $0x1, %eax
je 0x3200
testl %eax, %eax
je 0x3207
retq
movl $0x2, (%rdi)
retq
pushq %rax
movq %rcx, %r8
movq %rdx, %r9
movq %rsi, %r10
movl $0x1, (%rdi)
movq 0x9dd2(%rip), %rax      # 0xcff0
movq (%rax), %rdi
movq (%rsi), %rdx
movq 0x8(%rsi), %rcx
movl 0x18(%rsi), %r11d
leaq 0x43c6(%rip), %rsi      # 0x75f9
xorl %eax, %eax
pushq 0x10(%r10)
pushq %r11
callq 0x1140
addq $0x10, %rsp
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: var_declaration
static void var_declaration(Parser* parser, Vm* vm) {
    const uint8_t arg = variable_name(parser, vm, "Expected variable name");

    if (match(parser, TOKEN_EQUAL)) {
        expression(parser, vm);
    } else {
        emit_byte(parser, OP_NIL);
    }

    expect(parser, TOKEN_SEMICOLON,
           "Expected semicolon after variable declaration");

    define_variable(parser, arg);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x43bd(%rip), %rdx      # 0x7614
callq 0x36bd
movl %eax, %ebp
cmpl $0xe, 0x50(%rbx)
jne 0x327e
movq %rbx, %rdi
callq 0x2f64
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x3b46
jmp 0x328b
movq %rbx, %rdi
movl $0x7, %esi
callq 0x384f
leaq 0x4399(%rip), %rdx      # 0x762b
movq %rbx, %rdi
movl $0x9, %esi
callq 0x397b
movzbl %bpl, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x39ba
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: variable_name
static uint8_t variable_name(Parser* parser, Vm* vm, const char err[]) {
    expect(parser, TOKEN_IDENTIFIER, err);

    declare_variable(parser);
    // Globals are resolved at runtime
    if (parser->compiler->scope_depth > 0) {
        return 0;
    }

    return make_identifier_constant(parser, vm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x14, %esi
callq 0x397b
movq 0x80(%rbx), %rax
cmpq $0x0, 0x3008(%rax)
je 0x37e8
leaq 0x58(%rbx), %r15
movl 0x3000(%rax), %eax
leal 0x1(%rax), %ebp
leaq (%rax,%rax,2), %r13
shlq $0x4, %r13
addq $-0x8, %r13
leaq 0x3f4c(%rip), %r12      # 0x7659
decl %ebp
testl %ebp, %ebp
jle 0x3779
movq 0x80(%rbx), %rax
movq (%rax,%r13), %rcx
cmpq $-0x1, %rcx
je 0x3734
cmpq 0x3008(%rax), %rcx
jge 0x3734
movl $0x4, %eax
jmp 0x3767
movq -0x18(%rax,%r13), %rdi
movq -0x10(%rax,%r13), %rsi
movq 0x68(%rbx), %rdx
movq 0x70(%rbx), %rcx
callq 0x4849
testb %al, %al
je 0x376b
movl $0x37, %ecx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x31f4
movl $0x1, %eax
xorl %ecx, %ecx
jmp 0x376f
xorl %eax, %eax
movb $0x1, %cl
addq $-0x30, %r13
testb %cl, %cl
jne 0x370d
jmp 0x377e
movl $0x4, %eax
cmpl $0x4, %eax
jne 0x37e8
movq 0x80(%rbx), %rax
movslq 0x3000(%rax), %rcx
cmpq $0xff, %rcx
jne 0x37b3
leaq 0x3ef0(%rip), %rdx      # 0x7691
movl $0x29, %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31f4
jmp 0x37e8
leal 0x1(%rcx), %edx
movl %edx, 0x3000(%rax)
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq 0x20(%r15), %rdx
movq %rdx, 0x20(%rax,%rcx)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movq $-0x1, 0x28(%rax,%rcx)
movq 0x80(%rbx), %rax
cmpq $0x0, 0x3008(%rax)
jle 0x380a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x40008, %r14          # imm = 0x40008
movq 0x70(%rbx), %rsi
movq %r14, %rdi
callq 0x4950
movq %rax, %r14
leaq 0x18(%rax), %rdi
movq 0x68(%rbx), %rsi
movq 0x10(%rax), %rdx
callq 0x1160
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39f0
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: emit_byte
static void emit_byte(Parser* parser, uint8_t byte) {
    LOG("byte=%d opcode=%s\n", byte, opcode_str[byte]);
    Location loc = {.line = parser->previous.line,
                    .column = parser->previous.column};
    buf_push(parser->compiler->fn->chunk.locations, loc);
    buf_push(parser->compiler->fn->chunk.opcodes, byte);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq 0x80(%rdi), %rax
movq 0x3010(%rax), %rax
movq 0x20(%rax), %rdi
testq %rdi, %rdi
je 0x3878
movq -0x10(%rdi), %rax
jmp 0x387a
xorl %eax, %eax
testq %rdi, %rdi
je 0x3885
movq -0x8(%rdi), %rcx
jmp 0x3887
xorl %ecx, %ecx
movups 0x58(%r14), %xmm0
cmpq %rcx, %rax
jne 0x38d1
testq %rdi, %rdi
movaps %xmm0, (%rsp)
je 0x38ac
movq -0x10(%rdi), %rax
testq %rax, %rax
movl $0x8, %edx
cmovneq %rax, %rdx
jmp 0x38b1
movl $0x8, %edx
movl $0x10, %esi
callq 0x3ab4
movq 0x80(%r14), %rcx
movq 0x3010(%rcx), %rcx
movq %rax, 0x20(%rcx)
movaps (%rsp), %xmm0
movq 0x80(%r14), %rax
movq 0x3010(%rax), %rax
movq 0x20(%rax), %rcx
movq -0x8(%rcx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, -0x8(%rcx)
shlq $0x4, %rdx
movups %xmm0, (%rcx,%rdx)
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x3906
movq -0x10(%rdi), %rax
jmp 0x3908
xorl %eax, %eax
testq %rdi, %rdi
je 0x3913
movq -0x8(%rdi), %rcx
jmp 0x3915
xorl %ecx, %ecx
cmpq %rcx, %rax
jne 0x3952
testq %rdi, %rdi
je 0x3931
movq -0x10(%rdi), %rax
testq %rax, %rax
movl $0x8, %edx
cmovneq %rax, %rdx
jmp 0x3936
movl $0x8, %edx
movl $0x1, %esi
callq 0x3ab4
movq 0x80(%r14), %rcx
movq 0x3010(%rcx), %rcx
movq %rax, 0x18(%rcx)
movq 0x80(%r14), %rax
movq 0x3010(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rax), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, -0x8(%rax)
movb %bl, (%rax,%rcx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: expect
static void expect(Parser* parser, TokenType type, const char err[]) {
    if (parser->current.type == type) {
        advance(parser);
        return;
    }

    error_str_nul(parser, &parser->current, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
cmpl %esi, 0x50(%rdi)
jne 0x3995
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2f64
movq %rdx, %rbx
leaq 0x30(%r14), %r15
movq %rdx, %rdi
callq 0x10a0
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x31f4
// File: /workspace/github_c_makefile_star2_O1/gaultier[P]lox-c/parse.c
// Function: make_constant
static uint8_t make_constant(Parser* parser, Value v) {
    buf_push(parser->compiler->fn->chunk.constants, v);
    const size_t constant_i =
        buf_size(parser->compiler->fn->chunk.constants) - 1;

    return (uint8_t)constant_i;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq 0x80(%rdi), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rdi
testq %rdi, %rdi
je 0x3a19
movq -0x10(%rdi), %rax
jmp 0x3a1b
xorl %eax, %eax
testq %rdi, %rdi
je 0x3a26
movq -0x8(%rdi), %rcx
jmp 0x3a28
xorl %ecx, %ecx
cmpq %rcx, %rax
jne 0x3a65
testq %rdi, %rdi
je 0x3a44
movq -0x10(%rdi), %rax
testq %rax, %rax
movl $0x8, %edx
cmovneq %rax, %rdx
jmp 0x3a49
movl $0x8, %edx
movl $0x10, %esi
callq 0x3ab4
movq 0x80(%r14), %rcx
movq 0x3010(%rcx), %rcx
movq %rax, 0x28(%rcx)
movq 0x80(%r14), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rax), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, -0x8(%rax)
shlq $0x4, %rcx
movl %ebp, (%rax,%rcx)
movq %rbx, 0x8(%rax,%rcx)
movq 0x80(%r14), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x3aad
movb -0x8(%rax), %al
decb %al
jmp 0x3aaf
movb $-0x1, %al
popq %rbx
popq %r14
popq %rbp
retq