// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movq %rdi, %rbx
movq 0x8(%rsi), %r14
movzbl (%r14), %eax
cmpl $0x1, %eax
je 0xa675f
cmpl $0xb, %eax
jne 0xa6810
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa6eab
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 0x1a5e(%rip), %rcx      # 0xa81ad
movq %rcx, (%rax)
movq $0x2, 0x60(%rax)
jmp 0xa6874
movq 0x8(%r14), %r12
cmpb $0xa, (%r12)
jne 0xa6e90
movq %rsi, %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c299
movq %rax, %r15
cmpw $0x20a, (%r12)          # imm = 0x20A
je 0xa6794
cmpw $0x201, (%r14)          # imm = 0x201
jne 0xa687c
cmpl $0x3, %r15d
jne 0xa6b9d
cmpq 0x18d8(%rbx), %r12
jne 0xa6b9d
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa6eab
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
movb $0x1, %r12b
cmpl $0x1, %ecx
je 0xa6a6e
cmpl $0xa, %ecx
jne 0xa6b94
movzwl 0x2(%rsi), %eax
testl $0x104, %eax            # imm = 0x104
je 0xa6b0e
xorl %ebp, %ebp
xorl %r12d, %r12d
jmp 0xa6b94
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa639f
testq %rax, %rax
je 0xa6e90
movslq 0x2258(%rbx), %rcx
cmpq $0x100, %rcx            # imm = 0x100
jge 0xa6eab
leal 0x1(%rcx), %edx
movl %edx, 0x2258(%rbx)
movq 0x2260(%rbx,%rcx,8), %rcx
movq $0x0, 0x38(%rcx)
movq %rax, 0x8(%rcx)
leaq 0x1956(%rip), %rax      # 0xa81b2
movq %rax, (%rcx)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x60(%rcx)
movl $0x1, 0x70(%rcx)
movb $0x1, %bpl
jmp 0xa6e92
testb $0x1, 0x2(%r12)
jne 0xa69fb
movq 0x10(%r12), %r13
cmpb $0x20, (%r13)
jne 0xa68a8
movq %rbx, %rdi
movq %r12, %rsi
callq 0xccb2
cmpq %r13, %rax
je 0xa69fb
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rdx
movq 0x20(%r12), %rcx
cmpq %rcx, %rdx
je 0xa68d2
jle 0xa68c9
movq 0x10(%rax), %rax
movq 0x18(%rax), %rdx
cmpq %rdx, %rcx
jl 0xa68bc
cmpq %rcx, %rdx
jne 0xa6ba6
movq 0x18(%r12), %r13
cmpb $0x20, (%r13)
jne 0xa6b9d
movq 0x10(%r13), %rax
movzbl (%rax), %r12d
cmpl $0x18, %r12d
je 0xa68fa
cmpl $0x16, %r12d
jne 0xa6b9d
movb $0x1, %dl
cmpl $0x3, %r15d
je 0xa6cd7
cmpl $0x2, %r15d
jne 0xa6db7
movq 0x18(%rax), %rcx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0xa6928
cmpq $0x1, 0x10(%rcx)
jne 0xa6ccd
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa6eab
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %r15
movq $0x0, 0x38(%r15)
movq %r13, 0x8(%r15)
movq 0x10(%r14), %r14
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xa639f
testq %rax, %rax
je 0xa6dbc
cmpb $0x16, %r12b
leaq 0x206b(%rip), %rcx      # 0xa89e7
movq %rcx, (%r15)
leaq -0x1f2e7(%rip), %rcx    # 0x8769f
leaq -0x1ed4d(%rip), %rdx    # 0x87c40
cmoveq %rcx, %rdx
movq %rdx, 0x18(%r15)
movq %rax, 0x10(%r15)
testb $0x4, 0x3(%rax)
je 0xa69cb
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%r13), %rcx
cmpq 0x8(%rcx), %rax
jg 0xa69cb
cmpb $0x16, %r12b
leaq 0x204c(%rip), %rax      # 0xa8a08
leaq 0x204e(%rip), %rcx      # 0xa8a11
cmoveq %rax, %rcx
movq %rcx, 0x18(%r15)
cmpb $0x16, %r12b
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 0xa6e7d
movq 0x10(%r12), %rax
movq 0x10(%rax), %r13
movb (%r13), %cl
cmpb $0x2f, %cl
jbe 0xa6ac6
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa6eab
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %rsi
movq $0x0, 0x38(%rsi)
addq $-0x2, %r15
cmpq $0x3, %r15
ja 0xa6c38
leaq 0x6a87e(%rip), %rax     # 0x1112d0
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa727d
jmp 0xa6c55
movq 0x8(%rsi), %rcx
cmpb $0xa, (%rcx)
jne 0xa6b94
movq 0x10(%rsi), %r8
cmpb $0x1, (%r8)
jne 0xa6b94
movq 0x10(%r8), %r9
movq 0x110(%rbx), %rdx
cmpq %rdx, %r9
je 0xa6ca0
cmpq %rdx, 0x10(%r9)
jne 0xa6b94
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movl $0xd, %esi
movq %r15, %rdx
callq 0xa82ef
movl %eax, %ebp
jmp 0xa6808
movb $0x1, %al
cmpb $0x2a, %cl
jne 0xa6c98
testb $0x4, 0x3(%rbp)
movb $0x1, %bpl
jne 0xa6e8c
movq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa5d36
movq 0x700(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x700(%rbx), %rsi
movq %rbx, %rdi
callq 0xa66f0
movl %eax, %ebp
jmp 0xa6e8a
movq %rbx, %rdi
callq 0xccb2
cmpb $0x20, (%rax)
jne 0xa6b94
testb $0x1, 0x3(%rax)
jne 0xa6b94
movq %rax, 0x8(%r15)
movq 0x10(%rax), %rax
cmpb $0xb, (%rax)
jne 0xa6b94
movq 0x10(%r14), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0xa66f0
testb %al, %al
je 0xa6b94
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa81bf
movb $0x1, %bpl
testb %al, %al
jne 0xa6808
movq 0x8(%r15), %rax
movq 0x10(%rax), %rax
btl $0x1a, (%rax)
leaq 0x16f5(%rip), %rax      # 0xa8260
leaq 0x16bd(%rip), %rcx      # 0xa822f
cmovaeq %rax, %rcx
movq %rcx, (%r15)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x60(%r15)
movl $0x0, 0x70(%r15)
jmp 0xa6808
testb %r12b, %r12b
je 0xa6e8a
xorl %eax, %eax
xorl %ebp, %ebp
jmp 0xa6e8c
cmpb $0x1c, (%rax)
jne 0xa68d7
movq 0x8(%rax), %rcx
testq %rcx, %rcx
sete %sil
je 0xa6bc8
cmpq %r12, 0x8(%rcx)
je 0xa6bcb
movq 0x18(%rcx), %rcx
jmp 0xa6bb3
movq %rdx, %rcx
testb %sil, %sil
je 0xa6cc5
movq 0x10(%rax), %rax
cmpb $0x1c, (%rax)
movq %rcx, %rdx
je 0xa6baf
jmp 0xa68d7
movq %rbx, %rdi
movq %rsi, %r15
movq %r13, %rdx
movq %r14, %rcx
callq 0xa7c82
movb $0x1, %bpl
testb %al, %al
jne 0xa6e8a
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa7d15
jmp 0xa6c8e
movl 0x2258(%rbx), %ebp
movq %rbx, %rdi
movq %rsi, %r15
movq %r13, %rdx
movq %r14, %rcx
callq 0xa7f63
testb %al, %al
jne 0xa6c59
movl %ebp, 0x2258(%rbx)
movq %r15, %rsi
cmpq 0xba8(%rbx), %r12
je 0xa6c4a
cmpq 0x1358(%rbx), %r12
jne 0xa6c96
movq %rbx, %rdi
movq %r14, %rdx
callq 0xa80cb
testb %al, %al
je 0xa6c96
movb $0x1, %bpl
jmp 0xa6e8a
movq %rbx, %rdi
movq %rsi, %r15
movq %r13, %rdx
movq %r14, %rcx
callq 0xa74ba
movb $0x1, %bpl
testb %al, %al
jne 0xa6e8a
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa7aaa
testb %al, %al
jne 0xa6e8a
movb $0x1, %al
movb $0x1, %bpl
jmp 0xa6e8c
movq 0x10(%rax), %rax
movq %rax, (%rsp)
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0xd, %esi
movq %r15, %rdx
xorl %r9d, %r9d
callq 0xa82ef
movl %eax, %ebp
jmp 0xa6b94
movq %rcx, %r13
jmp 0xa68d7
cmpl $0x3, %r15d
jne 0xa6db7
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xa6db7
cmpq $0x2, 0x10(%rax)
jne 0xa6db7
movslq 0x2258(%rbx), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0xa6eab
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2260(%rbx,%rax,8), %rbp
movq $0x0, 0x38(%rbp)
movq %r13, 0x8(%rbp)
movq 0x10(%r14), %r15
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0xa639f
testq %rax, %rax
je 0xa6e0e
movq %rax, 0x10(%rbp)
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0xa639f
testq %rax, %rax
je 0xa6e08
cmpb $0x16, %r12b
leaq -0x1f637(%rip), %rcx    # 0x87731
leaq -0x1f09d(%rip), %rdx    # 0x87cd2
cmoveq %rcx, %rdx
movq %rdx, 0x20(%rbp)
movq %rax, 0x18(%rbp)
leaq 0x1cde(%rip), %rax      # 0xa8a60
movl $0x4, %ecx
movl $0xa, %edx
cmovel %ecx, %edx
movq %rax, (%rbp)
movabsq $0x300000005, %rax      # imm = 0x300000005
movq %rax, 0x60(%rbp)
movl %edx, 0x70(%rbp)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x74(%rbp)
jmp 0xa6e7d
jmp 0xa6e82
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa66f0
testb %al, %al
je 0xa6e08
cmpb $0x16, %r12b
leaq 0x1c44(%rip), %rax      # 0xa8a1a
movq %rax, (%r15)
leaq -0x1f741(%rip), %rax    # 0x8769f
leaq -0x1f1a7(%rip), %rcx    # 0x87c40
cmoveq %rax, %rcx
movq %rcx, 0x18(%r15)
movl $0x4, %eax
movl $0xa, %ecx
cmovel %eax, %ecx
movabsq $0x100000004, %rax      # imm = 0x100000004
jmp 0xa6e75
xorl %edx, %edx
xorl %ebp, %ebp
jmp 0xa6e82
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa66f0
testb %al, %al
je 0xa6ea7
movq %rbp, %r15
movq 0x10(%r14), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0xa66f0
testb %al, %al
movb $0x1, %dl
je 0xa6e82
cmpb $0x16, %r12b
leaq -0x1f714(%rip), %rax    # 0x87731
leaq -0x1f17a(%rip), %rcx    # 0x87cd2
cmoveq %rax, %rcx
movq %rcx, 0x18(%r15)
leaq 0x184f(%rip), %rax      # 0xa86aa
movq %rax, (%r15)
movl $0x4, %eax
movl $0xa, %ecx
cmovel %eax, %ecx
movabsq $0x100000005, %rax      # imm = 0x100000005
movq %rax, 0x60(%r15)
movl %ecx, 0x70(%r15)
movb $0x1, %bpl
xorl %edx, %edx
testb %dl, %dl
jne 0xa6b9d
xorl %eax, %eax
testb %al, %al
je 0xa6e92
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %dl
jmp 0xa6e82
addq $0x2190, %rbx           # imm = 0x2190
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9530