// File: /workspace/github_cpp_makefile_star2_O1/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 0xac7b(%rip), %rcx      # 0x37a1d
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3380
movl %ebp, %edx
negl %edx
cmovsl %ebp, %edx
testl %ebp, %ebp
leaq 0xab8f(%rip), %rax      # 0x37950
leaq 0x75ab(%rip), %rcx      # 0x34373
cmovnsq %rax, %rcx
leaq 0xaa63(%rip), %rsi      # 0x37836
leaq 0x50(%rsp), %rdi
xorl %eax, %eax
callq 0x3080
cmpl $0x40, %eax
jge 0x2cf9e
leaq 0xacce(%rip), %rsi      # 0x37abd
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %r13
movq %r13, %rdx
xorl %eax, %eax
callq 0x3080
cmpl $0x3f, %eax
jg 0x2cfbc
testq %r14, %r14
jle 0x2cf48
xorl %r12d, %r12d
leaq 0x90(%rsp), %rbp
movb $0x0, 0x90(%rsp)
movq (%r15,%r12,8), %xmm0
movq 0x1749b(%rip), %rdx     # 0x442d0
movq %xmm0, %rcx
movq %rcx, %rax
shrq $0x20, %rax
cmpq $0x1, %rdx
movl %eax, %esi
cmovnel %ecx, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
jne 0x2ce9f
cmpq $0x1, %rdx
movl %ecx, %esi
cmovel %eax, %esi
movl %esi, %edi
notl %edi
testl $0x7ff00000, %edi       # imm = 0x7FF00000
jne 0x2cebf
cmpq $0x1, %rdx
movl %ecx, %edi
cmovneq %rax, %rdi
testl $0xfffff, %esi          # imm = 0xFFFFF
sete %sil
testq %rdi, %rdi
sete %dil
testb %sil, %dil
jne 0x2cebf
testq %r12, %r12
leaq 0xac2e(%rip), %rsi      # 0x37ac1
leaq 0xac28(%rip), %rax      # 0x37ac2
jmp 0x2cf25
testq %r12, %r12
leaq 0x10(%rsp), %rsi
cmoveq %r13, %rsi
movq %rbp, %rdi
movb $0x1, %al
callq 0x3080
cmpl $0x40, %eax
jl 0x2cf31
jmp 0x2cf6c
cmpq $0x1, %rdx
movl %ecx, %esi
movq %rsi, %rdi
cmoveq %rax, %rdi
cmovneq %rax, %rsi
xorq $0x7ff00000, %rdi       # imm = 0x7FF00000
orq %rsi, %rdi
jne 0x2ceef
testq %r12, %r12
leaq 0xabe0(%rip), %rsi      # 0x37ac6
leaq 0xabda(%rip), %rax      # 0x37ac7
jmp 0x2cf25
cmpq $0x1, %rdx
movl %ecx, %edx
cmovneq %rax, %rdx
cmovnel %ecx, %eax
testq %rdx, %rdx
jne 0x2cf31
cmpl $0x7ff00000, %eax       # imm = 0x7FF00000
je 0x2cf31
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7ff00000, %eax       # imm = 0x7FF00000
jne 0x2cf31
testq %r12, %r12
leaq 0xabae(%rip), %rsi      # 0x37acc
leaq 0xaba8(%rip), %rax      # 0x37acd
cmoveq %rax, %rsi
movq %rbp, %rdi
callq 0x3240
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3470
incq %r12
cmpq %r12, %r14
jne 0x2ce20
leaq 0xaa04(%rip), %rsi      # 0x37953
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 0xab1c(%rip), %rsi      # 0x37a9c
movq %rax, %rdi
callq 0x2966e
leaq 0x16bf1(%rip), %rsi     # 0x43b80
leaq -0x19712(%rip), %rdx    # 0x13884
movq %r14, %rdi
callq 0x33f0
movl $0x20, %edi
callq 0x3140
movq %rax, %r14
leaq 0xaaea(%rip), %rsi      # 0x37a9c
movq %rax, %rdi
callq 0x2966e
jmp 0x2cf88
movl $0x20, %edi
callq 0x3140
movq %rax, %r14
leaq 0xaacc(%rip), %rsi      # 0x37a9c
movq %rax, %rdi
callq 0x2966e
jmp 0x2cf88
jmp 0x2cfde
jmp 0x2cfde
movq %rax, %r15
movq %r14, %rdi
callq 0x31c0
jmp 0x2cff0
jmp 0x2cfed
movq %rax, %r15
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x2d00a
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32b0
movq %r15, %rdi
callq 0x3420