// File: ctSkennerton[P]fxtract/util/stress.c
// Function: main
int
main(int argc, char **argv)
{
    setvbuf(stdout, NULL, _IOLBF, 0);
    int         count = 10001;  // count MUST be odd, or hash is always zero!
    int         tgtlen, patlen, m, t, p, i, r;
    intptr_t    hash = 0, exp = 0;
    int         tv[] = { 65536, 32768, 16384, 8192, 4096, 2048, 1024,
                         962, 961, 960, 512, 256, 128, 64, 32, 16, 8, 0 };
    int         pv[] = { 1025, 1024, 1023, 
                         714, 713, 712, 711, 258, 
                         257, 256, 255, 254, 
                         130, 129, 128, 127, 126,
                         98, 97, 96, 95, 94, 
                         66,  65,  64,  63,  62, 
                         50, 49, 48, 47, 46, 34,  33,  32,  31,  30, 23, 22, 21,
                         18,  17,  16,  15,  14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 0 };
    char        pat[9999], tgt[99999];
    int         lo, hi;
    switch (argc) {
    case 1: lo = -(hi = 4); break;
    case 2: lo = -(hi = atoi(argv[1])); break;
    case 3: lo = atoi(argv[1]), hi = atoi(argv[2]); break;
    default: die("Usage: stress <limit>  or  stress <min> <max>");
    }

    for (m = lo; m <= hi; m++) {
        printf("M TARG. PATT | SSE2 BERG WINS BNDM | RG7g RG7h RG7s RG7w best winner(s)\n");
        for (t = 0; (tgtlen = tv[t]); ++t) {
            for (p = 0; (patlen = pv[p]); ++p) {
                if (patlen >= tgtlen || patlen <= m || patlen <= -m) continue;

                char c258[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,abcdefghijklmnopqrstuvwxyz.AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0918273645.5463728190zZyYxXwWvVuUtTsSrRqQpPoOnNmMlLkKjJiIhHgGfFeEdDcCbBaA.zyxwvutsrqponmlkjihgfedcba,9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA,@ACEGIKMOQSUW";
                if (patlen < (int)sizeof c258) {
                    memcpy(pat, c258, patlen);
                } else {
                    strcpy(pat, c258);
                    char flip = 3, *cp;
                    while ((int)strlen(pat) < patlen) {
                        for (cp = c258; *cp; cp++) *cp ^= flip;
                        strcat(pat, c258);
                        flip <<= 1;
                    }
                }
                pat[patlen] = 0;

                if  (m < 0) for (i = 0; i < tgtlen; i -= m) memcpy(tgt+i, &pat[patlen+m], -m);
                else if (m) for (i = 0; i < tgtlen; i += m) memcpy(tgt+i, pat, m);
                else memset(tgt, '-', tgtlen);
                strcpy(tgt+tgtlen, pat);
                // The "hash ^=" is necessary, else gcc OPTIMIZES OUT the strstr calls.
#               define DO_MEM(T,F) \
                            double T = tick(); \
                            for (r = 1; r < 6553600/count; ++r, tgt[1] ^= 1) \
                                hash ^= (intptr_t)F(tgt, tgtlen+patlen, pat, patlen); \
                            T = tick() - T; if (F == bndmem && patlen > 128) T = 0; \
                            if (exp && hash != exp) fprintf(stderr, #F "(%d,%d) failed\n", tgtlen,patlen)
#               define DO_STR(T,F) \
                            double T = tick(); \
                            for (r = 1; r < 6553600/count; ++r, tgt[1] ^= 1) \
                                hash ^= (intptr_t)F(tgt, pat); \
                            T = tick() - T
                DO_STR(tbase, strstr);  // sets exp[]
                exp = hash;
                DO_STR(tsse2, sse2str);
                DO_STR(tberg, bergstr);
//                DO_STR(tchrs, strchrs);
                DO_STR(twins, winstr);
                DO_MEM(tbndm, bndmem);
                DO_MEM(trg7g, Railgun7g);
                DO_MEM(trg7h, Railgun7h);
                DO_MEM(trg7s, Railgun7s);
                DO_MEM(trg7w, Railgun7w);
#                   undef  DO_MEM
#                   undef  DO_STR

                double *timev[] =    { &tbase, &tsse2, &tberg, &twins, &tbndm, &trg7g, &trg7h, &trg7s, &trg7w, NULL };
                char const *namev[] = { "base", "sse2", "berg", "wins", "bndm", "gull", "hash", "seki", "wolf", NULL };
                int b = 0;
                for (i = 1; timev[i]; ++i) if (*timev[i] && *timev[b] > *timev[i]) b = i;
                
                printf("%1d %5d %4d | %4.0f %4.0f %4.0f %4.0f | %4.0f %4.0f %4.0f %4.0f %4.0f %s",
                       m, tgtlen, patlen,
                       tsse2 * 100 / tbase,
                       tberg * 100 / tbase,
                       twins * 100 / tbase,
                       tbndm * 100 / tbase,
                       trg7g * 100 / tbase,
                       trg7h * 100 / tbase,
                       trg7s * 100 / tbase,
                       trg7w * 100 / tbase,
                       *timev[b] * 100 / tbase,
                       namev[b]);

                for (i = 0; timev[i]; ++i)
                    if (i != b && *timev[i] && *timev[i] < 1.1 * *timev[b])
                        printf(",%s", namev[i]);

                putchar('\n');
            }
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b190, %rsp          # imm = 0x1B190
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0xcad0(%rip), %rax      # 0xffc0
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %edx
movq %rcx, %rsi
callq 0x3030
movl $0x2711, -0x14(%rbp)    # imm = 0x2711
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movaps 0x8b4e(%rip), %xmm0     # 0xc070
movaps %xmm0, -0x60(%rbp)
movaps 0x8b33(%rip), %xmm0     # 0xc060
movaps %xmm0, -0x70(%rbp)
movaps 0x8b18(%rip), %xmm0     # 0xc050
movaps %xmm0, -0x80(%rbp)
movaps 0x8afd(%rip), %xmm0     # 0xc040
movaps %xmm0, -0x90(%rbp)
movq $0x8, -0x50(%rbp)
leaq 0x8b37(%rip), %rsi      # 0xc090
leaq -0x180(%rbp), %rdi
movl $0xe4, %edx
callq 0x3160
movl -0x8(%rbp), %eax
movl %eax, -0x1b158(%rbp)
subl $0x1, %eax
je 0x3594
jmp 0x357a
movl -0x1b158(%rbp), %eax
subl $0x2, %eax
je 0x35aa
jmp 0x3587
movl -0x1b158(%rbp), %eax
subl $0x3, %eax
je 0x35cb
jmp 0x35f3
movl $0x4, -0x1af38(%rbp)
movl $0xfffffffc, -0x1af34(%rbp) # imm = 0xFFFFFFFC
jmp 0x3601
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3300
movl %eax, %ecx
movl %ecx, -0x1af38(%rbp)
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x1af34(%rbp)
jmp 0x3601
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3300
movl %eax, -0x1af34(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3300
movl %eax, -0x1af38(%rbp)
jmp 0x3601
leaq 0x8b7a(%rip), %rdi      # 0xc174
movb $0x0, %al
callq 0x86c0
movl -0x1af34(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1af38(%rbp), %eax
jg 0x40bc
leaq 0x8b82(%rip), %rdi      # 0xc1a2
movb $0x0, %al
callq 0x3050
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movl -0x90(%rbp,%rax,4), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
je 0x40ac
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rax
movl -0x180(%rbp,%rax,4), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x409c
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x367f
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x367f
movl -0x1c(%rbp), %eax
xorl %ecx, %ecx
subl -0x20(%rbp), %ecx
cmpl %ecx, %eax
jg 0x3684
jmp 0x408e
leaq -0x1b050(%rbp), %rdi
leaq 0x8c4e(%rip), %rsi      # 0xc2e0
movl $0x10c, %edx            # imm = 0x10C
callq 0x3160
cmpl $0x10c, -0x1c(%rbp)     # imm = 0x10C
jge 0x36c1
leaq -0x2890(%rbp), %rdi
leaq -0x1b050(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x3160
jmp 0x3755
leaq -0x2890(%rbp), %rdi
leaq -0x1b050(%rbp), %rsi
callq 0x31b0
movb $0x3, -0x1b051(%rbp)
leaq -0x2890(%rbp), %rdi
callq 0x30d0
cmpl -0x1c(%rbp), %eax
jge 0x3753
leaq -0x1b050(%rbp), %rax
movq %rax, -0x1b060(%rbp)
movq -0x1b060(%rbp), %rax
cmpb $0x0, (%rax)
je 0x372f
movsbl -0x1b051(%rbp), %edx
movq -0x1b060(%rbp), %rax
movsbl (%rax), %ecx
xorl %edx, %ecx
movb %cl, (%rax)
movq -0x1b060(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1b060(%rbp)
jmp 0x36fa
leaq -0x2890(%rbp), %rdi
leaq -0x1b050(%rbp), %rsi
callq 0x3360
movsbl -0x1b051(%rbp), %eax
shll %eax
movb %al, -0x1b051(%rbp)
jmp 0x36db
jmp 0x3755
movslq -0x1c(%rbp), %rax
movb $0x0, -0x2890(%rbp,%rax)
cmpl $0x0, -0x20(%rbp)
jge 0x37b2
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x37b0
leaq -0x1af30(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
cltq
leaq -0x2890(%rbp), %rsi
addq %rax, %rsi
xorl %eax, %eax
subl -0x20(%rbp), %eax
movslq %eax, %rdx
callq 0x3160
movl -0x20(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
jmp 0x376e
jmp 0x3809
cmpl $0x0, -0x20(%rbp)
je 0x37f2
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x37f0
leaq -0x1af30(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
leaq -0x2890(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x3160
movl -0x20(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x37bf
jmp 0x3807
leaq -0x1af30(%rbp), %rdi
movslq -0x18(%rbp), %rdx
movl $0x2d, %esi
callq 0x3110
jmp 0x3809
leaq -0x1af30(%rbp), %rdi
movslq -0x18(%rbp), %rax
addq %rax, %rdi
leaq -0x2890(%rbp), %rsi
callq 0x31b0
callq 0x9510
movsd %xmm0, -0x1b068(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b15c(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b15c(%rbp), %eax
cmpl %ecx, %eax
jge 0x388b
leaq -0x1af30(%rbp), %rdi
leaq -0x2890(%rbp), %rsi
callq 0x3080
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x3837
callq 0x9510
subsd -0x1b068(%rbp), %xmm0
movsd %xmm0, -0x1b068(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x9510
movsd %xmm0, -0x1b070(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b160(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b160(%rbp), %eax
cmpl %ecx, %eax
jge 0x3910
leaq -0x1af30(%rbp), %rdi
leaq -0x2890(%rbp), %rsi
callq 0x9de0
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x38bc
callq 0x9510
subsd -0x1b070(%rbp), %xmm0
movsd %xmm0, -0x1b070(%rbp)
callq 0x9510
movsd %xmm0, -0x1b078(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b164(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b164(%rbp), %eax
cmpl %ecx, %eax
jge 0x398d
leaq -0x1af30(%rbp), %rdi
leaq -0x2890(%rbp), %rsi
callq 0x40d0
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x3939
callq 0x9510
subsd -0x1b078(%rbp), %xmm0
movsd %xmm0, -0x1b078(%rbp)
callq 0x9510
movsd %xmm0, -0x1b080(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b168(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b168(%rbp), %eax
cmpl %ecx, %eax
jge 0x3a0a
leaq -0x1af30(%rbp), %rdi
leaq -0x2890(%rbp), %rsi
callq 0x42f0
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x39b6
callq 0x9510
subsd -0x1b080(%rbp), %xmm0
movsd %xmm0, -0x1b080(%rbp)
callq 0x9510
movsd %xmm0, -0x1b088(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b16c(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b16c(%rbp), %eax
cmpl %ecx, %eax
jge 0x3a90
leaq -0x1af30(%rbp), %rdi
movl -0x18(%rbp), %esi
addl -0x1c(%rbp), %esi
leaq -0x2890(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x4400
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x3a33
callq 0x9510
subsd -0x1b088(%rbp), %xmm0
movsd %xmm0, -0x1b088(%rbp)
cmpl $0x80, -0x1c(%rbp)
jle 0x3ab9
xorps %xmm0, %xmm0
movsd %xmm0, -0x1b088(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3ae8
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x3ae8
movq 0xc507(%rip), %rax      # 0xffd8
movq (%rax), %rdi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq 0x870a(%rip), %rsi      # 0xc1eb
movb $0x0, %al
callq 0x32c0
callq 0x9510
movsd %xmm0, -0x1b090(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b170(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b170(%rbp), %eax
cmpl %ecx, %eax
jge 0x3b59
leaq -0x1af30(%rbp), %rdi
movl -0x18(%rbp), %esi
addl -0x1c(%rbp), %esi
leaq -0x2890(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x49d0
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x3afc
callq 0x9510
subsd -0x1b090(%rbp), %xmm0
movsd %xmm0, -0x1b090(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3b9d
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x3b9d
movq 0xc452(%rip), %rax      # 0xffd8
movq (%rax), %rdi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq 0x866b(%rip), %rsi      # 0xc201
movb $0x0, %al
callq 0x32c0
callq 0x9510
movsd %xmm0, -0x1b098(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b174(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b174(%rbp), %eax
cmpl %ecx, %eax
jge 0x3c0e
leaq -0x1af30(%rbp), %rdi
movl -0x18(%rbp), %esi
addl -0x1c(%rbp), %esi
leaq -0x2890(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x50c0
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x3bb1
callq 0x9510
subsd -0x1b098(%rbp), %xmm0
movsd %xmm0, -0x1b098(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3c52
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x3c52
movq 0xc39d(%rip), %rax      # 0xffd8
movq (%rax), %rdi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq 0x85cf(%rip), %rsi      # 0xc21a
movb $0x0, %al
callq 0x32c0
callq 0x9510
movsd %xmm0, -0x1b0a0(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b178(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b178(%rbp), %eax
cmpl %ecx, %eax
jge 0x3cc3
leaq -0x1af30(%rbp), %rdi
movl -0x18(%rbp), %esi
addl -0x1c(%rbp), %esi
leaq -0x2890(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x5a90
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x3c66
callq 0x9510
subsd -0x1b0a0(%rbp), %xmm0
movsd %xmm0, -0x1b0a0(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3d07
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x3d07
movq 0xc2e8(%rip), %rax      # 0xffd8
movq (%rax), %rdi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq 0x8533(%rip), %rsi      # 0xc233
movb $0x0, %al
callq 0x32c0
callq 0x9510
movsd %xmm0, -0x1b0a8(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1b17c(%rbp)
movl $0x640000, %eax         # imm = 0x640000
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x1b17c(%rbp), %eax
cmpl %ecx, %eax
jge 0x3d78
leaq -0x1af30(%rbp), %rdi
movl -0x18(%rbp), %esi
addl -0x1c(%rbp), %esi
leaq -0x2890(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x6310
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movsbl -0x1af2f(%rbp), %eax
xorl $0x1, %eax
movb %al, -0x1af2f(%rbp)
jmp 0x3d1b
callq 0x9510
subsd -0x1b0a8(%rbp), %xmm0
movsd %xmm0, -0x1b0a8(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3dbc
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x3dbc
movq 0xc233(%rip), %rax      # 0xffd8
movq (%rax), %rdi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq 0x8497(%rip), %rsi      # 0xc24c
movb $0x0, %al
callq 0x32c0
leaq -0x1b068(%rbp), %rax
movq %rax, -0x1b100(%rbp)
leaq -0x1b070(%rbp), %rax
movq %rax, -0x1b0f8(%rbp)
leaq -0x1b078(%rbp), %rax
movq %rax, -0x1b0f0(%rbp)
leaq -0x1b080(%rbp), %rax
movq %rax, -0x1b0e8(%rbp)
leaq -0x1b088(%rbp), %rax
movq %rax, -0x1b0e0(%rbp)
leaq -0x1b090(%rbp), %rax
movq %rax, -0x1b0d8(%rbp)
leaq -0x1b098(%rbp), %rax
movq %rax, -0x1b0d0(%rbp)
leaq -0x1b0a0(%rbp), %rax
movq %rax, -0x1b0c8(%rbp)
leaq -0x1b0a8(%rbp), %rax
movq %rax, -0x1b0c0(%rbp)
movq $0x0, -0x1b0b8(%rbp)
leaq -0x1b150(%rbp), %rdi
leaq 0xbf1d(%rip), %rsi      # 0xfd70
movl $0x50, %edx
callq 0x3160
movl $0x0, -0x1b154(%rbp)
movl $0x1, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq $0x0, -0x1b100(%rbp,%rax,8)
je 0x3ed5
movslq -0x2c(%rbp), %rax
movq -0x1b100(%rbp,%rax,8), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3e9a
jp 0x3e9a
jmp 0x3ec8
movslq -0x1b154(%rbp), %rax
movq -0x1b100(%rbp,%rax,8), %rax
movsd (%rax), %xmm0
movslq -0x2c(%rbp), %rax
movq -0x1b100(%rbp,%rax,8), %rax
ucomisd (%rax), %xmm0
jbe 0x3ec8
movl -0x2c(%rbp), %eax
movl %eax, -0x1b154(%rbp)
jmp 0x3eca
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3e6e
movl -0x20(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movsd 0x8122(%rip), %xmm0     # 0xc008
mulsd -0x1b070(%rbp), %xmm0
divsd -0x1b068(%rbp), %xmm0
movsd 0x810a(%rip), %xmm1     # 0xc008
mulsd -0x1b078(%rbp), %xmm1
divsd -0x1b068(%rbp), %xmm1
movsd 0x80f2(%rip), %xmm2     # 0xc008
mulsd -0x1b080(%rbp), %xmm2
divsd -0x1b068(%rbp), %xmm2
movsd 0x80da(%rip), %xmm3     # 0xc008
mulsd -0x1b088(%rbp), %xmm3
divsd -0x1b068(%rbp), %xmm3
movsd 0x80c2(%rip), %xmm4     # 0xc008
mulsd -0x1b090(%rbp), %xmm4
divsd -0x1b068(%rbp), %xmm4
movsd 0x80aa(%rip), %xmm5     # 0xc008
mulsd -0x1b098(%rbp), %xmm5
divsd -0x1b068(%rbp), %xmm5
movsd 0x8092(%rip), %xmm6     # 0xc008
mulsd -0x1b0a0(%rbp), %xmm6
divsd -0x1b068(%rbp), %xmm6
movsd 0x807a(%rip), %xmm7     # 0xc008
mulsd -0x1b0a8(%rbp), %xmm7
divsd -0x1b068(%rbp), %xmm7
movslq -0x1b154(%rbp), %rax
movq -0x1b100(%rbp,%rax,8), %rax
movsd 0x8052(%rip), %xmm8     # 0xc008
mulsd (%rax), %xmm8
divsd -0x1b068(%rbp), %xmm8
movslq -0x1b154(%rbp), %rax
movq -0x1b150(%rbp,%rax,8), %r8
leaq 0x82b8(%rip), %rdi      # 0xc292
movsd %xmm8, (%rsp)
movb $0x8, %al
callq 0x3050
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq $0x0, -0x1b100(%rbp,%rax,8)
je 0x4084
movl -0x2c(%rbp), %eax
cmpl -0x1b154(%rbp), %eax
je 0x4074
movslq -0x2c(%rbp), %rax
movq -0x1b100(%rbp,%rax,8), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4029
jp 0x4029
jmp 0x4074
movslq -0x2c(%rbp), %rax
movq -0x1b100(%rbp,%rax,8), %rax
movsd (%rax), %xmm1
movslq -0x1b154(%rbp), %rax
movq -0x1b100(%rbp,%rax,8), %rax
movsd 0x7fc0(%rip), %xmm0     # 0xc010
mulsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4074
movslq -0x2c(%rbp), %rax
movq -0x1b150(%rbp,%rax,8), %rsi
leaq 0x826e(%rip), %rdi      # 0xc2db
movb $0x0, %al
callq 0x3050
jmp 0x4076
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3fee
movl $0xa, %edi
callq 0x3290
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x364c
jmp 0x409e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x362e
jmp 0x40ae
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x360a
xorl %eax, %eax
addq $0x1b190, %rsp          # imm = 0x1B190
popq %rbp
retq
nopw (%rax,%rax)