// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: read_expression
static s7_pointer read_expression(s7_scheme *sc)
                {
                    while (true)
                    {
                        int32_t c;
                        switch (sc->tok)
                        {
                            case TOKEN_EOF:
                                return(eof_object);

                            case TOKEN_BYTE_VECTOR:
                                push_stack_no_let_no_code(sc, OP_READ_BYTE_VECTOR, sc->w);
                                sc->tok = TOKEN_LEFT_PAREN;
                                break;

                            case TOKEN_INT_VECTOR:
                                push_stack_no_let_no_code(sc, OP_READ_INT_VECTOR, sc->w);
                                sc->tok = TOKEN_LEFT_PAREN;
                                break;

                            case TOKEN_FLOAT_VECTOR:
                                push_stack_no_let_no_code(sc, OP_READ_FLOAT_VECTOR, sc->w);
                                sc->tok = TOKEN_LEFT_PAREN;
                                break;

                            case TOKEN_VECTOR:         /* already read #( -- TOKEN_VECTOR is triggered by #( */
                                push_stack_no_let_no_code(sc, OP_READ_VECTOR, sc->w);   /* sc->w is the dimensions */
                                /* fall through */

                            case TOKEN_LEFT_PAREN:
                                sc->tok = token(sc);

                                if (sc->tok == TOKEN_RIGHT_PAREN)
                                    return(sc->nil);

                                if (sc->tok == TOKEN_DOT)
                                {
                                    back_up_stack(sc);
                                    do {c = inchar(sc->input_port);} while ((c != ')') && (c != EOF));
                                    return(read_error(sc, "stray dot after '('?"));         /* (car '( . )) */
                                }

                                if (sc->tok == TOKEN_EOF)
                                    return(missing_close_paren_error(sc));

                                push_stack_no_let_no_code(sc, OP_READ_LIST, sc->nil);
                                /* here we need to clear args, but code is ignored */

                                check_stack_size(sc);
                                break;

                            case TOKEN_QUOTE:
                                push_stack_no_let_no_code(sc, OP_READ_QUOTE, sc->nil);
                                sc->tok = token(sc);
                                break;

                            case TOKEN_BACK_QUOTE:
                                sc->tok = token(sc);
                                push_stack_no_let_no_code(sc, OP_READ_QUASIQUOTE, sc->nil);
                                break;

                            case TOKEN_COMMA:
                                push_stack_no_let_no_code(sc, OP_READ_UNQUOTE, sc->nil);
                                sc->tok = token(sc);
                                switch (sc->tok)
                                {
                                    case TOKEN_EOF:
                                        pop_stack(sc);
                                        return(read_error(sc, "stray comma at the end of the input?"));

                                    case TOKEN_RIGHT_PAREN:
                                        return(read_expression_read_error(sc));

                                    default:
                                        break;
                                }
                                break;

                            case TOKEN_AT_MARK:
                                push_stack_no_let_no_code(sc, OP_READ_APPLY_VALUES, sc->nil);
                                sc->tok = token(sc);
                                break;

                            case TOKEN_ATOM:
                                return(port_read_name(sc->input_port)(sc, sc->input_port));
                                /* If reading list (from lparen), this will finally get us to op_read_list */

                            case TOKEN_DOUBLE_QUOTE:
                                read_double_quote(sc);
                                return(sc->value);

                            case TOKEN_SHARP_CONST:
                                return(port_read_sharp(sc->input_port)(sc, sc->input_port));

                            case TOKEN_DOT:                                             /* (catch #t (lambda () (+ 1 . . )) (lambda args 'hiho)) */
                                back_up_stack(sc);
                                do {c = inchar(sc->input_port);} while ((c != ')') && (c != EOF));
                                return(read_error(sc, "stray dot in list?"));             /* (+ 1 . . ) */

                            case TOKEN_RIGHT_PAREN:                                     /* (catch #t (lambda () '(1 2 . )) (lambda args 'hiho)) */
                                back_up_stack(sc);
                                return(read_error(sc, "unexpected close paren"));         /* (+ 1 2)) or (+ 1 . ) */
                        }
                    }
                    /* we never get here */
                    return(sc->nil);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x3d75a(%rip), %r14     # 0x11194c
leaq 0x4c5cd(%rip), %r12     # 0x1207c6
leaq 0x4c5f8(%rip), %rbp     # 0x1207f8
movl 0x30(%rbx), %eax
movb $0x1, %r15b
cmpq $0xe, %rax
ja 0xd4490
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movq 0x7a540(%rip), %r13     # 0x14e760
jmp 0xd448d
movq 0x4d8(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x50(%rbx), %rax
movq $0x1db, 0x18(%rax)      # imm = 0x1DB
jmp 0xd43b1
movq 0x4d8(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x50(%rbx), %rax
movq $0x1d8, 0x18(%rax)      # imm = 0x1D8
addq $0x20, 0x50(%rbx)
movq %rbx, %rdi
callq 0x97376
movl %eax, 0x30(%rbx)
testl %eax, %eax
je 0xd4482
cmpl $0x3, %eax
je 0xd444f
cmpl $0x2, %eax
jne 0xd449e
movq 0x110(%rbx), %r13
jmp 0xd448d
movq 0x170(%rbx), %rsi
movq 0x8(%rsi), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
callq *0x28(%rax)
jmp 0xd448a
movq 0x4d8(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x50(%rbx), %rax
movq $0x1d9, 0x18(%rax)      # imm = 0x1D9
jmp 0xd43b1
movq 0x50(%rbx), %rax
movq 0x110(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x50(%rbx), %rax
movq $0x1d7, 0x18(%rax)      # imm = 0x1D7
jmp 0xd4381
movq %rbx, %rdi
callq 0xf1723
xorl %r15d, %r15d
movq %rbx, %rdi
movq %rbp, %rsi
jmp 0xd4476
movq %rbx, %rdi
callq 0xf1723
movq 0x170(%rbx), %rdi
callq 0x97c27
cmpl $0x29, %eax
je 0xd4324
cmpl $-0x1, %eax
jne 0xd430e
xorl %r15d, %r15d
movq %rbx, %rdi
leaq 0x4e252(%rip), %rsi     # 0x122583
jmp 0xd4476
movq %rbx, %rdi
callq 0x97376
movl %eax, 0x30(%rbx)
movq 0x50(%rbx), %rax
movq 0x110(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x50(%rbx), %rax
movq $0x1d5, 0x18(%rax)      # imm = 0x1D5
addq $0x20, 0x50(%rbx)
jmp 0xd4490
movq 0x50(%rbx), %rax
movq 0x110(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x50(%rbx), %rax
movq $0x1d4, 0x18(%rax)      # imm = 0x1D4
addq $0x20, 0x50(%rbx)
movq %rbx, %rdi
callq 0x97376
movl %eax, 0x30(%rbx)
jmp 0xd4490
movq 0x4d8(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x50(%rbx), %rax
movq $0x1da, 0x18(%rax)      # imm = 0x1DA
addq $0x20, 0x50(%rbx)
movl $0x1, 0x30(%rbx)
jmp 0xd4490
movq %rbx, %rdi
callq 0xd4617
movq 0x20(%rbx), %r13
jmp 0xd448d
movq 0x170(%rbx), %rsi
movq 0x8(%rsi), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
callq *0x30(%rax)
jmp 0xd448a
movq 0x50(%rbx), %rax
movq 0x110(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x50(%rbx), %rax
movq $0x1d6, 0x18(%rax)      # imm = 0x1D6
addq $0x20, 0x50(%rbx)
movq %rbx, %rdi
callq 0x97376
movl %eax, 0x30(%rbx)
cmpl $0x2, %eax
je 0xd44d5
testl %eax, %eax
jne 0xd4490
movq 0x50(%rbx), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x50(%rbx)
movups -0x20(%rax), %xmm0
movups -0x10(%rax), %xmm1
movups %xmm0, (%rbx)
movups %xmm1, 0x10(%rbx)
xorl %r15d, %r15d
movq %rbx, %rdi
leaq 0x4e111(%rip), %rsi     # 0x12255e
jmp 0xd4476
movq %rbx, %rdi
callq 0xf1723
movq 0x170(%rbx), %rdi
callq 0x97c27
cmpl $0x29, %eax
je 0xd446d
cmpl $-0x1, %eax
jne 0xd4457
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xa38d4
movq %rax, %r13
jmp 0xd4490
movq %rbx, %rdi
callq 0xd3ddb
movq %rax, %r13
xorl %r15d, %r15d
testb %r15b, %r15b
jne 0xd4200
jmp 0xd4605
movq 0x50(%rbx), %rax
movq 0x110(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x50(%rbx), %rax
movq $0x1d1, 0x18(%rax)      # imm = 0x1D1
movq 0x50(%rbx), %rax
addq $0x20, %rax
movq %rax, 0x50(%rbx)
cmpq 0x58(%rbx), %rax
jb 0xd4490
movq %rbx, %rdi
callq 0xc15d0
jmp 0xd4490
movq 0x50(%rbx), %rax
movq 0x170(%rbx), %r12
leaq -0x20(%rax), %rcx
movq %rcx, 0x50(%rbx)
movups -0x20(%rax), %xmm0
movups -0x10(%rax), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
cmpb $0x23, (%r12)
jne 0xd45db
movq 0x8(%r12), %rax
cmpb $0x0, 0x2(%rax)
jne 0xd45db
cmpq $0x0, 0x10(%r12)
je 0xd45db
movq 0x20(%r12), %rbp
testq %rbp, %rbp
jle 0xd45db
cmpq $0x29, %rbp
movl $0x28, %eax
cmovgeq %rbp, %rax
movq %rax, 0x10(%rsp)
addq $-0x28, %rax
movq %rax, (%rsp)
xorl %r15d, %r15d
movl $0x80, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xf83b
movq %rax, 0x8(%rsp)
movq 0x10(%rax), %r13
movl $0x22207461, (%r13)     # imm = 0x22207461
movl $0x2e2e2e22, 0x3(%r13)  # imm = 0x2E2E2E22
leaq 0x7(%r13), %rdi
movq %rbp, %rdx
movq (%rsp), %rsi
subq %rsi, %rdx
addq 0x10(%r12), %rsi
callq 0x93e0
leaq 0x7(,%rbp), %rax
addq %r13, %rax
movq 0x10(%rsp), %rcx
subq %rcx, %rax
movw $0x2e2e, 0x28(%rax)     # imm = 0x2E2E
movb $0x2e, 0x2a(%rax)
subq %rcx, %rbp
addq $0x32, %rbp
movq 0x8(%rsp), %rcx
movq %rbp, 0x8(%rcx)
movq 0x1908(%rbx), %r13
movq 0x6d8(%rbx), %rax
movq %rcx, 0x8(%rax)
movq 0x6d8(%rbx), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3b366
jmp 0xd45f2
xorl %r15d, %r15d
movq %rbx, %rdi
leaq 0x4dfb6(%rip), %rsi     # 0x12259e
xorl %edx, %edx
callq 0xa38d4
movq %rax, %r13
leaq 0x4c1cd(%rip), %r12     # 0x1207c6
leaq 0x4c1f8(%rip), %rbp     # 0x1207f8
jmp 0xd4490
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq