// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %r12
cmpb $0x13, (%r12)
jne 0x68ede
movq 0x10(%r15), %rax
movq 0x8(%rax), %r14
cmpb $0x1c, (%r14)
jne 0x68f16
movb $0x1, %bpl
testb $0x40, 0x3(%r14)
je 0x68f0d
cmpb $0x1, 0x24c(%rbx)
jne 0x68f0d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9a55
movq 0xd08(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x99ef
cmpq 0x128(%rbx), %rax
je 0x68f0d
cmpb $0x1, (%r15)
jne 0x68ff2
movq %rax, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq %r15, 0x4c8(%rbx)
movq 0x8(%r15), %r13
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r14
cmpq 0x98(%rbx), %rax
ja 0x68e15
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r13, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rax, 0x8(%rsp)
movq %rax, 0x4e8(%rbx)
movq 0x10(%r15), %r13
cmpb $0x1, (%r13)
jne 0x68eb0
movq 0x8(%rsp), %rbp
movq 0x8(%r13), %r14
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r12
cmpq 0x98(%rbx), %rax
ja 0x68e79
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r14, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %rax, 0x10(%rbp)
movq 0x10(%r13), %r13
cmpb $0x1, (%r13)
movq %rax, %rbp
je 0x68e56
movq 0x110(%rbx), %rax
movq %rax, 0x4e8(%rbx)
movq %rax, 0x4c8(%rbx)
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %r12
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdx
jmp 0x68ff9
movq 0xd08(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
movl $0x13, %r8d
movl $0x1, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf1ae
testb %bpl, %bpl
je 0x68fbc
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41fac
testb %al, %al
je 0x68f59
movb (%r14), %al
addb $-0x25, %al
cmpb $0x1, %al
ja 0x68fcb
movq 0xd08(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xe5a17(%rip), %rdx     # 0x14e960
movq 0x140(%rbx), %r8
movq 0xf46b1(%rip), %r9      # 0x15d608
jmp 0x68fa3
movq 0xd08(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xe59f5(%rip), %rdx     # 0x14e960
movq 0x140(%rbx), %r8
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %r9
leal 0x1(%rcx), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xbb629(%rip), %rax     # 0x1245c0
movq %rax, 0x10(%r9)
movq $0x26, 0x8(%r9)
movq %rbx, %rdi
movq %r14, %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb31d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r12, %rsi
callq 0x10305b
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1031d8
movq 0x110(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xbd41
xorl %ebp, %ebp
jmp 0x68f0d