// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_call_cc
static s7_pointer g_call_cc(s7_scheme *sc, s7_pointer args)
    {
#define H_call_cc "(call-with-current-continuation (lambda (continuer)...)) is always a mistake!"
#define Q_call_cc s7_make_signature(sc, 2, sc->T, sc->is_procedure_symbol)

        s7_pointer p;
        p = car(args);                             /* this is the procedure passed to call/cc */
        if (!is_t_procedure(p))                    /* this includes continuations */
        {
            check_method(sc, p, sc->call_cc_symbol, args);
            check_method(sc, p, sc->call_with_current_continuation_symbol, args);
            return(simple_wrong_type_argument_with_type(sc, sc->call_cc_symbol, p, a_procedure_string));
        }
        if (!s7_is_aritable(sc, p, 1))
            return(s7_error(sc, sc->wrong_type_arg_symbol, set_elist_2(sc, wrap_string(sc, "call/cc procedure, ~A, should take one argument", 47), p)));

        sc->w = s7_make_continuation(sc);
        push_stack(sc, OP_APPLY, list_1(sc, sc->w), p);
        sc->w = sc->nil;

        return(sc->nil);
    }

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x17f197(%rip), %rax    # 0x21be60
testb $0x1, (%rax,%rcx)
jne 0x9cead
movq 0x78(%rsp), %rax
movq (%rax), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0x9cd9c
movq 0x88(%rsp), %rax
testb $0x1, 0x24c(%rax)
je 0x9cd9c
movq 0x88(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x88(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x9a10
movq 0x40(%rsp), %rdi
movq %rax, %rsi
movq 0x88(%rsp), %rax
movq 0xce8(%rax), %rdx
callq 0x98d0
movq %rax, 0x70(%rsp)
movq 0x88(%rsp), %rcx
cmpq 0x128(%rcx), %rax
je 0x9cd9c
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x44270
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, %rdx
callq 0xda50
movq %rax, 0x90(%rsp)
jmp 0x9d0ad
movq 0x78(%rsp), %rax
movq (%rax), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0x9ce65
movq 0x88(%rsp), %rax
testb $0x1, 0x24c(%rax)
je 0x9ce65
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x88(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x9a10
movq 0x28(%rsp), %rdi
movq %rax, %rsi
movq 0x88(%rsp), %rax
movq 0xcf0(%rax), %rdx
callq 0x98d0
movq %rax, 0x68(%rsp)
movq 0x88(%rsp), %rcx
cmpq 0x128(%rcx), %rax
je 0x9ce65
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x44270
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0xda50
movq %rax, 0x90(%rsp)
jmp 0x9d0ad
movq 0x88(%rsp), %rdi
movq 0x88(%rsp), %rax
movq 0xce8(%rax), %rax
movq 0x8(%rax), %rsi
movq 0x78(%rsp), %rdx
movq 0x88(%rsp), %rax
movq 0x140(%rax), %rcx
movq 0x188315(%rip), %r8     # 0x2251b0
callq 0x14a60
movq %rax, 0x90(%rsp)
jmp 0x9d0ad
movq 0x88(%rsp), %rdi
movq 0x78(%rsp), %rsi
movl $0x1, %edx
callq 0x3cbf0
testb $0x1, %al
jne 0x9cf3e
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq 0x1940(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
movq 0x88(%rsp), %rdi
leaq 0x156d6e(%rip), %rsi    # 0x1f3c72
movl $0x2f, %edx
callq 0xb880
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x78(%rsp), %rdx
callq 0xb830
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0x90(%rsp)
jmp 0x9d0ad
movq 0x88(%rsp), %rdi
callq 0x10920
movq %rax, %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x4d8(%rax)
movq 0x78(%rsp), %rcx
movq 0x88(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, (%rax)
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x88(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x88(%rsp), %rax
movq 0x4d8(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x88(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x88(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x9cfe2
movq 0x88(%rsp), %rdi
callq 0xc670
movq 0x88(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x60(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rcx
movq 0x88(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x88(%rsp), %rax
movq 0x50(%rax), %rax
movl $0x198, %ecx            # imm = 0x198
movq %rcx, 0x18(%rax)
movq 0x88(%rsp), %rax
movq 0x50(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x50(%rax)
movq 0x88(%rsp), %rax
movq 0x110(%rax), %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x4d8(%rax)
movq 0x88(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
addq $0x98, %rsp
retq
nopl (%rax)