// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: g_owlet
static s7_pointer g_owlet(s7_scheme *sc, s7_pointer args)
                {
#if WITH_HISTORY
#define H_owlet "(owlet) returns the environment at the point of the last error. \
                    It has the additional local variables: error-type, error-data, error-code, error-line, error-file, and error-history."
#else
#define H_owlet "(owlet) returns the environment at the point of the last error. \
                    It has the additional local variables: error-type, error-data, error-code, error-line, and error-file."
#endif
#define Q_owlet s7_make_signature(sc, 1, sc->is_let_symbol)
                    /* if owlet is not copied, (define e (owlet)), e changes as owlet does! */

                    s7_pointer e, x;
                    s7_int gc_loc;

                    e = let_copy(sc, sc->owlet);
                    gc_loc = s7_gc_protect_1(sc, e);

                    /* make sure the pairs/reals/strings/integers are copied: should be error-data, error-code, and possibly error-history */
                    sc->gc_off = true;

                    for (x = let_slots(e); tis_slot(x); x = next_slot(x))
                        if (is_pair(slot_value(x)))
                        {
                            s7_pointer new_list, p, sp;
                            new_list = protected_list_copy(sc, slot_value(x));
                            slot_set_value(x, new_list);
                            for (p = new_list, sp = p; is_pair(p); p = cdr(p), sp = cdr(sp))
                            {
                                s7_pointer val;
                                val = car(p);
                                if (is_t_real(val))
                                    set_car(p, make_real(sc, real(val)));
                                else
                                {
                                    if (is_string(val))
                                        set_car(p, make_string_with_length(sc, string_value(val), string_length(val)));
                                    else
                                    {
                                        if (is_t_integer(val))
                                            set_car(p, make_integer(sc, integer(val)));
                                    }
                                }
                                p = cdr(p);
                                if ((!is_pair(p)) || (p == sp)) break;
                                val = car(p);
                                if (is_t_real(val))
                                    set_car(p, make_real(sc, real(val)));
                                else
                                {
                                    if (is_string(val))
                                        set_car(p, make_string_with_length(sc, string_value(val), string_length(val)));
                                }
                            }
                        }

                    sc->gc_off = false;
                    s7_gc_unprotect_at(sc, gc_loc);
                    return(e);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x198(%rdi), %rsi
callq 0x9b797
movq %rax, %r13
cmpq $0x0, 0x108(%r14)
js 0x60d29
movq 0xe8(%r14), %rax
jmp 0x60dde
movq 0xd0(%r14), %rax
movq 0xf0(%r14), %rbx
leaq (%rbx,%rbx), %r12
movq 0x18(%rax), %rsi
movq %rbx, %r15
shlq $0x4, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x9fd6
movq $0x0, 0x20(%rax)
movq 0xd0(%r14), %rcx
movq %rax, 0x18(%rcx)
movq (%rax), %rax
movq 0xd0(%r14), %rcx
movq %rax, 0x10(%rcx)
movq 0xd0(%r14), %rax
movq %r12, 0x8(%rax)
movq %r12, 0xf0(%r14)
movq 0xe8(%r14), %rdi
movq %r15, %rsi
callq 0x8510
movq %rax, 0xe8(%r14)
cmpq %r12, %rbx
jge 0x60dde
movq 0x140(%r14), %rcx
movq %rbx, %rdx
movq 0xd0(%r14), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax,%rdx,8)
movq 0xe8(%r14), %rax
movq 0x108(%r14), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x108(%r14)
movq %rdx, 0x8(%rax,%rsi,8)
incq %rdx
decq %rbx
jne 0x60da9
movq 0xd0(%r14), %rcx
movq 0x108(%r14), %rdx
leaq -0x1(%rdx), %rsi
movq %rsi, 0x108(%r14)
movq (%rax,%rdx,8), %rdx
movq 0x10(%rcx), %rax
movq %rdx, 0x18(%rsp)
movq %r13, (%rax,%rdx,8)
movb $0x1, 0x218(%r14)
movq %r13, 0x20(%rsp)
movq 0x8(%r13), %rax
testq %rax, %rax
je 0x6112d
movq %rax, 0x10(%rsp)
movq 0x10(%rax), %rsi
cmpb $0x1, (%rsi)
jne 0x6111f
movq %r14, %rdi
callq 0x8f27a
movq %rax, %r15
movq 0x10(%rsp), %rax
movq %r15, 0x10(%rax)
cmpb $0x1, (%r15)
jne 0x6111f
movq %r15, %rbp
movq 0x8(%r15), %rax
movzbl (%rax), %ecx
cmpl $0xb, %ecx
je 0x60f81
cmpl $0x13, %ecx
je 0x60ec3
cmpl $0xd, %ecx
jne 0x60fd8
movsd 0x8(%rax), %xmm0
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0x60ea3
movq %r14, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0xa550
movsd 0x8(%rsp), %xmm0
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rbx
movq $0xd, (%rbx)
movsd %xmm0, 0x8(%rbx)
jmp 0x60fd4
movq 0x8(%rax), %r12
movq 0x10(%rax), %r13
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0x60eea
movq %r14, %rdi
callq 0xa550
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rbx
movq $0x200013, (%rbx)       # imm = 0x200013
leaq 0x1(%r12), %rsi
movq %r14, %rdi
callq 0x9357
movq %rax, 0x20(%rbx)
movq (%rax), %rdi
movq %rdi, 0x10(%rbx)
testq %r12, %r12
jle 0x60f2c
movq %r13, %rsi
movq %r12, %rdx
callq 0x83e0
movq 0x10(%rbx), %rdi
movb $0x0, (%rdi,%r12)
movq %r12, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movq 0x738(%r14), %r12
movq (%r12), %rax
movq 0x10(%r12), %rsi
cmpq 0x8(%r12), %rsi
jne 0x60f72
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%r12)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x8510
movq %rax, (%r12)
movq 0x10(%r12), %rsi
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%r12)
movq %rbx, (%rax,%rsi,8)
jmp 0x60fd4
movq 0x8(%rax), %r12
cmpq $0x7ff, %r12            # imm = 0x7FF
ja 0x60f9b
leaq 0xe59bb(%rip), %rax     # 0x146950
movq (%rax,%r12,8), %rbx
jmp 0x60fd4
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0x60fba
movq %r14, %rdi
callq 0xa550
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rbx
movq $0xb, (%rbx)
movq %r12, 0x8(%rbx)
movq %rbx, 0x8(%r15)
movq 0x10(%r15), %r13
cmpb $0x1, (%r13)
jne 0x6111f
cmpq %rbp, %r13
je 0x6111f
movq 0x8(%r13), %rax
movzbl (%rax), %ecx
cmpl $0x13, %ecx
je 0x61055
cmpl $0xd, %ecx
jne 0x6110d
movsd 0x8(%rax), %xmm0
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0x61035
movq %r14, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0xa550
movsd 0x8(%rsp), %xmm0
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rbx
movq $0xd, (%rbx)
movsd %xmm0, 0x8(%rbx)
jmp 0x61109
movq 0x8(%rax), %r15
movq 0x10(%rax), %r12
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0x6107c
movq %r14, %rdi
callq 0xa550
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rbx
movq $0x200013, (%rbx)       # imm = 0x200013
leaq 0x1(%r15), %rsi
movq %r14, %rdi
callq 0x9357
movq %rax, 0x20(%rbx)
movq (%rax), %rdi
movq %rdi, 0x10(%rbx)
testq %r15, %r15
jle 0x610bd
movq %r12, %rsi
movq %r15, %rdx
callq 0x83e0
movq 0x10(%rbx), %rdi
movb $0x0, (%rdi,%r15)
movq %r15, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movq 0x738(%r14), %r15
movq (%r15), %rax
movq 0x10(%r15), %rsi
cmpq 0x8(%r15), %rsi
jne 0x610fd
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%r15)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x8510
movq %rax, (%r15)
movq 0x10(%r15), %rsi
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%r15)
movq %rbx, (%rax,%rsi,8)
movq %rbx, 0x8(%r13)
movq 0x10(%r13), %r15
movq 0x10(%rbp), %rbp
cmpb $0x1, (%r15)
je 0x60e55
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
jmp 0x60e19
movb $0x0, 0x218(%r14)
movq 0x18(%rsp), %r9
cmpq %r9, 0xf0(%r14)
movq 0x20(%rsp), %rax
jle 0x61186
movq 0xd0(%r14), %rcx
movq 0x140(%r14), %r8
movq 0x10(%rcx), %rdx
cmpq %r8, (%rdx,%r9,8)
je 0x61182
movq 0xe8(%r14), %rdx
movq 0x108(%r14), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x108(%r14)
movq %r9, 0x8(%rdx,%rsi,8)
movq 0x10(%rcx), %rdx
movq %r8, (%rdx,%r9,8)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq