// File: /workspace/github_cpp_makefile_star2_O3/mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib::_parse_real_delim(char const*, char const*, double*, char const**)
bool alglib::_parse_real_delim(const char *s, const char *delim, double *result, const char **new_s)
{
    const char *p;
    char *t;
    bool has_digits;
    char buf[64];
    int  isign;
    lconv *loc;

    p = s;
    
    //
    // check string structure and decide what to do
    //
    isign = 1;
    if( *s=='-' || *s=='+' )
    {
        isign = *s=='-' ? -1 : +1;
        s++;
    }
    memset(buf, 0, sizeof(buf));
    strncpy(buf, s, 3);
    if( my_stricmp(buf,"nan")!=0 && my_stricmp(buf,"inf")!=0 )
    {
        //
        // [sign] [ddd] [.] [ddd] [e|E[sign]ddd]
        //
        has_digits = false;
        if( *s!=0 && strchr("1234567890",*s)!=NULL )
        {
            has_digits = true;
            while( *s!=0 && strchr("1234567890",*s)!=NULL )
                s++;
        }
        if( *s=='.' )
            s++;
        if( *s!=0 && strchr("1234567890",*s)!=NULL )
        {
            has_digits = true;
            while( *s!=0 && strchr("1234567890",*s)!=NULL )
                s++;
        }
        if (!has_digits )
            return false;
        if( *s=='e' || *s=='E' )
        {
            s++;
            if( *s=='-' || *s=='+' )
                s++;
            if( *s==0 || strchr("1234567890",*s)==NULL )
                return false;
            while( *s!=0 && strchr("1234567890",*s)!=NULL )
                s++;
        }   
        if( *s==0 || strchr(delim,*s)==NULL )
            return false;
        *new_s = s;

        //
        // finite value conversion
        //
        if( *new_s-p>=(int)sizeof(buf) )
            return false;
        strncpy(buf, p, (size_t)(*new_s-p));
        buf[*new_s-p] = 0;
        loc = localeconv();
        t = strchr(buf,'.');
        if( t!=NULL )
            *t = *loc->decimal_point;
        *result = atof(buf);
        return true;
    }
    else
    {
        //
        // check delimiter and update *new_s
        //
        s += 3;
        if( *s==0 || strchr(delim,*s)==NULL )
            return false;
        *new_s = s;

        //
        // NAN, INF conversion
        //
        if( my_stricmp(buf,"nan")==0 )
            *result = fp_nan;
        if( my_stricmp(buf,"inf")==0 )
            *result = isign>0 ? fp_posinf : fp_neginf;
        return true;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movzbl (%rdi), %eax
cmpl $0x2d, %eax
je 0x2e39c
movb $0x1, %r13b
movq %r15, %rbp
cmpl $0x2b, %eax
jne 0x2e3a6
cmpb $0x2d, %al
setne %r13b
leaq 0x1(%r15), %rbp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl $0x3, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3150
leaq 0x8894(%rip), %rsi      # 0x36c68
movq %rbx, %rdi
callq 0x2e2d4
testq %rax, %rax
je 0x2e45e
leaq 0x8884(%rip), %rsi      # 0x36c6c
leaq 0x10(%rsp), %rdi
callq 0x2e2d4
testq %rax, %rax
je 0x2e45e
movq %r12, (%rsp)
movsbl (%rbp), %r13d
movq %r14, %r12
testl %r13d, %r13d
je 0x2e4ec
leaq 0x884a(%rip), %rdi      # 0x36c5d
movl $0xb, %edx
movl %r13d, %esi
callq 0x32c0
testq %rax, %rax
je 0x2e4ec
leaq 0x882d(%rip), %rbx      # 0x36c5d
movsbl %r13b, %esi
movl $0xb, %edx
movq %rbx, %rdi
callq 0x32c0
movb $0x1, %r14b
testq %rax, %rax
je 0x2e4ef
movb 0x1(%rbp), %r13b
incq %rbp
testb %r13b, %r13b
jne 0x2e430
jmp 0x2e4ef
movsbl 0x3(%rbp), %esi
testl %esi, %esi
je 0x2e601
movq 0x8(%rsp), %rdi
callq 0x30f0
testq %rax, %rax
je 0x2e601
addq $0x3, %rbp
movq %rbp, (%r12)
leaq 0x87dc(%rip), %rsi      # 0x36c68
leaq 0x10(%rsp), %rdi
callq 0x2e2d4
testq %rax, %rax
jne 0x2e4a8
movsd 0x14e35(%rip), %xmm0    # 0x432d8
movsd %xmm0, (%r14)
leaq 0x87bd(%rip), %rsi      # 0x36c6c
leaq 0x10(%rsp), %rdi
callq 0x2e2d4
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
jne 0x2e603
leaq 0x14e12(%rip), %rax     # 0x432e0
leaq 0x14e13(%rip), %rcx     # 0x432e8
testb %r13b, %r13b
cmovneq %rax, %rcx
movsd (%rcx), %xmm0
movsd %xmm0, (%r14)
movb $0x1, %al
jmp 0x2e603
xorl %r14d, %r14d
xorl %eax, %eax
cmpb $0x2e, (%rbp)
sete %al
leaq (%rax,%rbp), %r13
movsbl (%rbp,%rax), %ebp
testl %ebp, %ebp
je 0x2e552
leaq 0x8751(%rip), %rdi      # 0x36c5d
movl $0xb, %edx
movl %ebp, %esi
callq 0x32c0
testq %rax, %rax
je 0x2e552
leaq 0x8739(%rip), %rbx      # 0x36c5d
movq %r12, %r14
movq (%rsp), %r12
movsbl %bpl, %esi
movl $0xb, %edx
movq %rbx, %rdi
callq 0x32c0
testq %rax, %rax
je 0x2e562
movb 0x1(%r13), %bpl
incq %r13
testb %bpl, %bpl
jne 0x2e52b
jmp 0x2e601
testb %r14b, %r14b
movq %r12, %r14
movq (%rsp), %r12
je 0x2e601
testb %bpl, %bpl
je 0x2e601
movzbl %bpl, %eax
cmpl $0x65, %eax
je 0x2e579
cmpl $0x45, %eax
jne 0x2e5e1
movzbl 0x1(%r13), %ebp
cmpl $0x2d, %ebp
je 0x2e588
cmpl $0x2b, %ebp
jne 0x2e592
movb 0x2(%r13), %bpl
addq $0x2, %r13
jmp 0x2e595
incq %r13
testb %bpl, %bpl
je 0x2e601
movsbl %bpl, %esi
leaq 0x86b8(%rip), %rdi      # 0x36c5d
movl $0xb, %edx
callq 0x32c0
testq %rax, %rax
je 0x2e601
leaq 0x86a2(%rip), %rbx      # 0x36c5d
movsbl %bpl, %esi
movl $0xb, %edx
movq %rbx, %rdi
callq 0x32c0
testq %rax, %rax
je 0x2e5e1
movb 0x1(%r13), %bpl
incq %r13
xorl %eax, %eax
testb %bpl, %bpl
jne 0x2e5bb
jmp 0x2e603
movsbl %bpl, %esi
movq 0x8(%rsp), %rdi
callq 0x30f0
testq %rax, %rax
je 0x2e601
movq %r13, (%r12)
subq %r15, %r13
cmpq $0x3f, %r13
jle 0x2e612
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r12
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x3150
movb $0x0, 0x10(%rsp,%r13)
callq 0x3480
movq %rax, %rbx
movq %r14, %rdi
movl $0x2e, %esi
callq 0x30f0
testq %rax, %rax
je 0x2e64f
movq (%rbx), %rcx
movb (%rcx), %cl
movb %cl, (%rax)
leaq 0x10(%rsp), %rdi
callq 0x3310
movq %r12, %r14
jmp 0x2e4e0