LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/wenleix[P]EdgePPR/src/ParamGraph.cpp
// Function: ParamGraph::SetWeight(double*)
void ParamGraph::SetWeight(double param[7]) {
	for (int i = 0; i < numVertex; i++) {
		ParamVertex *v = GetVertex(i);
		for (int j = 0; j < v->outDeg; j++) {
			ParamEdge *e = &(v->outEdge[j]);
			int etype = e->GetIntEType();
			e->weight = param[etype] / v->outEdgeTypeCount[etype];
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
movslq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorl %edx, %edx
movabsq $0x8, %rdi
cmpq %rax, %rdx
jge 0x2ffb
imulq $0x60, %rdx, %r9
leaq (%rcx,%r9), %r8
movslq 0x30(%rcx,%r9), %r9
movq %rdi, %r10
xorl %r11d, %r11d
cmpq %r9, %r11
jge 0x2ff6
movq 0x38(%r8), %rbx
movslq -0x4(%rbx,%r10), %r14
movsd (%rsi,%r14,8), %xmm0
cvtsi2sdl 0x40(%r8,%r14,4), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%r10)
incq %r11
addq $0x10, %r10
jmp 0x2fc8
incq %rdx
jmp 0x2fb0
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wenleix[P]EdgePPR/src/PPRCommon.cpp
// Function: WriteVector(double*, int, char*, char*)
void WriteVector(double *pprValue, int size, char* filename, char* suffix) {
	char fullname[1000];
	sprintf(fullname, "%s.%s", filename, suffix);

	if (strcmp(suffix, "txt") == 0) {
		FILE *f = fopen(fullname, "w");
		fprintf(f, "%d\n", size);
		for (int i = 0; i < size; i++)
			fprintf(f, "%.8lf\n", pprValue[i]);
		fclose(f);
	} else if (strcmp(suffix, "bin") == 0) {
		FILE *f = fopen(fullname, "wb");
		fwrite(&size, sizeof(int), 1, f);
		fwrite(pprValue, sizeof(double), size, f);
		fclose(f);
	} else {
		assert(false);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rcx, %r15
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
leaq 0x1c4b(%rip), %rsi      # 0x54cc
xorl %r13d, %r13d
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x2050
leaq 0x1856(%rip), %rsi      # 0x50ed
movq %r15, %rdi
callq 0x21e0
testl %eax, %eax
je 0x390d
leaq 0x183f(%rip), %rsi      # 0x50e9
movq %r15, %rdi
callq 0x21e0
testl %eax, %eax
jne 0x3960
leaq 0x1cc1(%rip), %rsi      # 0x5582
leaq 0x10(%rsp), %rdi
callq 0x21a0
movq %rax, %r15
leaq 0xc(%rsp), %r14
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rax, %rcx
callq 0x22a0
movslq (%r14), %rdx
pushq $0x8
popq %rsi
movq %rbx, %rdi
movq %r15, %rcx
callq 0x22a0
movq %r15, %rdi
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2140
leaq 0x1c65(%rip), %rsi      # 0x5579
leaq 0x10(%rsp), %rdi
callq 0x21a0
movq %rax, %r15
leaq 0x1b50(%rip), %rsi      # 0x5478
movq %rax, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x21f0
testl %r14d, %r14d
cmovlel %r13d, %r14d
leaq 0x1c38(%rip), %r12      # 0x557b
cmpq %r13, %r14
je 0x38f5
movsd (%rbx,%r13,8), %xmm0
movq %r15, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x21f0
incq %r13
jmp 0x3943
leaq 0x1c0c(%rip), %rdi      # 0x5573
leaq 0x1b86(%rip), %rsi      # 0x54f4
leaq 0x1c10(%rip), %rcx      # 0x5585
movl $0xc5, %edx
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O2/wenleix[P]EdgePPR/src/PPRCommon.cpp
// Function: L1(double*, double*, int)
double L1(double *trueprv, double *estprv, int n) {
	double diff = 0.0, sum = 0.0;
	for (int i = 0; i < n; i++) {
		diff += fabs(trueprv[i] - estprv[i]);
		sum += trueprv[i];
	}

	return diff / sum;
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
xorpd %xmm0, %xmm0
movapd 0x1a5e(%rip), %xmm1     # 0x53f0
xorpd %xmm2, %xmm2
cmpq %rax, %rdx
je 0x39ba
movsd (%rdi,%rax,8), %xmm3
movapd %xmm3, %xmm4
subsd (%rsi,%rax,8), %xmm4
addsd %xmm3, %xmm2
andpd %xmm1, %xmm4
addsd %xmm4, %xmm0
incq %rax
jmp 0x3996
divsd %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::inc_blk()
void inc_blk()
{
	if (create)
	{
		blk_id++;
		var_stack.push_back(var_table_t());
	}
	create = true;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
cmpb $0x1, 0x1fd92(%rip)     # 0x2e2bc
jne 0xe575
incl 0x1feae(%rip)           # 0x2e3e0
leaq 0x38(%rsp), %rax
andq $0x0, -0x10(%rax)
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x1fe0f(%rip), %rdi     # 0x2e370
leaq 0x8(%rsp), %rsi
callq 0xf270
leaq 0x8(%rsp), %rdi
callq 0xed28
movb $0x1, 0x1fd40(%rip)     # 0x2e2bc
addq $0x40, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xed28
movq %rbx, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: yyerror(char const*, int)
void yyerror(const char *msg, int lineno)
{
	has_err = true;
	++err_cnt;
	if (err_cnt > err_max)
	{
		fprintf(stderr, "Too many errors, aborted.\n");
		exit(1);
	}
	fprintf(stderr, "error happens near line %d: %s\n", lineno, msg);
}

// Assembly:
movl %esi, %edx
leaq 0x26a27(%rip), %rax     # 0x2e3f8
movb $0x1, (%rax)
movl 0x2696e(%rip), %esi     # 0x2e348
leal 0x1(%rsi), %eax
movl %eax, 0x26965(%rip)     # 0x2e348
movq 0x265ee(%rip), %rax     # 0x2dfd8
movq (%rax), %rax
cmpl $0x28, %esi
jge 0x7a06
movq %rdi, %rcx
leaq 0x16ea8(%rip), %rsi     # 0x1e8a4
movq %rax, %rdi
xorl %eax, %eax
jmp 0x53a0
pushq %rax
leaq 0x16e7b(%rip), %rdi     # 0x1e889
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0x5520
pushq $0x1
popq %rdi
callq 0x52f0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::str2op(char const*)
op_t str2op(const char *s)
{
	switch (s[0])
	{
	case '+': return ADD;
	case '-': return SUB;
	case '*': return MUL;
	case '/': return DIV;
	case '%': return MOD;
	case '&': return AND;
	case '|': return OR;
	case '<':
		if (s[1] == '=')
			return LE;
		return L;
	case '>':
		if (s[1] == '=')
			return GE;
		return G;
	case '!':
		if (s[1] == '=')
			return NE;
		return NOT;
	default: return NONE;
	}
}

// Assembly:
movzbl (%rdi), %eax
leal -0x21(%rax), %ecx
cmpl $0xe, %ecx
ja 0x7a6b
leaq 0x16c14(%rip), %rax     # 0x1e668
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpb $0x3d, 0x1(%rdi)
pushq $0x2
popq %rcx
pushq $0xf
popq %rax
cmovel %ecx, %eax
retq
cmpl $0x3c, %eax
je 0x7aaa
cmpl $0x3e, %eax
je 0x7a99
cmpl $0x7c, %eax
jne 0x7a7e
pushq $0xe
jmp 0x7a97
xorl %eax, %eax
retq
pushq $0xd
jmp 0x7a97
pushq $0xc
jmp 0x7a97
pushq $0xb
jmp 0x7a97
pushq $0x8
jmp 0x7a97
pushq $0xa
jmp 0x7a97
pushq $0x7
popq %rax
retq
xorl %eax, %eax
cmpb $0x3d, 0x1(%rdi)
setne %al
leal 0x3(,%rax,2), %eax
retq
xorl %eax, %eax
cmpb $0x3d, 0x1(%rdi)
setne %al
leal 0x4(,%rax,2), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::str2num(char const*, int)
int str2num(const char *s, int base)
{
	int len = strlen(s);
	int val = 0;
	for (int i = 0; i < len; i++)
	{
		if (s[i] >= '0' && s[i] <= '9')
			val = val * base + (s[i] - '0');
		else if (s[i] >= 'a' && s[i] <= 'f')
			val = val * base + (s[i] - 'a') + 10;
		else if (s[i] >= 'A' && s[i] <= 'F')
			val = val * base + (s[i] - 'A') + 10;
		else
			return -1;
	}
	return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x5110
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
pushq $-0x1
popq %rsi
xorl %ecx, %ecx
cmpq %rdx, %rax
je 0x7b55
movb (%r14,%rdx), %dil
leal -0x30(%rdi), %r8d
cmpb $0x9, %r8b
ja 0x7b25
imull %ebx, %ecx
movzbl %r8b, %edi
addl %edi, %ecx
jmp 0x7b4e
leal -0x61(%rdi), %r8d
cmpb $0x5, %r8b
ja 0x7b38
imull %ebx, %ecx
movzbl %r8b, %edi
jmp 0x7b49
addb $-0x41, %dil
cmpb $0x5, %dil
ja 0x7b53
imull %ebx, %ecx
movzbl %dil, %edi
addl %edi, %ecx
addl $0xa, %ecx
incq %rdx
jmp 0x7b07
movl %esi, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::vardef_node::set_shape(sysY_AST::exp_node*)
void vardef_node::set_shape(exp_node *first_dim)
{
	size = 1;
	if (is_pt)
		dim.push_back(0);
	while (first_dim)
	{
		first_dim->reduce();
		size_t temp = first_dim->num;
		if (first_dim->exp_type != EXP_NUM || first_dim->num <= 0)
		{
			yyerror("array size in delaration must be a positive constant int");
			temp = 1;
		}
		size *= temp;
		dim.push_back(temp);
		first_dim = first_dim->next;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, 0xa4(%rdi)
cmpb $0x1, 0xa0(%rdi)
jne 0x7ea3
leaq 0x70(%r14), %rdi
leaq 0x4(%rsp), %rsi
andl $0x0, (%rsi)
callq 0xcf9a
leaq 0x70(%r14), %r15
leaq 0x16a43(%rip), %r12     # 0x1e8f1
pushq $0x1
popq %rbp
movq %rsp, %r13
testq %rbx, %rbx
je 0x7f0d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpl $0x2, 0x98(%rbx)
jne 0x7ed5
movl 0x94(%rbx), %eax
testl %eax, %eax
jg 0x7ee8
leaq 0x263dc(%rip), %rax     # 0x2e2b8
movl (%rax), %esi
movq %r12, %rdi
callq 0x79c8
movl %ebp, %eax
movl 0xa4(%r14), %ecx
imull %eax, %ecx
movl %ecx, 0xa4(%r14)
movl %eax, (%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xcf9a
movq 0x40(%rbx), %rbx
jmp 0x7eb4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::gen_vardecl[abi:cxx11](sysY_AST::var_entry const&, bool)
static string gen_vardecl(const var_entry &var, bool indent)
{
	string prefix = indent ? "\t" : "";
	if (var.is_param) // parameters
		return "";
	if (!var.is_array) // variable
		return prefix + "var " + var.eeyore_name + "\n";
	else // array
	{
		auto size = std::accumulate(
			var.dim.begin(), var.dim.end(), int_size, std::multiplies<int>());
		return prefix + "var " + to_string(size) + " " + var.eeyore_name + "\n";
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x171bc(%rip), %rax     # 0x1f91b
leaq 0x171b6(%rip), %rsi     # 0x1f91c
testl %edx, %edx
cmovneq %rax, %rsi
leaq 0x40(%rsp), %rdi
movq %rsp, %rdx
callq 0x68d2
cmpb $0x1, 0x42(%r14)
jne 0x8797
leaq 0x17195(%rip), %rsi     # 0x1f91c
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x68d2
jmp 0x88b1
cmpb $0x0, 0x40(%r14)
je 0x87b7
movq 0x48(%r14), %rax
movq 0x50(%r14), %rcx
pushq $0x4
popq %rbp
cmpq %rcx, %rax
je 0x8801
imull (%rax), %ebp
addq $0x4, %rax
jmp 0x87a9
leaq 0x16483(%rip), %rdx     # 0x1ec41
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc9ad
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
movq %r14, %rdx
callq 0xc64c
leaq 0x161f8(%rip), %rdx     # 0x1e9dc
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xc579
movq %rsp, %rdi
callq 0x5548
leaq 0x20(%rsp), %rdi
jmp 0x88ac
leaq 0x16439(%rip), %rdx     # 0x1ec41
leaq 0x80(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc9ad
leaq 0x60(%rsp), %rdi
movl %ebp, %esi
callq 0xc6d2
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0xc66b
leaq 0x1631f(%rip), %rdx     # 0x1eb66
leaq 0x20(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xc579
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
movq %r14, %rdx
callq 0xc64c
leaq 0x1616c(%rip), %rdx     # 0x1e9dc
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xc579
movq %rsp, %rdi
callq 0x5548
leaq 0x20(%rsp), %rdi
callq 0x5548
leaq 0xa0(%rsp), %rdi
callq 0x5548
leaq 0x60(%rsp), %rdi
callq 0x5548
leaq 0x80(%rsp), %rdi
callq 0x5548
leaq 0x40(%rsp), %rdi
callq 0x5548
movq %rbx, %rax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
jmp 0x88da
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5548
jmp 0x88e9
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x5548
jmp 0x88fb
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x5548
jmp 0x8917
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
jmp 0x8924
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x8929
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5548
jmp 0x8937
jmp 0x8934
jmp 0x8934
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5548
movq %rbx, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::funcdef_node::funcdef_node(char const*, sysY_AST::data_t, sysY_AST::node_basic*)
funcdef_node::funcdef_node(
	const char *_name, data_t _ret_type, node_basic *_blk)
{
	blk = _blk;
	name = string(_name);
	dbg_printf("def a func named %s\n", _name);
	ret_type = _ret_type;
	add_ret(blk != nullptr);
	gen_code();
	temp_id = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x28(%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
xorl %eax, %eax
movb %al, 0x28(%rdi)
leaq 0x2593f(%rip), %rdx     # 0x2e2b8
movl (%rdx), %edx
movl %edx, 0x38(%rdi)
leaq 0x24a8b(%rip), %rdx     # 0x2d410
movq %rdx, (%rdi)
leaq 0x50(%rdi), %rdx
movq %rdx, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq 0x40(%rdi), %r14
movb %al, 0x50(%rdi)
movups %xmm0, 0x70(%rdi)
andq $0x0, 0x80(%rdi)
movq %rcx, 0x68(%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x68d2
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x5300
movq %r15, %rdi
callq 0x5548
movl %ebp, 0x60(%rbx)
xorl %esi, %esi
cmpq $0x0, 0x68(%rbx)
setne %sil
movq %rbx, %rdi
callq 0x8a2a
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
andl $0x0, 0x25958(%rip)     # 0x2e350
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8a05
movq %rax, %r15
leaq 0x70(%rbx), %rdi
callq 0xd5a6
movq %r14, %rdi
callq 0x5548
movq %rbx, %rdi
callq 0xc94c
movq %r15, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::funcdef_node::add_ret(bool)
void funcdef_node::add_ret(bool is_append)
{
	dbg_printf("add ret is_append: %d\n", is_append);
	now_func_name = name;
	auto has_ret_val = (func_table[name].ret_type == INT);
	ret_stmt_node *ret_stmt;
	if (has_ret_val)
		ret_stmt = new ret_stmt_node(new exp_node(EXP_NUM, "", 0));
	else
		ret_stmt = new ret_stmt_node(nullptr);
	if (is_append)
		blk->code += ret_stmt->code;
	else
		blk = ret_stmt;
	now_func_name = "";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebp
movq %rdi, %r14
leaq 0x40(%rdi), %rbx
leaq 0x2597a(%rip), %rdi     # 0x2e3c0
movq %rbx, %rsi
callq 0x5150
leaq 0x25933(%rip), %rdi     # 0x2e388
movq %rbx, %rsi
callq 0xd5da
movl 0x50(%rax), %r15d
pushq $0x48
popq %rdi
callq 0x5240
movq %rax, %rbx
cmpl $0x1, %r15d
jne 0x8aca
movl $0xa0, %edi
callq 0x5240
movq %rax, %r15
leaq 0x16e96(%rip), %rsi     # 0x1f91c
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x68d2
movb $0x1, %r12b
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa466
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa1ba
leaq 0x10(%rsp), %rdi
callq 0x5548
jmp 0x8ad4
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa1ba
testb %bpl, %bpl
je 0x8aef
addq $0x18, %rbx
movq 0x68(%r14), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
callq 0x5530
jmp 0x8af3
movq %rbx, 0x68(%r14)
leaq 0x258c6(%rip), %rdi     # 0x2e3c0
leaq 0x16e1b(%rip), %rsi     # 0x1f91c
callq 0x5510
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x8b31
jmp 0x8b1a
movq %rax, %r14
jmp 0x8b3e
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x5548
testb %r12b, %r12b
je 0x8b3e
movl $0xa0, %esi
movq %r15, %rdi
callq 0x5260
pushq $0x48
popq %rsi
movq %rbx, %rdi
callq 0x5260
movq %r14, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::stmt_node::stmt_node(sysY_AST::node_basic*)
stmt_node::stmt_node(node_basic *_child)
{
	child = _child;
	if (blk_id == 1) // in the function
		last_stmt = this;
	gen_code();
	dbg_printf("create a stmt_node...\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %rax
andq $0x0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
movb $0x0, 0x28(%rdi)
leaq 0x250ba(%rip), %rax     # 0x2e2b8
movl (%rax), %eax
movl %eax, 0x38(%rdi)
leaq 0x24226(%rip), %rax     # 0x2d430
movq %rax, (%rdi)
movq %rsi, 0x10(%rdi)
leaq 0x251c8(%rip), %rax     # 0x2e3e0
cmpl $0x1, (%rax)
jne 0x9224
movq %rbx, 0x25134(%rip)     # 0x2e358
movq %rbx, %rdi
callq 0x925a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xc94c
movq %r14, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::assign_stmt_node::assign_stmt_node(sysY_AST::exp_node*, sysY_AST::exp_node*)
assign_stmt_node::assign_stmt_node(exp_node *_lval, exp_node *_assign_exp)
{
	lval = _lval;
	assign_exp = _assign_exp;
	if (lval->exp_type != EXP_ARRAY && lval->exp_type != EXP_VAR)
		yyerror("expression is not assignable");

	assign_exp->reduce();
	if (lval->exp_type == EXP_ARRAY)
		assign_exp->new_temp();
	gen_code();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorl %esi, %esi
callq 0x91da
leaq 0x241ca(%rip), %rax     # 0x2d458
movq %rax, (%rbx)
movq %r15, 0x40(%rbx)
movq %r14, 0x48(%rbx)
movl 0x98(%r15), %eax
cmpl $0x1, %eax
je 0x92c3
cmpl $0x4, %eax
je 0x92c3
leaq 0x25007(%rip), %rax     # 0x2e2b8
movl (%rax), %esi
leaq 0x15724(%rip), %rdi     # 0x1e9de
callq 0x79c8
movq 0x48(%rbx), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq 0x40(%rbx), %rax
cmpl $0x4, 0x98(%rax)
jne 0x92e3
movq 0x48(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xc94c
movq %r14, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::exp_stmt_node::gen_code()
void exp_stmt_node::gen_code()
{
	if (exp_stmt->exp_type == EXP_FUNC_CALL)
	{
		auto func_exp_stmt = static_cast<func_call_exp_node *>(exp_stmt);
		func_entry query;
		find_func(func_exp_stmt->sysy_func_name, query);
		if (query.ret_type == INT)
		{
			exp_stmt->new_temp();
			code = exp_stmt->code;
		}
		else
		{
			code = exp_stmt->code;
			code += "\t" + exp_stmt->eeyore_name + "\n";
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
cmpl $0x3, 0x98(%rdi)
jne 0x954a
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
addq $0xb8, %rdi
leaq 0x40(%rsp), %rsi
callq 0xe8c2
cmpl $0x1, 0x90(%rsp)
movq 0x40(%rbx), %rsi
jne 0x94e6
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
movq 0x40(%rbx), %rsi
addq $0x18, %rsi
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x5150
jmp 0x9540
addq $0x18, %rsi
leaq 0x18(%rbx), %r14
movq %r14, %rdi
callq 0x5150
movq 0x40(%rbx), %rdx
addq $0x70, %rdx
leaq 0x16416(%rip), %rsi     # 0x1f91b
movq %rsp, %rdi
callq 0xc598
leaq 0x154c8(%rip), %rdx     # 0x1e9dc
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0xc579
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x5530
leaq 0x20(%rsp), %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
leaq 0x40(%rsp), %rdi
callq 0xc92c
addq $0x98, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5548
jmp 0x9567
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
jmp 0x9576
jmp 0x9573
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xc92c
movq %rbx, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::if_stmt_node::update(sysY_AST::cond_exp_node*, sysY_AST::node_basic*, sysY_AST::node_basic*)
void if_stmt_node::update(
	cond_exp_node *_cond, node_basic *_true_stmt, node_basic *_false_stmt)
{
	cond = _cond;
	true_stmt = _true_stmt;
	false_stmt = _false_stmt;
	has_else = (false_stmt != nullptr);
	if (!has_else)
	{
		cond->true_label = true_label = fall_label;
		cond->false_label = false_label = new_label();
	}
	else
	{
		cond->true_label = true_label = new_label();
		cond->false_label = false_label = new_label();
	}
	cond->traverse();
	gen_code();
	fall_label = old_fall_label;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, 0x40(%rdi)
movq %rdx, 0x48(%rdi)
movq %rcx, 0x50(%rdi)
testq %rcx, %rcx
setne 0x64(%rdi)
je 0x95e5
movl 0x24d83(%rip), %ecx     # 0x2e360
leal 0x1(%rcx), %eax
leal 0x2(%rcx), %edx
jmp 0x95f4
movl 0x24d79(%rip), %ecx     # 0x2e364
movl 0x24d6f(%rip), %eax     # 0x2e360
leal 0x1(%rax), %edx
movl %ecx, 0x58(%rbx)
movl %ecx, 0xb0(%rsi)
movl %edx, 0x24d5d(%rip)     # 0x2e360
movl %eax, 0x5c(%rbx)
movl %eax, 0xb4(%rsi)
movq %rsi, %rdi
callq 0x9628
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl 0x60(%rbx), %eax
movl %eax, 0x24d3f(%rip)     # 0x2e364
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::while_stmt_node::while_stmt_node()
while_stmt_node::while_stmt_node()
{
	old_start_label = while_start_label;
	old_fall_label = fall_label;
	old_next_label = while_next_label;
	while_start_label = new_label();
	fall_label = new_label();
	while_next_label = new_label();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x91da
leaq 0x236de(%rip), %rax     # 0x2d4d0
movq %rax, (%rbx)
movl 0x2456d(%rip), %eax     # 0x2e368
movl %eax, 0x5c(%rbx)
movl 0x24560(%rip), %eax     # 0x2e364
movl %eax, 0x54(%rbx)
movl 0x2455f(%rip), %eax     # 0x2e36c
movl %eax, 0x58(%rbx)
movl 0x2454a(%rip), %eax     # 0x2e360
leal 0x1(%rax), %ecx
movl %eax, 0x24549(%rip)     # 0x2e368
leal 0x2(%rax), %edx
movl %ecx, 0x2453c(%rip)     # 0x2e364
addl $0x3, %eax
movl %eax, 0x2452f(%rip)     # 0x2e360
movl %edx, 0x24535(%rip)     # 0x2e36c
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::while_stmt_node::update(sysY_AST::cond_exp_node*, sysY_AST::node_basic*, sysY_AST::node_basic*)
void while_stmt_node::update(
	cond_exp_node *_cond, node_basic *_true_stmt, node_basic *_next_stmt)
{
	cond = _cond;
	true_stmt = _true_stmt;
	cond->true_label = true_label = fall_label;
	cond->false_label = while_next_label;
	cond->traverse();
	gen_code();
	fall_label = old_fall_label;
	while_start_label = old_start_label;
	while_next_label = old_next_label;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, 0x40(%rdi)
movq %rdx, 0x48(%rdi)
movl 0x24518(%rip), %eax     # 0x2e364
movl %eax, 0x50(%rdi)
movl %eax, 0xb0(%rsi)
movl 0x24511(%rip), %eax     # 0x2e36c
movl %eax, 0xb4(%rsi)
movq %rsi, %rdi
callq 0x9628
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl 0x54(%rbx), %eax
movl %eax, 0x244ea(%rip)     # 0x2e364
movl 0x5c(%rbx), %eax
movl %eax, 0x244e5(%rip)     # 0x2e368
movl 0x58(%rbx), %eax
movl %eax, 0x244e0(%rip)     # 0x2e36c
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::while_stmt_node::gen_code()
void while_stmt_node::gen_code()
{
	code = "l" + to_string(while_start_label) + ":\n";
	code += cond->code;
	code += "l" + to_string(true_label) + ":\n";
	code += true_stmt->code;
	code += "\tgoto l" + to_string(while_start_label) + "\n";
	code += "l" + to_string(while_next_label) + ":\n";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
movl 0x244c8(%rip), %esi     # 0x2e368
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0xc6d2
leaq 0x14b50(%rip), %rsi     # 0x1ea04
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xc95f
leaq 0x14b35(%rip), %rdx     # 0x1e9fb
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0xc579
leaq 0x18(%r14), %rbx
leaq 0x20(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5300
movq %r15, %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
leaq 0x40(%rsp), %rdi
callq 0x5548
movq 0x40(%r14), %rsi
addq $0x18, %rsi
movq %rbx, %rdi
callq 0x5530
movl 0x50(%r14), %esi
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xc6d2
leaq 0x14adb(%rip), %rsi     # 0x1ea04
movq %rsp, %rdi
movq %r15, %rdx
callq 0xc95f
leaq 0x14ac0(%rip), %rdx     # 0x1e9fb
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0xc579
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x5530
leaq 0x20(%rsp), %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
leaq 0x40(%rsp), %rdi
callq 0x5548
movq 0x48(%r14), %rsi
addq $0x18, %rsi
movq %rbx, %rdi
callq 0x5530
movl 0x243e1(%rip), %esi     # 0x2e368
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0xc6d2
leaq 0x14a63(%rip), %rsi     # 0x1e9fe
movq %rsp, %rdi
movq %r14, %rdx
callq 0xc95f
leaq 0x14a2f(%rip), %rdx     # 0x1e9dc
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0xc579
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x5530
leaq 0x20(%rsp), %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
leaq 0x40(%rsp), %rdi
callq 0x5548
movl 0x24383(%rip), %esi     # 0x2e36c
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0xc6d2
leaq 0x14a07(%rip), %rsi     # 0x1ea04
movq %rsp, %rdi
movq %r14, %rdx
callq 0xc95f
leaq 0x149ec(%rip), %rdx     # 0x1e9fb
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0xc579
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x5530
leaq 0x20(%rsp), %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
leaq 0x40(%rsp), %rdi
callq 0x5548
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0xa05b
jmp 0xa06e
jmp 0xa07b
jmp 0xa05b
jmp 0xa06e
jmp 0xa07b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5548
jmp 0xa071
jmp 0xa06e
jmp 0xa07b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
jmp 0xa07e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5548
movq %rbx, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::ret_stmt_node::gen_code()
void ret_stmt_node::gen_code()
{
	if (ret_val)
	{
		code = ret_val->code;
		code += "\treturn " + ret_val->eeyore_name + "\n";
		dbg_printf("gen_code in ret_stmt...ret_val:%s\n",
			ret_val->eeyore_name.c_str());
	}
	else
		code += "\treturn\n";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
movq 0x40(%rdi), %rsi
testq %rsi, %rsi
je 0xa428
addq $0x18, %rsi
leaq 0x18(%r14), %rbx
movq %rbx, %rdi
callq 0x5150
movq 0x40(%r14), %rdx
addq $0x70, %rdx
leaq 0x1468e(%rip), %rsi     # 0x1ea6c
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xc598
leaq 0x145ea(%rip), %rdx     # 0x1e9dc
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xc579
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5530
leaq 0x8(%rsp), %rdi
callq 0x5548
leaq 0x28(%rsp), %rdi
callq 0x5548
addq $0x48, %rsp
popq %rbx
popq %r14
retq
addq $0x18, %r14
leaq 0x14642(%rip), %rsi     # 0x1ea75
movq %r14, %rdi
addq $0x48, %rsp
popq %rbx
popq %r14
jmp 0x5500
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5548
jmp 0xa454
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5548
movq %rbx, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::exp_node::exp_node(sysY_AST::exp_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, sysY_AST::op_t, sysY_AST::exp_node*)
exp_node::exp_node(exp_t _exp_type, const string &_sysy_name, int _num,
	op_t _op, exp_node *_child)
{
	exp_type = _exp_type;
	sysy_name = _sysy_name;
	child = _child;
	num = _num;
	op = _op;
	reduce();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdi, %rbx
leaq 0x28(%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
xorl %eax, %eax
movb %al, 0x28(%rdi)
leaq 0x23e1b(%rip), %rcx     # 0x2e2b8
movl (%rcx), %ecx
movl %ecx, 0x38(%rdi)
leaq 0x2309f(%rip), %rcx     # 0x2d548
movq %rcx, (%rdi)
andq $0x0, 0x40(%rdi)
leaq 0x60(%rdi), %rcx
movq %rcx, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
leaq 0x50(%rdi), %r12
movb %al, 0x60(%rdi)
leaq 0x70(%rdi), %r13
leaq 0x80(%rdi), %rcx
movq %rcx, 0x70(%rdi)
andq $0x0, 0x78(%rdi)
movb %al, 0x80(%rdi)
andq $0x0, 0x90(%rdi)
andl $0x0, 0x9c(%rdi)
movl %esi, 0x98(%rdi)
movq %r12, %rdi
movq %rdx, %rsi
callq 0x5150
movq %r14, 0x48(%rbx)
movl %r15d, 0x94(%rbx)
movl %ebp, 0x90(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r13, %rdi
callq 0x5548
movq %r12, %rdi
callq 0x5548
movq %rbx, %rdi
callq 0xc94c
movq %r14, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::exp_node::new_temp()
void exp_node::new_temp()
{
	if (!temped && exp_type != EXP_NUM && exp_type != EXP_VAR)
	{
		code += "\tt" + to_string(temp_id) + " = " + eeyore_name + "\n";
		sysy_name = "#t" + to_string(temp_id);
		eeyore_name = "t" + to_string(temp_id++);
		reg_var(sysy_name);
		temped = true;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
cmpl $0x0, 0x9c(%rdi)
jne 0xa70d
movq %rdi, %rbx
movl 0x98(%rdi), %eax
decl %eax
cmpl $0x2, %eax
jb 0xa70d
movl 0x23dc9(%rip), %esi     # 0x2e350
leaq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0xc6d2
leaq 0x144e0(%rip), %rsi     # 0x1ea7e
leaq 0x48(%rsp), %rdi
movq %r14, %rdx
callq 0xc95f
leaq 0x14379(%rip), %rdx     # 0x1e92b
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xc579
leaq 0x70(%rbx), %r14
movq %rsp, %rdi
leaq 0x68(%rsp), %rsi
movq %r14, %rdx
callq 0xc64c
leaq 0x14400(%rip), %rdx     # 0x1e9dc
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0xc579
leaq 0x18(%rbx), %rdi
leaq 0x20(%rsp), %rsi
callq 0x5530
leaq 0x20(%rsp), %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
leaq 0x68(%rsp), %rdi
callq 0x5548
leaq 0x48(%rsp), %rdi
callq 0x5548
leaq 0x88(%rsp), %rdi
callq 0x5548
movl 0x23d20(%rip), %esi     # 0x2e350
movq %rsp, %r15
movq %r15, %rdi
callq 0xc6d2
leaq 0x1443f(%rip), %rsi     # 0x1ea81
leaq 0x20(%rsp), %rdi
movq %r15, %rdx
callq 0xc95f
leaq 0x50(%rbx), %r15
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x5300
movq %r12, %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
movl 0x23cd7(%rip), %esi     # 0x2e350
leal 0x1(%rsi), %eax
movl %eax, 0x23cce(%rip)     # 0x2e350
movq %rsp, %r12
movq %r12, %rdi
callq 0xc6d2
leaq 0x143eb(%rip), %rsi     # 0x1ea7f
leaq 0x20(%rsp), %rdi
movq %r12, %rdx
callq 0xc95f
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x5300
movq %r12, %rdi
callq 0x5548
movq %rsp, %r14
movq %r14, %rdi
callq 0x5548
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
andq $0x0, 0x10(%r12)
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
leaq 0x20(%rsp), %r8
movq %rsp, %r9
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe5ca
movq %rsp, %rdi
callq 0xcbaa
leaq 0x20(%rsp), %rdi
callq 0xcbaa
movl $0x1, 0x9c(%rbx)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xcbaa
leaq 0x20(%rsp), %rdi
callq 0xcbaa
jmp 0xa787
jmp 0xa735
movq %rax, %rbx
movq %rsp, %rdi
jmp 0xa782
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5548
jmp 0xa74f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
jmp 0xa75c
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5548
jmp 0xa76b
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5548
jmp 0xa77a
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x5548
movq %rbx, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::exp_node::reduce()
void exp_node::reduce()
{
	if (exp_type == EXP_NUM)
	{
		eeyore_name = to_string(num);
		dbg_printf("eeyore_name in exp_node: %s\n", eeyore_name.c_str());
	}
	else if (exp_type == EXP_VAR)
	{
		var_entry query;
		find_var(sysy_name, query);
		eeyore_name = query.eeyore_name;
		if (query.is_const && query.dim.size() == 0) // a const
		{
			exp_type = EXP_NUM;
			eeyore_name = to_string(query.val[0]);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movl 0x98(%rdi), %eax
cmpl $0x1, %eax
je 0xa7de
cmpl $0x2, %eax
jne 0xa878
movl 0x94(%rbx), %esi
movq %rsp, %r14
movq %r14, %rdi
callq 0xc6d2
addq $0x70, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5300
movq %r14, %rdi
callq 0x5548
jmp 0xa878
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
leaq 0x50(%rbx), %rdi
movq %rsp, %rsi
callq 0xe814
leaq 0x70(%rbx), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5150
cmpb $0x1, 0x41(%rsp)
jne 0xa870
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
jne 0xa870
movl $0x2, 0x98(%rbx)
movq 0x60(%rsp), %rax
movl (%rax), %esi
leaq 0x78(%rsp), %rdi
callq 0xc6d2
leaq 0x78(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5300
movq %rbx, %rdi
callq 0x5548
movq %rsp, %rdi
callq 0xc72c
addq $0x98, %rsp
popq %rbx
popq %r14
retq
jmp 0xa885
movq %rax, %rbx
movq %rsp, %rdi
callq 0xc72c
movq %rbx, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::idx_open(std::vector<sysY_AST::exp_node*, std::allocator<sysY_AST::exp_node*>> const&, sysY_AST::var_entry const&)
static exp_node *idx_open(
	const vector<exp_node *> &idx, const var_entry &query_arr)
{
	if (idx.empty())
		return new exp_node(EXP_NUM, "", 0);
	auto ret = *idx.begin();
	auto size = idx.size();
	for (auto i = 1; i < size; i++)
	{
		auto scale = new exp_node(EXP_NUM, "", query_arr.dim[i]);
		dbg_printf("idx num: %d,\n", idx[i]->num);
		ret = new arith_exp_node(MUL, ret, scale);
		ret = new arith_exp_node(ADD, ret, idx[i]);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x10(%rsp)
movq (%rdi), %rax
movq %rdi, 0x8(%rsp)
movq 0x8(%rdi), %r14
cmpq %r14, %rax
je 0xb026
movq (%rax), %rbx
subq %rax, %r14
sarq $0x3, %r14
pushq $0x1
popq %r15
leaq 0x18(%rsp), %r13
cmpq %r15, %r14
jbe 0xb06b
movl $0xa0, %edi
callq 0x5240
movq %rax, %rbp
movq %r13, %rdi
leaq 0x14976(%rip), %rsi     # 0x1f91c
leaq 0x7(%rsp), %rdx
callq 0x68d2
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movl (%rax,%r15,4), %ecx
movq %rbp, %rdi
pushq $0x2
popq %rsi
movq %r13, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa466
movq %r13, %rdi
callq 0x5548
movl $0xb0, %edi
callq 0x5240
movq %rax, %r12
movq %rax, %rdi
pushq $0xa
popq %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0xb0d8
movl $0xb0, %edi
callq 0x5240
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rcx
movq %rbx, %rdi
pushq $0x7
popq %rsi
movq %r12, %rdx
callq 0xb0d8
incq %r15
jmp 0xaf86
movl $0xa0, %edi
callq 0x5240
movq %rax, %rbx
leaq 0x148e2(%rip), %rsi     # 0x1f91c
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x68d2
pushq $0x2
popq %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa466
leaq 0x18(%rsp), %rdi
callq 0x5548
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5548
jmp 0xb08f
movq %rax, %r14
movl $0xa0, %esi
jmp 0xb0c7
movq %rax, %r14
jmp 0xb0a8
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5548
movl $0xa0, %esi
movq %rbp, %rdi
jmp 0xb0ca
movq %rax, %r14
movl $0xb0, %esi
movq %r12, %rdi
jmp 0xb0ca
movq %rax, %r14
movl $0xb0, %esi
movq %rbx, %rdi
callq 0x5260
movq %r14, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::arith_exp_node::arith_exp_node(sysY_AST::op_t, sysY_AST::exp_node*, sysY_AST::exp_node*)
arith_exp_node::arith_exp_node(op_t _op, exp_node *_left, exp_node *_right) :
	exp_node(EXP_TEMP, "", 0, _op), left(_left), right(_right)
{
	assert(op != NONE && op != AND && op != OR);
	if (!is_cond && op == NOT)
		yyerror("operator '!' should only appear in condition expression");
	if (left->exp_type == EXP_PTR || (right && right->exp_type == EXP_PTR))
		yyerror("pointer cannot be in an expression");
	reduce();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x14828(%rip), %rsi     # 0x1f91c
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x68d2
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0xa466
leaq 0x8(%rsp), %rdi
callq 0x5548
leaq 0x2247d(%rip), %rax     # 0x2d5a8
movq %rax, (%rbx)
movq %r14, 0xa0(%rbx)
movq %r15, 0xa8(%rbx)
cmpb $0x0, 0x23209(%rip)     # 0x2e34c
jne 0xb16a
cmpl $0xf, 0x90(%rbx)
jne 0xb16a
leaq 0x23163(%rip), %rax     # 0x2e2b8
movl (%rax), %esi
leaq 0x1397f(%rip), %rdi     # 0x1eadd
callq 0x79c8
movq 0xa0(%rbx), %r14
cmpl $0x6, 0x98(%r14)
je 0xb189
movq 0xa8(%rbx), %rax
testq %rax, %rax
je 0xb19e
cmpl $0x6, 0x98(%rax)
jne 0xb19e
leaq 0x23128(%rip), %rax     # 0x2e2b8
movl (%rax), %esi
leaq 0x1397c(%rip), %rdi     # 0x1eb15
callq 0x79c8
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xc984
jmp 0xb1d1
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x5548
jmp 0xb1d1
movq %rax, %r14
movq %r14, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::func_call_exp_node::check_ret_type(sysY_AST::exp_node*)
void func_call_exp_node::check_ret_type(exp_node *func_exp)
{
	if (func_exp->exp_type != EXP_FUNC_CALL) // not a function call
		return;
	auto func_call_exp = static_cast<func_call_exp_node *>(func_exp);
	func_entry query;
	find_func(func_call_exp->sysy_func_name, query);
	if (query.ret_type != INT)
	{
		string msg;
		msg = "function '" + func_call_exp->sysy_func_name +
			"' has no return value";
		yyerror(msg.c_str());
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
cmpl $0x3, 0x98(%rdi)
jne 0xc11f
movq %rdi, %rbx
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
addq $0xb8, %rbx
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0xe8c2
cmpl $0x1, 0xb0(%rsp)
je 0xc115
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x12957(%rip), %rsi     # 0x1ea0f
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xc598
leaq 0x12b24(%rip), %rdx     # 0x1ebee
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0xc579
leaq 0x20(%rsp), %rbx
leaq 0x40(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5300
movq %r14, %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
movq (%rbx), %rdi
leaq 0x221b2(%rip), %rax     # 0x2e2b8
movl (%rax), %esi
callq 0x79c8
movq %rbx, %rdi
callq 0x5548
leaq 0x60(%rsp), %rdi
callq 0xc92c
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
jmp 0xc13a
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5548
jmp 0xc149
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xc92c
movq %rbx, %rdi
callq 0x54c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::func_call_exp_node::new_temp()
void func_call_exp_node::new_temp()
{
	if (temped || exp_type == EXP_NUM || exp_type == EXP_VAR)
		return;
	check_ret_type(this);
	sysy_name = "#t" + to_string(temp_id);
	eeyore_name = "t" + to_string(temp_id++);
	code += "\t" + eeyore_name + " = call f_" + sysy_func_name + "\n";
	reg_var(sysy_name);
	temped = true;
	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
cmpl $0x0, 0x9c(%rdi)
jne 0xc440
movq %rdi, %rbx
movl 0x98(%rdi), %eax
decl %eax
cmpl $0x2, %eax
jb 0xc440
movq %rbx, %rdi
callq 0xc048
movl 0x2207b(%rip), %esi     # 0x2e350
movq %rsp, %r14
movq %r14, %rdi
callq 0xc6d2
leaq 0x1279a(%rip), %rsi     # 0x1ea81
leaq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0xc95f
leaq 0x50(%rbx), %r14
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x5300
movq %r15, %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
movl 0x22032(%rip), %esi     # 0x2e350
leal 0x1(%rsi), %eax
movl %eax, 0x22029(%rip)     # 0x2e350
movq %rsp, %r15
movq %r15, %rdi
callq 0xc6d2
leaq 0x12746(%rip), %rsi     # 0x1ea7f
leaq 0x20(%rsp), %rdi
movq %r15, %rdx
callq 0xc95f
leaq 0x70(%rbx), %r15
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x5300
movq %r12, %rdi
callq 0x5548
movq %rsp, %rdi
callq 0x5548
leaq 0x135aa(%rip), %rsi     # 0x1f91b
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0xc598
leaq 0x1288f(%rip), %rdx     # 0x1ec17
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0xc579
leaq 0xb8(%rbx), %rdx
movq %rsp, %rdi
leaq 0x48(%rsp), %rsi
callq 0xc64c
leaq 0x1262c(%rip), %rdx     # 0x1e9dc
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0xc579
leaq 0x18(%rbx), %rdi
leaq 0x20(%rsp), %rsi
callq 0x5530
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x5548
movq %rsp, %r12
movq %r12, %rdi
callq 0x5548
leaq 0x48(%rsp), %rdi
callq 0x5548
leaq 0x68(%rsp), %rdi
callq 0x5548
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movaps %xmm0, (%r12)
andq $0x0, 0x10(%r12)
leaq 0x20(%rsp), %r8
movq %rsp, %r9
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe5ca
movq %rsp, %rdi
callq 0xcbaa
leaq 0x20(%rsp), %rdi
callq 0xcbaa
movl $0x1, 0x9c(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xcbaa
leaq 0x20(%rsp), %rdi
callq 0xcbaa
jmp 0xc4a8
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5548
jmp 0xc478
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
jmp 0xc485
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5548
jmp 0xc494
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0xc4a3
jmp 0xc49d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
movq %rbx, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::var_entry::var_entry(bool, bool, bool, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
var_entry::var_entry(bool _is_array, bool _is_const, bool _is_param,
	const vector<int> &_dim, const vector<int> &_val, const string &_sysy_name)
{
	is_array = _is_array;
	is_const = _is_const;
	is_param = _is_param;
	sysy_name = _sysy_name;
	dim = _dim;
	val = _val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %edi, %edi
movb %dil, 0x10(%rbx)
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
andq $0x0, 0x28(%rbx)
movq 0x40(%rsp), %rax
leaq 0x20(%rbx), %r15
movb %dil, 0x30(%rbx)
leaq 0x48(%rbx), %r13
leaq 0x60(%rbx), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movb %sil, 0x40(%rbx)
movb %dl, 0x41(%rbx)
movb %cl, 0x42(%rbx)
movq %r15, %rdi
movq %rax, %rsi
callq 0x5150
movq %r13, %rdi
movq %r12, %rsi
callq 0xea22
movq %rbp, %rdi
movq %r14, %rsi
callq 0xea22
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbp, %rdi
callq 0xcbaa
movq %r13, %rdi
callq 0xcbaa
movq %r15, %rdi
callq 0x5548
movq %rbx, %rdi
callq 0x5548
movq %r14, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::reg_func(char const*, sysY_AST::data_t)
void reg_func(const char *_name, data_t ret_type)
{
	dbg_printf("%s return int: %d\n", _name, ret_type == INT);
	string name(_name);
	assert(!name.empty());
	if (defined(name))
	{
		string msg = "identifier '" + name + "' was already defined";
		yyerror(msg.c_str());
		return;
	}
	func_table[name] = func_entry(name, ret_type);
	now_func_name = name;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %esi, %ebx
movq %rdi, %rsi
movq %rsp, %r14
leaq 0x40(%rsp), %rdx
movq %r14, %rdi
callq 0x68d2
movq %r14, %rdi
callq 0xe4df
testb %al, %al
je 0xe448
leaq 0x10688(%rip), %rsi     # 0x1ea84
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xc598
leaq 0x10ab8(%rip), %rdx     # 0x1eec8
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xc579
leaq 0x20(%rsp), %rdi
callq 0x5548
movq 0x40(%rsp), %rdi
leaq 0x1fe83(%rip), %rax     # 0x2e2b8
movl (%rax), %esi
callq 0x79c8
leaq 0x40(%rsp), %rdi
callq 0x5548
jmp 0xe48d
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
movl %ebx, %edx
callq 0xdba4
leaq 0x1ff2a(%rip), %rdi     # 0x2e388
movq %rsp, %rsi
callq 0xd5da
leaq 0x40(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xec32
movq %rbx, %rdi
callq 0xc92c
leaq 0x1ff3b(%rip), %rdi     # 0x2e3c0
movq %rsp, %rsi
callq 0x5150
movq %rsp, %rdi
callq 0x5548
addq $0x98, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0xe4c1
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xc92c
jmp 0xe4cf
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5548
jmp 0xe4cf
jmp 0xe4cc
jmp 0xe4cc
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5548
movq %rbx, %rdi
callq 0x54c0
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::defined(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool defined(const string &name)
{
	if (func_table.count(name))
		return true;

	if (var_stack[blk_id].count(name))
		return true;
	return false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1fe9e(%rip), %rdi     # 0x2e388
movq %rbx, %rsi
callq 0xf898
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
jne 0xe51c
movslq 0x1fedd(%rip), %rax     # 0x2e3e0
imulq $0x38, %rax, %rdi
addq 0x1fe62(%rip), %rdi     # 0x2e370
movq %rbx, %rsi
callq 0xf8da
testq %rax, %rax
setne %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::dec_blk()
void dec_blk()
{
	blk_id--;
	if (blk_id == 0)
	{
		param_id = 0;
		now_func_name = "";
	}
	var_stack.pop_back();
}

// Assembly:
decl 0x1fe43(%rip)           # 0x2e3e0
jne 0xe5be
pushq %rax
andl $0x0, 0x1fe3d(%rip)     # 0x2e3e4
leaq 0x1fe12(%rip), %rdi     # 0x2e3c0
leaq 0x11367(%rip), %rsi     # 0x1f91c
callq 0x5510
addq $0x8, %rsp
leaq 0x1fdab(%rip), %rdi     # 0x2e370
jmp 0xebca
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::find_var(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, sysY_AST::var_entry&)
bool find_var(const string &name, var_entry &store)
{
	for (int i = blk_id; i >= 0; i--)
		if (var_stack[i].count(name))
		{
			store = var_stack[i][name];
			return true;
		}
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x1fbb8(%rip), %ecx     # 0x2e3e0
movl %ecx, %r12d
testl %ecx, %ecx
js 0xe86f
movl %r12d, %eax
imulq $0x38, %rax, %r15
movq 0x1fb33(%rip), %rdi     # 0x2e370
addq %r15, %rdi
movq %r14, %rsi
callq 0xf8da
leal -0x1(%r12), %ecx
testq %rax, %rax
je 0xe828
addq 0x1fb17(%rip), %r15     # 0x2e370
movq %r15, %rdi
movq %r14, %rsi
callq 0xf9c4
movq %rbx, %rdi
movq %rax, %rsi
callq 0xebde
testl %r12d, %r12d
setns %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::find_var(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool find_var(const string &name)
{
	for (int i = blk_id; i >= 0; i--)
		if (var_stack[i].count(name))
			return true;
	return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x1fb52(%rip), %ecx     # 0x2e3e0
movl %ecx, %r14d
testl %ecx, %ecx
js 0xe8b4
movl %r14d, %eax
imulq $0x38, %rax, %rdi
addq 0x1facd(%rip), %rdi     # 0x2e370
movq %rbx, %rsi
callq 0xf8da
leal -0x1(%r14), %ecx
testq %rax, %rax
je 0xe88e
testl %r14d, %r14d
setns %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::find_func(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, sysY_AST::func_entry&)
bool find_func(const string &name, func_entry &store)
{
	if (func_table.count(name) == 0)
		return false;
	store = func_table[name];
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1fab4(%rip), %rdi     # 0x2e388
movq %r15, %rsi
callq 0xf898
movq %rax, %r14
testq %rax, %rax
je 0xe8fe
leaq 0x1fa9d(%rip), %rdi     # 0x2e388
movq %r15, %rsi
callq 0xd5da
movq %rbx, %rdi
movq %rax, %rsi
callq 0xec6e
testq %r14, %r14
setne %al
popq %rbx
popq %r14
popq %r15
retq