// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: find_uncomplicated_symbol
static inline s7_pointer find_uncomplicated_symbol(s7_scheme *sc, s7_pointer symbol, s7_pointer e)
                {
                    s7_pointer x;
                    int64_t id;
#if OPTIMIZE_PRINT
                    fprintf(stderr, "  find %s in %s (in list: %d)\n", DISPLAY(symbol), DISPLAY(e), symbol_is_in_list(sc, symbol));
#endif
                    if ((symbol_is_in_list(sc, symbol)) &&
                            (let_memq(symbol, e)))   /* it's probably a local variable reference */
                        return(sc->nil);

                    if (is_global(symbol))
                        return(global_slot(symbol));

                    /* see 59108 (OP_DEFINE_* in optimize_syntax) -- keyword version of name is used if a definition is
                     *   contingent on some run-time decision, so we're looking here for local defines that might not happen.
                     *   s7test.scm has a test case using acos.
                     */
                    if ((has_keyword(symbol)) &&
                            (symbol_is_in_list(sc, symbol_to_keyword(sc, symbol))))
                        return(sc->nil);

                    id = symbol_id(symbol);
                    for (x = sc->envir; id < let_id(x); x = outlet(x));
                    for (; is_let(x); x = outlet(x))
                    {
                        s7_pointer y;
                        if (let_id(x) == id)
                            return(local_slot(symbol));

                        for (y = let_slots(x); tis_slot(y); y = next_slot(y))
                            if (slot_symbol(y) == symbol)
                                return(y);
                    }

                    return(global_slot(symbol)); /* it's no longer global perhaps (local definition now inaccessible) */
                }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x2c(%rsi), %eax
cmpl 0xa88(%rdi), %eax
jne 0xe3ffb
movq 0x8(%rbx), %rax
movq 0x20(%rax), %rax
movl 0xc(%rax), %eax
cmpl 0xa8c(%r14), %eax
jne 0xe3ffb
cmpb $0x1, (%rdx)
sete %al
jne 0xe3ff7
cmpq %rbx, 0x8(%rdx)
je 0xe3ff7
movq 0x10(%rdx), %rdx
jmp 0xe3fe3
testb %al, %al
jne 0xe404e
movq (%rbx), %rax
btl $0x10, %eax
jb 0xe40b6
btl $0x1a, %eax
jae 0xe405a
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0xd108
movl 0x2c(%rax), %eax
cmpl 0xa88(%r14), %eax
jne 0xe405a
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0xd108
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movl 0xc(%rax), %eax
cmpl 0xa8c(%r14), %eax
jne 0xe405a
addq $0x110, %r14            # imm = 0x110
movq %r14, %rbx
jmp 0xe40ba
movq 0x20(%rbx), %rcx
addq $0x8, %r14
movq (%r14), %rdx
leaq 0x10(%rdx), %r14
cmpq 0x18(%rdx), %rcx
jl 0xe4062
cmpb $0x1c, (%rdx)
jne 0xe40b6
cmpq %rcx, 0x18(%rdx)
jne 0xe4082
movq 0x18(%rbx), %rax
xorl %esi, %esi
jmp 0xe40a8
movq 0x8(%rdx), %rdi
testq %rdi, %rdi
je 0xe40a0
cmpq %rbx, 0x8(%rdi)
setne %sil
je 0xe40a5
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0xe408b
jmp 0xe40a8
movb $0x1, %sil
jmp 0xe40a8
movq %rdi, %rax
testb %sil, %sil
je 0xe40bd
movq 0x10(%rdx), %rdx
cmpb $0x1c, (%rdx)
je 0xe4074
addq $0x10, %rbx
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq