// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: bool_optimize_nw
static bool bool_optimize_nw(s7_scheme *sc, s7_pointer expr)
                {
                    s7_pointer car_x, head;

                    car_x = car(expr);
                    if (!is_pair(car_x)) /* wrap constants/symbols */
                        return(opt_bool_not_pair(sc, car_x));

                    head = car(car_x);
                    if (is_symbol(head))
                    {
                        s7_pointer s_func;
                        s7_int len;
                        len = s7_list_length(sc, car_x);

                        if ((is_syntactic_symbol(head)) ||
                                (is_syntactic_pair(car_x)))
                        {
                            if (head == sc->and_symbol)
                                return(opt_b_and(sc, car_x, len));
                            if (head == sc->or_symbol)
                                return(opt_b_or(sc, car_x, len));
                            return(return_false(sc, car_x, __func__, __LINE__));
                        }

                        if ((is_global(head)) ||
                                ((is_slot(global_slot(head))) &&
                                 (symbol_to_slot(sc, head) == global_slot(head))))
                            s_func = slot_value(global_slot(head));
                        else return(return_false(sc, car_x, __func__, __LINE__));

                        if (is_c_function(s_func))
                        {
                            if (symbol_id(head) != 0)             /* (float-vector? (block)) -- both safe c_funcs, but this is a method invocation */
                                return(return_false(sc, car_x, __func__, __LINE__));
                            switch (len)
                            {
                                case 2:
                                    return(b_idp_ok(sc, s_func, car_x, opt_arg_type(sc, cdr(car_x))));

                                case 3:
                                    {
                                        s7_b_pp_t bpf;
                                        s7_b_7pp_t bpf7 = NULL;
                                        bpf = s7_b_pp_function(s_func);
                                        if (!bpf) bpf7 = s7_b_7pp_function(s_func);
                                        if ((bpf) || (bpf7))
                                        {
                                            opt_info *opc;
                                            s7_pointer sig1, sig2, arg1, arg2;
                                            opc = alloc_opo(sc, car_x);

                                            arg1 = cadr(car_x);
                                            arg2 = caddr(car_x);
                                            sig1 = opt_arg_type(sc, cdr(car_x));
                                            sig2 = opt_arg_type(sc, cddr(car_x));

                                            if (sig2 == sc->is_integer_symbol)
                                            {
                                                int32_t cur_index;
                                                cur_index = sc->pc;

                                                if ((sig1 == sc->is_integer_symbol) &&
                                                        (b_ii_ok(sc, opc, s_func, car_x, arg1, arg2)))
                                                    return(true);
                                                pc_fallback(sc, cur_index);

                                                if ((is_symbol(arg2)) &&
                                                        (b_pi_ok(sc, opc, s_func, car_x, arg2)))
                                                    return(true);
                                                pc_fallback(sc, cur_index);
                                            }

                                            if ((sig1 == sc->is_float_symbol) &&
                                                    (sig2 == sc->is_float_symbol) &&
                                                    (b_dd_ok(sc, opc, s_func, car_x, arg1, arg2)))
                                                return(true);

                                            if (bpf)
                                                opc->v[3].b_pp_f = bpf;
                                            else opc->v[3].b_7pp_f = bpf7;
                                            return(b_pp_ok(sc, opc, s_func, car_x, arg1, arg2, bpf != NULL));
                                        }
                                    }
                                    break;

                                default:
                                    break;
                            }
                        }
                        else
                        {
                            if (is_macro(s_func))
                                return(return_false(sc, car_x, __func__, __LINE__));
                        }
                    }
                    return(return_false(sc, car_x, __func__, __LINE__));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %r14
movzbl (%r14), %eax
cmpl $0x1, %eax
je 0xb0cf5
cmpl $0xa, %eax
je 0xb0c7d
cmpl $0x7, %eax
jne 0xb0de4
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xb0f96
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %rax
movq $0x0, 0x38(%rax)
cmpq %r14, 0x120(%rbx)
leaq 0x133e(%rip), %rcx      # 0xb1fa3
leaq 0x133a(%rip), %rdx      # 0xb1fa6
cmoveq %rcx, %rdx
movq %rdx, (%rax)
movq $0x1, 0x60(%rax)
jmp 0xb0cee
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac2d6
testq %rax, %rax
je 0xb0de4
movq 0x10(%rax), %rcx
cmpb $0x7, (%rcx)
jne 0xb0de4
movslq 0x2258(%rbx), %rcx
cmpq $0x100, %rcx            # imm = 0x100
jge 0xb0f96
leal 0x1(%rcx), %edx
movl %edx, 0x2258(%rbx)
movq 0x2260(%rbx,%rcx,8), %rcx
movq $0x0, 0x38(%rcx)
movq %rax, 0x8(%rcx)
leaq 0x12d3(%rip), %rax      # 0xb1fa9
movq %rax, (%rcx)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x60(%rcx)
movl $0x0, 0x70(%rcx)
movb $0x1, %al
jmp 0xb0de6
movq 0x8(%r14), %r13
cmpb $0xa, (%r13)
jne 0xb0de4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c299
movq %rax, %r12
cmpw $0x20a, (%r13)          # imm = 0x20A
je 0xb0d23
cmpw $0x201, (%r14)          # imm = 0x201
jne 0xb0d5c
cmpq 0x1820(%rbx), %r13
je 0xb0d42
cmpq 0x1828(%rbx), %r13
je 0xb0dbf
xorl %ebp, %ebp
xorl %eax, %eax
jmp 0xb0ddf
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
movl $0x1, %ecx
callq 0xb1fc0
xorl %ebp, %ebp
jmp 0xb0ddf
testb $0x1, 0x2(%r13)
jne 0xb0d7d
movq 0x10(%r13), %r15
cmpb $0x20, (%r15)
jne 0xb0d39
movq %rbx, %rdi
movq %r13, %rsi
callq 0xccb2
cmpq %r15, %rax
jne 0xb0d39
movq 0x10(%r13), %rax
movq 0x10(%rax), %r15
movb (%r15), %cl
cmpb $0x30, %cl
jb 0xb0dd3
cmpq $0x0, 0x20(%r13)
jne 0xb0d39
cmpq $0x3, %r12
je 0xb0df7
cmpq $0x2, %r12
jne 0xb0ddc
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0xaf307
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0xb0fc1
jmp 0xb0d55
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0xb1fc0
jmp 0xb0ddf
cmpb $0x2a, %cl
je 0xb0d39
movb $0x1, %bpl
testb %bpl, %bpl
je 0xb0de6
xorl %eax, %eax
andb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0xb13ed
movq %rax, %r12
testq %rax, %rax
je 0xb0e10
movb $0x1, %cl
movq %r12, 0x30(%rsp)
jmp 0xb0e23
movq %r15, %rdi
callq 0xb141a
movq %rax, 0x30(%rsp)
testq %rax, %rax
setne %cl
movb %cl, 0x13(%rsp)
testb %cl, %cl
je 0xb0f86
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xb0f96
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x38(%rax)
movq 0x10(%r14), %rsi
movq 0x8(%rsi), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsi), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
callq 0xaf307
movq %rax, %r13
movq 0x10(%r14), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0xaf307
movq %rax, %rbp
movq 0x10d0(%rbx), %rax
cmpq %rax, %rbp
jne 0xb0f1e
movl 0x2258(%rbx), %ecx
cmpq %rax, %r13
jne 0xb0ee0
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq %r15, %rdx
movl %ecx, 0x14(%rsp)
movq %r14, %rcx
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0xb1447
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
movl 0x14(%rsp), %ecx
jne 0xb0f86
movl %ecx, 0x2258(%rbx)
movq 0x18(%rsp), %rax
cmpb $0xa, (%rax)
jne 0xb0f18
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq %r15, %rdx
movl %ecx, 0x14(%rsp)
movq %r14, %rcx
movq 0x18(%rsp), %r8
callq 0xb17dc
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
movl 0x14(%rsp), %ecx
jne 0xb0f86
movl %ecx, 0x2258(%rbx)
movq 0x11e0(%rbx), %rax
xorq %rax, %r13
xorq %rax, %rbp
orq %r13, %rbp
jne 0xb0f55
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0xb18cd
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0xb0f86
xorl %eax, %eax
testq %r12, %r12
setne %al
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rsi
movq %rcx, 0x18(%rsi)
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0xb1bb2
cmpb $0x0, 0x13(%rsp)
jne 0xb0d55
jmp 0xb0ddc
addq $0x2190, %rbx           # imm = 0x2190
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9530