// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: s7_load_with_environment
s7_pointer s7_load_with_environment(s7_scheme *sc, const char *filename, s7_pointer e)
    {
        /* returns either the value of the load or NULL if filename not found */
        s7_pointer port;
        FILE *fp;
        declare_jump_info();
        TRACK(sc);

        if (e == sc->s7_let) return(NULL);

#if WITH_C_LOADER
        if (load_shared_object(sc, filename, (is_null(e)) ? sc->rootlet : e))
            return(sc->F);
#endif

        if (is_directory(filename))
            return(NULL);
        fp = fopen(filename, "r");
#if WITH_GCC
        if (!fp) fp = expand_cwd(sc, filename);
#endif
        if (fp)
        {
            if (hook_has_functions(sc->load_hook))
                s7_apply_function(sc, sc->load_hook, list_1(sc, sc->temp6 = s7_make_string(sc, filename)));
        }
        else
        {
            fp = open_file_with_load_path(sc, filename);
            if (!fp) return(NULL);
        }
        port = read_scheme_file(sc, fp, filename);

        sc->envir = e;
        push_stack(sc, OP_LOAD_RETURN_IF_EOF, port, sc->code);

        store_jump_info(sc);
        set_jump_info(sc, LOAD_SET_JUMP);
        if (jump_loc != NO_JUMP)
        {
            if (jump_loc != ERROR_JUMP)
                eval(sc, sc->cur_op);
        }
        else eval(sc, OP_READ_INTERNAL);

        pop_input_port(sc);
        if (is_input_port(port))
            s7_close_input_port(sc, port);

        restore_jump_info(sc);
        if (is_multiple_value(sc->value))
            sc->value = splice_in_values(sc, multiple_value(sc->value));
        return(sc->value);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
cmpq %rdx, 0x2150(%rdi)
je 0x352ea
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, 0x110(%rdi)
jne 0x352b1
movq 0x150(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x35519
testb %al, %al
je 0x352c9
movq 0x120(%rbx), %rax
jmp 0x352ec
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x83d0
testl %eax, %eax
js 0x352fe
movl $0xf000, %eax           # imm = 0xF000
andl 0x28(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x352fe
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe5242(%rip), %rsi     # 0x11a547
movq %r15, %rdi
callq 0x85b0
testq %rax, %rax
jne 0x35326
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3575e
testq %rax, %rax
je 0x354f0
movq %rax, %r13
movq 0x1e8(%rbx), %r12
movq 0x18e0(%rbx), %rsi
movq 0x18(%r12), %rdx
movq %rbx, %rdi
callq 0xbe9a
cmpb $0x1, (%rax)
jne 0x353ba
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe9af
movq %rax, 0x520(%rbx)
movq %rax, %rsi
movq 0x90(%rbx), %rcx
movq 0x110(%rbx), %rbp
movq %rcx, %rax
cmpq 0x98(%rbx), %rcx
ja 0x35391
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
callq 0xa550
movq 0x8(%rsp), %rsi
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rdx
movq $0x200001, (%rdx)       # imm = 0x200001
movq %rsi, 0x8(%rdx)
movq %rbp, 0x10(%rdx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xaee6
movq %r13, %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3597b
movq %rax, %r15
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, (%rcx)
movq 0x8(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x50(%rbx), %rax
movq %r15, 0x10(%rax)
movq 0x50(%rbx), %rax
movq $0x1dd, 0x18(%rax)      # imm = 0x1DD
addq $0x20, 0x50(%rbx)
movb 0x678(%rbx), %r12b
movl 0x67c(%rbx), %r13d
leaq 0x5b0(%rbx), %r14
leaq 0x10(%rsp), %rdi
movl $0xc8, %edx
movq %r14, %rsi
callq 0x83e0
movb $0x1, 0x678(%rbx)
movl $0x2, 0x67c(%rbx)
movq %r14, %rdi
callq 0x8350
movl %eax, %ebp
testl %eax, %eax
je 0x3544f
cmpl $0x4, %ebp
je 0x3545c
movq 0x18(%rbx), %rsi
jmp 0x35454
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
callq 0xfd85
movl 0x184(%rbx), %eax
testl %eax, %eax
je 0x3547b
decl %eax
movl %eax, 0x184(%rbx)
shlq $0x3, %rax
addq 0x178(%rbx), %rax
jmp 0x35482
leaq 0x1c8(%rbx), %rax
movq (%rax), %rax
movq %rax, 0x170(%rbx)
cmpb $0x23, (%r15)
jne 0x354a3
movq 0x8(%r15), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x48(%rax)
movb %r12b, 0x678(%rbx)
movl %r13d, 0x67c(%rbx)
leaq 0x10(%rsp), %rsi
movl $0xc8, %edx
movq %r14, %rdi
callq 0x83e0
cmpl $0x4, %ebp
jne 0x354cd
testb %r12b, %r12b
jne 0x3550c
movq 0x20(%rbx), %rsi
cmpw $0x0, (%rsi)
js 0x354df
movq %rsi, %rax
jmp 0x352ec
movq %rbx, %rdi
callq 0x35a2c
movq %rax, 0x20(%rbx)
jmp 0x352ec
movq %rbx, %rdi
movq %r15, %rsi
callq 0x35862
movq %rax, %rsi
testq %rax, %rax
jne 0x353bd
jmp 0x352ea
movq %r14, %rdi
movl $0x4, %esi
callq 0x8530