// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_procedure_source
static s7_pointer g_procedure_source(s7_scheme *sc, s7_pointer args)
                {
                    /* make it look like a scheme-level lambda */
                    s7_pointer p;
#define H_procedure_source "(procedure-source func) tries to return the definition of func"
#define Q_procedure_source s7_make_signature(sc, 2, sc->is_list_symbol, s7_make_signature(sc, 2, sc->is_procedure_symbol, sc->is_macro_symbol))

                    p = car(args);
                    if (is_symbol(p))
                    {
                        p = s7_symbol_value(sc, p);
                        if (p == sc->undefined)
                            return(s7_error(sc, sc->wrong_type_arg_symbol,
                                        set_elist_2(sc, wrap_string(sc, "procedure-source arg, '~S, is unbound", 37), p)));
                    }

                    if ((is_c_function(p)) || (is_c_macro(p)))
                        return(sc->nil);

                    check_method_uncopied(sc, p, sc->procedure_source_symbol, list_1(sc, p));
                    if (has_closure_let(p))
                    {
                        s7_pointer body;
                        body = closure_body(p);
                        /* perhaps if this function has been removed from the heap, it would be better to use copy_body (as in s7_copy)? */
                        if (is_safe_closure_body(body))
                            clear_safe_closure_body(body);
                        return(append_in_place(sc,
                                    list_2(sc, ((is_closure_star(p)) || (is_macro_star(p)) || (is_bacro_star(p))) ? sc->lambda_star_symbol : sc->lambda_symbol, closure_args(p)),
                                    body));
                    }

                    if (!is_procedure(p))
                        return(simple_wrong_type_argument_with_type(sc, sc->procedure_source_symbol, p,
                                    wrap_string(sc, "a procedure or a macro", 22)));
                    return(sc->nil);
                }

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0xa21a2
movq 0xd8(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0xb3a0
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x128(%rcx), %rax
jne 0xa21a0
movq 0xd8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xd8(%rsp), %rax
movq 0x1940(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xd8(%rsp), %rdi
leaq 0x151c9c(%rip), %rsi    # 0x1f3dfe
movl $0x25, %edx
callq 0xb880
movq 0x60(%rsp), %rdi
movq %rax, %rsi
movq 0xc8(%rsp), %rdx
callq 0xb830
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0xe0(%rsp)
jmp 0xa2624
jmp 0xa21a2
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x30, %eax
jge 0xa21c2
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xa21de
movq 0xd8(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0xa2624
movq 0xc8(%rsp), %rax
movq (%rax), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0xa236b
movq 0xd8(%rsp), %rax
testb $0x1, 0x24c(%rax)
je 0xa236b
movq 0xd8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xd8(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0x9a10
movq 0x58(%rsp), %rdi
movq %rax, %rsi
movq 0xd8(%rsp), %rax
movq 0x1408(%rax), %rdx
callq 0x98d0
movq %rax, 0xc0(%rsp)
movq 0xd8(%rsp), %rcx
cmpq 0x128(%rcx), %rax
je 0xa236b
movq 0xd8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xd8(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0xd8(%rsp), %rax
movq 0x90(%rax), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0xa22d7
movq 0xd8(%rsp), %rdi
callq 0xc670
movq 0xd8(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdi
movq 0xb0(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xa8(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0xb8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdx
callq 0xda50
movq %rax, 0xe0(%rsp)
jmp 0xa2624
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1740c1(%rip), %rax    # 0x216440
testb $0x1, (%rax,%rcx)
je 0xa253f
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movzwl (%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0xa23c6
movq 0x98(%rsp), %rax
movzwl (%rax), %ecx
andl $0xffffefff, %ecx       # imm = 0xFFFFEFFF
movw %cx, (%rax)
movq 0xd8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x29, %eax
je 0xa2410
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2b, %eax
je 0xa2410
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2d, %eax
jne 0xa2426
movq 0xd8(%rsp), %rax
movq 0x17a0(%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0xa243a
movq 0xd8(%rsp), %rax
movq 0x1798(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xc8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0xd8(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0xd8(%rsp), %rax
movq 0x90(%rax), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0xa249c
movq 0xd8(%rsp), %rdi
callq 0xc670
movq 0xd8(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x80(%rsp), %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdx
callq 0xd9f0
movq 0x38(%rsp), %rdi
movq %rax, %rsi
movq 0x98(%rsp), %rdx
callq 0x16ddd0
movq %rax, 0xe0(%rsp)
jmp 0xa2624
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x17990d(%rip), %rax    # 0x21be60
testb $0x1, (%rax,%rcx)
jne 0xa260d
movq 0xc8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x14, %eax
jne 0xa2588
movq 0xc8(%rsp), %rax
movq (%rax), %rax
andq $0x200000, %rax         # imm = 0x200000
cmpq $0x0, %rax
jne 0xa260d
movq 0xd8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xd8(%rsp), %rax
movq 0x1408(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xd8(%rsp), %rax
movq 0x140(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0xd8(%rsp), %rdi
leaq 0x151847(%rip), %rsi    # 0x1f3e24
movl $0x16, %edx
callq 0xb880
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %rax, %r8
callq 0x14a60
movq %rax, 0xe0(%rsp)
jmp 0xa2624
movq 0xd8(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)