// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: op_case_g_g
static bool op_case_g_g(s7_scheme *sc)
                {
                    s7_pointer x, y;
#if (!WITH_GMP)
                    if (has_integer_keys(sc->code))
                    {
                        s7_int selector;
                        sc->code = cddr(sc->code);
                        if (type(sc->value) != T_INTEGER)
                        {
                            for (x = sc->code; is_pair(x); x = cdr(x)) /* maybe preset the else case */
                                if (!is_pair(caar(x)))
                                    goto ELSE_CASE;
                        }
                        else
                        {
                            selector = integer(sc->value);
                            for (x = sc->code; is_pair(x); x = cdr(x))
                            {
                                y = caar(x);
                                if (!is_pair(y))
                                    goto ELSE_CASE;
                                for (; is_pair(y); y = cdr(y))
                                    if (integer(car(y)) == selector)
                                        goto ELSE_CASE;
                            }
                        }
                        sc->value = sc->unspecified;
                        pop_stack(sc);
                        return(true);
                    }
#endif
                    sc->code = cddr(sc->code);
                    if (is_simple(sc->value))
                    {
                        for (x = sc->code; is_pair(x); x = cdr(x))
                        {
                            y = caar(x);
                            if (!is_pair(y))
                                goto ELSE_CASE;
                            do {
                                if (car(y) == sc->value)
                                    goto ELSE_CASE;
                                y = cdr(y);
                            } while (is_pair(y));
                        }
                        sc->value = sc->unspecified;
                        pop_stack(sc);
                        return(true);
                    }

                    for (x = sc->code; is_pair(x); x = cdr(x))
                    {
                        y = caar(x);
                        if (!is_pair(y))
                            goto ELSE_CASE;
                        for (; is_pair(y); y = cdr(y))
                            if (s7_is_eqv(car(y), sc->value))
                                goto ELSE_CASE;
                    }
                    sc->value = sc->unspecified; /* this was sc->nil but the spec says case value is unspecified if no clauses match */
                    pop_stack(sc);
                    return(true);

ELSE_CASE:
                    /* x is the entire matching clause, (case 2 ((2) 3)), x: (((2) 3)) */
                    sc->code = T_Lst(cdar(x));
                    if (is_null(sc->code))  /* sc->value is already the selector */
                    {
                        pop_stack(sc);
                        return(true);
                    }
                    if (is_null(cdr(sc->code)))
                    {
                        sc->code = car(sc->code);
                        sc->cur_op = optimize_op(sc->code);
                        return(true);
                    }
                    if ((car(sc->code) == sc->feed_to_symbol) &&
                            (s7_symbol_value(sc, sc->feed_to_symbol) == sc->undefined))
                        return(false);
                    if (is_pair(cdr(T_Pair(sc->code))))
                        push_stack_no_args(sc, sc->begin_op, cdr(sc->code));
                    sc->code = car(sc->code);
                    sc->cur_op = optimize_op(sc->code);
                    return(true);
                }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x20(%rdi), %r14
btl $0x19, (%rax)
movq 0x10(%rax), %rax
movq 0x10(%rax), %r15
movq %r15, (%rdi)
movzbl (%r14), %eax
jb 0xa0b14
leaq 0x815cb(%rip), %rcx     # 0x1220a0
cmpb $0x0, (%rax,%rcx)
je 0xa0b72
cmpb $0x1, (%r15)
jne 0xa0c38
movq 0x8(%r15), %r12
movq 0x8(%r12), %rax
cmpb $0x1, (%rax)
jne 0xa0bb2
cmpq %r14, 0x8(%rax)
je 0xa0bb2
movq 0x10(%rax), %rax
cmpb $0x1, (%rax)
je 0xa0afb
movq 0x10(%r15), %r15
jmp 0xa0adf
cmpl $0xb, %eax
jne 0xa0b54
movq 0x8(%r14), %rax
cmpb $0x1, (%r15)
jne 0xa0c38
movq 0x8(%r15), %r12
movq 0x8(%r12), %rcx
cmpb $0x1, (%rcx)
jne 0xa0bb2
movb $0x1, %dl
cmpb $0x1, %dl
jne 0xa0b4e
movq 0x8(%rcx), %rdx
cmpq %rax, 0x8(%rdx)
je 0xa0bb2
movq 0x10(%rcx), %rcx
movb (%rcx), %dl
jmp 0xa0b37
movq 0x10(%r15), %r15
jmp 0xa0b1d
cmpb $0x1, (%r15)
jne 0xa0c38
movq 0x8(%r15), %r12
movq 0x8(%r12), %rax
cmpb $0x1, (%rax)
jne 0xa0bb2
movq 0x10(%r15), %r15
jmp 0xa0b54
cmpb $0x1, (%r15)
jne 0xa0c38
movq 0x8(%r15), %r12
movq 0x8(%r12), %r13
cmpb $0x1, (%r13)
jne 0xa0bb2
movb $0x1, %al
cmpb $0x1, %al
jne 0xa0bac
movq 0x8(%r13), %rdi
movq %r14, %rsi
callq 0x32e3b
testb %al, %al
jne 0xa0bb2
movq 0x10(%r13), %r13
movb (%r13), %al
jmp 0xa0b8e
movq 0x10(%r15), %r15
jmp 0xa0b72
movq 0x10(%r12), %rax
movq %rax, (%rbx)
movq 0x110(%rbx), %rcx
cmpq %rcx, %rax
je 0xa0c32
movq 0x8(%rax), %r14
movq 0x10(%rax), %r15
cmpq %rcx, %r15
je 0xa0c24
movq 0x18f0(%rbx), %rsi
cmpq %rsi, %r14
jne 0xa0bf0
movq %rbx, %rdi
callq 0x94b4
cmpq 0x128(%rbx), %rax
je 0xa0c6a
cmpb $0x1, (%r15)
jne 0xa0c24
movq 0x50(%rbx), %rax
movq %r15, (%rax)
movq 0x8(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x688(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x18(%rcx)
addq $0x20, 0x50(%rbx)
movq (%rbx), %rax
movq 0x8(%rax), %r14
movq %r14, (%rbx)
movzwl 0x4(%r14), %eax
movq %rax, 0x18(%rbx)
jmp 0xa0c5e
movq 0x50(%rbx), %rax
jmp 0xa0c47
movq 0x50(%rbx), %rax
movq 0x130(%rbx), %rcx
movq %rcx, 0x20(%rbx)
leaq -0x20(%rax), %rcx
movq %rcx, 0x50(%rbx)
movups -0x20(%rax), %xmm0
movups -0x10(%rax), %xmm1
movups %xmm0, (%rbx)
movups %xmm1, 0x10(%rbx)
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0xa0c60