// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_call_with_input_string
static s7_pointer g_call_with_input_string(s7_scheme *sc, s7_pointer args)
    {
        s7_pointer str, proc;
#define H_call_with_input_string "(call-with-input-string str proc) opens a string port for str and applies proc to it"
#define Q_call_with_input_string sc->pl_sf
        /* (call-with-input-string "44" (lambda (p) (+ 1 (read p)))) -> 45 */

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

        proc = cadr(args);
        if (is_let(proc))
            check_method(sc, proc, sc->call_with_input_string_symbol, args);

        if (!s7_is_aritable(sc, proc, 1))
            return(wrong_type_argument_with_type(sc, sc->call_with_input_string_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_string_symbol, 2, proc, a_normal_procedure_string));

        return(call_with_input(sc, open_and_protect_input_string(sc, str), args));
    }

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xc8(%rsp)
movq %rsi, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x13, %eax
je 0x6dc10
movq 0xc8(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xc8(%rsp), %rax
movq 0xd08(%rax), %rdx
movq 0xc0(%rsp), %rcx
movl $0x13, %r8d
movl $0x1, %r9d
callq 0x13c50
movq %rax, 0xd0(%rsp)
jmp 0x6e040
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1c, %eax
jne 0x6dd13
movq 0xb0(%rsp), %rax
movq (%rax), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0x6dd11
movq 0xc8(%rsp), %rax
testb $0x1, 0x24c(%rax)
je 0x6dd11
movq 0xc8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xc8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x9a10
movq 0x60(%rsp), %rdi
movq %rax, %rsi
movq 0xc8(%rsp), %rax
movq 0xd08(%rax), %rdx
callq 0x98d0
movq %rax, 0xa8(%rsp)
movq 0xc8(%rsp), %rcx
cmpq 0x128(%rcx), %rax
je 0x6dd11
movq 0xc8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xc8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x44270
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq %rax, %rdx
callq 0xda50
movq %rax, 0xd0(%rsp)
jmp 0x6e040
jmp 0x6dd13
movq 0xc8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movl $0x1, %edx
callq 0x3cbf0
testb $0x1, %al
jne 0x6deb1
movq 0xc8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd08(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movq $0x2, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x6dd97
movq 0xa0(%rsp), %rcx
leaq 0x1a86f7(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x38(%rsp)
jmp 0x6de2f
jmp 0x6dd99
movq 0xc8(%rsp), %rax
movq 0x90(%rax), %rax
movq 0xc8(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x6ddc6
movq 0xc8(%rsp), %rdi
callq 0xc670
movq 0xc8(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq $0xb, (%rax)
movq 0xa0(%rsp), %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x90(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xc8(%rsp), %rax
movq 0x140(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0xc8(%rsp), %rdi
leaq 0x1857b2(%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, 0xd0(%rsp)
jmp 0x6e040
movq 0xb0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x25, %eax
je 0x6ded5
movq 0xb0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x26, %eax
jne 0x6e003
movq 0xc8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd08(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq $0x2, 0x80(%rsp)
movq 0x80(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x6df37
movq 0x80(%rsp), %rcx
leaq 0x1a8557(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
jmp 0x6dfbd
jmp 0x6df39
movq 0xc8(%rsp), %rax
movq 0x90(%rax), %rax
movq 0xc8(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x6df66
movq 0xc8(%rsp), %rdi
callq 0xc670
movq 0xc8(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq $0xb, (%rax)
movq 0x80(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdx
movq 0xb0(%rsp), %rcx
movq 0xc8(%rsp), %rax
movq 0x140(%rax), %r8
movq 0x1b71c4(%rip), %r9     # 0x2251b8
callq 0xc560
movq %rax, 0xd0(%rsp)
jmp 0x6e040
movq 0xc8(%rsp), %rax
movq %rax, (%rsp)
movq 0xc8(%rsp), %rdi
movq 0xb8(%rsp), %rsi
callq 0x1babf0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0xc0(%rsp), %rdx
callq 0x1bad00
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
addq $0xd8, %rsp
retq