// File: /workspace/github_c_makefile_star2_O2/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 0x294fa
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, 0x110(%rdi)
jne 0x294d6
movq 0x150(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x296f6
testb %al, %al
je 0x294ee
movq 0x120(%rbx), %rax
jmp 0x294fc
movq %r15, %rdi
callq 0x2988e
testb %al, %al
je 0x2950e
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbcfd2(%rip), %rsi     # 0xe64e7
movq %r15, %rdi
callq 0x85b0
testq %rax, %rax
jne 0x29536
movq %rbx, %rdi
movq %r15, %rsi
callq 0x298c1
testq %rax, %rax
je 0x296cf
movq %rax, %r13
movq 0x1e8(%rbx), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x97c7
cmpb $0x1, (%rax)
jne 0x295c1
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd1fd
movq %rax, 0x520(%rbx)
movq %rax, %rsi
movq 0x90(%rbx), %rcx
movq 0x110(%rbx), %rbp
movq %rcx, %rax
cmpq 0x98(%rbx), %rcx
ja 0x29598
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
callq 0x9c27
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 0xa34c
movq %r13, %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x29a47
movq %rax, %r15
movq %r14, 0x8(%rbx)
movq (%rbx), %rcx
movq 0x50(%rbx), %rdx
movq %rcx, (%rdx)
movq 0x8(%rbx), %rcx
movq 0x50(%rbx), %rdx
movq %rcx, 0x8(%rdx)
movq 0x50(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x50(%rbx), %rcx
movq $0x1dd, 0x18(%rcx)      # 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 0x29656
cmpl $0x4, %ebp
je 0x29663
movq 0x18(%rbx), %rsi
jmp 0x2965b
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
callq 0xe1a8
movq %rbx, %rdi
callq 0x29472
cmpb $0x23, (%r15)
jne 0x29682
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 0x296ac
testb %r12b, %r12b
jne 0x296eb
movq 0x20(%rbx), %rsi
cmpw $0x0, (%rsi)
js 0x296be
movq %rsi, %rax
jmp 0x294fc
movq %rbx, %rdi
callq 0x29aa4
movq %rax, 0x20(%rbx)
jmp 0x294fc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x29974
movq %rax, %rsi
testq %rax, %rax
jne 0x295c4
jmp 0x294fa
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x8530