// File: /workspace/github_c_makefile_star2_O2/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 $0x18, %rsp
movl %edi, %ebp
xorl %ebx, %ebx
pushq $0x7
popq %r13
leaq 0x2ede(%rip), %r14      # 0x42c0
leaq 0x9(%rsp), %r15
subq $0x1, %r13
jb 0x15cb
testl %ebp, %ebp
jne 0x144a
movsd (%r14), %xmm1
movsd 0x18(%r14), %xmm0
ucomisd %xmm0, %xmm1
jne 0x1482
jp 0x1482
movsd 0x9(%r14), %xmm1
ucomisd %xmm0, %xmm1
jne 0x14cc
jp 0x14cc
movsd %xmm0, 0x8(%rsp)
movq %xmm0, %rax
cmpq %rax, (%r14)
jne 0x1517
movsd %xmm0, 0x9(%rsp)
movq (%r14), %rax
cmpq (%r15), %rax
jne 0x1575
addq $0x20, %r14
jmp 0x13e7
movq 0x2b8f(%rip), %rax      # 0x3fe0
movq (%rax), %r12
movq %r14, %rdi
pushq $0x8
popq %rsi
callq 0x1368
movsd 0x18(%r14), %xmm0
movq %r12, %rdi
leaq 0xc28(%rip), %rsi       # 0x2097
leaq 0x2f3a(%rip), %rdx      # 0x43b0
movb $0x1, %al
callq 0x1030
jmp 0x13f5
movq 0x2b57(%rip), %rax      # 0x3fe0
movq (%rax), %r12
movq %r14, %rdi
pushq $0x8
popq %rsi
movsd %xmm1, (%rsp)
callq 0x1368
movsd 0x18(%r14), %xmm1
movq %r12, %rdi
leaq 0xbf5(%rip), %rsi       # 0x20a1
leaq 0x2efd(%rip), %rdx      # 0x43b0
movsd (%rsp), %xmm0
movb $0x2, %al
callq 0x1030
incl %ebx
movsd 0x18(%r14), %xmm0
jmp 0x1408
leaq 0x9(%r14), %rdi
movq 0x2b09(%rip), %rax      # 0x3fe0
movq (%rax), %r12
pushq $0x8
popq %rsi
movsd %xmm1, (%rsp)
callq 0x1368
movsd 0x18(%r14), %xmm1
movq %r12, %rdi
leaq 0xbce(%rip), %rsi       # 0x20c5
leaq 0x2eb2(%rip), %rdx      # 0x43b0
movsd (%rsp), %xmm0
movb $0x2, %al
callq 0x1030
incl %ebx
movsd 0x18(%r14), %xmm0
jmp 0x141e
movq 0x2ac2(%rip), %rax      # 0x3fe0
movq (%rax), %r12
leaq 0x8(%rsp), %rdi
movl %ebx, %r15d
pushq $0x8
popq %rbx
movl %ebx, %esi
movsd %xmm0, (%rsp)
callq 0x1368
movq %r14, %rdi
movl %ebx, %esi
movl %r15d, %ebx
leaq 0x9(%rsp), %r15
callq 0x1368
movq %r12, %rdi
leaq 0xb9f(%rip), %rsi       # 0x20f3
movsd (%rsp), %xmm0
leaq 0x2e50(%rip), %rcx      # 0x43b0
movq %rcx, %rdx
movb $0x1, %al
callq 0x1030
movsd 0x18(%r14), %xmm0
jmp 0x1432
movq 0x2a64(%rip), %rax      # 0x3fe0
movq (%rax), %r12
movq %r15, %rdi
movl %ebx, %r15d
pushq $0x8
popq %rbx
movl %ebx, %esi
movsd %xmm0, (%rsp)
callq 0x1368
movq %r14, %rdi
movl %ebx, %esi
movl %r15d, %ebx
leaq 0x9(%rsp), %r15
callq 0x1368
movq %r12, %rdi
leaq 0xb64(%rip), %rsi       # 0x2114
movsd (%rsp), %xmm0
leaq 0x2df4(%rip), %rcx      # 0x43b0
movq %rcx, %rdx
movb $0x1, %al
callq 0x1030
jmp 0x1444
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq