// File: mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib::arraytostring[abi:cxx11](double const*, long, int)
std::string alglib::arraytostring(const double *ptr, ae_int_t n, int _dps)
{
    std::string result;
    ae_int_t i;
    char buf[64];
    char mask1[64];
    char mask2[64];
    int dps = _dps>=0 ? _dps : -_dps;
    result = "[";
    if( sprintf(mask1, "%%.%d%s", dps, _dps>=0 ? "f" : "e")>=(int)sizeof(mask1) )
        throw ap_error("arraytostring(): buffer overflow");
    if( sprintf(mask2, ",%s", mask1)>=(int)sizeof(mask2) )
        throw ap_error("arraytostring(): buffer overflow");
    for(i=0; i<n; i++)
    {
        buf[0] = 0;
        if( fp_isfinite(ptr[i]) )
        {
            if( sprintf(buf, i==0 ? mask1 : mask2, double(ptr[i]))>=(int)sizeof(buf) )
                throw ap_error("arraytostring(): buffer overflow");
        }
        else if( fp_isnan(ptr[i]) )
            strcpy(buf, i==0 ?  "NAN" :  ",NAN");
        else if( fp_isposinf(ptr[i]) )
            strcpy(buf, i==0 ? "+INF" : ",+INF");
        else if( fp_isneginf(ptr[i]) )
            strcpy(buf, i==0 ? "-INF" : ",-INF");
        result += buf;
    }
    result += "]";
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x118(%rbp)
movq %rdi, %rax
movq %rax, -0x110(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
callq 0x33e0
cmpl $0x0, -0x1c(%rbp)
jl 0x48df5
movl -0x1c(%rbp), %eax
movl %eax, -0x11c(%rbp)
jmp 0x48e00
xorl %eax, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x11c(%rbp)
movq -0x118(%rbp), %rdi
movl -0x11c(%rbp), %eax
movl %eax, -0xf4(%rbp)
leaq 0xf687(%rip), %rsi      # 0x584a1
callq 0x33d0
jmp 0x48e21
leaq -0xb0(%rbp), %rax
movq %rax, -0x128(%rbp)
movl -0xf4(%rbp), %eax
movl %eax, -0x120(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x48e51
leaq 0xf58c(%rip), %rax      # 0x583d4
movq %rax, -0x130(%rbp)
jmp 0x48e61
leaq 0xc50b(%rip), %rax      # 0x55363
movq %rax, -0x130(%rbp)
jmp 0x48e61
movl -0x120(%rbp), %edx
movq -0x128(%rbp), %rdi
movq -0x130(%rbp), %rcx
leaq 0xf43e(%rip), %rsi      # 0x582ba
movb $0x0, %al
callq 0x3080
cmpl $0x40, %eax
jl 0x48f06
movl $0x20, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x138(%rbp)
leaq 0xf67a(%rip), %rsi      # 0x58520
callq 0x42660
jmp 0x48ead
movq -0x138(%rbp), %rdi
leaq 0x1bcbd(%rip), %rsi     # 0x64b78
leaq -0x2b712(%rip), %rdx    # 0x1d7b0
callq 0x3490
jmp 0x491f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x491de
movq -0x138(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
callq 0x31e0
jmp 0x491de
leaq -0xf0(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
leaq 0xf626(%rip), %rsi      # 0x58541
movb $0x0, %al
callq 0x3080
cmpl $0x40, %eax
jl 0x48f8e
movl $0x20, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x140(%rbp)
leaq 0xf5db(%rip), %rsi      # 0x58520
callq 0x42660
jmp 0x48f4c
movq -0x140(%rbp), %rdi
leaq 0x1bc1e(%rip), %rsi     # 0x64b78
leaq -0x2b7b1(%rip), %rdx    # 0x1d7b0
callq 0x3490
jmp 0x491f6
movq -0x140(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
callq 0x31e0
jmp 0x491de
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x491a3
movb $0x0, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x4c670
movb %al, -0x141(%rbp)
jmp 0x48fc2
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0x48fd1
jmp 0x49096
leaq -0x70(%rbp), %rax
movq %rax, -0x150(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x48ff3
leaq -0xb0(%rbp), %rax
movq %rax, -0x158(%rbp)
jmp 0x49003
leaq -0xf0(%rbp), %rax
movq %rax, -0x158(%rbp)
jmp 0x49003
movq -0x150(%rbp), %rdi
movq -0x158(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movb $0x1, %al
callq 0x3080
cmpl $0x40, %eax
jl 0x49091
movl $0x20, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x160(%rbp)
leaq 0xf4d8(%rip), %rsi      # 0x58520
callq 0x42660
jmp 0x4904f
movq -0x160(%rbp), %rdi
leaq 0x1bb1b(%rip), %rsi     # 0x64b78
leaq -0x2b8b4(%rip), %rdx    # 0x1d7b0
callq 0x3490
jmp 0x491f6
movq -0x160(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
callq 0x31e0
jmp 0x491de
jmp 0x4917e
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x43570
movb %al, -0x161(%rbp)
jmp 0x490b0
movb -0x161(%rbp), %al
testb $0x1, %al
jne 0x490bc
jmp 0x490e4
leaq -0x70(%rbp), %rdi
movq -0x28(%rbp), %rcx
leaq 0xf47a(%rip), %rsi      # 0x58545
leaq 0xf474(%rip), %rax      # 0x58546
cmpq $0x0, %rcx
cmoveq %rax, %rsi
callq 0x3290
jmp 0x4917c
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x4c6a0
movb %al, -0x162(%rbp)
jmp 0x490fe
movb -0x162(%rbp), %al
testb $0x1, %al
jne 0x4910a
jmp 0x4912f
leaq -0x70(%rbp), %rdi
movq -0x28(%rbp), %rcx
leaq 0xf431(%rip), %rsi      # 0x5854a
leaq 0xf42b(%rip), %rax      # 0x5854b
cmpq $0x0, %rcx
cmoveq %rax, %rsi
callq 0x3290
jmp 0x4917a
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x4c6d0
movb %al, -0x163(%rbp)
jmp 0x49149
movb -0x163(%rbp), %al
testb $0x1, %al
jne 0x49155
jmp 0x49178
leaq -0x70(%rbp), %rdi
movq -0x28(%rbp), %rcx
leaq 0xf3ec(%rip), %rsi      # 0x58550
leaq 0xf3e6(%rip), %rax      # 0x58551
cmpq $0x0, %rcx
cmoveq %rax, %rsi
callq 0x3290
jmp 0x4917a
jmp 0x4917c
jmp 0x4917e
movq -0x118(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x32c0
jmp 0x49190
jmp 0x49192
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x48f96
movq -0x118(%rbp), %rdi
leaq 0xf226(%rip), %rsi      # 0x583d7
callq 0x32c0
jmp 0x491b8
movb $0x1, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x491ce
movq -0x118(%rbp), %rdi
callq 0x31a0
movq -0x110(%rbp), %rax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x118(%rbp), %rdi
callq 0x31a0
movq -0x100(%rbp), %rdi
callq 0x34c0
nopw %cs:(%rax,%rax)