// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib_impl::ae_str2int(char const*, alglib_impl::ae_state*, char const**)
ae_int_t ae_str2int(const char *buf, ae_state *state, const char **pasttheend)
{
    const char *emsg = "ALGLIB: unable to read integer value from stream";
    ae_int_t sixbits[12];
    ae_int_t sixbitsread, i;
    union _u
    {
        ae_int_t ival;
        unsigned char bytes[9];
    } u;
    /* 
     * 1. skip leading spaces
     * 2. read and decode six-bit digits
     * 3. set trailing digits to zeros
     * 4. convert to little endian 64-bit integer representation
     * 5. convert to big endian representation, if needed
     */
    while( *buf==' ' || *buf=='\t' || *buf=='\n' || *buf=='\r' )
        buf++;
    sixbitsread = 0;
    while( *buf!=' ' && *buf!='\t' && *buf!='\n' && *buf!='\r' && *buf!=0 )
    {
        ae_int_t d;
        d = ae_char2sixbits(*buf);
        if( d<0 || sixbitsread>=AE_SER_ENTRY_LENGTH )
            ae_break(state, ERR_ASSERTION_FAILED, emsg);
        sixbits[sixbitsread] = d;
        sixbitsread++;
        buf++;
    }
    *pasttheend = buf;
    if( sixbitsread==0 )
        ae_break(state, ERR_ASSERTION_FAILED, emsg);
    for(i=sixbitsread; i<12; i++)
        sixbits[i] = 0;
    ae_foursixbits2threebytes(sixbits+0, u.bytes+0);
    ae_foursixbits2threebytes(sixbits+4, u.bytes+3);
    ae_foursixbits2threebytes(sixbits+8, u.bytes+6);
    if( state->endianness==AE_BIG_ENDIAN )
    {
        for(i=0; i<sizeof(ae_int_t)/2; i++)
        {
            unsigned char tc;
            tc = u.bytes[i];
            u.bytes[i] = u.bytes[sizeof(ae_int_t)-1-i];
            u.bytes[sizeof(ae_int_t)-1-i] = tc;
        }
    }
    return u.ival;
}

// Assembly:
subq $0x78, %rsp
movabsq $0x100002600, %rax      # imm = 0x100002600
movzbl (%rdi), %r9d
cmpq $0x20, %r9
ja 0x250af
btq %r9, %rax
jae 0x250af
incq %rdi
jmp 0x2509a
xorl %eax, %eax
leaq 0xe1d8(%rip), %rcx      # 0x33290
movabsq $0x100002601, %r8       # imm = 0x100002601
movzbl %r9b, %r10d
cmpb $0x20, %r10b
ja 0x250d2
btq %r10, %r8
jb 0x25102
cmpb $0x7e, %r9b
ja 0x251ea
movq (%rcx,%r10,8), %r9
testq %r9, %r9
js 0x251ea
cmpq $0xb, %rax
jae 0x251ea
movq %r9, 0x10(%rsp,%rax,8)
movb 0x1(%rdi,%rax), %r9b
incq %rax
jmp 0x250c2
addq %rax, %rdi
movq %rdi, (%rdx)
testq %rax, %rax
je 0x251ea
cmpq $0xc, %rax
je 0x25122
andq $0x0, 0x10(%rsp,%rax,8)
incq %rax
jmp 0x25111
movl 0x18(%rsp), %eax
movl %eax, %ecx
shll $0x6, %ecx
orl 0x10(%rsp), %ecx
movl 0x20(%rsp), %edx
movb %cl, (%rsp)
shrl $0x2, %eax
movl %edx, %ecx
shll $0x4, %ecx
orl %eax, %ecx
movb %cl, 0x1(%rsp)
shrl $0x4, %edx
movl 0x28(%rsp), %eax
shll $0x2, %eax
orl %edx, %eax
movl 0x38(%rsp), %ecx
movl %ecx, %edx
shll $0x6, %edx
orl 0x30(%rsp), %edx
movb %al, 0x2(%rsp)
movb %dl, 0x3(%rsp)
shrl $0x2, %ecx
movl 0x40(%rsp), %eax
movl %eax, %edx
shll $0x4, %edx
orl %ecx, %edx
movb %dl, 0x4(%rsp)
shrl $0x4, %eax
movl 0x48(%rsp), %ecx
shll $0x2, %ecx
orl %eax, %ecx
movb %cl, 0x5(%rsp)
movl 0x58(%rsp), %eax
movl %eax, %ecx
shll $0x6, %ecx
orl 0x50(%rsp), %ecx
movb %cl, 0x6(%rsp)
shrl $0x2, %eax
movl 0x60(%rsp), %ecx
movl 0x68(%rsp), %edx
movl %ecx, %edi
shll $0x4, %edi
orl %eax, %edi
movb %dil, 0x7(%rsp)
shrl $0x4, %ecx
shll $0x2, %edx
orl %ecx, %edx
movb %dl, 0x8(%rsp)
cmpq $0x2, (%rsi)
jne 0x251e1
pushq $0x7
popq %rax
movq %rsp, %rcx
cmpq $0x3, %rax
je 0x251e1
movb (%rcx), %dl
movb (%rsp,%rax), %sil
movb %sil, (%rcx)
movb %dl, (%rsp,%rax)
decq %rax
incq %rcx
jmp 0x251c7
movq (%rsp), %rax
addq $0x78, %rsp
retq
leaq 0xe6e4(%rip), %rdx      # 0x338d5
pushq $0x3
popq %rax
movq %rsi, %rdi
movl %eax, %esi
callq 0x235f7