// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xca602
movq %rsi, %rbx
movq (%r14), %r15
movq 0x10(%r15), %rsi
movq 0x28(%rsi), %rax
movq 0x8(%rax), %r12
cmpb $0x1, (%rsi)
jne 0xca497
movq 0x8(%r14), %rax
movq 0x18(%rax), %rcx
movq %rsi, %rdx
movq 0x8(%rdx), %rdi
movq 0x20(%rdi), %r10
movl $0x18, %r8d
cmpq %r10, %rcx
je 0xca47c
movq %rax, %r9
movq %rcx, %r11
jle 0xca43d
movq %rax, %r9
movq 0x10(%r9), %r9
movq 0x18(%r9), %r11
cmpq %r11, %r10
jl 0xca430
cmpq %r10, %r11
je 0xca47c
movl $0x10, %r8d
cmpb $0x1c, (%r9)
jne 0xca47c
movq 0x8(%r9), %r10
testq %r10, %r10
sete %bpl
je 0xca467
cmpq %rdi, 0x8(%r10)
je 0xca46a
movq 0x18(%r10), %r10
jmp 0xca452
movq %r11, %r10
testb %bpl, %bpl
je 0xca480
movq 0x10(%r9), %r9
cmpb $0x1c, (%r9)
movq %r10, %r11
je 0xca44e
movq (%rdi,%r8), %r10
cmpb $0x20, (%r10)
jne 0xca60a
movq 0x10(%rdx), %rdx
cmpb $0x1, (%rdx)
je 0xca412
movzbl (%rbx), %eax
addl $-0x28, %eax
cmpl $0xb, %eax
ja 0xca602
leaq 0x472bf(%rip), %rcx     # 0x11176c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq %r12d, %rax
cmpq %rax, 0x18(%rbx)
jg 0xca602
cmpq %rax, 0x28(%rbx)
jl 0xca602
testb $0x20, 0x2(%rbx)
jne 0xca4eb
movw $0x12a, 0x4(%r15)       # imm = 0x12A
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xd9cf3
jmp 0xca628
orb $0x8, 0x1(%r15)
cmpl $0x3, %r12d
jne 0xca621
movw $0xe, 0x4(%r15)
movq 0x10(%rsi), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsi)
movq 0x10(%r15), %rax
movq 0x10(%rax), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x20(%rax)
jmp 0xca628
testb $0x40, 0x3(%rbx)
jne 0xca602
movq 0x10(%rbx), %rax
testb $0x4, 0x1(%rax)
je 0xca602
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa0ae3
cmpl $0x0, 0x28(%rbx)
js 0xca570
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa0ae3
movl 0x28(%rbx), %eax
addl %eax, %eax
cmpl %r12d, %eax
jl 0xca602
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xd5964
movzbl %al, %ebp
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xd9cf3
btl $0xc, (%rbx)
movl $0x11a, %eax            # imm = 0x11A
movl $0x120, %ecx            # imm = 0x120
jmp 0xca659
movw $0x168, 0x4(%r15)       # imm = 0x168
jmp 0xca663
testb $0x40, 0x3(%rbx)
jne 0xca602
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd584c
cmpl %r12d, %eax
jne 0xca602
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xd5964
movzbl %al, %ebp
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xd9cf3
movzwl (%rbx), %eax
cmpl $0x4, %r12d
je 0xca640
cmpl $0x3, %r12d
jne 0xca64b
btl $0xc, %eax
movl $0xf6, %eax
movl $0x114, %ecx            # imm = 0x114
jmp 0xca659
movq %r14, %rdi
callq 0xd5889
movl $0x2, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movw $0x169, 0x4(%r15)       # imm = 0x169
jmp 0xca663
movw $0x1c, 0x4(%r15)
movq %rbx, 0x18(%r15)
movq 0x10(%rbx), %rax
movq %rax, 0x20(%r15)
orb $0x4, 0x6(%r15)
movl $0x5, %eax
jmp 0xca60f
btl $0xc, %eax
movl $0xfc, %eax
jmp 0xca654
btl $0xc, %eax
movl $0x10a, %eax            # imm = 0x10A
movl $0x116, %ecx            # imm = 0x116
cmovael %eax, %ecx
orl %ebp, %ecx
movw %cx, 0x4(%r15)
movzbl (%rbx), %ecx
leaq 0x90573(%rip), %rdx     # 0x15abe0
movl $0x5, %eax
cmpb $0x1, (%rcx,%rdx)
jne 0xca60f
movq %rbx, 0x18(%r15)
jmp 0xca60f