LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/lexer.c
// Function: tokenify
struct token **tokenify(char *stream, int *numt)
{
	if (!stream)
		return NULL;
	struct token **tokens = NULL;

	int tlen = 0, numtok = 0, ln = 0;
	char *save = stream, *tok = NULL, *ls = stream;
	enum token_type t;
	while ((t = lex_r(&save, &tlen, &ls, &ln))) {
		tok = malloc(tlen + 1);
		memcpy(tok, save - tlen, tlen);
		tok[tlen] = 0;
		numtok++;
		struct token *token = malloc(sizeof(struct token));
		token->tok = tok, token->type = t;
		token->col = save - ls, token->line = ln;
		if (!tokens)
			tokens = malloc(sizeof(struct token *));
		else
			tokens =
			    realloc(tokens,
				    sizeof(struct token *) * numtok);
		tokens[numtok - 1] = token;
	}
	*numt = numtok;
	return tokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x6342
movq %rsi, 0x18(%rsp)
leaq 0x4(%rsp), %rax
andl $0x0, (%rax)
movq %rsp, %rax
andl $0x0, (%rax)
leaq 0x10(%rsp), %rax
movq %rdi, (%rax)
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
pushq $0x8
popq %r13
xorl %r15d, %r15d
xorl %r14d, %r14d
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rsp, %rcx
callq 0x6357
testl %eax, %eax
je 0x6338
movl %eax, %r12d
movq %r15, 0x20(%rsp)
movslq 0x4(%rsp), %r15
leaq 0x1(%r15), %rdi
callq 0x20f0
movq %rax, %rbx
movq 0x10(%rsp), %rbp
movq %rbp, %rsi
subq %r15, %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x20e0
movb $0x0, (%rbx,%r15)
pushq $0x18
popq %rdi
callq 0x20f0
movq %rax, %r15
movq %rbx, (%rax)
movl %r12d, 0x14(%rax)
subl 0x8(%rsp), %ebp
movl %ebp, 0x8(%rax)
movl (%rsp), %eax
movl %eax, 0xc(%r15)
testq %r14, %r14
je 0x6315
movq %r14, %rdi
movq %r13, %rsi
callq 0x2100
jmp 0x631d
pushq $0x8
popq %rdi
callq 0x20f0
movq %rax, %r14
movq 0x20(%rsp), %rax
movq %r15, (%r14,%rax,8)
movq %rax, %r15
addq $0x8, %r13
incq %r15
jmp 0x6290
movq 0x18(%rsp), %rax
movl %r15d, (%rax)
jmp 0x6345
xorl %r14d, %r14d
movq %r14, %rax
addq $0x28, %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/frontend/lexer.c
// Function: lex_r
enum token_type lex_r(char **saveptr, int *tlen, char **ls, int *ln)
{
	char *str = *saveptr;
	while (isspace(*str))
		*ln += *str == '\n' ? (*ls = str, 1) : 0, str++;

	enum token_type t = t_none;
	int len = 0;
	size_t ntoken_pairs =
	    (size_t) ((sizeof(token_pairs) / sizeof(struct token_pair)));
	/*Match against static tokens */
	for (unsigned int i = 0; i < ntoken_pairs; i++) {
		if (!strncmp
		    (str, token_pairs[i].match, token_pairs[i].len)) {
			len = token_pairs[i].len;
			t = token_pairs[i].type;
			break;
		}
	}
	/*Check for ident, string, numeric, etc */
	if (t == t_none) {
		if (isdigit(*str)) {
			t = t_numeric;
			while (str[len] && isdigit(str[len]))
				len++;
		} else if (isalpha(*str) || *str == '_') {
			t = t_ident;
			while (str[len]
			       && (isalpha(str[len]) || str[len] == '_'))
				len++;
		}
	}

