// File: /workspace/github_c_makefile_star2_O1/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 0x37634
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, 0x110(%rdi)
jne 0x375f5
movq 0x150(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3785f
testb %al, %al
je 0x37613
addq $0x120, %rbx            # imm = 0x120
movq %rbx, %r14
jmp 0x3783d
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x93d0
testl %eax, %eax
js 0x3763b
movl $0xf000, %eax           # imm = 0xF000
andl 0x28(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x3763b
xorl %eax, %eax
jmp 0x37840
leaq 0xebdf5(%rip), %rsi     # 0x123437
movq %r15, %rdi
callq 0x95b0
movq %rax, %r13
testq %rax, %rax
jne 0x37660
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37b6a
movq %rax, %r13
testq %r13, %r13
je 0x376fc
movq 0x1e8(%rbx), %r12
movq 0x18e0(%rbx), %rsi
movq 0x18(%r12), %rdx
movq %rbx, %rdi
callq 0xcd2c
cmpb $0x1, (%rax)
jne 0x376f7
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf735
movq %rax, 0x520(%rbx)
movq %rax, %rsi
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %rbp
cmpq 0x98(%rbx), %rax
ja 0x376c7
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
callq 0xb389
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 0xbd41
movq %r13, %rsi
jmp 0x37713
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37c7d
movq %rax, %rsi
testq %rax, %rax
je 0x37634
movq %rbx, %rdi
movq %r15, %rdx
callq 0x37d96
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 0x93e0
movb $0x1, 0x678(%rbx)
movl $0x2, 0x67c(%rbx)
movq %r14, %rdi
callq 0x9350
movl %eax, %ebp
testl %eax, %eax
je 0x377a5
cmpl $0x4, %ebp
je 0x377b2
movq 0x18(%rbx), %rsi
jmp 0x377aa
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
callq 0x10b83
movl 0x184(%rbx), %eax
testl %eax, %eax
je 0x377d1
decl %eax
movl %eax, 0x184(%rbx)
shlq $0x3, %rax
addq 0x178(%rbx), %rax
jmp 0x377d8
leaq 0x1c8(%rbx), %rax
movq (%rax), %rax
movq %rax, 0x170(%rbx)
cmpb $0x23, (%r15)
jne 0x377f9
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 0x93e0
cmpl $0x4, %ebp
jne 0x37823
testb %r12b, %r12b
jne 0x37852
leaq 0x20(%rbx), %r14
movq 0x20(%rbx), %rsi
cmpw $0x0, (%rsi)
jns 0x3783d
movq %rbx, %rdi
callq 0x37e41
movq %rax, 0x20(%rbx)
movq (%r14), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl $0x4, %esi
callq 0x9530