// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: op_unknown_all_s
static goto_t op_unknown_all_s(s7_scheme *sc, s7_pointer f)
                {
                    s7_pointer code, arg;
                    int32_t num_args;
                    if (!f) /* can be NULL if unbound variable */
                        return(unknown_unknown(sc));
#if SHOW_EVAL_OPS
                    fprintf(stderr, "%s %s\n", __func__, DISPLAY(f));
#endif

                    code = sc->code;
                    num_args = integer(opt3_arglen(code));
                    for (arg = cdr(code); is_pair(arg); arg = cdr(arg))
                        if (/* (!is_symbol(car(arg))) ||  */            /* can't happen?? */
                                (!is_slot(symbol_to_slot(sc, car(arg)))))
                            return(fall_through);

                    switch (type(f))
                    {
                        case T_C_FUNCTION:
                        case T_C_RST_ARGS_FUNCTION:
                            if ((c_function_required_args(f) > num_args) ||
                                    (c_function_all_args(f) < num_args))
                                break;

                        case T_C_OPT_ARGS_FUNCTION:
                        case T_C_ANY_ARGS_FUNCTION:
                            if (is_safe_procedure(f))
                            {
                                if (num_args == 3)
                                {
                                    set_safe_optimize_op(code, OP_SAFE_C_SSS);
                                    set_opt1_sym(cdr(code), caddr(code));
                                    set_opt2_sym(cdr(code), cadddr(code));
                                }
                                else set_safe_optimize_op(code, OP_SAFE_C_ALL_S);
                            }
                            else
                            {
                                set_optimize_op(code, OP_C_FX);
                                annotate_args(sc, cdr(code), sc->envir);
                            }
                            set_c_function(code, f);
                            return(goto_eval);

                        case T_CLOSURE:
                            if ((!has_methods(f)) &&
                                    (closure_arity_to_int(sc, f) == num_args))
                            {
                                int32_t hop = 0;
                                if (is_immutable_and_stable(sc, car(code))) hop = 1;
                                annotate_args(sc, cdr(code), sc->envir);
                                if (num_args == 3)
                                    return(fixup_unknown_op(code, f, hop + ((is_safe_closure(f)) ? OP_SAFE_CLOSURE_3S : OP_CLOSURE_3S_B)));
                                if (num_args == 4)
                                    return(fixup_unknown_op(code, f, hop + ((is_safe_closure(f)) ? OP_SAFE_CLOSURE_ALL_S : OP_CLOSURE_4S_B)));
                                return(fixup_unknown_op(code, f, hop + ((is_safe_closure(f)) ? OP_SAFE_CLOSURE_ALL_S : OP_CLOSURE_ALL_S)));
                            }
                            break;

                        case T_CLOSURE_STAR:
                            if ((!has_methods(f)) &&
                                    (lambda_has_simple_defaults(closure_body(f))) &&
                                    ((closure_star_arity_to_int(sc, f) < 0) || ((closure_star_arity_to_int(sc, f) * 2) >= num_args)))
                            {
                                int32_t hop = 0;
                                if (is_immutable_and_stable(sc, car(code))) hop = 1;
                                annotate_args(sc, cdr(code), sc->envir);
                                return(fixup_unknown_op(code, f, hop + ((is_safe_closure(f)) ? OP_SAFE_CLOSURE_STAR_FX : OP_CLOSURE_STAR_FX)));
                            }
                            break;

                        case T_MACRO:
                            return(fixup_unknown_op(code, f, OP_MACRO_D));

                        case T_MACRO_STAR:
                            return(fixup_unknown_op(code, f, OP_MACRO_STAR_D));

                        default:
                            break;
                    }
                    return(unknown_unknown(sc));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x2
popq %rbp
testq %rsi, %rsi
je 0x982ab
movq %rsi, %rbx
movq (%r14), %r12
movq 0x10(%r12), %r13
movq 0x28(%r13), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq %r13, %r15
cmpb $0x1, (%r15)
jne 0x9813e
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xb00b
cmpb $0x20, (%rax)
jne 0x982b3
movq 0x10(%r15), %r15
jmp 0x9811d
movzbl (%rbx), %eax
addl $-0x28, %eax
cmpl $0xb, %eax
ja 0x982ab
leaq 0x3c678(%rip), %rcx     # 0xd47cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq (%rsp), %rax
cmpq %rax, 0x18(%rbx)
jg 0x982ab
cmpq %rax, 0x28(%rbx)
jl 0x982ab
testb $0x20, 0x2(%rbx)
jne 0x98197
movw $0x12a, 0x4(%r12)       # imm = 0x12A
movq 0x8(%r14), %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0xa5dd4
jmp 0x982d6
orb $0x8, 0x1(%r12)
cmpl $0x3, (%rsp)
jne 0x982ce
movw $0xe, 0x4(%r12)
movq 0x10(%r13), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%r13)
movq 0x10(%r12), %rax
movq 0x10(%rax), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x20(%rax)
jmp 0x982d6
testb $0x40, 0x3(%rbx)
jne 0x982ab
movq 0x10(%rbx), %rax
testb $0x4, 0x1(%rax)
je 0x982ab
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa274b
testl %eax, %eax
js 0x98212
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa274b
addl %eax, %eax
cmpl (%rsp), %eax
jl 0x982ab
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0xa263c
movzbl %al, %ebp
movq 0x10(%r12), %rsi
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xa5dd4
btl $0xc, (%rbx)
movl $0x11a, %eax            # imm = 0x11A
movl $0x120, %ecx            # imm = 0x120
jmp 0x98308
movw $0x168, 0x4(%r12)       # imm = 0x168
jmp 0x98313
testb $0x40, 0x3(%rbx)
jne 0x982ab
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa2581
cmpl (%rsp), %eax
jne 0x982ab
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0xa263c
movzbl %al, %ebp
movq 0x10(%r12), %rsi
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xa5dd4
movzwl (%rbx), %eax
movq (%rsp), %rcx
cmpl $0x4, %ecx
je 0x982ef
cmpl $0x3, %ecx
jne 0x982fa
btl $0xc, %eax
movl $0xf6, %eax
movl $0x114, %ecx            # imm = 0x114
jmp 0x98308
movq %r14, %rdi
callq 0xa25b8
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x169, 0x4(%r12)       # imm = 0x169
jmp 0x98313
movw $0x1c, 0x4(%r12)
movq %rbx, 0x18(%r12)
movq 0x10(%rbx), %rax
movq %rax, 0x20(%r12)
orb $0x4, 0x6(%r12)
pushq $0x5
popq %rbp
jmp 0x982b3
btl $0xc, %eax
movl $0xfc, %eax
jmp 0x98303
btl $0xc, %eax
movl $0x10a, %eax            # imm = 0x10A
movl $0x116, %ecx            # imm = 0x116
cmovael %eax, %ecx
orl %ebp, %ecx
movw %cx, 0x4(%r12)
movzbl (%rbx), %eax
leaq 0x898c3(%rip), %rcx     # 0x121be0
pushq $0x5
popq %rbp
cmpb $0x1, (%rax,%rcx)
jne 0x982b3
movq %rbx, 0x18(%r12)
jmp 0x982b3