// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_decl.c
// Function: parseDecl
void parseDecl(Compiler *comp)
{
    switch (comp->lex.tok.kind)
    {
        case TOK_TYPE:   parseTypeDecl(comp);       break;
        case TOK_CONST:  parseConstDecl(comp);      break;
        case TOK_VAR:    parseFullVarDecl(comp);    break;
        case TOK_IDENT:  parseShortVarDecl(comp);   break;
        case TOK_FN:     parseFnDecl(comp);         break;

        case TOK_EOF:    if (comp->blocks.top == 0)
                             break;

        default: comp->error.handler(comp->error.context, "Declaration expected but %s found", lexSpelling(comp->lex.tok.kind)); break;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
movl 0x4bd0(%rdi), %edi
cmpl $0x3, %edi
je 0x7c80
cmpl $0x8, %edi
je 0x7a63
cmpl $0x4c, %edi
je 0x79ba
cmpl $0x14, %edi
je 0x7a18
cmpl $0x45, %edi
je 0x79ff
cmpl $0x13, %edi
jne 0x79c7
leaq 0x4ba8(%rbx), %r15
pushq $0x13
popq %rsi
movq %r15, %rdi
callq 0x118d3
leaq 0x4e18(%rbx), %r14
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x158bc
cmpl $0x38, 0x4bd0(%rbx)
jne 0x7d16
movq %r15, %rdi
callq 0x10f6e
pushq $0x40
popq %rbp
cmpl $0x45, 0x4bd0(%rbx)
jne 0x7d20
movq %rbx, %rdi
callq 0x84aa
movq %r15, %rdi
movl %ebp, %esi
callq 0x118d3
jmp 0x7999
cmpl $0x0, 0x4b84(%rbx)
je 0x7d72
movq 0x50f8(%rbx), %r14
movq 0x5118(%rbx), %rbx
callq 0x118c5
leaq 0x62791(%rip), %rsi     # 0x6a172
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
movq %r14, %rcx
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
movq %rbx, %rdi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x77f1
leaq 0x4ba8(%rbx), %r14
pushq $0x14
popq %rsi
movq %r14, %rdi
callq 0x118d3
cmpl $0x38, 0x4bd0(%rbx)
jne 0x7ce1
movq %r14, %rdi
callq 0x10f6e
pushq $0x40
popq %rbp
cmpl $0x45, 0x4bd0(%rbx)
jne 0x7cfa
movq %rbx, %rdi
callq 0x86c9
movq %r14, %rdi
movl %ebp, %esi
callq 0x118d3
jmp 0x7a42
leaq 0x4220(%rbx), %r14
cmpl $0x0, 0x4b84(%rbx)
je 0x7a89
movq 0x5118(%rbx), %rdi
leaq 0x62980(%rip), %rsi     # 0x6a401
xorl %eax, %eax
callq *0x50f8(%rbx)
leaq 0x4ba8(%rbx), %r12
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x118d3
leaq 0x4e18(%rbx), %r13
pushq $0x1a
popq %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x14da9
movq %rax, %r15
cmpl $0x38, 0x4bd0(%rbx)
jne 0x7bad
pushq $0x38
popq %rsi
movq %r12, %rdi
callq 0x118d3
pushq $0x45
popq %rsi
movq %r12, %rdi
callq 0x118d3
leaq 0x4bd8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x30a0
pushq $0x41
popq %rsi
movq %r12, %rdi
callq 0x118d3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6e28
movq %rax, %rbp
cmpl $0x10, (%rax)
jne 0x7b11
movq 0x8(%rbp), %rax
movq 0x18(%rax), %rcx
testq %rcx, %rcx
jne 0x7b2f
movq 0x5118(%rbx), %rdi
leaq 0x62932(%rip), %rsi     # 0x6a451
xorl %eax, %eax
callq *0x50f8(%rbx)
movq 0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq %r14, 0x10(%rsp)
movl 0x110(%rcx), %ecx
cmpl 0x4b88(%rbx), %ecx
je 0x7b5c
movq 0x5118(%rbx), %rdi
leaq 0x62930(%rip), %rsi     # 0x6a480
xorl %eax, %eax
callq *0x50f8(%rbx)
movq 0x8(%rbp), %rax
leaq 0x28(%r15), %r14
movl (%rax), %eax
cmpl $0x17, %eax
je 0x7b6c
cmpl $0x10, %eax
jne 0x7b82
movq 0x5118(%rbx), %rdi
leaq 0x6293d(%rip), %rsi     # 0x6a4b7
xorl %eax, %eax
callq *0x50f8(%rbx)
movb $0x1, 0x30(%r15)
leaq 0x20(%rsp), %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
xorl %r8d, %r8d
callq 0x15e11
pushq $0x39
popq %rsi
movq %r12, %rdi
callq 0x118d3
movq 0x10(%rsp), %r14
pushq $0x45
popq %rsi
movq %r12, %rdi
callq 0x1187f
leaq 0x4bd8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x30a0
movq %r15, %r13
addq $0x28, %r13
cmpb $0x1, 0x30(%r15)
jne 0x7c17
movq 0x38(%r15), %rax
movq 0x108(%rax), %rax
movq 0x8(%rax), %rdi
cmpl $0x16, (%rdi)
jne 0x7c17
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x1590a
testq %rax, %rax
je 0x7c17
movq 0x5118(%rbx), %rdi
leaq 0x62828(%rip), %rsi     # 0x6a432
leaq 0x20(%rsp), %rdx
xorl %eax, %eax
callq *0x50f8(%rbx)
movq %r12, %rdi
callq 0x10f6e
movq %rbx, %rdi
callq 0x848a
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x8155
movslq 0x4e78(%rbx), %rax
leaq 0x4e38(%rbx), %rdi
leaq 0x100(%rbx), %rsi
movq %rax, (%rsp)
movzbl %bpl, %r9d
leaq 0x20(%rsp), %rcx
movq %r14, %rdx
movq %r15, %r8
callq 0x104c6
cmpl $0x3c, 0x4bd0(%rbx)
jne 0x7d46
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x12fb8
jmp 0x7d72
leaq 0x4ba8(%rbx), %r14
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x118d3
andq $0x0, 0x20(%rsp)
cmpl $0x38, 0x4bd0(%rbx)
jne 0x7d53
movq %r14, %rdi
callq 0x10f6e
leaq 0x20(%rsp), %r15
leaq 0x18(%rsp), %r12
pushq $0x40
popq %rbp
cmpl $0x45, 0x4bd0(%rbx)
jne 0x7d67
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x8572
movq %r14, %rdi
movl %ebp, %esi
callq 0x118d3
jmp 0x7cba
movq %rbx, %rdi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x86c9
pushq $0x39
popq %rsi
movq %r14, %rdi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x118d3
movq %rbx, %rdi
callq 0x84aa
jmp 0x7d2b
pushq $0x39
popq %rsi
movq %r15, %rdi
callq 0x118d3
movq %r14, %rdi
xorl %esi, %esi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x158bc
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14889
jmp 0x7d72
leaq 0x20(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x8572
jmp 0x7d72
pushq $0x39
popq %rsi
movq %r14, %rdi
callq 0x118d3
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq