// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: op_read_internal
static void op_read_internal(s7_scheme *sc)
                {
                    /* if we're loading a file, and in the file we evaluate something like:
                     *    (let ()
                     *      (set-current-input-port (open-input-file "tmp2.r5rs"))
                     *      (close-input-port (current-input-port)))
                     *    ... (with no reset of input port to its original value)
                     * the load process tries to read the loaded string, but the sc->input_port is now closed,
                     * and the original is inaccessible!  So we get a segfault in token.  We don't want to put
                     * a port_is_closed check there because token only rarely is in this danger.  I think this
                     * is the only place where we can be about to call token, and someone has screwed up our port.
                     */

                    if (port_is_closed(sc->input_port))
                        s7_error(sc, sc->read_error_symbol, /* not read_error here because it paws through the port string which doesn't exist here */
                                set_elist_1(sc, wrap_string(sc, "our input port got clobbered!", 29)));

                    sc->tok = token(sc);
                    switch (sc->tok)
                    {
                        case TOKEN_EOF:
                            break;

                        case TOKEN_RIGHT_PAREN:
                            read_error(sc, "unexpected close paren");

                        case TOKEN_COMMA:
                            read_error(sc, "unexpected comma");

                        default:
                            sc->value = read_expression(sc);
                            sc->current_line = port_line_number(sc->input_port);  /* this info is used to track down missing close parens */
                            sc->current_file = port_filename(sc->input_port);
                            break;
                    }
                }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x170(%rax), %rax
movq 0x8(%rax), %rax
testb $0x1, 0x2(%rax)
je 0x1584a9
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x1908(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x98fed(%rip), %rsi     # 0x1f146d
movl $0x1d, %edx
callq 0xb880
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xc3820
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq 0x20(%rsp), %rdi
callq 0xc9560
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x30(%rax)
movq 0x20(%rsp), %rax
movl 0x30(%rax), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x1584e5
jmp 0x1584cf
movl 0x4(%rsp), %eax
subl $0x2, %eax
je 0x1584e7
jmp 0x1584da
movl 0x4(%rsp), %eax
subl $0x8, %eax
je 0x1584f8
jmp 0x158509
jmp 0x158560
movq 0x20(%rsp), %rdi
leaq 0x9732d(%rip), %rsi     # 0x1ef820
callq 0xdfe00
movq 0x20(%rsp), %rdi
leaq 0x97333(%rip), %rsi     # 0x1ef837
callq 0xdfe00
movq 0x20(%rsp), %rdi
callq 0x159340
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x20(%rsp), %rax
movq 0x170(%rax), %rax
movq 0x8(%rax), %rax
movl 0x20(%rax), %eax
movl %eax, %ecx
movq 0x20(%rsp), %rax
movq %rcx, 0x690(%rax)
movq 0x20(%rsp), %rax
movq 0x170(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x6a8(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)