LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/ralloc.c
// Function: vertex_init
struct vertex *vertex_init()
{
	struct vertex *v = malloc(sizeof(struct vertex));

	v->siblings = NULL, v->num_siblings = 0;
	v->color = -1, v->ocolor = -1;
	v->removed = 0;

	return v;
}

// Assembly:
pushq %rax
pushq $0x20
popq %rdi
callq 0x20f0
andq $0x0, 0x10(%rax)
andl $0x0, 0x18(%rax)
orq $-0x1, (%rax)
andl $0x0, 0x8(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/ralloc.c
// Function: vertex_add_edge
void vertex_add_edge(struct vertex *v, struct vertex *v2)
{
	v->num_siblings++;
	if (!v->siblings) v->siblings = malloc(sizeof(struct vertex));
	else v->siblings = realloc(v->siblings, sizeof(struct vertex) * v->num_siblings);
	v->siblings[v->num_siblings-1] = v2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x18(%rdi), %r15
leaq 0x1(%r15), %rsi
movl %esi, 0x18(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x3cd2
shlq $0x5, %rsi
callq 0x2100
movl 0x18(%r14), %r15d
decl %r15d
jmp 0x3cda
pushq $0x20
popq %rdi
callq 0x20f0
movq %rax, 0x10(%r14)
movslq %r15d, %rcx
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/ralloc.c
// Function: degree
int degree(struct vertex *v)
{
	int deg = 0;
	for (int i = 0; i < v->num_siblings; i++)
		deg += !v->siblings[i]->removed;
	return deg;
}

// Assembly:
movl 0x18(%rdi), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x3d2c
movq 0x10(%rdi), %rsi
movq (%rsi,%rdx,8), %rsi
cmpl $0x1, 0x8(%rsi)
adcl $0x0, %eax
incq %rdx
jmp 0x3d13
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/ralloc.c
// Function: push
void push(struct vstk *stk, struct vertex *v)
{
	stk->num_vertices++;
	if (!stk->vertices) stk->vertices = malloc(sizeof(struct vertex*));
	else stk->vertices = realloc(stk->vertices, sizeof(struct vertex*)*stk->num_vertices);
	stk->vertices[stk->num_vertices-1] = v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x8(%rdi), %r15
leaq 0x1(%r15), %rsi
movl %esi, 0x8(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3d5d
shlq $0x3, %rsi
callq 0x2100
movl 0x8(%r14), %r15d
decl %r15d
jmp 0x3d65
pushq $0x8
popq %rdi
callq 0x20f0
movq %rax, (%r14)
movslq %r15d, %rcx
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/ralloc.c
// Function: pop
struct vertex *pop(struct vstk *stk)
{
	if (!stk->num_vertices) return NULL;
	struct vertex *v = stk->vertices[stk->num_vertices-1];
	stk->num_vertices--;
	if (!stk->num_vertices) {
		free(stk->vertices);
		stk->vertices = NULL;
	} else {
		stk->vertices = realloc(stk->vertices, stk->num_vertices*sizeof(struct vertex*));
	}
	return v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3da3
movq %rdi, %r14
movq (%rdi), %rdi
movq -0x8(%rdi,%rax,8), %rbx
decl %eax
movl %eax, 0x8(%r14)
je 0x3da7
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x2100
jmp 0x3dae
xorl %ebx, %ebx
jmp 0x3db1
callq 0x2030
xorl %eax, %eax
movq %rax, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/ralloc.c
// Function: fill_stack
void fill_stack(struct vertex **graph, int num, struct vstk *stk, int k)
{
	if (!k) return;
	for (int i = 0; i < num; i++) {
		if (graph[i]->removed) continue;
		if (degree(graph[i]) < k) {
			graph[i]->removed = 1;
			push(stk, graph[i]);
			fill_stack(graph, num, stk, k);
			break;
		}
	}
}

// Assembly:
testl %ecx, %ecx
je 0x3e24
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r12
xorl %ebp, %ebp
testl %esi, %esi
cmovlel %ebp, %r15d
cmpq %r15, %rbp
je 0x3e16
movq (%r12,%rbp,8), %r13
cmpl $0x0, 0x8(%r13)
jne 0x3e11
movq %r13, %rdi
callq 0x3d07
cmpl %ebx, %eax
jge 0x3e11
movl $0x1, 0x8(%r13)
movq %r14, %rdi
movq %r13, %rsi
callq 0x3d2d
xorl %ebp, %ebp
jmp 0x3dde
incq %rbp
jmp 0x3dde
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/ralloc.c
// Function: color_graph
void color_graph(struct vertex **graph, int num, int k)
{
	struct vstk stk;
	stk.vertices = NULL;
	stk.num_vertices = 0;
	/*Fill the vertex stack with vertex's in kempe order*/
	fill_stack(graph, num, &stk, k);
	/*Array that holds which colors the siblings of a node uses*/
	int *used_colors = calloc(sizeof(int), k);

	struct vertex *v;
	while ((v=pop(&stk))) {
		/*skip precolored nodes*/
		if (v->color > 0) continue;
		int clr = k;
		for (int i = 0; i < k; i++) used_colors[i] = 0;
		for (int i = 0; i < v->num_siblings; i++) {
			if (v->siblings[i]->color >= 0 && v->siblings[i]->color < k)
				used_colors[v->siblings[i]->color] = 1;
		}
		for (int i = 0; i < k; i++) {
			if (!used_colors[i]) {
				clr = i;
				break;
			}
		}
		if (clr >= k) {/*spill*/
			//v->color = k;
		} else {
			printf("Assigned R%d -> %d\n", v->ocolor, clr);
			v->color = clr;
		}
	}
	/*If k < the degree of all nodes, some nodes may not even be in the stack*/
	for (int i = 0; i < num; i++) {
		if (graph[i]->color < 0) {
			printf("Spilled %d\n", graph[i]->ocolor);
		}
	}

	free(stk.vertices);
	free(used_colors);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movl %esi, %ebx
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
andl $0x0, 0x8(%rdx)
movq %rdi, (%rsp)
movl %ebp, %ecx
callq 0x3dbc
movslq %ebp, %r12
pushq $0x4
popq %rdi
movq %r12, %rsi
callq 0x20a0
movq %rax, %r15
testl %r12d, %r12d
movl $0x0, %r14d
cmovgl %ebp, %r14d
leaq 0x8(%rsp), %rdi
callq 0x3d75
testq %rax, %rax
je 0x3f0a
movq %rax, %r13
cmpl $0x0, 0x4(%rax)
jg 0x3e6d
xorl %eax, %eax
cmpq %rax, %r14
je 0x3e9a
andl $0x0, (%r15,%rax,4)
incq %rax
jmp 0x3e8b
movl 0x18(%r13), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x3ed8
movq 0x10(%r13), %rdx
movq (%rdx,%rcx,8), %rdx
movl 0x4(%rdx), %edx
testl %edx, %edx
sets %sil
cmpl %ebp, %edx
setge %dil
orb %sil, %dil
jne 0x3ed3
movl $0x1, (%r15,%rdx,4)
incq %rcx
jmp 0x3eaa
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x3e6d
cmpl $0x0, (%r15,%r12,4)
je 0x3eec
incq %r12
jmp 0x3edb
movl (%r13), %esi
leaq 0x4435(%rip), %rdi      # 0x832c
movl %r12d, %edx
xorl %eax, %eax
callq 0x2080
movl %r12d, 0x4(%r13)
jmp 0x3e6d
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
leaq 0x4428(%rip), %r12      # 0x8340
xorl %r14d, %r14d
movq (%rsp), %r13
cmpq %r14, %rbx
je 0x3f40
movq (%r13,%r14,8), %rax
cmpl $0x0, 0x4(%rax)
jns 0x3f3b
movl (%rax), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x2080
incq %r14
jmp 0x3f1f
movq 0x8(%rsp), %rdi
callq 0x2030
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: block_emit
void block_emit(struct generator *context, struct block *b)
{
	struct node *p = context->parent;
	context->scope = b->scope;
	for (int i = 0; i < b->num_stmt; i++) {
		generate_from_node(b->stmt_list[i], context, IGNORE);
		/*Merge it into the block*/
		TLIST(p)=merge(TLIST(p), TLIST(b->stmt_list[i]));
		FLIST(p)=merge(FLIST(p), FLIST(b->stmt_list[i]));
	}
	context->scope = b->scope->parent;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %r15
movq 0x10(%rsi), %rax
movq %rax, 0x8(%rdi)
xorl %r12d, %r12d
pushq $0x3
popq %rbp
movslq 0x8(%r14), %rax
cmpq %rax, %r12
jge 0x4259
movq (%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x3f9f
movq 0x10(%r15), %rax
movq 0x8(%rax), %rdi
movq (%r14), %rax
movq (%rax,%r12,8), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4bf5
movq 0x10(%r15), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rdi
movq (%r14), %rax
movq (%rax,%r12,8), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
callq 0x4bf5
movq 0x10(%r15), %rcx
movq %rax, 0x10(%rcx)
incq %r12
jmp 0x41f6
movq 0x10(%r14), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: cond_emit
void cond_emit(struct generator *context, struct cond *c)
{
	/*Emit comparison, if false jump to block end, at end of block jump after else block*/
	int start = REQ_LABEL(context), otherwise = REQ_LABEL(context), end = REQ_LABEL(context);
	generate_from_node(c->condition, context, IGNORE);
	/*True is patched to the start of the block, false is patched to where the else block would be*/
	backpatch(TLIST_REF(c->condition), start);
	backpatch(FLIST_REF(c->condition), otherwise);

	emit_label(context, start);
	generate_from_node(c->body, context, IGNORE);
	/*If there is a else block, then emit an unconditional jump to the end of that*/
	if (c->otherwise)
		emit_jump(context, end, UNCONDITIONAL);
	emit_label(context, otherwise);
	/*If else statement exists, then traverse that too*/
	generate_from_node(c->otherwise, context, IGNORE);
	emit_label(context, end);
	/*The body's patched to the parents*/
	if (c->body) {
		TLIST(context->parent) = merge(TLIST(context->parent), TLIST(c->body));
		FLIST(context->parent) = merge(FLIST(context->parent), FLIST(c->body));
	}
	if (c->otherwise) {
		TLIST(context->parent) = merge(TLIST(context->parent), TLIST(c->otherwise));
		FLIST(context->parent) = merge(FLIST(context->parent), FLIST(c->otherwise));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %r12d
leal 0x1(%r12), %r15d
leal 0x2(%r12), %ebp
leal 0x3(%r12), %eax
movl %eax, 0x4(%rdi)
movq (%rsi), %rdi
pushq $0x3
popq %r13
movq %rbx, %rsi
movl %r13d, %edx
callq 0x3f9f
movq (%r14), %rax
movq 0x10(%rax), %rdi
addq $0x8, %rdi
movl %r12d, %esi
callq 0x4b09
movq (%r14), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movl %r15d, %esi
callq 0x4b09
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4ada
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x3f9f
cmpq $0x0, 0x10(%r14)
je 0x42fb
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4bb4
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4ada
movq 0x10(%r14), %rdi
pushq $0x3
popq %rdx
movq %rbx, %rsi
callq 0x3f9f
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4ada
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x436e
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rdi
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4bf5
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rdi
movq 0x8(%r14), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
callq 0x4bf5
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, 0x10(%rcx)
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x43bd
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rdi
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4bf5
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rdi
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
callq 0x4bf5
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, 0x10(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: decl_emit
void decl_emit(struct generator *context, struct declaration *decl)
{
	struct ir_stmt *stmt = ir_stmt_init();
	stmt->type = stmt_alloc;
	alloc_type(context->scope, decl->ident);
	struct symbol *s = get_symbol(context->scope, decl->ident);
	stmt->arg1 = from_sym(s);
	if (decl->initializer) {
		emit(context, stmt);
		stmt = ir_stmt_init();
		stmt->type = stmt_store;
		stmt->arg2 = generate_from_node(decl->initializer, context, VALUE);
		stmt->arg1 = from_sym(s);
	}
	emit(context, stmt);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x4d88
movq %rax, %r14
movl $0x5, (%rax)
movq 0x8(%rbx), %rdi
movq (%r15), %rsi
callq 0x737a
movq 0x8(%rbx), %rdi
movq (%r15), %rsi
callq 0x723e
movq %rax, %r12
movq %rax, %rdi
callq 0x4c96
movq %rax, 0x10(%r14)
cmpq $0x0, 0x10(%r15)
je 0x444e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4b43
callq 0x4d88
movq %rax, %r14
movl $0x12, (%rax)
movq 0x10(%r15), %rdi
pushq $0x2
popq %rdx
movq %rbx, %rsi
callq 0x3f9f
movq %rax, 0x18(%r14)
movq %r12, %rdi
callq 0x4c96
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4b43
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: loop_emit
void loop_emit(struct generator *context, struct loop *l)
{
	int cmp = REQ_LABEL(context), start = REQ_LABEL(context), end = REQ_LABEL(context);
	generate_from_node(l->init, context, IGNORE);
	/*Unconditional jump to compare block*/
	emit_jump(context, cmp, UNCONDITIONAL);
	emit_label(context, start);
	generate_from_node(l->body, context, IGNORE);
	generate_from_node(l->iter, context, IGNORE);
	emit_label(context, cmp);
	generate_from_node(l->condition, context, IGNORE);
	emit_label(context, end);
	/*True is backpatched to the loop start, false is patched to after the loop ends*/
	backpatch(TLIST_REF(l->condition), start);
	backpatch(FLIST_REF(l->condition), end);
	/*The bodys truelist/falselist are continue/break, so patch to start/end respectively*/
	backpatch(TLIST_REF(l->body), start);
	backpatch(FLIST_REF(l->body), end);
	/*The loop body gets patched up to the parent*/
	if (l->body) {
		TLIST(context->parent) = merge(TLIST(context->parent), TLIST(l->body));
		FLIST(context->parent) = merge(FLIST(context->parent), FLIST(l->body));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %r12d
leal 0x1(%r12), %r15d
leal 0x2(%r12), %ebp
leal 0x3(%r12), %eax
movl %eax, 0x4(%rdi)
movq (%rsi), %rdi
pushq $0x3
popq %r13
movq %rbx, %rsi
movl %r13d, %edx
callq 0x3f9f
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4bb4
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4ada
movq 0x18(%r14), %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x3f9f
movq 0x10(%r14), %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x3f9f
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4ada
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x3f9f
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4ada
movq 0x8(%r14), %rax
movq 0x10(%rax), %rdi
addq $0x8, %rdi
movl %r15d, %esi
callq 0x4b09
movq 0x8(%r14), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movl %ebp, %esi
callq 0x4b09
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
addq $0x8, %rdi
movl %r15d, %esi
callq 0x4b09
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movl %ebp, %esi
callq 0x4b09
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x4595
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rdi
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4bf5
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rdi
movq 0x18(%r14), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
callq 0x4bf5
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, 0x10(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: call_emit
struct ir_operand *call_emit(struct generator *context, struct call *c, int result)
{
	struct ir_stmt *s = ir_stmt_init();
	struct type *ct = TYPE(context->parent);
	/*If function has return type, then store result in register*/
	if (ct && ct->type == type_datatype) {
		if (ct->info.data_type != type_void) {
			s->result = from_reg(context->reg_cnt++);
		}
	}
	for (int i = c->argc-1; i >= 0; i--) {
		struct ir_stmt *p = ir_stmt_init();
		p->type = stmt_param;
		p->arg1 = from_cnum(i);
		p->arg2 = generate_from_node(c->argv[i], context, VALUE);
		emit(context, p);
	}
	s->type = stmt_call;
	s->arg1 = generate_from_node(c->func, context, ADDRESS);
	emit(context, s);
	return result != IGNORE ? copy(s->result) : NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, 0x4(%rsp)
movq %rsi, %r12
movq %rdi, %r15
callq 0x4d88
movq %rax, %r14
movq 0x20(%r15), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x45ee
cmpl $0x0, 0x18(%rax)
jne 0x45ee
cmpl $0x0, (%rax)
je 0x45ee
movl (%r15), %edi
leal 0x1(%rdi), %eax
movl %eax, (%r15)
callq 0x4ccd
movq %rax, 0x8(%r14)
movl (%r12), %r13d
decq %r13
pushq $0x2
popq %rbp
leal 0x1(%r13), %eax
testl %eax, %eax
jle 0x4641
callq 0x4d88
movq %rax, %rbx
movl $0x7, (%rax)
movq %r13, %rdi
callq 0x4733
movq %rax, 0x10(%rbx)
movq 0x10(%r12), %rax
movq (%rax,%r13,8), %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x3f9f
movq %rax, 0x18(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4b43
decq %r13
jmp 0x45f8
movl $0x2, (%r14)
movq 0x8(%r12), %rdi
pushq $0x1
popq %rdx
movq %r15, %rsi
callq 0x3f9f
movq %rax, 0x10(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x4b43
cmpl $0x3, 0x4(%rsp)
jne 0x467f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ce1
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: ident_emit
struct ir_operand *ident_emit(struct generator *context, char *ident, int result)
{
	//if (result == IGNORE) return NULL;
	struct symbol *s = get_symbol(context->scope, ident);
	if (result == ADDRESS) return from_sym(s);
	/*Arrays are converted to pointers to the first member of the array*/
	if (TYPE(context->parent) && TYPE(context->parent)->type == type_array) {
		struct ir_stmt *stmt = ir_stmt_init();
		stmt->type = stmt_addr;
		stmt->result = from_reg(context->reg_cnt++);
		stmt->arg1 = from_sym(s);
		emit(context, stmt);
		return copy(stmt->result);
	}
	/*If the value is asked for then emit a load instruction with the symbol address*/
	struct ir_stmt *stmt = ir_stmt_init();
	stmt->type = stmt_load;
	stmt->result = from_reg(context->reg_cnt++);
	stmt->arg1 = from_sym(s);
	emit(context, stmt);
	return copy(stmt->result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x723e
movq %rax, %r14
cmpl $0x1, %ebp
jne 0x46c5
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4c96
movq 0x20(%rbx), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x46eb
cmpl $0x2, 0x18(%rax)
jne 0x46eb
callq 0x4d88
movq %rax, %r15
movl $0x13, (%rax)
jmp 0x46f9
callq 0x4d88
movq %rax, %r15
movl $0x11, (%rax)
movl (%rbx), %edi
leal 0x1(%rdi), %eax
movl %eax, (%rbx)
callq 0x4ccd
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x4c96
movq %rax, 0x10(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4b43
movq 0x8(%r15), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4ce1
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: from_cnum
struct ir_operand *from_cnum(long cnum)
{
	struct ir_operand *oper = malloc(sizeof(struct ir_operand));
	oper->size = INT_TYPE_SIZE;//Default constant size is integer
	oper->type = oper_cnum;
	oper->val.constant = cnum;
	return oper;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x20f0
movabsq $0x400000002, %rcx      # imm = 0x400000002
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: emit_label
struct ir_stmt *emit_label(struct generator *context, int label)
{
	struct ir_stmt *stmt = ir_stmt_init();
	stmt->type = stmt_label;
	stmt->label = label;
	emit(context, stmt);
	return stmt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x4d88
movq %rax, %r15
movl $0x1, (%rax)
movl %ebx, 0x30(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4b43
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: backpatch
void backpatch(struct ir_list **rlist, int label)
{
	if (!rlist) return;
	struct ir_list *list = *rlist;
	if (!list) return;
	for (int i = 0; i < list->num_stmt; i++)
		list->list[i]->label = label;
	free_list(list);
	*rlist = NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x4b42
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4b41
movl 0x8(%rdi), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x4b38
movq (%rdi), %rdx
movq (%rdx,%rcx,8), %rdx
movl %esi, 0x30(%rdx)
incq %rcx
jmp 0x4b24
callq 0x4ddd
andq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: emit
void emit(struct generator *context, struct ir_stmt *stmt)
{
	eval_size(stmt);
	if (!context->head) {
		context->head = stmt;
		context->cur = stmt;
	} else {
		context->cur->next = stmt;
		stmt->prev = context->cur;
		context->cur = stmt;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4d24
cmpq $0x0, 0x10(%r14)
je 0x4b6e
movq 0x18(%r14), %rax
addq $0x18, %r14
movq %rbx, 0x28(%rax)
movq %rax, 0x20(%rbx)
jmp 0x4b76
movq %rbx, 0x10(%r14)
addq $0x18, %r14
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: make_list
struct ir_list *make_list(struct ir_stmt *n)
{
	struct ir_list *list = malloc(sizeof(struct ir_list));
	list->list = malloc(sizeof(struct ir_stmt*));
	list->list[0] = n;
	list->num_stmt = 1;
	return list;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x20f0
movq %rax, %r14
pushq $0x8
popq %rdi
callq 0x20f0
movq %rax, (%r14)
movq %rbx, (%rax)
movl $0x1, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: emit_jump
struct ir_stmt *emit_jump(struct generator *context, int label, int conditional)
{
	struct ir_stmt *stmt = ir_stmt_init();
	if (conditional == CONDITIONAL)
		stmt->type = stmt_cgoto;
	else
		stmt->type = stmt_ugoto;
	stmt->label = label;
	emit(context, stmt);
	return stmt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x4d88
movq %rax, %r15
xorl %eax, %eax
cmpl $0x1, %ebx
sete %al
addl $0x3, %eax
movl %eax, (%r15)
movl %ebp, 0x30(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4b43
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: merge
struct ir_list *merge(struct ir_list *list1, struct ir_list *list2)
{
	if (!list1 && list2) return list2;
	if (!list2 && list1) return list1;
	if (!list1 && !list2) return NULL;

	int os = list1->num_stmt;
	int ns = list1->num_stmt + list2->num_stmt;
	list1->num_stmt = ns;
	list1->list = realloc(list1->list, sizeof(struct ir_stmt*)*ns);
	for (int i = os; i < ns; i++) {
		list1->list[i] = list2->list[i-os];
	}
	free_list(list2);
	return list1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
je 0x4c15
movq %r14, %rbx
jmp 0x4c87
movq %rdi, %rbx
testq %r14, %r14
sete %al
testq %rdi, %rdi
setne %cl
testb %al, %cl
jne 0x4c87
movq %rbx, %rax
orq %r14, %rax
je 0x4c85
movslq 0x8(%rbx), %r15
movslq 0x8(%r14), %r12
addq %r15, %r12
movl %r12d, 0x8(%rbx)
movq (%rbx), %rdi
leaq (,%r12,8), %rsi
callq 0x2100
movq %rax, (%rbx)
leaq (,%r15,8), %rax
xorl %ecx, %ecx
leaq (%r15,%rcx), %rdx
cmpq %r12, %rdx
jge 0x4c7b
movq (%r14), %rdx
movq (%rdx,%rcx,8), %rdx
movq (%rbx), %rsi
addq %rax, %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
jmp 0x4c5c
movq %r14, %rdi
callq 0x4ddd
jmp 0x4c87
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: from_sym
struct ir_operand *from_sym(struct symbol *s)
{
	if (!s) {
		printf("Unresolved symbol!\n");
		exit (-1);
	}
	struct ir_operand *oper = malloc(sizeof(struct ir_operand));
	oper->size = s->size;
	oper->type = oper_sym;
	oper->val.sym = s;
	return oper;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4cb9
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x20f0
movl 0x8(%rbx), %ecx
movl %ecx, 0x4(%rax)
movl $0x1, (%rax)
movq %rbx, 0x8(%rax)
popq %rbx
retq
leaq 0x3745(%rip), %rdi      # 0x8405
callq 0x2060
pushq $-0x1
popq %rdi
callq 0x2110
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: from_reg
struct ir_operand *from_reg(int reg)
{
	struct ir_operand *oper = malloc(sizeof(struct ir_operand));
	oper->size = 0;
	oper->type = oper_reg;
	oper->val.virt_reg = reg;
	return oper;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
pushq $0x10
popq %rdi
callq 0x20f0
andq $0x0, (%rax)
movl %ebx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: copy
struct ir_operand *copy(struct ir_operand *oper)
{
	struct ir_operand *cpy = NULL;
	if (oper->type == oper_reg)
		cpy = from_reg(oper->val.virt_reg);
	else if (oper->type == oper_sym)
		cpy = from_sym(oper->val.sym);
	else if (oper->type == oper_cnum)
		cpy = from_cnum(oper->val.constant);
	if (cpy) cpy->size = oper->size;
	return cpy;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x2, %eax
je 0x4d0a
cmpl $0x1, %eax
je 0x4cff
testl %eax, %eax
jne 0x4d20
movl 0x8(%rbx), %edi
callq 0x4ccd
jmp 0x4d13
movq 0x8(%rbx), %rdi
callq 0x4c96
jmp 0x4d13
movq 0x8(%rbx), %rdi
callq 0x4733
testq %rax, %rax
je 0x4d20
movl 0x4(%rbx), %ecx
movl %ecx, 0x4(%rax)
jmp 0x4d22
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: eval_size
void eval_size(struct ir_stmt *stmt)
{
	int dfsize = 0;
	if (stmt->result && stmt->result->size) dfsize = stmt->result->size;
	else if (stmt->arg1 && stmt->arg1->size) dfsize = stmt->arg1->size;
	else if (stmt->arg2 && stmt->arg2->size) dfsize = stmt->arg2->size;

	if (stmt->result && !stmt->result->size)
		stmt->result->size = dfsize;
	if (stmt->arg1 && !stmt->arg1->size)
		stmt->arg1->size = dfsize;
	if (stmt->arg2 && !stmt->arg2->size)
		stmt->arg2->size = dfsize;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x4d34
movl 0x4(%rcx), %eax
testl %eax, %eax
jne 0x4d62
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x4d44
movl 0x4(%rax), %eax
testl %eax, %eax
jne 0x4d54
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x4d52
movl 0x4(%rax), %eax
jmp 0x4d54
xorl %eax, %eax
testq %rcx, %rcx
je 0x4d62
cmpl $0x0, 0x4(%rcx)
jne 0x4d62
movl %eax, 0x4(%rcx)
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x4d74
cmpl $0x0, 0x4(%rcx)
jne 0x4d74
movl %eax, 0x4(%rcx)
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x4d83
cmpl $0x0, 0x4(%rcx)
je 0x4d84
retq
movl %eax, 0x4(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: ir_stmt_init
struct ir_stmt *ir_stmt_init()
{
	struct ir_stmt *stmt = malloc(sizeof(struct ir_stmt));
	stmt->type=stmt_invalid;
	stmt->result = NULL, stmt->arg1 = NULL, stmt->arg2 = NULL;
	stmt->prev = NULL, stmt->next = NULL;
	stmt->label = -1;
	return stmt;
}

// Assembly:
pushq %rax
pushq $0x38
popq %rdi
callq 0x20f0
andl $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
andq $0x0, 0x28(%rax)
orl $-0x1, 0x30(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/tac.c
// Function: ir_stmt_free
void ir_stmt_free(struct ir_stmt *stmt)
{
	if (!stmt) return;
	ir_operand_free(stmt->result);
	ir_operand_free(stmt->arg1);
	ir_operand_free(stmt->arg2);
	free(stmt);
}

// Assembly:
testq %rdi, %rdi
je 0x4ddc
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2030
movq 0x10(%rbx), %rdi
callq 0x2030
movq 0x18(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
popq %rbx
jmp 0x2030
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: node_init
struct node *node_init(int type, void *term)
{
	struct node *n = malloc(sizeof(struct node));

	n->type = type;
	n->child = term;

	n->inf = malloc(sizeof(struct node_info));
	n->inf->type = NULL;
	n->inf->truelist = NULL, n->inf->falselist = NULL;
	n->inf->virt_reg = 0;

	return n;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x18
popq %rdi
callq 0x20f0
movq %rax, %r14
movl %ebp, (%rax)
movq %rbx, 0x8(%rax)
pushq $0x20
popq %rdi
callq 0x20f0
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0xc(%rax)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: unit_add
void unit_add(struct unit *u, struct stmt *edecl)
{
	u->num_decls++;
	if (!u->edecls) u->edecls = malloc(sizeof(struct stmt*));
	else u->edecls = realloc(u->edecls, sizeof(struct stmt*)*u->num_decls);
	u->edecls[u->num_decls-1] = edecl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x8(%rdi), %r15
leaq 0x1(%r15), %rsi
movl %esi, 0x8(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x5269
shlq $0x3, %rsi
callq 0x2100
movl 0x8(%r14), %r15d
decl %r15d
jmp 0x5271
pushq $0x8
popq %rdi
callq 0x20f0
movq %rax, (%r14)
movslq %r15d, %rcx
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: loop_init
struct stmt *loop_init(struct expr *init, struct expr *cond,
		       struct expr *iter, struct stmt *body)
{
	struct loop *l = malloc(sizeof(struct loop));
	l->init = init, l->condition = cond, l->iter = iter;
	l->body = body;
	return node_init(node_loop, l);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x20
popq %rdi
callq 0x20f0
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
pushq $0xb
popq %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5020
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: func_init
struct stmt *func_init(char *ident, struct type *ftype, struct stmt *body)
{
	struct func *f = malloc(sizeof(struct func));
	f->ident = ident;
	f->ftype = ftype;
	f->body = body;
	return node_init(node_func, f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x18
popq %rdi
callq 0x20f0
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
pushq $0x8
popq %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x5020
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: call_init
struct expr *call_init(struct expr *func, struct expr **args, int argc)
{
	struct call *c = malloc(sizeof(struct call));

	c->func = func;
	c->argv = args;
	c->argc = argc;

	return node_init(node_call, c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x18
popq %rdi
callq 0x20f0
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movl %ebx, (%rax)
pushq $0x7
popq %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x5020
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: call_addarg
void call_addarg(struct call *c, struct expr *e)
{
	c->argc++;
	if (!c->argv) c->argv = malloc(sizeof(struct expr *));
	else c->argv = realloc(c->argv, sizeof(struct expr*)*c->argc);
	c->argv[c->argc-1] = e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rdi), %r15
leaq 0x1(%r15), %rsi
movl %esi, (%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x5381
shlq $0x3, %rsi
callq 0x2100
movl (%r14), %r15d
decl %r15d
jmp 0x5389
pushq $0x8
popq %rdi
callq 0x20f0
movq %rax, 0x10(%r14)
movslq %r15d, %rcx
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: block_init
struct stmt *block_init()
{
	struct block *b = malloc(sizeof(struct block));

	b->scope = NULL;
	b->stmt_list = NULL;
	b->num_stmt = 0;

	return node_init(node_block, b);
}

// Assembly:
pushq %rax
pushq $0x18
popq %rdi
callq 0x20f0
andq $0x0, 0x10(%rax)
andq $0x0, (%rax)
andl $0x0, 0x8(%rax)
pushq $0x9
popq %rdi
movq %rax, %rsi
popq %rax
jmp 0x5020
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: block_addstmt
void block_addstmt(struct block *b, struct stmt *s)
{
	b->num_stmt++;
	if (!b->stmt_list)
		b->stmt_list = malloc(sizeof(struct stmt *));
	else
		b->stmt_list =
		    realloc(b->stmt_list,
			    sizeof(struct stmt *) * b->num_stmt);
	b->stmt_list[b->num_stmt - 1] = s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x8(%rdi), %r15
leaq 0x1(%r15), %rsi
movl %esi, 0x8(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x53ec
shlq $0x3, %rsi
callq 0x2100
movl 0x8(%r14), %r15d
decl %r15d
jmp 0x53f4
pushq $0x8
popq %rdi
callq 0x20f0
movq %rax, (%r14)
movslq %r15d, %rcx
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: binop_init
struct expr *binop_init(enum operator   op, struct expr *lhs,
			struct expr *rhs)
{
	struct binop *b = malloc(sizeof(struct binop));
	b->lhs = lhs, b->rhs = rhs;
	b->op = op;
	return node_init(node_binop, b);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
pushq $0x18
popq %rdi
callq 0x20f0
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movl %ebp, 0x10(%rax)
pushq $0x6
popq %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x5020
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: unop_init
struct expr *unop_init(enum operator   op, struct expr *term)
{
	struct unop *u = malloc(sizeof(struct unop));
	u->term = term;
	u->op = op;
	return node_init(node_unop, u);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x10
popq %rdi
callq 0x20f0
movq %rbx, (%rax)
movl %ebp, 0x8(%rax)
pushq $0x5
popq %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5020
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/ast.c
// Function: value_ident
struct expr *value_ident(const char *ident)
{
	union value *v = malloc(sizeof(union value));
	int len = strlen(ident);
	v->ident = malloc(len + 1);
	memcpy(v->ident, ident, len);
	v->ident[len] = 0;
	return node_init(node_ident, v);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %rdi
callq 0x20f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2070
movq %rax, %r15
incl %eax
movslq %eax, %rdi
callq 0x20f0
movq %rax, %r12
movq %rax, (%r14)
movslq %r15d, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x20e0
movb $0x0, (%r12,%r15)
pushq $0x3
popq %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5020
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/cdecl.c
// Function: parse_declarator
int parse_declarator(struct parser *p, struct declaration *decl)
{
	struct type *t1 = NULL;
	while (match(p, t_asterisk))
		t1 = types_merge(t1, type_init(type_ptr));
	if (parse_dir_declarator(p, decl)) {
		decl->type = types_merge(decl->type, t1);
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r12
xorl %r15d, %r15d
pushq $0xf
popq %rbp
pushq $0x1
popq %rbx
movq %r12, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
je 0x579f
movl %ebx, %edi
callq 0x73c8
movq %r15, %rdi
movq %rax, %rsi
callq 0x73dd
movq %rax, %r15
jmp 0x5779
movq %r12, %rdi
movq %r14, %rsi
callq 0x54e8
testl %eax, %eax
je 0x57c0
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x73dd
movq %rax, 0x8(%r14)
jmp 0x57c2
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/cdecl.c
// Function: parse_param
struct declaration *parse_param(struct parser *p)
{
	enum type_specifier dtype = type_void;
	if (match(p, t_int))
		dtype = type_int;
	if (match(p, t_char))
		dtype = type_char;
	if (!dtype)
		return NULL;	/*technically wrong, types aren't required by the grammar */
	struct declaration *decl = parse_init_declarator(p, dtype);
	return decl;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x4
popq %rsi
callq 0x7116
xorl %ebp, %ebp
testq %rax, %rax
setne %bpl
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
pushq $0x2
popq %rsi
cmovel %ebp, %esi
testl %esi, %esi
je 0x580a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5813
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/cdecl.c
// Function: parse_init_declarator
struct declaration *parse_init_declarator(struct parser *p,
					  enum type_specifier dtype)
{
	struct declaration *decl;
	decl = malloc(sizeof(struct declaration));
	decl->initializer = NULL;
	decl->ident = NULL;
	decl->type = NULL;
	if (!parse_declarator(p, decl)) {
		free(decl);
		return 0;
	}

	struct type *decldtype = type_init(type_datatype);
	decldtype->info.data_type = dtype;
	decl->type = types_merge(decl->type, decldtype);
	return decl;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x20a0
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x5762
testl %eax, %eax
je 0x5854
xorl %edi, %edi
callq 0x73c8
movl %ebp, (%rax)
movq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x73dd
movq %rax, 0x8(%rbx)
jmp 0x585e
movq %rbx, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/cdecl.c
// Function: parse_declaration
struct stmt *parse_declaration(struct parser *p)
{
	enum type_specifier dtype = type_void;
	if (match(p, t_int))
		dtype = type_int;
	if (match(p, t_char))
		dtype = type_char;
	if (!dtype)
		return NULL;	/*technically wrong, types aren't required by the grammar */
	struct declaration *decl = parse_init_declarator(p, dtype);
	set_type(get_scope(p), decl->ident, decl->type);
	if (match(p, t_semic))
		return node_init(node_decl, decl);
	if (!match(p, t_equal))
		syntax_error(p,
			     "Expected assignment expression after declaration");
	struct expr *e = parse_asn_expr(p);
	if (!e)
		syntax_error(p, "Invalid initializer after declaration");
	decl->initializer = e;
	if (!match(p, t_semic))
		syntax_error(p, "Expected ';' after initializer");
	return node_init(node_decl, decl);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x4
popq %rsi
callq 0x7116
xorl %ebp, %ebp
testq %rax, %rax
setne %bpl
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
pushq $0x2
popq %rsi
cmovel %ebp, %esi
testl %esi, %esi
je 0x5945
movq %rbx, %rdi
callq 0x5813
movq %rax, %r14
movq %rbx, %rdi
callq 0x71af
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rax, %rdi
callq 0x72c9
pushq $0x2a
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x5930
pushq $0x13
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x58ee
leaq 0x2d32(%rip), %rsi      # 0x8618
movq %rbx, %rdi
callq 0x7167
movq %rbx, %rdi
callq 0x6673
movq %rax, %r15
testq %rax, %rax
jne 0x590d
leaq 0x2d44(%rip), %rsi      # 0x8649
movq %rbx, %rdi
callq 0x7167
movq %r15, 0x10(%r14)
pushq $0x2a
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x5930
leaq 0x2d47(%rip), %rsi      # 0x866f
movq %rbx, %rdi
callq 0x7167
pushq $0xc
popq %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5020
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/cdecl.c
// Function: parse_function
struct stmt *parse_function(struct parser *p)
{
	enum type_specifier dtype = type_int;
	if (match(p, t_void)) dtype=type_void;
	else if (match(p, t_int))  dtype = type_int;
	else if (match(p, t_char)) dtype = type_char;
	else printf("Warning: return type defaults to int\n");
	/*Validify function declaration, then parse body */
	struct declaration *decl;
	decl = malloc(sizeof(struct declaration));
	decl->initializer = NULL;
	decl->ident = NULL;
	decl->type = NULL;
	if (!parse_declarator(p, decl)) {
		free(decl);
		return 0;
	}
	if (!decl->type) syntax_error(p, "Invalid declarator");
	/*The type must be a function */
	if (decl->type->type != type_fcn) {
		free(decl->ident);
		type_free(decl->type);
		free(decl);
		return 0;
	}

	struct type *decldtype = type_init(type_datatype);
	decldtype->info.data_type = dtype;
	decl->type = types_merge(decl->type, decldtype);
	set_type(get_scope(p), decl->ident, decl->type);
	/*Create function from declaration */
	struct stmt *block;
	if (!(block = parse_block(p))) {
		free(decl->ident);
		type_free(decl->type);
		free(decl);
		return 0;
	}
	struct stmt *fn = func_init(decl->ident, decl->type, block);
	free(decl);
	struct type *ftype = FUNC(fn)->ftype;
	/*lastly, add parameters to block scope */
	for (int i = 0; i < ftype->info.fcn.paramc; i++) {
		char *pn = ftype->info.fcn.paramv[i];
		struct type *pt = ftype->info.fcn.paramt[i];
		set_type(BLOCK(FUNC(fn)->body)->scope, pn, pt);
	}

	return fn;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x3
popq %rsi
callq 0x7116
xorl %ebp, %ebp
testq %rax, %rax
jne 0x59a0
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x7116
pushq $0x1
popq %rbp
testq %rax, %rax
jne 0x59a0
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x5994
pushq $0x2
popq %rbp
jmp 0x59a0
leaq 0x2d06(%rip), %rdi      # 0x86a1
callq 0x2060
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x20a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5762
testl %eax, %eax
je 0x5a8b
movq 0x8(%r14), %r15
testq %r15, %r15
jne 0x59d9
leaq 0x2cbd(%rip), %rsi      # 0x868e
movq %rbx, %rdi
callq 0x7167
cmpl $0x3, 0x18(%r15)
jne 0x5a7b
xorl %edi, %edi
callq 0x73c8
movl %ebp, (%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x73dd
movq %rax, %r15
movq %rax, 0x8(%r14)
movq %rbx, %rdi
callq 0x71af
movq (%r14), %r12
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x72c9
movq %rbx, %rdi
callq 0x6b73
movq %r12, %rdi
testq %rax, %rax
je 0x5a7e
movq %r15, %rsi
movq %rax, %rdx
callq 0x52f3
movq %rax, %rbx
movq %r14, %rdi
callq 0x2030
movq 0x8(%rbx), %rax
movq 0x8(%rax), %r14
xorl %r15d, %r15d
movslq (%r14), %rax
cmpq %rax, %r15
jge 0x5a95
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movq (%rax,%r15,8), %rsi
movq (%rcx,%r15,8), %rdx
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x72c9
incq %r15
jmp 0x5a49
movq (%r14), %rdi
callq 0x2030
movq %r15, %rdi
callq 0x73fd
movq %r14, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/checker.c
// Function: type_error
void type_error(struct node *parent, struct type *a, struct type *b)
{
	printf("Incompatable types ");
	printf("\"");
	printf("with types \"");
	print_type(a);
	printf("\" and \"");
	print_type(b);
	printf("\" in expression:\n");
	node_debug(parent);
	printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2c47(%rip), %rdi      # 0x8700
xorl %eax, %eax
callq 0x2080
pushq $0x22
popq %rdi
callq 0x2040
leaq 0x2c45(%rip), %rdi      # 0x8714
xorl %eax, %eax
callq 0x2080
movq %r15, %rdi
callq 0x75e7
leaq 0x2c3c(%rip), %rdi      # 0x8721
xorl %eax, %eax
callq 0x2080
movq %r14, %rdi
callq 0x75e7
leaq 0x2cea(%rip), %rdi      # 0x87e5
callq 0x2060
movq %rbx, %rdi
callq 0x265d
pushq $0xa
popq %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/checker.c
// Function: rank
int rank(struct type *a)
{
	if (!a) return 0;
	if (!a->type == type_datatype) return 0;
	enum type_specifier dt = a->info.data_type;
	if (dt==type_char) return 1;
	if (dt==type_int) return 2;
	if (dt==type_long) return 3;

	return 0;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x5b22
cmpl $0x0, 0x18(%rdi)
je 0x5b23
retq
movl (%rdi), %ecx
decl %ecx
cmpl $0x3, %ecx
ja 0x5b22
movl %ecx, %eax
leaq 0x2d3b(%rip), %rcx      # 0x8870
movl (%rcx,%rax,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/checker.c
// Function: implicit_cast
int implicit_cast(struct node **a, struct node **b, int favor)
{
	struct type *ta = TYPE(*a), *tb = TYPE(*b);
	/*Integer promotion*/
	int ra = rank(ta), rb = rank(tb);
	if (ra && rb) {
		if ((ra > rb && favor == NEUTRAL) || favor == LHS) {
			if (favor == LHS && rb > ra) {
				printf("Warning: Possible data loss in implicit cast from ");
				print_type(ta);
				printf(" to ");
				print_type(tb);
				printf("\n");
			}

			return explicit_cast(ta, b);
		} else if ((rb > ra && favor == NEUTRAL) || favor == RHS) {
			printf("Integer promotion\n");
			return explicit_cast(tb, a);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %rax
movq 0x10(%rax), %rax
movq (%rax), %r15
movq (%rsi), %rax
movq 0x10(%rax), %rax
movq (%rax), %rbx
movq %r15, %rdi
callq 0x5b15
movl %eax, %r13d
movq %rbx, %rdi
callq 0x5b15
testl %r13d, %r13d
je 0x5ba5
testl %eax, %eax
je 0x5ba5
cmpl %eax, %r13d
seta %cl
cmpl $0x3, %ebp
sete %dl
testl %ebp, %ebp
je 0x5bb6
andb %cl, %dl
jne 0x5bb6
cmpl %r13d, %eax
seta %al
cmpl $0x3, %ebp
sete %cl
cmpl $0x1, %ebp
je 0x5bfb
andb %al, %cl
jne 0x5bfb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebp, %ebp
jne 0x5bf3
cmpl %r13d, %eax
jbe 0x5bf3
leaq 0x2b63(%rip), %rdi      # 0x8729
xorl %eax, %eax
callq 0x2080
movq %r15, %rdi
callq 0x75e7
leaq 0x2b80(%rip), %rdi      # 0x875c
xorl %eax, %eax
callq 0x2080
movq %rbx, %rdi
callq 0x75e7
pushq $0xa
popq %rdi
callq 0x2040
movq %r15, %rdi
movq %r14, %rsi
jmp 0x5c0d
leaq 0x2bf4(%rip), %rdi      # 0x87f6
callq 0x2060
movq %rbx, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5c20
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/checker.c
// Function: explicit_cast
int explicit_cast(struct type *a, struct node **b)
{
	struct node *cast;
	struct type *tb = TYPE(*b);
	int ra = rank(a), rb = rank(tb);
	/*Scalar cast*/
	if (ra && rb) {
		cast = node_init(node_cast, *b);
		TYPE(cast) = type_copy(a);
		*b = cast;
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movq 0x10(%r15), %rax
movq (%rax), %r12
callq 0x5b15
movl %eax, %r13d
movq %r12, %rdi
callq 0x5b15
xorl %ebp, %ebp
testl %r13d, %r13d
je 0x5c78
testl %eax, %eax
je 0x5c78
pushq $0x1
popq %rbp
movl %ebp, %edi
movq %r15, %rsi
callq 0x5020
movq %rax, %r15
movq %r14, %rdi
callq 0x7460
movq 0x10(%r15), %rcx
movq %rax, (%rcx)
movq %r15, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq