// File: yahoo[P]UDPing/src/server.cc
// Function: main
int main(int argc, char** argv) {
    if (!getuid()) {
        // I'm running as root.  Switch to nobody or die!!!
        struct passwd* pwd = getpwnam("nobody");
        if (pwd && pwd->pw_uid) {
            if (setgid(pwd->pw_gid)) {
                cerr << "Couldn't change userid to nobody (setgid failed).  Terminating server" << endl;
            }
            if (setuid(pwd->pw_uid)) {
                cerr << "Couldn't change userid to nobody (setuid failed).  Terminating server" << endl;
            }
        } else {
            cerr << "Couldn't change userid to nobody.  Terminating server" << endl;
            exit(-1);
        }
    }
    char buf[MAXBUF];
    setOptions(new Options(argc, argv, "p:k:l:m:r:s:t:vq"));

    stringstream usage;
    usage << "Usage: udping_server -l <listen hostname> -p <port number> -k <keepalive interval seconds> [-r <receive hostname>]" << endl <<
             "           [-s <statsd host:port>] [-t <tag based statsd host:port>] [-m <tag based statds metric name>] [-v] [-q]" << endl <<
             "-l: address to bind udp listener to" << endl <<
             "-p: udp port to bind listener to" << endl <<
             "-k: seconds to wait for delayed pings to show up before publishing stats" << endl <<
             "-r: address to report stats as being received by, if different from -l" << endl <<
             "-s: statsd host:port (default port 8125)" << endl <<
             "-t: tag based statsd host:port (default port 8125)" << endl <<
             "-m: tag based statsd metric name (default udping)" << endl <<
             "-v: verbose" << endl <<
             "-q: quiet" << endl;
    string listen_host = getOptions()->getStringOption('l', 1, usage.str(), "Hostname not provided\n");
    int listen_port = getOptions()->parseIntOption('p', 1, 1024, 65536, usage.str(), "Port number is out of range 1024-65532\n");
    int keepalive = getOptions()->parseIntOption('k', 1, 1, 60, usage.str(), "Keepalive interval is out of range 1-60s\n");

    char* rh = getOptions()->getStringOption('r', 0, usage.str(), "");
    string receive_host = rh == NULL ? listen_host : rh;

    /* Establish Stats Writer(s) */
    char* statsdInfo = getOptions()->getStringOption('s', 0, usage.str(), "");
    char* statsdTagInfo = getOptions()->getStringOption('t', 0, usage.str(), "");
    char* statsdTagMetric = getOptions()->getStringOption('m', 0, usage.str(), "");
    int quiet = getOptions()->getQuiet();
    StatsWriter* writer = new StatsWriter(listen_host, receive_host, listen_port, statsdInfo, statsdTagInfo, statsdTagMetric, quiet);

    /* Start Session Manager */
    ServerSessionManager sessionManager(writer, keepalive);

    /* Periodic check to see if packets are received */
    setIntervalTimer(keepalive, handleAlarm);

    int fd = makeSocket (listen_host, listen_port);
    if (fd < 0) {
        err (1, "Failed to create socket");
    }
    while (1) {
        sessionManager.readNextPacket (fd);
    }
    return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xef0, %rsp            # imm = 0xEF0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x2190
cmpl $0x0, %eax
jne 0x276e
leaq 0x8946(%rip), %rdi      # 0xb004
callq 0x2260
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2740
movq -0x18(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x2740
movq -0x18(%rbp), %rax
movl 0x14(%rax), %edi
callq 0x24d0
cmpl $0x0, %eax
je 0x270b
movq 0xd900(%rip), %rdi      # 0xfff0
leaq 0x8914(%rip), %rsi      # 0xb00b
callq 0x2310
movq %rax, %rdi
movq 0xd8ba(%rip), %rsi      # 0xffc0
callq 0x2340
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x24f0
cmpl $0x0, %eax
je 0x273e
movq 0xd8cd(%rip), %rdi      # 0xfff0
leaq 0x8927(%rip), %rsi      # 0xb051
callq 0x2310
movq %rax, %rdi
movq 0xd887(%rip), %rsi      # 0xffc0
callq 0x2340
jmp 0x276c
movq 0xd8a9(%rip), %rdi      # 0xfff0
leaq 0x8949(%rip), %rsi      # 0xb097
callq 0x2310
movq %rax, %rdi
movq 0xd863(%rip), %rsi      # 0xffc0
callq 0x2340
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2380
jmp 0x276e
movl $0x800, %edi            # imm = 0x800
callq 0x2320
movq %rax, -0xd50(%rbp)
movb $0x1, -0x825(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xd44(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd40(%rbp)
leaq -0x811(%rbp), %rdi
movq %rdi, -0xd38(%rbp)
callq 0x24c0
movq -0xd38(%rbp), %rdx
leaq 0x8912(%rip), %rsi      # 0xb0cd
leaq -0x810(%rbp), %rdi
callq 0x23e0
jmp 0x27c9
movq -0xd40(%rbp), %rdx
movl -0xd44(%rbp), %esi
movq -0xd50(%rbp), %rdi
leaq -0x810(%rbp), %rcx
callq 0x3f30
jmp 0x27eb
movq -0xd50(%rbp), %rdi
movb $0x0, -0x825(%rbp)
callq 0x4220
jmp 0x2800
leaq -0x810(%rbp), %rdi
callq 0x21e0
leaq -0x811(%rbp), %rdi
callq 0x2350
leaq -0x9b0(%rbp), %rdi
callq 0x2200
leaq -0x9a0(%rbp), %rdi
leaq 0x88ac(%rip), %rsi      # 0xb0de
callq 0x2310
movq %rax, -0xd58(%rbp)
jmp 0x2840
movq -0xd58(%rbp), %rdi
movq 0xd772(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xd60(%rbp)
jmp 0x285c
movq -0xd60(%rbp), %rdi
leaq 0x88e7(%rip), %rsi      # 0xb151
callq 0x2310
movq %rax, -0xd68(%rbp)
jmp 0x2878
movq -0xd68(%rbp), %rdi
movq 0xd73a(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xd70(%rbp)
jmp 0x2894
movq -0xd70(%rbp), %rdi
leaq 0x8922(%rip), %rsi      # 0xb1c4
callq 0x2310
movq %rax, -0xd78(%rbp)
jmp 0x28b0
movq -0xd78(%rbp), %rdi
movq 0xd702(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xd80(%rbp)
jmp 0x28cc
movq -0xd80(%rbp), %rdi
leaq 0x890e(%rip), %rsi      # 0xb1e8
callq 0x2310
movq %rax, -0xd88(%rbp)
jmp 0x28e8
movq -0xd88(%rbp), %rdi
movq 0xd6ca(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xd90(%rbp)
jmp 0x2904
movq -0xd90(%rbp), %rdi
leaq 0x88f7(%rip), %rsi      # 0xb209
callq 0x2310
movq %rax, -0xd98(%rbp)
jmp 0x2920
movq -0xd98(%rbp), %rdi
movq 0xd692(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xda0(%rbp)
jmp 0x293c
movq -0xda0(%rbp), %rdi
leaq 0x8908(%rip), %rsi      # 0xb252
callq 0x2310
movq %rax, -0xda8(%rbp)
jmp 0x2958
movq -0xda8(%rbp), %rdi
movq 0xd65a(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xdb0(%rbp)
jmp 0x2974
movq -0xdb0(%rbp), %rdi
leaq 0x8917(%rip), %rsi      # 0xb299
callq 0x2310
movq %rax, -0xdb8(%rbp)
jmp 0x2990
movq -0xdb8(%rbp), %rdi
movq 0xd622(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xdc0(%rbp)
jmp 0x29ac
movq -0xdc0(%rbp), %rdi
leaq 0x8908(%rip), %rsi      # 0xb2c2
callq 0x2310
movq %rax, -0xdc8(%rbp)
jmp 0x29c8
movq -0xdc8(%rbp), %rdi
movq 0xd5ea(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xdd0(%rbp)
jmp 0x29e4
movq -0xdd0(%rbp), %rdi
leaq 0x8903(%rip), %rsi      # 0xb2f5
callq 0x2310
movq %rax, -0xdd8(%rbp)
jmp 0x2a00
movq -0xdd8(%rbp), %rdi
movq 0xd5b2(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xde0(%rbp)
jmp 0x2a1c
movq -0xde0(%rbp), %rdi
leaq 0x88fd(%rip), %rsi      # 0xb327
callq 0x2310
movq %rax, -0xde8(%rbp)
jmp 0x2a38
movq -0xde8(%rbp), %rdi
movq 0xd57a(%rip), %rsi      # 0xffc0
callq 0x2340
movq %rax, -0xdf0(%rbp)
jmp 0x2a54
movq -0xdf0(%rbp), %rdi
leaq 0x88d1(%rip), %rsi      # 0xb333
callq 0x2310
movq %rax, -0xdf8(%rbp)
jmp 0x2a70
movq -0xdf8(%rbp), %rdi
movq 0xd542(%rip), %rsi      # 0xffc0
callq 0x2340
jmp 0x2a85
callq 0x4240
movq %rax, -0xe00(%rbp)
jmp 0x2a93
leaq -0x9f0(%rbp), %rdi
leaq -0x9b0(%rbp), %rsi
callq 0x2300
jmp 0x2aa8
leaq -0xa11(%rbp), %rdi
movq %rdi, -0xe08(%rbp)
callq 0x24c0
movq -0xe08(%rbp), %rdx
leaq 0x8874(%rip), %rsi      # 0xb33d
leaq -0xa10(%rbp), %rdi
callq 0x23e0
jmp 0x2ad7
movq -0xe00(%rbp), %rdi
movl $0x6c, %esi
movl $0x1, %edx
leaq -0x9f0(%rbp), %rcx
leaq -0xa10(%rbp), %r8
callq 0x40f0
movq %rax, -0xe10(%rbp)
jmp 0x2b04
leaq -0xa12(%rbp), %rdi
movq %rdi, -0xe18(%rbp)
callq 0x24c0
movq -0xe10(%rbp), %rsi
movq -0xe18(%rbp), %rdx
leaq -0x9d0(%rbp), %rdi
callq 0x23e0
jmp 0x2b33
leaq -0xa12(%rbp), %rdi
callq 0x2350
leaq -0xa10(%rbp), %rdi
callq 0x21e0
leaq -0xa11(%rbp), %rdi
callq 0x2350
leaq -0x9f0(%rbp), %rdi
callq 0x21e0
callq 0x4240
movq %rax, -0xe20(%rbp)
jmp 0x2b71
leaq -0xa38(%rbp), %rdi
leaq -0x9b0(%rbp), %rsi
callq 0x2300
jmp 0x2b86
leaq -0xa59(%rbp), %rdi
movq %rdi, -0xe28(%rbp)
callq 0x24c0
movq -0xe28(%rbp), %rdx
leaq 0x87ad(%rip), %rsi      # 0xb354
leaq -0xa58(%rbp), %rdi
callq 0x23e0
jmp 0x2bb5
movq -0xe20(%rbp), %rdi
movq %rsp, %rax
leaq -0xa58(%rbp), %rcx
movq %rcx, (%rax)
movl $0x70, %esi
movl $0x1, %edx
movl $0x400, %ecx            # imm = 0x400
movl $0x10000, %r8d          # imm = 0x10000
leaq -0xa38(%rbp), %r9
callq 0x4020
movl %eax, -0xe2c(%rbp)
jmp 0x2bf2
leaq -0xa58(%rbp), %rdi
callq 0x21e0
leaq -0xa59(%rbp), %rdi
callq 0x2350
leaq -0xa38(%rbp), %rdi
callq 0x21e0
movl -0xe2c(%rbp), %eax
movl %eax, -0xa18(%rbp)
callq 0x4240
movq %rax, -0xe38(%rbp)
jmp 0x2c30
leaq -0xa80(%rbp), %rdi
leaq -0x9b0(%rbp), %rsi
callq 0x2300
jmp 0x2c45
leaq -0xaa1(%rbp), %rdi
movq %rdi, -0xe40(%rbp)
callq 0x24c0
movq -0xe40(%rbp), %rdx
leaq 0x8716(%rip), %rsi      # 0xb37c
leaq -0xaa0(%rbp), %rdi
callq 0x23e0
jmp 0x2c74
movq -0xe38(%rbp), %rdi
movq %rsp, %rax
leaq -0xaa0(%rbp), %rcx
movq %rcx, (%rax)
movl $0x6b, %esi
movl $0x1, %ecx
movl $0x3c, %r8d
leaq -0xa80(%rbp), %r9
movl %ecx, %edx
callq 0x4020
movl %eax, -0xe44(%rbp)
jmp 0x2cae
leaq -0xaa0(%rbp), %rdi
callq 0x21e0
leaq -0xaa1(%rbp), %rdi
callq 0x2350
leaq -0xa80(%rbp), %rdi
callq 0x21e0
movl -0xe44(%rbp), %eax
movl %eax, -0xa60(%rbp)
callq 0x4240
movq %rax, -0xe50(%rbp)
jmp 0x2cec
leaq -0xad0(%rbp), %rdi
leaq -0x9b0(%rbp), %rsi
callq 0x2300
jmp 0x2d01
leaq -0xaf1(%rbp), %rdi
movq %rdi, -0xe58(%rbp)
callq 0x24c0
movq -0xe58(%rbp), %rdx
leaq 0x8659(%rip), %rsi      # 0xb37b
leaq -0xaf0(%rbp), %rdi
callq 0x23e0
jmp 0x2d30
movq -0xe50(%rbp), %rdi
movl $0x72, %esi
xorl %edx, %edx
leaq -0xad0(%rbp), %rcx
leaq -0xaf0(%rbp), %r8
callq 0x40f0
movq %rax, -0xe60(%rbp)
jmp 0x2d5a
leaq -0xaf0(%rbp), %rdi
callq 0x21e0
leaq -0xaf1(%rbp), %rdi
callq 0x2350
leaq -0xad0(%rbp), %rdi
callq 0x21e0
movq -0xe60(%rbp), %rax
movq %rax, -0xab0(%rbp)
movq -0xab0(%rbp), %rax
movb $0x0, -0xb1a(%rbp)
cmpq $0x0, %rax
jne 0x2db7
leaq -0xb18(%rbp), %rdi
leaq -0x9d0(%rbp), %rsi
callq 0x2160
jmp 0x2db5
jmp 0x2dfd
movq -0xab0(%rbp), %rax
movq %rax, -0xe70(%rbp)
leaq -0xb19(%rbp), %rdi
movq %rdi, -0xe68(%rbp)
callq 0x24c0
movq -0xe70(%rbp), %rsi
movq -0xe68(%rbp), %rdx
movb $0x1, -0xb1a(%rbp)
leaq -0xb18(%rbp), %rdi
callq 0x23e0
jmp 0x2dfb
jmp 0x2dfd
testb $0x1, -0xb1a(%rbp)
jne 0x2e08
jmp 0x2e14
leaq -0xb19(%rbp), %rdi
callq 0x2350
callq 0x4240
movq %rax, -0xe78(%rbp)
jmp 0x2e22
leaq -0xb48(%rbp), %rdi
leaq -0x9b0(%rbp), %rsi
callq 0x2300
jmp 0x2e37
leaq -0xb69(%rbp), %rdi
movq %rdi, -0xe80(%rbp)
callq 0x24c0
movq -0xe80(%rbp), %rdx
leaq 0x8523(%rip), %rsi      # 0xb37b
leaq -0xb68(%rbp), %rdi
callq 0x23e0
jmp 0x2e66
movq -0xe78(%rbp), %rdi
movl $0x73, %esi
xorl %edx, %edx
leaq -0xb48(%rbp), %rcx
leaq -0xb68(%rbp), %r8
callq 0x40f0
movq %rax, -0xe88(%rbp)
jmp 0x2e90
leaq -0xb68(%rbp), %rdi
callq 0x21e0
leaq -0xb69(%rbp), %rdi
callq 0x2350
leaq -0xb48(%rbp), %rdi
callq 0x21e0
movq -0xe88(%rbp), %rax
movq %rax, -0xb28(%rbp)
callq 0x4240
movq %rax, -0xe90(%rbp)
jmp 0x2ed0
leaq -0xb98(%rbp), %rdi
leaq -0x9b0(%rbp), %rsi
callq 0x2300
jmp 0x2ee5
leaq -0xbb9(%rbp), %rdi
movq %rdi, -0xe98(%rbp)
callq 0x24c0
movq -0xe98(%rbp), %rdx
leaq 0x8475(%rip), %rsi      # 0xb37b
leaq -0xbb8(%rbp), %rdi
callq 0x23e0
jmp 0x2f14
movq -0xe90(%rbp), %rdi
movl $0x74, %esi
xorl %edx, %edx
leaq -0xb98(%rbp), %rcx
leaq -0xbb8(%rbp), %r8
callq 0x40f0
movq %rax, -0xea0(%rbp)
jmp 0x2f3e
leaq -0xbb8(%rbp), %rdi
callq 0x21e0
leaq -0xbb9(%rbp), %rdi
callq 0x2350
leaq -0xb98(%rbp), %rdi
callq 0x21e0
movq -0xea0(%rbp), %rax
movq %rax, -0xb78(%rbp)
callq 0x4240
movq %rax, -0xea8(%rbp)
jmp 0x2f7e
leaq -0xbe8(%rbp), %rdi
leaq -0x9b0(%rbp), %rsi
callq 0x2300
jmp 0x2f93
leaq -0xc09(%rbp), %rdi
movq %rdi, -0xeb0(%rbp)
callq 0x24c0
movq -0xeb0(%rbp), %rdx
leaq 0x83c7(%rip), %rsi      # 0xb37b
leaq -0xc08(%rbp), %rdi
callq 0x23e0
jmp 0x2fc2
movq -0xea8(%rbp), %rdi
movl $0x6d, %esi
xorl %edx, %edx
leaq -0xbe8(%rbp), %rcx
leaq -0xc08(%rbp), %r8
callq 0x40f0
movq %rax, -0xeb8(%rbp)
jmp 0x2fec
leaq -0xc08(%rbp), %rdi
callq 0x21e0
leaq -0xc09(%rbp), %rdi
callq 0x2350
leaq -0xbe8(%rbp), %rdi
callq 0x21e0
movq -0xeb8(%rbp), %rax
movq %rax, -0xbc8(%rbp)
callq 0x4240
movq %rax, -0xec0(%rbp)
jmp 0x302c
movq -0xec0(%rbp), %rdi
callq 0x41c0
movl %eax, -0xec4(%rbp)
jmp 0x3040
movl -0xec4(%rbp), %eax
movl %eax, -0xc10(%rbp)
movl $0x30, %edi
callq 0x2320
movq %rax, -0xed0(%rbp)
jmp 0x305f
movb $0x1, -0xc59(%rbp)
leaq -0xc38(%rbp), %rdi
leaq -0x9d0(%rbp), %rsi
callq 0x2160
jmp 0x307b
leaq -0xc58(%rbp), %rdi
leaq -0xb18(%rbp), %rsi
callq 0x2160
jmp 0x3090
movq -0xed0(%rbp), %rdi
movl -0xa18(%rbp), %ecx
movq -0xb28(%rbp), %r8
movq -0xb78(%rbp), %r9
movq -0xbc8(%rbp), %rdx
movl -0xc10(%rbp), %esi
movq %rsp, %rax
movl %esi, 0x8(%rax)
movq %rdx, (%rax)
leaq -0xc38(%rbp), %rsi
leaq -0xc58(%rbp), %rdx
callq 0x8e70
jmp 0x30d6
movb $0x0, -0xc59(%rbp)
leaq -0xc58(%rbp), %rdi
callq 0x21e0
leaq -0xc38(%rbp), %rdi
callq 0x21e0
movq -0xed0(%rbp), %rax
movq %rax, -0xc18(%rbp)
movq -0xc18(%rbp), %rsi
movl -0xa60(%rbp), %edx
leaq -0xd08(%rbp), %rdi
callq 0x5a50
jmp 0x311e
movl -0xa60(%rbp), %edi
leaq 0x2a35(%rip), %rsi      # 0x5b60
callq 0x3eb0
jmp 0x3132
leaq -0xd30(%rbp), %rdi
leaq -0x9d0(%rbp), %rsi
callq 0x2160
jmp 0x3147
movl -0xa18(%rbp), %esi
leaq -0xd30(%rbp), %rdi
callq 0x42e0
movl %eax, -0xed4(%rbp)
jmp 0x3161
leaq -0xd30(%rbp), %rdi
callq 0x21e0
movl -0xed4(%rbp), %eax
movl %eax, -0xd0c(%rbp)
cmpl $0x0, -0xd0c(%rbp)
jge 0x3550
leaq 0x8219(%rip), %rsi      # 0xb3a6
xorl %eax, %eax
movl $0x1, %edi
callq 0x22b0
jmp 0x319b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x31cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0x810(%rbp), %rdi
callq 0x21e0
leaq -0x811(%rbp), %rdi
callq 0x2350
testb $0x1, -0x825(%rbp)
jne 0x31e4
jmp 0x31f0
movq -0xd50(%rbp), %rdi
callq 0x22f0
jmp 0x359a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x358e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x325e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x3252
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xa12(%rbp), %rdi
callq 0x2350
leaq -0xa10(%rbp), %rdi
callq 0x21e0
leaq -0xa11(%rbp), %rdi
callq 0x2350
leaq -0x9f0(%rbp), %rdi
callq 0x21e0
jmp 0x358e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x3582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x32c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xa58(%rbp), %rdi
callq 0x21e0
leaq -0xa59(%rbp), %rdi
callq 0x2350
leaq -0xa38(%rbp), %rdi
callq 0x21e0
jmp 0x3582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x3313
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xaa0(%rbp), %rdi
callq 0x21e0
leaq -0xaa1(%rbp), %rdi
callq 0x2350
leaq -0xa80(%rbp), %rdi
callq 0x21e0
jmp 0x3582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x3362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xaf0(%rbp), %rdi
callq 0x21e0
leaq -0xaf1(%rbp), %rdi
callq 0x2350
leaq -0xad0(%rbp), %rdi
callq 0x21e0
jmp 0x3582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
testb $0x1, -0xb1a(%rbp)
jne 0x339c
jmp 0x33a8
leaq -0xb19(%rbp), %rdi
callq 0x2350
jmp 0x3582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x3576
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x33f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xb68(%rbp), %rdi
callq 0x21e0
leaq -0xb69(%rbp), %rdi
callq 0x2350
leaq -0xb48(%rbp), %rdi
callq 0x21e0
jmp 0x3576
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x3445
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xbb8(%rbp), %rdi
callq 0x21e0
leaq -0xbb9(%rbp), %rdi
callq 0x2350
leaq -0xb98(%rbp), %rdi
callq 0x21e0
jmp 0x3576
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x3494
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xc08(%rbp), %rdi
callq 0x21e0
leaq -0xc09(%rbp), %rdi
callq 0x2350
leaq -0xbe8(%rbp), %rdi
callq 0x21e0
jmp 0x3576
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x3503
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x34f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xc58(%rbp), %rdi
callq 0x21e0
leaq -0xc38(%rbp), %rdi
callq 0x21e0
testb $0x1, -0xc59(%rbp)
jne 0x350e
jmp 0x351a
movq -0xed0(%rbp), %rdi
callq 0x22f0
jmp 0x3576
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0x356a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0xd30(%rbp), %rdi
callq 0x21e0
jmp 0x356a
jmp 0x3552
jmp 0x3554
movl -0xd0c(%rbp), %esi
leaq -0xd08(%rbp), %rdi
callq 0x56d0
jmp 0x3568
jmp 0x3552
leaq -0xd08(%rbp), %rdi
callq 0x35b0
leaq -0xb18(%rbp), %rdi
callq 0x21e0
leaq -0x9d0(%rbp), %rdi
callq 0x21e0
leaq -0x9b0(%rbp), %rdi
callq 0x2220
movq -0x820(%rbp), %rdi
callq 0x24b0
nopw %cs:(%rax,%rax)