// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/top.c
// Function: main_top
int main_top(int argc, char **argv) {
    fd_set readfds;
    int ttyfd, outfd, errfd, maxfd;
    pid_t pid;
    struct timeval timeout;
    struct timespec ts, last_display;
    struct tb_event event;
    int rc, i;
    /* TODO consider doing this by aggregating in-process instead of fork/stdout */

    outfd = errfd = ttyfd = pid = -1;

    if (opt_pid == -1 && opt_pgrep_args == NULL && optind >= argc) {
        /* TODO DRY with main() */
        log_error("Expected pid (-p), pgrep (-P), or command\n\n");
        usage(stderr, 1);
        return 1;
    }

    /* TODO refactor this function */
    filter_child_args(argc, argv);
    snprintf(phpspy_args, BUF_SIZE, "phpspy ");
    for (i = 1; i < argc; i++) {
        snprintf(phpspy_args+strlen(phpspy_args), BUF_SIZE-strlen(phpspy_args), "%s ", argv[i]);
    }

    if ((ttyfd = open("/dev/tty", O_RDONLY)) < 0) {
        perror("open");
        return 1;
    }
    if ((fork_child(argc, argv, &pid, &outfd, &errfd)) < 0) {
        return 1;
    }
    maxfd = PHPSPY_MAX(PHPSPY_MAX(ttyfd, outfd), errfd);

    last_display.tv_sec = 0;
    last_display.tv_nsec = 0;

    tb_init(); /* TODO support for ncurses for portability sake? */
    while (!done) {
        clock_gettime(CLOCK_MONOTONIC, &ts);
        if (last_display.tv_sec == 0 || ts.tv_sec - last_display.tv_sec >= 1) {
            display();
            last_display = ts;
        }
        FD_ZERO(&readfds);
        FD_SET(ttyfd, &readfds);
        FD_SET(outfd, &readfds);
        FD_SET(errfd, &readfds);
        timeout.tv_sec = 1;
        timeout.tv_usec = 0;
        rc = select(maxfd + 1, &readfds, NULL, NULL, &timeout);
        if (rc < 0) {
            if (errno == EINTR) {
                /* Probably due to SIGWINCH (terminal resize) */
                /* Call tb_peek_event to let termbox update dimensions */
                tb_peek_event(&event, 0);
                last_display.tv_sec = 0; /* Immediately re-display */
                continue;
            }
            perror("select");
            break;
        }
        if (FD_ISSET(outfd, &readfds)) {
            read_child_out(outfd);
        }
        if (FD_ISSET(errfd, &readfds)) {
            read_child_err(errfd);
        }
        if (FD_ISSET(ttyfd, &readfds)) {
            event.type = 0;
            tb_peek_event(&event, 0);
            handle_event(&event);
        }
    }
    tb_shutdown();

    close(outfd);
    close(errfd);
    close(ttyfd);
    kill(pid, SIGTERM);
    waitpid(pid, NULL, 0);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %rsi, %rbx
leaq 0xd6c5(%rip), %rax      # 0x25330
cmpl $-0x1, (%rax)
jne 0x17cb4
leaq 0xe429(%rip), %rax      # 0x260a0
cmpq $0x0, (%rax)
jne 0x17cb4
movq 0xd344(%rip), %rax      # 0x24fc8
cmpl %edi, (%rax)
jl 0x17cb4
leaq 0x4d36(%rip), %rdi      # 0x1c9c5
xorl %eax, %eax
callq 0xab99
movq 0xd353(%rip), %rax      # 0x24ff0
movq (%rax), %rdi
movl $0x1, %ebx
movl $0x1, %esi
callq 0xac41
jmp 0x17ec6
testl %edi, %edi
jle 0x17dd7
movl %edi, 0x10(%rsp)
movl %edi, %ebp
xorl %r15d, %r15d
leaq 0x72ec(%rip), %r12      # 0x1efb8
movq (%rbx,%r15,8), %r13
movb (%r13), %r14b
cmpb $0x2d, %r14b
jne 0x17ce1
cmpb $0x6f, 0x1(%r13)
je 0x17cf5
movl $0x8, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x6080
testl %eax, %eax
jne 0x17d0a
movb $0x23, 0x1(%r13)
movq (%rbx,%r15,8), %rax
movb $0x0, 0x2(%rax)
movq (%rbx,%r15,8), %r13
movb (%r13), %r14b
cmpb $0x2d, %r14b
jne 0x17d36
movb 0x1(%r13), %r14b
cmpb $0x31, %r14b
je 0x17d66
movl $0xd, %edx
movq %r13, %rdi
leaq 0x7298(%rip), %rsi      # 0x1efc1
callq 0x6080
cmpb $0x74, %r14b
jne 0x17d4a
jmp 0x17d66
movl $0xd, %edx
movq %r13, %rdi
leaq 0x727c(%rip), %rsi      # 0x1efc1
callq 0x6080
testl %eax, %eax
je 0x17d66
movl $0x5, %edx
movq %r13, %rdi
leaq 0x7272(%rip), %rsi      # 0x1efcf
callq 0x6080
testl %eax, %eax
jne 0x17d73
movb $0x40, 0x1(%r13)
movq (%rbx,%r15,8), %rax
movb $0x0, 0x2(%rax)
incq %r15
cmpq %r15, %rbp
jne 0x17ccc
movabsq $0x20797073706870, %rax # imm = 0x20797073706870
movq %rax, 0xe4a0(%rip)      # 0x26230
cmpl $0x1, 0x10(%rsp)
je 0x17de8
movl $0x1, %r12d
leaq 0xe48c(%rip), %r14      # 0x26230
leaq 0x71fd(%rip), %r15      # 0x1efa8
movq %r14, %rdi
callq 0x6160
leaq (%r14,%rax), %rdi
movl $0x200, %esi            # imm = 0x200
subq %rax, %rsi
movq (%rbx,%r12,8), %rcx
movq %r15, %rdx
xorl %eax, %eax
callq 0x61d0
incq %r12
cmpq %r12, %rbp
jne 0x17dab
jmp 0x17de8
movabsq $0x20797073706870, %rax # imm = 0x20797073706870
movq %rax, 0xe448(%rip)      # 0x26230
leaq 0x4a65(%rip), %rdi      # 0x1c854
xorl %esi, %esi
xorl %eax, %eax
callq 0x64f0
movl %eax, 0x1c(%rsp)
testl %eax, %eax
js 0x18d4f
leaq 0x140(%rsp), %r13
movq %r13, %rdi
callq 0x6270
testl %eax, %eax
js 0x18d23
leaq 0xc0(%rsp), %rdi
callq 0x6270
testl %eax, %eax
js 0x18d23
callq 0x6600
testl %eax, %eax
je 0x18db2
movl %eax, 0x18(%rsp)
js 0x18d65
movl 0x144(%rsp), %edi
callq 0x6260
movl 0xc4(%rsp), %edi
callq 0x6260
movl 0x140(%rsp), %eax
movq %rax, 0x8(%rsp)
movl 0xc0(%rsp), %eax
movq %rax, (%rsp)
callq 0x68ec
leaq 0xe291(%rip), %rax      # 0x26114
cmpl $0x0, (%rax)
je 0x17eda
callq 0x74a6
movq 0x8(%rsp), %rdi
callq 0x6260
movq (%rsp), %rdi
callq 0x6260
movl 0x1c(%rsp), %edi
callq 0x6260
movl 0x18(%rsp), %ebp
movl %ebp, %edi
movl $0xf, %esi
callq 0x6370
xorl %ebx, %ebx
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x64b0
movl %ebx, %eax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1c(%rsp), %ecx
movq 0x8(%rsp), %rsi
cmpl %esi, %ecx
movl %esi, %r8d
cmovgl %ecx, %r8d
movq (%rsp), %rdi
cmpl %edi, %r8d
cmovlel %edi, %r8d
movl $0x1, %r15d
shlq %cl, %r15
movl %ecx, %r12d
shrl $0x6, %r12d
leal 0x3f(%rsi), %eax
testl %esi, %esi
cmovnsl %esi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %esi, %ecx
subl %edx, %ecx
movl $0x1, %ebx
shlq %cl, %rbx
movl $0x1, %esi
sarl $0x6, %eax
movslq %eax, %r14
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
shlq %cl, %rsi
movq %rsi, 0x50(%rsp)
sarl $0x6, %eax
cltq
movq %rax, 0x48(%rsp)
incl %r8d
movl %r8d, 0x3c(%rsp)
leaq 0xe4e3(%rip), %rbp      # 0x26440
movq $0x0, 0x10(%rsp)
movq %rbx, 0x30(%rsp)
movq %r14, 0x28(%rsp)
movq %r15, 0x70(%rsp)
movq %r12, 0x68(%rsp)
movl $0x1, %edi
leaq 0xa0(%rsp), %rsi
callq 0x6110
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x17fa7
cmpq %rax, 0xa0(%rsp)
jle 0x1826c
movq 0xe69a(%rip), %rsi      # 0x26648
testq %rsi, %rsi
je 0x17ff9
movq 0xe69e(%rip), %rdi      # 0x26658
movl $0x8, %edx
leaq 0xe04(%rip), %rcx       # 0x18dca
callq 0x60b0
movq 0xe676(%rip), %rcx      # 0x26648
movq 0xe687(%rip), %rax      # 0x26660
testq %rcx, %rcx
je 0x1809b
testq %rax, %rax
movss 0x6f5f(%rip), %xmm4     # 0x1ef4c
js 0x18005
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
jmp 0x1801f
movq 0xe660(%rip), %rax      # 0x26660
jmp 0x1809b
movq %rax, %rdx
shrq %rdx
movl %eax, %esi
andl $0x1, %esi
orq %rdx, %rsi
xorps %xmm0, %xmm0
cvtsi2ss %rsi, %xmm0
addss %xmm0, %xmm0
movq 0xe632(%rip), %rdx      # 0x26658
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq 0x100(%rdi), %r8
testq %r8, %r8
js 0x18042
xorps %xmm1, %xmm1
cvtsi2ss %r8, %xmm1
jmp 0x1805b
movq %r8, %r9
shrq %r9
andl $0x1, %r8d
orq %r9, %r8
xorps %xmm1, %xmm1
cvtsi2ss %r8, %xmm1
addss %xmm1, %xmm1
movdqu 0x100(%rdi), %xmm2
movdqu 0x110(%rdi), %xmm3
paddq %xmm2, %xmm3
movdqu %xmm3, 0x110(%rdi)
mulss %xmm4, %xmm1
pxor %xmm2, %xmm2
testq %rax, %rax
je 0x1808b
divss %xmm0, %xmm1
movaps %xmm1, %xmm2
movd %xmm2, 0x120(%rdi)
incq %rsi
cmpq %rsi, %rcx
jne 0x18028
addq %rax, 0xe5d6(%rip)      # 0x26678
callq 0x74ec
callq 0x74c2
movl %eax, %ebp
callq 0x74d7
movl %eax, %ebx
xorl %edi, %edi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
xorl %ecx, %ecx
leaq 0x6fa1(%rip), %r8       # 0x1f068
leaq 0xe162(%rip), %r9       # 0x26230
xorl %eax, %eax
callq 0x83b3
movq 0xe59c(%rip), %r9       # 0x26678
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x6eec(%rip), %r8       # 0x1efda
xorl %eax, %eax
pushq 0xe552(%rip)            # 0x26648
pushq 0xe56c(%rip)            # 0x26668
callq 0x83b3
addq $0x10, %rsp
xorl %edi, %edi
movl $0x3, %esi
movl $0x500, %edx            # imm = 0x500
xorl %ecx, %ecx
leaq 0x6ef1(%rip), %r8       # 0x1f00b
leaq 0x6f08(%rip), %r9       # 0x1f029
xorl %eax, %eax
leaq 0x6f0b(%rip), %r10      # 0x1f035
pushq %r10
leaq 0x6efd(%rip), %r10      # 0x1f030
pushq %r10
leaq 0x6eee(%rip), %r10      # 0x1f02a
pushq %r10
leaq 0x6eea(%rip), %r10      # 0x1f02f
pushq %r10
callq 0x83b3
addq $0x20, %rsp
addl $-0x34, %ebp
subq $0x8, %rsp
movl $0x34, %edi
movl $0x3, %esi
movl $0x500, %edx            # imm = 0x500
xorl %ecx, %ecx
leaq 0x6ecc(%rip), %r8       # 0x1f03b
movl %ebp, %r9d
xorl %eax, %eax
leaq 0x6cba(%rip), %r10      # 0x1ee35
pushq %r10
callq 0x83b3
addq $0x10, %rsp
cmpl $0x5, %ebx
setge %cl
movq 0xe4b5(%rip), %rax      # 0x26648
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x18213
movl $0x1, %r14d
leal 0x3(%r14), %esi
movq 0xe4a7(%rip), %rax      # 0x26658
movq -0x8(%rax,%r14,8), %r10
leal 0x4(%r14), %ebp
movq 0x118(%r10), %r9
xorps %xmm0, %xmm0
cvtss2sd 0x120(%r10), %xmm0
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x6e66(%rip), %r8       # 0x1f040
movb $0x1, %al
pushq %r10
pushq 0x100(%r10)
pushq 0x108(%r10)
pushq 0x110(%r10)
callq 0x83b3
addq $0x20, %rsp
movq 0xe445(%rip), %rax      # 0x26648
cmpl %ebx, %ebp
jge 0x18213
leaq 0x1(%r14), %rcx
cmpq %rax, %r14
movq %rcx, %r14
jb 0x181a6
testq %rax, %rax
xorps %xmm0, %xmm0
leaq 0xe220(%rip), %rbp      # 0x26440
je 0x1823e
movq 0xe42f(%rip), %rcx      # 0x26658
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
incq %rdx
movups %xmm0, 0x100(%rsi)
cmpq %rdx, %rax
jne 0x1822b
movq $0x0, 0xe417(%rip) # 0x26660
cmpl $0x0, 0xe420(%rip)      # 0x26670
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %r14
jne 0x18264
callq 0x755a
xorps %xmm0, %xmm0
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
orq %r15, 0xc0(%rsp,%r12,8)
orq %rbx, 0xc0(%rsp,%r14,8)
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
orq %rax, 0xc0(%rsp,%rcx,8)
movq $0x1, 0xb0(%rsp)
movq $0x0, 0xb8(%rsp)
movl 0x3c(%rsp), %edi
leaq 0xc0(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0xb0(%rsp), %r8
callq 0x6390
testl %eax, %eax
js 0x18341
testq %rbx, 0xc0(%rsp,%r14,8)
je 0x18bff
movq 0xe10f(%rip), %rsi      # 0x26430
movq %rsi, %rdx
subq $0x200, %rdx            # imm = 0x200
jne 0x1836c
movq $0x0, 0xe0f8(%rip) # 0x26430
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
jmp 0x1836f
callq 0x6060
cmpl $0x4, (%rax)
jne 0x18d97
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
callq 0x7fb1
movq $0x0, 0x10(%rsp)
jmp 0x18cec
negq %rdx
addq %rbp, %rsi
movq 0x8(%rsp), %rdi
callq 0x62b0
testq %rax, %rax
js 0x18d01
je 0x18bf2
addq 0xe09e(%rip), %rax      # 0x26430
movq %rax, 0xe097(%rip)      # 0x26430
movq %rbp, %rdi
movl $0xa, %esi
movq %rax, %rdx
callq 0x62a0
testq %rax, %rax
je 0x18bff
movq %rax, %r15
movq %r15, %r12
subq %rbp, %r12
cmpl $0x3, %r12d
jl 0x18b9c
cmpb $0x23, 0xe074(%rip)     # 0x26440
je 0x18b9c
leaq 0xe067(%rip), %rdi      # 0x26440
movq %r13, %rsi
movl $0xa, %edx
callq 0x62e0
testq %rax, %rax
jne 0x183f8
cmpb $0x30, 0xe04e(%rip)     # 0x26440
jne 0x18b9c
movq 0x140(%rsp), %r10
cmpb $0x20, (%r10)
jne 0x18b9c
incq %r10
movq %r10, 0x140(%rsp)
movl %r12d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leaq 0xe01b(%rip), %rbp      # 0x26440
subq %r10, %rbp
leaq (%rdx,%rbp), %rcx
addq $-0x100, %rcx
cmpq $-0xff, %rcx
jb 0x18b9c
movq %rax, 0x20(%rsp)
addq %rdx, %rbp
cmpq $0xc, %rbp
jb 0x184fc
movl $0x9e3779b9, %esi       # imm = 0x9E3779B9
movl $0xfeedbeef, %ecx       # imm = 0xFEEDBEEF
movl $0x9e3779b9, %edx       # imm = 0x9E3779B9
movl %ebp, %edi
movq %r10, %rax
addl 0x4(%rax), %edx
addl 0x8(%rax), %ecx
addl (%rax), %esi
subl %edx, %esi
subl %ecx, %esi
movl %ecx, %r8d
shrl $0xd, %r8d
xorl %esi, %r8d
subl %ecx, %edx
subl %r8d, %edx
movl %r8d, %esi
shll $0x8, %esi
xorl %edx, %esi
subl %r8d, %ecx
subl %esi, %ecx
movl %esi, %edx
shrl $0xd, %edx
xorl %ecx, %edx
subl %esi, %r8d
subl %edx, %r8d
movl %edx, %ecx
shrl $0xc, %ecx
xorl %r8d, %ecx
subl %edx, %esi
subl %ecx, %esi
movl %ecx, %r8d
shll $0x10, %r8d
xorl %esi, %r8d
subl %ecx, %edx
subl %r8d, %edx
movl %r8d, %r9d
shrl $0x5, %r9d
xorl %edx, %r9d
subl %r8d, %ecx
subl %r9d, %ecx
movl %r9d, %esi
shrl $0x3, %esi
xorl %ecx, %esi
subl %r9d, %r8d
subl %esi, %r8d
movl %esi, %edx
shll $0xa, %edx
xorl %r8d, %edx
subl %esi, %r9d
subl %edx, %r9d
movl %edx, %ecx
shrl $0xf, %ecx
xorl %r9d, %ecx
addq $0xc, %rax
addl $-0xc, %edi
cmpl $0xb, %edi
ja 0x18466
jmp 0x18510
movl $0xfeedbeef, %ecx       # imm = 0xFEEDBEEF
movl $0x9e3779b9, %edx       # imm = 0x9E3779B9
movq %r10, %rax
movl %ebp, %edi
movl $0x9e3779b9, %esi       # imm = 0x9E3779B9
addl %ebp, %ecx
decl %edi
cmpl $0xa, %edi
ja 0x1859f
leaq 0x6a2c(%rip), %r8       # 0x1ef50
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
jmpq *%rdi
movzbl 0xa(%rax), %edi
shll $0x18, %edi
addl %ecx, %edi
movl %edi, %ecx
movzbl 0x9(%rax), %edi
shll $0x10, %edi
addl %ecx, %edi
movl %edi, %ecx
movzbl 0x8(%rax), %edi
shll $0x8, %edi
addl %ecx, %edi
movl %edi, %ecx
movzbl 0x7(%rax), %edi
shll $0x18, %edi
addl %edx, %edi
movl %edi, %edx
movzbl 0x6(%rax), %edi
shll $0x10, %edi
addl %edx, %edi
movl %edi, %edx
movzbl 0x5(%rax), %edi
shll $0x8, %edi
addl %edx, %edi
movl %edi, %edx
movzbl 0x4(%rax), %edi
addl %edx, %edi
movl %edi, %edx
movzbl 0x3(%rax), %edi
shll $0x18, %edi
addl %esi, %edi
movl %edi, %esi
movzbl 0x2(%rax), %edi
shll $0x10, %edi
addl %esi, %edi
movl %edi, %esi
movzbl 0x1(%rax), %edi
shll $0x8, %edi
addl %esi, %edi
movl %edi, %esi
movzbl (%rax), %eax
addl %esi, %eax
movl %eax, %esi
movq 0xe09a(%rip), %rax      # 0x26640
testq %rax, %rax
je 0x186a0
subl %edx, %esi
subl %ecx, %esi
movl %ecx, %edi
shrl $0xd, %edi
xorl %esi, %edi
subl %ecx, %edx
subl %edi, %edx
movl %edi, %esi
shll $0x8, %esi
xorl %edx, %esi
subl %edi, %ecx
subl %esi, %ecx
movl %esi, %edx
shrl $0xd, %edx
xorl %ecx, %edx
subl %esi, %edi
subl %edx, %edi
movl %edx, %ecx
shrl $0xc, %ecx
xorl %edi, %ecx
subl %edx, %esi
subl %ecx, %esi
movl %ecx, %edi
shll $0x10, %edi
xorl %esi, %edi
subl %ecx, %edx
subl %edi, %edx
movl %edi, %esi
shrl $0x5, %esi
xorl %edx, %esi
subl %edi, %ecx
subl %esi, %ecx
movl %esi, %edx
shrl $0x3, %edx
xorl %ecx, %edx
subl %esi, %edi
subl %edx, %edi
movl %edx, %r13d
shll $0xa, %r13d
xorl %edi, %r13d
addl %r13d, %edx
subl %edx, %esi
shrl $0xf, %r13d
xorl %esi, %r13d
movq 0x128(%rax), %rcx
movl 0x8(%rcx), %eax
decl %eax
andl %r13d, %eax
movq (%rcx), %rdx
shlq $0x4, %rax
movq (%rdx,%rax), %rax
testq %rax, %rax
je 0x186a0
movq 0x20(%rcx), %rcx
xorl %ebx, %ebx
subq %rcx, %rbx
movq %r15, 0x78(%rsp)
leaq (%rax,%rbx), %r14
cmpl %r13d, 0x15c(%rax,%rbx)
jne 0x18694
movl 0x158(%r14), %eax
cmpq %rax, %rbp
jne 0x18694
movq 0x150(%r14), %rdi
movq %r10, %rsi
movq %rbp, %rdx
movq %r12, %r15
movq %r14, %r12
movq %rbp, %r14
movq %r10, %rbp
callq 0x6410
movq %rbp, %r10
movq %r14, %rbp
movq %r12, %r14
movq %r15, %r12
movq 0x78(%rsp), %r15
testl %eax, %eax
je 0x18be3
movq 0x148(%r14), %rax
testq %rax, %rax
jne 0x18643
movl $0x1, %edi
movl $0x160, %esi            # imm = 0x160
movq %r10, %rbx
callq 0x62f0
movq %rax, %r14
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdi
leaq 0x6361(%rip), %rdx      # 0x1ea25
movl %ebp, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x61d0
movq %r14, %rdi
callq 0x6160
cmpl $0xc, %eax
jb 0x1878e
movl $0xfeedbeef, %edx       # imm = 0xFEEDBEEF
movl $0x9e3779b9, %esi       # imm = 0x9E3779B9
movq %r14, %rcx
movl %eax, %r8d
movl $0x9e3779b9, %edi       # imm = 0x9E3779B9
addl 0x4(%rcx), %esi
addl 0x8(%rcx), %edx
addl (%rcx), %edi
subl %esi, %edi
subl %edx, %edi
movl %edx, %r9d
shrl $0xd, %r9d
xorl %edi, %r9d
subl %edx, %esi
subl %r9d, %esi
movl %r9d, %edi
shll $0x8, %edi
xorl %esi, %edi
subl %r9d, %edx
subl %edi, %edx
movl %edi, %esi
shrl $0xd, %esi
xorl %edx, %esi
subl %edi, %r9d
subl %esi, %r9d
movl %esi, %edx
shrl $0xc, %edx
xorl %r9d, %edx
subl %esi, %edi
subl %edx, %edi
movl %edx, %r9d
shll $0x10, %r9d
xorl %edi, %r9d
subl %edx, %esi
subl %r9d, %esi
movl %r9d, %r10d
shrl $0x5, %r10d
xorl %esi, %r10d
subl %r9d, %edx
subl %r10d, %edx
movl %r10d, %edi
shrl $0x3, %edi
xorl %edx, %edi
subl %r10d, %r9d
subl %edi, %r9d
movl %edi, %esi
shll $0xa, %esi
xorl %r9d, %esi
subl %edi, %r10d
subl %esi, %r10d
movl %esi, %edx
shrl $0xf, %edx
xorl %r10d, %edx
addq $0xc, %rcx
addl $-0xc, %r8d
cmpl $0xb, %r8d
ja 0x186f6
jmp 0x187a3
movl $0x9e3779b9, %edi       # imm = 0x9E3779B9
movl $0xfeedbeef, %edx       # imm = 0xFEEDBEEF
movl $0x9e3779b9, %esi       # imm = 0x9E3779B9
movl %eax, %r8d
movq %r14, %rcx
addl %eax, %edx
decl %r8d
cmpl $0xa, %r8d
ja 0x1885c
leaq 0x67c3(%rip), %r9       # 0x1ef7c
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
movzbl 0xa(%rcx), %r8d
shll $0x18, %r8d
addl %edx, %r8d
movl %r8d, %edx
movzbl 0x9(%rcx), %r8d
shll $0x10, %r8d
addl %edx, %r8d
movl %r8d, %edx
movzbl 0x8(%rcx), %r8d
shll $0x8, %r8d
addl %edx, %r8d
movl %r8d, %edx
movzbl 0x7(%rcx), %r8d
shll $0x18, %r8d
addl %esi, %r8d
movl %r8d, %esi
movzbl 0x6(%rcx), %r8d
shll $0x10, %r8d
addl %esi, %r8d
movl %r8d, %esi
movzbl 0x5(%rcx), %r8d
shll $0x8, %r8d
addl %esi, %r8d
movl %r8d, %esi
movzbl 0x4(%rcx), %r8d
addl %esi, %r8d
movl %r8d, %esi
movzbl 0x3(%rcx), %r8d
shll $0x18, %r8d
addl %edi, %r8d
movl %r8d, %edi
movzbl 0x2(%rcx), %r8d
shll $0x10, %r8d
addl %edi, %r8d
movl %r8d, %edi
movzbl 0x1(%rcx), %r8d
shll $0x8, %r8d
addl %edi, %r8d
movl %r8d, %edi
movzbl (%rcx), %ecx
addl %edi, %ecx
movl %ecx, %edi
subl %edx, %edi
subl %esi, %edi
movl %edx, %ecx
shrl $0xd, %ecx
xorl %edi, %ecx
subl %edx, %esi
subl %ecx, %esi
movl %ecx, %edi
shll $0x8, %edi
xorl %esi, %edi
subl %ecx, %edx
subl %edi, %edx
movl %edi, %esi
shrl $0xd, %esi
xorl %edx, %esi
subl %edi, %ecx
subl %esi, %ecx
movl %esi, %edx
shrl $0xc, %edx
xorl %ecx, %edx
subl %esi, %edi
subl %edx, %edi
movl %edx, %ecx
shll $0x10, %ecx
xorl %edi, %ecx
subl %edx, %esi
subl %ecx, %esi
movl %ecx, %edi
shrl $0x5, %edi
xorl %esi, %edi
subl %ecx, %edx
subl %edi, %edx
movl %edi, %esi
shrl $0x3, %esi
xorl %edx, %esi
subl %edi, %ecx
subl %esi, %ecx
movl %esi, %r13d
shll $0xa, %r13d
xorl %ecx, %r13d
addl %r13d, %esi
subl %esi, %edi
shrl $0xf, %r13d
xorl %edi, %r13d
movq %r14, %rsi
addq $0x128, %rsi            # imm = 0x128
movl %r13d, 0x15c(%r14)
movq %r14, 0x150(%r14)
movl %eax, 0x158(%r14)
movq 0xdd57(%rip), %rax      # 0x26640
testq %rax, %rax
je 0x18929
movq 0x128(%rax), %rbx
movq %rbx, 0x128(%r14)
movq $0x0, 0x138(%r14)
movq 0x18(%rbx), %rax
movq %rax, %rcx
subq 0x20(%rbx), %rcx
movq %rcx, 0x130(%r14)
movq %r14, 0x10(%rax)
movq %rsi, 0x18(%rbx)
movl 0x8(%rbx), %edi
movq (%rbx), %rdx
jmp 0x189a7
movq %rsi, %rbp
movl $0x1, %edi
movl $0x40, %esi
callq 0x62f0
xorps %xmm0, %xmm0
movups %xmm0, 0x130(%r14)
movq %rax, 0x128(%r14)
testq %rax, %rax
je 0x18da8
movq %rax, %rbx
movq %rbp, 0x18(%rax)
movabsq $0x500000020, %rax      # imm = 0x500000020
movq %rax, 0x8(%rbx)
movq $0x128, 0x20(%rbx)      # imm = 0x128
movl $0x1, %edi
movl $0x200, %esi            # imm = 0x200
callq 0x62f0
movq %rax, (%rbx)
movl $0xa0111fe1, 0x38(%rbx) # imm = 0xA0111FE1
testq %rax, %rax
je 0x18da8
movq %rax, %rdx
movq %r14, 0xdca1(%rip)      # 0x26640
movl $0x20, %edi
movq %rbp, %rsi
movl 0x10(%rbx), %ebp
incl %ebp
movl %ebp, 0x10(%rbx)
leal -0x1(%rdi), %eax
andl %r13d, %eax
shlq $0x4, %rax
movl 0x8(%rdx,%rax), %ecx
incl %ecx
movl %ecx, 0x8(%rdx,%rax)
movq %rdx, 0x40(%rsp)
movq (%rdx,%rax), %rdx
movq %rdx, 0x148(%r14)
movq $0x0, 0x140(%r14)
testq %rdx, %rdx
je 0x189e7
movq %rsi, 0x18(%rdx)
addq 0x40(%rsp), %rax
movq %rsi, (%rax)
movl 0xc(%rax), %eax
leal (%rax,%rax,4), %eax
leal 0xa(,%rax,2), %eax
cmpl %eax, %ecx
jb 0x18b1d
cmpl $0x0, 0x34(%rbx)
jne 0x18b1d
movq %rsi, 0x60(%rsp)
movl %edi, %esi
movq %rsi, 0x80(%rsp)
shlq $0x5, %rsi
movq %rdi, 0x58(%rsp)
movl $0x1, %edi
callq 0x62f0
testq %rax, %rax
je 0x18da8
movq %rax, %r13
movb 0xc(%rbx), %cl
incb %cl
movl %ebp, %esi
shrl %cl, %esi
movq 0x58(%rsp), %rax
leal -0x1(,%rax,2), %ecx
andl %ecx, %ebp
cmpl $0x1, %ebp
sbbl $-0x1, %esi
movl %esi, 0x28(%rbx)
movl $0x0, 0x2c(%rbx)
testl %eax, %eax
movq 0x40(%rsp), %rdi
je 0x18ae0
xorl %ebp, %ebp
xorl %r8d, %r8d
movq %r8, %rax
shlq $0x4, %rax
movq (%rdi,%rax), %r9
testq %r9, %r9
je 0x18ad3
movq 0x20(%r9), %r10
movl 0x34(%r9), %edx
andl %ecx, %edx
shlq $0x4, %rdx
leaq (%rdx,%r13), %r11
movl 0x8(%r13,%rdx), %eax
incl %eax
movl %eax, 0x8(%r13,%rdx)
cmpl %esi, %eax
jbe 0x18ab0
incl %ebp
movl %ebp, 0x2c(%rbx)
xorl %edx, %edx
divl %esi
movl %eax, 0xc(%r11)
movq $0x0, 0x18(%r9)
movq (%r11), %rax
movq %rax, 0x20(%r9)
testq %rax, %rax
je 0x18ac8
movq %r9, 0x18(%rax)
movq %r9, (%r11)
movq %r10, %r9
testq %r10, %r10
jne 0x18a81
incq %r8
cmpq 0x80(%rsp), %r8
jne 0x18a71
callq 0x6050
movq 0x60(%rsp), %rax
movq (%rax), %rax
shll 0x8(%rax)
incl 0xc(%rax)
movq %r13, (%rax)
movl 0x10(%rax), %ecx
shrl %ecx
cmpl %ecx, 0x2c(%rax)
jbe 0x18b16
movl 0x30(%rax), %ecx
incl %ecx
movl %ecx, 0x30(%rax)
cmpl $0x2, %ecx
jb 0x18b1d
movl $0x1, 0x34(%rax)
jmp 0x18b1d
movl $0x0, 0x30(%rax)
movq 0xdb24(%rip), %rbx      # 0x26648
leaq 0x1(%rbx), %rcx
movq %rcx, 0xdb19(%rip)      # 0x26648
movq 0xdb1a(%rip), %r13      # 0x26650
movq 0xdb1b(%rip), %rax      # 0x26658
cmpq %r13, %rcx
jbe 0x18b67
leaq 0x2000(,%r13,8), %rsi
movq %rax, %rdi
callq 0x6430
movq %rax, 0xdaff(%rip)      # 0x26658
addq $0x400, %r13            # imm = 0x400
movq %r13, 0xdae9(%rip)      # 0x26650
leaq 0x140(%rsp), %r13
movq 0x20(%rsp), %rcx
movq %r14, (%rax,%rbx,8)
testq %rcx, %rcx
jne 0x18b8b
incq 0xdadc(%rip)            # 0x26660
incq 0x100(%r14)
incq 0x108(%r14)
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %r14
incq %r15
notq %r12
addq 0xd887(%rip), %r12      # 0x26430
leaq 0xd890(%rip), %rbp      # 0x26440
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6490
movq %r12, 0xd86b(%rip)      # 0x26430
movq %rbp, %rdi
movl $0xa, %esi
movq %r12, %rdx
callq 0x62a0
movq %rax, %r15
testq %rax, %rax
jne 0x183b5
jmp 0x18bff
leaq 0x140(%rsp), %r13
movq 0x20(%rsp), %rcx
jmp 0x18b78
leaq 0xd51b(%rip), %rax      # 0x26114
movl $0x1, (%rax)
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
testq %rax, 0xc0(%rsp,%rcx,8)
movq 0x68(%rsp), %r12
je 0x18c95
movl $0x200, %edx            # imm = 0x200
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x62b0
testq %rax, %rax
js 0x18d12
je 0x18c7e
movq %rax, %rbx
movq 0xda2a(%rip), %r14      # 0x26668
incq %r14
xorl %r15d, %r15d
leaq (%rsp,%r15), %rdi
addq $0x140, %rdi            # imm = 0x140
movl $0xa, %esi
movq %rbx, %rdx
callq 0x62a0
testq %rax, %rax
je 0x18c8b
movq %r14, 0xda00(%rip)      # 0x26668
subq %r13, %rax
addq %rax, %r15
incq %r15
incq %rax
incq %r14
subq %rax, %rbx
jg 0x18c44
jmp 0x18c8b
leaq 0xd48f(%rip), %rax      # 0x26114
movl $0x1, (%rax)
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %r14
movq 0x70(%rsp), %r15
testq %r15, 0xc0(%rsp,%r12,8)
je 0x18cec
movb $0x0, 0x88(%rsp)
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
callq 0x7fb1
cmpb $0x1, 0x88(%rsp)
jne 0x18cec
movl 0x8c(%rsp), %eax
cmpl $0x70, %eax
je 0x18cdb
cmpl $0x71, %eax
jne 0x18cec
jmp 0x18d85
movl $0x1, %eax
subl 0xd98a(%rip), %eax      # 0x26670
movl %eax, 0xd984(%rip)      # 0x26670
leaq 0xd421(%rip), %rax      # 0x26114
cmpl $0x0, (%rax)
je 0x17f7a
jmp 0x17e88
leaq 0x62cd(%rip), %rdi      # 0x1efd5
callq 0x6530
jmp 0x18bff
leaq 0x62bc(%rip), %rdi      # 0x1efd5
callq 0x6530
jmp 0x18c8b
leaq 0x6289(%rip), %rdi      # 0x1efb3
callq 0x6530
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x8(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rsp)
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
jmp 0x17e77
leaq 0x6760(%rip), %rdi      # 0x1f4b6
callq 0x6530
movl $0x1, %ebx
jmp 0x17ec6
leaq 0x5d59(%rip), %rdi      # 0x1eac5
callq 0x6530
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x8(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x17e73
leaq 0xd388(%rip), %rax      # 0x26114
movl $0x1, (%rax)
jmp 0x17e88
leaq 0x620e(%rip), %rdi      # 0x1efac
callq 0x6530
jmp 0x17e88
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x6590
leaq 0x140(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %rbx, %rdx
callq 0x6749