// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0xaa59(%rip), %rcx      # 0x36bf9
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3380
movl %ebp, %edx
negl %edx
cmovsl %ebp, %edx
testl %ebp, %ebp
leaq 0xa96d(%rip), %rax      # 0x36b2c
leaq 0x71cd(%rip), %rcx      # 0x33393
cmovnsq %rax, %rcx
leaq 0xa841(%rip), %rsi      # 0x36a12
leaq 0x50(%rsp), %rdi
xorl %eax, %eax
callq 0x3080
cmpl $0x40, %eax
jge 0x2c35f
leaq 0xaaac(%rip), %rsi      # 0x36c99
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %r13
movq %r13, %rdx
xorl %eax, %eax
callq 0x3080
cmpl $0x3f, %eax
jg 0x2c37d
testq %r14, %r14
jle 0x2c309
xorl %r12d, %r12d
leaq 0x90(%rsp), %rbp
movb $0x0, 0x90(%rsp)
movq (%r15,%r12,8), %xmm0
movq 0x1709d(%rip), %rcx     # 0x432d0
movq %xmm0, %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rcx
movq %rsi, %rax
cmoveq %rdx, %rax
movl %eax, %edi
notl %edi
testl $0x7ff00000, %edi       # imm = 0x7FF00000
jne 0x2c28b
cmpq $0x1, %rcx
movl %esi, %esi
movq %rdx, %rdi
cmoveq %rsi, %rdi
testl $0xfffff, %eax          # imm = 0xFFFFF
sete %r8b
testq %rdi, %rdi
sete %dil
testb %r8b, %dil
jne 0x2c2ab
testq %r12, %r12
leaq 0xaa1b(%rip), %rsi      # 0x36c9d
leaq 0xaa15(%rip), %rax      # 0x36c9e
jmp 0x2c2e6
testq %r12, %r12
leaq 0x10(%rsp), %rsi
cmoveq %r13, %rsi
movq %rbp, %rdi
movb $0x1, %al
callq 0x3080
cmpl $0x40, %eax
jl 0x2c2f2
jmp 0x2c32d
cmpq $0x1, %rcx
cmoveq %rdx, %rsi
cmpl $0x7ff00000, %esi       # imm = 0x7FF00000
jne 0x2c2ce
testq %r12, %r12
leaq 0xa9dd(%rip), %rsi      # 0x36ca2
leaq 0xa9d7(%rip), %rax      # 0x36ca3
jmp 0x2c2e6
cmpl $0x7ff00000, %eax       # imm = 0x7FF00000
je 0x2c2f2
testq %r12, %r12
leaq 0xa9c9(%rip), %rsi      # 0x36ca8
leaq 0xa9c3(%rip), %rax      # 0x36ca9
cmoveq %rax, %rsi
movq %rbp, %rdi
callq 0x3240
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3470
incq %r12
cmpq %r12, %r14
jne 0x2c21e
leaq 0xa81f(%rip), %rsi      # 0x36b2f
movq %rbx, %rdi
callq 0x3470
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3140
movq %rax, %r14
leaq 0xa937(%rip), %rsi      # 0x36c78
movq %rax, %rdi
callq 0x28d64
leaq 0x16830(%rip), %rsi     # 0x42b80
leaq -0x19095(%rip), %rdx    # 0x132c2
movq %r14, %rdi
callq 0x33f0
movl $0x20, %edi
callq 0x3140
movq %rax, %r14
leaq 0xa905(%rip), %rsi      # 0x36c78
movq %rax, %rdi
callq 0x28d64
jmp 0x2c349
movl $0x20, %edi
callq 0x3140
movq %rax, %r14
leaq 0xa8e7(%rip), %rsi      # 0x36c78
movq %rax, %rdi
callq 0x28d64
jmp 0x2c349
jmp 0x2c39f
jmp 0x2c39f
movq %rax, %r15
movq %r14, %rdi
callq 0x31c0
jmp 0x2c3b1
jmp 0x2c3ae
movq %rax, %r15
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x2c3cb
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32b0
movq %r15, %rdi
callq 0x3420
nop