// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r13
cmpb $0x13, (%r13)
jne 0x63e69
movq 0x10(%r14), %rax
movq 0x8(%rax), %r12
cmpb $0x1c, (%r12)
jne 0x63e98
testb $0x40, 0x3(%r12)
je 0x63e98
cmpb $0x1, 0x24c(%rbx)
jne 0x63e98
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8a63
movq 0xd08(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x89ff
cmpq 0x128(%rbx), %rax
je 0x63e98
cmpb $0x1, (%r14)
jne 0x63f6f
movq %rax, (%rsp)
movq %r14, 0x4c8(%rbx)
movq 0x8(%r14), %r13
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %rbp
cmpq 0x98(%rbx), %rax
ja 0x63dbd
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r12
movq $0x200001, (%r12)       # imm = 0x200001
movq %r13, 0x8(%r12)
movq %rbp, 0x10(%r12)
movq %r12, 0x4e8(%rbx)
movq 0x10(%r14), %r14
cmpb $0x1, (%r14)
jne 0x63e4b
movq %r12, %r13
movq 0x8(%r14), %rbp
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r15
cmpq 0x98(%rbx), %rax
ja 0x63e1c
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %rbp, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %rax, 0x10(%r13)
movq 0x10(%r14), %r14
cmpb $0x1, (%r14)
movq %rax, %r13
je 0x63df2
movq 0x110(%rbx), %rax
movq %rax, 0x4e8(%rbx)
movq %rax, 0x4c8(%rbx)
movq (%rsp), %rax
jmp 0x63f76
movq 0xd08(%rbx), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rcx
movl $0x13, %r8d
movl $0x1, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe42d
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3f86f
testb %al, %al
je 0x63edc
movb (%r12), %al
addb $-0x25, %al
cmpb $0x1, %al
ja 0x63f3f
movq 0xd08(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xe2a94(%rip), %rdx     # 0x146960
movq 0x140(%rbx), %r8
movq 0xf172e(%rip), %r9      # 0x155608
jmp 0x63f26
movq 0xd08(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xe2a72(%rip), %rdx     # 0x146960
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 0xb77b6(%rip), %rax     # 0x11b6d0
movq %rax, 0x10(%r9)
movq $0x26, 0x8(%r9)
movq %rbx, %rdi
movq %r12, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa4e4
movq %rbx, %rdi
movq %r13, %rsi
callq 0xfa2bb
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
movq 0x8(%rcx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfa439
movq 0x110(%rbx), %r12
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xaee6