// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: op_unknown_fx
static goto_t op_unknown_fx(s7_scheme *sc, s7_pointer f)
                {
                    s7_pointer code;
                    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 = (is_pair(cdr(code))) ? integer(opt3_arglen(code)) : 0; /* opt3_arglen is on cdr(code) */

                    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))
                                set_safe_optimize_op(code, (num_args == 3) ? OP_SAFE_C_AAA : ((num_args == 4) ? OP_SAFE_C_4A : OP_SAFE_C_FX));
                            else set_safe_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 (is_safe_closure(f))
                                {
                                    if ((is_symbol(cadr(code))) &&
                                            (num_args == 3))
                                        set_safe_optimize_op(code, hop + OP_SAFE_CLOSURE_SAA);
                                    else set_safe_optimize_op(code, hop + OP_SAFE_CLOSURE_FX);
                                    /* recur doesn't happen much here */
                                }
                                else set_safe_optimize_op(code, hop + OP_CLOSURE_FX);
                                set_opt1_lambda(code, f);
                                return(goto_eval);
                            }
                            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;
                                if (num_args > 0)
                                {
                                    set_opt3_arglen(code, small_int(num_args));
                                    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;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xc59ed
movq %rsi, %rbx
movq (%r14), %r15
movq 0x10(%r15), %rsi
xorl %ebp, %ebp
cmpb $0x1, (%rsi)
jne 0xc5853
movq 0x28(%rsi), %rax
movl 0x8(%rax), %ebp
movzbl (%rbx), %eax
addl $-0x28, %eax
cmpl $0xb, %eax
ja 0xc59ed
leaq 0x42fcf(%rip), %rcx     # 0x108838
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq %ebp, %rax
cmpq %rax, 0x18(%rbx)
jg 0xc59ed
cmpq %rax, 0x28(%rbx)
jl 0xc59ed
xorl %eax, %eax
cmpl $0x4, %ebp
setne %al
cmpl $0x3, %ebp
leal 0x76(%rax,%rax), %eax
movl $0x74, %ecx
cmovnel %eax, %ecx
btl $0x15, (%rbx)
movl $0x12a, %eax            # imm = 0x12A
cmovbl %ecx, %eax
orw $0x800, (%r15)          # imm = 0x800
movw %ax, 0x4(%r15)
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xd151a
movq %rbx, 0x18(%r15)
movq 0x10(%rbx), %rax
movq %rax, 0x20(%r15)
orb $0x4, 0x6(%r15)
movl $0x5, %eax
jmp 0xc59fa
testb $0x40, 0x3(%rbx)
jne 0xc59ed
movq 0x10(%rbx), %rax
testb $0x4, 0x1(%rax)
je 0xc59ed
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9a1d8
cmpl $0x0, 0x28(%rbx)
js 0xc5927
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9a1d8
movl 0x28(%rbx), %eax
addl %eax, %eax
cmpl %ebp, %eax
jl 0xc59ed
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xcd057
movzbl %al, %r12d
testl %ebp, %ebp
jle 0xc596b
movl %ebp, %eax
leaq 0x8100c(%rip), %rcx     # 0x146950
movq (%rcx,%rax,8), %rax
movq 0x10(%r15), %rcx
movq %rax, 0x28(%rcx)
movq 0x10(%r15), %rax
andq $-0x40001, (%rax)       # imm = 0xFFFBFFFF
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xd151a
btl $0xc, (%rbx)
movl $0x11a, %eax            # imm = 0x11A
movl $0x120, %ecx            # imm = 0x120
cmovael %eax, %ecx
movzwl %r12w, %eax
orl %ecx, %eax
movw %ax, 0x4(%r15)
movzbl (%rbx), %ecx
leaq 0x8d24f(%rip), %rdx     # 0x152be0
movl $0x5, %eax
cmpb $0x1, (%rcx,%rdx)
jne 0xc59fa
movq %rbx, 0x18(%r15)
jmp 0xc59fa
testb $0x40, 0x3(%rbx)
jne 0xc59ed
movq %r14, %rdi
movq %rbx, %rsi
callq 0xccf45
cmpl %ebp, %eax
jne 0xc59ed
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xcd057
movzbl %al, %r12d
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xd151a
testb $0x10, 0x1(%rbx)
jne 0xc5a03
orb $0x8, 0x1(%r15)
movzwl %r12w, %eax
orl $0x108, %eax            # imm = 0x108
jmp 0xc5a30
movq %r14, %rdi
callq 0xccf8a
movl $0x2, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r15), %rax
movq 0x8(%rax), %rax
movb (%rax), %al
orw $0x800, (%r15)          # imm = 0x800
cmpb $0xa, %al
jne 0xc5a27
cmpl $0x3, %ebp
jne 0xc5a27
movzwl %r12w, %eax
orl $0x110, %eax            # imm = 0x110
jmp 0xc5a30
movzwl %r12w, %eax
orl $0x112, %eax            # imm = 0x112
movw %ax, 0x4(%r15)
movq %rbx, 0x18(%r15)
jmp 0xc58d4