// File: /workspace/github_c_makefile_star2_O1/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 $0x48, %rsp
movl %edi, %ebx
leaq 0x3955(%rip), %r15      # 0x52c0
leaq 0x3957(%rip), %r13      # 0x52c9
leaq 0x17d4(%rip), %r12      # 0x314d
movq %r15, %rcx
movl $0x0, 0xc(%rsp)
xorl %ebp, %ebp
movl %edi, 0x1c(%rsp)
testl %ebx, %ebx
jne 0x1a0c
movq %rbp, %rax
shlq $0x5, %rax
leaq (%r15,%rax), %r14
movsd (%rax,%r15), %xmm0
ucomisd 0x18(%rax,%r15), %xmm0
jne 0x1a1f
jp 0x1a1f
movsd 0x9(%r14), %xmm0
ucomisd 0x18(%r14), %xmm0
jne 0x1ab6
jp 0x1ab6
movq 0x18(%r14), %xmm0
movq %xmm0, 0x20(%rsp)
movq %xmm0, %rax
cmpq %rax, (%r14)
jne 0x1b4d
movsd 0x18(%r14), %xmm0
movsd %xmm0, 0x21(%rsp)
movq (%r14), %rax
cmpq 0x21(%rsp), %rax
jne 0x1b69
incq %rbp
addq $0x20, %rcx
addq $0x20, %r13
cmpq $0x7, %rbp
jne 0x198a
jmp 0x1b81
movq %rbp, %rdi
movq %rcx, %r14
callq 0x1275
movq %r14, %rcx
jmp 0x198e
movsd %xmm0, 0x38(%rsp)
movq %r13, 0x40(%rsp)
movq 0x35af(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movl $0x40, %r13d
leaq 0x396a(%rip), %r15      # 0x53b0
movq %rcx, 0x10(%rsp)
movq %rcx, %rbx
movzbl (%rbx), %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1050
addq $-0x3, %r13
incq %rbx
addq $0x3, %r15
cmpq $0x28, %r13
jne 0x1a4e
movsd 0x18(%r14), %xmm1
movq 0x30(%rsp), %rdi
leaq 0x161d(%rip), %rsi      # 0x30a1
leaq 0x3925(%rip), %rdx      # 0x53b0
movsd 0x38(%rsp), %xmm0
movb $0x2, %al
callq 0x1040
incl 0xc(%rsp)
movl 0x1c(%rsp), %ebx
leaq 0x3819(%rip), %r15      # 0x52c0
movq 0x40(%rsp), %r13
movq 0x10(%rsp), %rcx
jmp 0x19aa
movsd %xmm0, 0x38(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x3518(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq %r13, %rbx
movl $0x40, %r13d
leaq 0x38d0(%rip), %r15      # 0x53b0
movq %rbx, 0x40(%rsp)
movzbl (%rbx), %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1050
addq $-0x3, %r13
incq %rbx
addq $0x3, %r15
cmpq $0x28, %r13
jne 0x1ae5
movsd 0x18(%r14), %xmm1
movq 0x30(%rsp), %rdi
leaq 0x15aa(%rip), %rsi      # 0x30c5
leaq 0x388e(%rip), %rdx      # 0x53b0
movsd 0x38(%rsp), %xmm0
movb $0x2, %al
callq 0x1040
incl 0xc(%rsp)
movl 0x1c(%rsp), %ebx
leaq 0x3782(%rip), %r15      # 0x52c0
movq 0x40(%rsp), %r13
movq 0x10(%rsp), %rcx
jmp 0x19c2
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
movq %rcx, 0x10(%rsp)
callq 0x12fe
movq 0x10(%rsp), %rcx
jmp 0x19dc
movq %r14, %rdi
leaq 0x21(%rsp), %rsi
movq %rcx, %r14
callq 0x13ba
movq %r14, %rcx
jmp 0x19f6
movl 0xc(%rsp), %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq