// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: opt_cell_cond
static bool opt_cell_cond(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
                     */
                    s7_pointer p, last_clause = NULL;
                    opt_info *top;
                    int32_t branches = 0, max_blen = 0, start_pc;
                    top = alloc_opo(sc, car_x);
                    start_pc = sc->pc;
                    for (p = cdr(car_x); is_pair(p); p = cdr(p), branches++)
                    {
                        opt_info *opc;
                        s7_pointer clause, cp;
                        int32_t blen;
                        clause = car(p);
                        if ((!is_pair(clause)) ||
                                (!is_pair(cdr(clause))) || /* leave the test->result case for later */
                                (cadr(clause) == sc->feed_to_symbol))
                            return(return_false(sc, clause, __func__, __LINE__));

                        last_clause = clause;
                        opc = alloc_opo(sc, car_x);
                        oo_set_type_0(opc, 6);
                        if ((car(clause) == sc->else_symbol) ||
                                (car(clause) == sc->T))
                        {
                            opt_info *opb;
                            opb = alloc_opo(sc, clause);
                            opb->v[0].fb = opt_b_t;
                            oo_set_type_0(opb, 1);
                        }
                        else
                        {
                            if (!bool_optimize(sc, clause))
                                return(return_false(sc, clause, __func__, __LINE__));
                        }
                        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;
                        if (max_blen < blen) max_blen = blen;
                        opc->v[3].i = sc->pc - 1;
                        opc->v[5].obj = (void *)top;
                        opc->v[0].fp = opt_cond_clause;
                    }
                    top->v[1].i = sc->pc - 1;
                    top->v[0].fp = opt_cond;
                    if (branches == 1)
                        top->v[0].fp = opt_cond_1;
                    else
                    {
                        if (branches == 2)
                        {
                            if ((max_blen == 1) &&
                                    ((car(last_clause) == sc->else_symbol) ||
                                     (car(last_clause) == sc->T)))
                            {
                                opt_info *o1;
                                o1 = sc->opts[start_pc];
                                top->v[3].i = o1->v[3].i + 2;
                                top->v[0].fp = opt_cond_2;
                            }
                        }
                    }
                    return(oo_set_type_0(top, 6));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0x2258(%rdi), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa69bc
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %r15
movq $0x0, 0x38(%r15)
movslq 0x2258(%rbx), %rdx
movq 0x10(%rsi), %r13
cmpb $0x1, (%r13)
jne 0xa6980
movq %rdx, 0x10(%rsp)
xorl %eax, %eax
xorl %edx, %edx
movq %r15, 0x18(%rsp)
movq 0x8(%r13), %r14
cmpb $0x1, (%r14)
jne 0xa69a2
movl %eax, %ebp
movq 0x10(%r14), %rax
cmpb $0x1, (%rax)
jne 0xa69a2
movq 0x8(%rax), %rax
cmpq 0x18f0(%rbx), %rax
je 0xa69a2
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa69bc
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %r12
movq $0x0, 0x38(%r12)
movq $0x6, 0x60(%r12)
movq 0x8(%r14), %rax
cmpq 0x1790(%rbx), %rax
movl %edx, 0xc(%rsp)
je 0xa6859
cmpq 0x118(%rbx), %rax
je 0xa6859
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa9b3b
testb %al, %al
jne 0xa6897
jmp 0xa69a2
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa69bc
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %rax
movq $0x0, 0x38(%rax)
leaq 0x47ec(%rip), %rcx      # 0xab078
movq %rcx, (%rax)
movq $0x1, 0x60(%rax)
movq %rbp, 0x20(%rsp)
movq 0x10(%r14), %r15
xorl %ebp, %ebp
cmpb $0x1, (%r15)
jne 0xa68c9
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa2000
testb %al, %al
je 0xa69a2
incl %ebp
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
je 0xa68aa
cmpq 0x110(%rbx), %r15
jne 0xa69a2
movl %ebp, %eax
movq %rax, 0x8(%r12)
movl 0xc(%rsp), %edx
cmpl %ebp, %edx
cmovlel %ebp, %edx
movslq 0x2258(%rbx), %rax
decq %rax
movq %rax, 0x18(%r12)
movq 0x18(%rsp), %r15
movq %r15, 0x28(%r12)
leaq 0x5478(%rip), %rax      # 0xabd7e
movq %rax, (%r12)
movq 0x20(%rsp), %rsi
leal 0x1(%rsi), %eax
movq 0x10(%r13), %r13
cmpb $0x1, (%r13)
je 0xa67c7
movslq 0x2258(%rbx), %rcx
decq %rcx
movq %rcx, 0x8(%r15)
leaq 0x548e(%rip), %rcx      # 0xabdc4
movq %rcx, (%r15)
testl %esi, %esi
je 0xa69b3
xorl $0x1, %edx
xorl $0x2, %eax
orl %edx, %eax
jne 0xa6996
movq 0x8(%r14), %rax
cmpq 0x1790(%rbx), %rax
je 0xa695d
cmpq 0x118(%rbx), %rax
jne 0xa6996
movq 0x10(%rsp), %rax
movq 0x2260(%rbx,%rax,8), %rax
movq 0x18(%rax), %rdx
addq $0x2, %rdx
leaq 0x54cf(%rip), %rax      # 0xabe48
movl $0x18, %ecx
jmp 0xa698f
decq %rdx
leaq 0x543a(%rip), %rax      # 0xabdc4
movl $0x8, %ecx
movq %rdx, (%r15,%rcx)
movq %rax, (%r15)
movq $0x6, 0x60(%r15)
movb $0x1, %al
jmp 0xa69a4
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x545a(%rip), %rax      # 0xabe14
jmp 0xa6993
addq $0x2190, %rbx           # imm = 0x2190
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8530