// File: /workspace/github_c_makefile_star2_O1/samsonjs[P]lake/src/parse.c
// Function: parse_expr
static LakeVal *_parse_expr(Ctx *ctx)
{
    maybe_spaces(ctx);

    LakeVal *result;
    char c = peek(ctx);
    /* try to parse a number, if that fails parse a symbol */
    if ((c >= '0' && c <= '9') || c == '-' || c == '+')
    {
        result = VAL(parse_int(ctx));
        if (result == NULL)
        {
            result = parse_sym(ctx);
        }
    }
    else if (is_letter(c) || is_symbol(c))
    {
        result = parse_sym(ctx);
    }
    else if (c == '"')
    {
        result = parse_str(ctx);
    }
    else if (c == '\'')
    {
        result = parse_quoted(ctx);
    }
    else if (c == '(')
    {
        result = parse_list(ctx);
    }
    else if (c == ';')
    {
        result = parse_comment(ctx);
    }
    else if (c == PARSE_EOF)
    {
        result = NULL;
    }
    else
    {
        ERR("unexpected char '%c'", c);
        result = VAL(PARSE_ERR);
        ctx->i = ctx->n; /* consume the rest */
        result = NULL;
    }
    maybe_spaces(ctx);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x4110
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rax
movb $-0x1, %cl
cmpq %rdx, %rax
jae 0x3e37
movq (%rbx), %rcx
movb (%rcx,%rax), %cl
leaq 0x10(%rbx), %r14
leaq 0x8(%rbx), %r15
leal -0x30(%rcx), %esi
cmpb $0xa, %sil
jb 0x3e5b
cmpb $0x2d, %cl
je 0x3e5b
movzbl %cl, %r12d
cmpl $0x2b, %r12d
jne 0x3efe
movq %rax, 0x18(%rbx)
movb $-0x1, %bpl
cmpq %rdx, %rax
jae 0x3e6e
movq (%rbx), %rcx
movb (%rcx,%rax), %bpl
cmpb $0x2b, %bpl
je 0x3e7d
movzbl %bpl, %eax
cmpl $0x2d, %eax
jne 0x3e9b
movq %rbx, %rdi
callq 0x4158
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x3eec
movq (%rbx), %rcx
movb (%rcx,%rax), %al
addb $-0x3a, %al
cmpb $-0xb, %al
jbe 0x3eec
xorl %r12d, %r12d
movq (%r14), %rax
movq (%r15), %rcx
movb $-0x1, %dl
cmpq %rcx, %rax
jae 0x3eb1
movq (%rbx), %rdx
movb (%rdx,%rax), %dl
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x3ed3
leal (%r12,%r12,4), %eax
movzbl %dl, %ecx
leal (%rcx,%rax,2), %r12d
addl $-0x30, %r12d
movq %rbx, %rdi
callq 0x4158
jmp 0x3e9e
movb $-0x1, %dl
cmpq %rcx, %rax
jae 0x3ee0
movq (%rbx), %rcx
movb (%rcx,%rax), %dl
movsbl %dl, %edi
callq 0x44f9
testl %eax, %eax
je 0x3f42
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rbx)
xorl %r14d, %r14d
testq %r14, %r14
jne 0x3f2e
jmp 0x3f23
movl %ecx, %eax
andb $-0x21, %al
addb $-0x5b, %al
cmpb $-0x1b, %al
ja 0x3f23
movsbl %cl, %ebp
leaq 0x252c(%rip), %rdi      # 0x643e
movl $0x14, %edx
movl %ebp, %esi
callq 0x1120
testq %rax, %rax
je 0x3f59
movq %rbx, %rdi
callq 0x4170
movq %rax, %r14
movq %rbx, %rdi
callq 0x4110
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, %edi
negl %edi
cmpb $0x2d, %bpl
cmovnel %r12d, %edi
callq 0x363e
movq %rax, %r14
jmp 0x3ef7
cmpl $0x27, %r12d
jle 0x3f79
cmpl $0x28, %r12d
je 0x3f8f
cmpl $0x3b, %r12d
je 0x3fa3
cmpl $0xff, %r12d
jne 0x3fb0
xorl %r14d, %r14d
jmp 0x3f2e
cmpl $0x22, %r12d
je 0x3f99
cmpl $0x27, %r12d
jne 0x3fb0
movq %rbx, %rdi
callq 0x4303
jmp 0x3f2b
movq %rbx, %rdi
callq 0x4355
jmp 0x3f2b
movq %rbx, %rdi
callq 0x420d
jmp 0x3f2b
movq %rbx, %rdi
callq 0x445c
jmp 0x3f2b
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x165f
jmp 0x3f74