// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/htslib/hts.c
// Function: hts_parse_decimal
long long hts_parse_decimal(const char *str, char **strend, int flags)
{
    long long n = 0;
    int decimals = 0, e = 0, lost = 0;
    char sign = '+', esign = '+';
    const char *s;

    while (isspace_c(*str)) str++;
    s = str;

    if (*s == '+' || *s == '-') sign = *s++;
    while (*s)
        if (isdigit_c(*s)) n = push_digit(n, *s++);
        else if (*s == ',' && (flags & HTS_PARSE_THOUSANDS_SEP)) s++;
        else break;

    if (*s == '.') {
        s++;
        while (isdigit_c(*s)) decimals++, n = push_digit(n, *s++);
    }

    if (*s == 'E' || *s == 'e') {
        s++;
        if (*s == '+' || *s == '-') esign = *s++;
        while (isdigit_c(*s)) e = push_digit(e, *s++);
        if (esign == '-') e = -e;
    }

    e -= decimals;
    while (e > 0) n *= 10, e--;
    while (e < 0) lost += n % 10, n /= 10, e++;

    if (lost > 0 && hts_verbose >= 3)
        fprintf(stderr, "[W::%s] discarding fractional part of %.*s\n",
                __func__, (int)(s - str), str);

    if (strend) *strend = (char *) s;
    else if (*s && hts_verbose >= 2)
        fprintf(stderr, "[W::%s] ignoring unknown characters after %.*s[%s]\n",
                __func__, (int)(s - str), str, s);

    return (sign == '+')? n : -n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movb $0x2b, -0x2d(%rbp)
movb $0x2b, -0x2e(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x14270
cmpl $0x0, %eax
je 0x13fb7
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x13f98
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
je 0x13fd7
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x13feb
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %al
movb %al, -0x2d(%rbp)
jmp 0x13fed
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
je 0x14053
movq -0x38(%rbp), %rax
movsbl (%rax), %edi
callq 0x142a0
cmpl $0x0, %eax
je 0x14028
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movsbl (%rax), %esi
callq 0x142d0
movq %rax, -0x20(%rbp)
jmp 0x14051
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x1404d
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1404d
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1404f
jmp 0x14053
jmp 0x14051
jmp 0x13fed
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x140a8
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %edi
callq 0x142a0
cmpl $0x0, %eax
je 0x140a6
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movsbl (%rax), %esi
callq 0x142d0
movq %rax, -0x20(%rbp)
jmp 0x1406b
jmp 0x140a8
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x45, %eax
je 0x140c0
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
jne 0x1413e
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
je 0x140e4
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x140f8
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %al
movb %al, -0x2e(%rbp)
jmp 0x140fa
movq -0x38(%rbp), %rax
movsbl (%rax), %edi
callq 0x142a0
cmpl $0x0, %eax
je 0x1412b
movslq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movsbl (%rax), %esi
callq 0x142d0
movl %eax, -0x28(%rbp)
jmp 0x140fa
movsbl -0x2e(%rbp), %eax
cmpl $0x2d, %eax
jne 0x1413c
xorl %eax, %eax
subl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x1413e
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jle 0x14163
imulq $0xa, -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x14149
jmp 0x14165
cmpl $0x0, -0x28(%rbp)
jge 0x141a0
movq -0x20(%rbp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movslq -0x2c(%rbp), %rax
addq %rdx, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x14165
cmpl $0x0, -0x2c(%rbp)
jle 0x141df
cmpl $0x3, 0x712e3(%rip)     # 0x85490
jl 0x141df
movq 0x70e32(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %r8
leaq 0x627da(%rip), %rsi     # 0x769ab
leaq 0x627ff(%rip), %rdx     # 0x769d7
movb $0x0, %al
callq 0x37f0
cmpq $0x0, -0x10(%rbp)
je 0x141f3
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1423e
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1423c
cmpl $0x2, 0x7128a(%rip)     # 0x85490
jl 0x1423c
movq 0x70dd9(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %r8
movq -0x38(%rbp), %r9
leaq 0x627bb(%rip), %rsi     # 0x769e9
leaq 0x627a2(%rip), %rdx     # 0x769d7
movb $0x0, %al
callq 0x37f0
jmp 0x1423e
movsbl -0x2d(%rbp), %eax
cmpl $0x2b, %eax
jne 0x14251
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x1425b
xorl %eax, %eax
subq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)