// File: /workspace/github_c_makefile_star2_O1/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, 0x2c(%rsp)
movl $0x6, 0x28(%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, 0x50(%rsp)
cmpq $-0x1, %rax
je 0x2012
movaps 0x1b68(%rip), %xmm0     # 0x3060
movaps %xmm0, 0x30(%rsp)
movsd 0x1b03(%rip), %xmm0     # 0x3008
movsd %xmm0, 0x20(%rsp)
leaq 0x1d2e(%rip), %r13      # 0x3240
movl $0x0, (%rsp)
xorl %ebx, %ebx
movq $0x0, 0x48(%rsp)
movl $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movl %r12d, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1170
cmpl $0x4b, %eax
jle 0x1563
leal -0x65(%rax), %ecx
cmpl $0xf, %ecx
ja 0x1591
leaq 0x1b20(%rip), %rdx      # 0x3070
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movl $0x1, 0x10(%rsp)
jmp 0x152e
cmpl $0x37, %eax
jle 0x157e
cmpl $0x38, %eax
je 0x158c
movl $0x1, (%rsp)
cmpl $0x45, %eax
je 0x152e
jmp 0x1fd6
cmpl $0x34, %eax
jne 0x1679
andl $-0x2, %ebp
jmp 0x152e
orl $0x1, %ebp
jmp 0x152e
cmpl $0x4c, %eax
je 0x166d
cmpl $0x53, %eax
jne 0x1fd6
movl $0x0, (%rsp)
jmp 0x152e
movq 0x3a25(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1060
movsd %xmm0, 0x20(%rsp)
jmp 0x152e
movq 0x3a09(%rip), %rax      # 0x4fd8
movq (%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0x152e
movq 0x39f5(%rip), %rax      # 0x4fd8
movq (%rax), %r14
movq %r14, %rdi
callq 0x1190
movl %eax, 0x3b14(%rip)      # 0x5108
addl $-0x1f, %eax
cmpl $-0x14, %eax
ja 0x152e
jmp 0x1ff4
movq 0x39cc(%rip), %rax      # 0x4fd8
movq (%rax), %rbx
jmp 0x152e
movq 0x39bd(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
leaq 0x1c2d(%rip), %rsi      # 0x3252
leaq 0x2c(%rsp), %rdx
leaq 0x28(%rsp), %rcx
xorl %eax, %eax
callq 0x1130
cmpl $0x2, %eax
jne 0x1fef
movl 0x2c(%rsp), %eax
testl %eax, %eax
jle 0x1fef
movl 0x28(%rsp), %ecx
cmpl $0x20, %ecx
jg 0x1fef
cmpl %ecx, %eax
jle 0x152e
jmp 0x1fef
orl $0x2, %ebp
jmp 0x152e
movl $0x2, (%rsp)
jmp 0x152e
cmpl $-0x1, %eax
jne 0x1fd6
leaq 0x1c14(%rip), %rdi      # 0x329d
leaq 0x1c1a(%rip), %rsi      # 0x32aa
callq 0x1150
testq %rax, %rax
movq 0x50(%rsp), %r15
movl (%rsp), %r12d
je 0x16ce
movq %rax, %r14
leaq 0x30(%rsp), %rdi
movl $0x10, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x1050
testq %rax, %rax
je 0x2017
movq %r14, %rdi
callq 0x1070
testq %rbx, %rbx
movq %rbx, 0x18(%rsp)
je 0x1822
leaq 0x1f8d(%rip), %rsi      # 0x3670
movq %rbx, %rdi
callq 0x1160
testq %rax, %rax
je 0x1811
movq %rax, %r12
movl %ebp, %eax
andl $0x1, %eax
negl %eax
andl $0xa, %eax
movl %eax, %eax
movq %rax, 0x58(%rsp)
xorl %r14d, %r14d
cmpl $0x20, %r14d
je 0x1811
movq %r12, %rdi
leaq 0x1b31(%rip), %rsi      # 0x3250
callq 0x10d0
leaq (%r12,%rax), %rcx
movq %rcx, 0x60(%rsp)
movb (%r12,%rax), %cl
movb %cl, 0xf(%rsp)
movb $0x0, (%r12,%rax)
movq %r14, %r13
movslq %r14d, %rax
leaq (%rax,%rax,2), %rax
leaq 0x70(%rsp,%rax,8), %rax
movq %rax, 0x68(%rsp)
movl $0x0, 0x10(%rax)
leaq 0x1a46(%rip), %r14      # 0x31a2
xorl %ebx, %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0x10f0
testl %eax, %eax
je 0x1786
decq %rbx
addq $0x8, %r14
cmpq $-0x14, %rbx
jne 0x175e
xorl %eax, %eax
movq 0x18(%rsp), %rbx
movq %r13, %r14
jmp 0x17f1
movq 0x58(%rsp), %rcx
subq %rbx, %rcx
movq 0x68(%rsp), %r12
movl %ecx, (%r12)
cmpb $0x3a, 0xf(%rsp)
movq 0x18(%rsp), %rbx
movq %r13, %r14
jne 0x17ec
movl $0x1, 0x10(%r12)
xorl %eax, %eax
cmpl $0x13, %ecx
ja 0x17f1
movq 0x60(%rsp), %rdi
incq %rdi
movl $0xf23c8, %edx          # imm = 0xF23C8
btl %ecx, %edx
jae 0x17d1
callq 0x1190
cltq
jmp 0x17e7
movl $0x1c07, %edx           # imm = 0x1C07
btl %ecx, %edx
jae 0x17f1
xorl %esi, %esi
movl $0x10, %edx
callq 0x10e0
movq %rax, 0x8(%r12)
incl %r14d
movb $0x1, %al
testb %al, %al
je 0x1811
xorl %edi, %edi
leaq 0x1e72(%rip), %rsi      # 0x3670
callq 0x1160
movq %rax, %r12
testq %rax, %rax
jne 0x170b
jmp 0x1814
xorl %r14d, %r14d
testl %r14d, %r14d
movl (%rsp), %r12d
jne 0x1825
callq 0x126e
xorl %r14d, %r14d
cmpl $0x1, %r12d
je 0x188b
cmpl $0x2, %r12d
jne 0x18e1
testq %rbx, %rbx
je 0x1c9b
movq %r14, %r13
testl %r14d, %r14d
jle 0x186e
movl %r13d, %ebx
leaq 0x70(%rsp), %r14
leaq 0x30(%rsp), %r12
testb $0x1, 0x10(%r14)
jne 0x1865
movq %r14, %rdi
movq %r12, %rsi
callq 0x2833
addq $0x18, %r14
decq %rbx
jne 0x1853
leaq 0x70(%rsp), %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x2189
movq %r15, %rdi
callq 0x24a0
jmp 0x1cb1
testq %rbx, %rbx
je 0x1d1c
movq %r14, %r13
testl %r14d, %r14d
jle 0x18c4
movl %r13d, %ebx
leaq 0x70(%rsp), %r14
leaq 0x30(%rsp), %r12
testb $0x1, 0x10(%r14)
jne 0x18bb
movq %r14, %rdi
movq %r12, %rsi
callq 0x2833
addq $0x18, %r14
decq %rbx
jne 0x18a9
leaq 0x70(%rsp), %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x2189
movq %r15, %rdi
callq 0x24a0
jmp 0x1d32
leaq 0x30(%rsp), %r13
movl $0xfc3f, %r12d          # imm = 0xFC3F
testq %rbx, %rbx
je 0x1932
testl %r14d, %r14d
jle 0x19e7
movq %r14, %r15
movl %r14d, %ebx
leaq 0x70(%rsp), %r14
testb $0x1, 0x10(%r14)
jne 0x1917
movq %r14, %rdi
movq %r13, %rsi
callq 0x2833
addq $0x18, %r14
decq %rbx
jne 0x1905
movq 0x18(%rsp), %rbx
movq %r15, %r14
movq 0x50(%rsp), %r15
jmp 0x19e7
movl 0x2c(%rsp), %ecx
movq 0x30(%rsp), %rdx
movq 0x38(%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, 0x30(%rsp)
rolq $0x25, %rsi
movq %rsi, 0x38(%rsp)
movl 0x28(%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 0x28ef
cmpl $0x2, %r14d
jl 0x19e7
movq %r14, 0x10(%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 0x28ef
movl -0x18(%r14), %eax
cmpl $0x13, %eax
ja 0x1c96
btl %eax, %r12d
jae 0x19d0
cmpl (%r14), %eax
je 0x19ab
incq %r15
cmpq %rbx, %r15
jne 0x199f
movq 0x50(%rsp), %r15
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
leaq 0x70(%rsp), %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x2189
movq %r15, %rdi
callq 0x24a0
movq %r15, %rdi
movq %r13, %rsi
testb $0x1, %bpl
jne 0x1a12
callq 0x26b8
jmp 0x1a17
callq 0x2535
movapd %xmm0, %xmm1
movl 0x36ef(%rip), %eax      # 0x5110
cmpl $0x1, %eax
je 0x1a2f
testl %eax, %eax
jne 0x1a4b
jmp 0x1c96
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
movl $0x3, %edx
movsd %xmm1, (%rsp)
callq 0x1140
movsd (%rsp), %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x18ec
leaq 0x1926(%rip), %rdi      # 0x3388
movsd %xmm1, (%rsp)
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x1090
cmpl $0xa, 0x70(%rsp)
movq 0x3552(%rip), %rax      # 0x4fd0
movq (%rax), %rcx
leaq 0x1c80(%rip), %rdi      # 0x3708
leaq 0x1c5c(%rip), %rax      # 0x36eb
cmovbq %rax, %rdi
movl $0x1c, %esi
movl $0x1, %edx
movq %rcx, %rbx
callq 0x11c0
movq %r14, 0x10(%rsp)
testl %r14d, %r14d
jle 0x1c54
movl 0x10(%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 0x1c0a
movq 0x78(%rsp,%r14), %rdx
leaq 0x15ce(%rip), %rcx      # 0x30b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movabsq $0x3b787e203d202078, %rax # imm = 0x3B787E203D202078
movq %rax, 0x370(%rsp)
movb $0x0, 0x378(%rsp)
jmp 0x1c0a
leaq 0x370(%rsp), %rdi
leaq 0x1ce1(%rip), %rsi      # 0x37fa
jmp 0x1c03
leaq 0x370(%rsp), %rdi
leaq 0x1c9d(%rip), %rsi      # 0x37ca
jmp 0x1c03
leaq 0x370(%rsp), %rdi
leaq 0x1c99(%rip), %rsi      # 0x37da
jmp 0x1c03
leaq 0x370(%rsp), %rdi
leaq 0x1c95(%rip), %rsi      # 0x37ea
jmp 0x1c03
movups 0x1bf1(%rip), %xmm0     # 0x3752
movups %xmm0, 0x37b(%rsp)
movupd 0x1bd6(%rip), %xmm0     # 0x3747
jmp 0x1be9
leaq 0x370(%rsp), %rdi
leaq 0x1c19(%rip), %rsi      # 0x379b
jmp 0x1c03
leaq 0x370(%rsp), %rdi
leaq 0x1c97(%rip), %rsi      # 0x382a
jmp 0x1c03
movl $0x20, %ecx
jmp 0x1c39
leaq 0x370(%rsp), %rdi
leaq 0x1bcf(%rip), %rsi      # 0x377d
jmp 0x1c03
leaq 0x370(%rsp), %rdi
leaq 0x1bcd(%rip), %rsi      # 0x378c
jmp 0x1c03
leaq 0x370(%rsp), %rdi
leaq 0x1c3a(%rip), %rsi      # 0x380a
jmp 0x1c03
movups 0x1b94(%rip), %xmm0     # 0x376d
movups %xmm0, 0x37b(%rsp)
movupd 0x1b79(%rip), %xmm0     # 0x3762
movapd %xmm0, 0x370(%rsp)
jmp 0x1c0a
leaq 0x370(%rsp), %rdi
leaq 0x1c17(%rip), %rsi      # 0x381a
xorl %eax, %eax
callq 0x11a0
movq %rbx, %rdi
leaq 0x1b11(%rip), %rsi      # 0x3725
leaq 0x370(%rsp), %rdx
xorl %eax, %eax
callq 0x1110
addq $0x18, %r14
cmpq %r14, 0x20(%rsp)
jne 0x1ac7
jmp 0x1c54
movl $0x40, %ecx
subq %rdx, %rcx
leaq 0x370(%rsp), %rdi
leaq 0x1b5f(%rip), %rsi      # 0x37aa
xorl %eax, %eax
callq 0x11a0
jmp 0x1c0a
movl $0x10, %esi
movl $0x1, %edx
leaq 0x1ac8(%rip), %rdi      # 0x372d
movq %rbx, %rcx
callq 0x11c0
movq 0x335c(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
callq 0x1120
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rbx
jmp 0x18ec
callq 0x1030
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x201c
callq 0x24fc
movq %rax, %r15
movq %r15, %r12
testb $0x1, %bpl
jne 0x1cf0
leaq 0x16ba(%rip), %r14      # 0x337b
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 0x1cce
jmp 0x1fb8
leaq 0x1673(%rip), %r14      # 0x336a
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 0x1cfd
jmp 0x1fb8
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x2021
callq 0x24fc
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, 0x18(%rsp)
jne 0x1eb2
cmpl $0x0, 0x10(%rsp)
je 0x1edd
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, (%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 0x1dc6
incq %r13
addq $0x100, %r15            # imm = 0x100
cmpq $0x20, %r13
jne 0x1db9
incq %r12
cmpq %r14, %r12
movq %rbx, %r15
jne 0x1da3
leaq 0x2370(%rsp), %rax
leaq 0x370(%rsp), %rcx
xorl %edx, %edx
movq (%rsp), %r12
movl $0x100, %r8d            # imm = 0x100
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
addq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq $0x20, %rsi
jne 0x1e10
incq %rdx
addq %r8, %rcx
addq %r8, %rax
cmpq $0x20, %rdx
jne 0x1e0e
incq %r12
addq $0x8000000, %r14        # imm = 0x8000000
cmpq $0x20, %r12
jne 0x1d87
xorpd %xmm0, %xmm0
leaq 0x370(%rsp), %rax
xorl %ecx, %ecx
movq $-0x80000000, %rdx      # imm = 0x80000000
movsd 0x11af(%rip), %xmm1     # 0x3010
movsd 0x11af(%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 0x1e6b
incq %rcx
addq $0x100, %rax            # imm = 0x100
cmpq $0x20, %rcx
jne 0x1e69
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1f00
sqrtsd %xmm0, %xmm0
jmp 0x1f05
cmpl $0x0, 0x10(%rsp)
jne 0x1fcc
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x2535
movsd %xmm0, (%rsp)
movb 0x3233(%rip), %cl       # 0x5108
movl $0x21, %r14d
jmp 0x1efb
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x26b8
movsd %xmm0, (%rsp)
movb 0x3213(%rip), %cl       # 0x5108
movl $0x41, %r14d
shlq %cl, %r14
jmp 0x1f1c
callq 0x11d0
mulsd 0x1113(%rip), %xmm0     # 0x3020
movsd %xmm0, (%rsp)
movabsq $0x2100000000, %r14     # imm = 0x2100000000
leaq 0x370(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
movq (%rbx), %r15
subq 0x18(%rsp), %r15
movq 0x8(%rbx), %rbx
subq 0x20(%rsp), %rbx
leaq 0x13f3(%rip), %rdi      # 0x3339
movsd (%rsp), %xmm0
movb $0x1, %al
callq 0x1090
imulq $0xf4240, %r15, %rax    # imm = 0xF4240
addq %rbx, %rax
movq %rax, %xmm1
movq 0x10d7(%rip), %xmm2     # 0x3040
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x10db(%rip), %xmm3     # 0x3050
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x1093(%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 0x139b(%rip), %rdi      # 0x334c
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 0x1ebd
movq 0x301b(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
callq 0x2026
movl $0x1, %edi
callq 0x11b0
callq 0x1224
movq %r14, %rdi
callq 0x1200
movq 0x2fcd(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
callq 0x2026
xorl %edi, %edi
callq 0x11b0
callq 0x12f9
callq 0x124f
callq 0x1293
callq 0x12d4