// File: rohitrangan[P]3PC/src/termination.cpp
// Function: termination_protocol(int, int, Socket&, bool, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int>>>&, std::set<int, std::less<int>, std::allocator<int>>&, std::map<int, transaction_info, std::less<int>, std::allocator<std::pair<int const, transaction_info>>>&)
bool termination_protocol (int site_id, int failed_site, Socket& site, bool b,
        map<int, int>& sites, set<int>& txLive,
        map<int, transaction_info>& trans_table)
{
    int new_coordinator = (failed_site != 0) ? 0 : 1;
    bool flag = false;
    int numAcks = 0;
    cout << "Site " << site_id << " entered termination protocol" << endl;

    if (b)
    {
        Message start_term (TERMINATION, 0, site_id, failed_site);
        string msg_start_term = start_term.createMessage ();
        for (int i = 0; i < sites.size (); ++i)
        {
            Socket tmp;
            if (i != site_id && i != failed_site)
            {
                tmp.connect ("localhost", sites[i]);
                tmp.send (msg_start_term);
                cout << "Site " << site_id
                    << " sent TERMINATION to Site " << i << 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;
            switch (msg.message)
            {
                case TERMINATION:
                {
                    cout << "Site " << site_id << " received TERMINATION from "
                        "Site " << msg.site_id << endl;
                    failed_site = msg.failed_id;
                    Message tempMsg(ACK, msg.transaction_id, site_id);
                    tempStr = tempMsg.createMessage();
                    Socket temp;
                    temp.connect ("localhost", sites[msg.site_id]);
                    temp.send (tempStr);
                    cout << "Site " << site_id << " sent ACK to Site " <<
                        msg.site_id << endl;
                    break;
                }
                case ACK:
                {
                    cout << "Site " << site_id << " got ACK from Site " <<
                        msg.site_id << endl;
                    ++numAcks;
                    if (numAcks == (sites.size () - 2))
                    {
                        flag = true;
                    }
                    break;
                }
                default:
                    break;
            }
            if (flag)
                break;
        }
    }

    for (set<int>::iterator it = txLive.begin (); it != txLive.end (); )
    {
        int t_chkid = *it;
        /* Handling the case for transactions being its own and if it is the new
         * coordinator.
         */
        if ((trans_table[t_chkid].coordinator == site_id) ||
                ((trans_table[t_chkid].coordinator == failed_site) &&
                 (new_coordinator == site_id)))
        {
            switch (trans_table[t_chkid].site_st)
            {
                case S_INIT:

                case S_READY:

                case S_WAIT:
                {
                    cout << "[" << t_chkid << "]Site " << site_id <<
                        " is aborting transaction in TERMINATION" << endl;
                    Message snd_msg_all (ABORT, t_chkid, site_id);
                    string tmp_msg = snd_msg_all.createMessage ();
                    for (int i = 0; i < sites.size (); ++i)
                    {
                        Socket tmp;
                        if (i != site_id && i != failed_site)
                        {
                            tmp.connect ("localhost", sites[i]);
                            tmp.send (tmp_msg);
                            cout << "[" << t_chkid << "]Site " << site_id
                                << " sent ABORT to Site " << i << endl;
                        }
                    }
                    trans_table[t_chkid].site_st = S_ABORT;
                    cout << "[" << t_chkid << "]Site " << site_id
                        << " ABORTED in TERMINATION" << "\n\n\n";
                    it = txLive.erase (it);
                    break;
                }
                case S_PRE_COMMIT:
                {
                    cout << "[" << t_chkid << "]Site " << site_id <<
                        " is going to commit transaction in TERMINATION"
                        << endl;
                    Message snd_msg_all (COMMIT, t_chkid, site_id);
                    string tmp_msg = snd_msg_all.createMessage ();
                    for (int i = 0; i < sites.size (); ++i)
                    {
                        Socket tmp;
                        if (i != site_id && i != failed_site)
                        {
                            tmp.connect ("localhost", sites[i]);
                            tmp.send (tmp_msg);
                            cout << "[" << t_chkid << "]Site " << site_id
                                << " sent COMMIT to Site " << i <<
                                " in TERMINATION" << endl;
                        }
                    }
                    trans_table[t_chkid].site_st = S_COMMIT;
                    cout << "[" << t_chkid << "]Site " << site_id
                        << " COMMITTED in TERMINATION" << "\n\n\n";
                    it = txLive.erase (it);
                    break;
                }
                case S_ABORT:
                {
                    cout << "[" << t_chkid << "]Site " << site_id <<
                        " is aborting transaction in TERMINATION" << endl;
                    Message snd_msg_all (ABORT, t_chkid, site_id);
                    string tmp_msg = snd_msg_all.createMessage ();
                    for (int i = 0; i < sites.size (); ++i)
                    {
                        Socket tmp;
                        if (i != site_id && i != failed_site)
                        {
                            tmp.connect ("localhost", sites[i]);
                            tmp.send (tmp_msg);
                            cout << "[" << t_chkid << "]Site " << site_id
                                << " sent ABORT to Site " << i << 
                                " in TERMINATION" << endl;
                        }
                    }
                    trans_table[t_chkid].site_st = S_ABORT;
                    cout << "[" << t_chkid << "]Site " << site_id
                        << " ABORTED in TERMINATION" << "\n\n\n";
                    it = txLive.erase (it);
                    break;
                }
                default:
                    cout << "State is:- " << trans_table[t_chkid].site_st << endl;
                    ++it;
                    break;
            }
        }
        else
            ++it;
    }

    if (txLive.empty ())
        return false;

    flag = false;
    while (1)
    {
        Socket inc = site.accept ();
		string str;
        str = inc.recv ((size_t) 1024);
		Message msg (str);
        string tempStr, snd_msg;
		switch (msg.message)
		{
			case COMMIT:
            {
                cout << "[" << msg.transaction_id << "]Site " << site_id <<
                    " received COMMIT from Site " << msg.site_id <<
                    " in TERMINATION" << endl;
                trans_table[msg.transaction_id].site_st = S_COMMIT;
                cout << "[" << msg.transaction_id << "]Site " << site_id
                    << " COMMITTED in TERMINATION" << "\n\n\n";
                txLive.erase (msg.transaction_id);
                if (txLive.empty ())
                    flag = true;
				break;
            }
			case ABORT:
            {
                cout << "[" << msg.transaction_id << "]Site " << site_id <<
                    " received ABORT from Site " << msg.site_id <<
                    " in TERMINATION" << endl;
                trans_table[msg.transaction_id].site_st = S_ABORT;
                cout << "[" << msg.transaction_id << "]Site " << site_id
                    << " ABORTED in TERMINATION" << "\n\n\n";
                txLive.erase (msg.transaction_id);
                if (txLive.empty ())
                    flag = true;
				break;
            }
            default:
                break;
		}
        if (flag)
            break;
    }

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x910, %rsp            # imm = 0x910
movb %cl, %al
movq 0x10(%rbp), %rcx
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl -0xc(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x34(%rbp)
movb $0x0, -0x35(%rbp)
movl $0x0, -0x3c(%rbp)
movq 0x833b(%rip), %rdi      # 0x15fc8
leaq 0x25bd(%rip), %rsi      # 0x10251
callq 0x32e0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, %rdi
leaq 0x274a(%rip), %rsi      # 0x103f8
callq 0x32e0
movq %rax, %rdi
movq 0x82fb(%rip), %rsi      # 0x15fb8
callq 0x3330
testb $0x1, -0x19(%rbp)
je 0xe50e
movl -0x8(%rbp), %ecx
movl -0xc(%rbp), %r8d
leaq -0x70(%rbp), %rdi
movq %rdi, -0x590(%rbp)
movl $0x8, %esi
xorl %edx, %edx
callq 0xcaf0
movq -0x590(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0xcce0
jmp 0xdcff
movl $0x0, -0xa0(%rbp)
movslq -0xa0(%rbp), %rax
movq %rax, -0x598(%rbp)
movq -0x28(%rbp), %rdi
callq 0x79f0
movq %rax, %rcx
movq -0x598(%rbp), %rax
cmpq %rcx, %rax
jae 0xdf6b
leaq -0xa8(%rbp), %rdi
callq 0xbfb0
jmp 0xdd41
movl -0xa0(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0xdf3a
movl -0xa0(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0xdf3a
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x5a0(%rbp)
callq 0x34c0
movq -0x5a0(%rbp), %rdx
leaq 0x2369(%rip), %rsi      # 0x100e9
leaq -0xc8(%rbp), %rdi
callq 0x75f0
jmp 0xdd8e
movq -0x28(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x77a0
movq %rax, -0x5a8(%rbp)
jmp 0xdda7
movq -0x5a8(%rbp), %rax
movl (%rax), %edx
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xbff0
jmp 0xddc5
leaq -0xc8(%rbp), %rdi
callq 0x31b0
leaq -0xc9(%rbp), %rdi
callq 0x3360
leaq -0xf0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3110
jmp 0xddf2
leaq -0xa8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xc1f0
jmp 0xde07
leaq -0xf0(%rbp), %rdi
callq 0x31b0
movq 0x81ae(%rip), %rdi      # 0x15fc8
leaq 0x2430(%rip), %rsi      # 0x10251
callq 0x32e0
movq %rax, -0x5b0(%rbp)
jmp 0xde2f
movq -0x5b0(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x5b8(%rbp)
jmp 0xde47
movq -0x5b8(%rbp), %rdi
leaq 0x25c1(%rip), %rsi      # 0x10416
callq 0x32e0
movq %rax, -0x5c0(%rbp)
jmp 0xde63
movq -0x5c0(%rbp), %rdi
movl -0xa0(%rbp), %esi
callq 0x34a0
movq %rax, -0x5c8(%rbp)
jmp 0xde7e
movq -0x5c8(%rbp), %rdi
movq 0x812c(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xde93
jmp 0xdf3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe4f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xdef8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x31b0
leaq -0xc9(%rbp), %rdi
callq 0x3360
jmp 0xdf5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xdf5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x31b0
jmp 0xdf5a
leaq -0xa8(%rbp), %rdi
callq 0xc7d0
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0xdd09
leaq -0xa8(%rbp), %rdi
callq 0xc7d0
jmp 0xe4f4
jmp 0xdf6d
jmp 0xdf6f
movq -0x18(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0xc4c0
jmp 0xdf81
leaq -0x118(%rbp), %rdi
callq 0x3440
leaq -0x138(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0xc280
jmp 0xdfa7
leaq -0x118(%rbp), %rdi
movq %rdi, -0x5d0(%rbp)
leaq -0x138(%rbp), %rsi
movq %rsi, -0x5d8(%rbp)
callq 0x33d0
movq -0x5d8(%rbp), %rdi
callq 0x31b0
movq -0x5d0(%rbp), %rsi
leaq -0x188(%rbp), %rdi
callq 0x3110
jmp 0xdfe9
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0xcb40
jmp 0xdffe
leaq -0x188(%rbp), %rdi
callq 0x31b0
leaq -0x1a8(%rbp), %rdi
callq 0x3440
leaq -0x1c8(%rbp), %rdi
callq 0x3440
movl -0x168(%rbp), %eax
movl %eax, -0x5dc(%rbp)
subl $0x7, %eax
je 0xe37c
jmp 0xe039
movl -0x5dc(%rbp), %eax
subl $0x8, %eax
je 0xe083
jmp 0xe432
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe4c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x31b0
jmp 0xe4c3
movq 0x7f3e(%rip), %rdi      # 0x15fc8
leaq 0x21c0(%rip), %rsi      # 0x10251
callq 0x32e0
movq %rax, -0x5e8(%rbp)
jmp 0xe09f
movq -0x5e8(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x5f0(%rbp)
jmp 0xe0b7
movq -0x5f0(%rbp), %rdi
leaq 0x236c(%rip), %rsi      # 0x10431
callq 0x32e0
movq %rax, -0x5f8(%rbp)
jmp 0xe0d3
movq -0x5f8(%rbp), %rdi
movl -0x160(%rbp), %esi
callq 0x34a0
movq %rax, -0x600(%rbp)
jmp 0xe0ee
movq -0x600(%rbp), %rdi
movq 0x7ebc(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xe103
movl -0x15c(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x164(%rbp), %edx
movl -0x8(%rbp), %ecx
leaq -0x1f8(%rbp), %rdi
movl $0x7, %esi
callq 0xcab0
jmp 0xe128
leaq -0x218(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xcce0
jmp 0xe13d
leaq -0x1a8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
movq %rsi, -0x608(%rbp)
callq 0x33d0
movq -0x608(%rbp), %rdi
callq 0x31b0
leaq -0x220(%rbp), %rdi
callq 0xbfb0
jmp 0xe171
leaq -0x241(%rbp), %rdi
movq %rdi, -0x610(%rbp)
callq 0x34c0
movq -0x610(%rbp), %rdx
leaq 0x1f57(%rip), %rsi      # 0x100e9
leaq -0x240(%rbp), %rdi
callq 0x75f0
jmp 0xe1a0
movq -0x28(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x77a0
movq %rax, -0x618(%rbp)
jmp 0xe1b9
movq -0x618(%rbp), %rax
movl (%rax), %edx
leaq -0x220(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0xbff0
jmp 0xe1d7
leaq -0x240(%rbp), %rdi
callq 0x31b0
leaq -0x241(%rbp), %rdi
callq 0x3360
leaq -0x268(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x3110
jmp 0xe204
leaq -0x220(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0xc1f0
jmp 0xe219
leaq -0x268(%rbp), %rdi
callq 0x31b0
movq 0x7d9c(%rip), %rdi      # 0x15fc8
leaq 0x201e(%rip), %rsi      # 0x10251
callq 0x32e0
movq %rax, -0x620(%rbp)
jmp 0xe241
movq -0x620(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x628(%rbp)
jmp 0xe259
movq -0x628(%rbp), %rdi
leaq 0x2064(%rip), %rsi      # 0x102cb
callq 0x32e0
movq %rax, -0x630(%rbp)
jmp 0xe275
movq -0x630(%rbp), %rdi
movl -0x160(%rbp), %esi
callq 0x34a0
movq %rax, -0x638(%rbp)
jmp 0xe290
movq -0x638(%rbp), %rdi
movq 0x7d1a(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xe2a5
leaq -0x220(%rbp), %rdi
callq 0xc7d0
leaq -0x1f8(%rbp), %rdi
callq 0x7a40
jmp 0xe434
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe49f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe36b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe31f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x31b0
leaq -0x241(%rbp), %rdi
callq 0x3360
jmp 0xe35f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe35f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x31b0
leaq -0x220(%rbp), %rdi
callq 0xc7d0
leaq -0x1f8(%rbp), %rdi
callq 0x7a40
jmp 0xe49f
movq 0x7c45(%rip), %rdi      # 0x15fc8
leaq 0x1ec7(%rip), %rsi      # 0x10251
callq 0x32e0
movq %rax, -0x640(%rbp)
jmp 0xe398
movq -0x640(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x648(%rbp)
jmp 0xe3b0
movq -0x648(%rbp), %rdi
leaq 0x1e38(%rip), %rsi      # 0x101f6
callq 0x32e0
movq %rax, -0x650(%rbp)
jmp 0xe3cc
movq -0x650(%rbp), %rdi
movl -0x160(%rbp), %esi
callq 0x34a0
movq %rax, -0x658(%rbp)
jmp 0xe3e7
movq -0x658(%rbp), %rdi
movq 0x7bc3(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xe3fc
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
movq %rax, -0x660(%rbp)
movq -0x28(%rbp), %rdi
callq 0x79f0
movq %rax, %rcx
movq -0x660(%rbp), %rax
subq $0x2, %rcx
cmpq %rcx, %rax
jne 0xe430
movb $0x1, -0x35(%rbp)
jmp 0xe434
jmp 0xe434
testb $0x1, -0x35(%rbp)
je 0xe446
movl $0x6, -0x26c(%rbp)
jmp 0xe450
movl $0x0, -0x26c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x31b0
leaq -0x1a8(%rbp), %rdi
callq 0x31b0
leaq -0x168(%rbp), %rdi
callq 0x7a40
leaq -0x118(%rbp), %rdi
callq 0x31b0
leaq -0xf8(%rbp), %rdi
callq 0xc7d0
movl -0x26c(%rbp), %eax
testl %eax, %eax
je 0xe49a
jmp 0xe498
jmp 0xe4dd
jmp 0xdf6d
leaq -0x1c8(%rbp), %rdi
callq 0x31b0
leaq -0x1a8(%rbp), %rdi
callq 0x31b0
leaq -0x168(%rbp), %rdi
callq 0x7a40
leaq -0x118(%rbp), %rdi
callq 0x31b0
leaq -0xf8(%rbp), %rdi
callq 0xc7d0
jmp 0xe4f4
leaq -0x90(%rbp), %rdi
callq 0x31b0
leaq -0x70(%rbp), %rdi
callq 0x7a40
jmp 0xe50e
leaq -0x90(%rbp), %rdi
callq 0x31b0
leaq -0x70(%rbp), %rdi
callq 0x7a40
jmp 0xf97b
movq -0x30(%rbp), %rdi
callq 0xf990
movq %rax, -0x278(%rbp)
movq -0x30(%rbp), %rdi
callq 0x7ad0
movq %rax, -0x280(%rbp)
leaq -0x278(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x7a60
testb $0x1, %al
jne 0xe54a
jmp 0xf3f3
leaq -0x278(%rbp), %rdi
callq 0xf9c0
movl (%rax), %eax
movl %eax, -0x284(%rbp)
movq 0x10(%rbp), %rdi
leaq -0x284(%rbp), %rsi
callq 0x78c0
movl 0x8(%rax), %eax
cmpl -0x8(%rbp), %eax
je 0xe59e
movq 0x10(%rbp), %rdi
leaq -0x284(%rbp), %rsi
callq 0x78c0
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xf3e2
movl -0x34(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0xf3e2
movq 0x10(%rbp), %rdi
leaq -0x284(%rbp), %rsi
callq 0x78c0
movl 0x4(%rax), %eax
movl %eax, -0x664(%rbp)
subl $0x3, %eax
jb 0xe5e3
jmp 0xe5be
movl -0x664(%rbp), %eax
subl $0x3, %eax
je 0xea5f
jmp 0xe5cf
movl -0x664(%rbp), %eax
subl $0x5, %eax
je 0xeef7
jmp 0xf38c
movq 0x79de(%rip), %rdi      # 0x15fc8
leaq 0x1b2a(%rip), %rsi      # 0x1011b
callq 0x32e0
movq %rax, %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, %rdi
leaq 0x1b0f(%rip), %rsi      # 0x1011d
callq 0x32e0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, %rdi
leaq 0x1e2a(%rip), %rsi      # 0x10452
callq 0x32e0
movq %rax, %rdi
movq 0x7981(%rip), %rsi      # 0x15fb8
callq 0x3330
movl -0x284(%rbp), %edx
movl -0x8(%rbp), %ecx
leaq -0x2b8(%rbp), %rdi
movq %rdi, -0x670(%rbp)
movl $0x6, %esi
callq 0xcab0
movq -0x670(%rbp), %rsi
leaq -0x2d8(%rbp), %rdi
callq 0xcce0
jmp 0xe672
movl $0x0, -0x2dc(%rbp)
movslq -0x2dc(%rbp), %rax
movq %rax, -0x678(%rbp)
movq -0x28(%rbp), %rdi
callq 0x79f0
movq %rax, %rcx
movq -0x678(%rbp), %rax
cmpq %rcx, %rax
jae 0xe915
leaq -0x2e4(%rbp), %rdi
callq 0xbfb0
jmp 0xe6b4
movl -0x2dc(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0xe8e4
movl -0x2dc(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0xe8e4
leaq -0x309(%rbp), %rdi
movq %rdi, -0x680(%rbp)
callq 0x34c0
movq -0x680(%rbp), %rdx
leaq 0x19f6(%rip), %rsi      # 0x100e9
leaq -0x308(%rbp), %rdi
callq 0x75f0
jmp 0xe701
movq -0x28(%rbp), %rdi
leaq -0x2dc(%rbp), %rsi
callq 0x77a0
movq %rax, -0x688(%rbp)
jmp 0xe71a
movq -0x688(%rbp), %rax
movl (%rax), %edx
leaq -0x2e4(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0xbff0
jmp 0xe738
leaq -0x308(%rbp), %rdi
callq 0x31b0
leaq -0x309(%rbp), %rdi
callq 0x3360
leaq -0x330(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x3110
jmp 0xe765
leaq -0x2e4(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0xc1f0
jmp 0xe77a
leaq -0x330(%rbp), %rdi
callq 0x31b0
movq 0x783b(%rip), %rdi      # 0x15fc8
leaq 0x1987(%rip), %rsi      # 0x1011b
callq 0x32e0
movq %rax, -0x690(%rbp)
jmp 0xe7a2
movq -0x690(%rbp), %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, -0x698(%rbp)
jmp 0xe7bd
movq -0x698(%rbp), %rdi
leaq 0x1952(%rip), %rsi      # 0x1011d
callq 0x32e0
movq %rax, -0x6a0(%rbp)
jmp 0xe7d9
movq -0x6a0(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x6a8(%rbp)
jmp 0xe7f1
movq -0x6a8(%rbp), %rdi
leaq 0x19d5(%rip), %rsi      # 0x101d4
callq 0x32e0
movq %rax, -0x6b0(%rbp)
jmp 0xe80d
movq -0x6b0(%rbp), %rdi
movl -0x2dc(%rbp), %esi
callq 0x34a0
movq %rax, -0x6b8(%rbp)
jmp 0xe828
movq -0x6b8(%rbp), %rdi
movq 0x7782(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xe83d
jmp 0xe8e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xea4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xea42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe8a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x308(%rbp), %rdi
callq 0x31b0
leaq -0x309(%rbp), %rdi
callq 0x3360
jmp 0xe904
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xe904
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x31b0
jmp 0xe904
leaq -0x2e4(%rbp), %rdi
callq 0xc7d0
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2dc(%rbp)
jmp 0xe67c
leaq -0x2e4(%rbp), %rdi
callq 0xc7d0
jmp 0xea42
movq 0x10(%rbp), %rdi
leaq -0x284(%rbp), %rsi
callq 0x78c0
movq %rax, -0x6c0(%rbp)
jmp 0xe92e
movq -0x6c0(%rbp), %rax
movl $0x5, 0x4(%rax)
movq 0x7685(%rip), %rdi      # 0x15fc8
leaq 0x17d1(%rip), %rsi      # 0x1011b
callq 0x32e0
movq %rax, -0x6c8(%rbp)
jmp 0xe958
movq -0x6c8(%rbp), %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, -0x6d0(%rbp)
jmp 0xe973
movq -0x6d0(%rbp), %rdi
leaq 0x179c(%rip), %rsi      # 0x1011d
callq 0x32e0
movq %rax, -0x6d8(%rbp)
jmp 0xe98f
movq -0x6d8(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x6e0(%rbp)
jmp 0xe9a7
movq -0x6e0(%rbp), %rdi
leaq 0x1ac5(%rip), %rsi      # 0x1047a
callq 0x32e0
movq %rax, -0x6e8(%rbp)
jmp 0xe9c3
movq -0x6e8(%rbp), %rdi
leaq 0x1821(%rip), %rsi      # 0x101f2
callq 0x32e0
jmp 0xe9d8
movq -0x30(%rbp), %rdi
movq -0x278(%rbp), %rax
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rsi
callq 0xf9f0
movq %rax, -0x6f0(%rbp)
jmp 0xe9ff
movq -0x6f0(%rbp), %rax
movq %rax, -0x338(%rbp)
movq -0x338(%rbp), %rax
movq %rax, -0x278(%rbp)
movl $0xa, -0x26c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x31b0
leaq -0x2b8(%rbp), %rdi
callq 0x7a40
jmp 0xf3e0
leaq -0x2d8(%rbp), %rdi
callq 0x31b0
leaq -0x2b8(%rbp), %rdi
callq 0x7a40
jmp 0xf97b
movq 0x7562(%rip), %rdi      # 0x15fc8
leaq 0x16ae(%rip), %rsi      # 0x1011b
callq 0x32e0
movq %rax, %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, %rdi
leaq 0x1693(%rip), %rsi      # 0x1011d
callq 0x32e0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, %rdi
leaq 0x19ee(%rip), %rsi      # 0x10492
callq 0x32e0
movq %rax, %rdi
movq 0x7505(%rip), %rsi      # 0x15fb8
callq 0x3330
movl -0x284(%rbp), %edx
movl -0x8(%rbp), %ecx
leaq -0x370(%rbp), %rdi
movq %rdi, -0x6f8(%rbp)
movl $0x5, %esi
callq 0xcab0
movq -0x6f8(%rbp), %rsi
leaq -0x390(%rbp), %rdi
callq 0xcce0
jmp 0xeaee
movl $0x0, -0x394(%rbp)
movslq -0x394(%rbp), %rax
movq %rax, -0x700(%rbp)
movq -0x28(%rbp), %rdi
callq 0x79f0
movq %rax, %rcx
movq -0x700(%rbp), %rax
cmpq %rcx, %rax
jae 0xedad
leaq -0x39c(%rbp), %rdi
callq 0xbfb0
jmp 0xeb30
movl -0x394(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0xed7c
movl -0x394(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0xed7c
leaq -0x3c1(%rbp), %rdi
movq %rdi, -0x708(%rbp)
callq 0x34c0
movq -0x708(%rbp), %rdx
leaq 0x157a(%rip), %rsi      # 0x100e9
leaq -0x3c0(%rbp), %rdi
callq 0x75f0
jmp 0xeb7d
movq -0x28(%rbp), %rdi
leaq -0x394(%rbp), %rsi
callq 0x77a0
movq %rax, -0x710(%rbp)
jmp 0xeb96
movq -0x710(%rbp), %rax
movl (%rax), %edx
leaq -0x39c(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0xbff0
jmp 0xebb4
leaq -0x3c0(%rbp), %rdi
callq 0x31b0
leaq -0x3c1(%rbp), %rdi
callq 0x3360
leaq -0x3e8(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x3110
jmp 0xebe1
leaq -0x39c(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0xc1f0
jmp 0xebf6
leaq -0x3e8(%rbp), %rdi
callq 0x31b0
movq 0x73bf(%rip), %rdi      # 0x15fc8
leaq 0x150b(%rip), %rsi      # 0x1011b
callq 0x32e0
movq %rax, -0x718(%rbp)
jmp 0xec1e
movq -0x718(%rbp), %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, -0x720(%rbp)
jmp 0xec39
movq -0x720(%rbp), %rdi
leaq 0x14d6(%rip), %rsi      # 0x1011d
callq 0x32e0
movq %rax, -0x728(%rbp)
jmp 0xec55
movq -0x728(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x730(%rbp)
jmp 0xec6d
movq -0x730(%rbp), %rdi
leaq 0x15a0(%rip), %rsi      # 0x1021b
callq 0x32e0
movq %rax, -0x738(%rbp)
jmp 0xec89
movq -0x738(%rbp), %rdi
movl -0x394(%rbp), %esi
callq 0x34a0
movq %rax, -0x740(%rbp)
jmp 0xeca4
movq -0x740(%rbp), %rdi
leaq 0x17d0(%rip), %rsi      # 0x10482
callq 0x32e0
movq %rax, -0x748(%rbp)
jmp 0xecc0
movq -0x748(%rbp), %rdi
movq 0x72ea(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xecd5
jmp 0xed7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xeee6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xeeda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xed3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x31b0
leaq -0x3c1(%rbp), %rdi
callq 0x3360
jmp 0xed9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xed9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0x31b0
jmp 0xed9c
leaq -0x39c(%rbp), %rdi
callq 0xc7d0
movl -0x394(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x394(%rbp)
jmp 0xeaf8
leaq -0x39c(%rbp), %rdi
callq 0xc7d0
jmp 0xeeda
movq 0x10(%rbp), %rdi
leaq -0x284(%rbp), %rsi
callq 0x78c0
movq %rax, -0x750(%rbp)
jmp 0xedc6
movq -0x750(%rbp), %rax
movl $0x4, 0x4(%rax)
movq 0x71ed(%rip), %rdi      # 0x15fc8
leaq 0x1339(%rip), %rsi      # 0x1011b
callq 0x32e0
movq %rax, -0x758(%rbp)
jmp 0xedf0
movq -0x758(%rbp), %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, -0x760(%rbp)
jmp 0xee0b
movq -0x760(%rbp), %rdi
leaq 0x1304(%rip), %rsi      # 0x1011d
callq 0x32e0
movq %rax, -0x768(%rbp)
jmp 0xee27
movq -0x768(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x770(%rbp)
jmp 0xee3f
movq -0x770(%rbp), %rdi
leaq 0x1674(%rip), %rsi      # 0x104c1
callq 0x32e0
movq %rax, -0x778(%rbp)
jmp 0xee5b
movq -0x778(%rbp), %rdi
leaq 0x1389(%rip), %rsi      # 0x101f2
callq 0x32e0
jmp 0xee70
movq -0x30(%rbp), %rdi
movq -0x278(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x3f8(%rbp), %rsi
callq 0xf9f0
movq %rax, -0x780(%rbp)
jmp 0xee97
movq -0x780(%rbp), %rax
movq %rax, -0x3f0(%rbp)
movq -0x3f0(%rbp), %rax
movq %rax, -0x278(%rbp)
movl $0xa, -0x26c(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x31b0
leaq -0x370(%rbp), %rdi
callq 0x7a40
jmp 0xf3e0
leaq -0x390(%rbp), %rdi
callq 0x31b0
leaq -0x370(%rbp), %rdi
callq 0x7a40
jmp 0xf97b
movq 0x70ca(%rip), %rdi      # 0x15fc8
leaq 0x1216(%rip), %rsi      # 0x1011b
callq 0x32e0
movq %rax, %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, %rdi
leaq 0x11fb(%rip), %rsi      # 0x1011d
callq 0x32e0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, %rdi
leaq 0x1516(%rip), %rsi      # 0x10452
callq 0x32e0
movq %rax, %rdi
movq 0x706d(%rip), %rsi      # 0x15fb8
callq 0x3330
movl -0x284(%rbp), %edx
movl -0x8(%rbp), %ecx
leaq -0x428(%rbp), %rdi
movq %rdi, -0x788(%rbp)
movl $0x6, %esi
callq 0xcab0
movq -0x788(%rbp), %rsi
leaq -0x448(%rbp), %rdi
callq 0xcce0
jmp 0xef86
movl $0x0, -0x44c(%rbp)
movslq -0x44c(%rbp), %rax
movq %rax, -0x790(%rbp)
movq -0x28(%rbp), %rdi
callq 0x79f0
movq %rax, %rcx
movq -0x790(%rbp), %rax
cmpq %rcx, %rax
jae 0xf245
leaq -0x454(%rbp), %rdi
callq 0xbfb0
jmp 0xefc8
movl -0x44c(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0xf214
movl -0x44c(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0xf214
leaq -0x479(%rbp), %rdi
movq %rdi, -0x798(%rbp)
callq 0x34c0
movq -0x798(%rbp), %rdx
leaq 0x10e2(%rip), %rsi      # 0x100e9
leaq -0x478(%rbp), %rdi
callq 0x75f0
jmp 0xf015
movq -0x28(%rbp), %rdi
leaq -0x44c(%rbp), %rsi
callq 0x77a0
movq %rax, -0x7a0(%rbp)
jmp 0xf02e
movq -0x7a0(%rbp), %rax
movl (%rax), %edx
leaq -0x454(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0xbff0
jmp 0xf04c
leaq -0x478(%rbp), %rdi
callq 0x31b0
leaq -0x479(%rbp), %rdi
callq 0x3360
leaq -0x4a0(%rbp), %rdi
leaq -0x448(%rbp), %rsi
callq 0x3110
jmp 0xf079
leaq -0x454(%rbp), %rdi
leaq -0x4a0(%rbp), %rsi
callq 0xc1f0
jmp 0xf08e
leaq -0x4a0(%rbp), %rdi
callq 0x31b0
movq 0x6f27(%rip), %rdi      # 0x15fc8
leaq 0x1073(%rip), %rsi      # 0x1011b
callq 0x32e0
movq %rax, -0x7a8(%rbp)
jmp 0xf0b6
movq -0x7a8(%rbp), %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, -0x7b0(%rbp)
jmp 0xf0d1
movq -0x7b0(%rbp), %rdi
leaq 0x103e(%rip), %rsi      # 0x1011d
callq 0x32e0
movq %rax, -0x7b8(%rbp)
jmp 0xf0ed
movq -0x7b8(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x7c0(%rbp)
jmp 0xf105
movq -0x7c0(%rbp), %rdi
leaq 0x10c1(%rip), %rsi      # 0x101d4
callq 0x32e0
movq %rax, -0x7c8(%rbp)
jmp 0xf121
movq -0x7c8(%rbp), %rdi
movl -0x44c(%rbp), %esi
callq 0x34a0
movq %rax, -0x7d0(%rbp)
jmp 0xf13c
movq -0x7d0(%rbp), %rdi
leaq 0x1338(%rip), %rsi      # 0x10482
callq 0x32e0
movq %rax, -0x7d8(%rbp)
jmp 0xf158
movq -0x7d8(%rbp), %rdi
movq 0x6e52(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xf16d
jmp 0xf214
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf37b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf36f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf1d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x478(%rbp), %rdi
callq 0x31b0
leaq -0x479(%rbp), %rdi
callq 0x3360
jmp 0xf234
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf234
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0x31b0
jmp 0xf234
leaq -0x454(%rbp), %rdi
callq 0xc7d0
movl -0x44c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44c(%rbp)
jmp 0xef90
leaq -0x454(%rbp), %rdi
callq 0xc7d0
jmp 0xf36f
movq 0x10(%rbp), %rdi
leaq -0x284(%rbp), %rsi
callq 0x78c0
movq %rax, -0x7e0(%rbp)
jmp 0xf25e
movq -0x7e0(%rbp), %rax
movl $0x5, 0x4(%rax)
movq 0x6d55(%rip), %rdi      # 0x15fc8
leaq 0xea1(%rip), %rsi       # 0x1011b
callq 0x32e0
movq %rax, -0x7e8(%rbp)
jmp 0xf288
movq -0x7e8(%rbp), %rdi
movl -0x284(%rbp), %esi
callq 0x34a0
movq %rax, -0x7f0(%rbp)
jmp 0xf2a3
movq -0x7f0(%rbp), %rdi
leaq 0xe6c(%rip), %rsi       # 0x1011d
callq 0x32e0
movq %rax, -0x7f8(%rbp)
jmp 0xf2bf
movq -0x7f8(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x800(%rbp)
jmp 0xf2d7
movq -0x800(%rbp), %rdi
leaq 0x1195(%rip), %rsi      # 0x1047a
callq 0x32e0
movq %rax, -0x808(%rbp)
jmp 0xf2f3
movq -0x808(%rbp), %rdi
leaq 0xef1(%rip), %rsi       # 0x101f2
callq 0x32e0
jmp 0xf308
movq -0x30(%rbp), %rdi
movq -0x278(%rbp), %rax
movq %rax, -0x4b0(%rbp)
movq -0x4b0(%rbp), %rsi
callq 0xf9f0
movq %rax, -0x810(%rbp)
jmp 0xf32f
movq -0x810(%rbp), %rax
movq %rax, -0x4a8(%rbp)
movq -0x4a8(%rbp), %rax
movq %rax, -0x278(%rbp)
movl $0xa, -0x26c(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x31b0
leaq -0x428(%rbp), %rdi
callq 0x7a40
jmp 0xf3e0
leaq -0x448(%rbp), %rdi
callq 0x31b0
leaq -0x428(%rbp), %rdi
callq 0x7a40
jmp 0xf97b
movq 0x6c35(%rip), %rdi      # 0x15fc8
leaq 0x1141(%rip), %rsi      # 0x104db
callq 0x32e0
movq %rax, -0x818(%rbp)
movq 0x10(%rbp), %rdi
leaq -0x284(%rbp), %rsi
callq 0x78c0
movq -0x818(%rbp), %rdi
movl 0x4(%rax), %esi
callq 0x34a0
movq %rax, %rdi
movq 0x6be9(%rip), %rsi      # 0x15fb8
callq 0x3330
leaq -0x278(%rbp), %rdi
callq 0xfa30
jmp 0xf3ee
leaq -0x278(%rbp), %rdi
callq 0xfa30
jmp 0xe51e
movq -0x30(%rbp), %rdi
callq 0xfa60
testb $0x1, %al
jne 0xf402
jmp 0xf40b
movb $0x0, -0x1(%rbp)
jmp 0xf96d
movb $0x0, -0x35(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x4b8(%rbp), %rdi
movq %rdi, -0x820(%rbp)
callq 0xc4c0
leaq -0x4d8(%rbp), %rdi
callq 0x3440
movq -0x820(%rbp), %rsi
leaq -0x4f8(%rbp), %rdi
movl $0x400, %edx            # imm = 0x400
callq 0xc280
jmp 0xf44c
leaq -0x4d8(%rbp), %rdi
movq %rdi, -0x828(%rbp)
leaq -0x4f8(%rbp), %rsi
movq %rsi, -0x830(%rbp)
callq 0x33d0
movq -0x830(%rbp), %rdi
callq 0x31b0
movq -0x828(%rbp), %rsi
leaq -0x548(%rbp), %rdi
callq 0x3110
jmp 0xf48e
leaq -0x528(%rbp), %rdi
leaq -0x548(%rbp), %rsi
callq 0xcb40
jmp 0xf4a3
leaq -0x548(%rbp), %rdi
callq 0x31b0
leaq -0x568(%rbp), %rdi
callq 0x3440
leaq -0x588(%rbp), %rdi
callq 0x3440
movl -0x528(%rbp), %eax
movl %eax, -0x834(%rbp)
subl $0x5, %eax
je 0xf528
jmp 0xf4da
movl -0x834(%rbp), %eax
subl $0x6, %eax
je 0xf725
jmp 0xf8e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf94f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x548(%rbp), %rdi
callq 0x31b0
jmp 0xf94f
movq 0x6a99(%rip), %rdi      # 0x15fc8
leaq 0xbe5(%rip), %rsi       # 0x1011b
callq 0x32e0
movq %rax, -0x840(%rbp)
jmp 0xf544
movq -0x840(%rbp), %rdi
movl -0x524(%rbp), %esi
callq 0x34a0
movq %rax, -0x848(%rbp)
jmp 0xf55f
movq -0x848(%rbp), %rdi
leaq 0xbb0(%rip), %rsi       # 0x1011d
callq 0x32e0
movq %rax, -0x850(%rbp)
jmp 0xf57b
movq -0x850(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x858(%rbp)
jmp 0xf593
movq -0x858(%rbp), %rdi
leaq 0xf46(%rip), %rsi       # 0x104e7
callq 0x32e0
movq %rax, -0x860(%rbp)
jmp 0xf5af
movq -0x860(%rbp), %rdi
movl -0x520(%rbp), %esi
callq 0x34a0
movq %rax, -0x868(%rbp)
jmp 0xf5ca
movq -0x868(%rbp), %rdi
leaq 0xeaa(%rip), %rsi       # 0x10482
callq 0x32e0
movq %rax, -0x870(%rbp)
jmp 0xf5e6
movq -0x870(%rbp), %rdi
movq 0x69c4(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xf5fb
movq 0x10(%rbp), %rdi
leaq -0x524(%rbp), %rsi
callq 0x78c0
movq %rax, -0x878(%rbp)
jmp 0xf614
movq -0x878(%rbp), %rax
movl $0x4, 0x4(%rax)
movq 0x699f(%rip), %rdi      # 0x15fc8
leaq 0xaeb(%rip), %rsi       # 0x1011b
callq 0x32e0
movq %rax, -0x880(%rbp)
jmp 0xf63e
movq -0x880(%rbp), %rdi
movl -0x524(%rbp), %esi
callq 0x34a0
movq %rax, -0x888(%rbp)
jmp 0xf659
movq -0x888(%rbp), %rdi
leaq 0xab6(%rip), %rsi       # 0x1011d
callq 0x32e0
movq %rax, -0x890(%rbp)
jmp 0xf675
movq -0x890(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x898(%rbp)
jmp 0xf68d
movq -0x898(%rbp), %rdi
leaq 0xe26(%rip), %rsi       # 0x104c1
callq 0x32e0
movq %rax, -0x8a0(%rbp)
jmp 0xf6a9
movq -0x8a0(%rbp), %rdi
leaq 0xb3b(%rip), %rsi       # 0x101f2
callq 0x32e0
jmp 0xf6be
movq -0x30(%rbp), %rdi
leaq -0x524(%rbp), %rsi
callq 0x7b00
jmp 0xf6d0
movq -0x30(%rbp), %rdi
callq 0xfa60
testb $0x1, %al
jne 0xf6df
jmp 0xf720
movb $0x1, -0x35(%rbp)
jmp 0xf720
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x588(%rbp), %rdi
callq 0x31b0
leaq -0x568(%rbp), %rdi
callq 0x31b0
leaq -0x528(%rbp), %rdi
callq 0x7a40
jmp 0xf94f
jmp 0xf8e4
movq 0x689c(%rip), %rdi      # 0x15fc8
leaq 0x9e8(%rip), %rsi       # 0x1011b
callq 0x32e0
movq %rax, -0x8a8(%rbp)
jmp 0xf741
movq -0x8a8(%rbp), %rdi
movl -0x524(%rbp), %esi
callq 0x34a0
movq %rax, -0x8b0(%rbp)
jmp 0xf75c
movq -0x8b0(%rbp), %rdi
leaq 0x9b3(%rip), %rsi       # 0x1011d
callq 0x32e0
movq %rax, -0x8b8(%rbp)
jmp 0xf778
movq -0x8b8(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x8c0(%rbp)
jmp 0xf790
movq -0x8c0(%rbp), %rdi
leaq 0xd65(%rip), %rsi       # 0x10503
callq 0x32e0
movq %rax, -0x8c8(%rbp)
jmp 0xf7ac
movq -0x8c8(%rbp), %rdi
movl -0x520(%rbp), %esi
callq 0x34a0
movq %rax, -0x8d0(%rbp)
jmp 0xf7c7
movq -0x8d0(%rbp), %rdi
leaq 0xcad(%rip), %rsi       # 0x10482
callq 0x32e0
movq %rax, -0x8d8(%rbp)
jmp 0xf7e3
movq -0x8d8(%rbp), %rdi
movq 0x67c7(%rip), %rsi      # 0x15fb8
callq 0x3330
jmp 0xf7f8
movq 0x10(%rbp), %rdi
leaq -0x524(%rbp), %rsi
callq 0x78c0
movq %rax, -0x8e0(%rbp)
jmp 0xf811
movq -0x8e0(%rbp), %rax
movl $0x5, 0x4(%rax)
movq 0x67a2(%rip), %rdi      # 0x15fc8
leaq 0x8ee(%rip), %rsi       # 0x1011b
callq 0x32e0
movq %rax, -0x8e8(%rbp)
jmp 0xf83b
movq -0x8e8(%rbp), %rdi
movl -0x524(%rbp), %esi
callq 0x34a0
movq %rax, -0x8f0(%rbp)
jmp 0xf856
movq -0x8f0(%rbp), %rdi
leaq 0x8b9(%rip), %rsi       # 0x1011d
callq 0x32e0
movq %rax, -0x8f8(%rbp)
jmp 0xf872
movq -0x8f8(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x34a0
movq %rax, -0x900(%rbp)
jmp 0xf88a
movq -0x900(%rbp), %rdi
leaq 0xbe2(%rip), %rsi       # 0x1047a
callq 0x32e0
movq %rax, -0x908(%rbp)
jmp 0xf8a6
movq -0x908(%rbp), %rdi
leaq 0x93e(%rip), %rsi       # 0x101f2
callq 0x32e0
jmp 0xf8bb
movq -0x30(%rbp), %rdi
leaq -0x524(%rbp), %rsi
callq 0x7b00
jmp 0xf8cd
movq -0x30(%rbp), %rdi
callq 0xfa60
testb $0x1, %al
jne 0xf8dc
jmp 0xf8e0
movb $0x1, -0x35(%rbp)
jmp 0xf8e4
jmp 0xf8e4
testb $0x1, -0x35(%rbp)
je 0xf8f6
movl $0x15, -0x26c(%rbp)
jmp 0xf900
movl $0x0, -0x26c(%rbp)
leaq -0x588(%rbp), %rdi
callq 0x31b0
leaq -0x568(%rbp), %rdi
callq 0x31b0
leaq -0x528(%rbp), %rdi
callq 0x7a40
leaq -0x4d8(%rbp), %rdi
callq 0x31b0
leaq -0x4b8(%rbp), %rdi
callq 0xc7d0
movl -0x26c(%rbp), %eax
testl %eax, %eax
je 0xf94a
jmp 0xf948
jmp 0xf969
jmp 0xf40f
leaq -0x4d8(%rbp), %rdi
callq 0x31b0
leaq -0x4b8(%rbp), %rdi
callq 0xc7d0
jmp 0xf97b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x910, %rsp            # imm = 0x910
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x34b0
nopw (%rax,%rax)