// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/sock_t.c
// Function: main
int main(int argc, char **argv)
{
    plan_tests(36);
    char    usock[] = "sock_t.u";

    int         port = argc > 1 ? atoi(argv[1]) : 9999;
    // This cannot be "localhost", which can map to IPv6 or IPv4
    // (order of returned results by getaddrinfo not deterministic).
    char const  *host = argc > 2 ? argv[2] : "127.0.0.1";
    setvbuf(stdout, NULL, _IOLBF, 0);

    IPSTR   ip = "", srvip;
    ok(host_ip("nobody.home", 80, ip), "unknown hostname");
    if (ok(!host_ip("google.ca", 80, ip), "google.ca"))
        fprintf(stderr, "# ip = %s\n", ip);

    int     rc, x, c, s = sock_bind(0, port);
    if (!ok(s >= 0, "sock_bind(%d)", port)) die("bind:");

    diag("rcvsize=%d, sndsize=%d", sock_getopt(s, SOCK_RCVSIZE), sock_getopt(s, SOCK_SNDSIZE));

    int         u = sock_create(usock);
    if (!ok(u >= 0, "sock_create(%s)", usock)) die("create:");

    rc = sock_getopt(s, SOCK_KEEPALIVE);
    ok(rc == 0, "getopt SOCK_KEEPALIVE: %d %s", rc, errname[errno]);

    rc = sock_setopt(s, SOCK_KEEPALIVE, 1);
    ok(rc == 0, "setopt SOCK_KEEPALIVE=1: %d %s", rc, errname[errno]);

    int      opt = sock_getopt(s, SOCK_LINGER);
    ok(opt == 0, "getopt SOCK_LINGER: %d %s", opt, errname[errno]);

    rc = sock_setopt(s, SOCK_LINGER, 8);
    ok(rc == 0, "setopt SOCK_LINGER=8 (secs): %d %s", rc, errname[errno]);

    rc = sock_getopt(s, SOCK_LINGER);
    ok(rc == 8, "getopt SOCK_LINGER: %d", rc);

    rc = sock_setopt(s, SOCK_LINGER, opt);
    ok(rc == 0, "setopt SOCK_LINGER=%d: %d %s", opt, rc, errname[errno]);

    rc = sock_setopt(s, SOCK_NOWAIT, 1);
    ok(!rc, "setopt SOCK_NOWAIT=1: %d", rc);

    rc = sock_getopt(s, SOCK_NOWAIT);
    ok(rc != 0, "getopt SOCK_NOWAIT: %d", rc);

    rc = sock_setopt(u, SOCK_NOWAIT, 1);
    ok(rc == 0, "setopt(unix, SOCK_NOWAIT=1): %d", rc);

    alarm(secs);

    x = sock_accept(s);
    ok(x == -1 && errno == EAGAIN, "accept(inet) did not block: %d (%s)", x, errname[errno]);

    x = sock_accept(u);
    ok(x == -1 && errno == EAGAIN, "accept(unix) did not block: %d (%s)", x, errname[errno]);

    alarm(0);

    sock_setopt(s, SOCK_NOWAIT, 0);
    sock_setopt(u, SOCK_NOWAIT, 0);

    rc = sock_getopt(s, SOCK_NOWAIT);
    ok(rc == 0, "getopt SOCK_NOWAIT: %d", rc);

    rc = sock_getopt(s, 666);
    ok(rc < 0, "getopt(bad_option) rejected: %s", errname[errno]);

    struct stat st;

    stat("/dev/null", &st);
    unsigned    devnull = st.st_ino;
    diag("inode(/dev/null) is %d", (int)devnull);

    stat("/dev/zero", &st);
    unsigned    devzero = st.st_ino;
    diag("inode(/dev/zero) is %d", (int)devzero);

    // Ensure that the test terminates even if a child goes bad.
    signal(SIGALRM, (sig_t)on_alarm);

    //--------------|-------|-------------------------------------
    if (!(pid = fork())) {
        close(s);
        close(u);

        int     fd1 = open("/dev/null", O_WRONLY);
        int     fd2 = open("/dev/zero", O_RDONLY);
        if (0 > (c = sock_connect(host, port, 0)))      die("[client]sock_connect(%s,%d):", host, port);
        if (0 > sock_peer(c, srvip, NULL, NULL, 0))     die("[client]sock_peer:");
        fprintf(stderr, "# [client] server ip=%s\n", srvip);
        if (0 > write(c, "hello", 5))                   die("[client]write(inet):");
        if (0 > (u = sock_open(usock)))                 die("[client]sock_open:");
        if (0 > sock_sendfd(u, fd1, "howdy,", 6))       die("[client]sendfd(1):");
        if (0 > sock_sendfd(u, fd2, "doody", 5))        die("[client]sendfd(2):");

        pause();    // Waiting for SIGTERM.
        _exit(0);   //NOTREACHED?
    }

    x = sock_accept(s);
    ok(x >= 0, "accept(inet): %d %s", x, errname[errno]);
    ok(fcntl(x, F_GETFD, 0) & FD_CLOEXEC, "accepted socket has CLOEXEC set");

    char    buf[99] = {};
    rc = sock_peer(x, ip, NULL, buf, sizeof(buf));
    ok(!rc, "peer addr=%s:%u, hostname=%s %s", ip, port, buf, errname[errno]);

    memset(buf, 0, sizeof(buf));
    rc = sock_recv(x, buf, sizeof(buf));
    ok(rc == 5 && !memcmp(buf, "hello", 5), "received: (%d) '%.6s'", rc, buf);

    close(x);
    close(s);

    kill(pid, SIGTERM);
    pid = wait(&rc);
    ok(WEXITSTATUS(rc) == 0,  "client exit status: %x", WEXITSTATUS(rc));

    //--------------|-------|-------------------------------------
    s = sock_bind("::", 0);
    if (s < 0 && errno == EAFNOSUPPORT) {
        skip(4, "Skipping tests requiring IPv6");
    } else {
        char    name[999] = "";
        rc = sock_addr(s, ip, &port, name, sizeof(name));
        ok(!rc, "sock_addr for ipv6 returns %d %s: ip=%s port=%d name=%s",
           rc, rc < -1 ? eainame[-rc] : errname[errno], ip, port, name);
        if (!(pid = fork())) {
            close(s);
            if (0 > (s = sock_connect(host, port, 0)))      die("[client6]sock_connect:");
            if (0 > sock_peer(s, srvip, NULL, NULL, 0))     die("[client6]sock_peer:");
            pause();
            _exit(0);
        }

        x = sock_accept(s);
        ok(x >= 0, "accept(inet6): %d %s", x, errname[errno]);
        memset(ip, 0, sizeof(ip));
        memset(buf, 0, sizeof(buf));
        rc = sock_peer(x, ip, NULL, buf, sizeof(buf));
        ok(!rc, "peer addr=%s:%u, hostname=%s %s", ip, port, buf, errname[errno]);

        kill(pid, SIGTERM);
        pid = wait(&rc);
        ok(WEXITSTATUS(rc) == 0,  "client exit status: %x", WEXITSTATUS(rc));
        close(x);
        close(s);
    }

    //--------------|-------|-------------------------------------
    x = sock_accept(u);
    ok(x >= 0, "accept(unix): %d %s", x, errname[errno]);

    memset(buf, 0, sizeof(buf));

    int     fd = -9;
    rc = sock_recvfd(x, &fd, buf, sizeof(buf));
    ok(rc == 6 && fd > 0, "recvfd returned %d, fd=%d", rc, fd);
    if (rc > 0) diag("data is '%.*s'", rc, buf);

    rc = fstat(fd, &st);
    ok(rc == 0 && st.st_ino == devnull, "fstat(%d): %d inode=%d", fd, rc, rc ? 0 : (int)st.st_ino);

    fd = -8;
    rc = sock_recvfd(x, &fd, buf+6, sizeof(buf));
    ok(rc == 5 && fd > 0, "recvfd returned %d, fd=%d", rc, fd);
    if (rc > 0) diag("data is '%.*s'", rc, buf+6);
    ok(!strcmp(buf, "howdy,doody"), "data is correct");

    rc = fstat(fd, &st);
    ok(rc == 0 && st.st_ino == devzero, "fstat(%d): %d inode=%d", fd, rc, rc ? 0 : (int)st.st_ino);

    alarm(secs);
    char    remhost[] = "aa.com";
    x = sock_connect(remhost, 80, SOCK_NOWAIT);
    ok(x >= 0 && errno == EINPROGRESS, "connect(%s,80,SOCK_NOWAIT) did not block: (%s)", remhost, errname[errno]);

    char    req[] = "GET / HTTP/1.0\r\n\r\n";
    rc = sock_send(x, req, strlen(req));
    ok(rc < 0, "send while connect is EINPROGRESS fails: %d (%s)", rc, errname[errno]);
    ok(sock_ready(x, /*WRITE|CONNECT*/1, /*SECS*/1), "connect ready in 1 sec");
    rc = sock_send(x, req, strlen(req));
    ok(rc > 0, "send now succeeds");

    unlink(usock);
#   undef  _
#   define _ "---------"
    x = sock_create(_"1"_"2"_"3"_"4"_"5"_"6"_"7"_"8"_"9"_"0"_"1");
    alarm(0);
    return exit_status();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x588, %rsp            # imm = 0x588
movq %rsi, %rbx
movl %edi, %ebp
movl $0x24, %edi
callq 0x76f2
movabsq $0x752e745f6b636f73, %rax # imm = 0x752E745F6B636F73
movq %rax, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
cmpl $0x1, %ebp
jle 0x373d
movq 0x8(%rbx), %rdi
callq 0x3480
movl %eax, 0xc(%rsp)
cmpl $0x2, %ebp
je 0x3745
movq 0x10(%rbx), %r12
jmp 0x374c
movl $0x270f, 0xc(%rsp)      # imm = 0x270F
leaq 0x48c1(%rip), %r12      # 0x800d
movq 0x8865(%rip), %rax      # 0xbfb8
movq (%rax), %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3030
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %r14
movups %xmm0, 0x1e(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
leaq 0x4893(%rip), %rdi      # 0x8017
movl $0x50, %esi
movq %r14, %rdx
callq 0x5c58
xorl %esi, %esi
testl %eax, %eax
setne %sil
subq $0x8, %rsp
leaq 0x488d(%rip), %r10      # 0x8031
leaq 0x487d(%rip), %r13      # 0x8028
leaq 0x4871(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq $0x45
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
leaq 0x486f(%rip), %rbx      # 0x8042
movq %rbx, %rdi
movl $0x50, %esi
movq %r14, %rdx
callq 0x5c58
subq $0x8, %rsp
testl %eax, %eax
je 0x37f8
leaq 0x4831(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
jmp 0x3806
leaq 0x4824(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %rbx
pushq $0x46
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
testl %eax, %eax
jne 0x49fb
movl 0xc(%rsp), %esi
xorl %edi, %edi
callq 0x5e14
movl %eax, %r15d
movl 0xc(%rsp), %r11d
leaq 0x4818(%rip), %r10      # 0x8057
leaq 0x47dd(%rip), %r9       # 0x8023
testl %eax, %eax
js 0x3853
movl $0x1, %esi
xorl %edi, %edi
jmp 0x3857
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq %r10
pushq $0x4a
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
testl %eax, %eax
je 0x4b39
movl %r15d, %edi
movl $0x3, %esi
callq 0x6a0e
movl %eax, %ebx
movl %r15d, %edi
movl $0x4, %esi
callq 0x6a0e
leaq 0x47cf(%rip), %rdi      # 0x806b
movl %ebx, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x76fb
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x6043
movl %eax, 0x10(%rsp)
leaq 0x47c3(%rip), %r10      # 0x8082
leaq 0x475d(%rip), %r9       # 0x8023
testl %eax, %eax
js 0x38d3
movl $0x1, %esi
xorl %edi, %edi
jmp 0x38d7
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %rbx
pushq %r10
pushq $0x4f
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
testl %eax, %eax
je 0x4b42
movl %r15d, %edi
xorl %esi, %esi
callq 0x6a0e
movl %eax, %ebx
movl %eax, 0x4(%rsp)
callq 0x3040
movslq (%rax), %rax
leaq 0x89b9(%rip), %rbp      # 0xc2d0
movq (%rbp,%rax,8), %r11
leaq 0x4777(%rip), %r10      # 0x809a
subq $0x8, %rsp
testl %ebx, %ebx
je 0x3944
leaq 0x46f1(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq %rbx
jmp 0x395f
leaq 0x46d8(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq $0x0
pushq %r10
pushq $0x52
pushq %r13
callq 0x6e0c
addq $0x30, %rsp
movl %r15d, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x6384
movl %eax, %ebx
movl %eax, 0x4(%rsp)
callq 0x3040
movslq (%rax), %rax
movq (%rbp,%rax,8), %r11
leaq 0x4720(%rip), %r10      # 0x80b7
subq $0x8, %rsp
testl %ebx, %ebx
je 0x39b8
leaq 0x467d(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq %rbx
jmp 0x39d3
leaq 0x4664(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq $0x0
pushq %r10
pushq $0x55
pushq %r13
callq 0x6e0c
addq $0x30, %rsp
movl %r15d, 0x8(%rsp)
movl %r15d, %edi
movl $0x6, %esi
callq 0x6a0e
movl %eax, %ebx
callq 0x3040
movslq (%rax), %rax
movq (%rbp,%rax,8), %r11
leaq 0x46cc(%rip), %r10      # 0x80d6
movq %r14, %r15
subq $0x8, %rsp
testl %ebx, %ebx
je 0x3a2e
leaq 0x4607(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq %rbx
jmp 0x3a49
leaq 0x45ee(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq $0x0
pushq %r10
pushq $0x58
pushq %r13
callq 0x6e0c
addq $0x30, %rsp
movl 0x8(%rsp), %edi
movl $0x6, %esi
movl $0x8, %edx
callq 0x6384
movl %eax, %r14d
movl %eax, 0x4(%rsp)
callq 0x3040
movslq (%rax), %rax
movq (%rbp,%rax,8), %r11
leaq 0x466a(%rip), %r10      # 0x80f0
subq $0x8, %rsp
testl %r14d, %r14d
je 0x3aa9
leaq 0x458d(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq %r14
jmp 0x3ac4
leaq 0x4573(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq $0x0
pushq %r10
pushq $0x5b
pushq %r13
callq 0x6e0c
addq $0x30, %rsp
movl 0x8(%rsp), %edi
movl $0x6, %esi
callq 0x6a0e
movl %eax, 0x4(%rsp)
leaq 0x4627(%rip), %r11      # 0x8113
cmpl $0x8, %eax
jne 0x3b0c
leaq 0x452b(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x8
jmp 0x3b25
movl %eax, %r10d
leaq 0x450d(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq %r11
pushq $0x5e
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
movl 0x8(%rsp), %edi
movl $0x6, %esi
movl %ebx, %edx
callq 0x6384
movl %eax, %r14d
movl %eax, 0x4(%rsp)
callq 0x3040
movslq (%rax), %rax
movq (%rbp,%rax,8), %r10
leaq 0x45cb(%rip), %r11      # 0x812a
leaq 0x44bd(%rip), %r9       # 0x8023
testl %r14d, %r14d
je 0x3b7e
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq %r14
jmp 0x3b92
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq $0x0
pushq %rbx
pushq %r11
pushq $0x61
pushq %r13
callq 0x6e0c
addq $0x30, %rsp
movl 0x8(%rsp), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x6384
movl %eax, 0x4(%rsp)
leaq 0x4587(%rip), %r11      # 0x8147
testl %eax, %eax
je 0x3bdf
movl %eax, %r10d
leaq 0x4455(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
jmp 0x3bf8
leaq 0x443d(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r11
pushq $0x64
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
movl 0x8(%rsp), %edi
movl $0x2, %esi
callq 0x6a0e
movl %eax, 0x4(%rsp)
leaq 0x4540(%rip), %r14      # 0x8160
testl %eax, %eax
je 0x3c42
movl %eax, %r10d
leaq 0x43f5(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
jmp 0x3c58
leaq 0x43da(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r14
pushq $0x67
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
movl 0x10(%rsp), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x6384
movl %eax, 0x4(%rsp)
leaq 0x44f2(%rip), %r11      # 0x8177
testl %eax, %eax
je 0x3ca4
movl %eax, %r10d
leaq 0x4390(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
jmp 0x3cbd
leaq 0x4378(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r11
pushq $0x6a
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
movl 0x85ee(%rip), %edi      # 0xc2c0
callq 0x3510
movl 0x8(%rsp), %edi
callq 0x5fe7
movl %eax, %ebx
callq 0x3040
cmpl $-0x1, %ebx
jne 0x3d1c
cmpl $0xb, (%rax)
jne 0x3d1c
subq $0x8, %rsp
leaq 0x449b(%rip), %r10      # 0x8197
leaq 0x4320(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq 0x58(%rbp)
pushq $-0x1
pushq %r10
jmp 0x3d46
movslq (%rax), %r10
subq $0x8, %rsp
leaq 0x446d(%rip), %r11      # 0x8197
leaq 0x42f2(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq (%rbp,%r10,8)
pushq %rbx
pushq %r11
pushq $0x6f
pushq %r13
callq 0x6e0c
addq $0x30, %rsp
movl 0x10(%rsp), %edi
callq 0x5fe7
movl %eax, %ebx
callq 0x3040
cmpl $-0x1, %ebx
jne 0x3d98
cmpl $0xb, (%rax)
jne 0x3d98
subq $0x8, %rsp
leaq 0x4443(%rip), %r10      # 0x81bb
leaq 0x42a4(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq 0x58(%rbp)
pushq $-0x1
pushq %r10
jmp 0x3dc2
movslq (%rax), %r10
subq $0x8, %rsp
leaq 0x4415(%rip), %r11      # 0x81bb
leaq 0x4276(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq (%rbp,%r10,8)
pushq %rbx
pushq %r11
pushq $0x72
pushq %r13
callq 0x6e0c
addq $0x30, %rsp
xorl %edi, %edi
callq 0x3510
movl 0x8(%rsp), %ebx
movl %ebx, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x6384
movl 0x10(%rsp), %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x6384
movl %ebx, %edi
movl $0x2, %esi
callq 0x6a0e
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x3e27
movl %eax, %r10d
leaq 0x420d(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
jmp 0x3e40
leaq 0x41f5(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r14
pushq $0x7a
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
movl 0x8(%rsp), %r14d
movl %r14d, %edi
movl $0x29a, %esi            # imm = 0x29A
callq 0x6a0e
movl %eax, %ebx
movl %eax, 0x4(%rsp)
callq 0x3040
movslq (%rax), %r10
shrl $0x1f, %ebx
leaq 0x4366(%rip), %r11      # 0x81df
leaq 0x41a3(%rip), %r9       # 0x8023
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq (%rbp,%r10,8)
pushq %r11
pushq $0x7d
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
leaq 0x4356(%rip), %rdi      # 0x81ff
leaq 0x110(%rsp), %rbx
movq %rbx, %rsi
callq 0x32b0
movq 0x8(%rbx), %rsi
leaq 0x4345(%rip), %rdi      # 0x8209
movq %rsi, 0x38(%rsp)
xorl %eax, %eax
callq 0x76fb
leaq 0x4349(%rip), %rdi      # 0x8220
movq %rbx, %rsi
callq 0x32b0
movq 0x8(%rbx), %rbx
leaq 0x4340(%rip), %rdi      # 0x822a
movl %ebx, %esi
xorl %eax, %eax
callq 0x76fb
leaq 0xcc3(%rip), %rsi       # 0x4bbd
movl $0xe, %edi
callq 0x3390
callq 0x30b0
movl %eax, 0x8975(%rip)      # 0xc884
testl %eax, %eax
je 0x4a20
movq %rbx, 0x30(%rsp)
movq %r12, 0x28(%rsp)
movl %r14d, %edi
callq 0x5fe7
movl %eax, %r14d
xorl %ebx, %ebx
testl %eax, %eax
setns %bl
callq 0x3040
movslq (%rax), %r10
subq $0x8, %rsp
leaq 0x439f(%rip), %r11      # 0x82e5
leaq 0x40d6(%rip), %r9       # 0x8023
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r9, %rbx
xorl %eax, %eax
pushq (%rbp,%r10,8)
pushq %r14
pushq %r11
pushq $0xa0
pushq %r13
callq 0x6e0c
addq $0x30, %rsp
movl %r14d, %edi
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x31d0
andl $0x1, %eax
subq $0x8, %rsp
leaq 0x4363(%rip), %r10      # 0x82f9
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
xorl %eax, %eax
pushq %r10
pushq $0xa1
pushq %r13
callq 0x6e0c
addq $0x20, %rsp
leaq 0x40(%rsp), %rbx
xorl %eax, %eax
movl %eax, 0x5f(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl %r14d, %edi
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %rcx
movl $0x63, %r8d
callq 0x6bb4
movl %eax, 0x4(%rsp)
xorl %r13d, %r13d
testl %eax, %eax
sete %r13b
movq %rbp, %r12
movl 0xc(%rsp), %ebp
callq 0x3040
movslq (%rax), %r10
subq $0x8, %rsp
leaq 0x42ff(%rip), %r11      # 0x8319
xorl %edi, %edi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq 0x3ff6(%rip), %r9       # 0x8023
xorl %eax, %eax
pushq (%r12,%r10,8)
pushq %rbx
pushq %rbp
leaq 0x3fec(%rip), %rbp      # 0x8028
pushq %r15
pushq %r11
pushq $0xa5
pushq %rbp
callq 0x6e0c
addq $0x40, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x50(%rbx)
xorl %eax, %eax
movl %eax, 0x5f(%rbx)
movl %r14d, %edi
movq %rbx, %rsi
movl $0x63, %edx
callq 0x6770
movl %eax, %r10d
movl %eax, 0x4(%rsp)
cmpl $0x5, %eax
jne 0x40a3
movl $0x6c6c6568, %eax       # imm = 0x6C6C6568
xorl 0x40(%rsp), %eax
movzbl 0x44(%rsp), %ecx
xorl $0x6f, %ecx
orl %eax, %ecx
je 0x49cf
subq $0x8, %rsp
leaq 0x428b(%rip), %r11      # 0x8339
leaq 0x3f6e(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %rbx
pushq %r10
pushq %r11
pushq $0xa9
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
movl %r14d, %edi
callq 0x3550
movl 0x8(%rsp), %edi
callq 0x3550
movl 0x8797(%rip), %edi      # 0xc884
movl $0xf, %esi
callq 0x3430
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x33c0
movl %eax, 0x877a(%rip)      # 0xc884
movzbl 0x1(%r14), %r10d
testl %r10d, %r10d
je 0x4135
leaq 0x4234(%rip), %r11      # 0x834f
leaq 0x3f01(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq %r11
jmp 0x4157
leaq 0x4213(%rip), %r10      # 0x834f
leaq 0x3ee0(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r10
pushq $0xb0
pushq %rbp
callq 0x6e0c
addq $0x20, %rsp
leaq 0x41f9(%rip), %rdi      # 0x8366
xorl %esi, %esi
callq 0x5e14
movl %eax, %r13d
testl %eax, %eax
jns 0x419d
callq 0x3040
cmpl $0x61, (%rax)
jne 0x419d
leaq 0x41dd(%rip), %rsi      # 0x8369
movl $0x4, %edi
xorl %eax, %eax
callq 0x77e3
jmp 0x447f
leaq 0x1a0(%rsp), %r12
movl $0x3e7, %edx            # imm = 0x3E7
movq %r12, %rdi
xorl %esi, %esi
callq 0x31b0
leaq 0xb0(%rsp), %r14
leaq 0xc(%rsp), %rdx
movl %r13d, %edi
movq %r14, %rsi
movq %r12, %rcx
movl $0x3e7, %r8d            # imm = 0x3E7
callq 0x6ada
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x41f7
movl %eax, %ebp
cmpl $-0x2, %eax
jg 0x4253
movl %ebp, %r10d
negl %r10d
shlq $0x3, %r10
addq 0x7de3(%rip), %r10      # 0xbfd8
jmp 0x4266
callq 0x3040
movslq (%rax), %r10
movl 0xc(%rsp), %r11d
leaq 0x417c(%rip), %r15      # 0x8387
leaq 0x3e11(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r12
pushq %r11
movq %r14, %r12
pushq %r14
leaq 0x809e(%rip), %r14      # 0xc2d0
pushq (%r14,%r10,8)
pushq $0x0
pushq %r15
pushq $0xba
leaq 0x3de2(%rip), %r10      # 0x8028
pushq %r10
callq 0x6e0c
addq $0x40, %rsp
jmp 0x42b3
callq 0x3040
movslq (%rax), %r10
shlq $0x3, %r10
addq 0x7d6a(%rip), %r10      # 0xbfd0
movl 0xc(%rsp), %r11d
leaq 0x4115(%rip), %r15      # 0x8387
leaq 0x3daa(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r12
pushq %r11
movq %r14, %r12
pushq %r14
pushq (%r10)
pushq %rbp
pushq %r15
pushq $0xba
leaq 0x3d87(%rip), %r10      # 0x8028
pushq %r10
callq 0x6e0c
addq $0x40, %rsp
leaq 0x801d(%rip), %r14      # 0xc2d0
callq 0x30b0
movl %eax, 0x85c6(%rip)      # 0xc884
testl %eax, %eax
je 0x4b69
movl %r13d, 0x8(%rsp)
movl %r13d, %edi
callq 0x5fe7
movl %eax, %r15d
xorl %r13d, %r13d
testl %eax, %eax
setns %r13b
callq 0x3040
movslq (%rax), %r10
subq $0x8, %rsp
leaq 0x40f8(%rip), %r11      # 0x83ea
leaq 0x3d2a(%rip), %r9       # 0x8023
xorl %edi, %edi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq (%r14,%r10,8)
pushq %r15
pushq %r11
pushq $0xc4
movq %r14, %rbx
leaq 0x3d0a(%rip), %rbp      # 0x8028
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movups %xmm0, 0xce(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x90(%rsp)
movl $0x0, 0x9f(%rsp)
movq %r15, 0x28(%rsp)
movl %r15d, %edi
movq %r12, %rsi
xorl %edx, %edx
leaq 0x40(%rsp), %rbp
movq %rbp, %rcx
movl $0x63, %r8d
callq 0x6bb4
leaq 0x4(%rsp), %r13
movl %eax, (%r13)
xorl %r15d, %r15d
testl %eax, %eax
sete %r15b
movl 0xc(%rsp), %r14d
callq 0x3040
movslq (%rax), %r10
subq $0x8, %rsp
xorl %edi, %edi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq 0x3c5b(%rip), %r9       # 0x8023
xorl %eax, %eax
pushq (%rbx,%r10,8)
pushq %rbp
leaq 0x3c52(%rip), %rbp      # 0x8028
pushq %r14
pushq %r12
leaq 0x3f38(%rip), %r10      # 0x8319
pushq %r10
pushq $0xc8
pushq %rbp
callq 0x6e0c
addq $0x40, %rsp
movl 0x848c(%rip), %edi      # 0xc884
movl $0xf, %esi
callq 0x3430
movq %r13, %rdi
callq 0x33c0
movl %eax, 0x8474(%rip)      # 0xc884
movzbl 0x1(%r13), %r10d
testl %r10d, %r10d
je 0x443b
leaq 0x3f2e(%rip), %r11      # 0x834f
leaq 0x3bfb(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq %r11
jmp 0x445d
leaq 0x3f0d(%rip), %r10      # 0x834f
leaq 0x3bda(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r10
pushq $0xcc
pushq %rbp
callq 0x6e0c
addq $0x20, %rsp
movq 0x28(%rsp), %rdi
callq 0x3550
movl 0x8(%rsp), %edi
callq 0x3550
movl 0x38(%rsp), %r15d
movl 0x10(%rsp), %edi
callq 0x5fe7
movl %eax, %ebx
xorl %r14d, %r14d
testl %eax, %eax
setns %r14b
callq 0x3040
movslq (%rax), %r10
subq $0x8, %rsp
leaq 0x3f54(%rip), %r11      # 0x83ff
leaq 0x3b71(%rip), %r9       # 0x8023
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
leaq 0x7e09(%rip), %r14      # 0xc2d0
pushq (%r14,%r10,8)
pushq %rbx
pushq %r11
pushq $0xd3
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
movaps %xmm0, 0x30(%rdx)
movaps %xmm0, 0x40(%rdx)
movaps %xmm0, 0x50(%rdx)
movl $0x0, 0x5f(%rdx)
leaq 0x14(%rsp), %r14
movl $0xfffffff7, (%r14)     # imm = 0xFFFFFFF7
movl %ebx, %edi
movq %r14, %rsi
movl $0x63, %ecx
callq 0x6804
movl %eax, %r10d
movl %eax, 0x4(%rsp)
cmpl $0x6, %eax
sete %al
movl (%r14), %r11d
testl %r11d, %r11d
setg %cl
andb %al, %cl
subq $0x8, %rsp
cmpb $0x1, %cl
jne 0x4565
leaq 0x3ecd(%rip), %r10      # 0x8413
leaq 0x3ad6(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq $0x6
pushq %r10
jmp 0x4586
leaq 0x3ea7(%rip), %r14      # 0x8413
leaq 0x3ab0(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %r14
pushq $0xd9
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
movl 0x4(%rsp), %esi
testl %esi, %esi
jle 0x45b0
leaq 0x3e89(%rip), %rdi      # 0x842d
leaq 0x40(%rsp), %rdx
xorl %eax, %eax
callq 0x76fb
movl 0x14(%rsp), %edi
leaq 0x110(%rsp), %r14
movq %r14, %rsi
callq 0x34c0
movl %eax, %r10d
movl %eax, 0x4(%rsp)
testl %eax, %eax
sete %al
movq 0x8(%r14), %r14
cmpq %r15, %r14
sete %cl
andb %al, %cl
movl 0x14(%rsp), %r11d
cmpb $0x1, %cl
jne 0x460e
leaq 0x3e4f(%rip), %r10      # 0x843c
leaq 0x3a2f(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r14
pushq $0x0
pushq %r11
pushq %r10
jmp 0x463e
testl %r10d, %r10d
movl $0x0, %r15d
cmovel %r14d, %r15d
leaq 0x3e1a(%rip), %r14      # 0x843c
leaq 0x39fa(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r15
pushq %r10
pushq %r11
pushq %r14
pushq $0xdd
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
movl 0x30(%rsp), %r12d
leaq 0x14(%rsp), %r15
movl $0xfffffff8, (%r15)     # imm = 0xFFFFFFF8
leaq 0x46(%rsp), %r14
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rdx
movl $0x63, %ecx
callq 0x6804
movl %eax, %r10d
movl %eax, 0x4(%rsp)
cmpl $0x5, %eax
sete %al
movl (%r15), %r11d
testl %r11d, %r11d
setg %cl
andb %al, %cl
subq $0x8, %rsp
cmpb $0x1, %cl
jne 0x46bc
leaq 0x3d76(%rip), %r10      # 0x8413
leaq 0x397f(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq $0x5
pushq %r10
jmp 0x46dc
leaq 0x3d50(%rip), %rbx      # 0x8413
leaq 0x3959(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %rbx
pushq $0xe1
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
movl 0x4(%rsp), %esi
testl %esi, %esi
jle 0x4704
leaq 0x3d33(%rip), %rdi      # 0x842d
movq %r14, %rdx
xorl %eax, %eax
callq 0x76fb
movabsq $0x6f642c7964776f68, %rax # imm = 0x6F642C7964776F68
xorq 0x40(%rsp), %rax
movl 0x48(%rsp), %ecx
xorq $0x79646f, %rcx         # imm = 0x79646F
xorl %esi, %esi
orq %rax, %rcx
sete %sil
subq $0x8, %rsp
leaq 0x3d2d(%rip), %r10      # 0x845f
leaq 0x38ea(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq $0xe3
pushq %rbp
callq 0x6e0c
addq $0x20, %rsp
movl 0x14(%rsp), %edi
leaq 0x110(%rsp), %rbx
movq %rbx, %rsi
callq 0x34c0
movl %eax, %r10d
movl %eax, 0x4(%rsp)
testl %eax, %eax
sete %al
movq 0x8(%rbx), %rbx
cmpq %r12, %rbx
sete %cl
andb %al, %cl
movl 0x14(%rsp), %r11d
cmpb $0x1, %cl
jne 0x47b2
leaq 0x3caa(%rip), %r10      # 0x843c
leaq 0x388a(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %rbx
pushq $0x0
pushq %r11
pushq %r10
jmp 0x47e1
testl %r10d, %r10d
movl $0x0, %r14d
cmovel %ebx, %r14d
leaq 0x3c76(%rip), %rbx      # 0x843c
leaq 0x3856(%rip), %r9       # 0x8023
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r14
pushq %r10
pushq %r11
pushq %rbx
pushq $0xe6
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
movl 0x7aca(%rip), %edi      # 0xc2c0
callq 0x3510
leaq 0xe0(%rsp), %r15
movl $0x6d6f63, 0x3(%r15)    # imm = 0x6D6F63
movl $0x632e6161, (%r15)     # imm = 0x632E6161
movq %r15, %rdi
movl $0x50, %esi
movl $0x2, %edx
callq 0x6254
movl %eax, %ebx
callq 0x3040
testl %ebx, %ebx
js 0x4848
cmpl $0x73, (%rax)
jne 0x4848
movl $0x398, %r10d           # imm = 0x398
addq 0x778f(%rip), %r10      # 0xbfd0
movl $0x1, %esi
jmp 0x4858
movslq (%rax), %r10
shlq $0x3, %r10
addq 0x777a(%rip), %r10      # 0xbfd0
xorl %esi, %esi
subq $0x8, %rsp
leaq 0x3c13(%rip), %r11      # 0x8476
leaq 0x37b9(%rip), %r14      # 0x8023
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq (%r10)
pushq %r15
pushq %r11
pushq $0xeb
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
movaps 0x3cdb(%rip), %xmm0     # 0x8570
leaq 0x1a0(%rsp), %r15
movaps %xmm0, (%r15)
movl $0xa0d0a, 0xf(%r15)     # imm = 0xA0D0A
movq %r15, %rdi
callq 0x3140
movl %ebx, %edi
movq %r15, %rsi
movl %eax, %edx
callq 0x67ba
movl %eax, %r12d
movl %eax, 0x4(%rsp)
movl %eax, %r13d
shrl $0x1f, %r13d
callq 0x3040
movslq (%rax), %r10
subq $0x8, %rsp
leaq 0x3bc7(%rip), %r11      # 0x84a5
xorl %edi, %edi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
leaq 0x79da(%rip), %r13      # 0xc2d0
pushq (%r13,%r10,8)
pushq %r12
pushq %r11
pushq $0xef
pushq %rbp
callq 0x6e0c
addq $0x30, %rsp
movl %ebx, %edi
movl $0x1, %esi
movl $0x1, %edx
callq 0x644e
xorl %esi, %esi
testl %eax, %eax
setne %sil
subq $0x8, %rsp
leaq 0x3ba4(%rip), %r10      # 0x84d6
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0xf0
pushq %rbp
callq 0x6e0c
addq $0x20, %rsp
movq %r15, %rdi
callq 0x3140
movl %ebx, %edi
movq %r15, %rsi
movl %eax, %edx
callq 0x67ba
movl %eax, 0x4(%rsp)
xorl %esi, %esi
testl %eax, %eax
setg %sil
subq $0x8, %rsp
leaq 0x3b71(%rip), %r10      # 0x84ed
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0xf2
pushq %rbp
callq 0x6e0c
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
callq 0x3160
leaq 0x3b53(%rip), %rdi      # 0x84ff
callq 0x6043
xorl %edi, %edi
callq 0x3510
callq 0x7994
addq $0x588, %rsp            # imm = 0x588
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subq $0x8, %rsp
leaq 0x395f(%rip), %r10      # 0x8339
leaq 0x3642(%rip), %r9       # 0x8023
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %rbx
pushq $0x5
pushq %r10
jmp 0x40c7
movq 0x75de(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
leaq 0x3640(%rip), %rsi      # 0x804c
leaq 0xb0(%rsp), %rdx
xorl %eax, %eax
callq 0x3450
jmp 0x3825
movl %r14d, %edi
callq 0x3550
movl 0x10(%rsp), %edi
callq 0x3550
leaq 0x37c7(%rip), %rdi      # 0x81ff
movl $0x1, %esi
xorl %eax, %eax
callq 0x3220
movl %eax, %ebp
leaq 0x37d3(%rip), %rdi      # 0x8220
xorl %esi, %esi
xorl %eax, %eax
callq 0x3220
movl %eax, %ebx
movl 0xc(%rsp), %esi
movq %r12, %rdi
xorl %edx, %edx
callq 0x6254
testl %eax, %eax
js 0x4b4b
movl %eax, %r14d
leaq 0xe0(%rsp), %rsi
movl %eax, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6bb4
testl %eax, %eax
js 0x4b60
movq 0x754a(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
leaq 0x37d1(%rip), %rsi      # 0x8271
leaq 0xe0(%rsp), %rdx
xorl %eax, %eax
callq 0x3450
leaq 0x37d4(%rip), %rsi      # 0x828a
movl $0x5, %edx
movl %r14d, %edi
callq 0x3120
testq %rax, %rax
jns 0x4ad1
leaq 0x37c1(%rip), %rdi      # 0x8290
jmp 0x4b32
leaq 0x18(%rsp), %rdi
callq 0x617b
testl %eax, %eax
jns 0x4ae8
leaq 0x37bf(%rip), %rdi      # 0x82a5
jmp 0x4b32
movl %eax, %r14d
leaq 0x37c6(%rip), %rdx      # 0x82b8
movl %eax, %edi
movl %ebp, %esi
movl $0x6, %ecx
callq 0x6943
testl %eax, %eax
jns 0x4b0d
leaq 0x37b4(%rip), %rdi      # 0x82bf
jmp 0x4b32
leaq 0x3945(%rip), %rdx      # 0x8459
movl %r14d, %edi
movl %ebx, %esi
movl $0x5, %ecx
callq 0x6943
testl %eax, %eax
jns 0x4bb1
leaq 0x37a0(%rip), %rdi      # 0x82d2
xorl %eax, %eax
callq 0x537a
leaq 0x3525(%rip), %rdi      # 0x8065
jmp 0x4b32
leaq 0x3549(%rip), %rdi      # 0x8092
jmp 0x4b32
movl 0xc(%rsp), %edx
leaq 0x36eb(%rip), %rdi      # 0x8241
movq %r12, %rsi
xorl %eax, %eax
callq 0x537a
leaq 0x36f7(%rip), %rdi      # 0x825e
jmp 0x4b32
movl %r13d, %edi
callq 0x3550
movl 0xc(%rsp), %esi
movq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x6254
testl %eax, %eax
jns 0x4b8e
leaq 0x3833(%rip), %rdi      # 0x83bf
jmp 0x4b32
leaq 0xe0(%rsp), %rsi
movl %eax, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6bb4
testl %eax, %eax
jns 0x4bb1
leaq 0x3827(%rip), %rdi      # 0x83d6
jmp 0x4b32
callq 0x3060
xorl %edi, %edi
callq 0x34a0