// File: /workspace/github_c_makefile_star2_O1/skeeto[P]hash-prospector/hp16.c
// Function: main
int
main(int argc, char **argv)
{
    char *ptr;
    int n = 0;
    int exclude = 0;
    enum {
        MODE_HASH, MODE_SMART, MODE_XORMUL, MODE_SBOX, MODE_AXS
    } mode = MODE_HASH;
    unsigned long tmp;
    struct hf_op ops[1+2*OPS_MAX] = {{HF16_SBOX, 0}};

    int option;
    while ((option = xgetopt(argc, argv, "AHhImn:rSX")) != -1) {
        switch (option) {
        case 'A':
            mode = MODE_AXS;
            break;
        case 'H':
            mode = MODE_HASH;
            break;
        case 'h':
            usage(stdout);
            return 0;
        case 'I':
            mode = MODE_SMART;
            break;
        case 'm':
            exclude |= 1<<HF16_MUL;
            break;
        case 'n':
            tmp = strtoul(xoptarg, &ptr, 10);
            if (!tmp || *ptr || tmp > OPS_MAX) {
                fprintf(stderr, "fatal: invalid n, %s\n", xoptarg);
                usage(stderr);
                return 1;
            }
            n = tmp;
            break;
        case 'r':
            exclude |= 1<<HF16_ROT;
            break;
        case 'S':
            mode = MODE_SBOX;
            break;
        case 'X':
            mode = MODE_XORMUL;
            break;
        case '?':
            usage(stderr);
            return 1;
        }
    }

    switch (mode) {
    case MODE_HASH:
    case MODE_SMART:  n = n ? n : 7; break;
    case MODE_XORMUL: n = n ? 1 + 2*n : 5; break;
    case MODE_SBOX:   sbox_init(); n = 1; break;
    case MODE_AXS:    break;
    }

    double best = 1;
    unsigned long long s[1] = {hash64(time(0))};

    if (mode == MODE_AXS) {
        #pragma omp parallel for
        for (long i = 0; i < AXS_COUNT; i++) {
            struct hf_op hf[AXS_SIZE];
            hf_genaxs(hf, i);
            double r = score(hf, AXS_SIZE);
            #pragma omp critical
            if (r < best) {
                best = r;
                printf("// bias = %.17g\n", r);
                hf_print(hf, AXS_SIZE, stdout);
                fputc('\n', stdout);
                fflush(stdout);
            }
        }
        return 0;
    }

    for (;;) {
        *s += hash64(time(0));
        switch (mode) {
        case MODE_HASH:
            do {
                hf_genfunc(ops, n, s);
            } while (match(ops, n, exclude));
            break;
        case MODE_SMART:
            do {
                hf_gensmart(ops, n, s);
            } while (match(ops, n, exclude));
            break;
        case MODE_XORMUL:
            hf_genxormul(ops, (n-1)/2, s);
            break;
        case MODE_SBOX:
            sbox_shuffle(s);
            break;
        case MODE_AXS:
            abort();
        }
        *s -= hash64(clock());

        double r = score(ops, n);
        if (r < best) {
            switch (mode) {
            case MODE_HASH:
            case MODE_SMART:
            case MODE_XORMUL:
                printf("// bias = %.17g\n", r);
                hf_print(ops, n, stdout);
                fputc('\n', stdout);
                break;
            case MODE_SBOX:
                fprintf(stdout, "// bias = %.17g\n", r);
                sbox_print(stdout);
                fputc('\n', stdout);
                fprintf(stderr, "// bias = %.17g\n", r);
                fflush(stderr);
                break;
            case MODE_AXS:
                abort();
            }
            fflush(stdout);
            best = r;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %r15
leaq 0xb0(%rsp), %rbx
movl $0x208, %edx            # imm = 0x208
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1070
movl $0x9, (%rbx)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq $0x0, 0x10(%rsp)
cmpl $0x0, 0x3db1(%rip)      # 0x50a4
jne 0x1306
movl $0x1, %eax
movl %eax, 0x3da4(%rip)      # 0x50a4
movl %eax, 0x3d9a(%rip)      # 0x50a0
movslq 0x3d97(%rip), %rbx      # 0x50a4
movq (%r15,%rbx,8), %rbp
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rbp, %rbp
je 0x13db
movq %rbp, %rdi
leaq 0x1ddc(%rip), %rsi      # 0x3106
callq 0x10a0
testl %eax, %eax
je 0x13a5
cmpb $0x2d, (%rbp)
jne 0x13db
callq 0x1110
movq (%rax), %rax
movsbq 0x1(%rbp), %rcx
testb $0x8, (%rax,%rcx,2)
je 0x13db
movl %r12d, 0x18(%rsp)
movl %r13d, %r12d
movslq 0x3d3d(%rip), %r13      # 0x50a0
movsbl (%rbp,%r13), %r14d
movl $0xb, %edx
leaq 0x1d5f(%rip), %rdi      # 0x30d4
movl %r14d, %esi
callq 0x1090
testq %rax, %rax
je 0x1510
cmpb $0x3a, 0x1(%rax)
jne 0x13af
addq %r13, %rbp
cmpb $0x0, 0x1(%rbp)
je 0x14e4
incq %rbp
movq %rbp, 0x3d1d(%rip)      # 0x50c0
jmp 0x13c1
incl %ebx
movl %ebx, 0x3cf7(%rip)      # 0x50a4
jmp 0x13db
leaq 0x1(%r13), %rax
movl %eax, 0x3ce7(%rip)      # 0x50a0
cmpb $0x0, 0x1(%rbp,%r13)
jne 0x13d3
incl %ebx
movl %ebx, 0x3cdb(%rip)      # 0x50a4
movl $0x1, 0x3ccd(%rip)      # 0x50a0
movl %r12d, %r13d
movl 0x18(%rsp), %r12d
cmpl $0x57, %r14d
jg 0x13fc
cmpl $0x47, %r14d
jg 0x141b
cmpl $0x41, %r14d
jne 0x14bc
movl $0x4, %r12d
jmp 0x12ec
cmpl $0x6d, %r14d
jg 0x1444
cmpl $0x58, %r14d
je 0x145d
cmpl $0x6d, %r14d
jne 0x14d5
orl $0x2, %r13d
jmp 0x12ec
cmpl $0x48, %r14d
je 0x14a9
cmpl $0x49, %r14d
je 0x14b1
cmpl $0x53, %r14d
jne 0x12ec
movl $0x3, %r12d
jmp 0x12ec
cmpl $0x6e, %r14d
je 0x1468
cmpl $0x72, %r14d
jne 0x12ec
orl $0x8, %r13d
jmp 0x12ec
movl $0x2, %r12d
jmp 0x12ec
movq 0x3c51(%rip), %rdi      # 0x50c0
leaq 0x78(%rsp), %rsi
movl $0xa, %edx
callq 0x10e0
testq %rax, %rax
je 0x1882
cmpq $0x20, %rax
ja 0x1882
movq 0x78(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x1882
movq %rax, 0x10(%rsp)
jmp 0x12ec
xorl %r12d, %r12d
jmp 0x12ec
movl $0x1, %r12d
jmp 0x12ec
cmpl $-0x1, %r14d
je 0x1562
cmpl $0x3f, %r14d
jne 0x12ec
jmp 0x1598
cmpl $0x68, %r14d
jne 0x12ec
jmp 0x15b1
movq 0x8(%r15,%rbx,8), %rax
testq %rax, %rax
movl %r12d, %r13d
je 0x1539
movq %rax, 0x3bc8(%rip)      # 0x50c0
addl $0x2, %ebx
movl %ebx, 0x3ba3(%rip)      # 0x50a4
movl $0x1, 0x3b95(%rip)      # 0x50a0
jmp 0x13d6
movq 0x3ae1(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq (%r15), %rdx
leaq 0x1be5(%rip), %rsi      # 0x3109
movl %r14d, %ecx
xorl %eax, %eax
callq 0x10b0
movl $0x3f, %r14d
jmp 0x13d3
movq 0x3ab8(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq (%r15), %rdx
leaq 0x1bd4(%rip), %rsi      # 0x3121
movl %r14d, %ecx
xorl %eax, %eax
callq 0x10b0
movl $0x3f, %r14d
jmp 0x13d6
cmpl $0x2, %r12d
jb 0x15c5
movq 0x10(%rsp), %rbx
je 0x15d8
cmpl $0x3, %r12d
jne 0x15e6
leaq 0x3b54(%rip), %rax      # 0x50d0
xorl %ecx, %ecx
movw %cx, (%rax)
incq %rcx
addq $0x2, %rax
cmpq $0x10000, %rcx          # imm = 0x10000
jne 0x157e
movl $0x1, %ebx
jmp 0x15e6
movq 0x3a59(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
callq 0x1dfe
movl $0x1, %eax
jmp 0x1870
movq 0x3a20(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
callq 0x1dfe
jmp 0x186e
movq 0x10(%rsp), %rcx
testl %ecx, %ecx
movl $0x7, %eax
cmovnel %ecx, %eax
movl %eax, %ebx
jmp 0x15e6
testl %ebx, %ebx
leal 0x1(%rbx,%rbx), %eax
movl $0x5, %ebx
cmovnel %eax, %ebx
movabsq $0x25b751109e05be63, %r14 # imm = 0x25B751109E05BE63
movabsq $0x2330e1453ed4b9b9, %rbp # imm = 0x2330E1453ED4B9B9
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x10c0
movq %rax, %rcx
shrq $0x20, %rcx
xorq %rax, %rcx
imulq %r14, %rcx
movq %rcx, %rax
shrq $0x20, %rax
xorq %rcx, %rax
imulq %rbp, %rax
movq %rax, %rcx
shrq $0x20, %rcx
xorq %rax, %rcx
movq %rcx, 0x20(%rsp)
cmpl $0x4, %r12d
jne 0x188c
movsd 0x19c7(%rip), %xmm0     # 0x3008
movsd %xmm0, 0x18(%rsp)
movabsq $0x1111111111111112, %r14 # imm = 0x1111111111111112
movabsq $-0x5a4c91e604a99075, %rbp # imm = 0xA5B36E19FB566F8B
movabsq $-0x4f409ba004f9229f, %r12 # imm = 0xB0BF645FFB06DD61
leaq 0x80(%rsp), %rbx
movq 0x3964(%rip), %r13      # 0x4fd8
movq %r15, %rax
movabsq $-0x43781d777cc57a43, %rcx # imm = 0xBC87E288833A85BD
mulq %rcx
movq %rdx, %rcx
movq %rdx, %r8
shrq $0x1a, %r8
movq %r15, %rax
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
mulq %rdx
movq %rdx, %rsi
shrq $0x3, %rsi
leal (%rsi,%rsi,4), %eax
leal (%rax,%rax,2), %eax
movl %r15d, %edi
subl %eax, %edi
incl %edi
movq %rsi, %rax
movabsq $0x2222222222222223, %rdx # imm = 0x2222222222222223
mulq %rdx
movl %edi, 0x40(%rsp)
shrq %rdx
leal (%rdx,%rdx,4), %eax
leal (%rax,%rax,2), %eax
negl %eax
addl %esi, %eax
incl %eax
movl %eax, 0x44(%rsp)
movq %r15, %rax
movabsq $0x23456789abcdf013, %rdx # imm = 0x23456789ABCDF013
mulq %rdx
movq %r15, %rsi
subq %rdx, %rsi
shrq %rsi
addq %rdx, %rsi
shrq $0x7, %rsi
movq %rsi, %rax
mulq %r14
leal (%rdx,%rdx,4), %eax
leal (%rax,%rax,2), %eax
subl %eax, %esi
incl %esi
movq %r15, %rax
movabsq $0x36b06e70b7421125, %rdx # imm = 0x36B06E70B7421125
mulq %rdx
movl %esi, 0x48(%rsp)
movq %r15, %rsi
subq %rdx, %rsi
shrq %rsi
addq %rdx, %rsi
shrq $0xb, %rsi
movq %rsi, %rax
mulq %r14
leal (%rdx,%rdx,4), %eax
leal (%rax,%rax,2), %eax
subl %eax, %esi
incl %esi
movl %esi, 0x4c(%rsp)
movq %r15, %rax
mulq %rbp
movq %rdx, %rsi
shrq $0xf, %rsi
movq %rsi, %rax
mulq %r14
leal (%rdx,%rdx,4), %eax
leal (%rax,%rax,2), %eax
subl %eax, %esi
incl %esi
movq %r15, %rax
mulq %r12
movq %rdx, %rdi
movl %esi, 0x50(%rsp)
shrq $0x13, %rdi
movq %rdi, %rax
mulq %r14
leal (%rdx,%rdx,4), %eax
leal (%rax,%rax,2), %eax
subl %eax, %edi
incl %edi
movl %edi, 0x54(%rsp)
movl %ecx, %eax
shrl $0x17, %eax
andl $0x1, %eax
movl %eax, 0x5c(%rsp)
movl %ecx, %eax
shrl $0x18, %eax
andl $0x1, %eax
movl %eax, 0x60(%rsp)
shrl $0x19, %ecx
andl $0x1, %ecx
movl %ecx, 0x64(%rsp)
movl $0x1, %eax
cmpl $0x1, 0x5a(%rsp,%rax,2)
movl $0x0, %ecx
adcl $0x7, %ecx
movl %ecx, 0x80(%rsp,%r8,8)
movl 0x3c(%rsp,%rax,4), %ecx
movl 0x40(%rsp,%rax,4), %edx
movl %ecx, 0x84(%rsp,%r8,8)
movq %r8, %rcx
xorq $0x1, %rcx
movl $0x6, 0x80(%rsp,%rcx,8)
movl %edx, 0x84(%rsp,%rcx,8)
addq $0x2, %r8
leaq 0x2(%rax), %rcx
decq %rax
cmpq $0x4, %rax
movq %rcx, %rax
jb 0x17aa
movq %rbx, %rdi
movl $0x6, %esi
callq 0x1efd
movapd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x185e
leaq 0x18d5(%rip), %rdi      # 0x30f5
movapd %xmm1, %xmm0
movb $0x1, %al
movsd %xmm1, 0x18(%rsp)
callq 0x1050
movq (%r13), %rdx
leaq 0x80(%rsp), %rdi
movl $0x6, %esi
callq 0x200c
movq (%r13), %rsi
movl $0xa, %edi
callq 0x1080
movq (%r13), %rdi
callq 0x10d0
incq %r15
cmpq $0xadcea10, %r15        # imm = 0xADCEA10
jne 0x1674
xorl %eax, %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1130
jmp 0x15a7
movl %r13d, 0x2c(%rsp)
leal -0x1(%rbx), %eax
shrl $0x1f, %eax
addl %ebx, %eax
decl %eax
sarl %eax
movq %rax, 0x68(%rsp)
testl %ebx, %ebx
setg %cl
movq %rbx, 0x10(%rsp)
movl %ebx, %eax
movq %rax, 0x38(%rsp)
movsd 0x174d(%rip), %xmm0     # 0x3008
movsd %xmm0, 0x30(%rsp)
movl %r12d, 0x18(%rsp)
movl %r12d, %eax
movl %ecx, %r12d
leaq 0x174d(%rip), %rcx      # 0x3020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq %rax, 0x70(%rsp)
movq %rbp, %r15
movabsq $0x1c71c71c71c71c72, %rbp # imm = 0x1C71C71C71C71C72
movq %r14, %rbx
leaq 0x20(%rsp), %r14
leaq 0x1739(%rip), %r13      # 0x3034
movb %r12b, 0xf(%rsp)
xorl %edi, %edi
callq 0x10c0
movq %rax, %rcx
shrq $0x20, %rcx
xorq %rax, %rcx
imulq %rbx, %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
xorq %rcx, %rdx
imulq %r15, %rdx
movq %rdx, %rax
shrq $0x20, %rax
xorq %rdx, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
jmpq *0x70(%rsp)
movq 0x38(%rsp), %r15
movl %r12d, %eax
cmpl $0x0, 0x10(%rsp)
jle 0x1a12
xorl %ebx, %ebx
movq 0x20(%rsp), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movq %rax, %rsi
movabsq $0x7c3c3267d015ceb5, %rdx # imm = 0x7C3C3267D015CEB5
imulq %rdx, %rsi
incq %rsi
shrq $0x30, %rax
xorl %eax, %ecx
imull $0x60857ba9, %ecx, %edi # imm = 0x60857BA9
movq %rdi, %rax
mulq %rbp
movq %rsi, 0x20(%rsp)
leal (%rdx,%rdx,8), %eax
subl %eax, %edi
movq %r14, %rsi
callq 0x22b0
movq %rax, 0xb0(%rsp,%rbx,8)
testq %rbx, %rbx
je 0x19c5
movl 0xa8(%rsp,%rbx,8), %eax
cmpl $0x5, %eax
jae 0x19b8
cmpl 0xb0(%rsp,%rbx,8), %eax
je 0x1950
jmp 0x19c5
cmpl $0x9, %eax
je 0x19ad
addl $-0x5, %eax
cmpl $0x4, %eax
jae 0x1950
incq %rbx
cmpq %r15, %rbx
jne 0x1950
movl %r12d, %eax
cmpl $0x0, 0x10(%rsp)
jle 0x1a12
movl 0xb0(%rsp), %eax
movl 0x2c(%rsp), %ecx
btl %eax, %ecx
jb 0x1940
movl $0x1, %ecx
movq %rcx, %rax
cmpq %rcx, %r15
je 0x1a0c
movl 0xb0(%rsp,%rax,8), %edx
leaq 0x1(%rax), %rcx
movl 0x2c(%rsp), %esi
btl %edx, %esi
jae 0x19f0
cmpq %r15, %rax
setb %al
testb %al, %al
jne 0x1940
jmp 0x1d01
movabsq $0x7c3c3267d015ceb5, %rbx # imm = 0x7C3C3267D015CEB5
movl %r12d, %eax
cmpl $0x0, 0x10(%rsp)
jle 0x1b31
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x20(%rsp), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movq %rax, %rsi
imulq %rbx, %rsi
incq %rsi
shrq $0x30, %rax
xorl %eax, %ecx
imull $0x60857ba9, %ecx, %edi # imm = 0x60857BA9
movq %rdi, %rax
mulq %rbp
movq %rsi, 0x20(%rsp)
leal (%rdx,%rdx,8), %eax
subl %eax, %edi
movq %r14, %rsi
callq 0x22b0
cmpl $0x9, %eax
ja 0x1df1
movl %eax, %ecx
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
xorl %ecx, %ecx
jmp 0x1a95
movl $0x1, %ecx
testl %r15d, %r15d
je 0x1a9f
cmpl %r15d, %ecx
je 0x1a3d
movq %rax, 0xb0(%rsp,%r12,8)
testl %ecx, %ecx
cmovnel %ecx, %r15d
incq %r12
cmpq 0x38(%rsp), %r12
jne 0x1a3d
jmp 0x1ae2
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x1a95
movq %rax, %rcx
shrq $0x23, %rcx
movl $0x1, %ecx
je 0x1a95
movq %rax, %rcx
shrq $0x20, %rcx
cmpl $0x9, %ecx
movl $0x0, %ecx
adcl $-0x1, %ecx
jmp 0x1a95
movb 0xf(%rsp), %r12b
movl %r12d, %eax
cmpl $0x0, 0x10(%rsp)
movq 0x38(%rsp), %rdi
jle 0x1b31
movl 0xb0(%rsp), %eax
movl 0x2c(%rsp), %ecx
btl %eax, %ecx
jb 0x1a29
movl $0x1, %ecx
movq %rcx, %rax
cmpq %rcx, %rdi
je 0x1b2b
movl 0xb0(%rsp,%rax,8), %edx
leaq 0x1(%rax), %rcx
movl 0x2c(%rsp), %esi
btl %edx, %esi
jae 0x1b0f
cmpq %rdi, %rax
setb %al
testb %al, %al
jne 0x1a29
jmp 0x1d01
movl $0xffff, %ecx           # imm = 0xFFFF
movabsq $0x7c3c3267d015ceb5, %r10 # imm = 0x7C3C3267D015CEB5
leaq 0x357c(%rip), %r11      # 0x50d0
leaq 0x1(%rcx), %rsi
movq %rax, %rdx
shrq $0x20, %rdx
movq %rax, %rdi
imulq %r10, %rdi
incq %rdi
shrq $0x30, %rax
xorl %eax, %edx
imull $0x60857ba9, %edx, %r8d # imm = 0x60857BA9
imulq %rsi, %r8
movl %r8d, %r9d
cmpq %rcx, %r9
ja 0x1bc2
movq %rcx, %rax
notq %rax
xorl %edx, %edx
divq %rsi
cmpq %rdx, %r9
jae 0x1bc2
movq %rdi, %rax
movq %rdi, %r8
shrq $0x20, %r8
imulq %r10, %rax
incq %rax
shrq $0x30, %rdi
xorl %edi, %r8d
imull $0x60857ba9, %r8d, %r8d # imm = 0x60857BA9
imulq %rsi, %r8
movl %r8d, %r9d
movq %rax, %rdi
cmpq %rdx, %r9
jb 0x1b95
jmp 0x1bc5
movq %rdi, %rax
movzwl (%r11,%rcx,2), %edx
shrq $0x20, %r8
movzwl (%r11,%r8,2), %esi
movw %si, (%r11,%rcx,2)
movw %dx, (%r11,%r8,2)
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rcx
movq %rdx, %rcx
ja 0x1b54
movq %rax, 0x20(%rsp)
jmp 0x1d01
movl $0x6, 0xb0(%rsp)
movq %rax, %rdx
shrq $0x20, %rdx
movq %rax, %rcx
movabsq $0x7c3c3267d015ceb5, %r8 # imm = 0x7C3C3267D015CEB5
imulq %r8, %rcx
incq %rcx
movq %rcx, 0x20(%rsp)
shrq $0x30, %rax
xorl %eax, %edx
imull $0x60857ba9, %edx, %edx # imm = 0x60857BA9
movl $0x1, %eax
cmpl $0x40000, %edx          # imm = 0x40000
jb 0x1c4a
shrl $0x12, %edx
leal -0x1(%rdx), %esi
incl %eax
andl %edx, %esi
movl %esi, %edx
jne 0x1c3f
movl %eax, 0xb4(%rsp)
cmpl $0x3, 0x10(%rsp)
jl 0x1d01
xorl %eax, %eax
movq 0x68(%rsp), %r9
movq %rax, %rsi
shlq $0x4, %rsi
movl $0x1, 0xb8(%rsp,%rsi)
movq %rcx, %rdi
shrq $0x20, %rdi
movq %rcx, %rdx
imulq %r8, %rdx
incq %rdx
shrq $0x30, %rcx
xorl %ecx, %edi
imull $0x60857ba9, %edi, %ecx # imm = 0x60857BA9
shrl $0x10, %ecx
orl $0x1, %ecx
movl %ecx, 0xbc(%rsp,%rsi)
movl $0x6, 0xc0(%rsp,%rsi)
movq %rdx, %rcx
shrq $0x20, %rcx
movq %rdx, %rsi
shrq $0x30, %rsi
xorl %esi, %ecx
imull $0x60857ba9, %ecx, %ecx # imm = 0x60857BA9
movl $0x1, %esi
cmpl $0x40000, %ecx          # imm = 0x40000
jb 0x1cdb
shrl $0x12, %ecx
leal -0x1(%rcx), %edi
incl %esi
andl %ecx, %edi
movl %edi, %ecx
jne 0x1cd0
leaq (%rax,%rax), %rdi
imulq %r8, %rdx
movq %rdx, %rcx
incq %rcx
movl %esi, 0xc4(%rsp,%rdi,8)
incq %rax
cmpq %r9, %rax
jne 0x1c63
movq %rcx, 0x20(%rsp)
callq 0x1040
movq %rax, %rcx
shrq $0x20, %rcx
xorq %rax, %rcx
movabsq $0x25b751109e05be63, %rbx # imm = 0x25B751109E05BE63
imulq %rbx, %rcx
movq %rcx, %rax
shrq $0x20, %rax
xorq %rcx, %rax
movabsq $0x2330e1453ed4b9b9, %r15 # imm = 0x2330E1453ED4B9B9
imulq %r15, %rax
movq %rax, %rcx
shrq $0x20, %rcx
xorq %rax, %rcx
subq %rcx, 0x20(%rsp)
leaq 0xb0(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1efd
movapd %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1900
movsd %xmm1, 0x30(%rsp)
cmpl $0x3, 0x18(%rsp)
jae 0x1de2
leaq 0x1376(%rip), %rdi      # 0x30f5
movsd 0x30(%rsp), %xmm0
movb $0x1, %al
callq 0x1050
movq 0x3245(%rip), %rbx      # 0x4fd8
movq (%rbx), %rdx
leaq 0xb0(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x200c
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x1080
movq 0x321c(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
callq 0x10d0
movabsq $0x25b751109e05be63, %rbx # imm = 0x25B751109E05BE63
movabsq $0x2330e1453ed4b9b9, %r15 # imm = 0x2330E1453ED4B9B9
movb 0xf(%rsp), %r12b
jmp 0x1900
jne 0x1df9
movsd 0x30(%rsp), %xmm0
callq 0x1159
jmp 0x1db5
movq %rax, 0xb0(%rsp,%r12,8)
callq 0x1030