// File: /workspace/github_cpp_makefile_star2_O3/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 0x306e(%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 0x3352
leaq 0x11d8(%rip), %rcx      # 0x4180
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testq %r12, %r12
je 0x332e
xorl %r14d, %r14d
leaq 0x14(%rsp), %r15
movabsq $0x7ff0000000000000, %r13 # imm = 0x7FF0000000000000
movsd (%rbp,%r14,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0x3043
movq %xmm0, %rax
btrq $0x3f, %rax
cmpq %r13, %rax
jne 0x3004
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movq 0x18(%rbx), %rdi
jbe 0x300f
movl $0x9, %edx
leaq 0x11db(%rip), %rsi      # 0x41dd
jmp 0x301b
movq 0x18(%rbx), %rdi
callq 0x2230
jmp 0x3020
movl $0x8, %edx
leaq 0x11c3(%rip), %rsi      # 0x41de
callq 0x21b0
movq 0x18(%rbx), %rdi
movb $0x20, 0x14(%rsp)
movl $0x1, %edx
movq %r15, %rsi
callq 0x21b0
incq %r14
cmpq %r14, %r12
jne 0x2fcc
jmp 0x332e
movq 0x18(%rbx), %rdi
movl $0x8, %edx
leaq 0x1181(%rip), %rsi      # 0x41d4
jmp 0x301b
testq %r12, %r12
je 0x332e
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 0x3066
jmp 0x332e
testq %r12, %r12
je 0x332e
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 0x30a7
jmp 0x332e
testq %r12, %r12
je 0x332e
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 0x30e8
jmp 0x332e
testq %r12, %r12
je 0x332e
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 0x3129
jmp 0x332e
testq %r12, %r12
je 0x332e
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 0x316b
jmp 0x332e
testq %r12, %r12
je 0x332e
xorl %r14d, %r14d
leaq 0x13(%rsp), %r15
leaq 0x102a(%rip), %r13      # 0x41de
movss (%rbp,%r14,4), %xmm0
ucomiss %xmm0, %xmm0
jp 0x3229
movd %xmm0, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7f800000, %eax       # imm = 0x7F800000
jne 0x31ea
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
movq 0x18(%rbx), %rdi
jbe 0x31f9
movl $0x9, %edx
leaq 0xff5(%rip), %rsi       # 0x41dd
jmp 0x3201
movq 0x18(%rbx), %rdi
cvtss2sd %xmm0, %xmm0
callq 0x2230
jmp 0x3206
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 0x31b4
jmp 0x332e
movq 0x18(%rbx), %rdi
movl $0x8, %edx
leaq 0xf9b(%rip), %rsi       # 0x41d4
jmp 0x3201
testq %r12, %r12
je 0x332e
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 0x324c
jmp 0x332e
testq %r12, %r12
je 0x332e
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 0x328d
jmp 0x332e
testq %r12, %r12
je 0x332e
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 0x32c8
jmp 0x332e
testq %r12, %r12
je 0x332e
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 0x3302
movq 0x18(%rbx), %rdi
leaq 0xf15(%rip), %rsi       # 0x424e
movl $0x3, %edx
callq 0x21b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2c97(%rip), %rbx      # 0x5ff0
leaq 0xed1(%rip), %rsi       # 0x4231
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 0x3343