// File: fondoger[P]C0-Compiler/src/grammar.cpp
// Function: pConstDefinition(IdentScope)
static void pConstDefinition(IdentScope scope)
{
    assert(g_sym == CONSTSY);
    readSymbol();
    test3(Symset({INTSY, CHARSY}));
    DataType dtype = g_sym == INTSY ? DT_INT : DT_CHAR;
    TabEntry entry;
    while (true) {
        readSymbol(); // skip INTSY, CHARSY or COMMA
        test3(Symset({IDENTSY}));
        std::string id = g_id;
        readSymbol();
        test3(Symset({BECOMES}));
        readSymbol();
        if (dtype == DT_INT) {
            pSignedInteger();
            entry = { scope, IT_CONST, DT_INT, g_num, -1 };
        } else { // DT_CHAR
            test3(Symset({CHARVALUE}));
            entry = { scope, IT_CONST, DT_CHAR, g_char, -1 };
            readSymbol();
        }
        tabInsert(id, entry);
        if (g_sym != COMMA) {
            break;
        }
    }
    test(Symset({SEMICOLON}), Symset({SEMICOLON, RBRACE, CONSTSY}));
    if (g_sym == CONSTSY)
        return;
    test3(Symset({SEMICOLON}));
    readSymbol();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movl %edi, -0x4(%rbp)
leaq 0x2962b(%rip), %rax     # 0x4b6b0
cmpl $0x1, (%rax)
jne 0x2208c
jmp 0x220ab
leaq 0x13a60(%rip), %rdi     # 0x35af3
leaq 0x1338e(%rip), %rsi     # 0x35428
movl $0x30e, %edx            # imm = 0x30E
leaq 0x13a5e(%rip), %rcx     # 0x35b04
callq 0x3230
callq 0x2e050
movl $0x2, -0x28(%rbp)
movl $0x3, -0x24(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x2, -0x18(%rbp)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x10(%rbp), %rdi
callq 0x227f0
movl $0x22, -0x48(%rbp)
movl $0x26, -0x44(%rbp)
leaq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x2, -0x38(%rbp)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x227f0
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x18170
movl $0x2, -0x68(%rbp)
movl $0x3, -0x64(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x2, -0x58(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x227f0
leaq 0x2955f(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x50(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x22164
jmp 0x2216e
callq 0x2e050
jmp 0x227d4
jmp 0x22170
leaq 0x29539(%rip), %rax     # 0x4b6b0
movl (%rax), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x2, %edx
cmovel %ecx, %eax
movl %eax, -0x6c(%rbp)
callq 0x2e050
movl $0x0, -0x9c(%rbp)
leaq -0x9c(%rbp), %rax
movq %rax, -0x98(%rbp)
movq $0x1, -0x90(%rbp)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x227f0
movl $0x22, -0xc0(%rbp)
movl $0x26, -0xbc(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq $0x2, -0xb0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x227f0
movq -0x88(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x18170
movl $0x0, -0xdc(%rbp)
leaq -0xdc(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq $0x1, -0xd0(%rbp)
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x227f0
leaq 0x29444(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0xc8(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x22282
jmp 0x2228c
callq 0x2e050
jmp 0x227d4
jmp 0x2228e
leaq 0x29423(%rip), %rsi     # 0x4b6b8
leaq -0x100(%rbp), %rdi
callq 0x3140
callq 0x2e050
jmp 0x222a8
jmp 0x222aa
movl $0x23, -0x12c(%rbp)
leaq -0x12c(%rbp), %rax
movq %rax, -0x128(%rbp)
movq $0x1, -0x120(%rbp)
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdx
leaq -0x118(%rbp), %rdi
callq 0x227f0
jmp 0x222e9
movl $0x22, -0x150(%rbp)
movl $0x26, -0x14c(%rbp)
leaq -0x150(%rbp), %rax
movq %rax, -0x148(%rbp)
movq $0x2, -0x140(%rbp)
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
leaq -0x138(%rbp), %rdi
callq 0x227f0
jmp 0x22332
movq -0x118(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x18170
jmp 0x22347
movl $0x23, -0x16c(%rbp)
leaq -0x16c(%rbp), %rax
movq %rax, -0x168(%rbp)
movq $0x1, -0x160(%rbp)
movq -0x168(%rbp), %rsi
movq -0x160(%rbp), %rdx
leaq -0x158(%rbp), %rdi
callq 0x227f0
jmp 0x22386
leaq 0x29323(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x158(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x223a3
jmp 0x223dc
callq 0x2e050
jmp 0x223aa
movl $0x1, -0x170(%rbp)
jmp 0x225eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x108(%rbp)
movl %eax, -0x10c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x35e8
jmp 0x227dd
jmp 0x223de
jmp 0x223e0
callq 0x2e050
jmp 0x223e7
cmpl $0x1, -0x6c(%rbp)
jne 0x2244e
callq 0x20ed0
jmp 0x223f4
movl -0x4(%rbp), %eax
movl %eax, -0x184(%rbp)
movl $0x0, -0x180(%rbp)
movl $0x1, -0x17c(%rbp)
leaq 0x292c4(%rip), %rax     # 0x4b6dc
movl (%rax), %eax
movl %eax, -0x178(%rbp)
movl $0xffffffff, -0x174(%rbp) # imm = 0xFFFFFFFF
movq -0x184(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x17c(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x174(%rbp), %eax
movl %eax, -0x70(%rbp)
jmp 0x225b7
jmp 0x22450
movl $0x10, -0x1a4(%rbp)
leaq -0x1a4(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq $0x1, -0x198(%rbp)
movq -0x1a0(%rbp), %rsi
movq -0x198(%rbp), %rdx
leaq -0x190(%rbp), %rdi
callq 0x227f0
jmp 0x2248f
movl $0x22, -0x1c8(%rbp)
movl $0x26, -0x1c4(%rbp)
leaq -0x1c8(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq $0x2, -0x1b8(%rbp)
movq -0x1c0(%rbp), %rsi
movq -0x1b8(%rbp), %rdx
leaq -0x1b0(%rbp), %rdi
callq 0x227f0
jmp 0x224d8
movq -0x190(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
callq 0x18170
jmp 0x224ed
movl $0x10, -0x1e4(%rbp)
leaq -0x1e4(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq $0x1, -0x1d8(%rbp)
movq -0x1e0(%rbp), %rsi
movq -0x1d8(%rbp), %rdx
leaq -0x1d0(%rbp), %rdi
callq 0x227f0
jmp 0x2252c
leaq 0x2917d(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x1d0(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x22549
jmp 0x2255f
callq 0x2e050
jmp 0x22550
movl $0x1, -0x170(%rbp)
jmp 0x225eb
jmp 0x22561
jmp 0x22563
movl -0x4(%rbp), %eax
movl %eax, -0x1f8(%rbp)
movl $0x0, -0x1f4(%rbp)
movl $0x2, -0x1f0(%rbp)
leaq 0x29151(%rip), %rax     # 0x4b6d8
movsbl (%rax), %eax
movl %eax, -0x1ec(%rbp)
movl $0xffffffff, -0x1e8(%rbp) # imm = 0xFFFFFFFF
movl -0x1e8(%rbp), %eax
movl %eax, -0x70(%rbp)
movups -0x1f8(%rbp), %xmm0
movaps %xmm0, -0x80(%rbp)
callq 0x2e050
jmp 0x225b5
jmp 0x225b7
leaq -0x100(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2f430
jmp 0x225c9
leaq 0x290e0(%rip), %rax     # 0x4b6b0
cmpl $0x24, (%rax)
je 0x225e1
movl $0x5, -0x170(%rbp)
jmp 0x225eb
movl $0x0, -0x170(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x35e8
movl -0x170(%rbp), %eax
movl %eax, -0x2a0(%rbp)
testl %eax, %eax
je 0x2261c
jmp 0x22609
movl -0x2a0(%rbp), %eax
subl $0x1, %eax
je 0x227d4
jmp 0x2261a
jmp 0x22621
jmp 0x2218c
movl $0x26, -0x214(%rbp)
leaq -0x214(%rbp), %rax
movq %rax, -0x210(%rbp)
movq $0x1, -0x208(%rbp)
movq -0x210(%rbp), %rsi
movq -0x208(%rbp), %rdx
leaq -0x200(%rbp), %rdi
callq 0x227f0
movl $0x26, -0x23c(%rbp)
movl $0x22, -0x238(%rbp)
movl $0x1, -0x234(%rbp)
leaq -0x23c(%rbp), %rax
movq %rax, -0x230(%rbp)
movq $0x3, -0x228(%rbp)
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdx
leaq -0x220(%rbp), %rdi
callq 0x227f0
movq -0x200(%rbp), %rdi
movq -0x220(%rbp), %rsi
callq 0x18170
leaq 0x28fe7(%rip), %rax     # 0x4b6b0
cmpl $0x1, (%rax)
jne 0x226d3
jmp 0x227d4
jmp 0x226d5
movl $0x26, -0x25c(%rbp)
leaq -0x25c(%rbp), %rax
movq %rax, -0x258(%rbp)
movq $0x1, -0x250(%rbp)
movq -0x258(%rbp), %rsi
movq -0x250(%rbp), %rdx
leaq -0x248(%rbp), %rdi
callq 0x227f0
movl $0x22, -0x280(%rbp)
movl $0x26, -0x27c(%rbp)
leaq -0x280(%rbp), %rax
movq %rax, -0x278(%rbp)
movq $0x2, -0x270(%rbp)
movq -0x278(%rbp), %rsi
movq -0x270(%rbp), %rdx
leaq -0x268(%rbp), %rdi
callq 0x227f0
movq -0x248(%rbp), %rdi
movq -0x268(%rbp), %rsi
callq 0x18170
movl $0x26, -0x29c(%rbp)
leaq -0x29c(%rbp), %rax
movq %rax, -0x298(%rbp)
movq $0x1, -0x290(%rbp)
movq -0x298(%rbp), %rsi
movq -0x290(%rbp), %rdx
leaq -0x288(%rbp), %rdi
callq 0x227f0
leaq 0x28f00(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x288(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x227c6
jmp 0x227cd
callq 0x2e050
jmp 0x227d4
jmp 0x227cf
callq 0x2e050
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
movq -0x108(%rbp), %rdi
callq 0x3560
nopl (%rax)