// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x7, -0x18(%rbp)
jae 0x1954
cmpl $0x0, -0x4(%rbp)
je 0x1661
movq 0x39ce(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3c9c(%rip), %rdi      # 0x52c0
shlq $0x5, %rax
addq %rax, %rdi
movl $0x8, %esi
callq 0x1500
movq -0x30(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rcx
leaq 0x3c79(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm0
leaq 0x1a3d(%rip), %rsi      # 0x3097
movb $0x1, %al
callq 0x1040
movq -0x18(%rbp), %rax
leaq 0x3c54(%rip), %rdi      # 0x52c0
shlq $0x5, %rax
addq %rax, %rdi
callq 0x1960
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movq -0x18(%rbp), %rcx
leaq 0x3c33(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
ucomisd 0x18(%rax), %xmm0
jne 0x169f
jp 0x169f
jmp 0x1703
movq 0x393a(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3c08(%rip), %rdi      # 0x52c0
shlq $0x5, %rax
addq %rax, %rdi
movl $0x8, %esi
callq 0x1500
movq -0x38(%rbp), %rdi
movq %rax, %rdx
movsd -0x28(%rbp), %xmm0
movq -0x18(%rbp), %rcx
leaq 0x3be0(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm1
leaq 0x19ae(%rip), %rsi      # 0x30a1
movb $0x2, %al
callq 0x1040
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3bb2(%rip), %rdi      # 0x52c0
shlq $0x5, %rax
addq %rax, %rdi
addq $0x8, %rdi
addq $0x1, %rdi
callq 0x1960
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movq -0x18(%rbp), %rcx
leaq 0x3b89(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
ucomisd 0x18(%rax), %xmm0
jne 0x1749
jp 0x1749
jmp 0x17b5
movq 0x3890(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3b5e(%rip), %rdi      # 0x52c0
shlq $0x5, %rax
addq %rax, %rdi
addq $0x8, %rdi
addq $0x1, %rdi
movl $0x8, %esi
callq 0x1500
movq -0x40(%rbp), %rdi
movq %rax, %rdx
movsd -0x28(%rbp), %xmm0
movq -0x18(%rbp), %rcx
leaq 0x3b2e(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm1
leaq 0x1920(%rip), %rsi      # 0x30c5
movb $0x2, %al
callq 0x1040
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rcx
leaq 0x3b00(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm0
leaq -0xd(%rbp), %rdi
callq 0x1990
movq -0x18(%rbp), %rcx
leaq 0x3ae0(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
leaq -0xd(%rbp), %rcx
movq (%rcx), %rcx
movq (%rax), %rax
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1875
movq 0x37da(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rcx
leaq 0x3aa8(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
leaq -0xd(%rbp), %rdi
movl $0x8, %esi
callq 0x1500
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3a7a(%rip), %rdi      # 0x52c0
shlq $0x5, %rax
addq %rax, %rdi
movl $0x8, %esi
callq 0x1500
movq -0x58(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
movq -0x48(%rbp), %rdx
movq %rax, %rcx
leaq 0x1885(%rip), %rsi      # 0x30f3
movb $0x1, %al
callq 0x1040
movq -0x18(%rbp), %rcx
leaq 0x3a40(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm0
leaq -0xd(%rbp), %rdi
addq $0x1, %rdi
callq 0x1990
movq -0x18(%rbp), %rcx
leaq 0x3a1c(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
leaq -0xd(%rbp), %rcx
addq $0x1, %rcx
movq (%rcx), %rcx
movq (%rax), %rax
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1941
movq 0x3712(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rcx
leaq 0x39e0(%rip), %rax      # 0x52c0
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
leaq -0xd(%rbp), %rdi
addq $0x1, %rdi
movl $0x8, %esi
callq 0x1500
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
leaq 0x39ae(%rip), %rdi      # 0x52c0
shlq $0x5, %rax
addq %rax, %rdi
movl $0x8, %esi
callq 0x1500
movq -0x70(%rbp), %rdi
movsd -0x68(%rbp), %xmm0
movq -0x60(%rbp), %rdx
movq %rax, %rcx
leaq 0x17da(%rip), %rsi      # 0x3114
movb $0x1, %al
callq 0x1040
jmp 0x1943
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x15fa
movl -0x1c(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)