// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: optimize
static opt_t optimize(s7_scheme *sc, s7_pointer code, int32_t hop, s7_pointer e)
                {
                    s7_pointer x;
#if OPTIMIZE_PRINT
                    fprintf(stderr, "optimize: %s %s\n", DISPLAY_80(code), DISPLAY(e));
#endif
                    for (x = code; (is_pair(x)) && (!is_checked(x)); x = cdr(x))
                    {
                        s7_pointer obj;
                        obj = car(x);
                        set_checked(x);
                        if (is_pair(obj))
                        {
                            if (!is_checked(obj))
                            {
                                if (optimize_expression(sc, obj, hop, e, true) == OPT_OOPS)
                                {
                                    s7_pointer p;
                                    for (p = cdr(x); is_pair(p); p = cdr(p));
                                    if (!is_null(p))
                                        eval_error_no_return(sc, sc->syntax_error_symbol, "stray dot in function body: ~S", 30, code);
                                    return(OPT_OOPS);
                                }
                            }
                        }
                        else
                        {
                            /* new 22-Sep-19, but I don't think this saves anything over falling into trailers */
                            if (is_symbol(obj))
                                set_optimize_op(obj, (is_keyword(obj)) ? OP_CON : ((is_global(obj)) ? OP_GLOBAL_SYM : OP_SYM));
                            else set_optimize_op(obj, OP_CON);
                        }
                    }
                    if (!is_list(x))
                        eval_error_no_return(sc, sc->syntax_error_symbol, "stray dot in function body: ~S", 30, code);
                    return(OPT_F);
                }

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movl %edx, 0x6c(%rsp)
movq %rcx, 0x60(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
movb %al, 0x47(%rsp)
jne 0x183632
movq 0x58(%rsp), %rax
movq (%rax), %rax
andq $0x400000, %rax         # imm = 0x400000
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, 0x47(%rsp)
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x18363f
jmp 0x1837e5
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rcx
orq $0x400000, %rcx         # imm = 0x400000
movq %rcx, (%rax)
movq 0x50(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x183762
movq 0x50(%rsp), %rax
movq (%rax), %rax
andq $0x400000, %rax         # imm = 0x400000
cmpq $0x0, %rax
jne 0x183760
movq 0x78(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x6c(%rsp), %edx
movq 0x60(%rsp), %rcx
movl $0x1, %r8d
callq 0x174df0
cmpl $0x2, %eax
jne 0x18375e
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x1836dc
jmp 0x1836cc
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0x1836bd
movq 0x48(%rsp), %rax
movq 0x78(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0x18374e
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x6c838(%rip), %rsi     # 0x1eff58
movl $0x1e, %edx
callq 0xb880
movq 0x28(%rsp), %rdi
movq %rax, %rsi
movq 0x70(%rsp), %rdx
callq 0xb830
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movl $0x2, 0x84(%rsp)
jmp 0x183869
jmp 0x183760
jmp 0x1837d0
movq 0x50(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x1837c3
movq 0x50(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x18378d
movl $0x188, %eax            # imm = 0x188
movl %eax, 0x24(%rsp)
jmp 0x1837b1
movq 0x50(%rsp), %rax
movq (%rax), %rdx
andq $0x10000, %rdx          # imm = 0x10000
movl $0x186, %eax            # imm = 0x186
movl $0x187, %ecx            # imm = 0x187
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
movw %ax, %cx
movq 0x50(%rsp), %rax
movw %cx, 0x4(%rax)
jmp 0x1837ce
movq 0x50(%rsp), %rax
movw $0x188, 0x4(%rax)       # imm = 0x188
jmp 0x1837d0
jmp 0x1837d2
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
jmp 0x183604
movq 0x58(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x18385e
movq 0x58(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x18385e
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x6c728(%rip), %rsi     # 0x1eff58
movl $0x1e, %edx
callq 0xb880
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x70(%rsp), %rdx
callq 0xb830
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopl (%rax,%rax)