// File: /workspace/github_c_makefile_star2_O3/voithos[P]awl/src/parser.c
// Function: awlval_read
static awlval* awlval_read(const mpc_ast_t* t) {
    if (strstr(t->tag, "integer")) {
        return awlval_read_int(t);
    }
    if (strstr(t->tag, "fpoint")) {
        return awlval_read_float(t);
    }
    if (strstr(t->tag, "bool")) {
        return awlval_read_bool(t);
    }
    if (strstr(t->tag, "string")) {
        return awlval_read_string(t);
    }
    if (strstr(t->tag, "qsymbol")) {
        return awlval_read_qsym(t);
    }
    if (strstr(t->tag, "symbol")) {
        return awlval_read_sym(t);
    }
    if (strstr(t->tag, "dict")) {
        return awlval_read_dict(t);
    }

    awlval* x = NULL;
    /* If root '>' */
    if (streq(t->tag, ">")) {
        x = awlval_sexpr();
    }
    else if (strstr(t->tag, "sexpr")) {
        x = awlval_sexpr();
    }
    else if (strstr(t->tag, "qexpr")) {
        x = awlval_qexpr();
    }
    else if (strstr(t->tag, "eexpr")) {
        x = awlval_eexpr();
    }
    else if (strstr(t->tag, "cexpr")) {
        x = awlval_cexpr();
    }

    for (int i = 0; i < t->children_num; i++) {
        if (streq(t->children[i]->contents, "(")) { continue; }
        if (streq(t->children[i]->contents, ")")) { continue; }
        if (streq(t->children[i]->contents, "{")) { continue; }
        if (streq(t->children[i]->contents, "}")) { continue; }
        if (streq(t->children[i]->contents, ":")) { continue; }
        if (streq(t->children[i]->contents, "\\")) { continue; }
        if (streq(t->children[i]->contents, "@")) { continue; }
        if (streq(t->children[i]->tag, "regex")) { continue; }
        if (strstr(t->children[i]->tag, "comment")) { continue; }
        x = awlval_add(x, awlval_read(t->children[i]));
    }

    return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
leaq 0x3cf9(%rip), %rsi      # 0x12d19
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf05e
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq 0x8(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x2260
cmpl $0x22, (%r14)
jne 0xf0b1
movq 0x8(%rbx), %rsi
leaq 0x4502(%rip), %rdi      # 0x1355e
jmp 0xf09c
leaq 0x3f72(%rip), %rsi      # 0x12fd7
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf0c7
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x20b0
cmpl $0x22, (%r14)
jne 0xf101
movq 0x8(%rbx), %rsi
leaq 0x44d5(%rip), %rdi      # 0x13571
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfe6b
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xff6f
leaq 0x3f10(%rip), %rsi      # 0x12fde
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf114
movq 0x8(%rbx), %rdi
leaq 0x449d(%rip), %rsi      # 0x13583
callq 0x11692
movzbl %al, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10090
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xff93
leaq 0x3c3b(%rip), %rsi      # 0x12d56
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf199
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x2110
movb $0x0, -0x1(%r14,%rax)
movq 0x8(%rbx), %rbx
incq %rbx
movq %rbx, %rdi
callq 0x2110
leaq 0x1(%rax), %rdi
callq 0x2290
testq %rax, %rax
je 0xf404
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
movq %r14, %rdi
callq 0xbc3b
movq %rax, %rbx
movq %rax, %rdi
callq 0x10032
movq %rax, %r14
movq %rbx, %rdi
callq 0x23f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3e4b(%rip), %rsi      # 0x12feb
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf1c3
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf468
leaq 0x352c(%rip), %rsi      # 0x126f6
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf1ee
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xffbf
leaq 0x3e0a(%rip), %rsi      # 0x12fff
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf218
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf50d
leaq 0x3d11(%rip), %rsi      # 0x12f30
movq %r14, %rdi
callq 0x11692
testb %al, %al
jne 0xf246
movq (%rbx), %r14
leaq 0x3dbe(%rip), %rsi      # 0x12ff3
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf3a2
callq 0x1020f
movq %rax, %r14
cmpl $0x0, 0x1c(%rbx)
jle 0xf187
xorl %ebp, %ebp
leaq 0x3b02(%rip), %r15      # 0x12d63
leaq 0x3afd(%rip), %r12      # 0x12d65
leaq 0x3af8(%rip), %r13      # 0x12d67
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x11692
testb %al, %al
jne 0xf38d
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rdi
movq %r12, %rsi
callq 0x11692
testb %al, %al
jne 0xf38d
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rdi
movq %r13, %rsi
callq 0x11692
testb %al, %al
jne 0xf38d
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rdi
leaq 0x3c90(%rip), %rsi      # 0x12f66
callq 0x11692
testb %al, %al
jne 0xf38d
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rdi
leaq 0x3cdd(%rip), %rsi      # 0x12fd3
callq 0x11692
testb %al, %al
jne 0xf38d
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rdi
leaq 0x3bf6(%rip), %rsi      # 0x12f0c
callq 0x11692
testb %al, %al
jne 0xf38d
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rdi
leaq 0x422a(%rip), %rsi      # 0x1355c
callq 0x11692
testb %al, %al
jne 0xf38d
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq (%rax), %rdi
leaq 0x3a10(%rip), %rsi      # 0x12d5d
callq 0x11692
testb %al, %al
jne 0xf38d
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq %rax, (%rsp)
movq (%rax), %rdi
leaq 0x3c77(%rip), %rsi      # 0x12fe3
callq 0x23c0
testq %rax, %rax
jne 0xf38d
movq (%rsp), %rdi
callq 0xf008
movq %r14, %rdi
movq %rax, %rsi
callq 0x1036d
movq %rax, %r14
incq %rbp
movslq 0x1c(%rbx), %rax
cmpq %rax, %rbp
jl 0xf26f
jmp 0xf187
leaq 0x3c50(%rip), %rsi      # 0x12ff9
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf3c0
callq 0x10233
jmp 0xf24b
leaq 0x3c3d(%rip), %rsi      # 0x13004
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf3de
callq 0x10257
jmp 0xf24b
leaq 0x3c25(%rip), %rsi      # 0x1300a
movq %r14, %rdi
callq 0x23c0
testq %rax, %rax
je 0xf3fc
callq 0x1027b
jmp 0xf24b
xorl %r14d, %r14d
jmp 0xf24e
callq 0x25e1