// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4580
movq (%rax), %rcx
leal -0x1(%rbx), %r15d
movzbl (%rbx), %eax
incq %rbx
incl %r15d
testb $0x20, 0x1(%rcx,%rax,2)
jne 0xf8ad
leaq -0x1(%rbx), %rcx
cmpl $0x2b, %eax
movq %rcx, 0x18(%rsp)
je 0xf8d0
cmpl $0x2d, %eax
jne 0xf8da
cmpl $0x2b, %eax
sete 0xb(%rsp)
jmp 0xf8e2
movb $0x1, 0xb(%rsp)
movq %rcx, %rbx
movq %r14, 0x10(%rsp)
xorl %r12d, %r12d
movsbq (%rbx), %r13
testq %r13, %r13
je 0xf927
movsbl %r13b, %edi
callq 0xfaca
testl %eax, %eax
je 0xf90e
imulq $0xa, %r12, %rax
leaq (%rax,%r13), %r12
addq $-0x30, %r12
jmp 0xf922
testb $0x1, %bpl
je 0xf9b2
cmpb $0x2c, %r13b
jne 0xf9b2
incq %rbx
jmp 0xf8ea
xorl %r14d, %r14d
movq 0x10(%rsp), %r13
xorl %ebp, %ebp
subl %ebp, %r14d
movl %r14d, %eax
testl %eax, %eax
jle 0xf943
imulq $0xa, %r12, %r12
decl %eax
jmp 0xf937
movl %r14d, %ecx
sarl $0x1f, %ecx
andl %r14d, %ecx
xorl %esi, %esi
pushq $0xa
popq %rdi
testl %ecx, %ecx
je 0xf966
movq %r12, %rax
cqto
idivq %rdi
addl %edx, %esi
incl %ecx
movq %rax, %r12
jmp 0xf951
testl %esi, %esi
jle 0xf977
cmpl $0x3, 0x47bd7(%rip)     # 0x57548
jge 0xfa6b
testq %r13, %r13
je 0xf982
movq %rbx, (%r13)
jmp 0xf994
cmpb $0x0, (%rbx)
je 0xf994
cmpl $0x2, 0x47bba(%rip)     # 0x57548
jge 0xfa99
movq %r12, %rax
negq %rax
cmpb $0x0, 0xb(%rsp)
cmovneq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
cmpb $0x2e, %r13b
jne 0xf9e7
incq %rbx
xorl %ebp, %ebp
movb (%rbx), %r13b
movsbl %r13b, %edi
callq 0xfaca
testl %eax, %eax
je 0xf9e9
movsbq %r13b, %rax
incl %ebp
imulq $0xa, %r12, %rcx
leaq (%rcx,%rax), %r12
addq $-0x30, %r12
incq %rbx
jmp 0xf9c0
xorl %ebp, %ebp
movzbl %r13b, %eax
orl $0x20, %eax
cmpl $0x65, %eax
jne 0xfa17
movzbl 0x1(%rbx), %eax
cmpl $0x2d, %eax
movq %rbp, 0x20(%rsp)
je 0xfa08
cmpl $0x2b, %eax
jne 0xfa21
addq $0x2, %rbx
cmpb $0x2d, %al
sete %al
movl %eax, 0xc(%rsp)
jmp 0xfa2c
movq 0x10(%rsp), %r13
jmp 0xf931
incq %rbx
movl $0x0, 0xc(%rsp)
xorl %ebp, %ebp
movsbl (%rbx), %r13d
movl %r13d, %edi
callq 0xfaca
testl %eax, %eax
je 0xfa4d
incq %rbx
imull $0xa, %ebp, %eax
leal (%rax,%r13), %ebp
addl $-0x30, %ebp
jmp 0xfa2e
movl %ebp, %r14d
negl %r14d
cmpb $0x0, 0xc(%rsp)
cmovel %ebp, %r14d
movq 0x10(%rsp), %r13
movq 0x20(%rsp), %rbp
jmp 0xf931
movq 0x4755e(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
movl %ebx, %ecx
subl %r15d, %ecx
leaq 0x34537(%rip), %rsi     # 0x43fb8
leaq 0x3455c(%rip), %rdx     # 0x43fe4
movq 0x18(%rsp), %r8
xorl %eax, %eax
callq 0x4770
jmp 0xf977
movq 0x47530(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
movl %ebx, %ecx
subl %r15d, %ecx
leaq 0x34547(%rip), %rsi     # 0x43ff6
leaq 0x3452e(%rip), %rdx     # 0x43fe4
movq 0x18(%rsp), %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x4770
jmp 0xf994