// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rbx
movabsq $0x100002600, %rax      # imm = 0x100002600
movzbl (%rdi), %r9d
cmpq $0x20, %r9
ja 0x26d34
btq %r9, %rax
jae 0x26d34
incq %rdi
jmp 0x26d1f
movl $0x60, %eax
xorl %ecx, %ecx
leaq 0xf59e(%rip), %rsi      # 0x362e0
movabsq $0x100002601, %r8       # imm = 0x100002601
movzbl %r9b, %r10d
cmpb $0x20, %r10b
ja 0x26d5c
btq %r10, %r8
jb 0x26d90
cmpb $0x7e, %r9b
ja 0x26e79
movq (%rsi,%r10,8), %r9
testq %r9, %r9
js 0x26e79
cmpq $0xb, %rcx
jae 0x26e79
movq %r9, 0x10(%rsp,%rcx,8)
movb 0x1(%rdi,%rcx), %r9b
incq %rcx
addq $-0x8, %rax
jmp 0x26d4c
addq %rcx, %rdi
movq %rdi, (%rdx)
testq %rcx, %rcx
je 0x26e79
leaq (%rsp,%rcx,8), %rdi
addq $0x10, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3170
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, %esi
shll $0x4, %esi
orl %eax, %esi
movb %sil, 0x7(%rsp)
shrl $0x4, %ecx
shll $0x2, %edx
orl %ecx, %edx
movb %dl, 0x8(%rsp)
cmpq $0x2, (%rbx)
jne 0x26e6f
leaq 0x7(%rsp), %rax
xorl %ecx, %ecx
movb (%rsp,%rcx), %dl
movb (%rax), %sil
movb %sil, (%rsp,%rcx)
movb %dl, (%rax)
incq %rcx
decq %rax
cmpq $0x4, %rcx
jne 0x26e57
movq (%rsp), %rax
addq $0x70, %rsp
popq %rbx
retq
leaq 0xfac1(%rip), %rdx      # 0x36941
movq %rbx, %rdi
movl $0x3, %esi
callq 0x24dff