// File: /workspace/github_c_makefile_star2_O3/skeeto[P]hash-prospector/prospector.c
// Function: main
int
main(int argc, char **argv)
{
    int nops = 0;
    int min = 3;
    int max = 6;
    int flags = 0;
    int use_exact = 0;
    double best = 100.0;
    char *dynamic = 0;
    char *template = 0;
    struct hf_op ops[32];
    void *buf = execbuf_alloc();
    uint64_t rng[2] = {0x2a2bc037b59ff989, 0x6d7db86fa2f632ca};

    enum {MODE_SEARCH, MODE_EVAL, MODE_LIST} mode = MODE_SEARCH;

    int option;
    while ((option = getopt(argc, argv, "48EehLl:q:r:st:p:")) != -1) {
        switch (option) {
            case '4':
                flags &= ~F_U64;
                break;
            case '8':
                flags |= F_U64;
                break;
            case 'E':
                mode = MODE_EVAL;
                break;
            case 'e':
                use_exact = 1;
                break;
            case 'h': usage(stdout);
                exit(EXIT_SUCCESS);
                break;
            case 'L':
                mode = MODE_LIST;
                break;
            case 'l':
                dynamic = optarg;
                break;
            case 'p':
                template = optarg;
                break;
            case 'r':
                if (sscanf(optarg, "%d:%d", &min, &max) != 2 ||
                    min < 1 || max > countof(ops) || min > max) {
                    fprintf(stderr, "prospector: invalid range (-r): %s\n",
                            optarg);
                    exit(EXIT_FAILURE);
                }
                break;
            case 'q':
                score_quality = atoi(optarg);
                if (score_quality < 12 || score_quality > 30) {
                    fprintf(stderr, "prospector: invalid quality: %s\n",
                            optarg);
                    exit(EXIT_FAILURE);
                }
                break;
            case 'S':
                mode = MODE_SEARCH;
                break;
            case 's':
                flags |= F_TINY;
                break;
            case 't':
                best = strtod(optarg, 0);
                break;
            default:
                usage(stderr);
                exit(EXIT_FAILURE);
        }
    }

    /* Get a unique seed */
    FILE *urandom = fopen("/dev/urandom", "rb");
    if (urandom) {
        if (!fread(rng, sizeof(rng), 1, urandom)) {
            fputs("prospector: failed to read /dev/urandom\n", stderr);
            exit(EXIT_FAILURE);
        }
        fclose(urandom);
    }

    if (template) {
        nops = parse_template(ops, countof(ops), template, flags);
        if (!nops) {
            fprintf(stderr, "prospector: invalid template\n");
            exit(EXIT_FAILURE);
        }
    }

    if (mode == MODE_EVAL) {
        double bias;
        void *hashptr = 0;
        if (template) {
            hf_randfunc(ops, nops, rng);
            hf_compile(ops, nops, buf);
            execbuf_lock(buf);
            hashptr = buf;
        } else if (dynamic) {
            hashptr = load_function(dynamic);
        } else {
            fprintf(stderr, "prospector: must supply -p or -l\n");
            exit(EXIT_FAILURE);
        }

        uint64_t nhash;
        uint64_t beg = uepoch();
        if (flags & F_U64) {
            uint64_t ABI (*hash)(uint64_t) = hashptr;
            if (use_exact)
                fputs("warning: no exact bias for 64-bit\n", stderr);
            bias = estimate_bias64(hash, rng);
            nhash = (1L << score_quality) * 33;
        } else {
            uint32_t ABI (*hash)(uint32_t) = hashptr;
            if (use_exact) {
                bias = exact_bias32(hash);
                nhash = (1LL << 32) * 33;
            } else {
                bias = estimate_bias32(hash, rng);
                nhash = (1L << score_quality) * 65;
            }
        }
        uint64_t end = uepoch();
        printf("bias      = %.17g\n", bias);
        printf("speed     = %.3f nsec / hash\n", (end - beg) * 1000.0 / nhash);
        return 0;
    }

    if (mode == MODE_LIST) {
        void *hashptr = 0;
        if (template) {
            hf_randfunc(ops, nops, rng);
            hf_compile(ops, nops, buf);
            execbuf_lock(buf);
            hashptr = buf;
        } else if (dynamic) {
            hashptr = load_function(dynamic);
        } else {
            fprintf(stderr, "prospector: must supply -p or -l\n");
            exit(EXIT_FAILURE);
        }

        if (flags & F_U64) {
            uint64_t ABI (*hash)(uint64_t) = hashptr;
            uint64_t i = 0;
            do
                printf("%016llx %016llx\n",
                        (unsigned long long)i,
                        (unsigned long long)hash(i));
            while (++i);
        } else {
            uint32_t ABI (*hash)(uint32_t) = hashptr;
            uint32_t i = 0;
            do
                printf("%08lx %08lx\n",
                        (unsigned long)i,
                        (unsigned long)hash(i));
            while (++i);
        }
        return 0;
    }

    for (;;) {
        /* Generate */
        if (template) {
            hf_randfunc(ops, nops, rng);
        } else {
            nops = min + xoroshiro128plus(rng) % (max - min + 1);
            hf_genfunc(ops, nops, flags, rng);
        }

        /* Evaluate */
        double score;
        hf_compile(ops, nops, buf);
        execbuf_lock(buf);
        if (flags & F_U64) {
            uint64_t ABI (*hash)(uint64_t) = (void *)buf;
            score = estimate_bias64(hash, rng);
        } else {
            uint32_t ABI (*hash)(uint32_t) = (void *)buf;
            score = estimate_bias32(hash, rng);
        }
        execbuf_unlock(buf);

        /* Compare */
        if (score < best) {
            printf("// score = %.17g\n", score);
            hf_printfunc(ops, nops, stdout);
            fflush(stdout);
            best = score;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4378, %rsp           # imm = 0x4378
movq %rsi, %r15
movl %edi, %r12d
movl $0x3, 0x34(%rsp)
movl $0x6, 0x30(%rsp)
movl $0x1000, %esi           # imm = 0x1000
xorl %edi, %edi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x1080
movq %rax, 0x58(%rsp)
cmpq $-0x1, %rax
je 0x2013
movaps 0x1b98(%rip), %xmm0     # 0x3090
movaps %xmm0, 0x40(%rsp)
movsd 0x1b03(%rip), %xmm0     # 0x3008
movsd %xmm0, 0x20(%rsp)
leaq 0x1d5e(%rip), %r13      # 0x3270
movl $0x0, 0x10(%rsp)
xorl %ebx, %ebx
movq $0x0, 0x50(%rsp)
movl $0x0, 0x2c(%rsp)
xorl %ebp, %ebp
movl %r12d, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1170
cmpl $0x4b, %eax
jle 0x1564
leal -0x65(%rax), %ecx
cmpl $0xf, %ecx
ja 0x1593
leaq 0x1b4f(%rip), %rdx      # 0x30a0
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movl $0x1, 0x2c(%rsp)
jmp 0x152f
cmpl $0x37, %eax
jle 0x1580
cmpl $0x38, %eax
je 0x158e
movl $0x1, 0x10(%rsp)
cmpl $0x45, %eax
je 0x152f
jmp 0x1fd7
cmpl $0x34, %eax
jne 0x167d
andl $-0x2, %ebp
jmp 0x152f
orl $0x1, %ebp
jmp 0x152f
cmpl $0x4c, %eax
je 0x1670
cmpl $0x53, %eax
jne 0x1fd7
movl $0x0, 0x10(%rsp)
jmp 0x152f
movq 0x3a22(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1060
movsd %xmm0, 0x20(%rsp)
jmp 0x152f
movq 0x3a06(%rip), %rax      # 0x4fd8
movq (%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0x152f
movq 0x39f2(%rip), %rax      # 0x4fd8
movq (%rax), %r14
movq %r14, %rdi
callq 0x1190
movl %eax, 0x3b11(%rip)      # 0x5108
addl $-0x1f, %eax
cmpl $-0x14, %eax
ja 0x152f
jmp 0x1ff0
movq 0x39c9(%rip), %rax      # 0x4fd8
movq (%rax), %rbx
jmp 0x152f
movq 0x39ba(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
leaq 0x1c5a(%rip), %rsi      # 0x3282
leaq 0x34(%rsp), %rdx
leaq 0x30(%rsp), %rcx
xorl %eax, %eax
callq 0x1130
cmpl $0x2, %eax
jne 0x1ff8
movl 0x34(%rsp), %eax
testl %eax, %eax
jle 0x1ff8
movl 0x30(%rsp), %ecx
cmpl $0x20, %ecx
jg 0x1ff8
cmpl %ecx, %eax
jle 0x152f
jmp 0x1ff8
orl $0x2, %ebp
jmp 0x152f
movl $0x2, 0x10(%rsp)
jmp 0x152f
cmpl $-0x1, %eax
jne 0x1fd7
leaq 0x1c40(%rip), %rdi      # 0x32cd
leaq 0x1c46(%rip), %rsi      # 0x32da
callq 0x1150
testq %rax, %rax
movq 0x58(%rsp), %r15
je 0x16ce
movq %rax, %r14
leaq 0x40(%rsp), %rdi
movl $0x10, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x1050
testq %rax, %rax
je 0x2018
movq %r14, %rdi
callq 0x1070
testq %rbx, %rbx
movq %rbx, 0x38(%rsp)
je 0x180b
leaq 0x1fbd(%rip), %rsi      # 0x36a0
movq %rbx, %rdi
callq 0x1160
testq %rax, %rax
je 0x1fd2
movq %rax, %r14
movl %ebp, %eax
andl $0x1, %eax
negl %eax
andl $0xa, %eax
movl %eax, %eax
movq %rax, 0x60(%rsp)
xorl %r13d, %r13d
cmpq $0x20, %r13
je 0x1fd2
movq %r13, %r12
movq %r14, %rdi
leaq 0x1b5e(%rip), %rsi      # 0x3280
callq 0x10d0
leaq (%r14,%rax), %rcx
movq %rcx, 0x68(%rsp)
movb (%r14,%rax), %cl
movb %cl, 0xf(%rsp)
movb $0x0, (%r14,%rax)
leaq (%r13,%r13,2), %rax
leaq 0x70(%rsp,%rax,8), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x10(%rax)
leaq 0x1a78(%rip), %r13      # 0x31d2
xorl %ebx, %ebx
movq %r13, %rdi
movq %r14, %rsi
callq 0x10f0
testl %eax, %eax
je 0x177d
decq %rbx
addq $0x8, %r13
cmpq $-0x14, %rbx
jne 0x175c
jmp 0x1fd2
movq 0x60(%rsp), %rax
subq %rbx, %rax
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
cmpb $0x3a, 0xf(%rsp)
jne 0x17e1
movl $0x1, 0x10(%rcx)
cmpl $0x13, %eax
ja 0x1fd2
movq 0x68(%rsp), %rdi
incq %rdi
movl $0xf23c8, %ecx          # imm = 0xF23C8
btl %eax, %ecx
jae 0x17be
callq 0x1190
cltq
jmp 0x17d8
movl $0x1c07, %ecx           # imm = 0x1C07
btl %eax, %ecx
jae 0x1fd2
xorl %esi, %esi
movl $0x10, %edx
callq 0x10e0
movq 0x18(%rsp), %rcx
movq %rax, 0x8(%rcx)
movq %r12, %r13
incq %r13
xorl %edi, %edi
leaq 0x1eb0(%rip), %rsi      # 0x36a0
callq 0x1160
movq %rax, %r14
testq %rax, %rax
jne 0x170b
movq 0x38(%rsp), %rbx
movq %r13, %r14
jmp 0x180e
xorl %r14d, %r14d
movl 0x10(%rsp), %eax
cmpl $0x1, %eax
je 0x1876
cmpl $0x2, %eax
jne 0x18cc
testq %rbx, %rbx
je 0x1c8a
movq %r14, %r13
testl %r14d, %r14d
jle 0x1859
movl %r13d, %ebx
leaq 0x70(%rsp), %r14
leaq 0x40(%rsp), %r12
testb $0x1, 0x10(%r14)
jne 0x1850
movq %r14, %rdi
movq %r12, %rsi
callq 0x287a
addq $0x18, %r14
decq %rbx
jne 0x183e
leaq 0x70(%rsp), %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x218a
movq %r15, %rdi
callq 0x249e
jmp 0x1ca0
testq %rbx, %rbx
je 0x1d0b
movq %r14, %r13
testl %r14d, %r14d
jle 0x18af
movl %r13d, %ebx
leaq 0x70(%rsp), %r14
leaq 0x40(%rsp), %r12
testb $0x1, 0x10(%r14)
jne 0x18a6
movq %r14, %rdi
movq %r12, %rsi
callq 0x287a
addq $0x18, %r14
decq %rbx
jne 0x1894
leaq 0x70(%rsp), %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x218a
movq %r15, %rdi
callq 0x249e
jmp 0x1d21
leaq 0x40(%rsp), %r13
movl $0xfc3f, %r12d          # imm = 0xFC3F
testq %rbx, %rbx
je 0x191d
testl %r14d, %r14d
jle 0x19d2
movq %r14, %r15
movl %r14d, %ebx
leaq 0x70(%rsp), %r14
testb $0x1, 0x10(%r14)
jne 0x1902
movq %r14, %rdi
movq %r13, %rsi
callq 0x287a
addq $0x18, %r14
decq %rbx
jne 0x18f0
movq 0x38(%rsp), %rbx
movq %r15, %r14
movq 0x58(%rsp), %r15
jmp 0x19d2
movl 0x34(%rsp), %ecx
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rsi
leaq (%rsi,%rdx), %rax
xorq %rdx, %rsi
rolq $0x18, %rdx
movq %rsi, %rdi
shlq $0x10, %rdi
xorq %rdx, %rdi
xorq %rsi, %rdi
movq %rdi, 0x40(%rsp)
rolq $0x25, %rsi
movq %rsi, 0x48(%rsp)
movl 0x30(%rsp), %edx
subl %ecx, %edx
incl %edx
movslq %edx, %rsi
xorl %edx, %edx
divq %rsi
movq %rdx, %r14
addl %ecx, %r14d
leaq 0x70(%rsp), %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x2936
cmpl $0x2, %r14d
jl 0x19d2
movq %r14, 0x18(%rsp)
movl %r14d, %ebx
movl $0x1, %r15d
leaq (%r15,%r15,2), %rax
leaq (%rsp,%rax,8), %r14
addq $0x70, %r14
movq %r14, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x2936
movl -0x18(%r14), %eax
cmpl $0x13, %eax
ja 0x1c85
btl %eax, %r12d
jae 0x19bb
cmpl (%r14), %eax
je 0x1996
incq %r15
cmpq %rbx, %r15
jne 0x198a
movq 0x58(%rsp), %r15
movq 0x38(%rsp), %rbx
movq 0x18(%rsp), %r14
leaq 0x70(%rsp), %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x218a
movq %r15, %rdi
callq 0x249e
movq %r15, %rdi
movq %r13, %rsi
testb $0x1, %bpl
jne 0x19fd
callq 0x26ff
jmp 0x1a02
callq 0x2533
movapd %xmm0, %xmm1
movl 0x3704(%rip), %eax      # 0x5110
cmpl $0x1, %eax
je 0x1a1a
testl %eax, %eax
jne 0x1a38
jmp 0x1c85
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
movl $0x3, %edx
movsd %xmm1, 0x10(%rsp)
callq 0x1140
movsd 0x10(%rsp), %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x18d7
leaq 0x1969(%rip), %rdi      # 0x33b8
movsd %xmm1, 0x10(%rsp)
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x1090
cmpl $0xa, 0x70(%rsp)
movq 0x3564(%rip), %rax      # 0x4fd0
movq (%rax), %rcx
leaq 0x1cc2(%rip), %rdi      # 0x3738
leaq 0x1c9e(%rip), %rax      # 0x371b
cmovbq %rax, %rdi
movl $0x1c, %esi
movl $0x1, %edx
movq %rcx, %rbx
callq 0x11c0
movq %r14, 0x18(%rsp)
testl %r14d, %r14d
jle 0x1c42
movl 0x18(%rsp), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
movl 0x70(%rsp,%r14), %eax
cmpq $0x13, %rax
ja 0x1bf8
movq 0x78(%rsp,%r14), %rdx
leaq 0x1610(%rip), %rcx      # 0x30e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movabsq $0x3b787e203d202078, %rax # imm = 0x3B787E203D202078
movq %rax, 0x370(%rsp)
movb $0x0, 0x378(%rsp)
jmp 0x1bf8
leaq 0x370(%rsp), %rdi
leaq 0x1d23(%rip), %rsi      # 0x382a
jmp 0x1bf1
leaq 0x370(%rsp), %rdi
leaq 0x1cdf(%rip), %rsi      # 0x37fa
jmp 0x1bf1
leaq 0x370(%rsp), %rdi
leaq 0x1cdb(%rip), %rsi      # 0x380a
jmp 0x1bf1
leaq 0x370(%rsp), %rdi
leaq 0x1cd7(%rip), %rsi      # 0x381a
jmp 0x1bf1
movups 0x1c33(%rip), %xmm0     # 0x3782
movups %xmm0, 0x37b(%rsp)
movupd 0x1c18(%rip), %xmm0     # 0x3777
jmp 0x1bd7
leaq 0x370(%rsp), %rdi
leaq 0x1c5b(%rip), %rsi      # 0x37cb
jmp 0x1bf1
leaq 0x370(%rsp), %rdi
leaq 0x1cd9(%rip), %rsi      # 0x385a
jmp 0x1bf1
movl $0x20, %ecx
jmp 0x1c27
leaq 0x370(%rsp), %rdi
leaq 0x1c11(%rip), %rsi      # 0x37ad
jmp 0x1bf1
leaq 0x370(%rsp), %rdi
leaq 0x1c0f(%rip), %rsi      # 0x37bc
jmp 0x1bf1
leaq 0x370(%rsp), %rdi
leaq 0x1c7c(%rip), %rsi      # 0x383a
jmp 0x1bf1
movups 0x1bd6(%rip), %xmm0     # 0x379d
movups %xmm0, 0x37b(%rsp)
movupd 0x1bbb(%rip), %xmm0     # 0x3792
movapd %xmm0, 0x370(%rsp)
jmp 0x1bf8
leaq 0x370(%rsp), %rdi
leaq 0x1c59(%rip), %rsi      # 0x384a
xorl %eax, %eax
callq 0x11a0
movq %rbx, %rdi
leaq 0x1b53(%rip), %rsi      # 0x3755
leaq 0x370(%rsp), %rdx
xorl %eax, %eax
callq 0x1110
addq $0x18, %r14
cmpq %r14, 0x20(%rsp)
jne 0x1ab5
jmp 0x1c42
movl $0x40, %ecx
subq %rdx, %rcx
leaq 0x370(%rsp), %rdi
leaq 0x1ba1(%rip), %rsi      # 0x37da
xorl %eax, %eax
callq 0x11a0
jmp 0x1bf8
movl $0x10, %esi
movl $0x1, %edx
leaq 0x1b0a(%rip), %rdi      # 0x375d
movq %rbx, %rcx
callq 0x11c0
movq 0x336e(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
callq 0x1120
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x18(%rsp), %r14
movq 0x38(%rsp), %rbx
jmp 0x18d7
callq 0x1030
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x201d
callq 0x24fa
movq %rax, %r15
movq %r15, %r12
testb $0x1, %bpl
jne 0x1cdf
leaq 0x16fb(%rip), %r14      # 0x33ab
movabsq $0x100000000, %rbx      # imm = 0x100000000
xorl %r15d, %r15d
movl %r15d, %edi
callq *%r12
movl %eax, %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1090
incq %r15
cmpq %rbx, %r15
jne 0x1cbd
jmp 0x1fb4
leaq 0x16b4(%rip), %r14      # 0x339a
xorl %r15d, %r15d
movq %r12, %rbx
movq %r15, %rdi
callq *%rbx
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1090
incq %r15
jne 0x1cec
jmp 0x1fb4
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2022
callq 0x24fa
movq %rax, %r15
leaq 0x370(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
testb $0x1, %bpl
movq %rax, 0x20(%rsp)
movq %rcx, 0x38(%rsp)
jne 0x1eaa
cmpl $0x0, 0x2c(%rsp)
je 0x1ed6
xorl %r12d, %r12d
movl $0x2000, %edx           # imm = 0x2000
leaq 0x370(%rsp), %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x8000000, %r14d       # imm = 0x8000000
movl $0x2000, %edx           # imm = 0x2000
leaq 0x2370(%rsp), %rdi
xorl %esi, %esi
callq 0x10c0
movq %r12, 0x10(%rsp)
shlq $0x1b, %r12
movl %r12d, %edi
movq %r15, %rbx
callq *%r15
movl %eax, %ebp
leaq 0x2370(%rsp), %r15
xorl %r13d, %r13d
movl %r12d, %edi
btcl %r13d, %edi
callq *%rbx
xorl %ebp, %eax
xorl %ecx, %ecx
btl %ecx, %eax
adcq $0x0, (%r15,%rcx,8)
incq %rcx
cmpq $0x20, %rcx
jne 0x1db6
incq %r13
addq $0x100, %r15            # imm = 0x100
cmpq $0x20, %r13
jne 0x1da9
incq %r12
cmpq %r14, %r12
movq %rbx, %r15
jne 0x1d93
leaq 0x370(%rsp), %rax
leaq 0x2370(%rsp), %rcx
xorl %edx, %edx
movq 0x10(%rsp), %r12
movl $0x100, %edi            # imm = 0x100
xorl %esi, %esi
movdqa (%rax,%rsi,8), %xmm0
paddq (%rcx,%rsi,8), %xmm0
movdqa %xmm0, (%rax,%rsi,8)
addq $0x2, %rsi
cmpq $0x20, %rsi
jne 0x1e00
incq %rdx
addq %rdi, %rcx
addq %rdi, %rax
cmpq $0x20, %rdx
jne 0x1dfe
incq %r12
addq $0x8000000, %r14        # imm = 0x8000000
cmpq $0x20, %r12
jne 0x1d76
pxor %xmm0, %xmm0
leaq 0x370(%rsp), %rax
xorl %ecx, %ecx
movq $-0x80000000, %rdx      # imm = 0x80000000
movsd 0x11b7(%rip), %xmm1     # 0x3010
movsd 0x11b7(%rip), %xmm2     # 0x3018
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
addq %rdx, %rdi
xorps %xmm3, %xmm3
cvtsi2sd %rdi, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm3, %xmm0
incq %rsi
cmpq $0x20, %rsi
jne 0x1e63
incq %rcx
addq $0x100, %rax            # imm = 0x100
cmpq $0x20, %rcx
jne 0x1e61
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1efa
sqrtsd %xmm0, %xmm0
jmp 0x1eff
cmpl $0x0, 0x2c(%rsp)
jne 0x1fc8
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x2533
movsd %xmm0, 0x10(%rsp)
movb 0x323a(%rip), %cl       # 0x5108
movl $0x21, %r14d
jmp 0x1ef5
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x26ff
movsd %xmm0, 0x10(%rsp)
movb 0x3219(%rip), %cl       # 0x5108
movl $0x41, %r14d
shlq %cl, %r14
jmp 0x1f17
callq 0x11d0
mulsd 0x1119(%rip), %xmm0     # 0x3020
movsd %xmm0, 0x10(%rsp)
movabsq $0x2100000000, %r14     # imm = 0x2100000000
leaq 0x370(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
movq (%rbx), %r15
subq 0x38(%rsp), %r15
movq 0x8(%rbx), %rbx
subq 0x20(%rsp), %rbx
leaq 0x1428(%rip), %rdi      # 0x3369
movsd 0x10(%rsp), %xmm0
movb $0x1, %al
callq 0x1090
imulq $0xf4240, %r15, %rax    # imm = 0xF4240
addq %rbx, %rax
movq %rax, %xmm1
movq 0x10db(%rip), %xmm2     # 0x3040
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x10df(%rip), %xmm3     # 0x3050
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x1097(%rip), %xmm0     # 0x3020
movq %r14, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x13cf(%rip), %rdi      # 0x337c
movb $0x1, %al
callq 0x1090
xorl %eax, %eax
addq $0x4378, %rsp           # imm = 0x4378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x12b8
jmp 0x1eb5
callq 0x126e
movq 0x301a(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
callq 0x2027
movl $0x1, %edi
callq 0x11b0
movq %r14, %rdi
callq 0x1200
callq 0x1224
movq 0x2fcc(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
callq 0x2027
xorl %edi, %edi
callq 0x11b0
callq 0x12f9
callq 0x124f
callq 0x1293
callq 0x12d4