// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/convert.cc
// Function: convertThreeAd(ThreeAd&, std::ostream&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool)
void convertThreeAd(ThreeAd& op, std::ostream& ss, std::set<std::string>& outputSymbols, std::set<std::string>& inputSymbols, bool localScope){
	regVar(op.result);
	
	std::string lhs = op.lhs;
	std::string rhs = op.rhs;

	switch(op.op){
		case '+':
			{
            formatSymbol(rhs, inputSymbols, localScope);
            formatSymbol(lhs, inputSymbols, localScope);
            formatSymbol(op.result, outputSymbols, localScope);

			ss << pre_in << "movq " << lhs << ", %%rax" << post_in;
			ss << pre_in << "addq " << rhs << ", %%rax" << post_in;
			ss << pre_in << "movq " << "%%rax, " << op.result << post_in;
			}
			break;
		case '-':
			{
            formatSymbol(rhs, inputSymbols, localScope);
            formatSymbol(lhs, inputSymbols, localScope);
            formatSymbol(op.result, outputSymbols, localScope);

			ss << pre_in << "movq " << lhs << ", %%rax" << post_in;
			ss << pre_in << "subq " << rhs << ", %%rax" << post_in;
			ss << pre_in << "movq " << "%%rax, " << op.result << post_in;
			}
			break;
		case '*':
            {
            formatSymbol(rhs, inputSymbols, localScope);
            formatSymbol(lhs, inputSymbols, localScope);
            formatSymbol(op.result, outputSymbols, localScope);

			ss << pre_in << "movq " << rhs << ", %%rax" << post_in;
			ss << pre_in << "movq " << lhs << ", %%rbx" << post_in;
			ss << pre_in << "imulq " << "%%rbx" << ", %%rax" << post_in;
			ss << pre_in << "movq " << "%%rax" << ", " << op.result << post_in;
            }
			break;
        case '/':
            {
            formatSymbol(rhs, inputSymbols, localScope);
            formatSymbol(lhs, inputSymbols, localScope);
            formatSymbol(op.result, outputSymbols, localScope);
			
            ss << pre_in << "movq " << lhs << ", %%rax" << post_in;
            ss << pre_in << "movq " << rhs << ", %%rbx" << post_in;
			ss << pre_in << "cqto" << post_in; // Sign extend %rax to %rdx:rax
			ss << pre_in << "idivq " << "%%rbx" << post_in;
			ss << pre_in << "movq " << "%%rax" << ", " << op.result << post_in;
            }
            break;
        case '%':
            {
            formatSymbol(rhs, inputSymbols, localScope);
            formatSymbol(lhs, inputSymbols, localScope);
            formatSymbol(op.result, outputSymbols, localScope);
			
            ss << pre_in << "movq " << lhs << ", %%rax" << post_in;
            ss << pre_in << "movq " << rhs << ", %%rbx" << post_in;
			ss << pre_in << "cqto" << post_in; // Sign extend %rax to %rdx:rax
			ss << pre_in << "idivq " << "%%rbx" << post_in;
			ss << pre_in << "movq " << "%%rdx" << ", " << op.result << post_in;
            }
            break;
		case '=':
        case 'e':
        case '<':
        case '>':
			{
            formatSymbol(rhs, inputSymbols, localScope);
            formatSymbol(lhs, inputSymbols, localScope);

			ss << pre_in << "movq " << lhs << ", %%rax" << post_in;
			ss << pre_in << "movq " << rhs << ", %%rbx" << post_in;
			ss << pre_in << "cmp "  << "%%rbx, %%rax" << post_in;
			}
			break;
		// Copy
		case 'c':
            {
            if (is_string(rhs)){
                //std::cout << "test1: " << lhs << "," << rhs << std::endl;
                formatSymbol(rhs, inputSymbols, localScope);
                addVar(lhs, VT_POINTER, "");
                add_brackets(lhs);
            }
            else if (is_digits(rhs)){
                formatSymbol(lhs, inputSymbols, localScope);
                std::stringstream tempss;
                tempss << "$" << rhs;
                rhs = tempss.str();
            }
            else {
                formatSymbol(lhs, inputSymbols, localScope);
                formatSymbol(rhs, inputSymbols, localScope);
            }
            ss << pre_in << "movq " << rhs << ", " << "%%rax" << post_in;
            ss << pre_in << "movq " << "%%rax" << ", " << lhs << post_in;
            }
			break;
        // Function argument
        case 'a':
            // TODO: Support for multiple arguments
            formatSymbol(lhs, inputSymbols, localScope);
            // Push to stack
            ss << pre_in << "movq %%rdi, " << lhs << post_in;
            break;
        // Function Return
		case 'r':
            {
            formatSymbol(lhs, inputSymbols, localScope);
			ss << pre_in << "movq " << lhs << ", " << "%%rax" << post_in;
            }
			break;
		// Call function
		case 'f':
            {
            // FIXME: Ugly type check and convertion
            std::string funcname = lhs;
            if (funcname == "print" || funcname == "io_write"){
                bool is_int = false;
                if (is_digits(rhs))
                    is_int = true;
                else {
                    auto arginfo = vars2.find(rhs);
                    if (arginfo != vars2.end()){
                        if ((*arginfo).second.first == VT_INT)
                            is_int = true;
                        else if ((*arginfo).second.first == VT_UNKNOWN)
                            is_int = true;
                    }
                }
                
                if (is_int){
                    if (lhs == "print")
                        funcname = "print_i";
                    else
                        funcname = "io_write_i";
                }
            }

            formatSymbol(op.result, outputSymbols, localScope);
            formatSymbol(rhs, inputSymbols, localScope);

            // Set arguments
            // FIXME: Only supports one argument :(
            ss << pre_in << "movq " << rhs << ", %%rdi" << post_in;
           
            // Call
            ss << pre_in << "call " << funcname << post_in;
            // Move return 
            ss << pre_in << "movq " << "%%rax, " << op.result << post_in;
            }
			break;
        default:
            std::cout << "Unknown 3ac: " << op.op << std::endl;
            exit(-1);
	 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movl %r8d, %r14d
movq %rcx, %r12
movq %rdx, -0x78(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %rbx
leaq -0xc8(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %r15
movq %r15, %rdi
callq 0x4baa
movq %r15, %rdi
callq 0xc60d
movq -0xd8(%rbp), %rdi
cmpq %r13, %rdi
je 0xaf14
callq 0x3230
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x4baa
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x4baa
leaq 0x8(%rbx), %r15
leaq 0x10(%rbx), %r13
movzbl (%rbx), %eax
cmpl $0x60, %eax
jg 0xb177
leal -0x25(%rax), %ecx
cmpl $0xa, %ecx
ja 0xb1dd
leaq 0xa371(%rip), %rax      # 0x152e4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzbl %r14b, %ebx
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
movq %r15, %rdi
movq -0x78(%rbp), %rsi
movl %ebx, %edx
callq 0xc1b8
movq 0x123ef(%rip), %rsi     # 0x1d3a0
movq 0x123f0(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa6a4(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa6c2(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x123ba(%rip), %rsi     # 0x1d3c0
movq 0x123bb(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x12384(%rip), %rsi     # 0x1d3a0
movq 0x12385(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa639(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa62c(%rip), %rsi      # 0x15689
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x1234f(%rip), %rsi     # 0x1d3c0
movq 0x12350(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x12319(%rip), %rsi     # 0x1d3a0
movq 0x1231a(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa5f7(%rip), %rsi      # 0x15698
movl $0x4, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x1230b(%rip), %rsi     # 0x1d3c0
movq 0x1230c(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x122d5(%rip), %rsi     # 0x1d3a0
movq 0x122d6(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa5b8(%rip), %rsi      # 0x1569d
movl $0x6, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0xa592(%rip), %rsi      # 0x1568b
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x122b3(%rip), %rsi     # 0x1d3c0
movq 0x122b4(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x1227d(%rip), %rsi     # 0x1d3a0
movq 0x1227e(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa532(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0xa553(%rip), %rsi      # 0x156a4
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
leaq 0xa561(%rip), %rsi      # 0x156c6
movl $0x2, %edx
movq %rbx, %rdi
callq 0x32b0
jmp 0xbe92
leal -0x61(%rax), %ecx
cmpl $0x5, %ecx
ja 0xb326
leaq 0xa186(%rip), %rax      # 0x15310
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzbl %r14b, %edx
leaq -0x70(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0xc1b8
movq 0x121f3(%rip), %rsi     # 0x1d3a0
movq 0x121f4(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa4f5(%rip), %rsi      # 0x156bc
movl $0xc, %edx
movq %rax, %rdi
callq 0x32b0
leaq -0x68(%rbp), %r13
jmp 0xbe92
addl $-0x3c, %eax
cmpl $0x3, %eax
jae 0xbef0
movzbl %r14b, %ebx
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
movq 0x12190(%rip), %rsi     # 0x1d3a0
movq 0x12191(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa445(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa463(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x1215b(%rip), %rsi     # 0x1d3c0
movq 0x1215c(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x12125(%rip), %rsi     # 0x1d3a0
movq 0x12126(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa3da(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa3cd(%rip), %rsi      # 0x15689
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x120f0(%rip), %rsi     # 0x1d3c0
movq 0x120f1(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x120ba(%rip), %rsi     # 0x1d3a0
movq 0x120bb(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa3aa(%rip), %rsi      # 0x156aa
movl $0x4, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0xa39b(%rip), %rsi      # 0x156af
movl $0xc, %edx
movq %rbx, %rdi
callq 0x32b0
jmp 0xbea4
cmpl $0x72, %eax
jne 0xbef0
movzbl %r14b, %edx
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0xc1b8
movq 0x1205a(%rip), %rsi     # 0x1d3a0
movq 0x1205b(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa30f(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa33f(%rip), %rsi      # 0x156c6
movl $0x2, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0xa31b(%rip), %rsi      # 0x156b6
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
jmp 0xbea4
movq -0x50(%rbp), %rax
cmpb $0x22, (%rax)
jne 0xbce2
movq -0x48(%rbp), %rcx
cmpb $0x22, -0x1(%rax,%rcx)
jne 0xbce2
movzbl %r14b, %edx
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0xc1b8
leaq -0xa8(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x4baa
leaq -0x88(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0xc4ce(%rip), %rdx      # 0x178dc
leaq -0x98(%rbp), %rdi
movq %rdx, %rsi
callq 0x8e3a
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rdx
movl $0x2, %esi
callq 0x91f7
movq -0x98(%rbp), %rdi
cmpq %r12, %rdi
je 0xb446
callq 0x3230
movq -0xb8(%rbp), %rdi
cmpq %r14, %rdi
je 0xb457
callq 0x3230
leaq -0x70(%rbp), %rdi
callq 0xc0d6
jmp 0xbdb5
leaq -0x270(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
leaq -0x280(%rbp), %rdi
callq 0x4baa
leaq 0xa23b(%rip), %rsi      # 0x156c9
leaq -0x280(%rbp), %rdi
callq 0x30a0
testl %eax, %eax
je 0xb4b5
leaq 0xa22a(%rip), %rsi      # 0x156cf
leaq -0x280(%rbp), %rdi
callq 0x30a0
testl %eax, %eax
jne 0xb519
leaq -0x50(%rbp), %rdi
callq 0xbfed
testb %al, %al
jne 0xb4e9
leaq 0x11f17(%rip), %rdi     # 0x1d3e0
leaq -0x50(%rbp), %rsi
callq 0xce92
leaq 0x11f0f(%rip), %rcx     # 0x1d3e8
cmpq %rcx, %rax
je 0xb519
movl 0x40(%rax), %eax
orl $0x4, %eax
cmpl $0x5, %eax
jne 0xb519
leaq 0xa1d9(%rip), %rsi      # 0x156c9
leaq -0x70(%rbp), %rdi
callq 0x30a0
testl %eax, %eax
leaq 0xa1d6(%rip), %rax      # 0x156d8
leaq 0xa1d7(%rip), %rsi      # 0x156e0
cmoveq %rax, %rsi
leaq -0x280(%rbp), %rdi
callq 0x3350
movzbl %r14b, %ebx
movq %r15, %rdi
movq -0x78(%rbp), %rsi
movl %ebx, %edx
callq 0xc1b8
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
movq 0x11e60(%rip), %rsi     # 0x1d3a0
movq 0x11e61(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa115(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9f61(%rip), %rsi      # 0x154e2
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x11e2b(%rip), %rsi     # 0x1d3c0
movq 0x11e2c(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11df5(%rip), %rsi     # 0x1d3a0
movq 0x11df6(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa126(%rip), %rsi      # 0x156eb
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x280(%rbp), %rsi
movq -0x278(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq 0x11dd1(%rip), %rsi     # 0x1d3c0
movq 0x11dd2(%rip), %rdx     # 0x1d3c8
movq %rax, %rdi
callq 0x32b0
movq 0x11d9b(%rip), %rsi     # 0x1d3a0
movq 0x11d9c(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0xa050(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0xa048(%rip), %rsi      # 0x1567b
movl $0x7, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%r15), %rsi
movq (%r13), %rdx
movq %rbx, %rdi
callq 0x32b0
movq 0x11d6a(%rip), %rsi     # 0x1d3c0
movq 0x11d6b(%rip), %rdx     # 0x1d3c8
movq %rax, %rdi
callq 0x32b0
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0xbeba
callq 0x3230
jmp 0xbeba
movzbl %r14b, %ebx
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
movq %r15, %rdi
movq -0x78(%rbp), %rsi
movl %ebx, %edx
callq 0xc1b8
movq 0x11ce5(%rip), %rsi     # 0x1d3a0
movq 0x11ce6(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9f9a(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9fb8(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x11cb0(%rip), %rsi     # 0x1d3c0
movq 0x11cb1(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11c7a(%rip), %rsi     # 0x1d3a0
movq 0x11c7b(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9f2f(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9f22(%rip), %rsi      # 0x15689
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x11c45(%rip), %rsi     # 0x1d3c0
movq 0x11c46(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11c0f(%rip), %rsi     # 0x1d3a0
movq 0x11c10(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9eed(%rip), %rsi      # 0x15698
movl $0x4, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x11c01(%rip), %rsi     # 0x1d3c0
movq 0x11c02(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11bcb(%rip), %rsi     # 0x1d3a0
movq 0x11bcc(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9eae(%rip), %rsi      # 0x1569d
movl $0x6, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x9e88(%rip), %rsi      # 0x1568b
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x11ba9(%rip), %rsi     # 0x1d3c0
movq 0x11baa(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11b73(%rip), %rsi     # 0x1d3a0
movq 0x11b74(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9e28(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x9e5b(%rip), %rsi      # 0x156b6
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
leaq 0x9e57(%rip), %rsi      # 0x156c6
movl $0x2, %edx
movq %rbx, %rdi
callq 0x32b0
jmp 0xbe92
movzbl %r14b, %ebx
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
movq %r15, %rdi
movq -0x78(%rbp), %rsi
movl %ebx, %edx
callq 0xc1b8
movq 0x11aea(%rip), %rsi     # 0x1d3a0
movq 0x11aeb(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9d9f(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9dbd(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x11ab5(%rip), %rsi     # 0x1d3c0
movq 0x11ab6(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11a7f(%rip), %rsi     # 0x1d3a0
movq 0x11a80(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9d48(%rip), %rsi      # 0x15683
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9d52(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x11a4a(%rip), %rsi     # 0x1d3c0
movq 0x11a4b(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11a14(%rip), %rsi     # 0x1d3a0
movq 0x11a15(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9cc9(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x9cc1(%rip), %rsi      # 0x1567b
movl $0x7, %edx
movq %rbx, %rdi
callq 0x32b0
jmp 0xbe92
movzbl %r14b, %ebx
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
movq %r15, %rdi
movq -0x78(%rbp), %rsi
movl %ebx, %edx
callq 0xc1b8
movq 0x1199f(%rip), %rsi     # 0x1d3a0
movq 0x119a0(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9c54(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9c72(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x1196a(%rip), %rsi     # 0x1d3c0
movq 0x1196b(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11934(%rip), %rsi     # 0x1d3a0
movq 0x11935(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9bef(%rip), %rsi      # 0x15675
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9c07(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x118ff(%rip), %rsi     # 0x1d3c0
movq 0x11900(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x118c9(%rip), %rsi     # 0x1d3a0
movq 0x118ca(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9b7e(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x9b76(%rip), %rsi      # 0x1567b
movl $0x7, %edx
movq %rbx, %rdi
callq 0x32b0
jmp 0xbe92
movzbl %r14b, %ebx
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
movq %r15, %rdi
movq -0x78(%rbp), %rsi
movl %ebx, %edx
callq 0xc1b8
movq 0x11854(%rip), %rsi     # 0x1d3a0
movq 0x11855(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9b09(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9b27(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x1181f(%rip), %rsi     # 0x1d3c0
movq 0x11820(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x117e9(%rip), %rsi     # 0x1d3a0
movq 0x117ea(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9a9e(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9a91(%rip), %rsi      # 0x15689
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x117b4(%rip), %rsi     # 0x1d3c0
movq 0x117b5(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x1177e(%rip), %rsi     # 0x1d3a0
movq 0x1177f(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9a55(%rip), %rsi      # 0x15691
movl $0x6, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x9a3b(%rip), %rsi      # 0x1568b
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
leaq 0x9a50(%rip), %rsi      # 0x156b4
movl $0x7, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x11748(%rip), %rsi     # 0x1d3c0
movq 0x11749(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11712(%rip), %rsi     # 0x1d3a0
movq 0x11713(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x99c7(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x99fa(%rip), %rsi      # 0x156b6
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
leaq 0x99f6(%rip), %rsi      # 0x156c6
movl $0x2, %edx
movq %rbx, %rdi
callq 0x32b0
jmp 0xbe92
leaq -0x50(%rbp), %rdi
callq 0xbfed
testb %al, %al
je 0xbd95
movzbl %r14b, %edx
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0xc1b8
leaq -0x280(%rbp), %rdi
callq 0x31a0
leaq -0x270(%rbp), %rbx
leaq 0x9943(%rip), %rsi      # 0x15660
movl $0x1, %edx
movq %rbx, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
leaq -0x268(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x3400
leaq -0x50(%rbp), %rdi
leaq -0xf8(%rbp), %rbx
movq %rbx, %rsi
callq 0x3320
movq (%rbx), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0xbd74
callq 0x3230
movq 0x1121d(%rip), %rsi     # 0x1cf98
leaq -0x280(%rbp), %rdi
callq 0x31c0
leaq -0x200(%rbp), %rdi
callq 0x30c0
jmp 0xbdb5
movzbl %r14b, %ebx
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xc1b8
movq 0x115e4(%rip), %rsi     # 0x1d3a0
movq 0x115e5(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x9899(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x98c9(%rip), %rsi      # 0x156c6
movl $0x2, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x98a5(%rip), %rsi      # 0x156b6
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x1159b(%rip), %rsi     # 0x1d3c0
movq 0x1159c(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq 0x11565(%rip), %rsi     # 0x1d3a0
movq 0x11566(%rip), %rdx     # 0x1d3a8
movq -0x30(%rbp), %rdi
callq 0x32b0
movq %rax, %rbx
leaq 0x981a(%rip), %rsi      # 0x1566f
movl $0x5, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x984d(%rip), %rsi      # 0x156b6
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32b0
leaq 0x9849(%rip), %rsi      # 0x156c6
movl $0x2, %edx
movq %rbx, %rdi
callq 0x32b0
leaq -0x68(%rbp), %r13
leaq -0x70(%rbp), %r15
movq (%r15), %rsi
movq (%r13), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %rbx
movq 0x11515(%rip), %rsi     # 0x1d3c0
movq 0x11516(%rip), %rdx     # 0x1d3c8
movq %rbx, %rdi
callq 0x32b0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xbecc
callq 0x3230
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xbede
callq 0x3230
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x110d9(%rip), %rdi     # 0x1cfd0
leaq 0x97f3(%rip), %rsi      # 0x156f1
movl $0xd, %edx
callq 0x32b0
movb (%rbx), %al
leaq -0x280(%rbp), %rsi
movb %al, (%rsi)
movq 0x110b6(%rip), %rdi     # 0x1cfd0
movl $0x1, %edx
callq 0x32b0
movq %rax, %rdi
callq 0x3110
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3310
movq %rax, %rbx
movq -0x98(%rbp), %rdi
cmpq %r12, %rdi
je 0xbf4f
callq 0x3230
jmp 0xbf4f
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r14, %rdi
jne 0xbfb7
jmp 0xbfc1
jmp 0xbfa1
jmp 0xbf65
jmp 0xbfbe
jmp 0xbfa1
movq %rax, %rbx
movq 0x11029(%rip), %rsi     # 0x1cf98
leaq -0x280(%rbp), %rdi
callq 0x31c0
leaq -0x200(%rbp), %rdi
callq 0x30c0
jmp 0xbfc1
jmp 0xbfbe
movq %rax, %rbx
jmp 0xbfd3
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r13, %rdi
jne 0xbfe0
jmp 0xbfe5
movq %rax, %rbx
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0xbfc1
callq 0x3230
jmp 0xbfc1
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xbfd3
callq 0x3230
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xbfe5
callq 0x3230
movq %rbx, %rdi
callq 0x3470