// File: /workspace/github_cpp_makefile_star2_O3/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 0x13409(%rip), %rdi     # 0x1b711
leaq 0x13414(%rip), %rsi     # 0x1b723
xorl %eax, %eax
callq 0x151ad
callq 0x572d
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
leaq 0x1af6f(%rip), %rdi     # 0x232a0
leaq 0x1384d(%rip), %rsi     # 0x1bb85
callq 0x30b0
testl %eax, %eax
je 0x8566
leaq -0x180(%rbp), %r12
leaq 0x1412e(%rip), %r14     # 0x1c481
leaq -0x160(%rbp), %r15
leaq -0x170(%rbp), %rax
movq %rax, -0x180(%rbp)
movq %r12, %rdi
leaq 0x12e97(%rip), %rsi     # 0x1b209
leaq 0x12e91(%rip), %rdx     # 0x1b20a
callq 0x169e0
leaq -0xe0(%rbp), %rdi
movq %r12, %rbx
movq %r12, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x8d9d
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x83b9
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x40(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x156da
leaq -0x150(%rbp), %rax
movq %rax, -0x160(%rbp)
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x169e0
movl $0x1, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4d40
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x8416
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq 0x1ae83(%rip), %rdi     # 0x232a0
leaq 0x13761(%rip), %rsi     # 0x1bb85
callq 0x30b0
movl %eax, %r12d
testl %eax, %eax
je 0x8538
leaq -0x130(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x140(%rbp), %rdi
leaq 0x12db9(%rip), %rsi     # 0x1b209
leaq 0x12db3(%rip), %rdx     # 0x1b20a
callq 0x169e0
leaq -0x60(%rbp), %r13
movq %r13, %rdi
leaq 0x132c8(%rip), %rsi     # 0x1b732
movq -0x68(%rbp), %rdx
callq 0x15648
movq %r13, %rdi
leaq 0x13616(%rip), %rsi     # 0x1ba93
callq 0x3360
leaq -0x78(%rbp), %rsi
movq %rsi, -0x88(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x84ac
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x84b2
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 0x5c40
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x84f8
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x8511
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x8533
movq -0x130(%rbp), %rsi
incq %rsi
callq 0x31d0
callq 0x572d
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x855a
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31d0
testl %r12d, %r12d
movq %rbx, %r12
jne 0x835a
leaq -0x278(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1360d(%rip), %rsi     # 0x1bb85
leaq 0x13607(%rip), %rdx     # 0x1bb86
leaq -0x288(%rbp), %rdi
callq 0x169e0
leaq 0x131a0(%rip), %rsi     # 0x1b732
leaq -0xe0(%rbp), %rdi
movq -0x68(%rbp), %r13
movq %r13, %rdx
callq 0x15648
leaq 0x134e7(%rip), %rsi     # 0x1ba93
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 0x85e5
movq %rdx, -0x1e8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x1d8(%rbp)
jmp 0x85ec
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 0x5c40
movq -0x1e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x8631
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8650
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x288(%rbp), %rdi
cmpq %r14, %rdi
je 0x866b
movq -0x278(%rbp), %rsi
incq %rsi
callq 0x31d0
movq (%r13), %rsi
movq -0x38(%rbp), %rdx
subq -0x40(%rbp), %rdx
sarq $0x5, %rdx
leaq 0x130bb(%rip), %rdi     # 0x1b73d
xorl %eax, %eax
callq 0x151ad
leaq -0x258(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq -0x268(%rbp), %rdi
callq 0x16942
leaq -0xe0(%rbp), %rdi
leaq -0x268(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x6778
movq -0x268(%rbp), %rdi
cmpq %r14, %rdi
je 0x86dd
movq -0x258(%rbp), %rsi
incq %rsi
callq 0x31d0
movl -0xe0(%rbp), %ebx
testl %ebx, %ebx
jns 0x879f
movq -0x40(%rbp), %r12
movq -0x38(%rbp), %r15
leaq -0x238(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1305c(%rip), %rsi     # 0x1b761
leaq 0x1306d(%rip), %rdx     # 0x1b779
leaq -0x248(%rbp), %rdi
callq 0x169e0
subq %r12, %r15
shrq $0x5, %r15
addl %r15d, %ebx
leaq -0x248(%rbp), %rdx
movl $0x4, %edi
movl %ebx, %esi
callq 0x4d40
movq -0x248(%rbp), %rdi
cmpq %r14, %rdi
je 0x8750
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x218(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x13d1f(%rip), %rdx     # 0x1c481
leaq -0x228(%rbp), %rdi
movq %rdx, %rsi
callq 0x169e0
leaq -0x228(%rbp), %rdx
movl $0x1, %edi
xorl %esi, %esi
callq 0x4d40
movq -0x228(%rbp), %rdi
cmpq %r14, %rdi
je 0x879f
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 0x16942
leaq 0x12aa9(%rip), %rsi     # 0x1b27d
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 0x8822
movq %rdx, -0x1a8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x198(%rbp)
jmp 0x882a
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 0x13175(%rip), %rsi     # 0x1b9c4
callq 0x3360
leaq -0x110(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8881
movq %rdx, -0x120(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x110(%rbp)
jmp 0x8887
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 0x88dc
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
jmp 0x88e4
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 0x1327f(%rip), %rsi     # 0x1bb85
callq 0x3360
leaq -0x1b8(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8938
movq %rdx, -0x1c8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x1b8(%rbp)
jmp 0x893f
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 0x4d40
movq -0x1c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8984
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
movq %r12, %rbx
je 0x899c
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
movq -0x188(%rbp), %r12
je 0x89c5
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x1a8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x89e0
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0x89fb
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x31d0
cmpl $0x0, -0xe0(%rbp)
jns 0x8a62
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %rbx
leaq -0x1f8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x13a63(%rip), %rdx     # 0x1c481
leaq -0x208(%rbp), %rdi
movq %rdx, %rsi
callq 0x169e0
subq %r15, %rbx
shrq $0x5, %rbx
leaq -0x208(%rbp), %rdx
movl $0x3, %edi
movl %ebx, %esi
callq 0x4d40
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x8a62
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xb0(%rbp), %rsi
leaq 0x12d0a(%rip), %rdi     # 0x1b77a
xorl %eax, %eax
callq 0x151ad
callq 0x572d
leaq 0x10(%r12), %rax
movq %rax, (%r12)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x16942
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8abd
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0xc8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8adc
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x40(%rbp), %rdi
callq 0x14f62
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 0x8ca6
movq -0x1f8(%rbp), %rsi
jmp 0x8c03
jmp 0x8ca3
movq %rax, %rbx
movq -0x228(%rbp), %rdi
cmpq %r14, %rdi
je 0x8ca6
movq -0x218(%rbp), %rsi
jmp 0x8c03
jmp 0x8ca3
movq %rax, %rbx
movq -0x248(%rbp), %rdi
cmpq %r14, %rdi
je 0x8ca6
movq -0x238(%rbp), %rsi
jmp 0x8c03
jmp 0x8ca3
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8b89
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8b89
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x8ba3
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8ba3
movq %rax, %rbx
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x8bca
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8bca
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
cmpq %r12, %rdi
je 0x8bec
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8bec
jmp 0x8be9
movq %rax, %rbx
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0x8ca6
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8ca6
jmp 0x8ca3
movq %rax, %rbx
movq -0x268(%rbp), %rdi
cmpq %r14, %rdi
je 0x8d8c
movq -0x258(%rbp), %rsi
jmp 0x8d84
jmp 0x8d1a
jmp 0x8d1a
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x8c61
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8c61
movq %rax, %rbx
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8c85
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8c85
movq %rax, %rbx
movq -0x288(%rbp), %rdi
cmpq %r14, %rdi
je 0x8d8c
movq -0x278(%rbp), %rsi
jmp 0x8d84
jmp 0x8d1a
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x15726
jmp 0x8d8c
jmp 0x8d67
movq %rax, %rbx
jmp 0x8cfe
movq %rax, %rbx
jmp 0x8ce5
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x8ce5
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x8cfe
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x8d6a
movq -0x130(%rbp), %rsi
jmp 0x8d5d
movq %rax, %rbx
jmp 0x8d8c
movq %rax, %rbx
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x8d8c
movq -0x170(%rbp), %rsi
jmp 0x8d84
jmp 0x8d67
movq %rax, %rbx
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x8d6a
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x8d6a
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x8d8c
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x40(%rbp), %rdi
callq 0x14f62
movq %rbx, %rdi
callq 0x3320