// File: /workspace/github_cpp_makefile_star2_O1/skeeto[P]elisp-ffi/ffi-glue.cc
// Function: Machine::read_array()
void read_array() {
        int type = std::cin.get();
        void* raw_ptr = stack.pop().value.ptr;
        size_t length = stack.pop().value.u64;
        out_ << '(';
        switch(type) {
        case 'u': {
            uint8_t* ptr = static_cast<uint8_t*>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << static_cast<unsigned int>(ptr[i]) << ' ';
            }
            break;
        case 'v': {
            uint16_t* ptr = static_cast<uint16_t*>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << ptr[i] << ' ';
            }
            break;
        case 'w': {
            uint32_t* ptr = static_cast<uint32_t*>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << ptr[i] << ' ';
            }
            break;
        case 'x': {
            uint64_t* ptr = static_cast<uint64_t*>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << ptr[i] << ' ';
            }
            break;
        case 'i': {
            int8_t* ptr = static_cast<int8_t*>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << static_cast<int>(ptr[i]) << ' ';
            }
            break;
        case 'j': {
            int16_t* ptr = static_cast<int16_t*>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << ptr[i] << ' ';
            }
            break;
        case 'k': {
            int32_t* ptr = static_cast<int32_t*>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << ptr[i] << ' ';
            }
            break;
        case 'l': {
            int64_t* ptr = static_cast<int64_t*>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << ptr[i] << ' ';
            }
            break;
        case 'f': {
            float* ptr = static_cast<float*>(raw_ptr);
            for(size_t i = 0; i < length; i++) {
                float value = ptr[i];
                if(std::isnan(value)) {
                    out_ << "0.0e+NaN";
                } else if(std::isinf(value)) {
                    if(value < 0) {
                        out_ << "-1.0e+INF";
                    } else {
                        out_ << "1.0e+INF";
                    }
                } else {
                    out_ << value;
                }
                out_ << ' ';
            }}
            break;
        case 'd': {
            double* ptr = static_cast<double*>(raw_ptr);
            for(size_t i = 0; i < length; i++) {
                double value = ptr[i];
                if(std::isnan(value)) {
                    out_ << "0.0e+NaN";
                } else if(std::isinf(value)) {
                    if(value < 0) {
                        out_ << "-1.0e+INF";
                    } else {
                        out_ << "1.0e+INF";
                    }
                } else {
                    out_ << value;
                }
                out_ << ' ';
            }}
            break;
        case 'p': {
            void** ptr = static_cast<void**>(raw_ptr);
            for(size_t i = 0; i < length; i++)
                out_ << ptr[i] << ' ';
            }
            break;
        default:
            std::cerr << "invalid type in read_array: " << static_cast<char>(type) << std::endl;
            return;
        }
        out_ << ")\n$";
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x3102(%rip), %rdi      # 0x5fc8
callq 0x21c0
movl %eax, %r14d
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rdi
leaq -0x10(%rax), %rcx
movq -0x8(%rax), %rbp
movq %rcx, 0x8(%rbx)
movq -0x18(%rax), %r12
addq $-0x20, %rax
movq %rax, 0x8(%rbx)
leaq 0x16(%rsp), %rsi
movb $0x28, (%rsi)
movl $0x1, %edx
callq 0x21b0
leal -0x64(%r14), %eax
cmpl $0x14, %eax
ja 0x32be
leaq 0x123c(%rip), %rcx      # 0x4150
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testq %r12, %r12
je 0x329a
xorl %r14d, %r14d
leaq 0x14(%rsp), %r15
movabsq $0x7ff0000000000000, %r13 # imm = 0x7FF0000000000000
movsd (%rbp,%r14,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0x2faf
movq %xmm0, %rax
btrq $0x3f, %rax
cmpq %r13, %rax
jne 0x2f70
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movq 0x18(%rbx), %rdi
jbe 0x2f7b
movl $0x9, %edx
leaq 0x123f(%rip), %rsi      # 0x41ad
jmp 0x2f87
movq 0x18(%rbx), %rdi
callq 0x2230
jmp 0x2f8c
movl $0x8, %edx
leaq 0x1227(%rip), %rsi      # 0x41ae
callq 0x21b0
movq 0x18(%rbx), %rdi
movb $0x20, 0x14(%rsp)
movl $0x1, %edx
movq %r15, %rsi
callq 0x21b0
incq %r14
cmpq %r14, %r12
jne 0x2f38
jmp 0x329a
movq 0x18(%rbx), %rdi
movl $0x8, %edx
leaq 0x11e5(%rip), %rsi      # 0x41a4
jmp 0x2f87
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0xe(%rsp), %r14
movq 0x18(%rbx), %rdi
movq (%rbp,%r15,8), %rsi
callq 0x20e0
movb $0x20, 0xe(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x2fd2
jmp 0x329a
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0x11(%rsp), %r14
movq 0x18(%rbx), %rdi
movl (%rbp,%r15,4), %esi
callq 0x2250
movb $0x20, 0x11(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x3013
jmp 0x329a
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0x12(%rsp), %r14
movq 0x18(%rbx), %rdi
movq (%rbp,%r15,8), %rsi
callq 0x2160
movb $0x20, 0x12(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x3054
jmp 0x329a
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movq 0x18(%rbx), %rdi
movswl (%rbp,%r15,2), %esi
callq 0x2140
movb $0x20, 0x10(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x3095
jmp 0x329a
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0xf(%rsp), %r14
movq 0x18(%rbx), %rdi
movsbl (%rbp,%r15), %esi
callq 0x2250
movb $0x20, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x30d7
jmp 0x329a
testq %r12, %r12
je 0x329a
xorl %r14d, %r14d
leaq 0x13(%rsp), %r15
leaq 0x108e(%rip), %r13      # 0x41ae
movss (%rbp,%r14,4), %xmm0
ucomiss %xmm0, %xmm0
jp 0x3195
movd %xmm0, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7f800000, %eax       # imm = 0x7F800000
jne 0x3156
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
movq 0x18(%rbx), %rdi
jbe 0x3165
movl $0x9, %edx
leaq 0x1059(%rip), %rsi      # 0x41ad
jmp 0x316d
movq 0x18(%rbx), %rdi
cvtss2sd %xmm0, %xmm0
callq 0x2230
jmp 0x3172
movl $0x8, %edx
movq %r13, %rsi
callq 0x21b0
movq 0x18(%rbx), %rdi
movb $0x20, 0x13(%rsp)
movl $0x1, %edx
movq %r15, %rsi
callq 0x21b0
incq %r14
cmpq %r14, %r12
jne 0x3120
jmp 0x329a
movq 0x18(%rbx), %rdi
movl $0x8, %edx
leaq 0xfff(%rip), %rsi       # 0x41a4
jmp 0x316d
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0x15(%rsp), %r14
movq 0x18(%rbx), %rdi
movq (%rbp,%r15,8), %rsi
callq 0x2100
movb $0x20, 0x15(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x31b8
jmp 0x329a
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0xb(%rsp), %r14
movq 0x18(%rbx), %rdi
movzbl (%rbp,%r15), %esi
callq 0x20e0
movb $0x20, 0xb(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x31f9
jmp 0x329a
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0xd(%rsp), %r14
movq 0x18(%rbx), %rdi
movl (%rbp,%r15,4), %esi
callq 0x20e0
movb $0x20, 0xd(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x3234
jmp 0x329a
testq %r12, %r12
je 0x329a
xorl %r15d, %r15d
leaq 0xc(%rsp), %r14
movq 0x18(%rbx), %rdi
movzwl (%rbp,%r15,2), %esi
callq 0x20e0
movb $0x20, 0xc(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r15
cmpq %r15, %r12
jne 0x326e
movq 0x18(%rbx), %rdi
leaq 0xf79(%rip), %rsi       # 0x421e
movl $0x3, %edx
callq 0x21b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d2b(%rip), %rbx      # 0x5ff0
leaq 0xf35(%rip), %rsi       # 0x4201
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x21b0
leaq 0x17(%rsp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20f0
jmp 0x32af