// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: int_optimize
static bool int_optimize(s7_scheme *sc, s7_pointer expr)
                {
                    s7_pointer car_x, head;
                    /* fprintf(stderr, "%s: %s\n", __func__, DISPLAY(expr)); */
#if (WITH_GMP)
                    return(return_false(sc, car_x, __func__, __LINE__));
#endif
                    car_x = car(expr);

                    if (!is_pair(car_x)) /* wrap constants/symbols */
                        return(opt_int_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)))
                            return(i_syntax_ok(sc, car_x, len));

                        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(i_implicit_ok(sc, car_x, len));

                        if (is_c_function(s_func))
                        {
                            opt_info *opc;
                            opc = alloc_opo(sc, car_x);
                            switch (len)
                            {
                                case 2:
                                    if (i_idp_ok(sc, opc, s_func, car_x))
                                        return(true);
                                    break;

                                case 3:
                                    if ((i_ii_ok(sc, opc, s_func, car_x)) ||
                                            (i_7pi_ok(sc, opc, s_func, car_x)))
                                        return(true);
                                    break;

                                case 4:
                                    if ((i_iii_ok(sc, opc, s_func, car_x)) ||
                                            (i_7pii_ok(sc, opc, s_func, car_x)))
                                        return(true);
                                    break;

                                case 5:
                                    {
                                        int32_t pstart;
                                        pstart = sc->pc;
                                        if (i_7piii_ok(sc, opc, s_func, car_x))
                                            return(true);
                                        pc_fallback(sc, pstart);
                                    }
                                    /* break; */

                                default:
                                    if (((head == sc->add_symbol) ||
                                                (head == sc->multiply_symbol)) &&
                                            (i_add_any_ok(sc, opc, car_x)))
                                        return(true);
                                    break;
                            }
                        }
                        else
                        {
                            if (is_macro(s_func))
                            {
                                if (!no_cell_opt(expr))
                                    return(int_optimize(sc, set_plist_1(sc, s7_macroexpand(sc, s_func, cdar(expr)))));
                            }}}
                    return(return_false(sc, car_x, __func__, __LINE__));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %r14
movzbl (%r14), %eax
cmpl $0x1, %eax
je 0x9fc3a
cmpl $0xb, %eax
jne 0x9fd74
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa0329
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %rax
movq $0x0, 0x38(%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
leaq 0x1a39(%rip), %rcx      # 0xa1663
movq %rcx, (%rax)
movq $0x2, 0x60(%rax)
jmp 0x9fdd8
movq 0x8(%r14), %r15
cmpb $0xa, (%r15)
jne 0xa0144
movq %rsi, %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39d0d
movq %rax, %rsi
cmpw $0x20a, (%r15)          # imm = 0x20A
je 0x9fc6d
cmpw $0x201, (%r14)          # imm = 0x201
jne 0x9fde0
xorl %ebp, %ebp
cmpl $0x3, %esi
jne 0xa0146
cmpq 0x18d8(%rbx), %r15
jne 0xa0146
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa0329
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %r15
movq $0x0, 0x38(%r15)
movq 0x10(%r14), %rax
movq 0x8(%rax), %rsi
movzbl (%rsi), %ecx
cmpl $0x1, %ecx
je 0x9ffd7
cmpl $0xa, %ecx
jne 0xa0144
movzwl 0x2(%rsi), %eax
testl $0x104, %eax            # imm = 0x104
jne 0xa0144
movq 0x8(%rbx), %rdi
callq 0xbe33
cmpb $0x20, (%rax)
jne 0xa0144
testb $0x1, 0x3(%rax)
jne 0xa0144
movq %rax, 0x8(%r15)
movq 0x10(%rax), %rax
cmpb $0xb, (%rax)
jne 0xa0144
movq 0x10(%r14), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x9fbc8
testb %al, %al
je 0xa0144
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa1675
movb $0x1, %bpl
testb %al, %al
jne 0xa0146
movq 0x8(%r15), %rax
movq 0x10(%rax), %rax
btl $0x1a, (%rax)
leaq 0x19cb(%rip), %rax      # 0xa1716
leaq 0x1993(%rip), %rcx      # 0xa16e5
cmovaeq %rax, %rcx
movq %rcx, (%r15)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x60(%r15)
movl $0x0, 0x70(%r15)
jmp 0xa0146
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9f8a2
testq %rax, %rax
je 0xa0144
movslq 0x2258(%rbx), %rcx
cmpq $0x100, %rcx            # imm = 0x100
jge 0xa0329
leal 0x1(%rcx), %edx
movl %edx, 0x2258(%rbx)
movq 0x2260(%rbx,%rcx,8), %rcx
movq $0x0, 0x38(%rcx)
movq %rax, 0x8(%rcx)
leaq 0x18a8(%rip), %rax      # 0xa1668
movq %rax, (%rcx)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x60(%rcx)
movl $0x1, 0x70(%rcx)
movb $0x1, %bpl
jmp 0xa0146
movq 0x10(%r15), %r12
testb $0x1, 0x2(%r15)
jne 0x9ff65
cmpb $0x20, (%r12)
movq 0x8(%rbx), %r13
jne 0x9fe18
movq %r13, %rdi
movq %rsi, 0x10(%rsp)
movq %r15, %rsi
callq 0xbe33
movq 0x10(%rsp), %rsi
cmpq %r12, %rax
je 0x9ff65
movq 0x18(%r13), %rdx
movq 0x20(%r15), %rcx
movl $0x18, %eax
cmpq %rcx, %rdx
je 0x9fe42
jle 0x9fe39
movq 0x10(%r13), %r13
movq 0x18(%r13), %rdx
cmpq %rdx, %rcx
jl 0x9fe2c
cmpq %rcx, %rdx
jne 0xa0068
movq (%r15,%rax), %rbp
cmpb $0x20, (%rbp)
jne 0xa0144
movq 0x10(%rbp), %rax
movzbl (%rax), %r13d
cmpl $0x18, %r13d
je 0x9fe68
cmpl $0x16, %r13d
jne 0xa0144
cmpl $0x3, %esi
je 0xa0176
cmpl $0x2, %esi
jne 0xa0144
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x9fe92
cmpq $0x1, 0x10(%rax)
jne 0xa0144
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa0329
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %r15
movq $0x0, 0x38(%r15)
movq %rbp, 0x8(%r15)
movq 0x10(%r14), %r14
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x9f8a2
testq %rax, %rax
je 0xa0257
cmpb $0x16, %r13b
leaq 0x1f73(%rip), %rcx      # 0xa1e59
movq %rcx, (%r15)
leaq -0x1ed14(%rip), %rcx    # 0x811dc
leaq -0x1e77a(%rip), %rdx    # 0x8177d
cmoveq %rcx, %rdx
movq %rdx, 0x18(%r15)
movq %rax, 0x10(%r15)
testb $0x4, 0x3(%rax)
je 0x9ff35
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jg 0x9ff35
cmpb $0x16, %r13b
leaq 0x1f54(%rip), %rax      # 0xa1e7a
leaq 0x1f56(%rip), %rcx      # 0xa1e83
cmoveq %rax, %rcx
movq %rcx, 0x18(%r15)
cmpb $0x16, %r13b
movl $0x4, %eax
movl $0xa, %ecx
cmovel %eax, %ecx
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%r15)
movl %ecx, 0x70(%r15)
movl $0x1, 0x74(%r15)
jmp 0x9fdd8
movq 0x10(%r12), %r13
movb (%r13), %al
cmpb $0x2f, %al
jbe 0xa0028
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa0329
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %r12
movq $0x0, 0x38(%r12)
addq $-0x2, %rsi
cmpq $0x3, %rsi
ja 0xa00f2
leaq 0x68384(%rip), %rax     # 0x10833c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa06fb
jmp 0xa0112
movq 0x8(%rsi), %rcx
cmpb $0xa, (%rcx)
jne 0xa0144
movq 0x10(%rsi), %r8
cmpb $0x1, (%r8)
jne 0xa0144
movq 0x10(%r8), %r9
movq 0x110(%rbx), %rdx
cmpq %rdx, %r9
je 0xa0157
cmpq %rdx, 0x10(%r9)
jne 0xa0144
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movl $0xd, %esi
movq %r15, %rdx
jmp 0xa016d
cmpb $0x2a, %al
jne 0xa0144
testb $0x4, 0x3(%rbp)
jne 0xa0144
movq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x9f297
movq 0x700(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x700(%rbx), %rsi
movq %rbx, %rdi
callq 0x9fbc8
jmp 0xa0172
movl $0x10, %eax
cmpb $0x1c, (%r13)
jne 0x9fe42
movq 0x8(%r13), %rbp
testq %rbp, %rbp
je 0xa0091
cmpq %r15, 0x8(%rbp)
je 0x9fe46
movq 0x18(%rbp), %rbp
jmp 0xa007c
movq 0x10(%r13), %r13
jmp 0xa006d
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa114c
movb $0x1, %bpl
testb %al, %al
jne 0xa0146
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa11fe
jmp 0xa0140
movq %r12, %rsi
movl 0x2258(%rbx), %eax
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa1442
movb $0x1, %bpl
testb %al, %al
jne 0xa0146
movl 0x10(%rsp), %eax
movl %eax, 0x2258(%rbx)
cmpq 0xba8(%rbx), %r15
je 0xa0104
cmpq 0x1358(%rbx), %r15
jne 0xa0144
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xa1581
movb $0x1, %bpl
jmp 0xa0140
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa09b8
movb $0x1, %bpl
testb %al, %al
jne 0xa0146
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa0f9e
testb %al, %al
jne 0xa0146
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movl $0xd, %esi
movq %r15, %rdx
xorl %r9d, %r9d
callq 0xa17a5
movl %eax, %ebp
jmp 0xa0146
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xa0144
cmpq $0x2, 0x10(%rax)
jne 0xa0144
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa0329
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %r12
movq $0x0, 0x38(%r12)
movq %rbp, 0x8(%r12)
movq 0x10(%r14), %r15
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x9f8a2
testq %rax, %rax
je 0xa02b2
movq %rax, 0x10(%r12)
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x9f8a2
testq %rax, %rax
je 0xa0144
cmpb $0x16, %r13b
leaq -0x1ef94(%rip), %rcx    # 0x8126e
leaq -0x1e9fa(%rip), %rdx    # 0x8180f
cmoveq %rcx, %rdx
movq %rdx, 0x20(%r12)
movq %rax, 0x18(%r12)
leaq 0x1cb4(%rip), %rax      # 0xa1ed2
movq %rax, (%r12)
movl $0x4, %eax
movl $0xa, %ecx
cmovel %eax, %ecx
movl %ecx, 0x70(%r12)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x74(%r12)
movabsq $0x300000005, %rax      # imm = 0x300000005
movq %rax, 0x60(%r12)
jmp 0x9fdd8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9fbc8
testb %al, %al
je 0xa0144
cmpb $0x16, %r13b
leaq 0x1c17(%rip), %rax      # 0xa1e8c
movq %rax, (%r15)
leaq -0x1f0a3(%rip), %rax    # 0x811dc
leaq -0x1eb09(%rip), %rcx    # 0x8177d
cmoveq %rax, %rcx
movq %rcx, 0x18(%r15)
movl $0x4, %eax
movl $0xa, %ecx
cmovel %eax, %ecx
movabsq $0x100000004, %rax      # imm = 0x100000004
movq %rax, 0x60(%r15)
movl %ecx, 0x70(%r15)
jmp 0x9fdd8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9fbc8
testb %al, %al
je 0xa0144
movq 0x10(%r14), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x9fbc8
testb %al, %al
je 0xa0144
cmpb $0x16, %r13b
leaq -0x1f07a(%rip), %rax    # 0x8126e
leaq -0x1eae0(%rip), %rcx    # 0x8180f
cmoveq %rax, %rcx
movq %rcx, 0x18(%r12)
leaq 0x182b(%rip), %rax      # 0xa1b2a
movq %rax, (%r12)
movl $0x4, %eax
movl $0xa, %ecx
cmovel %eax, %ecx
movabsq $0x100000005, %rax      # imm = 0x100000005
movq %rax, 0x60(%r12)
movl %ecx, 0x70(%r12)
jmp 0x9fdd8
addq $0x2190, %rbx           # imm = 0x2190
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8530