// File: /workspace/github_c_makefile_star2_O3/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 0xcb191
leaq 0x87f59(%rip), %rdx     # 0x1530a0
movb (%r15), %cl
cmpb $0x0, (%rax,%rdx)
je 0xcb1ef
cmpb $0x1, %cl
jne 0xcb229
movq 0x8(%r15), %r12
movq 0x8(%r12), %rax
cmpb $0x1, (%rax)
jne 0xcb23d
cmpq %r14, 0x8(%rax)
je 0xcb23d
movq 0x10(%rax), %rax
cmpb $0x1, (%rax)
je 0xcb16f
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
je 0xcb15d
jmp 0xcb229
cmpl $0xb, %eax
jne 0xcb1d5
cmpb $0x1, (%r15)
jne 0xcb229
movq 0x8(%r14), %rax
movq 0x8(%r15), %r12
movq 0x8(%r12), %rcx
cmpb $0x1, (%rcx)
jne 0xcb23d
movq 0x8(%rcx), %rdx
cmpq %rax, 0x8(%rdx)
je 0xcb23d
movq 0x10(%rcx), %rcx
cmpb $0x1, (%rcx)
je 0xcb1b6
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
je 0xcb1a4
jmp 0xcb229
cmpb $0x1, (%r15)
jne 0xcb229
movq 0x8(%r15), %r12
movq 0x8(%r12), %rax
cmpb $0x1, (%rax)
jne 0xcb23d
movq 0x10(%r15), %r15
jmp 0xcb1d5
cmpb $0x1, %cl
jne 0xcb229
movq 0x8(%r15), %r12
movq 0x8(%r12), %r13
cmpb $0x1, (%r13)
jne 0xcb23d
movq 0x8(%r13), %rdi
movq %r14, %rsi
callq 0x40412
testb %al, %al
jne 0xcb23d
movq 0x10(%r13), %r13
cmpb $0x1, (%r13)
je 0xcb204
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
je 0xcb1f4
movq 0x50(%rbx), %rax
movq 0x130(%rbx), %rcx
movq %rcx, 0x20(%rbx)
jmp 0xcb2c1
movq 0x10(%r12), %rax
movq %rax, (%rbx)
movq 0x110(%rbx), %rcx
cmpq %rcx, %rax
je 0xcb2bd
movq 0x8(%rax), %r14
movq 0x10(%rax), %r15
cmpq %rcx, %r15
je 0xcb2af
movq 0x18f0(%rbx), %rsi
cmpq %rsi, %r14
jne 0xcb27b
movq %rbx, %rdi
callq 0x9a93
cmpq 0x128(%rbx), %rax
je 0xcb2e4
cmpb $0x1, (%r15)
jne 0xcb2af
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 0xcb2d8
movq 0x50(%rbx), %rax
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 0xcb2da