// File: /workspace/github_c_makefile_star2_O2/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 0x9b54f
movq %rsi, %rbx
movq (%r14), %r15
movq 0x10(%r15), %rsi
xorl %ebp, %ebp
cmpb $0x1, (%rsi)
jne 0x9b3c9
movq 0x28(%rsi), %rax
movl 0x8(%rax), %ebp
movzbl (%rbx), %eax
addl $-0x28, %eax
cmpl $0xb, %eax
ja 0x9b54f
leaq 0x3944d(%rip), %rcx     # 0xd482c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq %ebp, %rax
cmpq %rax, 0x18(%rbx)
jg 0x9b54f
cmpq %rax, 0x28(%rbx)
jl 0x9b54f
xorl %eax, %eax
cmpl $0x4, %ebp
setne %al
cmpl $0x3, %ebp
leal 0x76(%rax,%rax), %eax
pushq $0x74
popq %rcx
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 0xa5dd4
movq %rbx, 0x18(%r15)
movq 0x10(%rbx), %rax
movq %rax, 0x20(%r15)
orb $0x4, 0x6(%r15)
pushq $0x5
jmp 0x9b559
testb $0x40, 0x3(%rbx)
jne 0x9b54f
movq 0x10(%rbx), %rax
testb $0x4, 0x1(%rax)
je 0x9b54f
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa274b
testl %eax, %eax
js 0x9b48b
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa274b
addl %eax, %eax
cmpl %ebp, %eax
jl 0x9b54f
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xa263c
movzbl %al, %r12d
testl %ebp, %ebp
jle 0x9b4cf
movl %ebp, %eax
leaq 0x7a4a8(%rip), %rcx     # 0x115950
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 0xa5dd4
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 0x866eb(%rip), %rdx     # 0x121be0
pushq $0x5
popq %rax
cmpb $0x1, (%rcx,%rdx)
jne 0x9b55a
movq %rbx, 0x18(%r15)
jmp 0x9b55a
testb $0x40, 0x3(%rbx)
jne 0x9b54f
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa2581
cmpl %ebp, %eax
jne 0x9b54f
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xa263c
movzbl %al, %r12d
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rdx
movq %r14, %rdi
callq 0xa5dd4
testb $0x10, 0x1(%rbx)
jne 0x9b563
orb $0x8, 0x1(%r15)
movzwl %r12w, %eax
orl $0x108, %eax            # imm = 0x108
jmp 0x9b590
movq %r14, %rdi
callq 0xa25b8
pushq $0x2
popq %rax
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 0x9b587
cmpl $0x3, %ebp
jne 0x9b587
movzwl %r12w, %eax
orl $0x110, %eax            # imm = 0x110
jmp 0x9b590
movzwl %r12w, %eax
orl $0x112, %eax            # imm = 0x112
movw %ax, 0x4(%r15)
movq %rbx, 0x18(%r15)
jmp 0x9b448