// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: build_code_for_op(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string build_code_for_op(string a_type, string op_name, string b_type)
{
	if (a_type == "int" && b_type == "int") {
		if      (op_name == "+" ) add_assembly_code(ADD);
		else if (op_name == "-" ) add_assembly_code(SUB);
		else if (op_name == "*" ) add_assembly_code(MUL);
		else if (op_name == "/" ) add_assembly_code(DIV);
		else if (op_name == "%" ) add_assembly_code(MOD);
		else if (op_name == "<<") add_assembly_code(SHL);
		else if (op_name == ">>") add_assembly_code(SHR);
		else if (op_name == "&" ) add_assembly_code(AND);
		else if (op_name == "|" ) add_assembly_code(OR);
		else if (op_name == "==") add_assembly_code(EQ);
		else if (op_name == "!=") add_assembly_code(NE);
		else if (op_name == ">=") add_assembly_code(GE);
		else if (op_name == ">" ) add_assembly_code(GT);
		else if (op_name == "<=") add_assembly_code(LE);
		else if (op_name == "<" ) add_assembly_code(LT);
		else if (op_name == "&&") add_assembly_code(LAND);
		else if (op_name == "||") add_assembly_code(LOR);
		else err("Unsupported operator '%s'\n", op_name.c_str());
		return "int";
	} else {
		string name = "operator" + op_name + "(" + a_type + "," + b_type + ")";
		auto it = symbols.find(name);
		if (it == symbols.end()) {
			err("Unknown function '%s'\n", name.c_str());
		}
		auto [ is_code, offset, size, type_name, ret_type, arg_count ] = it->second;
		if (!is_code) {
			err("symbol '%s' is not a function!\n", name.c_str());
		}
		add_assembly_code(PUSH);
		add_assembly_code(CALL, offset, ret_type + " " + name);
		return ret_type;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x1096b(%rip), %rsi     # 0x16ee4
movq %r12, %rdi
callq 0xf4c8
testb %al, %al
je 0x65e6
leaq 0x10958(%rip), %rsi     # 0x16ee4
movq %r15, %rdi
callq 0xf4c8
testb %al, %al
je 0x65e6
leaq 0xfc2a(%rip), %rsi      # 0x161c9
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x67d0
leaq 0x10ece(%rip), %rsi     # 0x17484
leaq -0x368(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0xd
popq %rdi
leaq -0x368(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x368(%rbp), %rdi
jmp 0x6c68
leaq 0x100e7(%rip), %rsi     # 0x166d4
leaq -0x388(%rbp), %r13
movq %r13, %rdi
movq %r14, %rdx
callq 0xf5e4
leaq 0x103c1(%rip), %rdx     # 0x169c7
leaq -0x128(%rbp), %rdi
movq %r13, %rsi
callq 0xf309
leaq -0x148(%rbp), %rdi
leaq -0x128(%rbp), %rsi
movq %r12, %rdx
callq 0xf332
leaq 0xfbda(%rip), %rdx      # 0x1620c
leaq -0xa8(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xf309
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movq %r15, %rdx
callq 0xf332
leaq 0x10526(%rip), %rdx     # 0x16b88
leaq -0xc8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xf309
leaq -0x88(%rbp), %rdi
callq 0x3368
leaq -0xa8(%rbp), %rdi
callq 0x3368
leaq -0x148(%rbp), %rdi
callq 0x3368
leaq -0x128(%rbp), %rdi
callq 0x3368
leaq -0x388(%rbp), %rdi
callq 0x3368
leaq 0x1acd8(%rip), %rdi     # 0x21390
leaq -0xc8(%rbp), %rsi
callq 0x136c0
movq %rax, %r14
testq %rax, %rax
jne 0x66e1
movq -0xc8(%rbp), %rsi
leaq 0x10003(%rip), %rdi     # 0x166dd
xorl %eax, %eax
callq 0xf410
addq $0x28, %r14
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x104b4
cmpb $0x0, -0x30(%rbp)
jne 0x670f
movq -0xc8(%rbp), %rsi
leaq 0xffec(%rip), %rdi      # 0x166f4
xorl %eax, %eax
callq 0xf410
leaq 0x10d6e(%rip), %rsi     # 0x17484
leaq -0x108(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0xf1f8
pushq $0x1
popq %rdi
leaq -0x108(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x80(%rbp), %r14
leaq -0x108(%rbp), %rdi
callq 0x3368
movl 0x48(%r14), %r15d
leaq 0xfb2b(%rip), %rdx      # 0x16280
leaq -0xa8(%rbp), %rdi
movq %r14, %rsi
callq 0xf35b
leaq -0xe8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
callq 0xf332
pushq $0x25
popq %rdi
leaq -0xe8(%rbp), %rdx
movl %r15d, %esi
callq 0x4a27
leaq -0xe8(%rbp), %rdi
callq 0x3368
leaq -0xa8(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3270
leaq -0x88(%rbp), %rdi
callq 0xf1d4
leaq -0xc8(%rbp), %rdi
callq 0x3368
jmp 0x6c83
leaq 0xf9f5(%rip), %rsi      # 0x161cc
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x681a
leaq 0x10c9a(%rip), %rsi     # 0x17484
leaq -0x348(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0xe
popq %rdi
leaq -0x348(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x348(%rbp), %rdi
jmp 0x6c68
leaq 0xf9b0(%rip), %rsi      # 0x161d1
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6864
leaq 0x10c50(%rip), %rsi     # 0x17484
leaq -0x328(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0xf
popq %rdi
leaq -0x328(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x328(%rbp), %rdi
jmp 0x6c68
leaq 0xf96c(%rip), %rsi      # 0x161d7
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x68ae
leaq 0x10c06(%rip), %rsi     # 0x17484
leaq -0x308(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x10
popq %rdi
leaq -0x308(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x308(%rbp), %rdi
jmp 0x6c68
leaq 0xf924(%rip), %rsi      # 0x161d9
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x68f8
leaq 0x10bbc(%rip), %rsi     # 0x17484
leaq -0x2e8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x11
popq %rdi
leaq -0x2e8(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x2e8(%rbp), %rdi
jmp 0x6c68
leaq 0x105da(%rip), %rsi     # 0x16ed9
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6942
leaq 0x10b72(%rip), %rsi     # 0x17484
leaq -0x2c8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x15
popq %rdi
leaq -0x2c8(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x2c8(%rbp), %rdi
jmp 0x6c68
leaq 0xf892(%rip), %rsi      # 0x161db
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x698c
leaq 0x10b28(%rip), %rsi     # 0x17484
leaq -0x2a8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x16
popq %rdi
leaq -0x2a8(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x2a8(%rbp), %rdi
jmp 0x6c68
leaq 0xf858(%rip), %rsi      # 0x161eb
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x69d6
leaq 0x10ade(%rip), %rsi     # 0x17484
leaq -0x288(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x17
popq %rdi
leaq -0x288(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x288(%rbp), %rdi
jmp 0x6c68
leaq 0xf811(%rip), %rsi      # 0x161ee
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6a20
leaq 0x10a94(%rip), %rsi     # 0x17484
leaq -0x268(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x18
popq %rdi
leaq -0x268(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x268(%rbp), %rdi
jmp 0x6c68
leaq 0xf7bb(%rip), %rsi      # 0x161e2
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6a6a
leaq 0x10a4a(%rip), %rsi     # 0x17484
leaq -0x248(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x1a
popq %rdi
leaq -0x248(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x248(%rbp), %rdi
jmp 0x6c68
leaq 0xf774(%rip), %rsi      # 0x161e5
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6ab4
leaq 0x10a00(%rip), %rsi     # 0x17484
leaq -0x228(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x1b
popq %rdi
leaq -0x228(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x228(%rbp), %rdi
jmp 0x6c68
leaq 0xf747(%rip), %rsi      # 0x16202
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6afe
leaq 0x109b6(%rip), %rsi     # 0x17484
leaq -0x208(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x1c
popq %rdi
leaq -0x208(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x208(%rbp), %rdi
jmp 0x6c68
leaq 0xf968(%rip), %rsi      # 0x1646d
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6b48
leaq 0x1096c(%rip), %rsi     # 0x17484
leaq -0x1e8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x1d
popq %rdi
leaq -0x1e8(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x1e8(%rbp), %rdi
jmp 0x6c68
leaq 0xf6b7(%rip), %rsi      # 0x16206
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6b92
leaq 0x10922(%rip), %rsi     # 0x17484
leaq -0x1c8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x1e
popq %rdi
leaq -0x1c8(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x1c8(%rbp), %rdi
jmp 0x6c68
leaq 0x10341(%rip), %rsi     # 0x16eda
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6bdc
leaq 0x108d8(%rip), %rsi     # 0x17484
leaq -0x1a8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x1f
popq %rdi
leaq -0x1a8(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x1a8(%rbp), %rdi
jmp 0x6c68
leaq 0xf607(%rip), %rsi      # 0x161ea
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6c23
leaq 0x1088e(%rip), %rsi     # 0x17484
leaq -0x188(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x20
popq %rdi
leaq -0x188(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x188(%rbp), %rdi
jmp 0x6c68
leaq 0xf5c3(%rip), %rsi      # 0x161ed
movq %r14, %rdi
callq 0xf4c8
testb %al, %al
je 0x6c98
leaq 0x10847(%rip), %rsi     # 0x17484
leaq -0x168(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xf1f8
pushq $0x21
popq %rdi
leaq -0x168(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x168(%rbp), %rdi
callq 0x3368
leaq 0x10270(%rip), %rsi     # 0x16ee4
leaq -0x88(%rbp), %rdx
movq %rbx, %rdi
callq 0xf1f8
movq %rbx, %rax
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rsi
leaq 0xfa17(%rip), %rdi      # 0x166b9
xorl %eax, %eax
callq 0xf410
jmp 0x6c6d
movq %rax, %rbx
leaq -0x168(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x1a8(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x1c8(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x1e8(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x208(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x248(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x268(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x288(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x2a8(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x2c8(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x2e8(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x308(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x328(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x348(%rbp), %rdi
jmp 0x6e8c
jmp 0x6de5
movq %rax, %rbx
leaq -0x368(%rbp), %rdi
jmp 0x6e8c
movq %rax, %rbx
jmp 0x6e91
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x3368
jmp 0x6e01
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
jmp 0x6e16
jmp 0x6e76
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x3368
jmp 0x6e79
jmp 0x6e76
jmp 0x6e71
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x3368
jmp 0x6e35
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x3368
jmp 0x6e46
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
callq 0x3368
jmp 0x6e57
movq %rax, %rbx
leaq -0x128(%rbp), %rdi
callq 0x3368
jmp 0x6e68
movq %rax, %rbx
leaq -0x388(%rbp), %rdi
jmp 0x6e8c
movq %rax, %rbx
jmp 0x6e85
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0xf1d4
leaq -0xc8(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3310