// File: /workspace/github_cpp_makefile_star2_O2/rohitrangan[P]3PC/src/server_fail.cpp
// Function: main
int main(int argc, char *argv[])
{
    /* Signal handling to shutdown the ports and the server. */
    struct sigaction sigint_handler;
    sigint_handler.sa_handler = server_shutdown;
    sigemptyset (&sigint_handler.sa_mask);
    sigint_handler.sa_flags = 0;
    if (sigaction(SIGINT, &sigint_handler, NULL) < 0)
    {
        cerr << "ERROR! Cannot Start Signal Handler\n\n";
        return 1;
    }

    if (argc != 4)
    {
        cout << "Not enough parameters.\n";
        return 1;
    }

    int site_id = std::stoi (string (argv[1]));
    int tid_fail = std::stoi (string (argv[2]));
    int fail_loc = std::stoi (string (argv[3]));
    srand (time (NULL));
	//Socket site;
	std::map<int, int> sites;
	sites[0] = 6666;
	sites[1] = 6667;
	sites[2] = 6668;
	site.bind (sites[site_id]);
	set<int> txLive;
	map<int,transaction_info> trans_table;
	site.listen(100);
	cout << "Server " << site_id << " Up" << endl;
	while(1)
	{
		Socket inc = site.accept();
		string str;
        str = inc.recv ((size_t) 1024);
        //cout << "Received str:- " << str << endl;
		Message msg(str);
        string tempStr, snd_msg;
        transaction_info new_t;
		switch(msg.message)
		{
			case TRANSACTION:
            {
                new_t.numVotes = 1;
                new_t.site_st = S_INIT;
                new_t.coordinator = site_id;
				trans_table[msg.transaction_id] = new_t;
                cout << "Site " << site_id << " accepted transaction " <<
                    msg.transaction_id << endl;
				Message tempMsg(START_VOTE,msg.transaction_id, site_id);
				tempStr = tempMsg.createMessage();
				txLive.insert(msg.transaction_id);
				for(int i = 0; i < sites.size();i++)
				{
                    Socket temp;
                    if (i != site_id)
                    {
					    if (temp.connect("localhost", sites[i]) < 0)
                        {
                            cout << "Site " << site_id << " timed out in State "
                                << "INITIAL" << endl;
                            termination_protocol (site_id, i, site, true, sites,
                                    txLive, trans_table);
                            cout << "Site " << site_id << " ended TERMINATION"
                                << endl;
                            sites.erase (i);
                            break;
                        }
					    temp.send(tempStr);
                        cout << "[" << msg.transaction_id << "]Site " << site_id
                            << " sent START_VOTE to Site " << i << endl;
                    }
				}
                trans_table[msg.transaction_id].site_st = S_WAIT;
                if ((fail_loc == 2) && (msg.transaction_id > tid_fail))
                {
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " is FAILING" << endl;
                    exit (1);
                }
				break;
            }
			case VOTE_COMMIT:
            {
				trans_table[msg.transaction_id].numVotes++;
                cout << "[" << msg.transaction_id << "]Site " << site_id
                    << " got VOTE_COMMIT from Site " << msg.site_id << endl;
				if(trans_table[msg.transaction_id].numVotes==sites.size())
				{
                    cout << "[" << msg.transaction_id << "]Site " << site_id <<
                        " has all vote commits." << endl;
					Message tempMsg(PRE_COMMIT,msg.transaction_id, site_id);
					tempStr = tempMsg.createMessage();
					for(int i = 0; i < sites.size();i++)
					{
                        Socket temp;
                        if (i != site_id)
                        {
						    if (temp.connect("localhost", sites[i]) < 0)
                            {
                                cout << "Site " << site_id << " timed out in "
                                    << "State WAIT" << endl;
                                termination_protocol (site_id, i, site, true,
                                        sites, txLive, trans_table);
                                cout << "Site " << site_id << " ended "
                                    "TERMINATION" << endl;
                                sites.erase (i);
                                break;
                            }
                            temp.send(tempStr);
                            cout << "[" << msg.transaction_id << "]Site " <<
                                site_id << " sent PRE_COMMIT to Site " << i <<
                                endl;
                        }
					}
					trans_table[msg.transaction_id].site_st = S_PRE_COMMIT;
					trans_table[msg.transaction_id].numVotes = 1;
				}
				break;
            }
			case VOTE_ABORT:
            {
                if(txLive.find(msg.transaction_id) != txLive.end())
                {
                    Message tempMsg(ABORT,msg.transaction_id, site_id);
                    tempStr = tempMsg.createMessage();
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " got VOTE_ABORT from Site " << msg.site_id << endl;
                    for(int i = 0; i < sites.size();i++)
                    {
                        Socket temp;
                        if (i != site_id)
                        {
                            if (temp.connect("localhost", sites[i]) < 0)
                            {
                                cout << "Site " << site_id << " timed out in "
                                    << "State WAIT" << endl;
                                termination_protocol (site_id, i, site, true,
                                        sites, txLive, trans_table);
                                cout << "Site " << site_id << " ended "
                                    << "TERMINATION" << endl;
                                sites.erase (i);
                                break;
                            }
                            temp.send(tempStr);
                            cout << "[" << msg.transaction_id << "]Site " <<
                                site_id << " sent ABORT to Site " << i <<
                                endl;
                        }
                    }
                    txLive.erase(msg.transaction_id);
                    trans_table[msg.transaction_id].site_st = S_ABORT;
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                            << " ABORTED" << "\n\n\n";
                }
				break;
            }
			case ACK:
            {
                cout << "[" << msg.transaction_id << "]Site " << site_id
                    << " got ACK from Site " << msg.site_id << endl;
				trans_table[msg.transaction_id].numVotes++;
				if(trans_table[msg.transaction_id].numVotes==sites.size())
				{
					Message tempMsg(COMMIT, msg.transaction_id, site_id);
					string tempStr = tempMsg.createMessage();
					for(int i = 0; i < sites.size();i++)
					{
                        Socket temp;
                        if (i != site_id)
                        {
                            if (temp.connect("localhost", sites[i]) < 0)
                            {
                                cout << "Site " << site_id << " timed out in "
                                    << "State PRE_COMMIT" << endl;
                                termination_protocol (site_id, i, site, true,
                                        sites, txLive, trans_table);
                                cout << "Site " << site_id << " ended "
                                    "TERMINATION" << endl;
                                sites.erase (i);
                                break;
                            }
                            temp.send(tempStr);
                            cout << "[" << msg.transaction_id << "]Site " <<
                            site_id << " sent COMMIT to Site " << i <<
                            endl;
                        }
					}
					trans_table[msg.transaction_id].site_st = S_COMMIT;
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " COMMITTED" << "\n\n\n";
                    txLive.erase (msg.transaction_id);
				}
				break;
            }
            case START_VOTE:
            {
                cout << "[" << msg.transaction_id << "]Site " << site_id
                    << " got START_VOTE from Site " << msg.site_id << endl;
                if ((fail_loc == 0) && (msg.transaction_id > tid_fail))
                {
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " is FAILING" << endl;
                    exit (1);
                }
                txLive.insert (msg.transaction_id);
                new_t.numVotes = -1;
                new_t.site_st = S_INIT;
                new_t.coordinator = msg.site_id;
				trans_table[msg.transaction_id] = new_t;
                Socket tmp;
                int will_abort = rand () % ABORT_DENOM;
                if (will_abort < ABORT_NUM)
                {
                    Message vote_abort (VOTE_ABORT, msg.transaction_id,
                                site_id);
                    snd_msg = vote_abort.createMessage ();
                    if (tmp.connect("localhost", sites[msg.site_id]) < 0)
                    {
                        cout << "Site " << site_id << " timed out in "
                            << "State INITIAL" << endl;
                        termination_protocol (site_id, msg.site_id, site, true,
                                sites, txLive, trans_table);
                        cout << "Site " << site_id << " ended "
                            "TERMINATION" << endl;
                        sites.erase (msg.site_id);
                        break;
                    }
                    tmp.send (snd_msg);
                    trans_table[msg.transaction_id].site_st = S_ABORT;
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " sent VOTE_ABORT to Site " << msg.site_id << endl;
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " ABORTED." << "\n\n\n";
                    txLive.erase (msg.transaction_id);
                }
                else
                {
                    Message vote_commit (VOTE_COMMIT, msg.transaction_id,
                                site_id);
                    snd_msg = vote_commit.createMessage ();
                    if (tmp.connect("localhost", sites[msg.site_id]) < 0)
                    {
                        cout << "Site " << site_id << " timed out in "
                            << "State INITIAL" << endl;
                        termination_protocol (site_id, msg.site_id, site, true,
                                sites, txLive, trans_table);
                        cout << "Site " << site_id << " ended "
                            "TERMINATION" << endl;
                        sites.erase (msg.site_id);
                        break;
                    }
                    tmp.send (snd_msg);
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " sent VOTE_COMMIT to Site " << msg.site_id << endl;
                    trans_table[msg.transaction_id].site_st = S_READY;
                }
                break;
            }
            case PRE_COMMIT:
            {
                Socket tmp;
                cout << "[" << msg.transaction_id << "]Site " << site_id
                    << " got PRE_COMMIT from Site " << msg.site_id << endl;
                if ((fail_loc == 1) && (msg.transaction_id > tid_fail))
                {
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " is FAILING" << endl;
                    exit (1);
                }
                Message ack (ACK, msg.transaction_id, site_id);
                snd_msg = ack.createMessage ();
                if (tmp.connect("localhost", sites[msg.site_id]) < 0)
                {
                    cout << "Site " << site_id << " timed out in "
                        << "State READY" << endl;
                    termination_protocol (site_id, msg.site_id, site, true,
                            sites, txLive, trans_table);
                    cout << "Site " << site_id << " ended "
                        "TERMINATION" << endl;
                    sites.erase (msg.site_id);
                    break;
                }
                tmp.send (snd_msg);
                cout << "[" << msg.transaction_id << "]Site " << site_id
                    << " sent ACK to Site " << msg.site_id << endl;
                trans_table[msg.transaction_id].site_st = S_PRE_COMMIT;
                break;
            }
            case COMMIT:
            {
                if(txLive.find(msg.transaction_id) != txLive.end())
                {
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " got COMMIT from Site " << msg.site_id << endl;
                    trans_table[msg.transaction_id].site_st = S_COMMIT;
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " COMMITTED" << "\n\n\n";
                    txLive.erase (msg.transaction_id);
                }
                break;
            }
            case ABORT:
            {
                if(txLive.find(msg.transaction_id) != txLive.end())
                {
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " got ABORT from Site " << msg.site_id << endl;
                    trans_table[msg.transaction_id].site_st = S_ABORT;
                    cout << "[" << msg.transaction_id << "]Site " << site_id
                        << " ABORTED" << "\n\n\n";
                    txLive.erase (msg.transaction_id);
                }
                break;
            }
            case TERMINATION:
            {
                cout << "Site " << site_id << " got TERMINATION" << endl;
                Socket tmp;
                Message ack (ACK, msg.transaction_id, site_id);
                snd_msg = ack.createMessage ();
                if (tmp.connect ("localhost", sites[msg.site_id]) < 0)
                {
                    cout << "COULD NOT CONNECT!!!!\n";
                    cout << "Error number = " << errno << endl;
                }
                tmp.send (snd_msg);
                termination_protocol (site_id, msg.failed_id, site, false,
                        sites, txLive, trans_table);
                cout << "Site " << site_id << " finished TERMINATION" << endl;
                sites.erase (msg.failed_id);
                break;
            }
            default:
                return -1;

		}

	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
movq %rsi, %rbx
movl %edi, %ebp
leaq -0x74(%rip), %rax       # 0x273c
leaq 0x3d8(%rsp), %r14
movq %rax, -0x8(%r14)
movq %r14, %rdi
callq 0x22f0
andl $0x0, 0x80(%r14)
pushq $0x2
popq %rdi
leaq 0x3d0(%rsp), %rsi
xorl %edx, %edx
callq 0x2300
testl %eax, %eax
js 0x42fa
cmpl $0x4, %ebp
jne 0x430a
movq 0x8(%rbx), %rsi
leaq 0x58(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x472e
movl %eax, %ebp
leaq 0x58(%rsp), %rdi
callq 0x2100
movl %ebp, 0x14(%rsp)
movq 0x10(%rbx), %rsi
leaq 0x58(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x472e
movl %eax, 0x8c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x2100
movq 0x18(%rbx), %rsi
leaq 0x58(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x472e
movl %eax, 0x90(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x2100
xorl %edi, %edi
callq 0x2210
movl %eax, %edi
callq 0x2230
leaq 0x60(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x98(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x58(%rsp), %rdi
callq 0x4786
movl $0x1a0a, (%rax)         # imm = 0x1A0A
leaq 0x98(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x58(%rsp), %rdi
callq 0x4786
movl $0x1a0b, (%rax)         # imm = 0x1A0B
leaq 0x98(%rsp), %rsi
movl $0x2, (%rsi)
leaq 0x58(%rsp), %rdi
callq 0x4786
movl $0x1a0c, (%rax)         # imm = 0x1A0C
leaq 0x58(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x47d4
movl (%rax), %esi
leaq 0x98f1(%rip), %rdi      # 0xc218
callq 0x56e4
leaq 0xa0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0xd0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x98ab(%rip), %rdi      # 0xc218
pushq $0x64
popq %rsi
callq 0x5770
movq 0x964c(%rip), %rdi      # 0xbfc8
leaq 0x5743(%rip), %rsi      # 0x80c6
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x5733(%rip), %rsi      # 0x80ce
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x2c(%rsp), %r15
xorl %r12d, %r12d
leaq 0x168(%rsp), %rbp
leaq 0x28(%rsp), %r14
leaq 0x190(%rsp), %r13
movl %r12d, 0x20(%rsp)
movq %rbp, %rdi
leaq 0x9841(%rip), %rsi      # 0xc218
callq 0x5778
leaq 0x180(%rsp), %rax
movq %rax, 0x170(%rsp)
andq $0x0, 0x178(%rsp)
movb $0x0, 0x180(%rsp)
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
movq %rbp, %rsi
callq 0x566e
leaq 0x170(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22e0
movq %r14, %rdi
callq 0x2100
leaq 0x3b0(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2340
movq %r14, %rdi
movq %rbp, %r14
movq %r12, %rsi
callq 0x5a6a
movq %r12, %rdi
callq 0x2100
leaq 0x158(%rsp), %rax
movq %rax, 0x148(%rsp)
andq $0x0, 0x150(%rsp)
xorl %ebp, %ebp
movb %bpl, 0x158(%rsp)
leaq 0x138(%rsp), %rax
movq %rax, 0x128(%rsp)
andq $0x0, 0x130(%rsp)
movb %bpl, 0x138(%rsp)
movl 0x28(%rsp), %eax
pushq $-0x1
popq %r12
cmpq $0x8, %rax
ja 0x428a
leaq 0x5556(%rip), %rcx      # 0x8004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x14(%rsp), %ebp
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
movq $0x1, (%rax)
movl %ebp, 0x8(%rax)
movq 0x94ec(%rip), %rdi      # 0xbfc8
leaq 0x576e(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x55d4(%rip), %rsi      # 0x80d2
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
movl 0x2c(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0x5a2e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b4c
leaq 0x1f0(%rsp), %rbx
movq %r15, %rbp
leaq 0x148(%rsp), %rdi
movq %r13, %rsi
callq 0x22e0
movq %r13, %rdi
callq 0x2100
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x505e
xorl %eax, %eax
movl %eax, 0x18(%rsp)
cltq
cmpq %rax, 0x80(%rsp)
jbe 0x3d07
movq %r13, %rdi
callq 0x550c
movl 0x18(%rsp), %eax
cmpl 0x14(%rsp), %eax
je 0x2c78
movq %rbx, %rdi
leaq 0x5543(%rip), %rsi      # 0x80e9
leaq 0x24(%rsp), %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x47d4
leaq 0x1f0(%rsp), %rbx
movl (%rax), %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x551a
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2100
testl %r12d, %r12d
js 0x3c45
leaq 0x390(%rsp), %r12
movq %r12, %rdi
leaq 0x148(%rsp), %rsi
callq 0x2340
leaq 0x1f0(%rsp), %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0x5650
movq %r12, %rdi
callq 0x2100
movq 0x93a6(%rip), %rdi      # 0xbfc8
leaq 0x54f2(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x54d9(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x54c5(%rip), %rsi      # 0x8124
callq 0x2240
movl 0x18(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
movq %r13, %rdi
callq 0x58c2
movl 0x18(%rsp), %eax
incl %eax
jmp 0x2b72
leaq 0x18(%rsp), %rdi
callq 0x550c
movq 0x932c(%rip), %rdi      # 0xbfc8
leaq 0x5478(%rip), %rsi      # 0x811b
callq 0x2240
leaq 0xf8(%rsp), %rbx
leaq 0x210(%rsp), %r12
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x544f(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x55bb(%rip), %rsi      # 0x82a4
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
cmpl $0x1, 0x90(%rsp)
sete %al
movl 0x2c(%rsp), %edx
cmpl 0x8c(%rsp), %edx
setg %cl
andb %al, %cl
cmpb $0x1, %cl
je 0x4336
movl 0x14(%rsp), %ecx
movq %rbx, %rdi
pushq $0x7
popq %rsi
callq 0x5a2e
movq %r15, %rbp
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b4c
leaq 0x128(%rsp), %rdi
movq %r13, %rsi
callq 0x22e0
movq %r13, %rdi
callq 0x2100
movq %r12, %rdi
leaq 0x5384(%rip), %rsi      # 0x80e9
movq %r13, %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x47d4
leaq 0x210(%rsp), %rbx
movl (%rax), %edx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x551a
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2100
testl %r12d, %r12d
js 0x3b86
leaq 0x310(%rsp), %rbx
movq %rbx, %rdi
leaq 0x128(%rsp), %rsi
callq 0x2340
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x5650
movq %rbx, %rdi
callq 0x2100
movq 0x91ed(%rip), %rdi      # 0xbfc8
leaq 0x5339(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x5320(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x54b3(%rip), %rsi      # 0x82cb
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
leaq 0xc8(%rsp), %rdi
movq %rbp, %rsi
callq 0x4822
movl $0x3, 0x4(%rax)
jmp 0x4019
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
incl (%rax)
movq 0x9162(%rip), %rdi      # 0xbfc8
leaq 0x52ae(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x5295(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x52a7(%rip), %rsi      # 0x814a
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
movslq (%rax), %rax
movb $0x1, %bpl
cmpq %rax, 0x80(%rsp)
jne 0x4285
movq 0x90e1(%rip), %rdi      # 0xbfc8
leaq 0x522d(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x5214(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x5242(%rip), %rsi      # 0x8166
callq 0x2240
movq %rax, %rdi
callq 0x2110
movl 0x2c(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
pushq $0x4
popq %rsi
callq 0x5a2e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b4c
leaq 0x148(%rsp), %rdi
movq %r13, %rsi
callq 0x22e0
movq %r13, %rdi
callq 0x2100
xorl %eax, %eax
movl %eax, 0x18(%rsp)
cltq
cmpq %rax, 0x80(%rsp)
jbe 0x424a
movq %r13, %rdi
callq 0x550c
movl 0x18(%rsp), %eax
cmpl 0x14(%rsp), %eax
je 0x3079
leaq 0x2b0(%rsp), %rdi
leaq 0x513f(%rip), %rsi      # 0x80e9
leaq 0x24(%rsp), %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x47d4
leaq 0x2b0(%rsp), %rbx
movl (%rax), %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x551a
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2100
testl %r12d, %r12d
js 0x4188
leaq 0x290(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x2340
movq %r13, %rdi
leaq 0x290(%rsp), %rbx
movq %rbx, %rsi
callq 0x5650
movq %rbx, %rdi
callq 0x2100
movq 0x8fa5(%rip), %rdi      # 0xbfc8
leaq 0x50f1(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x50d8(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x5137(%rip), %rsi      # 0x8197
callq 0x2240
movl 0x18(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
movq %r13, %rdi
callq 0x58c2
movl 0x18(%rsp), %eax
incl %eax
jmp 0x2f71
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x5334
movb $0x1, %bpl
leaq 0xa0(%rsp), %rcx
cmpq %rcx, %rax
leaq 0x1d0(%rsp), %r12
je 0x4285
movl 0x2c(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
pushq $0x6
popq %rsi
callq 0x5a2e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b4c
leaq 0x148(%rsp), %rdi
movq %r13, %rsi
callq 0x22e0
movq %r13, %rdi
callq 0x2100
movq 0x8ecb(%rip), %rdi      # 0xbfc8
leaq 0x5017(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4ffe(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x5077(%rip), %rsi      # 0x81b1
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
xorl %eax, %eax
movl %eax, 0x18(%rsp)
cltq
cmpq %rax, 0x80(%rsp)
jbe 0x3e1c
movq %r13, %rdi
callq 0x550c
movl 0x18(%rsp), %eax
cmpl 0x14(%rsp), %eax
je 0x3260
movq %r12, %rdi
leaq 0x4f60(%rip), %rsi      # 0x80e9
leaq 0x24(%rsp), %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x47d4
leaq 0x1d0(%rsp), %rbx
movl (%rax), %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x551a
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2100
testl %r12d, %r12d
js 0x3d4b
leaq 0x270(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x2340
leaq 0x1d0(%rsp), %r12
movq %r13, %rdi
leaq 0x270(%rsp), %rbx
movq %rbx, %rsi
callq 0x5650
movq %rbx, %rdi
callq 0x2100
movq 0x8dbe(%rip), %rdi      # 0xbfc8
leaq 0x4f0a(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4ef1(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4f8d(%rip), %rsi      # 0x81d4
callq 0x2240
movl 0x18(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
movq %r13, %rdi
callq 0x58c2
movl 0x18(%rsp), %eax
incl %eax
jmp 0x3155
movq 0x8d4e(%rip), %rdi      # 0xbfc8
leaq 0x4e9a(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4e81(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4f3f(%rip), %rsi      # 0x81f6
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
incl (%rax)
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
movslq (%rax), %rax
movb $0x1, %bpl
cmpq %rax, 0x80(%rsp)
jne 0x4285
movl 0x2c(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
pushq $0x5
popq %rsi
callq 0x5a2e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b4c
leaq 0x1b0(%rsp), %rbx
xorl %eax, %eax
movl %eax, 0x24(%rsp)
cltq
cmpq %rax, 0x80(%rsp)
jbe 0x40fc
leaq 0x18(%rsp), %rdi
callq 0x550c
movl 0x24(%rsp), %eax
cmpl 0x14(%rsp), %eax
je 0x3440
movq %rbx, %rdi
leaq 0x4d7d(%rip), %rsi      # 0x80e9
leaq 0x97(%rsp), %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x47d4
leaq 0x1b0(%rsp), %rbx
movl (%rax), %edx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x551a
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2100
testl %r12d, %r12d
js 0x4038
leaq 0x370(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x2340
leaq 0x1b0(%rsp), %rbx
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x5650
movq %r12, %rdi
callq 0x2100
movq 0x8bde(%rip), %rdi      # 0xbfc8
leaq 0x4d2a(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4d11(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4df4(%rip), %rsi      # 0x821b
callq 0x2240
movl 0x24(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
leaq 0x18(%rsp), %rdi
callq 0x58c2
movl 0x24(%rsp), %eax
incl %eax
jmp 0x3336
movq 0x8b6c(%rip), %rdi      # 0xbfc8
leaq 0x4cb8(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4c9f(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4da3(%rip), %rsi      # 0x823c
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
cmpl $0x0, 0x90(%rsp)
jne 0x34cd
movl 0x8c(%rsp), %eax
cmpl %eax, 0x2c(%rsp)
jg 0x438c
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x505e
movl 0x30(%rsp), %ebp
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, (%rax)
movl %ebp, 0x8(%rax)
leaq 0x18(%rsp), %rdi
callq 0x550c
callq 0x2080
cltd
pushq $0x14
popq %rcx
idivl %ecx
cmpl $0x2, %edx
movq %r15, %rbp
leaq 0x250(%rsp), %r12
jg 0x3a4e
movl 0x2c(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
pushq $0x3
popq %rsi
callq 0x5a2e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b4c
leaq 0x128(%rsp), %rdi
movq %r13, %rsi
callq 0x22e0
movq %r13, %rdi
callq 0x2100
movq %r12, %rdi
leaq 0x4b7c(%rip), %rsi      # 0x80e9
movq %r13, %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x47d4
leaq 0x250(%rsp), %rbx
movl (%rax), %edx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x551a
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2100
testl %r12d, %r12d
js 0x3ea0
leaq 0x350(%rsp), %rbx
movq %rbx, %rdi
leaq 0x128(%rsp), %rsi
callq 0x2340
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x5650
movq %rbx, %rdi
callq 0x2100
leaq 0xc8(%rsp), %rdi
movq %rbp, %rsi
callq 0x4822
movl $0x5, 0x4(%rax)
movq 0x89ce(%rip), %rdi      # 0xbfc8
leaq 0x4b1a(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4b01(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4c2e(%rip), %rsi      # 0x8265
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
movq 0x8971(%rip), %rdi      # 0xbfc8
leaq 0x4abd(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4aa4(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4beb(%rip), %rsi      # 0x827f
callq 0x2240
movq %rax, %rdi
leaq 0x4b4f(%rip), %rsi      # 0x81f2
callq 0x2240
leaq 0x98(%rsp), %rdi
movq %rbp, %rsi
callq 0x5386
jmp 0x4019
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x5334
leaq 0xa0(%rsp), %rcx
cmpq %rcx, %rax
je 0x4030
movq 0x88e3(%rip), %rdi      # 0xbfc8
leaq 0x4a2f(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4a16(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4bbc(%rip), %rsi      # 0x82de
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
movl $0x4, 0x4(%rax)
movq 0x886f(%rip), %rdi      # 0xbfc8
leaq 0x49bb(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x49a2(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x4a9e(%rip), %rsi      # 0x8231
jmp 0x386e
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x5334
leaq 0xa0(%rsp), %rcx
cmpq %rcx, %rax
je 0x4030
movq 0x8808(%rip), %rdi      # 0xbfc8
leaq 0x4954(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x493b(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4af8(%rip), %rsi      # 0x82f5
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
movl $0x5, 0x4(%rax)
movq 0x8794(%rip), %rdi      # 0xbfc8
leaq 0x48e0(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x48c7(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x497b(%rip), %rsi      # 0x81e9
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
leaq 0x4972(%rip), %rsi      # 0x81f2
callq 0x2240
movb $0x1, %bpl
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x5386
movl 0x20(%rsp), %r12d
jmp 0x428a
movq 0x871f(%rip), %rdi      # 0xbfc8
leaq 0x49a1(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4a40(%rip), %rsi      # 0x830b
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x18(%rsp), %rdi
callq 0x550c
movl 0x2c(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0xf8(%rsp), %r12
movq %r12, %rdi
pushq $0x7
popq %rsi
callq 0x5a2e
leaq 0xc8(%rsp), %rbx
leaq 0x2f0(%rsp), %rbp
movq %r13, %rdi
movq %r12, %rsi
callq 0x5b4c
leaq 0x128(%rsp), %rdi
movq %r13, %rsi
callq 0x22e0
movq %r13, %rdi
callq 0x2100
movq %rbp, %rdi
leaq 0x47af(%rip), %rsi      # 0x80e9
movq %r13, %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x47d4
movl (%rax), %edx
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x551a
movl %eax, %r12d
movq %rbp, %rdi
callq 0x2100
testl %r12d, %r12d
leaq 0x2d0(%rsp), %rbp
jns 0x39b8
movq 0x8649(%rip), %rdi      # 0xbfc8
leaq 0x4996(%rip), %rsi      # 0x831c
callq 0x2240
movq 0x8636(%rip), %rdi      # 0xbfc8
leaq 0x499a(%rip), %rsi      # 0x8333
callq 0x2240
movq %rax, %r12
callq 0x2040
movl (%rax), %esi
movq %r12, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
movq %rbp, %rdi
leaq 0x128(%rsp), %rsi
callq 0x2340
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x5650
movq %rbp, %rdi
callq 0x2100
movl 0x14(%rsp), %edi
movl 0x34(%rsp), %esi
movq %rbx, (%rsp)
leaq 0x8828(%rip), %rdx      # 0xc218
xorl %ecx, %ecx
leaq 0x58(%rsp), %r8
leaq 0x98(%rsp), %r9
callq 0x5ed0
movq 0x85bd(%rip), %rdi      # 0xbfc8
leaq 0x483f(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4916(%rip), %rsi      # 0x8343
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0x51b0
jmp 0x4019
movl 0x2c(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
pushq $0x2
popq %rsi
callq 0x5a2e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b4c
leaq 0x230(%rsp), %rbx
leaq 0x128(%rsp), %rdi
movq %r13, %rsi
callq 0x22e0
movq %r13, %rdi
callq 0x2100
movq %rbx, %rdi
leaq 0x464b(%rip), %rsi      # 0x80e9
movq %r13, %rdx
callq 0x474a
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x47d4
leaq 0x230(%rsp), %rbx
movl (%rax), %edx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x551a
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2100
testl %r12d, %r12d
js 0x3f5f
leaq 0x330(%rsp), %rbx
movq %rbx, %rdi
leaq 0x128(%rsp), %rsi
callq 0x2340
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x5650
movq %rbx, %rdi
callq 0x2100
movq 0x84b4(%rip), %rdi      # 0xbfc8
leaq 0x4600(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x45e7(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4738(%rip), %rsi      # 0x8289
callq 0x2240
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x2110
leaq 0xc8(%rsp), %rdi
movq %rbp, %rsi
callq 0x4822
movl $0x1, 0x4(%rax)
jmp 0x4019
movq 0x843b(%rip), %rdi      # 0xbfc8
leaq 0x46bd(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x45ce(%rip), %rsi      # 0x817d
callq 0x2240
movq %rax, %rdi
leaq 0x4701(%rip), %rsi      # 0x82bf
callq 0x2240
movq %rax, %rdi
callq 0x2110
movl 0x14(%rsp), %edi
movl 0x30(%rsp), %esi
leaq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8632(%rip), %rdx      # 0xc218
pushq $0x1
popq %rcx
leaq 0x58(%rsp), %r8
leaq 0x98(%rsp), %r9
callq 0x5ed0
movq 0x83c6(%rip), %rdi      # 0xbfc8
leaq 0x4648(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x44e4(%rip), %rsi      # 0x8108
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x51b0
jmp 0x4019
movq 0x837c(%rip), %rdi      # 0xbfc8
leaq 0x45fe(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4485(%rip), %rsi      # 0x80f3
callq 0x2240
movq %rax, %rdi
leaq 0x45e0(%rip), %rsi      # 0x825d
callq 0x2240
movq %rax, %rdi
callq 0x2110
movl 0x14(%rsp), %edi
movl 0x18(%rsp), %esi
leaq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8573(%rip), %rdx      # 0xc218
pushq $0x1
popq %rcx
leaq 0x58(%rsp), %r8
leaq 0x98(%rsp), %r9
callq 0x5ed0
movq 0x8307(%rip), %rdi      # 0xbfc8
leaq 0x4589(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4425(%rip), %rsi      # 0x8108
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x51b0
movq %r13, %rdi
callq 0x58c2
leaq 0xc8(%rsp), %rdi
movq %rbp, %rsi
callq 0x4822
movl $0x2, 0x4(%rax)
cmpl $0x2, 0x90(%rsp)
jne 0x3d39
movl 0x8c(%rsp), %eax
cmpl %eax, 0x2c(%rsp)
jg 0x43df
leaq 0x108(%rsp), %rdi
callq 0x2100
jmp 0x4030
movq 0x8276(%rip), %rdi      # 0xbfc8
leaq 0x44f8(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4409(%rip), %rsi      # 0x817d
callq 0x2240
movq %rax, %rdi
leaq 0x4409(%rip), %rsi      # 0x818c
callq 0x2240
movq %rax, %rdi
callq 0x2110
movl 0x14(%rsp), %edi
movl 0x18(%rsp), %esi
leaq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x846d(%rip), %rdx      # 0xc218
pushq $0x1
popq %rcx
leaq 0x58(%rsp), %r8
leaq 0x98(%rsp), %r9
callq 0x5ed0
movq 0x8201(%rip), %rdi      # 0xbfc8
leaq 0x4483(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x43e3(%rip), %rsi      # 0x81cc
callq 0x2240
movq %rax, %rdi
leaq 0x4317(%rip), %rsi      # 0x810f
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x51b0
movq %r13, %rdi
callq 0x58c2
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x5386
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
movl $0x5, 0x4(%rax)
movq 0x817e(%rip), %rdi      # 0xbfc8
leaq 0x42ca(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x42b1(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4362(%rip), %rsi      # 0x81e9
callq 0x2240
movq %rax, %rdi
leaq 0x435c(%rip), %rsi      # 0x81f2
callq 0x2240
jmp 0x4278
movq 0x8121(%rip), %rdi      # 0xbfc8
leaq 0x43a3(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x42b4(%rip), %rsi      # 0x817d
callq 0x2240
movq %rax, %rdi
leaq 0x437f(%rip), %rsi      # 0x8257
callq 0x2240
movq %rax, %rdi
callq 0x2110
movl 0x14(%rsp), %edi
movl 0x30(%rsp), %esi
leaq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8318(%rip), %rdx      # 0xc218
pushq $0x1
popq %rcx
leaq 0x58(%rsp), %r8
leaq 0x98(%rsp), %r9
callq 0x5ed0
movq 0x80ac(%rip), %rdi      # 0xbfc8
leaq 0x432e(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x41ca(%rip), %rsi      # 0x8108
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x51b0
jmp 0x4019
movq 0x8062(%rip), %rdi      # 0xbfc8
leaq 0x42e4(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x41f5(%rip), %rsi      # 0x817d
callq 0x2240
movq %rax, %rdi
leaq 0x42c0(%rip), %rsi      # 0x8257
callq 0x2240
movq %rax, %rdi
callq 0x2110
movl 0x14(%rsp), %edi
movl 0x30(%rsp), %esi
leaq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8259(%rip), %rdx      # 0xc218
pushq $0x1
popq %rcx
leaq 0x58(%rsp), %r8
leaq 0x98(%rsp), %r9
callq 0x5ed0
movq 0x7fed(%rip), %rdi      # 0xbfc8
leaq 0x426f(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x410b(%rip), %rsi      # 0x8108
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x51b0
leaq 0x108(%rsp), %rdi
callq 0x2100
leaq 0x18(%rsp), %rdi
callq 0x58c2
movb $0x1, %bpl
jmp 0x4285
movq 0x7f89(%rip), %rdi      # 0xbfc8
leaq 0x420b(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x411c(%rip), %rsi      # 0x817d
callq 0x2240
movq %rax, %rdi
leaq 0x419a(%rip), %rsi      # 0x820a
callq 0x2240
movq %rax, %rdi
callq 0x2110
movl 0x14(%rsp), %edi
movl 0x24(%rsp), %esi
leaq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8180(%rip), %rdx      # 0xc218
pushq $0x1
popq %rcx
leaq 0x58(%rsp), %r8
leaq 0x98(%rsp), %r9
callq 0x5ed0
movq 0x7f14(%rip), %rdi      # 0xbfc8
leaq 0x4196(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x4032(%rip), %rsi      # 0x8108
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x51b0
leaq 0x18(%rsp), %rdi
callq 0x58c2
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x4822
movl $0x4, 0x4(%rax)
movq 0x7eae(%rip), %rdi      # 0xbfc8
leaq 0x3ffa(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x3fe1(%rip), %rsi      # 0x811d
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x40da(%rip), %rsi      # 0x8231
callq 0x2240
movq %rax, %rdi
leaq 0x408c(%rip), %rsi      # 0x81f2
callq 0x2240
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x5386
movq %r13, %rdi
callq 0x2100
jmp 0x4278
movq 0x7e39(%rip), %rdi      # 0xbfc8
leaq 0x40bb(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x3fcc(%rip), %rsi      # 0x817d
callq 0x2240
movq %rax, %rdi
leaq 0x3fcc(%rip), %rsi      # 0x818c
callq 0x2240
movq %rax, %rdi
callq 0x2110
movl 0x14(%rsp), %edi
movl 0x18(%rsp), %esi
leaq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8030(%rip), %rdx      # 0xc218
pushq $0x1
popq %rcx
leaq 0x58(%rsp), %r8
leaq 0x98(%rsp), %r9
callq 0x5ed0
movq 0x7dc4(%rip), %rdi      # 0xbfc8
leaq 0x4046(%rip), %rsi      # 0x8251
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x3ee2(%rip), %rsi      # 0x8108
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x51b0
movq %r13, %rdi
callq 0x58c2
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %r12
movq %r15, %rsi
callq 0x4822
movl $0x3, 0x4(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4822
movl $0x1, (%rax)
leaq 0x108(%rsp), %rdi
callq 0x2100
movl 0x20(%rsp), %r12d
leaq 0x128(%rsp), %rdi
callq 0x2100
leaq 0x148(%rsp), %rdi
callq 0x2100
leaq 0x38(%rsp), %rdi
callq 0x2100
leaq 0x170(%rsp), %rdi
callq 0x2100
movq %r14, %rdi
callq 0x58c2
testb %bpl, %bpl
movq %r14, %rbp
leaq 0x28(%rsp), %r14
jne 0x29c8
leaq 0xc8(%rsp), %rdi
callq 0x493e
leaq 0x98(%rsp), %rdi
callq 0x4996
leaq 0x58(%rsp), %rdi
callq 0x49ee
jmp 0x4321
movq 0x7cef(%rip), %rdi      # 0xbff0
leaq 0x3d81(%rip), %rsi      # 0x8089
jmp 0x4318
movq 0x7cb7(%rip), %rdi      # 0xbfc8
leaq 0x3d96(%rip), %rsi      # 0x80ae
callq 0x2240
pushq $0x1
popq %r12
movl %r12d, %eax
addq $0x468, %rsp            # imm = 0x468
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7c8b(%rip), %rdi      # 0xbfc8
leaq 0x3dd7(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x3dc1(%rip), %rsi      # 0x811d
movq %rax, %rdi
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x3dc7(%rip), %rsi      # 0x813e
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2110
jmp 0x4430
movq 0x7c35(%rip), %rdi      # 0xbfc8
leaq 0x3d81(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x3d6b(%rip), %rsi      # 0x811d
movq %rax, %rdi
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x3d71(%rip), %rsi      # 0x813e
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2110
jmp 0x4430
movq 0x7be2(%rip), %rdi      # 0xbfc8
leaq 0x3d2e(%rip), %rsi      # 0x811b
callq 0x2240
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x3d18(%rip), %rsi      # 0x811d
movq %rax, %rdi
callq 0x2240
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x23a0
leaq 0x3d1e(%rip), %rsi      # 0x813e
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2110
pushq $0x1
popq %rdi
callq 0x22d0
movq %rax, %rbx
leaq 0x350(%rsp), %rdi
jmp 0x4581
movq %rax, %rbx
leaq 0x330(%rsp), %rdi
jmp 0x4581
jmp 0x44cc
jmp 0x44cc
jmp 0x44cc
jmp 0x4466
jmp 0x4478
jmp 0x4466
jmp 0x4478
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x2100
jmp 0x4726
movq %rax, %rbx
jmp 0x4726
jmp 0x45e6
jmp 0x45e6
jmp 0x45e6
jmp 0x466b
jmp 0x46a2
jmp 0x45d8
jmp 0x466b
jmp 0x45e6
jmp 0x46a2
jmp 0x45d8
jmp 0x466b
jmp 0x46a2
movq %rax, %rbx
leaq 0x310(%rsp), %rdi
jmp 0x4581
movq %rax, %rbx
jmp 0x471c
jmp 0x466b
jmp 0x46a2
jmp 0x45d8
jmp 0x466b
jmp 0x46a2
jmp 0x46a2
jmp 0x45d8
movq %rax, %rbx
leaq 0x230(%rsp), %rdi
jmp 0x4581
jmp 0x46a2
jmp 0x45e6
jmp 0x45d8
jmp 0x45e6
jmp 0x46a2
jmp 0x46a2
jmp 0x46a2
jmp 0x45e6
jmp 0x45e6
movq %rax, %rbx
leaq 0x250(%rsp), %rdi
jmp 0x4581
jmp 0x466b
jmp 0x46a2
movq %rax, %rbx
leaq 0x2d0(%rsp), %rdi
jmp 0x4581
jmp 0x4605
jmp 0x4684
jmp 0x46a7
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
jmp 0x4581
jmp 0x466b
movq %rax, %rbx
leaq 0x2f0(%rsp), %rdi
callq 0x2100
jmp 0x45e9
jmp 0x46a7
jmp 0x46a7
jmp 0x4657
jmp 0x45e6
movq %rax, %rbx
leaq 0x370(%rsp), %rdi
jmp 0x464c
movq %rax, %rbx
leaq 0x290(%rsp), %rdi
jmp 0x467b
jmp 0x4684
jmp 0x46a7
movq %rax, %rbx
leaq 0x270(%rsp), %rdi
jmp 0x467b
jmp 0x46a7
movq %rax, %rbx
jmp 0x45f6
jmp 0x45e6
jmp 0x45e6
jmp 0x466b
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x2100
leaq 0x18(%rsp), %rdi
callq 0x58c2
jmp 0x46c4
movq %rax, %rbx
jmp 0x4702
jmp 0x461f
movq %rax, %rbx
leaq 0x3b0(%rsp), %rdi
jmp 0x46e3
movq %rax, %rbx
jmp 0x46e8
movq %rax, %rbx
leaq 0x390(%rsp), %rdi
jmp 0x467b
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
jmp 0x467b
movq %rax, %rbx
leaq 0x1b0(%rsp), %rdi
callq 0x2100
jmp 0x4687
jmp 0x466b
jmp 0x46a7
movq %rax, %rbx
jmp 0x4691
jmp 0x466b
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
jmp 0x467b
movq %rax, %rbx
jmp 0x46b7
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
callq 0x2100
jmp 0x46aa
jmp 0x46a7
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x58c2
leaq 0x190(%rsp), %rdi
callq 0x2100
jmp 0x46b7
jmp 0x46a7
movq %rax, %rbx
jmp 0x46c4
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x58c2
leaq 0x108(%rsp), %rdi
callq 0x2100
leaq 0x128(%rsp), %rdi
callq 0x2100
leaq 0x148(%rsp), %rdi
callq 0x2100
leaq 0x38(%rsp), %rdi
callq 0x2100
leaq 0x170(%rsp), %rdi
callq 0x2100
leaq 0x168(%rsp), %rdi
callq 0x58c2
leaq 0xc8(%rsp), %rdi
callq 0x493e
leaq 0x98(%rsp), %rdi
callq 0x4996
leaq 0x58(%rsp), %rdi
callq 0x49ee
movq %rbx, %rdi
callq 0x23b0