	*saveptr = str + len;
	*tlen = len;
	return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq (%rdi), %r15
callq 0x2120
pushq $0x1
popq %rcx
movq (%rax), %rbx
movsbq (%r15), %r13
movzwl (%rbx,%r13,2), %r14d
btl $0xd, %r14d
jae 0x63aa
xorl %edx, %edx
cmpb $0xa, %r13b
jne 0x63a1
movq %r15, (%rbp)
movl %ecx, %edx
addl %edx, (%r12)
incq %r15
jmp 0x6380
pushq $0x10
popq %rcx
leaq 0x18(%rcx), %r12
cmpq $0x358, %r12            # imm = 0x358
je 0x63ed
leaq 0x66ff(%rip), %rax      # 0xcac0
movq -0x8(%rcx,%rax), %rsi
movl (%rcx,%rax), %ebp
movslq %ebp, %rdx
movq %r15, %rdi
callq 0x2050
movq %r12, %rcx
testl %eax, %eax
jne 0x63ad
leaq 0x66de(%rip), %rax      # 0xcac0
movl -0x28(%r12,%rax), %eax
testl %eax, %eax
jne 0x6407
jmp 0x63ef
xorl %ebp, %ebp
btl $0xb, %r14d
jb 0x642b
cmpb $0x5f, %r13b
je 0x644b
xorl %eax, %eax
andl $0x400, %r14d           # imm = 0x400
jne 0x644b
movslq %ebp, %rcx
addq %rcx, %r15
movq 0x8(%rsp), %rdx
movq %r15, (%rdx)
movq 0x10(%rsp), %rdx
movl %ecx, (%rdx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %ebp, %rcx
addq %r15, %rcx
pushq $0x1
popq %rax
movsbq (%rcx), %rdx
testq %rdx, %rdx
je 0x6407
testb $0x8, 0x1(%rbx,%rdx,2)
je 0x6407
incl %ebp
incq %rcx
jmp 0x6434
movslq %ebp, %rcx
addq %r15, %rcx
pushq $0xc
popq %rax
movsbq (%rcx), %rdx
testq %rdx, %rdx
je 0x6407
cmpb $0x5f, %dl
je 0x646e
movzwl (%rbx,%rdx,2), %edx
andl $0x400, %edx            # imm = 0x400
je 0x6407
incl %ebp
incq %rcx
jmp 0x6454
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_primary
struct expr *parse_primary(struct parser *p)
{
	struct token *t;
	if ((t = match(p, t_ident)))
		return value_ident(t->tok);
	if ((t = match(p, t_numeric)))
		return value_num(t->tok);
	if (match(p, t_lparen)) {
		struct expr *e;
		if ((e = parse_expr(p))) {
			if (!match(p, t_rparen))
				syntax_error(p,
					     "Missing right parentheses");
			return e;
		}
	}
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0xc
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x649b
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5458
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x64ba
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x54b5
pushq $0x14
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x64fb
movq %rbx, %rdi
callq 0x6509
testq %rax, %rax
je 0x64fb
movq %rax, %r14
pushq $0x15
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x64fe
leaq 0x23c9(%rip), %rsi      # 0x88ba
movq %rbx, %rdi
callq 0x7167
jmp 0x64fe
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_postfix
struct expr *parse_postfix(struct parser *p)
{
	struct token *t;
	struct expr *e;
	if (!(e = parse_primary(p)))
		return NULL;
	while ((t = match(p, t_inc)) || (t = match(p, t_dec))
	       || (t = match(p, t_lbrack)) || (t = match(p, t_lparen))) {
		if (t->type == t_lbrack) {
			struct expr *sub;
			if (!(sub = parse_expr(p)))
				syntax_error(p,
					     "Invalid array subscript expression");
			if (!match(p, t_rbrack))
				syntax_error(p,
					     "Missing right bracket in subscript expression");
			e = binop_init(o_add, e, sub);
			e = unop_init(o_deref, e);
		} else if (t->type == t_lparen) {
			struct expr *call = call_init(e, NULL, 0);
			struct expr *arg;
			while ((arg=parse_asn_expr(p))) {
				call_addarg(CALL(call), arg);
				if (!match(p, t_comma)) break;
			}
			if (!match(p, t_rparen))
				syntax_error(p, "Missing right parentheses in function call");
			e = call;
		} else {
			e = unop_init(t->type ==
				      t_inc ? o_postinc : o_postdec, e);
		}
	}

	return e;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6478
testq %rax, %rax
je 0x665e
movq %rax, %r13
pushq $0x22
popq %rbp
pushq $0x23
popq %r14
pushq $0x29
popq %r15
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
jne 0x657b
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7116
testq %rax, %rax
jne 0x657b
movq %rbx, %rdi
pushq $0x16
popq %rsi
callq 0x7116
testq %rax, %rax
jne 0x657b
movq %rbx, %rdi
pushq $0x14
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x6661
movl 0x14(%rax), %eax
cmpl $0x14, %eax
je 0x65df
cmpl $0x16, %eax
jne 0x663f
movq %rbx, %rdi
callq 0x6509
movq %rax, %r12
testq %rax, %rax
jne 0x65ab
movq %rbx, %rdi
leaq 0x232e(%rip), %rsi      # 0x88d4
callq 0x7167
movq %rbx, %rdi
pushq $0x17
popq %rsi
callq 0x7116
testq %rax, %rax
jne 0x65ca
movq %rbx, %rdi
leaq 0x2332(%rip), %rsi      # 0x88f7
callq 0x7167
xorl %edi, %edi
movq %r13, %rsi
movq %r12, %rdx
callq 0x5404
pushq $0x13
popq %rdi
movq %rax, %rsi
jmp 0x6651
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5324
movq %rax, %r13
movq %rbx, %rdi
callq 0x6673
testq %rax, %rax
je 0x6617
movq 0x8(%r13), %rdi
movq %rax, %rsi
callq 0x5353
movq %rbx, %rdi
movl %r15d, %esi
callq 0x7116
testq %rax, %rax
jne 0x65ee
movq %rbx, %rdi
pushq $0x15
popq %rsi
callq 0x7116
testq %rax, %rax
jne 0x6538
movq %rbx, %rdi
leaq 0x22f0(%rip), %rsi      # 0x8925
callq 0x7167
jmp 0x6538
xorl %ecx, %ecx
cmpl $0x22, %eax
setne %cl
leal 0x14(,%rcx,2), %edi
movq %r13, %rsi
callq 0x5431
movq %rax, %r13
jmp 0x6538
xorl %r13d, %r13d
movq %r13, %rax
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/frontend/parser.c
// Function: parse_asn_expr
struct expr *parse_asn_expr(struct parser *p)
{
	struct expr *v;
	struct token *t;
	int s = save(p);
	if ((v = parse_unary(p))) {
		if ((t = match(p, t_equal))) {
			struct expr *rhs;
			if ((rhs = parse_asn_expr(p))) {
				return binop_init(dec_oper(t->tok), v,
						  rhs);
			}
			syntax_error(p,
				     "Missing right hand side in assignment operation");
		}
		node_free(v);
	}
	restore(p, s);
	if ((v = parse_or_expr(p)))
		return v;
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %ebp
callq 0x66f8
testq %rax, %rax
je 0x66e5
movq %rax, %r14
pushq $0x13
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x66dd
movq %rax, %r15
movq %rbx, %rdi
callq 0x6673
testq %rax, %rax
je 0x66ce
movq %rax, %r12
movq (%r15), %rdi
callq 0x7762
movl %eax, %edi
movq %r14, %rsi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5404
leaq 0x22bb(%rip), %rsi      # 0x8990
movq %rbx, %rdi
callq 0x7167
movq %r14, %rdi
callq 0x5058
movl %ebp, 0x18(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6aac
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_unary
struct expr *parse_unary(struct parser *p)
{
	struct token *t;
	struct expr *u;
	if ((u = parse_postfix(p)))
		return u;
	/*Ambiguous operators, so specify types manually */
	if ((t = match(p, t_inc)) || (t = match(p, t_dec))) {
		if ((u = parse_unary(p))) {
			return unop_init(t->type ==
					 t_inc ? o_preinc : o_predec, u);
		}
		syntax_error(p, "No unary expression after prefix");
	}
	if ((t = match(p, t_asterisk)) || (t = match(p, t_ampersand))) {
		if ((u = parse_unary(p))) {
			return unop_init(t->type ==
					 t_asterisk ? o_deref : o_ref, u);
		}
	}

	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x650e
testq %rax, %rax
je 0x6711
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x22
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6731
pushq $0x23
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6763
movq %rax, %r14
movq %rbx, %rdi
callq 0x66f8
testq %rax, %rax
je 0x6754
xorl %ecx, %ecx
cmpl $0x22, 0x14(%r14)
setne %cl
leal 0x15(,%rcx,2), %edi
jmp 0x67a1
leaq 0x21f5(%rip), %rsi      # 0x8950
movq %rbx, %rdi
callq 0x7167
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6783
pushq $0x11
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x67b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x66f8
testq %rax, %rax
je 0x67b0
xorl %edi, %edi
cmpl $0xf, 0x14(%r14)
sete %dil
orl $0x12, %edi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5431
xorl %eax, %eax
jmp 0x6709
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_mul_expr
struct expr *parse_mul_expr(struct parser *p)
{
	struct expr *v = parse_unary(p);
	if (!v)
		return NULL;
	struct token *t;
	while ((t = match(p, t_asterisk)) || (t = match(p, t_rslash))) {
		struct expr *v2 = parse_unary(p);
		if (!v2)
			syntax_error(p, "Unexpected token in expression");
		v = binop_init(dec_oper(t->tok), v, v2);
	}
	return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x66f8
testq %rax, %rax
je 0x6834
movq %rax, %r14
pushq $0xf
popq %rbp
leaq 0x2195(%rip), %r12      # 0x8971
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
jne 0x67fb
movq %rbx, %rdi
pushq $0x12
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x6837
movq %rax, %r13
movq %rbx, %rdi
callq 0x66f8
movq %rax, %r15
testq %rax, %rax
jne 0x6819
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7167
movq (%r13), %rdi
callq 0x7762
movl %eax, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5404
movq %rax, %r14
jmp 0x67dc
xorl %r14d, %r14d
movq %r14, %rax
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/frontend/parser.c
// Function: parse_add_expr
struct expr *parse_add_expr(struct parser *p)
{
	struct expr *v = parse_mul_expr(p);
	if (!v)
		return NULL;
	struct token *t;
	while ((t = match(p, t_plus)) || (t = match(p, t_minus))) {
		struct expr *v2 = parse_mul_expr(p);
		if (!v2)
			syntax_error(p, "Unexpected token in expression");
		v = binop_init(dec_oper(t->tok), v, v2);
	}
	return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x67b7
testq %rax, %rax
je 0x68c6
movq %rax, %r14
pushq $0xd
popq %rbp
leaq 0x2103(%rip), %r12      # 0x8971
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
jne 0x688d
movq %rbx, %rdi
pushq $0xe
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x68c9
movq %rax, %r13
movq %rbx, %rdi
callq 0x67b7
movq %rax, %r15
testq %rax, %rax
jne 0x68ab
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7167
movq (%r13), %rdi
callq 0x7762
movl %eax, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5404
movq %rax, %r14
jmp 0x686e
xorl %r14d, %r14d
movq %r14, %rax
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/frontend/parser.c
// Function: parse_rel_expr
struct expr *parse_rel_expr(struct parser *p)
{
	struct expr *v = parse_add_expr(p);
	if (!v)
		return NULL;
	struct token *t;
	while ((t = match(p, t_gt)) || (t = match(p, t_lt))
	       || (t = match(p, t_lte)) || (t = match(p, t_gte))) {
		struct expr *v2 = parse_add_expr(p);
		if (!v2)
			syntax_error(p, "Unexpected token in expression");
		v = binop_init(dec_oper(t->tok), v, v2);
	}
	return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6849
testq %rax, %rax
je 0x697c
movq %rax, %r14
pushq $0x1e
popq %rbp
leaq 0x206d(%rip), %r13      # 0x8971
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
jne 0x6943
movq %rbx, %rdi
pushq $0x1f
popq %rsi
callq 0x7116
testq %rax, %rax
jne 0x6943
movq %rbx, %rdi
pushq $0x21
popq %rsi
callq 0x7116
testq %rax, %rax
jne 0x6943
movq %rbx, %rdi
pushq $0x20
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x697f
movq %rax, %r12
movq %rbx, %rdi
callq 0x6849
movq %rax, %r15
testq %rax, %rax
jne 0x6961
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7167
movq (%r12), %rdi
callq 0x7762
movl %eax, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5404
movq %rax, %r14
jmp 0x6904
xorl %r14d, %r14d
movq %r14, %rax
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/frontend/parser.c
// Function: parse_eq_expr
struct expr *parse_eq_expr(struct parser *p)
{
	struct expr *v = parse_rel_expr(p);
	if (!v)
		return NULL;
	struct token *t;
	while ((t = match(p, t_eq)) || (t = match(p, t_neq))) {
		struct expr *v2 = parse_rel_expr(p);
		if (!v2)
			syntax_error(p, "Unexpected token in expression");
		v = binop_init(dec_oper(t->tok), v, v2);
	}
	return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x68db
testq %rax, %rax
je 0x6a0e
movq %rax, %r14
pushq $0x1c
popq %rbp
leaq 0x1fbb(%rip), %r12      # 0x8971
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
jne 0x69d5
movq %rbx, %rdi
pushq $0x1d
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x6a11
movq %rax, %r13
movq %rbx, %rdi
callq 0x68db
movq %rax, %r15
testq %rax, %rax
jne 0x69f3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7167
movq (%r13), %rdi
callq 0x7762
movl %eax, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5404
movq %rax, %r14
jmp 0x69b6
xorl %r14d, %r14d
movq %r14, %rax
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/frontend/parser.c
// Function: parse_and_expr
struct expr *parse_and_expr(struct parser *p)
{
	struct expr *v = parse_eq_expr(p);
	if (!v)
		return NULL;
	while (match(p, t_ampersand) && match(p, t_ampersand)) {
		struct expr *v2 = parse_eq_expr(p);
		if (!v2)
			syntax_error(p, "Unexpected token in expression");
		v = binop_init(o_and, v, v2);
	}
	return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x6991
testq %rax, %rax
je 0x6a98
movq %rax, %rbx
pushq $0x11
popq %rbp
leaq 0x1f29(%rip), %r15      # 0x8971
pushq $0xa
popq %r12
movq %r14, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
je 0x6a9a
movq %r14, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
je 0x6a9a
movq %r14, %rdi
callq 0x6991
movq %rax, %r13
testq %rax, %rax
jne 0x6a85
movq %r14, %rdi
movq %r15, %rsi
callq 0x7167
movl %r12d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x5404
movq %rax, %rbx
jmp 0x6a4c
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_or_expr
struct expr *parse_or_expr(struct parser *p)
{
	struct expr *v = parse_and_expr(p);
	if (!v)
		return NULL;
	while (match(p, t_vslash) && match(p, t_vslash)) {
		struct expr *v2 = parse_and_expr(p);
		if (!v2)
			syntax_error(p, "Unexpected token in expression");
		v = binop_init(o_or, v, v2);
	}
	return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x6a23
testq %rax, %rax
je 0x6b21
movq %rax, %rbx
pushq $0x10
popq %rbp
leaq 0x1ea0(%rip), %r15      # 0x8971
pushq $0xb
popq %r12
movq %r14, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
je 0x6b23
movq %r14, %rdi
movl %ebp, %esi
callq 0x7116
testq %rax, %rax
je 0x6b23
movq %r14, %rdi
callq 0x6a23
movq %rax, %r13
testq %rax, %rax
jne 0x6b0e
movq %r14, %rdi
movq %r15, %rsi
callq 0x7167
movl %r12d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x5404
movq %rax, %rbx
jmp 0x6ad5
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_expr_stmt
struct stmt *parse_expr_stmt(struct parser *p)
{
	struct expr *e;
	if ((e = parse_expr(p))) {
		if (!match(p, t_semic))
			syntax_error(p, "Expected ';' after expression");
		return e;
	}
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x6673
movq %rax, %rbx
testq %rax, %rax
je 0x6b68
pushq $0x2a
popq %rsi
movq %r14, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6b68
leaq 0x1e60(%rip), %rsi      # 0x89c0
movq %r14, %rdi
callq 0x7167
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_block
struct stmt *parse_block(struct parser *p)
{
	if (match(p, t_lcbrack)) {
		struct stmt *block = block_init();
		push_scope(p);
		struct stmt *s;
		while ((s = parse_stmt(p)) || (s = parse_declaration(p)))
			block_addstmt(block->child, s);
		if (!match(p, t_rcbrack))
			syntax_error(p, "Expected '}'");
		((struct block *) block->child)->scope = pop_scope(p);
		return block;
	}
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x18
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x6bf2
xorl %eax, %eax
callq 0x539a
movq %rax, %r14
movq %rbx, %rdi
callq 0x7007
movq %rbx, %rdi
callq 0x6c00
testq %rax, %rax
jne 0x6bb3
movq %rbx, %rdi
callq 0x5866
testq %rax, %rax
je 0x6bc1
movq 0x8(%r14), %rdi
movq %rax, %rsi
callq 0x53bc
jmp 0x6b99
pushq $0x19
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6be0
leaq 0x1e06(%rip), %rsi      # 0x89de
movq %rbx, %rdi
callq 0x7167
movq %rbx, %rdi
callq 0x70cf
movq 0x8(%r14), %rcx
movq %rax, 0x10(%rcx)
jmp 0x6bf5
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_stmt
struct stmt *parse_stmt(struct parser *p)
{
	struct stmt *s;
	if ((s = parse_block(p)))
		return s;
	if ((s = parse_expr_stmt(p)))
		return s;
	if ((s = parse_cond(p)))
		return s;
	if ((s = parse_loop(p)))
		return s;
	if ((s = parse_jump(p)))
		return s;
	//if (s=parse_declaration(p)) return s;
	if (match(p, t_semic))
		return node_init(node_empty, NULL);

	return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x6b73
testq %rax, %rax
jne 0x6c42
movq %rbx, %rdi
callq 0x6b35
testq %rax, %rax
jne 0x6c42
movq %rbx, %rdi
callq 0x6df5
testq %rax, %rax
jne 0x6c42
movq %rbx, %rdi
callq 0x6c62
testq %rax, %rax
jne 0x6c42
movq %rbx, %rdi
callq 0x6ec6
testq %rax, %rax
je 0x6c44
popq %rbx
retq
pushq $0x2a
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6c5e
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0x5020
xorl %eax, %eax
jmp 0x6c42
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_loop
struct stmt *parse_loop(struct parser *p)
{
	struct token *t;
	struct expr *init, *cond, *iter;
	struct stmt *body;
	if ((t = match(p, t_while))) {
		if (!match(p, t_lparen))
			syntax_error(p, "Missing left parentheses");
		if (!(cond = parse_expr(p)))
			syntax_error(p, "No valid expression");
		if (!match(p, t_rparen))
			syntax_error(p, "Missing right parentheses");
		if (!(body = parse_stmt(p)))
			syntax_error(p,
				     "Missing statement after while expression");
		return loop_init(NULL, cond, NULL, body);
	}
	if ((t = match(p, t_for))) {
		if (!match(p, t_lparen))
			syntax_error(p, "Missing left parentheses");
		init = parse_declaration(p);
		if (!init)
			syntax_error(p,
				     "No valid initializer statement in for loop");
		cond = parse_expr(p);
		if (!match(p, t_semic))
			syntax_error(p,
				     "No valid condition statement in for loop");
		iter = parse_expr(p);
		if (!match(p, t_rparen))
			syntax_error(p, "Missing right parentheses");
		if (!(body = parse_stmt(p)))
			syntax_error(p, "Missing statement");
		return loop_init(init, cond, iter, body);
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x24
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x6d0a
pushq $0x14
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6c9e
leaq 0x1d55(%rip), %rsi      # 0x89eb
movq %rbx, %rdi
callq 0x7167
movq %rbx, %rdi
callq 0x6673
movq %rax, %r14
testq %rax, %rax
jne 0x6cbd
leaq 0x1d4f(%rip), %rsi      # 0x8a04
movq %rbx, %rdi
callq 0x7167
pushq $0x15
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6cdc
leaq 0x1be6(%rip), %rsi      # 0x88ba
movq %rbx, %rdi
callq 0x7167
movq %rbx, %rdi
callq 0x6c00
movq %rax, %r15
testq %rax, %rax
jne 0x6cfb
leaq 0x1d25(%rip), %rsi      # 0x8a18
movq %rbx, %rdi
callq 0x7167
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
jmp 0x6ddb
pushq $0x25
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6de9
pushq $0x14
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6d3d
leaq 0x1cb6(%rip), %rsi      # 0x89eb
movq %rbx, %rdi
callq 0x7167
movq %rbx, %rdi
callq 0x5866
movq %rax, %r14
testq %rax, %rax
jne 0x6d5c
leaq 0x1ced(%rip), %rsi      # 0x8a41
movq %rbx, %rdi
callq 0x7167
movq %rbx, %rdi
callq 0x6673
movq %rax, %r15
pushq $0x2a
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6d86
leaq 0x1cee(%rip), %rsi      # 0x8a6c
movq %rbx, %rdi
callq 0x7167
movq %rbx, %rdi
callq 0x6673
movq %rax, %r12
pushq $0x15
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6db0
leaq 0x1b12(%rip), %rsi      # 0x88ba
movq %rbx, %rdi
callq 0x7167
movq %rbx, %rdi
callq 0x6c00
movq %rax, %r13
testq %rax, %rax
jne 0x6dcf
leaq 0x1cce(%rip), %rsi      # 0x8a95
movq %rbx, %rdi
callq 0x7167
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x5281
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_cond
struct stmt *parse_cond(struct parser *p)
{
	struct expr *c;
	struct token *tif;
	if ((tif = match(p, t_if)) && match(p, t_lparen)) {
		if (!(c = parse_expr(p)))
			syntax_error(p, "Expected expression after '('");
		if (match(p, t_rparen)) {
			struct stmt *s, *s2;
			if ((s = parse_stmt(p))) {
				if (match(p, t_else)) {
					if ((s2 = parse_stmt(p)))
						return cond_init(c, s, s2);
				}
				return cond_init(c, s, NULL);
			}
			syntax_error(p, "No valid statement following if");
		}
		syntax_error(p, "Missing right parentheses");
	} else if (tif) {
		syntax_error(p, "Missing left parentheses");
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1a
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x6ebe
pushq $0x14
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6e85
movq %rbx, %rdi
callq 0x6673
movq %rax, %r14
testq %rax, %rax
jne 0x6e3d
leaq 0x1c72(%rip), %rsi      # 0x8aa7
movq %rbx, %rdi
callq 0x7167
pushq $0x15
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6eaf
movq %rbx, %rdi
callq 0x6c00
testq %rax, %rax
je 0x6ea0
movq %rax, %r15
pushq $0x1b
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6e8e
movq %rbx, %rdi
callq 0x6c00
testq %rax, %rax
je 0x6e8e
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
jmp 0x6e96
leaq 0x1b5f(%rip), %rsi      # 0x89eb
jmp 0x6eb6
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x52c2
leaq 0x1c1e(%rip), %rsi      # 0x8ac5
movq %rbx, %rdi
callq 0x7167
leaq 0x1a04(%rip), %rsi      # 0x88ba
movq %rbx, %rdi
callq 0x7167
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_jump
struct stmt *parse_jump(struct parser *p)
{
	struct token *t;
	if ((t=match(p, t_break)) && match(p, t_semic)) return node_init(node_break, NULL);
	else if (t) syntax_error(p, "Missing semicolon after break");

	if ((t=match(p, t_continue)) && match(p, t_semic)) return node_init(node_continue, NULL);
	else if (t) syntax_error(p, "Missing semicolon after continue");

	struct expr *e;
	if (match(p, t_return)) {
		e = parse_expr(p);
		if (!match(p, t_semic)) syntax_error(p, "Missing semicolon after return");
		return node_init(node_return, e);
	}
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x26
popq %rsi
callq 0x7116
testq %rax, %rax
je 0x6efd
pushq $0x2a
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6eee
pushq $0xd
jmp 0x6f1f
leaq 0x1bf0(%rip), %rsi      # 0x8ae5
movq %rbx, %rdi
callq 0x7167
pushq $0x27
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6f33
pushq $0x2a
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6f24
pushq $0xe
popq %rdi
xorl %esi, %esi
jmp 0x6f73
leaq 0x1bd8(%rip), %rsi      # 0x8b03
movq %rbx, %rdi
callq 0x7167
pushq $0x28
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
je 0x6f7f
movq %rbx, %rdi
callq 0x6673
movq %rax, %r14
pushq $0x2a
popq %rsi
movq %rbx, %rdi
callq 0x7116
testq %rax, %rax
jne 0x6f6d
leaq 0x1bbf(%rip), %rsi      # 0x8b24
movq %rbx, %rdi
callq 0x7167
pushq $0xf
popq %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5020
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/parser.c
// Function: parse_unit
struct node *parse_unit(struct parser *p)
{
	struct node *unit=NULL;
	struct stmt *s;
	while ((s=parse_function(p))) {
		if (!unit) unit = unit_init();
		unit_add(UNIT(unit), s);
	}
	return unit;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x5952
testq %rax, %rax
je 0x6fc1
movq %rax, %r15
testq %r14, %r14
jne 0x6fb3
xorl %eax, %eax
callq 0x521c
movq %rax, %r14
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x5239
jmp 0x6f94
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/pcommon.c
// Function: parser_init
struct parser *parser_init(struct token **tlist, int num_tokens)
{
	struct parser *p = malloc(sizeof(struct parser));

	p->scope_stk = NULL, p->num_stk = 0;
	push_scope(p);
	p->toks = tlist, p->len = num_tokens;
	p->cur = 0;

	return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x20f0
movq %rax, %r15
andq $0x0, (%rax)
andl $0x0, 0x8(%rax)
movq %rax, %rdi
callq 0x7007
movq %r14, 0x10(%r15)
movl %ebx, 0x1c(%r15)
andl $0x0, 0x18(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/pcommon.c
// Function: push_scope
void push_scope(struct parser *p)
{
	struct symbol_table *top = get_scope(p);
	p->num_stk++;
	if (!p->scope_stk)
		p->scope_stk = malloc(sizeof(struct symbol_table *));
	else
		p->scope_stk =
		    realloc(p->scope_stk,
			    sizeof(struct symbol_table *) * p->num_stk);
	p->scope_stk[p->num_stk - 1] = symbol_table_init(top);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x8(%rdi), %rax
movq (%rdi), %rdi
testq %rax, %rax
je 0x702f
movq -0x8(%rdi,%rax,8), %r14
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
leaq 0x8(,%rax,8), %rsi
jmp 0x7041
movl $0x1, 0x8(%rbx)
testq %rdi, %rdi
je 0x7065
pushq $0x8
popq %rsi
xorl %r14d, %r14d
callq 0x2100
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x71c4
movq (%rbx), %rcx
movslq 0x8(%rbx), %rdx
movq %rax, -0x8(%rcx,%rdx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x8
popq %rdi
callq 0x20f0
xorl %r14d, %r14d
jmp 0x7046
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/pcommon.c
// Function: parser_free
void parser_free(struct parser *p)
{
	for (int i = 0; i < p->len; i++) {
		free(p->toks[i]->tok);
		free(p->toks[i]);
	}
	symbol_table_free(pop_scope(p));
	free(p->toks);
	free(p);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x1c(%rbx), %rax
cmpq %rax, %r14
jge 0x70a7
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rdi
callq 0x2030
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x707c
movq %rbx, %rdi
callq 0x70cf
movq %rax, %rdi
callq 0x71ee
movq 0x10(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/pcommon.c
// Function: pop_scope
struct symbol_table *pop_scope(struct parser *p)
{
	if (!p->num_stk)
		return NULL;
	struct symbol_table *s = p->scope_stk[p->num_stk - 1];
	p->num_stk--;
	if (!p->num_stk) {
		free(p->scope_stk);
		p->scope_stk = NULL;
	} else {
		p->scope_stk =
		    realloc(p->scope_stk,
			    sizeof(struct symbol_table *) * p->num_stk);
	}
	return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq 0x8(%rdi), %rax
testq %rax, %rax
je 0x70fd
movq %rdi, %r14
movq (%rdi), %rdi
movq -0x8(%rdi,%rax,8), %rbx
decl %eax
movl %eax, 0x8(%r14)
je 0x7101
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x2100
jmp 0x7108
xorl %ebx, %ebx
jmp 0x710b
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/frontend/pcommon.c
// Function: syntax_error
void syntax_error(struct parser *p, const char *msg)
{
	if (p->cur >= p->len)
		p->cur = p->len - 1;
	struct token *t = p->toks[p->cur];
	fprintf(stderr, "\n(%d,%d): error \"%s\" Near Token %s\n", t->col,
		t->line, msg, t->tok);
	exit(1);
}

// Assembly:
movq %rsi, %r8
movl 0x18(%rdi), %eax
movl 0x1c(%rdi), %ecx
cmpl %ecx, %eax
jl 0x717b
decl %ecx
movl %ecx, 0x18(%rdi)
movl %ecx, %eax
pushq %rax
movq 0x10(%rdi), %rcx
cltq
movq (%rcx,%rax,8), %rax
movq 0x5e6b(%rip), %rcx      # 0xcff8
movq (%rcx), %rdi
movl 0x8(%rax), %edx
movl 0xc(%rax), %ecx
movq (%rax), %r9
leaq 0x19a3(%rip), %rsi      # 0x8b43
xorl %eax, %eax
callq 0x20c0
pushq $0x1
popq %rdi
callq 0x2110
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/symbols.c
// Function: symbol_table_init
struct symbol_table *symbol_table_init(struct symbol_table *parent)
{
	struct symbol_table *table = malloc(sizeof(struct symbol_table));

	table->parent = parent;
	table->syms = NULL, table->num_syms = 0;
	table->fp = parent ? parent->fp : 0;

	return table;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x20f0
movq %rbx, 0x18(%rax)
andq $0x0, 0x10(%rax)
andl $0x0, 0x8(%rax)
testq %rbx, %rbx
je 0x71e7
movq (%rbx), %rcx
jmp 0x71e9
xorl %ecx, %ecx
movq %rcx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/symbols.c
// Function: symbol_table_free
void symbol_table_free(struct symbol_table *scope)
{
	if (!scope)
		return;

	for (int i = 0; i < scope->num_syms; i++) {
		free(scope->syms[i]->identifier);
		free(scope->syms[i]);
	}
	free(scope->syms);
	free(scope);
}

// Assembly:
testq %rdi, %rdi
je 0x723d
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
cmpq %rax, %r14
jge 0x7229
movq (%rdi,%r14,8), %rax
movq 0x10(%rax), %rdi
callq 0x2030
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x71fd
callq 0x2030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/symbols.c
// Function: get_symbol
struct symbol *get_symbol(struct symbol_table *scope, const char *ident)
{
	struct symbol_table *p = scope;
	struct symbol *sym = NULL;
	while (p && !sym) {
		for (int i = 0; i < p->num_syms; i++) {
			if (!strcmp(p->syms[i]->identifier, ident)) {
				sym = p->syms[i];
				break;
			}
		}
		p = p->parent;
	}

	return sym;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
xorl %r15d, %r15d
testq %r14, %r14
je 0x7297
testq %r15, %r15
jne 0x7297
movl 0x8(%r14), %r13d
testl %r13d, %r13d
cmovlel %r12d, %r13d
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x728e
movq 0x10(%r14), %rax
movq (%rax,%rbp,8), %r15
movq 0x10(%r15), %rdi
movq %rbx, %rsi
callq 0x20b0
incq %rbp
testl %eax, %eax
jne 0x726c
jmp 0x7291
xorl %r15d, %r15d
movq 0x18(%r14), %r14
jmp 0x7255
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/symbols.c
// Function: set_type
void set_type(struct symbol_table *scope, char *ident, struct type *type)
{
	scope->num_syms++;
	if (!scope->syms)
		scope->syms = malloc(sizeof(struct symbol *));
	else
		scope->syms =
		    realloc(scope->syms,
			    sizeof(struct symbol *) * scope->num_syms);
	struct symbol *s = malloc(sizeof(struct symbol));

	s->offset = 0;
	int len = strlen(ident);
	s->identifier = malloc(len+1);
	memcpy(s->identifier, ident, len);
	s->identifier[len] = 0;
     	s->type = type;
	s->size = resolve_size(type);
	scope->syms[scope->num_syms - 1] = s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movslq 0x8(%rdi), %rsi
incq %rsi
movl %esi, 0x8(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x72fb
shlq $0x3, %rsi
callq 0x2100
jmp 0x7303
pushq $0x8
popq %rdi
callq 0x20f0
movq %rax, 0x10(%rbx)
pushq $0x20
popq %rdi
callq 0x20f0
movq %rax, %r12
andq $0x0, (%rax)
movq %r15, %rdi
callq 0x2070
movq %rax, %r13
incl %eax
movslq %eax, %rdi
callq 0x20f0
movq %rax, %rbp
movq %rax, 0x10(%r12)
movslq %r13d, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x20e0
movb $0x0, (%rbp,%r13)
movq %r14, 0x18(%r12)
movq %r14, %rdi
callq 0x7583
cltq
movq %rax, 0x8(%r12)
movq 0x10(%rbx), %rax
movslq 0x8(%rbx), %rcx
movq %r12, -0x8(%rax,%rcx,8)
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/frontend/symbols.c
// Function: alloc_type
unsigned alloc_type(struct symbol_table *scope, char *ident)
{
	struct symbol *sym = get_symbol(scope, ident);
	if (!sym) return 0;
	/*If parent's frame pointer is greater than the current frame pointer, update it*/
	if (scope->parent && scope->parent->fp > scope->fp)
		scope->fp = scope->parent->fp;
	/*For now, default to integer*/
	scope->fp += sym->size;
	sym->offset = scope->fp;
	return sym->offset;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x723e
testq %rax, %rax
je 0x73ad
movq %rax, %rcx
movq (%rbx), %rax
movq 0x18(%rbx), %rdx
testq %rdx, %rdx
je 0x73a1
movq (%rdx), %rdx
cmpq %rax, %rdx
cmovaq %rdx, %rax
addq 0x8(%rcx), %rax
movq %rax, (%rbx)
movq %rax, (%rcx)
jmp 0x73af
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/types.c
// Function: type_init
struct type *type_init(enum info_type node_type)
{
	struct type *t = malloc(sizeof(struct type));
	t->type = node_type;
	t->next = NULL;
	return t;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
pushq $0x28
popq %rdi
callq 0x20f0
movl %ebx, 0x18(%rax)
andq $0x0, 0x20(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/types.c
// Function: types_merge
struct type *types_merge(struct type *t1, struct type *t2)
{
	struct type *t3 = t1 ? t1 : t2;
	if (t1) {
		while (t1->next)
			t1 = t1->next;
		t1->next = t2;
	}
	return t3;
}

// Assembly:
testq %rdi, %rdi
je 0x73f9
movq %rdi, %rax
movq %rdi, %rdx
movq %rdx, %rcx
movq 0x20(%rdx), %rdx
testq %rdx, %rdx
jne 0x73e8
movq %rsi, 0x20(%rcx)
retq
movq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/types.c
// Function: type_free
void type_free(struct type *head)
{
	if (!head)
		return;
	type_free(head->next);
	if (head->type == type_fcn) {
		for (int i = 0; i < head->info.fcn.paramc; i++) {
			free(head->info.fcn.paramv[i]);
			type_free(head->info.fcn.paramt[i]);
		}
		free(head->info.fcn.paramv);
		free(head->info.fcn.paramt);
	}
	free(head);
}

// Assembly:
testq %rdi, %rdi
je 0x7442
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x73fd
cmpl $0x3, 0x18(%rbx)
jne 0x7451
xorl %r14d, %r14d
movslq (%rbx), %rax
movq 0x8(%rbx), %rdi
cmpq %rax, %r14
jge 0x7443
movq (%rdi,%r14,8), %rdi
callq 0x2030
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x73fd
incq %r14
jmp 0x741b
retq
callq 0x2030
movq 0x10(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/types.c
// Function: type_copy
struct type *type_copy(struct type *top)
{
	if (!top) return NULL;
	struct type *cpy = type_init(top->type);
	memcpy(&cpy->info, &top->info, sizeof(top->info));
	if (top->type == type_fcn) {
		struct func_type fcn = top->info.fcn;
		char **paramv  = malloc(sizeof(char*)*fcn.paramc);
		struct type **paramt = malloc(sizeof(struct type*)*fcn.paramc);
		for (int i = 0; i < fcn.paramc; i++) {
			int slen = strlen(fcn.paramv[i]);
			char *np = malloc(slen+1);
			memcpy(np, fcn.paramv[i], slen);
			np[slen] = 0;
			paramv[i] = np;
			paramt[i] = type_copy(fcn.paramt[i]);
		}
		cpy->info.fcn.paramv = paramv;
		cpy->info.fcn.paramt = paramt;
	}
	if (top->next) cpy->next = type_copy(top->next);
	return cpy;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x7545
movq %rdi, %r14
movl 0x18(%rdi), %edi
callq 0x73c8
movq %rax, %rbx
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movups (%r14), %xmm0
movups %xmm0, (%rbx)
cmpl $0x3, 0x18(%r14)
jne 0x755f
movq %rbx, 0x10(%rsp)
movslq (%r14), %rbx
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
movq %r14, 0x8(%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x18(%rsp)
movq %rbx, %r12
shlq $0x3, %r12
movq %r12, %rdi
callq 0x20f0
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x20f0
movq %rax, %r12
xorl %r14d, %r14d
testl %ebx, %ebx
movl $0x0, %r15d
cmovgl %ebx, %r15d
cmpq %r14, %r15
je 0x7549
movq 0x20(%rsp), %rax
movq (%rax,%r14,8), %r13
movq %r13, %rdi
callq 0x2070
movq %rax, %rbp
incl %eax
movslq %eax, %rdi
callq 0x20f0
movq %rax, %rbx
movslq %ebp, %rbp
movq %rax, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x20e0
movb $0x0, (%rbx,%rbp)
movq (%rsp), %rax
movq %rbx, (%rax,%r14,8)
movq 0x18(%rsp), %rax
movq (%rax,%r14,8), %rdi
callq 0x7460
movq %rax, (%r12,%r14,8)
incq %r14
jmp 0x74eb
xorl %ebx, %ebx
jmp 0x7571
movq 0x10(%rsp), %rbx
movq (%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movq 0x8(%rsp), %r14
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x7571
callq 0x7460
movq %rax, 0x20(%rbx)
movq %rbx, %rax
addq $0x28, %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/frontend/types.c
// Function: resolve_size
int resolve_size(struct type *type)
{
	struct type *head = type;
	int m = 1;
	while (head) {
		if (head->type == type_ptr) return PTR_SIZE*m;
		if (head->type == type_datatype) {
			switch (head->info.data_type) {
				case type_int: return INT_TYPE_SIZE*m;
				case type_char: return CHAR_TYPE_SIZE*m;
				default: break;
			}
		}
		if (head->type == type_array) m = m * head->info.elem;
		head = head->next;
	}
	/*Default to integer*/
	printf("Error resolving size of type: ");
	print_type(type);
	printf("\n");
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movq %rdi, %rax
testq %rax, %rax
je 0x75b8
movl 0x18(%rax), %ecx
testl %ecx, %ecx
je 0x75a6
cmpl $0x2, %ecx
jne 0x75ad
imull (%rax), %ebx
jmp 0x75b2
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x75dd
cmpl $0x1, %ecx
je 0x75da
movq 0x20(%rax), %rax
jmp 0x7590
leaq 0x15f6(%rip), %rdi      # 0x8bb5
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2080
movq %r14, %rdi
callq 0x75e7
pushq $0xa
popq %rdi
callq 0x2040
jmp 0x75dd
shll $0x2, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/types.c
// Function: print_type
void print_type(struct type *head)
{
	if (!head)
		return;
	switch (head->type) {
	case type_datatype:
		printf("%s", data_type_str[head->info.data_type]);
		print_type(head->next);
		break;
	case type_ptr:
		printf("ptr(");
		print_type(head->next);
		printf(")");
		break;
	case type_array:
		printf("arr(");
		print_type(head->next);
		printf(", %d)", head->info.elem);
		break;
	case type_fcn:
		printf("fcn( ");
		for (int i = 0; i < head->info.fcn.paramc; i++) {
			printf("%s: ", head->info.fcn.paramv[i]);
			print_type(head->info.fcn.paramt[i]);
			if ((i + 1) < head->info.fcn.paramc)
				printf(", ");
		}
		printf(") -> ");
		print_type(head->next);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x156c(%rip), %r14      # 0x8b68
leaq 0xbc6(%rip), %r12       # 0x81c9
leaq 0xb81(%rip), %r13       # 0x818b
leaq 0x15d9(%rip), %rbp      # 0x8bea
testq %rbx, %rbx
je 0x76af
movl 0x18(%rbx), %eax
cmpq $0x3, %rax
ja 0x76af
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movl (%rbx), %eax
leaq 0x5f77(%rip), %rcx      # 0xd5b0
movq (%rcx,%rax,8), %rsi
leaq 0xb39(%rip), %rdi       # 0x817d
xorl %eax, %eax
callq 0x2080
jmp 0x76a6
leaq 0x1590(%rip), %rdi      # 0x8be4
xorl %eax, %eax
callq 0x2080
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0x769c
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x2080
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x75e7
leal 0x1(%r15), %eax
cmpl %eax, (%rbx)
jle 0x7697
movq %r13, %rdi
xorl %eax, %eax
callq 0x2080
incq %r15
jmp 0x765e
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2080
movq 0x20(%rbx), %rbx
jmp 0x7611
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1514(%rip), %rdi      # 0x8bd9
xorl %eax, %eax
callq 0x2080
movq 0x20(%rbx), %rdi
callq 0x75e7
movl (%rbx), %esi
leaq 0x1500(%rip), %rdi      # 0x8bde
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2080
leaq 0x14da(%rip), %rdi      # 0x8bd4
xorl %eax, %eax
callq 0x2080
movq 0x20(%rbx), %rdi
callq 0x75e7
pushq $0x29
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O2/Mithreindeir[P]ewcc/src/frontend/types.c
// Function: cmp_types
int cmp_types(struct type *a, struct type *b)
{
	if (!a || !b)
		return 0;
	if (a->next && b->next)
		return cmp_types(a->next, b->next);
	if ((!a->next && b->next) || (b->next && !a->next))
		return 0;
	if (a->type != b->type)
		return 0;
	if (a->type == type_datatype
	    && a->info.data_type != b->info.data_type)
		return 0;
	return 1;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x774b
movq %rsi, %rcx
testq %rsi, %rsi
je 0x774b
movq %rdi, %rdx
movq 0x20(%rdi), %rdi
movq 0x20(%rcx), %rsi
testq %rdi, %rdi
je 0x7746
testq %rsi, %rsi
jne 0x7722
jmp 0x774c
testq %rsi, %rsi
je 0x774c
retq
movl 0x18(%rdx), %esi
cmpl 0x18(%rcx), %esi
jne 0x774b
testl %esi, %esi
jne 0x775e
movl (%rdx), %edx
cmpl (%rcx), %edx
jne 0x774b
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/counter_example_2_pthread/code02.c
// Function: f
void* f()
{
    for(int n = 0; n < 1000; ++n) {
        atomic_fetch_add_explicit(&acnt, 1, memory_order_relaxed); // atomic
        ++cnt; // undefined behavior, in practice some updates missed
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x3e8, %ecx            # imm = 0x3E8
movl 0x2edd(%rip), %eax      # 0x4048
subl $0x1, %ecx
jb 0x1179
lock
incl 0x2ecd(%rip)            # 0x4044
jmp 0x116b
addl $0x3e8, %eax            # imm = 0x3E8
movl %eax, 0x2ec4(%rip)      # 0x4048
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/counter_example_2_pthread/code02.c
// Function: main
int main(void)
{
    pthread_t thr[10];
    for(int n = 0; n < 10; ++n)
        pthread_create(&thr[n], NULL, f, NULL);
    for(int n = 0; n < 10; ++n)
        pthread_join(thr[n], NULL);
 
    printf("The atomic counter is %u\n", acnt);
    printf("The non-atomic counter is %u\n", cnt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
xorl %r14d, %r14d
leaq -0x41(%rip), %rbx       # 0x115c
cmpq $0x50, %r14
je 0x11bd
leaq (%r14,%rbp), %rdi
addq $-0x60, %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x1040
addq $0x8, %r14
jmp 0x119d
xorl %ebx, %ebx
cmpq $0xa, %rbx
je 0x11d6
movq -0x60(%rbp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1050
incq %rbx
jmp 0x11bf
movl 0x2e68(%rip), %esi      # 0x4044
leaq 0xe21(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1030
movl 0x2e58(%rip), %esi      # 0x4048
leaq 0xe27(%rip), %rdi       # 0x201e
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq