// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: opt_cell_case
static bool opt_cell_case(s7_scheme *sc, s7_pointer car_x)
                {
                    /* top->v[2].p gets result, top->v[1].i is end index, clause->v[3].i is end of current clause,
                     * clause->v[1].i = clause result len, clause->v[5].obj = top
                     */
                    opt_info *top;
                    top = alloc_opo(sc, car_x);
                    if (cell_optimize(sc, cdr(car_x))) /* selector */
                    {
                        s7_pointer p;
                        for (p = cddr(car_x); is_pair(p); p = cdr(p))
                        {
                            opt_info *opc;
                            s7_pointer clause, cp;
                            int32_t blen;
                            clause = car(p);
                            if ((!is_pair(clause)) ||
                                    ((!is_pair(car(clause))) && (car(clause) != sc->else_symbol)) ||
                                    (!is_pair(cdr(clause))) ||
                                    (cadr(clause) == sc->feed_to_symbol))
                                return(return_false(sc, clause, __func__, __LINE__));

                            opc = alloc_opo(sc, car_x);
                            if (car(clause) == sc->else_symbol)
                            {
                                if (!is_null(cdr(p)))
                                    return(return_false(sc, clause, __func__, __LINE__));
                                opc->v[2].p = sc->else_symbol;
                            }
                            else
                            {
                                if (!s7_is_proper_list(sc, car(clause)))
                                    return(return_false(sc, clause, __func__, __LINE__));
                                opc->v[2].p = car(clause);
                            }

                            for (blen = 0, cp = cdr(clause); is_pair(cp); blen++, cp = cdr(cp))
                                if (!cell_optimize(sc, cp))
                                    return(return_false(sc, cp, __func__, __LINE__));
                            if (!is_null(cp))
                                return(return_false(sc, cp, __func__, __LINE__));
                            opc->v[1].i = blen;
                            opc->v[3].i = sc->pc - 1;
                            opc->v[5].obj = (void *)top;
                            opc->v[0].fp = opt_case_clause;
                            oo_set_type_0(opc, 6);
                        }
                        if (!is_null(p))
                            return(return_false(sc, p, __func__, __LINE__));
                        top->v[1].i = sc->pc - 1;
                        top->v[0].fp = opt_case;
                        return(oo_set_type_0(top, 5));
                    }
                    return(return_false(sc, car_x, __func__, __LINE__));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x2258(%rdi), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xadd40
movq %rsi, %r14
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %r15
movq $0x0, 0x38(%r15)
movq 0x10(%rsi), %rsi
movq %rbx, %rdi
callq 0xa8bbb
testb %al, %al
je 0xadd0b
movq 0x10(%r14), %rax
movq 0x10(%rax), %r12
cmpb $0x1, (%r12)
jne 0xadd02
movq 0x8(%r12), %r13
cmpb $0x1, (%r13)
jne 0xadd0b
movq 0x8(%r13), %rax
cmpb $0x1, (%rax)
je 0xadc15
cmpq 0x1790(%rbx), %rax
jne 0xadd0b
movq 0x10(%r13), %rax
cmpb $0x1, (%rax)
jne 0xadd0b
movq 0x8(%rax), %rax
cmpq 0x18f0(%rbx), %rax
je 0xadd0b
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xadd40
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %rbp
movq $0x0, 0x38(%rbp)
movq 0x8(%r13), %r14
movq 0x1790(%rbx), %rcx
cmpq %rcx, %r14
je 0xadc86
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c2fb
movq %r14, %rcx
testb %al, %al
jne 0xadc94
jmp 0xadd0b
movq 0x10(%r12), %rax
cmpq 0x110(%rbx), %rax
jne 0xadd0b
movq %rcx, 0x10(%rbp)
movq 0x10(%r13), %r14
cmpb $0x1, (%r14)
jne 0xadcc3
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa8bbb
testb %al, %al
je 0xadd0b
movq 0x10(%r14), %r14
incq %r13
cmpb $0x1, (%r14)
je 0xadca5
jmp 0xadcc6
xorl %r13d, %r13d
cmpq 0x110(%rbx), %r14
jne 0xadd0b
movq %r13, 0x8(%rbp)
movslq 0x2258(%rbx), %rax
decq %rax
movq %rax, 0x18(%rbp)
movq %r15, 0x28(%rbp)
leaq 0x595a(%rip), %rax      # 0xb3646
movq %rax, (%rbp)
movq $0x6, 0x60(%rbp)
movq 0x10(%r12), %r12
jmp 0xadbe4
cmpq 0x110(%rbx), %r12
je 0xadd1c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x2258(%rbx), %rax
decq %rax
movq %rax, 0x8(%r15)
leaq 0x59bf(%rip), %rax      # 0xb36f0
movq %rax, (%r15)
movq $0x5, 0x60(%r15)
movb $0x1, %al
jmp 0xadd0d
addq $0x2190, %rbx           # imm = 0x2190
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9530