// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/io.c
// Function: cfun_io_print_impl_x
static Janet cfun_io_print_impl_x(int32_t argc, Janet *argv, int newline,
                                  FILE *dflt_file, int32_t offset, Janet x) {
    FILE *f;
    switch (janet_type(x)) {
        default:
            janet_panicf("cannot print to %v", x);
        case JANET_BUFFER: {
            /* Special case buffer */
            JanetBuffer *buf = janet_unwrap_buffer(x);
            for (int32_t i = offset; i < argc; ++i) {
                janet_to_string_b(buf, argv[i]);
            }
            if (newline)
                janet_buffer_push_u8(buf, '\n');
            return janet_wrap_nil();
        }
        case JANET_FUNCTION: {
            /* Special case function */
            JanetFunction *fun = janet_unwrap_function(x);
            JanetBuffer *buf = janet_buffer(0);
            for (int32_t i = offset; i < argc; ++i) {
                janet_to_string_b(buf, argv[i]);
            }
            if (newline)
                janet_buffer_push_u8(buf, '\n');
            Janet args[1] = { janet_wrap_buffer(buf) };
            janet_call(fun, 1, args);
            return janet_wrap_nil();
        }
        case JANET_NIL:
            f = dflt_file;
            if (f == NULL) janet_panic("cannot print to nil");
            break;
        case JANET_ABSTRACT: {
            void *abstract = janet_unwrap_abstract(x);
            if (janet_abstract_type(abstract) != &janet_file_type)
                return janet_wrap_nil();
            JanetFile *iofile = abstract;
            io_assert_writeable(iofile);
            f = iofile->file;
            break;
        }
    }
    for (int32_t i = offset; i < argc; ++i) {
        int32_t len;
        const uint8_t *vstr;
        if (janet_checktype(argv[i], JANET_BUFFER)) {
            JanetBuffer *b = janet_unwrap_buffer(argv[i]);
            vstr = b->data;
            len = b->count;
        } else {
            vstr = janet_to_string(argv[i]);
            len = janet_string_length(vstr);
        }
        if (len) {
            if (1 != fwrite(vstr, len, 1, f)) {
                if (f == dflt_file) {
                    janet_panicf("cannot print %d bytes", len);
                } else {
                    janet_panicf("cannot print %d bytes to %v", len, x);
                }
            }
        }
    }
    if (newline)
        putc('\n', f);
    return janet_wrap_nil();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %r9, -0x10(%rbp)
movl %edi, -0x14(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movq %rcx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x3eff3
jmp 0x3f007
movq -0x10(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0xa4(%rbp)
jmp 0x3f011
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
jmp 0x3f011
movl -0xa4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0xb0(%rbp)
subl $0xd, %eax
ja 0x3f03e
movq -0xb0(%rbp), %rax
leaq 0x4c31b(%rip), %rcx     # 0x8b350
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rsi
leaq 0x4d6e5(%rip), %rdi     # 0x8c72e
movb $0x0, %al
callq 0x1ac40
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3f08b
movq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x5a400
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3f063
cmpl $0x0, -0x24(%rbp)
je 0x3f09f
movq -0x48(%rbp), %rdi
movl $0xa, %esi
callq 0x18820
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x8(%rbp)
jmp 0x3f363
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x58(%rbp)
xorl %edi, %edi
callq 0x18490
movq %rax, -0x60(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3f0fd
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x5a400
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x3f0d5
cmpl $0x0, -0x24(%rbp)
je 0x3f111
movq -0x60(%rbp), %rdi
movl $0xa, %esi
callq 0x18820
movq -0x60(%rbp), %rdi
movabsq $-0x2800000000000, %rsi # imm = 0xFFFD800000000000
callq 0x7b610
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rdx
movl $0x1, %esi
callq 0x70ae0
movq %rax, -0x78(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x8(%rbp)
jmp 0x3f363
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x3f171
leaq 0x4d5d5(%rip), %rdi     # 0x8c741
callq 0x1ad60
jmp 0x3f1ce
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
leaq 0x6dc85(%rip), %rcx     # 0xace10
cmpq %rcx, -0x10(%rax)
je 0x3f1a9
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x8(%rbp)
jmp 0x3f363
movq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x3e9f0
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3f33c
xorl %eax, %eax
testb $0x1, %al
jne 0x3f1ee
jmp 0x3f22a
movq -0x20(%rbp), %rax
movslq -0x8c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x3f20b
jmp 0x3f252
movq -0x20(%rbp), %rax
movslq -0x8c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x3f252
jmp 0x3f291
movq -0x20(%rbp), %rcx
movslq -0x8c(%rbp), %rdx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rcx,%rdx,8), %rax
movabsq $-0x2800000000000, %rcx # imm = 0xFFFD800000000000
cmpq %rcx, %rax
jne 0x3f291
movq -0x20(%rbp), %rax
movslq -0x8c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7b260
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0xa0(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x90(%rbp)
jmp 0x3f2bc
movq -0x20(%rbp), %rax
movslq -0x8c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5abf0
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl -0x8(%rax), %eax
movl %eax, -0x90(%rbp)
cmpl $0x0, -0x90(%rbp)
je 0x3f326
movq -0x98(%rbp), %rdi
movslq -0x90(%rbp), %rsi
movq -0x40(%rbp), %rcx
movl $0x1, %edx
callq 0x12a90
movq %rax, %rcx
movl $0x1, %eax
cmpq %rcx, %rax
je 0x3f324
movq -0x40(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x3f30c
movl -0x90(%rbp), %esi
leaq 0x4d450(%rip), %rdi     # 0x8c755
movb $0x0, %al
callq 0x1ac40
movl -0x90(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x4d44e(%rip), %rdi     # 0x8c76b
movb $0x0, %al
callq 0x1ac40
jmp 0x3f326
jmp 0x3f328
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x3f1d7
cmpl $0x0, -0x24(%rbp)
je 0x3f350
movq -0x40(%rbp), %rsi
movl $0xa, %edi
callq 0x125b0
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq