// File: /workspace/github_c_makefile_star2_O1/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 $0x338, %rsp            # imm = 0x338
movq %rsi, %rbx
leaq 0xcf79(%rip), %rax      # 0x25330
cmpl $-0x1, (%rax)
jne 0x18400
leaq 0xdcdd(%rip), %rax      # 0x260a0
cmpq $0x0, (%rax)
jne 0x18400
movq 0xcbf8(%rip), %rax      # 0x24fc8
cmpl %edi, (%rax)
jl 0x18400
leaq 0x45ea(%rip), %rdi      # 0x1c9c5
xorl %eax, %eax
callq 0xadcf
movq 0xcc07(%rip), %rax      # 0x24ff0
movq (%rax), %rdi
movl $0x1, %ebx
movl $0x1, %esi
callq 0xae77
jmp 0x1860a
movl %edi, %r12d
movl %edi, 0x18(%rsp)
testl %edi, %edi
jle 0x184d4
xorl %r13d, %r13d
leaq 0x6b9f(%rip), %r14      # 0x1efb8
leaq 0x6ba4(%rip), %r15      # 0x1efc4
movq (%rbx,%r13,8), %rbp
movl $0x2, %edx
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6080
testl %eax, %eax
je 0x18450
movl $0x8, %edx
movq %rbp, %rdi
leaq 0x6b74(%rip), %rsi      # 0x1efbb
callq 0x6080
testl %eax, %eax
jne 0x1845c
movb $0x23, 0x1(%rbp)
movq (%rbx,%r13,8), %rax
movb $0x0, 0x2(%rax)
movq (%rbx,%r13,8), %rbp
movl $0x2, %edx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x6080
testl %eax, %eax
je 0x184bc
movl $0xd, %edx
movq %rbp, %rdi
leaq 0x6b44(%rip), %rsi      # 0x1efc7
callq 0x6080
testl %eax, %eax
je 0x184bc
movl $0x2, %edx
movq %rbp, %rdi
leaq 0x6b3a(%rip), %rsi      # 0x1efd5
callq 0x6080
testl %eax, %eax
je 0x184bc
movl $0x5, %edx
movq %rbp, %rdi
leaq 0x6b25(%rip), %rsi      # 0x1efd8
callq 0x6080
testl %eax, %eax
jne 0x184c8
movb $0x40, 0x1(%rbp)
movq (%rbx,%r13,8), %rax
movb $0x0, 0x2(%rax)
incq %r13
cmpq %r13, %r12
jne 0x18420
movabsq $0x20797073706870, %rax # imm = 0x20797073706870
movq %rax, 0xdd4b(%rip)      # 0x26230
cmpl $0x2, 0x18(%rsp)
jl 0x1852a
movl $0x1, %r13d
leaq 0xdd37(%rip), %r14      # 0x26230
leaq 0x6aa8(%rip), %r15      # 0x1efa8
movq %r14, %rdi
callq 0x6160
leaq (%r14,%rax), %rdi
movl $0x200, %esi            # imm = 0x200
subq %rax, %rsi
movq (%rbx,%r13,8), %rcx
movq %r15, %rdx
xorl %eax, %eax
callq 0x61d0
incq %r13
cmpq %r13, %r12
jne 0x18500
leaq 0x4323(%rip), %rdi      # 0x1c854
xorl %esi, %esi
xorl %eax, %eax
callq 0x64f0
movl %eax, 0x24(%rsp)
testl %eax, %eax
js 0x194a0
leaq 0x130(%rsp), %r13
movq %r13, %rdi
callq 0x6270
testl %eax, %eax
js 0x19473
leaq 0xb0(%rsp), %rdi
callq 0x6270
testl %eax, %eax
js 0x19473
callq 0x6600
testl %eax, %eax
je 0x194f1
movl %eax, 0x20(%rsp)
js 0x194b6
movl 0x134(%rsp), %edi
callq 0x6260
movl 0xb4(%rsp), %edi
callq 0x6260
movl 0x130(%rsp), %eax
movq %rax, 0x10(%rsp)
movl 0xb0(%rsp), %eax
movq %rax, 0x8(%rsp)
callq 0x68bc
leaq 0xdb4e(%rip), %rax      # 0x26114
cmpl $0x0, (%rax)
je 0x1861e
callq 0x753c
movq 0x10(%rsp), %rdi
callq 0x6260
movq 0x8(%rsp), %rdi
callq 0x6260
movl 0x24(%rsp), %edi
callq 0x6260
movl 0x20(%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 $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x24(%rsp), %ecx
movq 0x10(%rsp), %rsi
cmpl %esi, %ecx
movl %esi, %r8d
cmovgl %ecx, %r8d
movq 0x8(%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 0xdd9e(%rip), %rbp      # 0x26440
movq $0x0, 0x18(%rsp)
movq %rbx, 0x30(%rsp)
movq %r14, 0x28(%rsp)
movq %r15, 0x68(%rsp)
movq %r12, 0x60(%rsp)
movl $0x1, %edi
leaq 0x90(%rsp), %rsi
callq 0x6110
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x186e9
cmpq %rax, 0x90(%rsp)
jle 0x189a3
movq 0xdf58(%rip), %rsi      # 0x26648
testq %rsi, %rsi
je 0x187cd
movq 0xdf58(%rip), %rdi      # 0x26658
movl $0x8, %edx
leaq 0xdfd(%rip), %rcx       # 0x19509
callq 0x60b0
movss 0x6833(%rip), %xmm3     # 0x1ef4c
movq 0xdf28(%rip), %rax      # 0x26648
testq %rax, %rax
je 0x187cd
movq 0xdf30(%rip), %rcx      # 0x26660
testq %rcx, %rcx
js 0x1873f
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
jmp 0x18759
movq %rcx, %rdx
shrq %rdx
movl %ecx, %esi
andl $0x1, %esi
orq %rdx, %rsi
xorps %xmm0, %xmm0
cvtsi2ss %rsi, %xmm0
addss %xmm0, %xmm0
movq 0xdef8(%rip), %rdx      # 0x26658
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq 0x100(%rdi), %r8
movq 0x108(%rdi), %r9
addq %r8, 0x110(%rdi)
addq %r9, 0x118(%rdi)
testq %r8, %r8
js 0x18791
xorps %xmm1, %xmm1
cvtsi2ss %r8, %xmm1
jmp 0x187aa
movq %r8, %r9
shrq %r9
andl $0x1, %r8d
orq %r9, %r8
xorps %xmm1, %xmm1
cvtsi2ss %r8, %xmm1
addss %xmm1, %xmm1
mulss %xmm3, %xmm1
xorps %xmm2, %xmm2
testq %rcx, %rcx
je 0x187bd
divss %xmm0, %xmm1
movaps %xmm1, %xmm2
movss %xmm2, 0x120(%rdi)
incq %rsi
cmpq %rsi, %rax
jne 0x18762
movq 0xde8c(%rip), %rax      # 0x26660
addq %rax, 0xde9d(%rip)      # 0x26678
callq 0x7582
callq 0x7558
movl %eax, %r14d
callq 0x756d
movl %eax, %ebp
xorl %edi, %edi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
xorl %ecx, %ecx
leaq 0x6870(%rip), %r8       # 0x1f071
leaq 0xda28(%rip), %r9       # 0x26230
xorl %eax, %eax
callq 0x85a6
movq 0xde62(%rip), %r9       # 0x26678
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x67bb(%rip), %r8       # 0x1efe3
xorl %eax, %eax
pushq 0xde18(%rip)            # 0x26648
pushq 0xde32(%rip)            # 0x26668
callq 0x85a6
addq $0x10, %rsp
xorl %edi, %edi
movl $0x3, %esi
movl $0x500, %edx            # imm = 0x500
xorl %ecx, %ecx
leaq 0x67c0(%rip), %r8       # 0x1f014
leaq 0x67d7(%rip), %r9       # 0x1f032
xorl %eax, %eax
leaq 0x67da(%rip), %r10      # 0x1f03e
pushq %r10
leaq 0x67cc(%rip), %r10      # 0x1f039
pushq %r10
leaq 0x67bd(%rip), %r10      # 0x1f033
pushq %r10
leaq 0x67b9(%rip), %r10      # 0x1f038
pushq %r10
callq 0x85a6
addq $0x20, %rsp
addl $-0x34, %r14d
subq $0x8, %rsp
movl $0x34, %edi
movl $0x3, %esi
movl $0x500, %edx            # imm = 0x500
xorl %ecx, %ecx
leaq 0x679a(%rip), %r8       # 0x1f044
movl %r14d, %r9d
xorl %eax, %eax
leaq 0x657f(%rip), %r10      # 0x1ee35
pushq %r10
callq 0x85a6
addq $0x10, %rsp
cmpl $0x5, %ebp
setge %cl
movq 0xdd7a(%rip), %rax      # 0x26648
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1894d
movl $0x1, %ebx
leal 0x3(%rbx), %esi
movq 0xdd6e(%rip), %rax      # 0x26658
movq -0x8(%rax,%rbx,8), %r10
leal 0x4(%rbx), %r14d
movq 0x118(%r10), %r9
xorps %xmm0, %xmm0
cvtss2sd 0x120(%r10), %xmm0
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x6736(%rip), %r8       # 0x1f049
movb $0x1, %al
pushq %r10
pushq 0x100(%r10)
pushq 0x108(%r10)
pushq 0x110(%r10)
callq 0x85a6
addq $0x20, %rsp
movq 0xdd0c(%rip), %rax      # 0x26648
cmpl %ebp, %r14d
jge 0x1894d
leaq 0x1(%rbx), %rcx
cmpq %rax, %rbx
movq %rcx, %rbx
jb 0x188e0
testq %rax, %rax
xorps %xmm0, %xmm0
je 0x18971
movq 0xdcfc(%rip), %rcx      # 0x26658
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
incq %rdx
movups %xmm0, 0x100(%rsi)
cmpq %rdx, %rax
jne 0x1895e
movq $0x0, 0xdce4(%rip) # 0x26660
cmpl $0x0, 0xdced(%rip)      # 0x26670
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %r14
leaq 0xdaac(%rip), %rbp      # 0x26440
jne 0x1899b
callq 0x75fe
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
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)
movaps %xmm0, 0xb0(%rsp)
orq %r15, 0xb0(%rsp,%r12,8)
orq %rbx, 0xb0(%rsp,%r14,8)
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
orq %rax, 0xb0(%rsp,%rcx,8)
movq $0x1, 0xa0(%rsp)
movq $0x0, 0xa8(%rsp)
movl 0x3c(%rsp), %edi
leaq 0xb0(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0xa0(%rsp), %r8
callq 0x6390
testl %eax, %eax
js 0x18a76
testq %rbx, 0xb0(%rsp,%r14,8)
je 0x19350
movq 0xd9d5(%rip), %rdx      # 0x26430
subq $0x200, %rdx            # imm = 0x200
jne 0x18a9e
movq $0x0, 0xd9c1(%rip) # 0x26430
movl $0x200, %edx            # imm = 0x200
jmp 0x18aa1
callq 0x6060
cmpl $0x4, (%rax)
jne 0x194d6
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x810c
movq $0x0, 0x18(%rsp)
jmp 0x1943c
negq %rdx
movq 0xd988(%rip), %rsi      # 0x26430
addq %rbp, %rsi
movq 0x10(%rsp), %rdi
callq 0x62b0
testq %rax, %rax
js 0x19451
je 0x19343
addq 0xd965(%rip), %rax      # 0x26430
movq %rax, 0xd95e(%rip)      # 0x26430
movq %rbp, %rdi
movl $0xa, %esi
movq %rax, %rdx
callq 0x62a0
testq %rax, %rax
je 0x19350
movq %rax, %r15
movq %r15, %r12
subq %rbp, %r12
cmpl $0x3, %r12d
jl 0x192fc
cmpb $0x23, 0xd93b(%rip)     # 0x26440
je 0x192fc
leaq 0xd92e(%rip), %rdi      # 0x26440
movq %r13, %rsi
movl $0xa, %edx
callq 0x62e0
movq %rax, %r10
testq %rax, %rax
jne 0x18b34
cmpb $0x30, 0xd912(%rip)     # 0x26440
jne 0x192fc
movq 0x130(%rsp), %r11
cmpb $0x20, (%r11)
jne 0x192fc
incq %r11
movq %r11, 0x130(%rsp)
movl %r12d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0xd8e0(%rip), %rbp      # 0x26440
subq %r11, %rbp
leaq (%rax,%rbp), %rcx
addq $-0x100, %rcx
cmpq $-0xff, %rcx
jb 0x192fc
addq %rax, %rbp
cmpq $0xc, %rbp
jb 0x18c32
movl $0x9e3779b9, %esi       # imm = 0x9E3779B9
movl $0xfeedbeef, %ecx       # imm = 0xFEEDBEEF
movl $0x9e3779b9, %edx       # imm = 0x9E3779B9
movl %ebp, %edi
movq %r11, %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 0x18b9c
jmp 0x18c46
movl $0xfeedbeef, %ecx       # imm = 0xFEEDBEEF
movl $0x9e3779b9, %edx       # imm = 0x9E3779B9
movq %r11, %rax
movl %ebp, %edi
movl $0x9e3779b9, %esi       # imm = 0x9E3779B9
addl %ebp, %ecx
decl %edi
cmpl $0xa, %edi
ja 0x18cd5
leaq 0x62f6(%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 0xd964(%rip), %rax      # 0x26640
testq %rax, %rax
movq %r10, 0x40(%rsp)
je 0x18d6f
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, %ebx
shll $0xa, %ebx
xorl %edi, %ebx
addl %ebx, %edx
subl %edx, %esi
shrl $0xf, %ebx
xorl %esi, %ebx
movq 0x128(%rax), %rdx
movl 0x8(%rdx), %eax
decl %eax
andl %ebx, %eax
movq (%rdx), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %r13
testq %r13, %r13
je 0x18d74
subq 0x20(%rdx), %r13
jmp 0x18d77
xorl %r13d, %r13d
jmp 0x18dee
xorl %r13d, %r13d
testq %r13, %r13
je 0x18dee
movq %r15, 0x70(%rsp)
cmpl %ebx, 0x15c(%r13)
jne 0x18dd4
movl 0x158(%r13), %eax
cmpq %rax, %rbp
jne 0x18dd4
movq 0x150(%r13), %rdi
movq %r11, %rsi
movq %r12, %r15
movq %r13, %r12
movq %rdx, %r13
movq %rbp, %rdx
movq %rbp, %r14
movq %r11, %rbp
callq 0x6410
movq %r13, %rdx
movq %r12, %r13
movq %r15, %r12
movq 0x70(%rsp), %r15
movq %rbp, %r11
movq %r14, %rbp
movq 0x40(%rsp), %r10
testl %eax, %eax
je 0x18dee
movq 0x148(%r13), %r13
testq %r13, %r13
je 0x18de6
subq 0x20(%rdx), %r13
jmp 0x18de9
xorl %r13d, %r13d
testq %r13, %r13
jne 0x18d81
testq %r13, %r13
jne 0x192d0
movl $0x1, %edi
movl $0x160, %esi            # imm = 0x160
movq %r11, %rbx
callq 0x62f0
movq %rax, %r13
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdi
leaq 0x5c0a(%rip), %rdx      # 0x1ea25
movl %ebp, %ecx
movq %rax, %rbp
movq %rbx, %r8
xorl %eax, %eax
callq 0x61d0
movq %rbp, %rdi
callq 0x6160
cmpl $0xc, %eax
jb 0x18ee8
movl $0xfeedbeef, %edx       # imm = 0xFEEDBEEF
movl $0x9e3779b9, %esi       # imm = 0x9E3779B9
movq %r13, %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 0x18e50
jmp 0x18efd
movl $0x9e3779b9, %edi       # imm = 0x9E3779B9
movl $0xfeedbeef, %edx       # imm = 0xFEEDBEEF
movl $0x9e3779b9, %esi       # imm = 0x9E3779B9
movl %eax, %r8d
movq %r13, %rcx
addl %eax, %edx
decl %r8d
cmpl $0xa, %r8d
ja 0x18fb6
leaq 0x6069(%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, %ebx
shll $0xa, %ebx
xorl %ecx, %ebx
addl %ebx, %esi
subl %esi, %edi
shrl $0xf, %ebx
xorl %edi, %ebx
addq $0x128, %rbp            # imm = 0x128
movl %ebx, 0x15c(%r13)
movq %r13, 0x150(%r13)
movl %eax, 0x158(%r13)
movq 0xd606(%rip), %rax      # 0x26640
testq %rax, %rax
je 0x1907e
movq 0x128(%rax), %rcx
movq %rcx, 0x128(%r13)
movq $0x0, 0x138(%r13)
movq 0x128(%rax), %rax
movq 0x18(%rax), %rcx
movq %rcx, %rdx
subq 0x20(%rax), %rdx
movq %rdx, 0x130(%r13)
movq %r13, 0x10(%rcx)
movq %rbp, 0x18(%rax)
jmp 0x19103
movl $0x40, %edi
callq 0x63e0
xorps %xmm0, %xmm0
movups %xmm0, 0x130(%r13)
movq %rax, 0x128(%r13)
testq %rax, %rax
je 0x194e7
movq %rax, %r14
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movq %rbp, 0x18(%rax)
movabsq $0x500000020, %rax      # imm = 0x500000020
movq %rax, 0x8(%r14)
movq $0x128, 0x20(%r14)      # imm = 0x128
movl $0x200, %edi            # imm = 0x200
callq 0x63e0
movq %rax, (%r14)
movl $0xa0111fe1, 0x38(%r14) # imm = 0xA0111FE1
testq %rax, %rax
je 0x194e7
movl $0x200, %edx            # imm = 0x200
movq %rax, %rdi
xorl %esi, %esi
callq 0x6230
movq %r13, 0xd53d(%rip)      # 0x26640
movq 0xd536(%rip), %rax      # 0x26640
movq 0x128(%rax), %rcx
incl 0x10(%rcx)
movl 0x8(%rcx), %eax
decl %eax
andl %ebx, %eax
movq (%rcx), %rdx
shlq $0x4, %rax
movl 0x8(%rdx,%rax), %ecx
incl %ecx
movl %ecx, 0x8(%rdx,%rax)
movq (%rdx,%rax), %rsi
movq %rsi, 0x148(%r13)
movq $0x0, 0x140(%r13)
testq %rsi, %rsi
je 0x1914b
movq %rbp, 0x18(%rsi)
addq %rax, %rdx
movq %rbp, (%rdx)
movl 0xc(%rdx), %eax
leal (%rax,%rax,4), %eax
leal 0xa(,%rax,2), %eax
cmpl %eax, %ecx
jb 0x19279
movq (%rbp), %rbx
cmpl $0x0, 0x34(%rbx)
jne 0x19279
movq %rbp, 0x58(%rsp)
movl 0x8(%rbx), %ebp
shlq $0x5, %rbp
movq %rbp, %rdi
callq 0x63e0
testq %rax, %rax
je 0x194e7
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x6230
movl 0x10(%rbx), %esi
movb 0xc(%rbx), %cl
incb %cl
movl 0x8(%rbx), %edi
leal -0x1(,%rdi,2), %r8d
movl %r8d, %eax
andl %esi, %eax
shrl %cl, %esi
cmpl $0x1, %eax
sbbl $-0x1, %esi
movl %esi, 0x28(%rbx)
movl $0x0, 0x2c(%rbx)
testq %rdi, %rdi
je 0x19240
movq (%rbx), %rcx
xorl %r9d, %r9d
movq %r9, %rax
shlq $0x4, %rax
movq (%rcx,%rax), %r10
testq %r10, %r10
je 0x19238
movq 0x20(%r10), %r11
movl 0x34(%r10), %edx
andl %r8d, %edx
shlq $0x4, %rdx
leaq (%r14,%rdx), %rbp
movl 0x8(%r14,%rdx), %eax
incl %eax
movl %eax, 0x8(%r14,%rdx)
cmpl %esi, %eax
jbe 0x19213
incl 0x2c(%rbx)
xorl %edx, %edx
divl %esi
movl %eax, 0xc(%rbp)
movq $0x0, 0x18(%r10)
movq (%rbp), %rax
movq %rax, 0x20(%r10)
testq %rax, %rax
je 0x1922c
movq %r10, 0x18(%rax)
movq %r10, (%rbp)
movq %r11, %r10
testq %r11, %r11
jne 0x191e6
incq %r9
cmpq %rdi, %r9
jne 0x191d6
movq (%rbx), %rdi
callq 0x6050
movq 0x58(%rsp), %rax
movq (%rax), %rax
shll 0x8(%rax)
incl 0xc(%rax)
movq %r14, (%rax)
movl 0x10(%rax), %edx
shrl %edx
xorl %ecx, %ecx
cmpl %edx, 0x2c(%rax)
jbe 0x1926a
movl 0x30(%rax), %ecx
incl %ecx
movl %ecx, 0x30(%rax)
cmpl $0x2, %ecx
jb 0x19279
movl $0x1, 0x34(%rax)
movq 0xd3c8(%rip), %rbx      # 0x26648
leaq 0x1(%rbx), %rax
movq %rax, 0xd3bd(%rip)      # 0x26648
movq 0xd3be(%rip), %r14      # 0x26650
cmpq %r14, %rax
jbe 0x192c0
movq 0xd3ba(%rip), %rdi      # 0x26658
leaq 0x2000(,%r14,8), %rsi
callq 0x6430
movq %rax, 0xd3a6(%rip)      # 0x26658
addq $0x400, %r14            # imm = 0x400
movq %r14, 0xd390(%rip)      # 0x26650
movq 0xd391(%rip), %rax      # 0x26658
movq %r13, (%rax,%rbx,8)
movq 0x40(%rsp), %r10
testq %r10, %r10
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %r14
jne 0x192ed
incq 0xd37a(%rip)            # 0x26660
incq 0x100(%r13)
incq 0x108(%r13)
leaq 0x130(%rsp), %r13
incq %r15
notq %r12
addq 0xd127(%rip), %r12      # 0x26430
leaq 0xd130(%rip), %rbp      # 0x26440
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6490
movq %r12, 0xd10b(%rip)      # 0x26430
movq %rbp, %rdi
movl $0xa, %esi
movq %r12, %rdx
callq 0x62a0
movq %rax, %r15
testq %rax, %rax
jne 0x18aee
jmp 0x19350
leaq 0xcdca(%rip), %rax      # 0x26114
movl $0x1, (%rax)
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
testq %rax, 0xb0(%rsp,%rcx,8)
movq 0x60(%rsp), %r12
je 0x193e7
movl $0x200, %edx            # imm = 0x200
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x62b0
testq %rax, %rax
js 0x19462
je 0x193d0
movq %rax, %r14
movq 0xd2d8(%rip), %rbx      # 0x26668
incq %rbx
xorl %r15d, %r15d
leaq (%rsp,%r15), %rdi
addq $0x130, %rdi            # imm = 0x130
movl $0xa, %esi
movq %r14, %rdx
callq 0x62a0
testq %rax, %rax
je 0x193dd
movq %rbx, 0xd2ae(%rip)      # 0x26668
subq %r13, %rax
addq %rax, %r15
incq %r15
incq %rax
incq %rbx
subq %rax, %r14
jg 0x19396
jmp 0x193dd
leaq 0xcd3d(%rip), %rax      # 0x26114
movl $0x1, (%rax)
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %r14
movq 0x68(%rsp), %r15
testq %r15, 0xb0(%rsp,%r12,8)
je 0x1943c
movb $0x0, 0x78(%rsp)
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x810c
cmpb $0x1, 0x78(%rsp)
jne 0x1943c
movl 0x7c(%rsp), %eax
cmpl $0x70, %eax
je 0x1942b
cmpl $0x71, %eax
jne 0x1943c
leaq 0xccf1(%rip), %rax      # 0x26114
movl $0x1, (%rax)
jmp 0x1943c
movl $0x1, %eax
subl 0xd23a(%rip), %eax      # 0x26670
movl %eax, 0xd234(%rip)      # 0x26670
leaq 0xccd1(%rip), %rax      # 0x26114
cmpl $0x0, (%rax)
je 0x186bf
jmp 0x185cb
leaq 0x5b86(%rip), %rdi      # 0x1efde
callq 0x6530
jmp 0x19350
leaq 0x5b75(%rip), %rdi      # 0x1efde
callq 0x6530
jmp 0x193dd
leaq 0x5b39(%rip), %rdi      # 0x1efb3
callq 0x6530
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x10(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x8(%rsp)
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
jmp 0x185ba
leaq 0x6017(%rip), %rdi      # 0x1f4be
callq 0x6530
movl $0x1, %ebx
jmp 0x1860a
leaq 0x5608(%rip), %rdi      # 0x1eac5
callq 0x6530
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x10(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x185b5
leaq 0x5acf(%rip), %rdi      # 0x1efac
callq 0x6530
jmp 0x185cb
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x6590
leaq 0x130(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdx
callq 0x6749