// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/hts_endian.c
// Function: t_double
int t_double(int verbose) {
    uint8_t buf[9];
    size_t i;
    int errors = 0;

    for (i = 0; i < NELE(tests_double); i++) {
        double f;

        if (verbose) {
            fprintf(stderr, "%s %.15g\n",
                    to_hex(tests_double[i].u8, 8), tests_double[i].d);
        }

        f = le_to_double(tests_double[i].u8);
        if (f != tests_double[i].d) {
            fprintf(stderr, "Failed %s => %.15g; expected %.15g\n",
                    to_hex(tests_double[i].u8, 8), f, tests_double[i].d);
            errors++;
        }

        f = le_to_double(tests_double[i].u8_unaligned + 1);
        if (f != tests_double[i].d) {
            fprintf(stderr, "Failed unaligned %s => %.15g; expected %.15g\n",
                    to_hex(tests_double[i].u8_unaligned + 1, 8),
                    f, tests_double[i].d);
            errors++;
        }

        double_to_le(tests_double[i].d, buf);
        if (memcmp(tests_double[i].u8, buf, 8) != 0) {
            fprintf(stderr, "Failed %.15g => %s; expected %s\n",
                    tests_double[i].d,
                    to_hex(buf, 8), to_hex(tests_double[i].u8, 8));
        }

        double_to_le(tests_double[i].d, buf + 1);
        if (memcmp(tests_double[i].u8, buf + 1, 8) != 0) {
            fprintf(stderr, "Failed unaligned %.15g => %s; expected %s\n",
                    tests_double[i].d,
                    to_hex(buf + 1, 8), to_hex(tests_double[i].u8, 8));
        }
    }
    return errors;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edi, %r14d
leaq 0x3a24(%rip), %r15      # 0x52c0
leaq 0x3a26(%rip), %rcx      # 0x52c9
leaq 0x18a0(%rip), %r12      # 0x314a
movq %r15, %rbx
movl $0x0, (%rsp)
xorl %ebp, %ebp
movl %edi, 0x4(%rsp)
testl %r14d, %r14d
jne 0x1935
movq %rbp, %rax
shlq $0x5, %rax
leaq (%r15,%rax), %r13
movsd (%rax,%r15), %xmm1
movsd 0x18(%rax,%r15), %xmm0
ucomisd %xmm0, %xmm1
jne 0x1948
jp 0x1948
movsd 0x9(%r13), %xmm1
ucomisd %xmm0, %xmm1
jne 0x19e6
jp 0x19e6
movsd %xmm0, 0x28(%rsp)
movq %xmm0, %rax
cmpq %rax, (%r13)
jne 0x1a84
movsd %xmm0, 0x29(%rsp)
movq (%r13), %rax
cmpq 0x29(%rsp), %rax
jne 0x1b53
incq %rbp
addq $0x20, %rbx
addq $0x20, %rcx
cmpq $0x7, %rbp
jne 0x18ba
jmp 0x1b6b
movq %rbp, %rdi
movq %rcx, %r13
callq 0x11a7
movq %r13, %rcx
jmp 0x18bf
movsd %xmm1, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x3681(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl $0x40, %r13d
leaq 0x3a3c(%rip), %r15      # 0x53b0
movq %rbx, %r14
movzbl (%r14), %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1040
addq $-0x3, %r13
incq %r14
addq $0x3, %r15
cmpq $0x28, %r13
jne 0x1977
movq 0x18(%rsp), %r13
movsd 0x18(%r13), %xmm1
movq 0x8(%rsp), %rdi
leaq 0x16ee(%rip), %rsi      # 0x30a1
leaq 0x39f6(%rip), %rdx      # 0x53b0
movsd 0x10(%rsp), %xmm0
movb $0x2, %al
callq 0x1030
incl (%rsp)
movsd 0x18(%r13), %xmm0
movl 0x4(%rsp), %r14d
leaq 0x38e4(%rip), %r15      # 0x52c0
movq 0x20(%rsp), %rcx
jmp 0x18df
movsd %xmm1, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq 0x35e8(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl $0x40, %r13d
leaq 0x39a3(%rip), %r15      # 0x53b0
movq %rcx, 0x20(%rsp)
movq %rcx, %r14
movzbl (%r14), %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1040
addq $-0x3, %r13
incq %r14
addq $0x3, %r15
cmpq $0x28, %r13
jne 0x1a15
movq 0x18(%rsp), %r13
movsd 0x18(%r13), %xmm1
movq 0x8(%rsp), %rdi
leaq 0x1674(%rip), %rsi      # 0x30c5
leaq 0x3958(%rip), %rdx      # 0x53b0
movsd 0x10(%rsp), %xmm0
movb $0x2, %al
callq 0x1030
incl (%rsp)
movsd 0x18(%r13), %xmm0
movl 0x4(%rsp), %r14d
leaq 0x3846(%rip), %r15      # 0x52c0
movq 0x20(%rsp), %rcx
jmp 0x18f5
movsd %xmm0, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x3545(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl $0x40, %r13d
leaq 0x3900(%rip), %r15      # 0x53b0
leaq 0x28(%rsp), %r14
movzbl (%r14), %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1040
addq $-0x3, %r13
incq %r14
addq $0x3, %r15
cmpq $0x28, %r13
jne 0x1ab5
movl $0x40, %r13d
leaq 0x38c9(%rip), %r15      # 0x53b0
movq %rbx, %r14
movzbl (%r14), %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1040
addq $-0x3, %r13
incq %r14
addq $0x3, %r15
cmpq $0x28, %r13
jne 0x1aea
movq 0x8(%rsp), %rdi
leaq 0x15d8(%rip), %rsi      # 0x30f3
movsd 0x10(%rsp), %xmm0
leaq 0x3888(%rip), %rcx      # 0x53b0
movq %rcx, %rdx
movb $0x1, %al
callq 0x1030
movq 0x18(%rsp), %r13
movsd 0x18(%r13), %xmm0
movl 0x4(%rsp), %r14d
leaq 0x3777(%rip), %r15      # 0x52c0
movq 0x20(%rsp), %rcx
jmp 0x190a
movq %r13, %rdi
leaq 0x29(%rsp), %rsi
movq %rcx, %r13
callq 0x1230
movq %r13, %rcx
jmp 0x191f
movl (%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq