// File: /workspace/github_cpp_makefile_star2_O1/yanlinlin82[P]icpp/icpp.cpp
// Function: parse_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string parse_function(string name)
{
	log<3>("[DEBUG] %s: '%s'\n", __FUNCTION__, name.c_str());
	next();
	vector<string> arg_types;
	if (token != ")") {
		for (;;) {
			string type = parse_expression(",");
			arg_types.push_back(type);
			add_assembly_code(PUSH);
			if (token == ")") break;
			expect_token(",", "function '" + name + "'");
			next();
		}
	}
	expect_token(")", "function '" + name + "'");
	log<3>("[DEBUG] function '%s' has %zd args\n", name.c_str(), arg_types.size());
	auto [ offset, ret_type, is_code, type_name, arg_count ] = query_function(name, arg_types);
	if (arg_count < 0) {
		add_assembly_code(MOV, arg_types.size() + arg_count, "variable parameter count");
		add_assembly_code(PUSH);
	}
	add_assembly_code(CALL, offset, ret_type + " " + name + "(" + type_name + ")");
	if (arg_count < 0) {
		add_assembly_code(ADJ, arg_types.size());
	}
	log<3>("[DEBUG] ret_type = '%s'\n", ret_type.c_str());
	next();
	return ret_type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, -0x188(%rbp)
movq %rsi, -0x68(%rbp)
movq (%rsi), %rdx
leaq 0x1431e(%rip), %rdi     # 0x1c711
leaq 0x14329(%rip), %rsi     # 0x1c723
xorl %eax, %eax
callq 0x1559d
callq 0x5790
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
leaq 0x1be84(%rip), %rdi     # 0x242a0
leaq 0x14762(%rip), %rsi     # 0x1cb85
callq 0x30b0
testl %eax, %eax
je 0x8651
leaq -0x180(%rbp), %r12
leaq 0x15043(%rip), %r14     # 0x1d481
leaq -0x160(%rbp), %r15
leaq -0x170(%rbp), %rax
movq %rax, -0x180(%rbp)
movq %r12, %rdi
leaq 0x13dac(%rip), %rsi     # 0x1c209
leaq 0x13da6(%rip), %rdx     # 0x1c20a
callq 0x16dc8
leaq -0xe0(%rbp), %rdi
movq %r12, %rbx
movq %r12, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x8e88
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x84a4
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x40(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x15ac8
leaq -0x150(%rbp), %rax
movq %rax, -0x160(%rbp)
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x16dc8
movl $0x1, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4d8b
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x8501
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq 0x1bd98(%rip), %rdi     # 0x242a0
leaq 0x14676(%rip), %rsi     # 0x1cb85
callq 0x30b0
movl %eax, %r12d
testl %eax, %eax
je 0x8623
leaq -0x130(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x140(%rbp), %rdi
leaq 0x13cce(%rip), %rsi     # 0x1c209
leaq 0x13cc8(%rip), %rdx     # 0x1c20a
callq 0x16dc8
leaq -0x60(%rbp), %r13
movq %r13, %rdi
leaq 0x141dd(%rip), %rsi     # 0x1c732
movq -0x68(%rbp), %rdx
callq 0x15a35
movq %r13, %rdi
leaq 0x1452b(%rip), %rsi     # 0x1ca93
callq 0x3360
leaq -0x78(%rbp), %rsi
movq %rsi, -0x88(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8597
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x859d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x140(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x5d07
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x85e3
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x85fc
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x861e
movq -0x130(%rbp), %rsi
incq %rsi
callq 0x31d0
callq 0x5790
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x8645
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31d0
testl %r12d, %r12d
movq %rbx, %r12
jne 0x8445
leaq -0x278(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x14522(%rip), %rsi     # 0x1cb85
leaq 0x1451c(%rip), %rdx     # 0x1cb86
leaq -0x288(%rbp), %rdi
callq 0x16dc8
leaq 0x140b5(%rip), %rsi     # 0x1c732
leaq -0xe0(%rbp), %rdi
movq -0x68(%rbp), %r13
movq %r13, %rdx
callq 0x15a35
leaq 0x143fc(%rip), %rsi     # 0x1ca93
leaq -0xe0(%rbp), %rdi
callq 0x3360
leaq -0x1d8(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x86d0
movq %rdx, -0x1e8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x1d8(%rbp)
jmp 0x86d7
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x1e8(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x288(%rbp), %rdi
callq 0x5d07
movq -0x1e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x871c
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x873b
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x288(%rbp), %rdi
cmpq %r14, %rdi
je 0x8756
movq -0x278(%rbp), %rsi
incq %rsi
callq 0x31d0
movq (%r13), %rsi
movq -0x38(%rbp), %rdx
subq -0x40(%rbp), %rdx
sarq $0x5, %rdx
leaq 0x13fd0(%rip), %rdi     # 0x1c73d
xorl %eax, %eax
callq 0x1559d
leaq -0x258(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq -0x268(%rbp), %rdi
callq 0x16d2e
leaq -0xe0(%rbp), %rdi
leaq -0x268(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x683d
movq -0x268(%rbp), %rdi
cmpq %r14, %rdi
je 0x87c8
movq -0x258(%rbp), %rsi
incq %rsi
callq 0x31d0
movl -0xe0(%rbp), %ebx
testl %ebx, %ebx
jns 0x888a
movq -0x40(%rbp), %r12
movq -0x38(%rbp), %r15
leaq -0x238(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x13f71(%rip), %rsi     # 0x1c761
leaq 0x13f82(%rip), %rdx     # 0x1c779
leaq -0x248(%rbp), %rdi
callq 0x16dc8
subq %r12, %r15
shrq $0x5, %r15
addl %r15d, %ebx
leaq -0x248(%rbp), %rdx
movl $0x4, %edi
movl %ebx, %esi
callq 0x4d8b
movq -0x248(%rbp), %rdi
cmpq %r14, %rdi
je 0x883b
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x218(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x14c34(%rip), %rdx     # 0x1d481
leaq -0x228(%rbp), %rdi
movq %rdx, %rsi
callq 0x16dc8
leaq -0x228(%rbp), %rdx
movl $0x1, %edi
xorl %esi, %esi
callq 0x4d8b
movq -0x228(%rbp), %rdi
cmpq %r14, %rdi
je 0x888a
movq -0x218(%rbp), %rsi
incq %rsi
callq 0x31d0
movl -0x90(%rbp), %ebx
leaq -0xf0(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x100(%rbp), %rdi
callq 0x16d2e
leaq 0x139be(%rip), %rsi     # 0x1c27d
leaq -0x100(%rbp), %rdi
callq 0x3360
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq -0x100(%rbp), %rdi
callq 0x30c0
leaq -0x198(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x890d
movq %rdx, -0x1a8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x198(%rbp)
jmp 0x8915
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x1a8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1408a(%rip), %rsi     # 0x1c9c4
callq 0x3360
leaq -0x110(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x896c
movq %rdx, -0x120(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x110(%rbp)
jmp 0x8972
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq -0x120(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
callq 0x30c0
leaq -0x50(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x89c7
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
jmp 0x89cf
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x60(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x14194(%rip), %rsi     # 0x1cb85
callq 0x3360
leaq -0x1b8(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8a23
movq %rdx, -0x1c8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x1b8(%rbp)
jmp 0x8a2a
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq -0x1c8(%rbp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x25, %edi
movl %ebx, %esi
callq 0x4d8b
movq -0x1c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8a6f
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
movq %r12, %rbx
je 0x8a87
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
movq -0x188(%rbp), %r12
je 0x8ab0
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x1a8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8acb
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0x8ae6
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x31d0
cmpl $0x0, -0xe0(%rbp)
jns 0x8b4d
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %rbx
leaq -0x1f8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x14978(%rip), %rdx     # 0x1d481
leaq -0x208(%rbp), %rdi
movq %rdx, %rsi
callq 0x16dc8
subq %r15, %rbx
shrq $0x5, %rbx
leaq -0x208(%rbp), %rdx
movl $0x3, %edi
movl %ebx, %esi
callq 0x4d8b
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x8b4d
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xb0(%rbp), %rsi
leaq 0x13c1f(%rip), %rdi     # 0x1c77a
xorl %eax, %eax
callq 0x1559d
callq 0x5790
leaq 0x10(%r12), %rax
movq %rax, (%r12)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x16d2e
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ba8
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0xc8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8bc7
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x40(%rbp), %rdi
callq 0x1535c
movq %r12, %rax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x8d91
movq -0x1f8(%rbp), %rsi
jmp 0x8cee
jmp 0x8d8e
movq %rax, %rbx
movq -0x228(%rbp), %rdi
cmpq %r14, %rdi
je 0x8d91
movq -0x218(%rbp), %rsi
jmp 0x8cee
jmp 0x8d8e
movq %rax, %rbx
movq -0x248(%rbp), %rdi
cmpq %r14, %rdi
je 0x8d91
movq -0x238(%rbp), %rsi
jmp 0x8cee
jmp 0x8d8e
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8c74
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8c74
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x8c8e
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8c8e
movq %rax, %rbx
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x8cb5
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8cb5
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
cmpq %r12, %rdi
je 0x8cd7
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8cd7
jmp 0x8cd4
movq %rax, %rbx
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0x8d91
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8d91
jmp 0x8d8e
movq %rax, %rbx
movq -0x268(%rbp), %rdi
cmpq %r14, %rdi
je 0x8e77
movq -0x258(%rbp), %rsi
jmp 0x8e6f
jmp 0x8e05
jmp 0x8e05
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x8d4c
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8d4c
movq %rax, %rbx
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d70
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8d70
movq %rax, %rbx
movq -0x288(%rbp), %rdi
cmpq %r14, %rdi
je 0x8e77
movq -0x278(%rbp), %rsi
jmp 0x8e6f
jmp 0x8e05
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x15b14
jmp 0x8e77
jmp 0x8e52
movq %rax, %rbx
jmp 0x8de9
movq %rax, %rbx
jmp 0x8dd0
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x8dd0
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x8de9
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x8e55
movq -0x130(%rbp), %rsi
jmp 0x8e48
movq %rax, %rbx
jmp 0x8e77
movq %rax, %rbx
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x8e77
movq -0x170(%rbp), %rsi
jmp 0x8e6f
jmp 0x8e52
movq %rax, %rbx
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x8e55
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8e55
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x8e77
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x40(%rbp), %rdi
callq 0x1535c
movq %rbx, %rdi
callq 0x3320