// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/pp.c
// Function: print_jdn_one
static int print_jdn_one(struct pretty *S, Janet x, int depth) {
    if (depth == 0) return 1;
    switch (janet_type(x)) {
        case JANET_NIL:
        case JANET_BOOLEAN:
        case JANET_BUFFER:
        case JANET_STRING:
            janet_description_b(S->buffer, x);
            break;
        case JANET_NUMBER:
            janet_buffer_ensure(S->buffer, S->buffer->count + BUFSIZE, 2);
            double num = janet_unwrap_number(x);
            if (isnan(num)) return 1;
            if (isinf(num)) return 1;
            janet_buffer_dtostr(S->buffer, num);
            break;
        case JANET_SYMBOL:
        case JANET_KEYWORD:
            if (contains_bad_chars(janet_unwrap_keyword(x), janet_type(x) == JANET_SYMBOL)) return 1;
            janet_description_b(S->buffer, x);
            break;
        case JANET_TUPLE: {
            JanetTuple t = janet_unwrap_tuple(x);
            int isb = janet_tuple_flag(t) & JANET_TUPLE_FLAG_BRACKETCTOR;
            janet_buffer_push_u8(S->buffer, isb ? '[' : '(');
            for (int32_t i = 0; i < janet_tuple_length(t); i++) {
                if (i) janet_buffer_push_u8(S->buffer, ' ');
                if (print_jdn_one(S, t[i], depth - 1)) return 1;
            }
            janet_buffer_push_u8(S->buffer, isb ? ']' : ')');
        }
        break;
        case JANET_ARRAY: {
            janet_table_put(&S->seen, x, janet_wrap_true());
            JanetArray *a = janet_unwrap_array(x);
            janet_buffer_push_cstring(S->buffer, "@[");
            for (int32_t i = 0; i < a->count; i++) {
                if (i) janet_buffer_push_u8(S->buffer, ' ');
                if (print_jdn_one(S, a->data[i], depth - 1)) return 1;
            }
            janet_buffer_push_u8(S->buffer, ']');
        }
        break;
        case JANET_TABLE: {
            janet_table_put(&S->seen, x, janet_wrap_true());
            JanetTable *tab = janet_unwrap_table(x);
            janet_buffer_push_cstring(S->buffer, "@{");
            int isFirst = 1;
            for (int32_t i = 0; i < tab->capacity; i++) {
                const JanetKV *kv = tab->data + i;
                if (janet_checktype(kv->key, JANET_NIL)) continue;
                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
                isFirst = 0;
                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
                janet_buffer_push_u8(S->buffer, ' ');
                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
            }
            janet_buffer_push_u8(S->buffer, '}');
        }
        break;
        case JANET_STRUCT: {
            JanetStruct st = janet_unwrap_struct(x);
            janet_buffer_push_u8(S->buffer, '{');
            int isFirst = 1;
            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
                const JanetKV *kv = st + i;
                if (janet_checktype(kv->key, JANET_NIL)) continue;
                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
                isFirst = 0;
                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
                janet_buffer_push_u8(S->buffer, ' ');
                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
            }
            janet_buffer_push_u8(S->buffer, '}');
        }
        break;
        default:
            return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x5d5d8
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5d5ea
jmp 0x5d5fe
movq -0x10(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0x8c(%rbp)
jmp 0x5d608
xorl %eax, %eax
movl %eax, -0x8c(%rbp)
jmp 0x5d608
movl -0x8c(%rbp), %eax
movl %eax, %ecx
movq %rcx, -0x98(%rbp)
subl $0xb, %eax
ja 0x5dbf8
movq -0x98(%rbp), %rax
leaq 0x38396(%rip), %rcx     # 0x959c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x5a990
jmp 0x5dc01
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %esi
addl $0x40, %esi
movl $0x2, %edx
callq 0x184c0
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5d686
jmp 0x5d692
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
movsd -0x28(%rbp), %xmm1
movaps %xmm1, %xmm0
movaps 0x2891f(%rip), %xmm2    # 0x85fc0
pand %xmm2, %xmm0
movq %xmm1, %rdx
movl $0x1, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %eax, %ecx
movsd 0x288d5(%rip), %xmm1    # 0x85f98
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setnp %sil
sete %dl
testb %sil, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x5d6e7
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movsd -0x28(%rbp), %xmm0
callq 0x67200
jmp 0x5dc01
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0xa0(%rbp)
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5d71f
jmp 0x5d733
movq -0x10(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
movl %eax, -0xa4(%rbp)
jmp 0x5d73d
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
jmp 0x5d73d
movq -0xa0(%rbp), %rdi
movl -0xa4(%rbp), %eax
cmpl $0x5, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x5dc20
cmpl $0x0, %eax
je 0x5d76b
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x5a990
jmp 0x5dc01
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x20(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0x34(%rbp), %edx
movl $0x28, %eax
movl $0x5b, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movzbl %al, %esi
callq 0x18820
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl -0x10(%rcx), %eax
jge 0x5d821
cmpl $0x0, -0x38(%rbp)
je 0x5d7e8
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0x18820
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl -0x1c(%rbp), %edx
subl $0x1, %edx
movq (%rax,%rcx,8), %rsi
callq 0x5d5b0
cmpl $0x0, %eax
je 0x5d814
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
jmp 0x5d816
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x5d7c5
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0x34(%rbp), %edx
movl $0x29, %eax
movl $0x5d, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movzbl %al, %esi
callq 0x18820
jmp 0x5dc01
movq -0x18(%rbp), %rax
addq $0x28, %rax
movq %rax, -0xb0(%rbp)
movabsq $-0x6ffffffffffff, %rdi # imm = 0xFFF9000000000001
callq 0x7b460
movq -0xb0(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x697e0
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x3826a(%rip), %rsi     # 0x95b03
callq 0x18750
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x5d905
cmpl $0x0, -0x4c(%rbp)
je 0x5d8c8
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0x18820
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x4c(%rbp), %rcx
movl -0x1c(%rbp), %edx
subl $0x1, %edx
movq (%rax,%rcx,8), %rsi
callq 0x5d5b0
cmpl $0x0, %eax
je 0x5d8f8
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
jmp 0x5d8fa
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x5d8a5
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x5d, %esi
callq 0x18820
jmp 0x5dc01
movq -0x18(%rbp), %rax
addq $0x28, %rax
movq %rax, -0xb8(%rbp)
movabsq $-0x6ffffffffffff, %rdi # imm = 0xFFF9000000000001
callq 0x7b460
movq -0xb8(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x697e0
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x381f2(%rip), %rsi     # 0x95b5e
callq 0x18750
movl $0x1, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x5da8d
movq -0x60(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x68(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x5d9ae
jmp 0x5d9da
movq -0x70(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5d9c3
jmp 0x5d9fa
movq -0x70(%rbp), %rax
movq (%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x5d9fa
jmp 0x5d9ff
movq -0x70(%rbp), %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rcx), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x5d9ff
jmp 0x5da7f
cmpl $0x0, -0x64(%rbp)
jne 0x5da16
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0x18820
movl $0x0, -0x64(%rbp)
movq -0x18(%rbp), %rdi
movq -0x70(%rbp), %rax
movl -0x1c(%rbp), %edx
subl $0x1, %edx
movq (%rax), %rsi
callq 0x5d5b0
cmpl $0x0, %eax
je 0x5da44
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0x18820
movq -0x18(%rbp), %rdi
movq -0x70(%rbp), %rax
movl -0x1c(%rbp), %edx
subl $0x1, %edx
movq 0x8(%rax), %rsi
callq 0x5d5b0
cmpl $0x0, %eax
je 0x5da7d
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
jmp 0x5da7f
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x5d97f
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x7d, %esi
callq 0x18820
jmp 0x5dc01
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x7b, %esi
callq 0x18820
movl $0x1, -0x7c(%rbp)
movl $0x0, -0x80(%rbp)
movl -0x80(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl -0x10(%rcx), %eax
jge 0x5dbe5
movq -0x78(%rbp), %rax
movslq -0x80(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x5dafd
jmp 0x5db2f
movq -0x88(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5db15
jmp 0x5db52
movq -0x88(%rbp), %rax
movq (%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x5db52
jmp 0x5db57
movq -0x88(%rbp), %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rcx), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x5db57
jmp 0x5dbd7
cmpl $0x0, -0x7c(%rbp)
jne 0x5db6e
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0x18820
movl $0x0, -0x7c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x88(%rbp), %rax
movl -0x1c(%rbp), %edx
subl $0x1, %edx
movq (%rax), %rsi
callq 0x5d5b0
cmpl $0x0, %eax
je 0x5db9c
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0x18820
movq -0x18(%rbp), %rdi
movq -0x88(%rbp), %rax
movl -0x1c(%rbp), %edx
subl $0x1, %edx
movq 0x8(%rax), %rsi
callq 0x5d5b0
cmpl $0x0, %eax
je 0x5dbd5
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
jmp 0x5dbd7
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x5dacf
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x7d, %esi
callq 0x18820
jmp 0x5dc01
movl $0x1, -0x4(%rbp)
jmp 0x5dc08
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)