// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r12
movb (%r12), %al
cmpb $0xa, %al
jne 0x7ee64
movq 0x8(%r12), %rax
testb $0x20, 0x3(%rax)
je 0x7ee54
testb $0x1, 0x2(%r12)
jne 0x7efe8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9a93
movq %rax, %r12
movb (%rax), %al
movzbl %al, %eax
leaq 0xc7aa2(%rip), %rcx     # 0x146910
cmpb $0x1, (%rax,%rcx)
jne 0x7ee99
movq 0xe90(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3e86d
testq %rax, %rax
je 0x7ee99
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
jmp 0x7f005
testb $0x40, 0x3(%r12)
je 0x7efc4
cmpb $0x1, 0x24c(%rbx)
jne 0x7efc4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8a63
movq 0xe90(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x89ff
cmpq 0x128(%rbx), %rax
je 0x7efc4
cmpb $0x1, (%r14)
jne 0x7eff5
movq %rax, (%rsp)
movq %r14, 0x4c8(%rbx)
movq 0x8(%r14), %r13
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %rbp
cmpq 0x98(%rbx), %rax
ja 0x7ef1b
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r12
movq $0x200001, (%r12)       # imm = 0x200001
movq %r13, 0x8(%r12)
movq %rbp, 0x10(%r12)
movq %r12, 0x4e8(%rbx)
movq 0x10(%r14), %r14
cmpb $0x1, (%r14)
jne 0x7efa9
movq %r12, %r13
movq 0x8(%r14), %rbp
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r15
cmpq 0x98(%rbx), %rax
ja 0x7ef7a
movq %rbx, %rdi
callq 0xa550
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 %r15, 0x10(%rax)
movq %rax, 0x10(%r13)
movq 0x10(%r14), %r14
cmpb $0x1, (%r14)
movq %rax, %r13
je 0x7ef50
movq 0x110(%rbx), %rax
movq %rax, 0x4e8(%rbx)
movq %rax, 0x4c8(%rbx)
movq (%rsp), %rax
jmp 0x7effc
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3e801
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9af
movq 0x20(%rax), %rax
movq 0x18(%rax), %rsi
movq %rbx, %rdi
jmp 0x7efd5
movq 0x110(%rbx), %r12
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xaee6