// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./textutils_internal.h
// Function: hts_str2dbl
static inline double hts_str2dbl(const char *in, char **end, int *failed) {
    uint64_t n = 0;
    int max_len = 15;
    const unsigned char *v = (const unsigned char *) in;
    const unsigned int ascii_zero = '0'; // Prevents conversion to signed
    int neg = 0, point = -1;
    double d;
    static double D[] = {1,1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7,
                         1e8, 1e9, 1e10,1e11,1e12,1e13,1e14,1e15,
                         1e16,1e17,1e18,1e19,1e20};

    while (isspace(*v))
        v++;

    if (*v == '-') {
        neg = 1;
        v++;
    } else if (*v == '+') {
        v++;
    }

    switch(*v) {
    case '1': case '2': case '3': case '4':
    case '5': case '6': case '7': case '8': case '9':
        break;

    case '0':
        if (v[1] != 'x' && v[1] != 'X') break;
        // else fall through - hex number

    default:
        // Non numbers, like NaN, Inf
        d = strtod(in, end);
        if (*end == in)
            *failed = 1;
        return d;
    }

    while (*v == '0') ++v;

    const unsigned char *start = v;

    while (--max_len && *v>='0' && *v<='9')
        n = n*10 + *v++ - ascii_zero;
    if (max_len && *v == '.') {
        point = v - start;
        v++;
        while (--max_len && *v>='0' && *v<='9')
            n = n*10 + *v++ - ascii_zero;
    }
    if (point < 0)
        point = v - start;

    // Outside the scope of this quick and dirty parser.
    if (!max_len || *v == 'e' || *v == 'E') {
        d = strtod(in, end);
        if (*end == in)
            *failed = 1;
        return d;
    }

    *end = (char *)v;
    d = n / D[v - start - point];

    return neg ? -d : d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0xf, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF
callq 0x44f0
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x2bd4e
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2bd20
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2bd6f
movl $0x1, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2bd89
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x2bd87
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2bd89
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x5c(%rbp)
subl $0x30, %eax
je 0x2bda9
jmp 0x2bd9a
movl -0x5c(%rbp), %eax
addl $-0x31, %eax
subl $0x8, %eax
ja 0x2bdc7
jmp 0x2bda7
jmp 0x2bdff
movq -0x38(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x78, %eax
je 0x2bdc5
movq -0x38(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x58, %eax
je 0x2bdc5
jmp 0x2bdff
jmp 0x2bdc7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4340
movsd %xmm0, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x2bdf0
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x2c013
jmp 0x2be01
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x30, %eax
jne 0x2be1b
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2be01
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x2c(%rbp), %ecx
addl $-0x1, %ecx
movl %ecx, -0x2c(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x5d(%rbp)
je 0x2be57
movq -0x38(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x5d(%rbp)
jl 0x2be57
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x5d(%rbp)
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0x2be60
jmp 0x2be84
imulq $0xa, -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movzbl (%rcx), %ecx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, -0x28(%rbp)
jmp 0x2be23
cmpl $0x0, -0x2c(%rbp)
je 0x2bf17
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x2bf17
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %ecx
addl $-0x1, %ecx
movl %ecx, -0x2c(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x5e(%rbp)
je 0x2bee8
movq -0x38(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x5e(%rbp)
jl 0x2bee8
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x5e(%rbp)
movb -0x5e(%rbp), %al
testb $0x1, %al
jne 0x2bef1
jmp 0x2bf15
imulq $0xa, -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movzbl (%rcx), %ecx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, -0x28(%rbp)
jmp 0x2beb4
jmp 0x2bf17
cmpl $0x0, -0x44(%rbp)
jge 0x2bf2b
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x2bf49
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x65, %eax
je 0x2bf49
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x45, %eax
jne 0x2bf81
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4340
movsd %xmm0, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x2bf72
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x2c013
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movaps 0xc396d(%rip), %xmm1    # 0xef900
movq -0x28(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xc396c(%rip), %xmm1    # 0xef910
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %rax
subq %rax, %rcx
movslq -0x44(%rbp), %rax
subq %rax, %rcx
leaq 0xe17d4(%rip), %rax     # 0x10d7a0
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x50(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x2bfff
movsd -0x50(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0x2c009
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x70, %rsp
popq %rbp
retq
nop