// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/build/c/shell.c
// Function: kshowdoc
static void kshowdoc(void) {
    if (!gbl_complete_env) return;
    while (is_symbol_char_gen(gbl_buf[gbl_pos])) gbl_pos++;
    JanetByteView prefix = get_symprefix();
    Janet symbol = janet_symbolv(prefix.bytes, prefix.len);
    Janet entry = janet_table_get(gbl_complete_env, symbol);
    if (!janet_checktype(entry, JANET_TABLE)) return;
    Janet doc = janet_table_get(janet_unwrap_table(entry), janet_ckeywordv("doc"));
    if (!janet_checktype(doc, JANET_STRING)) return;
    JanetString docs = janet_unwrap_string(doc);
    int num_cols = getcols();
    clearlines();
    fprintf(stderr, "\n\n\n");
    gbl_lines_below += 3;
    resolve_format(janet_unwrap_table(entry));
    fprintf(stderr, "\n");
    gbl_lines_below += 1;
    doc_format(docs, num_cols);
    fprintf(stderr, "\n\n");
    gbl_lines_below += 2;
    /* Go up to original line (zsh-like autocompletion) */
    fprintf(stderr, "\x1B[%dA", gbl_lines_below);
    fflush(stderr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %fs:0x0, %rax
leaq -0x1790(%rax), %rax
cmpq $0x0, (%rax)
jne 0x802e6
jmp 0x80588
jmp 0x802e8
movq %fs:0x0, %rax
leaq -0x1450(%rax), %rax
movq %rax, -0x48(%rbp)
movq %fs:0x0, %rax
movq %rax, %rcx
movq -0x48(%rbp), %rax
leaq -0x1010(%rcx), %rcx
movslq (%rcx), %rcx
movzbl (%rax,%rcx), %edi
callq 0x813f0
cmpl $0x0, %eax
je 0x80346
movq %fs:0x0, %rax
leaq -0x1010(%rax), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x802e8
callq 0x81590
movq %rax, -0x10(%rbp)
movl %edx, -0x8(%rbp)
movq -0x10(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x28cd0
movq %rax, %rdi
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
callq 0x19dd0
movq %rax, -0x18(%rbp)
movq %fs:0x0, %rax
leaq -0x1790(%rax), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x21df0
movq %rax, -0x20(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x8039f
jmp 0x803c5
movsd -0x20(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x803b1
jmp 0x803e7
movq -0x20(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x803e7
jmp 0x803e2
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x20(%rbp), %rax
movabsq $-0x3800000000000, %rcx # imm = 0xFFFC800000000000
cmpq %rcx, %rax
je 0x803e7
jmp 0x80588
movq -0x20(%rbp), %rdi
callq 0x1f9e0
movq %rax, -0x50(%rbp)
leaq 0x55ab9(%rip), %rdi     # 0xd5eb4
callq 0x19e00
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x19dd0
movq -0x50(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
callq 0x21df0
movq %rax, -0x28(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x8042f
jmp 0x80455
movsd -0x28(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x80441
jmp 0x80477
movq -0x28(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x80477
jmp 0x80472
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x28(%rbp), %rax
movabsq $-0x6000000000000, %rcx # imm = 0xFFFA000000000000
cmpq %rcx, %rax
je 0x80477
jmp 0x80588
movq -0x28(%rbp), %rdi
callq 0x1f9e0
movq %rax, -0x38(%rbp)
callq 0x7f8a0
movl %eax, -0x3c(%rbp)
callq 0x80020
movq 0x6cb58(%rip), %rax     # 0xecff0
movq (%rax), %rdi
leaq 0x56457(%rip), %rsi     # 0xd68f9
movb $0x0, %al
callq 0x15600
movq %fs:0x0, %rax
leaq -0x100c(%rax), %rax
movl (%rax), %ecx
addl $0x3, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x1f9e0
movq %rax, %rdi
callq 0x81630
movq 0x6cb15(%rip), %rax     # 0xecff0
movq (%rax), %rdi
leaq 0x56416(%rip), %rsi     # 0xd68fb
movb $0x0, %al
callq 0x15600
movq %fs:0x0, %rax
leaq -0x100c(%rax), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x81e20
movq 0x6cad7(%rip), %rax     # 0xecff0
movq (%rax), %rdi
leaq 0x563d7(%rip), %rsi     # 0xd68fa
movb $0x0, %al
callq 0x15600
movq %fs:0x0, %rax
leaq -0x100c(%rax), %rax
movl (%rax), %ecx
addl $0x2, %ecx
movl %ecx, (%rax)
movq 0x6caa5(%rip), %rax     # 0xecff0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq %fs:0x0, %rax
movq -0x58(%rbp), %rdi
leaq -0x100c(%rax), %rax
movl (%rax), %edx
leaq 0x5638b(%rip), %rsi     # 0xd68fd
movb $0x0, %al
callq 0x15600
movq 0x6ca70(%rip), %rax     # 0xecff0
movq (%rax), %rdi
callq 0x15790
addq $0x60, %rsp
popq %rbp
retq
nop