// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
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 0xd396d
leaq 0x8777c(%rip), %rdx     # 0x15b0a0
movb (%r15), %cl
cmpb $0x0, (%rax,%rdx)
je 0xd3a8e
cmpb $0x1, %cl
jne 0xd3ad3
movq 0x8(%r15), %rax
movq 0x8(%rax), %rax
cmpb $0x1, (%rax)
jne 0xd39e0
cmpq %r14, 0x8(%rax)
je 0xd39e0
movq 0x10(%rax), %rax
cmpb $0x1, (%rax)
je 0xd394b
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
je 0xd393a
jmp 0xd3ad3
cmpl $0xb, %eax
jne 0xd3a6d
cmpb $0x1, (%r15)
jne 0xd39ae
movq 0x8(%r14), %rax
movq 0x8(%r15), %rcx
movq 0x8(%rcx), %rdx
movb $0x1, %cl
cmpb $0x1, (%rdx)
jne 0xd39d6
cmpb $0x1, (%rdx)
jne 0xd39a4
movq 0x8(%rdx), %rsi
cmpq %rax, 0x8(%rsi)
je 0xd39d6
movq 0x10(%rdx), %rdx
jmp 0xd398f
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
je 0xd3980
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)
xorl %ecx, %ecx
movb $0x1, %al
testb %cl, %cl
je 0xd3b01
movq 0x8(%r15), %rax
movq 0x10(%rax), %rcx
movq %rcx, (%rbx)
movq 0x110(%rbx), %rdx
cmpq %rdx, %rcx
je 0xd3ae4
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %r14
cmpq %rdx, %r14
je 0xd3a5d
movq 0x18f0(%rbx), %rsi
cmpq %rsi, %rax
jne 0xd3a29
movq %rbx, %rdi
callq 0xaa24
cmpq 0x128(%rbx), %rax
je 0xd3b14
cmpb $0x1, (%r14)
jne 0xd3a56
movq 0x50(%rbx), %rax
movq %r14, (%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), %rax
movq %rax, (%rbx)
movzwl 0x4(%rax), %eax
movq %rax, 0x18(%rbx)
jmp 0xd3aff
cmpb $0x1, (%r15)
jne 0xd39ae
movq 0x8(%r15), %rax
movq 0x8(%rax), %rax
cmpb $0x1, (%rax)
jne 0xd3b0d
movq 0x10(%r15), %r15
jmp 0xd3a6d
cmpb $0x1, %cl
jne 0xd3ad3
movq 0x8(%r15), %rax
movq 0x8(%rax), %r12
cmpb $0x1, (%r12)
jne 0xd39e0
cmpb $0x1, (%r12)
jne 0xd3ac9
movq 0x8(%r12), %rdi
movq %r14, %rsi
callq 0x42c67
testb %al, %al
jne 0xd39e0
movq 0x10(%r12), %r12
jmp 0xd3aa6
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
je 0xd3a93
movq 0x50(%rbx), %rax
movq 0x130(%rbx), %rcx
movq %rcx, 0x20(%rbx)
jmp 0xd3ae8
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
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movb $0x1, %cl
jmp 0xd39d6
xorl %eax, %eax
jmp 0xd3b01