// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_call_with_input_file
static s7_pointer g_call_with_input_file(s7_scheme *sc, s7_pointer args)
    {
#define H_call_with_input_file "(call-with-input-file filename proc) opens filename and calls proc with the input port as its argument"
#define Q_call_with_input_file sc->pl_sf
        s7_pointer str, proc;

        str = car(args);
        if (!is_string(str))
            return(method_or_bust(sc, str, sc->call_with_input_file_symbol, args, T_STRING, 1));

        proc = cadr(args);
        if (!s7_is_aritable(sc, proc, 1))
            return(wrong_type_argument_with_type(sc, sc->call_with_input_file_symbol, 2, proc,
                        wrap_string(sc, "a procedure of one argument (the port)", 38)));
        if ((is_continuation(proc)) || (is_goto(proc)))
            return(wrong_type_argument_with_type(sc, sc->call_with_input_file_symbol, 2, proc, a_normal_procedure_string));

        return(call_with_input(sc, open_input_file_1(sc, string_value(str), "r", "call-with-input-file"), args));
    }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x13, %eax
je 0x6e0d0
movq 0xa8(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa8(%rsp), %rax
movq 0xd00(%rax), %rdx
movq 0xa0(%rsp), %rcx
movl $0x13, %r8d
movl $0x1, %r9d
callq 0x13c50
movq %rax, 0xb0(%rsp)
jmp 0x6e409
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0xa8(%rsp), %rdi
movq 0x90(%rsp), %rsi
movl $0x1, %edx
callq 0x3cbf0
testb $0x1, %al
jne 0x6e274
movq 0xa8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa8(%rsp), %rax
movq 0xd00(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movq $0x2, 0x88(%rsp)
movq 0x88(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x6e16c
movq 0x88(%rsp), %rcx
leaq 0x1a8322(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x38(%rsp)
jmp 0x6e1f2
jmp 0x6e16e
movq 0xa8(%rsp), %rax
movq 0x90(%rax), %rax
movq 0xa8(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x6e19b
movq 0xa8(%rsp), %rdi
callq 0xc670
movq 0xa8(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq $0xb, (%rax)
movq 0x88(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x78(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa8(%rsp), %rax
movq 0x140(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0x1853ef(%rip), %rsi    # 0x1f362b
movl $0x26, %edx
callq 0xb880
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq %rax, %r9
callq 0xc560
movq %rax, 0xb0(%rsp)
jmp 0x6e409
movq 0x90(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x25, %eax
je 0x6e298
movq 0x90(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x26, %eax
jne 0x6e3ba
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa8(%rsp), %rax
movq 0xd00(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq $0x2, 0x68(%rsp)
movq 0x68(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x6e2f1
movq 0x68(%rsp), %rcx
leaq 0x1a819d(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
jmp 0x6e374
jmp 0x6e2f3
movq 0xa8(%rsp), %rax
movq 0x90(%rax), %rax
movq 0xa8(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x6e320
movq 0xa8(%rsp), %rdi
callq 0xc670
movq 0xa8(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq $0xb, (%rax)
movq 0x68(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x140(%rax), %r8
movq 0x1b6e0d(%rip), %r9     # 0x2251b8
callq 0xc560
movq %rax, 0xb0(%rsp)
jmp 0x6e409
movq 0xa8(%rsp), %rax
movq %rax, (%rsp)
movq 0xa8(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0x18408c(%rip), %rdx    # 0x1f246d
leaq 0x17741c(%rip), %rcx    # 0x1e5804
callq 0x15040
movq (%rsp), %rdi
movq %rax, %rsi
movq 0xa0(%rsp), %rdx
callq 0x1bad00
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopl (%rax)