// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_strtod
NK_API double
nk_strtod(const char *str, const char **endptr)
{
    double m;
    double neg = 1.0;
    const char *p = str;
    double value = 0;
    double number = 0;

    NK_ASSERT(str);
    if (!str) return 0;

    /* skip whitespace */
    while (*p == ' ') p++;
    if (*p == '-') {
        neg = -1.0;
        p++;
    }

    while (*p && *p != '.' && *p != 'e') {
        value = value * 10.0 + (double) (*p - '0');
        p++;
    }

    if (*p == '.') {
        p++;
        for(m = 0.1; *p && *p != 'e'; p++ ) {
            value = value + (double) (*p - '0') * m;
            m *= 0.1;
        }
    }
    if (*p == 'e') {
        int i, pow, div;
        p++;
        if (*p == '-') {
            div = nk_true;
            p++;
        } else if (*p == '+') {
            div = nk_false;
            p++;
        } else div = nk_false;

        for (pow = 0; *p; p++)
            pow = pow * 10 + (int) (*p - '0');

        for (m = 1.0, i = 0; i < pow; i++)
            m *= 10.0;

        if (div)
            value /= m;
        else value *= m;
    }
    number = value * neg;
    if (endptr)
        *endptr = p;
    return number;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movsd 0x81e62(%rip), %xmm0    # 0xad5b8
movsd %xmm0, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x2b7b3
movq 0x99869(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x85c0f(%rip), %rsi     # 0xb13a0
leaq 0x85c26(%rip), %rdx     # 0xb13be
movl $0x1a1c, %ecx           # imm = 0x1A1C
movb $0x0, %al
callq 0x13ec0
movq 0x99845(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x2b7b5
cmpq $0x0, 0x48(%rsp)
jne 0x2b7cb
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x2ba8f
jmp 0x2b7cd
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x2b7ea
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2b7cd
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2b813
movsd 0x81dc1(%rip), %xmm0    # 0xad5c0
movsd %xmm0, 0x30(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2b815
movq 0x28(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xb(%rsp)
je 0x2b84d
movq 0x28(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2e, %ecx
movb %al, 0xb(%rsp)
je 0x2b84d
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
setne %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x2b857
jmp 0x2b892
movsd 0x20(%rsp), %xmm0
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
cvtsi2sd %eax, %xmm1
movsd 0x81d5c(%rip), %xmm2    # 0xad5d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2b815
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x2b93d
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movsd 0x81d0f(%rip), %xmm0    # 0xad5c8
movsd %xmm0, 0x38(%rsp)
movq 0x28(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xa(%rsp)
je 0x2b8e4
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
setne %al
movb %al, 0xa(%rsp)
movb 0xa(%rsp), %al
testb $0x1, %al
jne 0x2b8ee
jmp 0x2b93b
movsd 0x20(%rsp), %xmm1
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
cvtsi2sd %eax, %xmm0
movsd 0x38(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x81ca9(%rip), %xmm0    # 0xad5c8
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2b8bf
jmp 0x2b93d
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
jne 0x2ba5c
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2b981
movl $0x1, 0xc(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2b9b0
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x2b9a6
movl $0x0, 0xc(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2b9ae
movl $0x0, 0xc(%rsp)
jmp 0x2b9b0
movl $0x0, 0x10(%rsp)
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
je 0x2b9e8
imull $0xa, 0x10(%rsp), %eax
movq 0x28(%rsp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2b9b8
movsd 0x81bc8(%rip), %xmm0    # 0xad5b8
movsd %xmm0, 0x38(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x2ba29
movsd 0x81bc0(%rip), %xmm0    # 0xad5d0
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2b9fe
cmpl $0x0, 0xc(%rsp)
je 0x2ba48
movsd 0x38(%rsp), %xmm1
movsd 0x20(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x2ba5a
movsd 0x38(%rsp), %xmm0
mulsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x2ba5c
movsd 0x20(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x2ba83
movq 0x28(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
addq $0x58, %rsp
retq
nopw (%rax,%rax)