// File: yanlinlin82[P]icpp/icpp.cpp
// Function: add_symbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned long, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void add_symbol(string name, bool is_code, size_t offset, size_t size, string type, string ret_type, int arg_count)
{
	log<3>("[DEBUG] add %s symbol: '%s', offset=%zd, size=%zd, type='%s', ret_type='%s', arg_count = %d\n",
			(is_code ? "code" : "data"), name.c_str(),
			offset, size, type.c_str(), ret_type.c_str(), arg_count);
	symbols[name] = make_tuple(is_code, offset, size, type, ret_type, arg_count);
	if (is_code) {
		code_symbol_dict.insert(make_pair(offset, name));
	} else {
		data_symbol_dict.insert(make_pair(offset, name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %r9, -0x128(%rbp)
movq %r8, -0x120(%rbp)
movq %rdi, -0x118(%rbp)
movb %sil, %al
movl 0x10(%rbp), %esi
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
testb $0x1, -0x9(%rbp)
je 0x4895
leaq 0x329ad(%rip), %rax     # 0x37239
movq %rax, -0x130(%rbp)
jmp 0x48a5
leaq 0x329a2(%rip), %rax     # 0x3723e
movq %rax, -0x130(%rbp)
jmp 0x48a5
movq -0x118(%rbp), %rdi
movq -0x130(%rbp), %rax
movq %rax, -0x160(%rbp)
callq 0x3110
movq -0x120(%rbp), %rdi
movq %rax, -0x158(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x148(%rbp)
callq 0x3110
movq -0x128(%rbp), %rdi
movq %rax, -0x140(%rbp)
callq 0x3110
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
movq -0x150(%rbp), %rcx
movq -0x148(%rbp), %r8
movq -0x140(%rbp), %r9
movq %rax, %rdi
movl 0x10(%rbp), %r10d
movq %rsp, %rax
movl %r10d, 0x8(%rax)
movq %rdi, (%rax)
leaq 0x328a6(%rip), %rdi     # 0x371dc
xorl %eax, %eax
callq 0x19760
movq -0x120(%rbp), %r8
movq -0x128(%rbp), %r9
movq %rsp, %rax
leaq 0x10(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x90(%rbp), %rdi
leaq -0x9(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x19800
movq -0x118(%rbp), %rsi
leaq 0x4bc6d(%rip), %rdi     # 0x505e8
callq 0x19860
movq %rax, -0x138(%rbp)
jmp 0x4989
movq -0x138(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x19890
leaq -0x90(%rbp), %rdi
callq 0x198d0
testb $0x1, -0x9(%rbp)
je 0x4a63
movq -0x118(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x178(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x19930
movq -0x178(%rbp), %rsi
leaq 0x4bc7a(%rip), %rdi     # 0x50658
callq 0x198f0
movb %dl, -0x169(%rbp)
movq %rax, -0x168(%rbp)
jmp 0x49f2
movb -0x169(%rbp), %al
movq -0x168(%rbp), %rcx
movq %rcx, -0xd8(%rbp)
movb %al, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x19970
jmp 0x4aeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x198d0
jmp 0x4af4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x19970
jmp 0x4af4
movq -0x118(%rbp), %rdx
leaq -0x100(%rbp), %rdi
movq %rdi, -0x190(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x19930
movq -0x190(%rbp), %rsi
leaq 0x4bb91(%rip), %rdi     # 0x50620
callq 0x198f0
movb %dl, -0x181(%rbp)
movq %rax, -0x180(%rbp)
jmp 0x4aa3
movb -0x181(%rbp), %al
movq -0x180(%rbp), %rcx
movq %rcx, -0x110(%rbp)
movb %al, -0x108(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x19970
jmp 0x4aeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x19970
jmp 0x4af4
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x3460