// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq $0x0, 0x50(%rsp)
movl $0x0, 0x44(%rsp)
movl $0x0, 0x40(%rsp)
movq 0x68(%rsp), %rdi
callq 0xe15e0
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
movl 0x2258(%rax), %eax
movl %eax, 0x3c(%rsp)
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0xf2240
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0xf208b
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0xf208b
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x68(%rsp), %rcx
cmpq 0x18f0(%rcx), %rax
jne 0xf2095
movb $0x0, 0x77(%rsp)
jmp 0xf231e
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rdi
callq 0xe15e0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl $0x6, %esi
leaq 0xfd2e2(%rip), %rdx     # 0x1ef3a1
movl $0xf6c5, %ecx           # imm = 0xF6C5
callq 0xe4820
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x68(%rsp), %rcx
cmpq 0x1790(%rcx), %rax
je 0xf20f7
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x68(%rsp), %rcx
cmpq 0x118(%rcx), %rax
jne 0xf2132
movq 0x68(%rsp), %rdi
callq 0xe15e0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
leaq 0x800e(%rip), %rcx      # 0xfa120
movq %rcx, (%rax)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
leaq 0xfd27b(%rip), %rdx     # 0x1ef3a1
movl $0xf6cc, %ecx           # imm = 0xF6CC
callq 0xe4820
jmp 0xf2151
movq 0x68(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xf83e0
testb $0x1, %al
jne 0xf214f
movb $0x0, 0x77(%rsp)
jmp 0xf231e
jmp 0xf2151
movl $0x0, 0x1c(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0xf21ae
movq 0x68(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xe9db0
testb $0x1, %al
jne 0xf2191
movb $0x0, 0x77(%rsp)
jmp 0xf231e
jmp 0xf2193
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0xf2167
movq 0x20(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0xf21cb
movb $0x0, 0x77(%rsp)
jmp 0xf231e
movslq 0x1c(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0x40(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0xf21eb
movl 0x1c(%rsp), %eax
movl %eax, 0x40(%rsp)
movq 0x68(%rsp), %rax
movl 0x2258(%rax), %eax
subl $0x1, %eax
movslq %eax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x48(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x30(%rsp), %rax
leaq 0x9c41(%rip), %rcx      # 0xfbe60
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0xf2033
movq 0x68(%rsp), %rax
movl 0x2258(%rax), %eax
subl $0x1, %eax
movslq %eax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rax
leaq 0x9c9a(%rip), %rcx      # 0xfbf00
movq %rcx, (%rax)
cmpl $0x1, 0x44(%rsp)
jne 0xf2281
movq 0x48(%rsp), %rax
leaq 0x9d14(%rip), %rcx      # 0xfbf90
movq %rcx, (%rax)
jmp 0xf22fd
cmpl $0x2, 0x44(%rsp)
jne 0xf22fb
cmpl $0x1, 0x40(%rsp)
jne 0xf22f9
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x68(%rsp), %rcx
cmpq 0x1790(%rcx), %rax
je 0xf22bd
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x68(%rsp), %rcx
cmpq 0x118(%rcx), %rax
jne 0xf22f9
movq 0x68(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movq 0x2260(%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rcx
addq $0x2, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x48(%rsp), %rax
leaq 0x9d0a(%rip), %rcx      # 0xfc000
movq %rcx, (%rax)
jmp 0xf22fb
jmp 0xf22fd
movq 0x48(%rsp), %rdi
movl $0x6, %esi
leaq 0xfd093(%rip), %rdx     # 0x1ef3a1
movl $0xf6f1, %ecx           # imm = 0xF6F1
callq 0xe4820
andb $0x1, %al
movb %al, 0x77(%rsp)
movb 0x77(%rsp), %al
andb $0x1, %al
addq $0x78, %rsp
retq
nopl (%rax)