// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0xa1e4e
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
andq $0x20000000, %rax       # imm = 0x20000000
cmpq $0x0, %rax
je 0xa1e3a
movq 0x38(%rsp), %rax
movq (%rax), %rax
andq $0x10000, %rax          # imm = 0x10000
cmpq $0x0, %rax
je 0xa1e3a
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rsi
callq 0x14630
movq %rax, 0x50(%rsp)
jmp 0xa1f83
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xb3a0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1745e1(%rip), %rax    # 0x216440
testb $0x1, (%rax,%rcx)
je 0xa1ead
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x48(%rsp), %rax
movq 0xe90(%rax), %rdx
callq 0x3a500
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0xa1eab
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0xda50
movq %rax, 0x50(%rsp)
jmp 0xa1f83
jmp 0xa1ead
movq 0x38(%rsp), %rax
movq (%rax), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0xa1f58
movq 0x48(%rsp), %rax
testb $0x1, 0x24c(%rax)
je 0xa1f58
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x9a10
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rax
movq 0xe90(%rax), %rdx
callq 0x98d0
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rcx
cmpq 0x128(%rcx), %rax
je 0xa1f58
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x44270
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0xda50
movq %rax, 0x50(%rsp)
jmp 0xa1f83
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x3a3d0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x14630
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax)