// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: g_documentation
static s7_pointer g_documentation(s7_scheme *sc, s7_pointer args)
                {
                    s7_pointer p;
#define H_documentation "(documentation obj) returns obj's documentation string"
#define Q_documentation s7_make_signature(sc, 2, sc->is_string_symbol, sc->T) /* should (documentation 1) be an error? */

                    p = car(args);
                    if (is_symbol(p))
                    {
                        if ((symbol_has_help(p)) &&
                                (is_global(p)))
                            return(s7_make_string(sc, symbol_help(p)));
                        p = s7_symbol_value(sc, p);
                    }

                    /* (documentation func) should act like (documentation abs) -- available without (openlet (funclet func)) or (openlet func)
                     *   so we check that case ahead of time here, rather than going through check_method which does not
                     *   call find_let unless has_active_methods(sc, func).  Adding T_HAS_METHODS to all closures causes other troubles.
                     */
                    if (has_closure_let(p))
                    {
                        s7_pointer func;
                        func = funclet_entry(sc, p, sc->documentation_symbol);
                        if (func)
                            return(s7_apply_function(sc, func, args));
                    }

                    /* it would be neat if this would work (define x (let ((+documentation+ "hio")) (vector 1 2 3))) (documentation x) */
                    check_method(sc, p, sc->documentation_symbol, args);
                    return(s7_make_string(sc, s7_documentation(sc, p)));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %r14
cmpb $0xa, (%r14)
jne 0x85194
movq 0x8(%r14), %rax
testb $0x20, 0x3(%rax)
je 0x85186
testb $0x1, 0x2(%r14)
jne 0x85313
movq %rbx, %rdi
movq %r14, %rsi
callq 0xaa24
movq %rax, %r14
movzbl (%r14), %eax
leaq 0xc9771(%rip), %rcx     # 0x14e910
cmpb $0x1, (%rax,%rcx)
jne 0x851db
movq 0xe90(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40e7b
movq %rax, %r12
testq %rax, %rax
je 0x851d2
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xbd41
movq %rax, %r13
jmp 0x851d2
testq %r12, %r12
jne 0x8535d
movb $0x1, %bpl
testb $0x40, 0x3(%r14)
je 0x85334
cmpb $0x1, 0x24c(%rbx)
jne 0x85334
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9a55
movq 0xe90(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x99ef
cmpq 0x128(%rbx), %rax
je 0x85334
cmpb $0x1, (%r15)
jne 0x8531d
movq %rax, 0x10(%rsp)
movq %r15, 0x4c8(%rbx)
movq 0x8(%r15), %rbp
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r12
cmpq 0x98(%rbx), %rax
ja 0x85259
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %rbp, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %rax, 0x8(%rsp)
movq %rax, 0x4e8(%rbx)
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
jne 0x852f2
movq 0x8(%rsp), %rbp
movq 0x8(%r15), %r12
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0x852bc
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %rax, 0x10(%rbp)
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
movq %rax, %rbp
je 0x85299
movq 0x110(%rbx), %rax
movq %rax, 0x4e8(%rbx)
movq %rax, 0x4c8(%rbx)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdx
jmp 0x85324
movq 0x20(%rax), %rax
movq 0x18(%rax), %rsi
jmp 0x85347
movq 0x110(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xbd41
movq %rax, %r13
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x8535d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40e10
movq %rax, %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf735
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq