LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x21c0
testq %rax, %rax
je 0x8242
movq %rax, %r14
movq %rax, -0x20(%rbp)
movw $0x1, 0x24(%rax)
movq 0xdfcb(%rip), %rax      # 0x16158
movq %rax, 0x8(%r14)
movl 0xdfb9(%rip), %eax      # 0x16150
movl %eax, (%r14)
movl 0xe0b0(%rip), %eax      # 0x16250
movl %eax, 0x10(%r14)
movl %r15d, 0x20(%r14)
cmpl $0xa, %r15d
je 0x81df
cmpl $0x7, %r15d
je 0x81d5
cmpl $0x6, %r15d
jne 0x820b
movq %r14, %rdi
addq $0x28, %rdi
movl $0x8, %esi
callq 0xda7c
movq $0x0, 0x48(%r14)
jmp 0x820b
movq $0x0, 0x28(%r14)
jmp 0x820b
movb $0x0, 0x28(%r14)
leaq 0x40(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movl $0x8, %esi
callq 0xda7c
addq $0x60, %r14
movl $0x20, %esi
movq %r14, %rdi
callq 0xda7c
addq $0x2b8, %rbx            # imm = 0x2B8
movslq 0xe02f(%rip), %rsi      # 0x16248
movq %rbx, %rdi
callq 0xdcf3
leaq 0x90(%rax), %rdi
leaq -0x20(%rbp), %rbx
movq %rbx, %rsi
callq 0xdd50
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9a4e(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0x388c
// File: /workspace/github_c_makefile_star2_O3/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 0x8291
testl %edx, %edx
je 0x836f
cmpl $0x1, %ecx
sete %al
cmpl $0x1, %edx
sete %sil
orb %al, %sil
movb $0x1, %al
jne 0x8371
cmpl %edx, %ecx
jne 0x836f
cmpl $0xa, %ecx
je 0x8380
cmpl $0x7, %ecx
je 0x831a
cmpl $0x6, %ecx
jne 0x836b
movq 0x48(%r14), %rdi
movq 0x48(%rbx), %rsi
callq 0x8250
testb %al, %al
je 0x836f
movq 0x38(%r14), %rax
cmpq 0x38(%rbx), %rax
jne 0x836f
testq %rax, %rax
je 0x836b
leaq 0x28(%r14), %r15
addq $0x28, %rbx
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xdcf3
movq (%rax), %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdcf3
movq (%rax), %rsi
movq %r13, %rdi
callq 0x8250
testb %al, %al
je 0x836f
incq %r12
cmpq %r12, 0x38(%r14)
ja 0x82e7
jmp 0x836b
movq 0x28(%r14), %rdi
cmpl $0x1, 0x20(%rdi)
je 0x832e
movq 0x28(%rbx), %rsi
cmpl $0x1, 0x20(%rsi)
jne 0x8362
movq 0xde23(%rip), %rax      # 0x16158
movq %rax, -0x40(%rbp)
movl 0xde11(%rip), %eax      # 0x16150
movl %eax, -0x48(%rbp)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
xorl %eax, %eax
callq 0x8394
movq 0x28(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0x8250
testb %al, %al
je 0x836f
movb $0x1, %al
jmp 0x8371
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 0x2160
testl %eax, %eax
sete %al
jmp 0x8371
// File: /workspace/github_c_makefile_star2_O3/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 0x83ca
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, 0xde5a(%rip)      # 0x1624e
je 0x8400
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x10(%rbp), %rax
movq 0xdbe5(%rip), %rbx      # 0x15ff0
movq (%rbx), %rdi
movq 0x8(%rax), %rcx
movl (%rax), %r8d
leaq 0x7bc6(%rip), %rsi      # 0xffe2
leaq 0x7beb(%rip), %rdx      # 0x1000e
xorl %eax, %eax
callq 0x2180
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 0x7c37(%rip), %rsi      # 0x1008f
callq 0x2210
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x2120
jmp 0x83f6
// File: /workspace/github_c_makefile_star2_O3/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
cmpq $0x0, 0x2c8(%rdi)
je 0x8501
movq %rsi, %rbx
leaq 0x2b8(%rdi), %rax
movq %rax, -0x38(%rbp)
xorl %esi, %esi
movq %rdi, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq %rsi, -0x40(%rbp)
callq 0xdcf3
cmpq $0x0, 0x20e0(%rax)
je 0x84ed
movq %rax, %r15
movq %rax, %r13
addq $0x20d0, %r13           # imm = 0x20D0
xorl %r14d, %r14d
movq %r13, %rdi
movq %r14, %rsi
callq 0xdcf3
movq (%rax), %r12
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0x2160
testl %eax, %eax
je 0x8504
incq %r14
cmpq %r14, 0x20e0(%r15)
ja 0x84c2
movq -0x40(%rbp), %rsi
incq %rsi
movq -0x30(%rbp), %rdi
cmpq %rsi, 0x2c8(%rdi)
ja 0x849b
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_O3/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 0x863a
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x855a
cmpq $0x0, 0xdd15(%rip)      # 0x16258
jne 0x8619
leaq 0x7d19(%rip), %rdi      # 0x10269
movq %r15, %rsi
xorl %eax, %eax
callq 0x878e
movl $0x80, %edi
callq 0x21c0
testq %rax, %rax
je 0x862c
movq %rax, %r14
movq %rax, -0x30(%rbp)
movq 0xdcdd(%rip), %rax      # 0x16258
movq %rax, (%r14)
movq %r12, 0x8(%r14)
movq %r15, %rdi
callq 0x2817
movq %rax, 0x10(%r14)
movl 0xdcbc(%rip), %eax      # 0x16250
movl %eax, 0x18(%r14)
movq 0xdcb9(%rip), %r15      # 0x16258
testq %r15, %r15
je 0x85b2
movl 0x30(%r15), %eax
movl %eax, 0x1c(%r14)
addq $0x20, %r15
jmp 0x860d
addq $0x2b8, %rbx            # imm = 0x2B8
movslq 0xdc88(%rip), %rsi      # 0x16248
movq %rbx, %rdi
callq 0xdcf3
movq %rax, %r15
movq 0x2100(%rax), %r13
cmpl $0x0, 0xdc6f(%rip)      # 0x16248
jle 0x8602
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdcf3
movslq %r13d, %r13
addq 0x2100(%rax), %r13
incq %r12
movslq 0xdc4b(%rip), %rax      # 0x16248
cmpq %rax, %r12
jl 0x85de
addq $0x20f0, %r15           # imm = 0x20F0
movl %r13d, 0x1c(%r14)
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
callq 0xdd50
movq -0x30(%rbp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9664(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0x388c
// File: /workspace/github_c_makefile_star2_O3/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 0xdbff(%rip), %rdi      # 0x16258
testq %rdi, %rdi
je 0x86fa
movl 0xdbe7(%rip), %r14d     # 0x16250
testl %r14d, %r14d
js 0x86bd
cmpq $0x0, 0x30(%rdi)
je 0x86b1
xorl %r15d, %r15d
addq $0x20, %rdi
movq %r15, %rsi
callq 0xdcf3
movq (%rax), %r13
cmpl %r14d, 0x18(%r13)
jne 0x86a1
movq 0x10(%r13), %rdi
movq %rbx, %rsi
callq 0x2160
testl %eax, %eax
je 0x877c
incq %r15
movq 0xdbad(%rip), %rdi      # 0x16258
cmpq %r15, 0x30(%rdi)
ja 0x8678
leal -0x1(%r14), %eax
testl %r14d, %r14d
movl %eax, %r14d
jg 0x866e
cmpq $0x0, 0x50(%rdi)
je 0x86fa
xorl %r14d, %r14d
addq $0x40, %rdi
movq %r14, %rsi
callq 0xdcf3
movq (%rax), %r13
movq 0x10(%r13), %rdi
movq %rbx, %rsi
callq 0x2160
testl %eax, %eax
je 0x877c
incq %r14
movq 0xdb64(%rip), %rdi      # 0x16258
cmpq %r14, 0x50(%rdi)
ja 0x86c7
movq -0x30(%rbp), %rax
cmpq $0x0, 0x2c8(%rax)
je 0x8779
addq $0x2b8, %rax            # imm = 0x2B8
movq %rax, -0x38(%rbp)
xorl %esi, %esi
movq -0x38(%rbp), %rdi
movq %rsi, -0x40(%rbp)
callq 0xdcf3
cmpq $0x0, 0x2100(%rax)
je 0x8765
movq %rax, %r15
movq %rax, %r14
addq $0x20f0, %r14           # imm = 0x20F0
xorl %r12d, %r12d
movq %r14, %rdi
movq %r12, %rsi
callq 0xdcf3
movq (%rax), %r13
movq 0x10(%r13), %rdi
movq %rbx, %rsi
callq 0x2160
testl %eax, %eax
je 0x877c
incq %r12
cmpq %r12, 0x2100(%r15)
ja 0x873b
movq -0x40(%rbp), %rsi
incq %rsi
movq -0x30(%rbp), %rax
cmpq %rsi, 0x2c8(%rax)
ja 0x8714
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x87ce
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 0xd800(%rip), %r15      # 0x15ff0
movq (%r15), %rdi
movq 0xd95e(%rip), %rdx      # 0x16158
movl 0xd950(%rip), %ecx      # 0x16150
leaq 0x7a8f(%rip), %rsi      # 0x10296
xorl %eax, %eax
callq 0x2180
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
movl $0x1, %edi
callq 0x2240
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x60, %edi
callq 0x21c0
testq %rax, %rax
je 0x8894
movb $0x0, (%rax)
movq $0x0, 0x30(%rax)
movq 0xd8ef(%rip), %rcx      # 0x16158
movq %rcx, 0x10(%rax)
movl 0xd8dd(%rip), %ecx      # 0x16150
movl %ecx, 0x8(%rax)
movl 0xd9d4(%rip), %ecx      # 0x16250
movl %ecx, 0x18(%rax)
movq 0xd9d2(%rip), %rcx      # 0x16258
movq %rcx, 0x20(%rax)
movl %ebx, 0x28(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x93fc(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0x388c
// File: /workspace/github_c_makefile_star2_O3/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
cmpq $0x0, 0x208(%rdi)
je 0x88f4
xorl %r14d, %r14d
movq %r15, %rdi
movq %r14, %rsi
callq 0xdcf3
movsd (%rax), %xmm0
ucomisd -0x20(%rbp), %xmm0
jne 0x88e8
jnp 0x890a
incq %r14
cmpq %r14, 0x208(%rbx)
ja 0x88d0
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
callq 0xdd50
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_O3/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
cmpq $0x0, 0x228(%rdi)
je 0x8968
xorl %r12d, %r12d
movq %r14, %rdi
movq %r12, %rsi
callq 0xdcf3
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x2160
testl %eax, %eax
je 0x89a9
incq %r12
cmpq %r12, 0x228(%rbx)
ja 0x8941
movq %r15, %rdi
callq 0x20b0
movl %eax, -0x30(%rbp)
leal 0x1(%rax), %edi
callq 0x21c0
testq %rax, %rax
je 0x89b9
leaq -0x30(%rbp), %r12
movq %rax, 0x8(%r12)
movq %rax, %rdi
movq %r15, %rsi
callq 0x2050
movq %r14, %rdi
movq %r12, %rsi
callq 0xdd50
movl 0x228(%rbx), %r12d
decl %r12d
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x92d7(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0x388c
// File: /workspace/github_c_makefile_star2_O3/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 0x8cfc
movq %rax, %r15
testq %rax, %rax
jne 0x8cd1
leaq 0x69f4(%rip), %r12      # 0xf648
xorl %r15d, %r15d
movq %r12, %r13
movslq (%r13), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x2160
testl %eax, %eax
je 0x8ce3
incq %r15
addq $0x4, %r13
cmpq $0x9, %r15
jne 0x8c5a
movq %r14, %rdi
movl $0xa, %esi
callq 0x8156
movq %rax, %r15
movq %rbx, %rdi
callq 0x2817
movq %rax, 0x30(%r15)
leaq 0x60(%r15), %rdi
movl $0x20, %esi
callq 0xda7c
movb $0x0, 0x24(%r15)
addq $0x2b8, %r14            # imm = 0x2B8
movslq 0xd591(%rip), %rsi      # 0x16248
movq %r14, %rdi
callq 0xdcf3
leaq 0xb0(%rax), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xe013
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 0x8156
// File: /workspace/github_c_makefile_star2_O3/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
cmpq $0x0, 0x2c8(%rdi)
je 0x8d53
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2b8(%rdi), %r12
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %r12, %rdi
movq %r13, %rsi
callq 0xdcf3
leaq 0xb0(%rax), %rdi
movq %r14, %rsi
callq 0xe108
testq %rax, %rax
jne 0x8d57
incq %r13
cmpq %r13, 0x2c8(%r15)
ja 0x8d26
jmp 0x8d5a
xorl %ebx, %ebx
jmp 0x8d5a
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_O3/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 0x8cfc
testq %rax, %rax
je 0x9744
movq %rax, -0x30(%rbp)
leaq (%rbx,%r13), %rdi
addq $0x2, %rdi
callq 0x21c0
testq %rax, %rax
je 0x9759
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 0x846c
movq %rax, %r14
movq %rbx, %rdi
callq 0x2030
testq %r14, %r14
je 0x973f
cmpq $0x0, 0x50(%r14)
je 0x9744
movq %r14, %rdi
addq $0x40, %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0xdcf3
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x8250
testb %al, %al
je 0x9747
movq %r14, %r15
jmp 0x9747
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8537(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0x388c
// File: /workspace/github_c_makefile_star2_O3/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 0x97a7
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 0xc82b(%rip), %r15      # 0x15ff0
movq (%r15), %rax
movq 0x10(%rdi), %rdx
movl 0x8(%rdi), %ecx
leaq 0x6ac0(%rip), %rsi      # 0x10296
movq %rax, %rdi
xorl %eax, %eax
callq 0x2180
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
movl $0x1, %edi
callq 0x2240
// File: /workspace/github_c_makefile_star2_O3/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 0x981b
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, 0x70(%rdi)
je 0x9872
movq %rsi, %r14
leaq 0x60(%r15), %r12
xorl %r13d, %r13d
movq %r12, %rdi
movq %r13, %rsi
callq 0xdcf3
movq %rax, %rbx
movq (%rax), %rdi
movq %r14, %rsi
callq 0x2160
testl %eax, %eax
je 0x986f
incq %r13
cmpq %r13, 0x70(%r15)
ja 0x9842
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x9872
movl 0x8(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x98bc
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 0xc96b(%rip), %rax      # 0x1624d
cmpb $0x0, (%r14,%rax)
je 0x98f5
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0xc6f4(%rip), %rbx      # 0x15ff0
movq (%rbx), %rax
leaq 0x5d2a(%rip), %rcx      # 0xf630
movslq (%rcx,%r14,4), %rdx
addq %rcx, %rdx
movq 0x10(%rdi), %rcx
movl 0x8(%rdi), %r8d
leaq 0x66c6(%rip), %rsi      # 0xffe2
movq %rax, %rdi
xorl %eax, %eax
callq 0x2180
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 0x5ce8(%rip), %rax      # 0xf63c
movslq (%rax,%r14,4), %rsi
addq %rax, %rsi
callq 0x2210
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x2120
jmp 0x98e9
// File: /workspace/github_c_makefile_star2_O3/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 0x9b7d
cmpl $0x6, %eax
jne 0x9bde
addq $0x28, %rbx
movq %rbx, %r14
jmp 0x9bce
movq 0x30(%rbx), %rdi
callq 0x2030
leaq 0x60(%rbx), %r14
cmpq $0x0, 0x70(%rbx)
je 0x9bc2
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0xdcf3
movq %rax, %r12
movq (%rax), %rdi
callq 0x2030
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x9bb9
callq 0x998e
incq %r15
cmpq %r15, 0x70(%rbx)
ja 0x9b94
addq $0x40, %rbx
movq %rbx, %rdi
callq 0xdfb9
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xdfb9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9e1c
movq %rdi, %rbx
cmpb $0x0, 0x18(%rdi)
je 0x9e27
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x18(%rbx)
movl 0xc(%rbx), %eax
cmpl $0x6, %eax
je 0x9e82
cmpl $0x8, %eax
je 0x9e69
cmpl $0x7, %eax
jne 0x9e1c
cmpq $0x0, 0x30(%rbx)
je 0x9e1c
leaq 0x20(%rbx), %r14
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0xdcf3
movq (%rax), %rdi
callq 0x9e04
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0x9e4b
jmp 0x9e1c
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x9e1c
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
cmpq $0x0, 0x30(%rbx)
je 0x9e1c
leaq 0x20(%rbx), %r14
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0xdcf3
movq (%rax), %rdi
callq 0x9e04
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0x9e90
jmp 0x9e1c
// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movl 0xa830(%rip), %r15d     # 0x16360
movl %r15d, %edi
callq 0xc3b6
movl %ebx, -0x2c(%rbp)
cmpl %ebx, %eax
jge 0xbb44
movq %r14, %r12
jmp 0xbbbe
movl %eax, %r13d
movq %r12, -0x38(%rbp)
xorl %edi, %edi
callq 0x9eb1
movl %eax, 0xa808(%rip)      # 0x16360
movq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0xaa7a
movq %rax, %rbx
movl 0xa7f3(%rip), %edi      # 0x16360
callq 0xc3b6
cmpl %r13d, %eax
jle 0xbb8b
incl %r13d
movq %r12, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0xbb10
movq %rax, %rbx
movl $0xe, %edi
callq 0x8840
movq %rax, %r12
movq %r14, 0x38(%rax)
movq %rbx, 0x40(%rax)
movl %r15d, 0x48(%rax)
movl 0xa7b5(%rip), %r15d     # 0x16360
movl %r15d, %edi
callq 0xc3b6
movl %eax, %r13d
movq %r12, %r14
cmpl -0x2c(%rbp), %eax
jge 0xbb4b
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_O3/goodpaul6[P]generic/script.c
// Function: declare_function
static func_decl_t* declare_function(script_t* script, const char* name)
{
	script_module_t* module = vec_get(&script->modules, g_cur_module_index);
	func_decl_t* decl = emalloc(sizeof(func_decl_t));
	
	decl->parent = g_cur_func;
	decl->type = DECL_FUNCTION;
	decl->tag = create_type_tag(script, TAG_FUNC);
	decl->name = estrdup(name);
	
	vec_init(&decl->locals, sizeof(var_decl_t*));
	vec_init(&decl->args, sizeof(var_decl_t*));

	decl->index = script->function_names.length;
	
	char* dup_name = estrdup(name);
	vec_push_back(&script->function_names, &dup_name);
	
	int undef_pc = -1;
	vec_push_back(&script->function_pcs, &undef_pc);
	
	decl->has_return = 0;

	vec_push_back(&module->functions, &decl);
	return decl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r13
movq %rdi, %rbx
addq $0x2b8, %rdi            # imm = 0x2B8
movslq 0xa2c2(%rip), %rsi      # 0x16248
callq 0xdcf3
movq %rax, %r14
movl $0x68, %edi
callq 0x21c0
testq %rax, %rax
je 0xc06e
movq %rax, %r12
leaq -0x30(%rbp), %rax
movq %r12, (%rax)
movq 0xa2a6(%rip), %rax      # 0x16258
movq %rax, (%r12)
movl $0x0, 0x8(%r12)
movq %rbx, %rdi
movl $0x6, %esi
callq 0x8156
movq %rax, 0x10(%r12)
movq %r13, %rdi
callq 0x2817
movq %rax, 0x18(%r12)
leaq 0x20(%r12), %rdi
movl $0x8, %esi
callq 0xda7c
movq %r12, %rdi
addq $0x40, %rdi
movl $0x8, %esi
callq 0xda7c
leaq 0x278(%rbx), %r15
movl 0x288(%rbx), %eax
movl %eax, 0x60(%r12)
movq %r13, %rdi
callq 0x2817
leaq -0x40(%rbp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0xdd50
leaq -0x34(%rbp), %rsi
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
addq $0x298, %rbx            # imm = 0x298
movq %rbx, %rdi
callq 0xdd50
movb $0x0, 0x64(%r12)
addq $0x20d0, %r14           # imm = 0x20D0
movq %r14, %rdi
leaq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0xdd50
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5c22(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0x388c
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: declare_argument
static var_decl_t* declare_argument(const char* name, type_tag_t* tag)
{
	if(!g_cur_func) error_exit("Attempting to declare argument outside of function\n");
	
	var_decl_t* decl = emalloc(sizeof(var_decl_t));
	
	vec_push_back(&g_cur_func->tag->func.arg_types, &tag);
	
	decl->parent = g_cur_func;
	decl->tag = tag;
	decl->name = estrdup(name);
	decl->scope = g_scope;
	decl->index = INVALID_VAR_DECL_INDEX;
	
	vec_push_back(&g_cur_func->args, &decl);
	return decl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, -0x28(%rbp)
movq 0xa1c2(%rip), %r12      # 0x16258
testq %r12, %r12
je 0xc120
movq %rdi, %rbx
movl $0x20, %edi
callq 0x21c0
testq %rax, %rax
je 0xc129
movq %rax, %r14
leaq -0x30(%rbp), %r15
movq %rax, (%r15)
movq 0x10(%r12), %rdi
addq $0x28, %rdi
leaq -0x28(%rbp), %r12
movq %r12, %rsi
callq 0xdd50
movq 0xa181(%rip), %rax      # 0x16258
movq %rax, (%r14)
movq (%r12), %rax
movq %rax, 0x8(%r14)
movq %rbx, %rdi
callq 0x2817
movq %rax, 0x10(%r14)
movl 0xa15c(%rip), %eax      # 0x16250
movl %eax, 0x18(%r14)
movl $0xffffd8f1, 0x1c(%r14) # imm = 0xFFFFD8F1
movq 0xa151(%rip), %rdi      # 0x16258
addq $0x40, %rdi
movq %r15, %rsi
callq 0xdd50
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50dc(%rip), %rdi      # 0x11203
jmp 0xc130
leaq 0x5b67(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0x388c
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: finalize_args
static void finalize_args()
{
	if (!g_cur_func) error_exit("Attempting to finalize arguments outside of function\n");

	for (int i = 0; i < g_cur_func->args.length; ++i)
	{
		var_decl_t* arg = vec_get_value(&g_cur_func->args, i, var_decl_t*);
		arg->index = -(int)g_cur_func->args.length + i;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xa114(%rip), %rdi      # 0x16258
testq %rdi, %rdi
je 0xc182
cmpq $0x0, 0x50(%rdi)
je 0xc17b
xorl %ebx, %ebx
addq $0x40, %rdi
movq %rbx, %rsi
callq 0xdcf3
movq (%rax), %rax
movq 0xa0f0(%rip), %rdi      # 0x16258
movq 0x50(%rdi), %rcx
movl %ebx, %edx
subl %ecx, %edx
movl %edx, 0x1c(%rax)
incq %rbx
cmpq %rbx, %rcx
ja 0xc152
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x50ae(%rip), %rdi      # 0x11237
xorl %eax, %eax
callq 0x388c
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: finalize_type
static void finalize_type(const char* key, void* v_tag, void* data)
{
	type_tag_t* tag = v_tag;
	if(tag->defined && !tag->finalized)
	{
		if(tag->type != TAG_STRUCT) error_exit_c(tag->ctx, "Attempted to use non-struct type in struct '%s'\n", tag->ds.name);
		
		for(int using_index = 0; using_index < tag->ds.using.length; ++using_index)
		{
			type_tag_t* using = vec_get_value(&tag->ds.using, using_index, type_tag_t*);
			
			for(int mem_id = 0; mem_id < using->ds.members.length; ++mem_id)
			{
				type_tag_member_t* mem = vec_get(&using->ds.members, mem_id);
				
				type_tag_member_t mem_copy;
				mem_copy.name = estrdup(mem->name);
				mem_copy.index = mem->index + tag->ds.size;
				mem_copy.type = mem->type;
			
				if(mem->default_value)
				{
					// NOTE: Making a shallow copy of the default_value expression
					mem_copy.default_value = emalloc(sizeof(expr_t));
					memcpy(mem_copy.default_value, mem->default_value, sizeof(expr_t));
					mem_copy.default_value->is_shallow_copy = 1;
				}
				else
					mem_copy.default_value = NULL;
				
				vec_push_back(&tag->ds.members, &mem_copy);
			}
			
			tag->ds.size += using->ds.size;
		}
		
		tag->finalized = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpb $0x0, 0x24(%rsi)
je 0xcb71
movq %rsi, %r15
cmpb $0x0, 0x25(%rsi)
jne 0xcb71
cmpl $0xa, 0x20(%r15)
jne 0xcb8e
cmpq $0x0, 0x50(%r15)
je 0xcb6c
leaq 0x40(%r15), %rcx
movq %rcx, -0x30(%rbp)
leaq 0x60(%r15), %rcx
movq %rcx, -0x40(%rbp)
xorl %esi, %esi
movq -0x30(%rbp), %rdi
movq %rsi, -0x38(%rbp)
callq 0xdcf3
movq (%rax), %rbx
cmpq $0x0, 0x70(%rbx)
je 0xcb53
leaq 0x60(%rbx), %r14
xorl %r12d, %r12d
movq %r14, %rdi
movq %r12, %rsi
callq 0xdcf3
movq %rax, %r13
movq (%rax), %rdi
callq 0x2817
movq %rax, -0x60(%rbp)
movl 0x8(%r13), %eax
addl 0x38(%r15), %eax
movl %eax, -0x58(%rbp)
movq 0x10(%r13), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, 0x18(%r13)
je 0xcb35
movl $0x60, %edi
callq 0x21c0
testq %rax, %rax
je 0xcb80
movq %rax, -0x48(%rbp)
movq 0x18(%r13), %rsi
movl $0xc, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movb $0x1, (%rax)
jmp 0xcb3d
movq $0x0, -0x48(%rbp)
movq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xdd50
incq %r12
cmpq %r12, 0x70(%rbx)
ja 0xcada
movq 0x38(%rbx), %rax
addq %rax, 0x38(%r15)
movq -0x38(%rbp), %rsi
incq %rsi
cmpq %rsi, 0x50(%r15)
ja 0xcab8
movb $0x1, 0x25(%r15)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5110(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0x388c
movq 0x30(%r15), %rsi
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
xorl %eax, %eax
callq 0xcbab
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: error_exit_c
static void error_exit_c(context_t ctx, const char* fmt, ...)
{
	fprintf(stderr, "\nError (%s:%i):\n", ctx.file, 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 %r14
pushq %rbx
subq $0xd0, %rsp
testb %al, %al
je 0xcbe6
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), %rbx
movq %rsi, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq %rcx, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, 0x28(%rbx)
movq 0x93e8(%rip), %r14      # 0x15ff0
movq (%r14), %rdi
movq 0x18(%rbp), %rdx
movl 0x10(%rbp), %ecx
leaq 0x367d(%rip), %rsi      # 0x10296
xorl %eax, %eax
callq 0x2180
leaq -0x30(%rbp), %rdx
movq %rbx, 0x10(%rdx)
leaq 0x30(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq (%r14), %rdi
leaq 0x48ab(%rip), %rsi      # 0x114f2
callq 0x2210
movl $0x1, %edi
callq 0x2240
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: compile_file_line_info
static void compile_file_line_info(script_t* script, expr_t* exp, char ignore_last)
{
	if (exp->ctx.file)
	{
		if (ignore_last || !g_last_compiled_file || strcmp(g_last_compiled_file, exp->ctx.file) != 0)
		{
			append_code(script, OP_FILE);
			append_int(script, register_string(script, exp->ctx.file));
		}
		g_last_compiled_file = exp->ctx.file;
	}

	if(ignore_last || g_last_compiled_line != exp->ctx.line)
	{
		append_code(script, OP_LINE);
		append_int(script, exp->ctx.line);
	}
	g_last_compiled_line = exp->ctx.line;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %r12
testq %r12, %r12
je 0xccfe
testb %r15b, %r15b
sete %al
movq 0x97e6(%rip), %rdi      # 0x16470
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xcca3
movq %r12, %rsi
callq 0x2160
testl %eax, %eax
je 0xccf7
movl %r15d, -0x30(%rbp)
leaq -0x2b(%rbp), %rsi
movb $0x2c, (%rsi)
leaq 0x1d8(%r14), %r12
movq %r12, %rdi
callq 0xdd50
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x8918
movl %eax, -0x34(%rbp)
xorl %r15d, %r15d
leaq -0x29(%rbp), %r13
movb -0x34(%rbp,%r15), %al
incq %r15
movb %al, -0x29(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xdd50
cmpq $0x4, %r15
jne 0xccd3
movq 0x10(%rbx), %r12
movl -0x30(%rbp), %r15d
movq %r12, 0x9772(%rip)      # 0x16470
testb %r15b, %r15b
jne 0xcd0e
movl 0x976f(%rip), %eax      # 0x16478
cmpl 0x8(%rbx), %eax
je 0xcd50
leaq -0x2c(%rbp), %rsi
movb $0x2d, (%rsi)
addq $0x1d8, %r14            # imm = 0x1D8
movq %r14, %rdi
callq 0xdd50
movl 0x8(%rbx), %eax
movl %eax, -0x38(%rbp)
xorl %r12d, %r12d
leaq -0x2a(%rbp), %r15
movb -0x38(%rbp,%r12), %al
incq %r12
movb %al, -0x2a(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xdd50
cmpq $0x4, %r12
jne 0xcd31
movl 0x8(%rbx), %eax
movl %eax, 0x9722(%rip)      # 0x16478
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: compile_call
static void compile_call(script_t* script, expr_t* exp)
{
	int nargs = exp->callx.args.length;

	if (exp->callx.func->type == EXP_COLON)
	{
		compile_value_expr(script, exp->callx.func->dotx.value);
		nargs += 1;
	}

	for(int i = 0; i < exp->callx.args.length; ++i)
	{
		expr_t* e = vec_get_value(&exp->callx.args, i, expr_t*);
		compile_value_expr(script, e);
	}

	compile_value_expr(script, exp->callx.func);
	
	append_code(script, OP_CALL);
	append_code(script, nargs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq 0x50(%rsi), %r15
cmpl $0x3, 0x28(%rax)
jne 0xd5f4
movq 0x38(%rax), %rsi
movq %rbx, %rdi
callq 0xcd65
leal 0x1(%r15), %r13d
movq 0x50(%r14), %r15
jmp 0xd5f7
movl %r15d, %r13d
testq %r15, %r15
je 0xd622
leaq 0x40(%r14), %r15
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xdcf3
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xcd65
incq %r12
cmpq %r12, 0x50(%r14)
ja 0xd603
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0xcd65
leaq -0x29(%rbp), %rsi
movb $0x29, (%rsi)
addq $0x1d8, %rbx            # imm = 0x1D8
movq %rbx, %rdi
callq 0xdd50
leaq -0x2a(%rbp), %rsi
movb %r13b, (%rsi)
movq %rbx, %rdi
callq 0xdd50
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: read_int_at
static int read_int_at(script_t* script, int pc)
{
	int value = 0;
	word* vp = (word*)(&value);
	
	for(int i = 0; i < sizeof(int) / sizeof(word); ++i)
		*vp++ = vec_get_value(&script->code, pc + i, word);
		
	return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, -0x1c(%rbp)
addq $0x1d8, %rbx            # imm = 0x1D8
movslq %esi, %r14
xorl %r15d, %r15d
leaq (%r14,%r15), %rsi
movq %rbx, %rdi
callq 0xdcf3
movb (%rax), %al
movb %al, -0x1c(%rbp,%r15)
incq %r15
cmpq $0x4, %r15
jne 0xd683
movl -0x1c(%rbp), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: get_executing_module
static script_module_t* get_executing_module(script_t* script)
{
	for (int i = 0; i < script->modules.length; ++i)
	{
		script_module_t* m = vec_get(&script->modules, i);
		if (m->start_pc <= script->pc && m->end_pc >= script->pc)
			return m;
	}

	return NULL;
}

// Assembly:
cmpq $0x0, 0x2c8(%rdi)
je 0xd705
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2b8(%rdi), %r14
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0xdcf3
movslq 0x11c(%rbx), %rcx
cmpq %rcx, 0x20(%rax)
ja 0xd6ec
cmpq %rcx, 0x28(%rax)
jae 0xd6fa
incq %r15
cmpq %r15, 0x2c8(%rbx)
ja 0xd6ce
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: read_int
static int read_int(script_t* script)
{
	int value = 0;
	word* vp = (word*)(&value);
	
	for(int i = 0; i < sizeof(int) / sizeof(word); ++i)
		*vp++ = vec_get_value(&script->code, script->pc++, word);
	
	return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, -0x1c(%rbp)
leaq 0x1d8(%rdi), %r14
xorl %r15d, %r15d
movslq 0x11c(%rbx), %rsi
leal 0x1(%rsi), %eax
movl %eax, 0x11c(%rbx)
movq %r14, %rdi
callq 0xdcf3
movb (%rax), %al
movb %al, -0x1c(%rbp,%r15)
incq %r15
cmpq $0x4, %r15
jne 0xd726
movl -0x1c(%rbp), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: push_func
static void push_func(script_t* script, char is_extern, int index)
{
	script_value_t* val = new_value(script, VAL_FUNC);
	val->function.is_extern = is_extern;
	val->function.index = index;
	push_value(script, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movl $0x5, %esi
callq 0x3322
movb %r14b, 0x20(%rax)
movl %ebx, 0x24(%rax)
movq %r15, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31a4