// File: mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib::parse_bool_delim(char const*, char const*)
ae_bool alglib::parse_bool_delim(const char *s, const char *delim)
{
    const char *p;
    char buf[8];
    
    // try to parse false
    p = "false";
    memset(buf, 0, sizeof(buf));
    strncpy(buf, s, strlen(p));
    if( my_stricmp(buf, p)==0 )
    {
        if( s[strlen(p)]==0 || strchr(delim,s[strlen(p)])==NULL )
            throw alglib::ap_error("Cannot parse value");
        return ae_false;
    }

    // try to parse true
    p = "true";
    memset(buf, 0, sizeof(buf));
    strncpy(buf, s, strlen(p));
    if( my_stricmp(buf, p)==0 )
    {
        if( s[strlen(p)]==0 || strchr(delim,s[strlen(p)])==NULL )
            throw alglib::ap_error("Cannot parse value");
        return ae_true;
    }

    // error
    throw alglib::ap_error("Cannot parse value");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x10b0d(%rip), %rax     # 0x584e7
movq %rax, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x3160
leaq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3110
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0x3140
leaq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4c100
cmpq $0x0, %rax
jne 0x47ade
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3110
movq %rax, %rcx
movq -0x50(%rbp), %rax
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x47a82
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3110
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movq -0x58(%rbp), %rax
movsbl (%rax,%rcx), %esi
callq 0x30e0
cmpq $0x0, %rax
jne 0x47ad5
movl $0x20, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x68(%rbp)
leaq 0x10a50(%rip), %rsi     # 0x584ed
callq 0x42660
jmp 0x47aa4
movq -0x68(%rbp), %rdi
leaq 0x1d0c9(%rip), %rsi     # 0x64b78
leaq -0x2a306(%rip), %rdx    # 0x1d7b0
callq 0x3490
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x31e0
jmp 0x47c5f
movb $0x0, -0x1(%rbp)
jmp 0x47c51
leaq 0x10a1b(%rip), %rax     # 0x58500
movq %rax, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x3160
leaq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3110
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
callq 0x3140
leaq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4c100
cmpq $0x0, %rax
jne 0x47bf8
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3110
movq %rax, %rcx
movq -0x80(%rbp), %rax
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x47b99
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3110
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movq -0x88(%rbp), %rax
movsbl (%rax,%rcx), %esi
callq 0x30e0
cmpq $0x0, %rax
jne 0x47bf2
movl $0x20, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x98(%rbp)
leaq 0x10936(%rip), %rsi     # 0x584ed
callq 0x42660
jmp 0x47bbe
movq -0x98(%rbp), %rdi
leaq 0x1cfac(%rip), %rsi     # 0x64b78
leaq -0x2a423(%rip), %rdx    # 0x1d7b0
callq 0x3490
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x31e0
jmp 0x47c5f
movb $0x1, -0x1(%rbp)
jmp 0x47c51
movl $0x20, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
leaq 0x108d7(%rip), %rsi     # 0x584ed
callq 0x42660
jmp 0x47c1d
movq -0xa0(%rbp), %rdi
leaq 0x1cf4d(%rip), %rsi     # 0x64b78
leaq -0x2a482(%rip), %rdx    # 0x1d7b0
callq 0x3490
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x31e0
jmp 0x47c5f
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x34c0
nopl (%rax,%rax)