LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_get_func_expr_decl
static void ext_get_func_expr_decl(script_t* script, vector_t* args)
{
	EXT_CHECK_IF_CT("get_func_expr_decl");
	
	script_value_t* exp_val = script_get_arg(args, 0);
	expr_t* exp = exp_val->nat.value;
	
	if(exp->type != EXP_FUNC) error_exit_script(script, "Passed non-func expression into 'get_func_expr_decl'\n");
	
	script_push_native(script, exp->funcx.decl, NULL, NULL);
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0xdc8a(%rip)      # 0x14248
js 0x65f2
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq 0x20(%rax), %rax
cmpl $0x19, 0x28(%rax)
jne 0x65fb
movq 0x38(%rax), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x33ca
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x346f
leaq 0x7f95(%rip), %rsi      # 0xe58e
jmp 0x6602
leaq 0x7fd5(%rip), %rsi      # 0xe5d7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2ec0
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_get_expr_type
static void ext_get_expr_type(script_t* script, vector_t* args)
{
	EXT_CHECK_IF_CT("get_expr_type");

	script_value_t* exp_val = script_get_arg(args, 0);
	expr_t* exp = exp_val->nat.value;

	// TODO: make script_create_native etc
	script_push_native(script, exp->tag, NULL, NULL);
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0xdc2c(%rip)      # 0x14248
js 0x664a
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq 0x20(%rax), %rax
movq 0x30(%rax), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x33ca
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x346f
leaq 0x7fbc(%rip), %rsi      # 0xe60d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2ec0
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_get_var_expr_name
static void ext_get_var_expr_name(script_t* script, vector_t* args)
{
	EXT_CHECK_IF_CT("get_var_expr_name");

	script_value_t* exp_val = script_get_arg(args, 0);
	expr_t* exp = exp_val->nat.value;

	script_push_cstr(script, exp->varx.name);
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0xdbdd(%rip)      # 0x14248
js 0x6695
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq 0x20(%rax), %rax
movq 0x38(%rax), %rsi
movq %rbx, %rdi
callq 0x320c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x346f
leaq 0x7fb5(%rip), %rsi      # 0xe651
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2ec0
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_resolve_expr_symbols
static void ext_resolve_expr_symbols(script_t* script, vector_t* args)
{
	EXT_CHECK_IF_CT("resolve_expr_symbols");

	script_value_t* exp_val = script_get_arg(args, 0);
	resolve_symbols(script, exp_val->nat.value);

	script_push_bool(script, !g_has_error);
	g_has_error = 0;
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0xdb92(%rip)      # 0x14248
js 0x66f5
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x7ae1
movzbl 0xdb77(%rip), %esi      # 0x1424c
xorl $0x1, %esi
movq %rbx, %rdi
callq 0x2e02
movb $0x0, 0xdb65(%rip)      # 0x1424c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x346f
leaq 0x7f9d(%rip), %rsi      # 0xe699
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2ec0
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_resolve_expr_types
static void ext_resolve_expr_types(script_t* script, vector_t* args)
{
	EXT_CHECK_IF_CT("resolve_expr_types");

	script_value_t* exp_val = script_get_arg(args, 0);
	resolve_type_tags(script, exp_val->nat.value);
	
	script_push_bool(script, !g_has_error);
	g_has_error = 0;
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0xdb32(%rip)      # 0x14248
js 0x6755
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x7eea
movzbl 0xdb17(%rip), %esi      # 0x1424c
xorl $0x1, %esi
movq %rbx, %rdi
callq 0x2e02
movb $0x0, 0xdb05(%rip)      # 0x1424c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x346f
leaq 0x7ffe(%rip), %rsi      # 0xe75a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2ec0
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_add_expr_to_module
static void ext_add_expr_to_module(script_t* script, vector_t* args)
{
	EXT_CHECK_IF_CT("add_expr_to_module");
	
	script_value_t* mod_val = script_get_arg(args, 0);
	script_value_t* exp_val = script_get_arg(args, 1);
	
	int module_index = (int)mod_val->number;
	expr_t* exp = exp_val->nat.value;
	
	script_module_t* module = vec_get(&script->modules, module_index);
	vec_push_back(&module->expr_list, &exp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0xdace(%rip)      # 0x14248
js 0x67d1
movq %rsi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3446
cvttsd2si 0x20(%r15), %ecx
movq 0x20(%rax), %rax
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
addq $0x2b8, %rbx            # imm = 0x2B8
movslq %ecx, %rsi
movq %rbx, %rdi
callq 0xc15c
leaq 0x50(%rax), %rdi
movq %r14, %rsi
callq 0xc1b9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x84e8(%rip), %rsi      # 0xecc0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2ec0
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_insert_expr_into_module
static void ext_insert_expr_into_module(script_t* script, vector_t* args)
{
	EXT_CHECK_IF_CT("insert_expr_into_module");
	
	script_value_t* mod_val = script_get_arg(args, 0);
	script_value_t* exp_val = script_get_arg(args, 1);
	script_value_t* loc_val = script_get_arg(args, 2);
	
	int module_index = (int)mod_val->number;
	expr_t* exp = exp_val->nat.value;
	int location = (int)loc_val->number;
	
	script_module_t* module = vec_get(&script->modules, module_index);
	vec_insert(&module->expr_list, &exp, location);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x0, 0xda4d(%rip)      # 0x14248
js 0x686c
movq %rsi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3446
movq %rax, %r12
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x3446
cvttsd2si 0x20(%r15), %ecx
movq 0x20(%r12), %rdx
leaq -0x28(%rbp), %r14
movq %rdx, (%r14)
cvttsd2si 0x20(%rax), %r15d
addq $0x2b8, %rbx            # imm = 0x2B8
movslq %ecx, %rsi
movq %rbx, %rdi
callq 0xc15c
leaq 0x50(%rax), %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0xc25b
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8496(%rip), %rsi      # 0xed09
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2ec0
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_make_array_of_length
static void ext_make_array_of_length(script_t* script, vector_t* args)
{
	script_value_t* val = script_get_arg(args, 0);
	int length = (int)val->number;
	
	vector_t array;
	vec_init(&array, sizeof(script_value_t*));
	script_value_t* null_value = NULL;
	vec_resize(&array, length, &null_value);
	
	script_push_premade_array(script, array);
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
cvttsd2si 0x20(%rax), %r15d
leaq -0x40(%rbp), %r14
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0xbf0c
leaq -0x20(%rbp), %rdx
andq $0x0, (%rdx)
movslq %r15d, %rsi
movq %r14, %rdi
callq 0xc10a
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x335a
movq %rbx, %rdi
callq 0x346f
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_array_push
static void ext_array_push(script_t* script, vector_t* args)
{
	script_value_t* array_val = script_get_arg(args, 0);
	script_value_t* value_val = script_get_arg(args, 1);

	vector_t* array = &array_val->array;
	
	vec_push_back(array, &value_val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3446
leaq -0x18(%rbp), %rsi
movq %rax, (%rsi)
addq $0x20, %r14
movq %r14, %rdi
callq 0xc1b9
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_array_pop
static void ext_array_pop(script_t* script, vector_t* args)
{
	script_value_t* array_val = script_get_arg(args, 0);
	script_value_t* value;

	vector_t* array = &array_val->array;

	vec_pop_back(array, &value);

	push_value(script, value);
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
leaq 0x20(%rax), %rdi
leaq -0x18(%rbp), %r14
movq %r14, %rsi
callq 0xc219
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x2e40
movq %rbx, %rdi
callq 0x346f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_number_to_string
static void ext_number_to_string(script_t* script, vector_t* args)
{
	script_value_t* val = script_get_arg(args, 0);
	
	static char buf[256]; // TODO: don't use a magic number here
	sprintf(buf, "%g", val->number);
	
	script_push_cstr(script, buf);
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movsd 0x20(%rax), %xmm0
leaq 0xd869(%rip), %r14      # 0x14260
leaq 0x8359(%rip), %rsi      # 0xed57
movq %r14, %rdi
movb $0x1, %al
callq 0x2230
movq %rbx, %rdi
movq %r14, %rsi
callq 0x320c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x346f
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_create_u8_buffer
static void ext_create_u8_buffer(script_t* script, vector_t* args)
{
	vector_t* buf = emalloc(sizeof(vector_t));
	vec_init(buf, sizeof(uint8_t));
	script_push_native(script, buf, NULL, delete_u8_buffer);
	script_return_top(script); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x325f
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xbf0c
leaq 0x1ef5(%rip), %rcx      # 0x8a23
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x33ca
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x346f
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_u8_buffer_push
static void ext_u8_buffer_push(script_t* script, vector_t* args)
{
	script_native_t* nat = &script_get_arg(args, 0)->nat;
	script_value_t* val = script_get_arg(args, 1);
	
	uint8_t value = (uint8_t)val->number;
	
	vec_push_back(nat->value, &value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3446
cvttsd2si 0x20(%rax), %eax
leaq -0x11(%rbp), %rsi
movb %al, (%rsi)
movq 0x20(%r14), %rdi
callq 0xc1b9
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_u8_buffer_pop
static void ext_u8_buffer_pop(script_t* script, vector_t* args)
{
	script_native_t* nat = &script_get_arg(args, 0)->nat;
	uint8_t value;
	vec_pop_back(nat->value, &value);
	
	script_push_number(script, value);
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq 0x20(%rax), %rdi
leaq -0x11(%rbp), %r14
movq %r14, %rsi
callq 0xc219
movzbl (%r14), %eax
cvtsi2sd %eax, %xmm0
movq %rbx, %rdi
callq 0x319c
movq %rbx, %rdi
callq 0x346f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: ext_u8_buffer_to_string
static void ext_u8_buffer_to_string(script_t* script, vector_t* args)
{
	script_native_t* nat = &script_get_arg(args, 0)->nat;
	vector_t* buf = nat->value;
	unsigned char null_terminator = '\0';
	vec_push_back(buf, &null_terminator);
	script_string_t str = { buf->length - 1, (char*)buf->data };
	
	script_push_string(script, str);
	script_return_top(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3446
movq 0x20(%rax), %r14
leaq -0x11(%rbp), %rsi
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0xc1b9
movl 0x10(%r14), %esi
decl %esi
movq (%r14), %rdx
movq %rbx, %rdi
callq 0x327d
movq %rbx, %rdi
callq 0x346f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: create_type_tag
static type_tag_t* create_type_tag(script_t* script, tag_t type)
{
	type_tag_t* tag = emalloc(sizeof(type_tag_t)); 
	
	tag->defined = 1;
	tag->finalized = 0;
	
	tag->ctx.file = g_file;
	tag->ctx.line = g_line;
	tag->ctx.scope = g_scope;
	
	tag->type = type;
	
	switch(type)
	{
		case TAG_FUNC:
		{
			vec_init(&tag->func.arg_types, sizeof(type_tag_t*));
			tag->func.return_type = NULL;
		} break;
		
		case TAG_ARRAY:
		{
			tag->contained = NULL;
		} break;
		
		case TAG_STRUCT:
		{
			tag->ds.name = NULL;
			tag->ds.is_union = 0;
			tag->ds.size = 0;
			vec_init(&tag->ds.using, sizeof(type_tag_t*));
			vec_init(&tag->ds.members, sizeof(type_tag_member_t));
		} break;
		
		default: break;
	}
	
	script_module_t* module = vec_get(&script->modules, g_cur_module_index);
	vec_push_back(&module->all_type_tags, &tag);

	return tag;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movl $0x80, %edi
callq 0x325f
movq %rax, %r14
movq %rax, -0x20(%rbp)
movw $0x1, 0x24(%rax)
movq 0xce0c(%rip), %rax      # 0x14158
movq %rax, 0x8(%r14)
movl 0xcdfa(%rip), %eax      # 0x14150
movl %eax, (%r14)
movl 0xcef1(%rip), %eax      # 0x14250
movl %eax, 0x10(%r14)
movl %r15d, 0x20(%r14)
cmpl $0xa, %r15d
je 0x7396
cmpl $0x7, %r15d
je 0x738f
cmpl $0x6, %r15d
jne 0x73be
movq %r14, %rdi
addq $0x28, %rdi
pushq $0x8
popq %rsi
callq 0xbf0c
andq $0x0, 0x48(%r14)
jmp 0x73be
andq $0x0, 0x28(%r14)
jmp 0x73be
movb $0x0, 0x28(%r14)
leaq 0x40(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
pushq $0x8
popq %rsi
callq 0xbf0c
addq $0x60, %r14
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0xbf0c
addq $0x2b8, %rbx            # imm = 0x2B8
movslq 0xce7c(%rip), %rsi      # 0x14248
movq %rbx, %rdi
callq 0xc15c
leaq 0x90(%rax), %rdi
leaq -0x20(%rbp), %rbx
movq %rbx, %rsi
callq 0xc1b9
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: compare_type_tags
static char compare_type_tags(type_tag_t* a, type_tag_t* b)
{
	if(a->type != TAG_VOID && b->type != TAG_VOID)
	{
		if(a->type == TAG_DYNAMIC || b->type == TAG_DYNAMIC)
			return 1;
	}
	
	if(a->type != b->type) return 0;
	
	switch(a->type)
	{
		case TAG_FUNC:
		{
			if(!compare_type_tags(a->func.return_type, b->func.return_type)) return 0;
			if(a->func.arg_types.length != b->func.arg_types.length) return 0;
			
			for(int i = 0; i < a->func.arg_types.length; ++i)
			{
				if(!compare_type_tags(vec_get_value(&a->func.arg_types, i, type_tag_t*), vec_get_value(&b->func.arg_types, i, type_tag_t*)))
					return 0;
			}
		} break;
		
		case TAG_ARRAY:
		{
			if(a->contained->type == TAG_DYNAMIC || b->contained->type == TAG_DYNAMIC)
			{
				context_t ctx;
				ctx.file = g_file;
				ctx.line = g_line;
				
				warn_c(ctx, WARN_ARRAY_DYNAMIC_TO_SPECIFIC);
			}
			
			if(!compare_type_tags(a->contained, b->contained)) return 0;
		} break;
		
		case TAG_STRUCT:
		{
			return strcmp(a->ds.name, b->ds.name) == 0;
		} break;
		
		default: break;
	}
	
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x20(%rdi), %ecx
movl 0x20(%rsi), %edx
testl %ecx, %ecx
je 0x7436
testl %edx, %edx
je 0x7513
cmpl $0x1, %ecx
sete %al
cmpl $0x1, %edx
sete %sil
orb %al, %sil
movb $0x1, %al
jne 0x7515
cmpl %edx, %ecx
jne 0x7513
cmpl $0xa, %ecx
je 0x7524
cmpl $0x7, %ecx
je 0x74be
cmpl $0x6, %ecx
jne 0x750f
movq 0x48(%r14), %rdi
movq 0x48(%rbx), %rsi
callq 0x73f5
testb %al, %al
je 0x7513
movq 0x38(%r14), %rax
cmpq 0x38(%rbx), %rax
jne 0x7513
leaq 0x28(%r14), %r15
addq $0x28, %rbx
xorl %r12d, %r12d
cmpq %r12, 0x38(%r14)
jbe 0x750f
movq %r15, %rdi
movq %r12, %rsi
callq 0xc15c
movq (%rax), %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc15c
movq (%rax), %rsi
movq %r13, %rdi
callq 0x73f5
movl %eax, %ecx
incq %r12
xorl %eax, %eax
testb %cl, %cl
jne 0x7483
jmp 0x7515
movq 0x28(%r14), %rdi
cmpl $0x1, 0x20(%rdi)
je 0x74d2
movq 0x28(%rbx), %rsi
cmpl $0x1, 0x20(%rsi)
jne 0x7506
movq 0xcc7f(%rip), %rax      # 0x14158
movq %rax, -0x40(%rbp)
movl 0xcc6d(%rip), %eax      # 0x14150
movl %eax, -0x48(%rbp)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
xorl %eax, %eax
callq 0x7538
movq 0x28(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0x73f5
testb %al, %al
je 0x7513
movb $0x1, %al
jmp 0x7515
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0x2150
testl %eax, %eax
sete %al
jmp 0x7515
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: warn_c
static void warn_c(context_t ctx, script_warning_t warning, ...)
{
	if(!g_warning_disabled[(int)warning])
	{
		fprintf(stderr, "\nWarning %s (%s:%i):\n", g_warning_name[(int)warning], ctx.file, ctx.line);
	
		va_list args;
		va_start(args, warning);
		vfprintf(stderr, g_warning_format[(int)warning], args);
		va_end(args);
		
		fprintf(stderr, "\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xc8, %rsp
testb %al, %al
je 0x756e
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %r8, -0xb0(%rbp)
movq %r9, -0xa8(%rbp)
cmpb $0x0, 0xccb6(%rip)      # 0x1424e
je 0x75a4
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x10(%rbp), %rax
movq 0xca41(%rip), %rbx      # 0x13ff0
movq (%rbx), %rdi
movq 0x8(%rax), %rcx
movl (%rax), %r8d
leaq 0x6a2a(%rip), %rsi      # 0xdfea
leaq 0x6a4f(%rip), %rdx      # 0xe016
xorl %eax, %eax
callq 0x2170
leaq -0xd0(%rbp), %rax
leaq -0x20(%rbp), %rdx
movq %rax, 0x10(%rdx)
leaq 0x30(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq (%rbx), %rdi
leaq 0x6a9b(%rip), %rsi      # 0xe097
callq 0x2210
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x2120
jmp 0x759a
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: reference_function
static func_decl_t* reference_function(script_t* script, const char* name)
{
	for (int module_index = 0; module_index < script->modules.length; ++module_index)
	{
		script_module_t* module = vec_get(&script->modules, module_index);
		for (int i = 0; i < module->functions.length; ++i)
		{
			func_decl_t* decl = vec_get_value(&module->functions, i, func_decl_t*);
			if (strcmp(decl->name, name) == 0)
				return decl;
		}
	}
	
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x2b8(%rdi), %rax
xorl %esi, %esi
movq %rdi, -0x38(%rbp)
movq %rax, -0x30(%rbp)
cmpq %rsi, 0x2c8(%rdi)
jbe 0x7696
movq %rax, %rdi
movq %rsi, -0x40(%rbp)
callq 0xc15c
movq %rax, %r15
movq %rax, %r13
addq $0x20d0, %r13           # imm = 0x20D0
xorl %r14d, %r14d
cmpq %r14, 0x20e0(%r15)
jbe 0x7685
movq %r13, %rdi
movq %r14, %rsi
callq 0xc15c
movq (%rax), %r12
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0x2150
incq %r14
testl %eax, %eax
jne 0x7658
jmp 0x7699
movq -0x40(%rbp), %rsi
incq %rsi
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
jmp 0x7633
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: declare_variable
static var_decl_t* declare_variable(script_t* script, const char* name, type_tag_t* tag)
{
	var_decl_t* decl = reference_variable(script, name);
	
	if(!decl)
	{
		decl = emalloc(sizeof(type_tag_t));
		
		decl->parent = g_cur_func;
		decl->tag = tag;
		decl->name = estrdup(name);
		decl->scope = g_scope;
		
		if(g_cur_func)
		{
			decl->index = g_cur_func->locals.length;
			vec_push_back(&g_cur_func->locals, &decl);
			return decl;
		}
	
		// NOTE: g_cur_module_index MUST have the right value rn
		script_module_t* module = vec_get(&script->modules, g_cur_module_index);

		// NOTE: The global index must be unique across modules
		int index = module->globals.length;
		for (int i = 0; i < g_cur_module_index; ++i)
		{
			script_module_t* prev_module = vec_get(&script->modules, i);
			index += prev_module->globals.length;
		}

		decl->index = index;
		vec_push_back(&module->globals, &decl);

		return decl;
	}
	else if (!g_cur_func)
		error_exit_p("Attempted to redeclare global variable '%s'\n", name);

	return decl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
callq 0x77b1
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x76ef
cmpq $0x0, 0xcb80(%rip)      # 0x14258
jne 0x779e
leaq 0x6b8c(%rip), %rdi      # 0xe271
movq %r15, %rsi
xorl %eax, %eax
callq 0x78e4
movl $0x80, %edi
callq 0x325f
movq %rax, %r14
movq %rax, -0x30(%rbp)
movq 0xcb51(%rip), %rax      # 0x14258
movq %rax, (%r14)
movq %r12, 0x8(%r14)
movq %r15, %rdi
callq 0x24df
movq %rax, 0x10(%r14)
movl 0xcb30(%rip), %eax      # 0x14250
movl %eax, 0x18(%r14)
movq 0xcb2d(%rip), %r15      # 0x14258
testq %r15, %r15
je 0x773e
movl 0x30(%r15), %eax
movl %eax, 0x1c(%r14)
addq $0x20, %r15
jmp 0x7792
addq $0x2b8, %rbx            # imm = 0x2B8
movslq 0xcafc(%rip), %rsi      # 0x14248
movq %rbx, %rdi
callq 0xc15c
movq %rax, %r15
movq 0x2100(%rax), %r13
xorl %r12d, %r12d
movslq 0xcae0(%rip), %rax      # 0x14248
cmpq %rax, %r12
jge 0x7787
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc15c
movslq %r13d, %r13
addq 0x2100(%rax), %r13
incq %r12
jmp 0x7761
addq $0x20f0, %r15           # imm = 0x20F0
movl %r13d, 0x1c(%r14)
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
callq 0xc1b9
movq -0x30(%rbp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: reference_variable
static var_decl_t* reference_variable(script_t* script, const char* name)
{
	if(g_cur_func)
	{
		for(int scope = g_scope; scope >= 0; --scope)
		{
			for(int i = 0; i < g_cur_func->locals.length; ++i)
			{
				var_decl_t* decl = vec_get_value(&g_cur_func->locals, i, var_decl_t*);
				if(decl->scope == scope && strcmp(decl->name, name) == 0) return decl;
			}
		}
		
		for(int i = 0; i < g_cur_func->args.length; ++i)
		{
			var_decl_t* decl = vec_get_value(&g_cur_func->args, i, var_decl_t*);
			if(strcmp(decl->name, name) == 0) return decl;
		}
	}

	for (int module_index = 0; module_index < script->modules.length; ++module_index)
	{
		script_module_t* module = vec_get(&script->modules, module_index);
		for (int i = 0; i < module->globals.length; ++i)
		{
			var_decl_t* decl = vec_get_value(&module->globals, i, var_decl_t*);
			if (strcmp(decl->name, name) == 0) return decl;
		}
	}
	
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
movq 0xca88(%rip), %rdi      # 0x14258
testq %rdi, %rdi
je 0x785e
movl 0xca70(%rip), %r14d     # 0x14250
xorl %r15d, %r15d
testl %r14d, %r14d
js 0x7851
cmpq %r15, 0x30(%rdi)
jbe 0x7825
addq $0x20, %rdi
movq %r15, %rsi
callq 0xc15c
movq (%rax), %r12
cmpl %r14d, 0x18(%r12)
jne 0x7819
movq 0x10(%r12), %rdi
movq %rbx, %rsi
callq 0x2150
testl %eax, %eax
je 0x78d2
incq %r15
movq 0xca35(%rip), %rdi      # 0x14258
jmp 0x77e8
decl %r14d
jmp 0x77e0
addq $0x40, %rdi
movq %r15, %rsi
callq 0xc15c
movq (%rax), %r12
movq 0x10(%r12), %rdi
movq %rbx, %rsi
callq 0x2150
incq %r15
testl %eax, %eax
je 0x78d2
movq 0xca00(%rip), %rdi      # 0x14258
cmpq %r15, 0x50(%rdi)
ja 0x782a
movq -0x30(%rbp), %rax
leaq 0x2b8(%rax), %rdi
xorl %esi, %esi
movq %rdi, -0x38(%rbp)
cmpq %rsi, 0x2c8(%rax)
jbe 0x78cf
movq %rsi, -0x40(%rbp)
callq 0xc15c
movq %rax, %r15
movq %rax, %r14
addq $0x20f0, %r14           # imm = 0x20F0
xorl %r13d, %r13d
cmpq %r13, 0x2100(%r15)
jbe 0x78be
movq %r14, %rdi
movq %r13, %rsi
callq 0xc15c
movq (%rax), %r12
movq 0x10(%r12), %rdi
movq %rbx, %rsi
callq 0x2150
incq %r13
testl %eax, %eax
jne 0x7891
jmp 0x78d2
movq -0x40(%rbp), %rsi
incq %rsi
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rdi
jmp 0x786f
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: error_exit_p
static void error_exit_p(const char* fmt, ...)
{
	fprintf(stderr, "\nError (%s:%i):\n", g_file, g_line);
	
	va_list args;
	va_start(args, fmt);
	vfprintf(stderr, fmt, args);
	va_end(args);
	
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
testb %al, %al
je 0x7924
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0xe0(%rbp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
movq 0xc6aa(%rip), %r15      # 0x13ff0
movq (%r15), %rdi
movq 0xc808(%rip), %rdx      # 0x14158
movl 0xc7fa(%rip), %ecx      # 0x14150
leaq 0x6941(%rip), %rsi      # 0xe29e
xorl %eax, %eax
callq 0x2170
leaq -0x30(%rbp), %rdx
movq %r14, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2210
pushq $0x1
popq %rdi
callq 0x2240
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: create_expr
static expr_t* create_expr(expr_type_t type)
{
	expr_t* exp = emalloc(sizeof(expr_t));

	exp->is_shallow_copy = 0;
	exp->tag = NULL;
	exp->ctx.file = g_file;
	exp->ctx.line = g_line;
	exp->ctx.scope = g_scope;
	exp->ctx.func = g_cur_func;
	exp->type = type;
	
	return exp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x60
popq %rdi
callq 0x325f
movb $0x0, (%rax)
andq $0x0, 0x30(%rax)
movq 0xc7a5(%rip), %rcx      # 0x14158
movq %rcx, 0x10(%rax)
movl 0xc793(%rip), %ecx      # 0x14150
movl %ecx, 0x8(%rax)
movl 0xc88a(%rip), %ecx      # 0x14250
movl %ecx, 0x18(%rax)
movq 0xc888(%rip), %rcx      # 0x14258
movq %rcx, 0x20(%rax)
movl %ebx, 0x28(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: register_number
static int register_number(script_t* script, double number)
{
	for(int i = 0; i < script->numbers.length; ++i)
	{
		if(vec_get_value(&script->numbers, i, double) == number)
			return i;
	}
	
	vec_push_back(&script->numbers, &number);
	return script->numbers.length - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movsd %xmm0, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
leaq 0x1f8(%rdi), %r15
xorl %r14d, %r14d
cmpq %r14, 0x208(%rbx)
jbe 0x7a28
movq %r15, %rdi
movq %r14, %rsi
callq 0xc15c
movsd (%rax), %xmm0
ucomisd -0x20(%rbp), %xmm0
jne 0x7a23
jnp 0x7a3e
incq %r14
jmp 0x7a02
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
callq 0xc1b9
movl 0x208(%rbx), %r14d
decl %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: register_string
static int register_string(script_t* script, const char* string)
{
	for(int i = 0; i < script->strings.length; ++i)
	{
		if(strcmp(vec_get_value(&script->strings, i, script_string_t).data, string) == 0)
			return i;
	}
	
	script_string_t str;
	str.length = strlen(string);
	str.data = emalloc(str.length + 1);
	strcpy(str.data, string);
	
	vec_push_back(&script->strings, &str);
	return script->strings.length - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x218(%rdi), %r14
xorl %r12d, %r12d
cmpq %r12, 0x228(%rbx)
jbe 0x7a94
movq %r14, %rdi
movq %r12, %rsi
callq 0xc15c
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x2150
testl %eax, %eax
je 0x7ad1
incq %r12
jmp 0x7a6b
movq %r15, %rdi
callq 0x20b0
leaq -0x30(%rbp), %r12
movl %eax, (%r12)
leal 0x1(%rax), %edi
callq 0x325f
movq %rax, 0x8(%r12)
movq %rax, %rdi
movq %r15, %rsi
callq 0x2050
movq %r14, %rdi
movq %r12, %rsi
callq 0xc1b9
movl 0x228(%rbx), %r12d
decl %r12d
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: get_type_tag_from_name
static type_tag_t* get_type_tag_from_name(script_t* script, const char* name)
{
	type_tag_t* user_tag = get_user_type_tag_from_name(script, name);
	if(user_tag) return user_tag;
	
	for(int i = 0; i < NUM_BUILTIN_TAGS; ++i)
	{
		if(strcmp(g_builtin_type_tags[i], name) == 0)
			return create_type_tag(script, (tag_t)i);
	}
	
	type_tag_t* potential_tag = create_type_tag(script, TAG_STRUCT);
	
	potential_tag->ds.name = estrdup(name);
	vec_init(&potential_tag->ds.members, sizeof(type_tag_member_t));
	potential_tag->defined = 0;
	
	script_module_t* module = vec_get(&script->modules, g_cur_module_index);
	map_set(&module->user_type_tags, name, potential_tag);
	
	return potential_tag;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x7e8a
movq %rax, %r15
testq %rax, %rax
jne 0x7da9
leaq 0x58da(%rip), %r12      # 0xd608
xorl %r15d, %r15d
movq %r12, %r13
cmpq $0x9, %r15
je 0x7d56
movslq (%r13), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x2150
testl %eax, %eax
je 0x7dbb
incq %r15
addq $0x4, %r13
jmp 0x7d34
pushq $0xa
popq %rsi
movq %r14, %rdi
callq 0x731e
movq %rax, %r15
movq %rbx, %rdi
callq 0x24df
movq %rax, 0x30(%r15)
leaq 0x60(%r15), %rdi
pushq $0x20
popq %rsi
callq 0xbf0c
movb $0x0, 0x24(%r15)
addq $0x2b8, %r14            # imm = 0x2B8
movslq 0xc4b9(%rip), %rsi      # 0x14248
movq %r14, %rdi
callq 0xc15c
leaq 0xb0(%rax), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xc445
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %r15d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x731e
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: error_defer_e
static void error_defer_e(expr_t* exp, const char* fmt, ...)
{
	fprintf(stderr, "\nError (%s:%i):\n", exp->ctx.file, exp->ctx.line);
	
	va_list args;
	va_start(args, fmt);
	vfprintf(stderr, fmt, args);
	va_end(args);
	
	g_has_error = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
testb %al, %al
je 0x7e14
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0xe0(%rbp), %r14
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
movq 0xc1be(%rip), %r15      # 0x13ff0
movq (%r15), %rax
movq 0x10(%rdi), %rdx
movl 0x8(%rdi), %ecx
leaq 0x645b(%rip), %rsi      # 0xe29e
movq %rax, %rdi
xorl %eax, %eax
callq 0x2170
leaq -0x30(%rbp), %rdx
movq %r14, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2210
movb $0x1, 0xc3d0(%rip)      # 0x1424c
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: get_user_type_tag_from_name
static type_tag_t* get_user_type_tag_from_name(script_t* script, const char* name)
{
	for (int i = 0; i < script->modules.length; ++i)
	{
		script_module_t* module = vec_get(&script->modules, i);
		type_tag_t* tag = map_get(&module->user_type_tags, name);
		if (tag)
			return tag;
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2b8(%rdi), %r12
xorl %ebx, %ebx
xorl %r13d, %r13d
cmpq %r13, 0x2c8(%r15)
jbe 0x7ed8
movq %r12, %rdi
movq %r13, %rsi
callq 0xc15c
leaq 0xb0(%rax), %rdi
movq %r14, %rsi
callq 0xc52e
incq %r13
testq %rax, %rax
je 0x7eaa
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: get_struct_member_function
static func_decl_t* get_struct_member_function(script_t* script, const char* struct_name, const char* func_name)
{
	size_t la = strlen(struct_name);
	size_t length = la + strlen(func_name) + 2;
	type_tag_t* struct_tag = get_user_type_tag_from_name(script, struct_name);
	if (!struct_tag) return NULL;

	// NOTE: Stores (struct_name)_(func_name)
	// which is ultimately the name of the member function
	// in the global scope
	char* buf = emalloc(length);

	strcpy(buf, struct_name);
	buf[la] = '_';
	strcpy(buf + la + 1, func_name);

	func_decl_t* result = reference_function(script, buf);
	free(buf);

	if (result && (result->args.length < 1 || !compare_type_tags(vec_get_value(&result->args, 0, var_decl_t*)->tag, struct_tag)))
		return NULL;

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20b0
movq %rax, %r13
movq %r15, %rdi
callq 0x20b0
movq %rax, %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x7e8a
testq %rax, %rax
je 0x8815
movq %rax, -0x30(%rbp)
leaq (%rbx,%r13), %rdi
addq $0x2, %rdi
callq 0x325f
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2050
movb $0x5f, (%rbx,%r13)
leaq (%rbx,%r13), %rdi
incq %rdi
movq %r15, %rsi
callq 0x2050
movq %r14, %rdi
movq %rbx, %rsi
callq 0x760e
movq %rax, %r14
movq %rbx, %rdi
callq 0x2030
testq %r14, %r14
je 0x8810
cmpq $0x0, 0x50(%r14)
je 0x8815
movq %r14, %rdi
addq $0x40, %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0xc15c
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x73f5
testb %al, %al
je 0x8818
movq %r14, %r15
jmp 0x8818
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: error_exit_e
static void error_exit_e(expr_t* exp, const char* fmt, ...)
{
	fprintf(stderr, "\nError (%s:%i):\n", exp->ctx.file, exp->ctx.line);
	
	va_list args;
	va_start(args, fmt);
	vfprintf(stderr, fmt, args);
	va_end(args);
	
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
testb %al, %al
je 0x886a
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0xe0(%rbp), %r14
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
movq 0xb768(%rip), %r15      # 0x13ff0
movq (%r15), %rax
movq 0x10(%rdi), %rdx
movl 0x8(%rdi), %ecx
leaq 0x5a05(%rip), %rsi      # 0xe29e
movq %rax, %rdi
xorl %eax, %eax
callq 0x2170
leaq -0x30(%rbp), %rdx
movq %r14, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2210
pushq $0x1
popq %rdi
callq 0x2240
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: get_struct_type_member_index
static int get_struct_type_member_index(type_tag_t* tag, const char* name)
{
	// NOTE: In unions, all members are located at the same index (0)
	if(tag->ds.is_union)
		return 0;

	for(int i = 0; i < tag->ds.members.length; ++i)
	{
		type_tag_member_t* mem = vec_get(&tag->ds.members, i);
		if(strcmp(mem->name, name) == 0)
			return mem->index;
	}
	
	return -1;
}

// Assembly:
xorl %eax, %eax
cmpb $0x0, 0x28(%rdi)
je 0x88dc
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0x60(%rdi), %r12
xorl %r13d, %r13d
cmpq %r13, 0x70(%r15)
jbe 0x8922
movq %r12, %rdi
movq %r13, %rsi
callq 0xc15c
movq %rax, %rbx
movq (%rax), %rdi
movq %r14, %rsi
callq 0x2150
incq %r13
testl %eax, %eax
jne 0x88f7
movl 0x8(%rbx), %eax
jmp 0x8925
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: warn_e
static void warn_e(expr_t* exp, script_warning_t warning, ...)
{
	if(!g_warning_disabled[(int)warning])
	{
		fprintf(stderr, "\nWarning %s (%s:%i):\n", g_warning_name[(int)warning], exp->ctx.file, exp->ctx.line);
	
		va_list args;
		va_start(args, warning);
		vfprintf(stderr, g_warning_format[(int)warning], args);
		va_end(args);
		
		fprintf(stderr, "\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
testb %al, %al
je 0x896f
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %r8, -0xc0(%rbp)
movq %r9, -0xb8(%rbp)
movl %esi, %r14d
leaq 0xb8b8(%rip), %rax      # 0x1424d
cmpb $0x0, (%r14,%rax)
je 0x89a8
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0xb641(%rip), %rbx      # 0x13ff0
movq (%rbx), %rax
leaq 0x4c37(%rip), %rcx      # 0xd5f0
movslq (%rcx,%r14,4), %rdx
addq %rcx, %rdx
movq 0x10(%rdi), %rcx
movl 0x8(%rdi), %r8d
leaq 0x561b(%rip), %rsi      # 0xdfea
movq %rax, %rdi
xorl %eax, %eax
callq 0x2170
leaq -0xe0(%rbp), %rax
leaq -0x30(%rbp), %rdx
movq %rax, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%rbx), %rdi
leaq 0x4bf5(%rip), %rax      # 0xd5fc
movslq (%rax,%r14,4), %rsi
addq %rax, %rsi
callq 0x2210
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x2120
jmp 0x899c
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: destroy_type_tag
static void destroy_type_tag(void* vtag)
{
	type_tag_t* tag = vtag;
	switch(tag->type)
	{
		case TAG_FUNC:
		{	
			vec_destroy(&tag->func.arg_types);
		} break;
	
		case TAG_STRUCT:
		{
			free(tag->ds.name);
			
			for(int i = 0; i < tag->ds.members.length; ++i)
			{
				type_tag_member_t* mem = vec_get(&tag->ds.members, i);
				free(mem->name);
				if(mem->default_value)
					delete_expr(mem->default_value);
			}
				
			vec_destroy(&tag->ds.using);
			vec_destroy(&tag->ds.members);
		} break;
		
		default: break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x20(%rdi), %eax
cmpl $0xa, %eax
je 0x8c03
cmpl $0x6, %eax
jne 0x8c5f
addq $0x28, %rbx
movq %rbx, %r14
jmp 0x8c4f
movq 0x30(%rbx), %rdi
callq 0x2030
leaq 0x60(%rbx), %r14
xorl %r15d, %r15d
cmpq %r15, 0x70(%rbx)
jbe 0x8c43
movq %r14, %rdi
movq %r15, %rsi
callq 0xc15c
movq %rax, %r12
movq (%rax), %rdi
callq 0x2030
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x8c3e
callq 0x8a3f
incq %r15
jmp 0x8c13
addq $0x40, %rbx
movq %rbx, %rdi
callq 0xc3f5
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc3f5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: print_stack_trace
static void print_stack_trace(script_t* script)
{
	fprintf(stderr, "Trace:\n");
	for(int i = script->call_records.length - 1; i >= 0; --i)
	{
		script_call_record_t* record = vec_get(&script->call_records, i);

		fprintf(stderr, "(%s, %d): ", record->file, record->line);
		
		if (record->function.is_extern)
			fprintf(stderr, "extern %s(", vec_get_value(&script->extern_names, record->function.index, char*));
		else
			fprintf(stderr, "%s(", vec_get_value(&script->function_names, record->function.index, char*));
		
		if (record->nargs > 0)
		{
			// NOTE: arguments started at exactly record->stackSize - record->nargs
			int args_start = record->stack_size - record->nargs;

			// NOTE: Print all arguments to this function
			// TODO: Have write_value take in a FILE* so we can route this
			// to stderr
			for (int i = args_start; i < args_start + record->nargs; ++i)
			{
				write_value(vec_get_value(&script->stack, i, script_value_t*), 1);
				if (i + 1 < args_start + record->nargs)
					fprintf(stderr, ", ");
			}
		}

		fprintf(stderr, ")\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0xb36d(%rip), %rax      # 0x13ff0
movq (%rax), %rcx
leaq 0x60ef(%rip), %rdi      # 0xed7c
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x2250
leaq 0x130(%rbx), %rax
movq %rax, -0x30(%rbp)
movl 0x140(%rbx), %esi
movq %rbx, -0x38(%rbp)
leaq 0x198(%rbx), %r12
pushq $0x1
popq %r13
decq %rsi
testl %esi, %esi
js 0x8dca
movq %rsi, -0x40(%rbp)
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x30(%rbp), %rdi
callq 0xc15c
movq %rax, %r15
movq 0xb310(%rip), %rbx      # 0x13ff0
movq (%rbx), %rdi
movq 0x20(%rax), %rdx
movl 0x28(%rax), %ecx
leaq 0x6093(%rip), %rsi      # 0xed84
xorl %eax, %eax
callq 0x2170
xorl %eax, %eax
cmpb $0x0, 0x14(%r15)
sete %al
movq (%rbx), %rbx
movslq 0x18(%r15), %rsi
leaq 0x607f(%rip), %r14      # 0xed8f
leaq 0x607f(%rip), %rcx      # 0xed96
cmoveq %rcx, %r14
shll $0x6, %eax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax), %rdi
addq $0x238, %rdi            # imm = 0x238
callq 0xc15c
movq (%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2170
movl 0x10(%r15), %eax
testl %eax, %eax
jle 0x8da5
movl (%r15), %ebx
subl %eax, %ebx
movslq %ebx, %r14
addl %ebx, %eax
cltq
cmpq %rax, %r14
jge 0x8da5
movq %r12, %rdi
movq %r14, %rsi
callq 0xc15c
movq (%rax), %rdi
movl %r13d, %esi
callq 0x8dd9
incq %r14
movl 0x10(%r15), %eax
leal (%rax,%rbx), %ecx
movslq %ecx, %rcx
cmpq %rcx, %r14
jge 0x8d52
movq 0xb266(%rip), %rax      # 0x13ff0
movq (%rax), %rcx
leaq 0x6006(%rip), %rdi      # 0xed9a
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x2250
movl 0x10(%r15), %eax
jmp 0x8d52
movq 0xb244(%rip), %rax      # 0x13ff0
movq (%rax), %rcx
leaq 0x697c(%rip), %rdi      # 0xf732
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x2250
movq -0x40(%rbp), %rsi
jmp 0x8cb8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: mark
static void mark(script_value_t* value)
{
	if(!value) return;
	if(value->marked) return;
	
	value->marked = 1;
	
	if(value->type == VAL_ARRAY)
	{
		for(int i = 0; i < value->array.length; ++i)
		{	
			script_value_t* v = vec_get_value(&value->array, i, script_value_t*); 
			mark(v);
		}
	}
	else if(value->type == VAL_STRUCT_INSTANCE)
	{
		for(int i = 0; i < value->ds.members.length; ++i)
		{
			script_value_t* v = vec_get_value(&value->ds.members, i, script_value_t*); 
			mark(v);
		}
	}
	else if(value->type == VAL_NATIVE)
	{
		if(value->nat.on_mark)
			value->nat.on_mark(value->nat.value);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x8ff4
movq %rdi, %rbx
cmpb $0x0, 0x18(%rdi)
je 0x8fff
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x18(%rbx)
movl 0xc(%rbx), %eax
cmpl $0x6, %eax
je 0x9053
cmpl $0x8, %eax
je 0x903a
cmpl $0x7, %eax
jne 0x8ff4
leaq 0x20(%rbx), %r14
xorl %r15d, %r15d
cmpq %r15, 0x30(%rbx)
jbe 0x8ff4
movq %r14, %rdi
movq %r15, %rsi
callq 0xc15c
movq (%rax), %rdi
callq 0x8fdc
incq %r15
jmp 0x901c
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x8ff4
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
leaq 0x20(%rbx), %r14
xorl %r15d, %r15d
cmpq %r15, 0x30(%rbx)
jbe 0x8ff4
movq %r14, %rdi
movq %r15, %rsi
callq 0xc15c
movq (%rax), %rdi
callq 0x8fdc
incq %r15
jmp 0x905a
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: get_char
static int get_char()
{
	if(!g_code) return EOF;
	
	int c = *g_code;
	if(c == '\0') return EOF;
	else 
	{
		++g_code;
		return c;
	}
}

// Assembly:
movq 0xaa3f(%rip), %rcx      # 0x14240
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x9823
pushq %rbp
movq %rsp, %rbp
movsbl (%rcx), %edx
testl %edx, %edx
je 0x9822
incq %rcx
movq %rcx, 0xaa20(%rip)      # 0x14240
movl %edx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: parse_bin_rhs
static expr_t* parse_bin_rhs(script_t* script, expr_t* lhs, int eprec)
{
	while(1)
	{
		int prec = get_prec(g_cur_tok);
	
		if(prec < eprec)
			return lhs;
	
		int op = g_cur_tok;
		
		get_next_token();
		
		expr_t* rhs = parse_unary(script);
		if(get_prec(g_cur_tok) > prec)
			rhs = parse_bin_rhs(script, rhs, prec + 1);
		
		expr_t* newLhs = create_expr(EXP_BINARY);
		
		newLhs->binx.lhs = lhs;
		newLhs->binx.rhs = rhs;
		newLhs->binx.op = op;
		
		lhs = newLhs;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, -0x2c(%rbp)
movq %rsi, %r15
movq %rdi, %r14
movl 0x9cff(%rip), %r13d     # 0x14360
movl %r13d, %edi
callq 0xae0d
cmpl -0x2c(%rbp), %eax
jl 0xa6ba
movl %eax, %ebx
callq 0x9824
movq %r14, %rdi
callq 0x9837
movq %rax, %r12
movl 0x9cda(%rip), %edi      # 0x14360
callq 0xae0d
cmpl %ebx, %eax
jle 0xa6a1
incl %ebx
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xa643
movq %rax, %r12
pushq $0xe
popq %rdi
callq 0x7994
movq %r15, 0x38(%rax)
movq %r12, 0x40(%rax)
movl %r13d, 0x48(%rax)
movq %rax, %r15
jmp 0xa65a
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq