// File: /workspace/github_c_makefile_star2_O1/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 $0x13, %edi
jg 0x107b0
cmpl $0x3, %edi
je 0x1080c
cmpl $0x8, %edi
je 0x108d4
cmpl $0x13, %edi
jne 0x107d4
leaq 0x4ba8(%rbx), %r15
movq %r15, %rdi
movl $0x13, %esi
callq 0x1b41f
leaq 0x4e18(%rbx), %r14
movq %r14, %rdi
movl $0x1, %esi
callq 0x1f592
cmpl $0x38, 0x4bd0(%rbx)
jne 0x10b92
movq %r15, %rdi
callq 0x1a984
cmpl $0x45, 0x4bd0(%rbx)
jne 0x10b83
movq %rbx, %rdi
callq 0x1127b
movq %r15, %rdi
movl $0x40, %esi
callq 0x1b41f
jmp 0x1078c
cmpl $0x14, %edi
je 0x10887
cmpl $0x45, %edi
je 0x10b1f
cmpl $0x4c, %edi
jne 0x107d4
cmpl $0x0, 0x4b84(%rbx)
je 0x10bc0
movq 0x50f8(%rbx), %r14
movq 0x5118(%rbx), %rbx
callq 0x1b411
leaq 0x669e0(%rip), %rsi     # 0x771ce
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
leaq 0x4ba8(%rbx), %r14
movq %r14, %rdi
movl $0x3, %esi
callq 0x1b41f
movq $0x0, 0x20(%rsp)
cmpl $0x38, 0x4bd0(%rbx)
jne 0x10b38
movq %r14, %rdi
callq 0x1a984
cmpl $0x45, 0x4bd0(%rbx)
jne 0x10875
leaq 0x20(%rsp), %r15
leaq 0x18(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x11355
movq %r14, %rdi
movl $0x40, %esi
callq 0x1b41f
cmpl $0x45, 0x4bd0(%rbx)
je 0x10851
movq %r14, %rdi
movl $0x39, %esi
callq 0x1b41f
jmp 0x10bc0
leaq 0x4ba8(%rbx), %r14
movq %r14, %rdi
movl $0x14, %esi
callq 0x1b41f
cmpl $0x38, 0x4bd0(%rbx)
jne 0x10b4c
movq %r14, %rdi
callq 0x1a984
cmpl $0x45, 0x4bd0(%rbx)
jne 0x10b65
movq %rbx, %rdi
callq 0x1155d
movq %r14, %rdi
movl $0x40, %esi
callq 0x1b41f
jmp 0x108b0
leaq 0x4220(%rbx), %r15
cmpl $0x0, 0x4b84(%rbx)
je 0x108fa
movq 0x5118(%rbx), %rdi
leaq 0x66b6b(%rip), %rsi     # 0x7745d
xorl %eax, %eax
callq *0x50f8(%rbx)
leaq 0x4ba8(%rbx), %r12
movq %r12, %rdi
movl $0x8, %esi
callq 0x1b41f
leaq 0x4e18(%rbx), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl $0x1a, %edx
callq 0x1ea48
movq %rax, %r13
movq %rax, %r14
cmpl $0x38, 0x4bd0(%rbx)
movq %rax, 0x8(%rsp)
jne 0x10a37
movq %r12, %rdi
movl $0x38, %esi
callq 0x1b41f
movq %r12, %rdi
movl $0x45, %esi
callq 0x1b41f
leaq 0x4bd8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x30a0
movq %r12, %rdi
movl $0x41, %esi
callq 0x1b41f
movq %rbx, %rdi
xorl %esi, %esi
callq 0xfb34
movq %rax, %r14
cmpl $0x10, (%rax)
jne 0x10992
movq 0x8(%r14), %rax
cmpq $0x0, 0x18(%rax)
jne 0x109a8
movq 0x5118(%rbx), %rdi
leaq 0x66b0d(%rip), %rsi     # 0x774ad
xorl %eax, %eax
callq *0x50f8(%rbx)
movq %r15, 0x10(%rsp)
movq 0x8(%r14), %rax
movq 0x18(%rax), %rax
movl 0x110(%rax), %eax
cmpl 0x4b88(%rbx), %eax
je 0x109d9
movq 0x5118(%rbx), %rdi
leaq 0x66b0b(%rip), %rsi     # 0x774dc
xorl %eax, %eax
callq *0x50f8(%rbx)
leaq 0x28(%r13), %r15
movq 0x8(%r14), %rax
movl (%rax), %eax
cmpl $0x17, %eax
je 0x109ed
cmpl $0x10, %eax
jne 0x10a03
movq 0x5118(%rbx), %rdi
leaq 0x66b18(%rip), %rsi     # 0x77513
xorl %eax, %eax
callq *0x50f8(%rbx)
movq 0x8(%rsp), %rax
movb $0x1, 0x30(%rax)
leaq 0x20(%rsp), %rcx
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %r14
xorl %r8d, %r8d
callq 0x1fbf9
movq %r12, %rdi
movl $0x39, %esi
callq 0x1b41f
movq 0x10(%rsp), %r15
movq %r12, %rdi
movl $0x45, %esi
callq 0x1b3c8
leaq 0x4bd8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x30a0
cmpb $0x1, 0x30(%r14)
jne 0x10a9c
movq 0x38(%r14), %rax
movq 0x108(%rax), %rax
movq 0x8(%rax), %rdi
cmpl $0x16, (%rdi)
jne 0x10a9c
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x1f5e0
testq %rax, %rax
je 0x10a9c
movq 0x5118(%rbx), %rdi
leaq 0x669ff(%rip), %rsi     # 0x7748e
leaq 0x20(%rsp), %rdx
xorl %eax, %eax
callq *0x50f8(%rbx)
addq $0x28, %r13
movq %r12, %rdi
callq 0x1a984
movl 0x4bd0(%rbx), %r14d
cmpl $0x18, %r14d
jne 0x10abd
movq %r12, %rdi
callq 0x1b39a
xorl %ebp, %ebp
cmpl $0x18, %r14d
sete %bpl
movq %rbx, %rdi
movq %r13, %rsi
callq 0x10f42
movslq 0x4e78(%rbx), %rax
leaq 0x4e38(%rbx), %rdi
leaq 0x100(%rbx), %rsi
movq %rax, (%rsp)
leaq 0x20(%rsp), %rcx
movq %r15, %rdx
movq 0x8(%rsp), %r8
movl %ebp, %r9d
callq 0x19dcf
cmpl $0x3c, 0x4bd0(%rbx)
jne 0x10bb5
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1cbc9
jmp 0x10bc0
movq %rbx, %rdi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x105cb
leaq 0x20(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x11355
jmp 0x10bc0
movq %rbx, %rdi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1155d
movq %r14, %rdi
movl $0x39, %esi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b41f
movq %r15, %rdi
movl $0x39, %esi
callq 0x1b41f
jmp 0x10b9a
movq %rbx, %rdi
callq 0x1127b
movq %r14, %rdi
xorl %esi, %esi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f592
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1e536
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq