// File: /workspace/github_cpp_makefile_star2_O3/fondoger[P]C0-Compiler/src/grammar.cpp
// Function: pLocalVariableDefinitions()
static void pLocalVariableDefinitions()
{
    while (g_sym == INTSY || g_sym == CHARSY) {
        DataType dtype = (g_sym == INTSY ? DT_INT : DT_CHAR);
        std::string type_str = (dtype == DT_INT ? "int" : "char");
        while (true) {
            // g_sym always points to the one before idnetifier
            readSymbol(); // skip comma or INTSY or CHARSY
            test3(Symset({IDENTSY}));
            std::string id = g_id;
            readSymbol(); // skip identifier
            if (g_sym == LBRACK) {      // array definition
                readSymbol(); // skip left bracket
                test3(Symset({INTVALUE}));
                int array_size = g_num;
                TabEntry entry = { LOCAL, IT_ARRAY, dtype, array_size, -1 };
                tabInsert(id, entry);
                genMidCode(VAR, type_str, id, std::to_string(array_size));
                readSymbol(); // skip size number
                test3(Symset({RBRACK}));
                readSymbol();
            } else {                    // normal variable definition
                TabEntry entry = { LOCAL, IT_VARIABLE, dtype, -1, -1 };
                tabInsert(id, entry);
                genMidCode(VAR, type_str, id, NONE);
            }
            if (g_sym != COMMA) {
                break;
            }
        }
        test3(Symset({SEMICOLON}));
        readSymbol();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq -0x80(%rbp), %r12
leaq 0x19d20(%rip), %r13     # 0x29630
leaq -0x70(%rbp), %r14
leaq -0x50(%rbp), %r15
movl (%r13), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0xfd7f
xorl %ecx, %ecx
cmpl $0x2, %eax
sete %cl
leaq 0xc9f7(%rip), %rsi      # 0x1c330
leaq 0xccba(%rip), %rax      # 0x1c5fa
cmoveq %rax, %rsi
movl $0x2, %eax
subl %ecx, %eax
movl %eax, -0x30(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
negq %rcx
leaq (%rsi,%rcx), %rdx
addq $0x4, %rdx
leaq -0xb0(%rbp), %rdi
callq 0x14396
callq 0x19d18
movl $0x0, -0x50(%rbp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x13dee
movabsq $0x2600000022, %rax     # imm = 0x2600000022
movq %rax, -0x90(%rbp)
movl $0x2, %edx
leaq -0xe8(%rbp), %rdi
leaq -0x90(%rbp), %rbx
movq %rbx, %rsi
callq 0x13dee
movq -0x70(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0xd8a2
movl $0x0, -0x50(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13dee
movq -0x90(%rbp), %rax
movl (%r13), %ecx
btq %rcx, %rax
jae 0xfd51
movq %r12, -0x90(%rbp)
leaq 0x19c33(%rip), %rax     # 0x29638
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe4fc
callq 0x19d18
cmpl $0x1f, (%r13)
jne 0xfb43
callq 0x19d18
movl $0x11, -0x64(%rbp)
movl $0x1, %edx
leaq -0xe0(%rbp), %rdi
leaq -0x64(%rbp), %rsi
callq 0x13dee
movabsq $0x2600000022, %rax     # imm = 0x2600000022
movq %rax, -0x50(%rbp)
movl $0x2, %edx
leaq -0xd8(%rbp), %rdi
movq %r15, %rsi
callq 0x13dee
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0xd8a2
movl $0x11, -0x64(%rbp)
movl $0x1, %edx
movq %r15, %rdi
leaq -0x64(%rbp), %rsi
callq 0x13dee
movq -0x50(%rbp), %rax
movl (%r13), %ecx
btq %rcx, %rax
jae 0xfb90
leaq 0x19bae(%rip), %rax     # 0x2965c
movl (%rax), %r14d
movabsq $0x300000001, %rax      # imm = 0x300000001
movq %rax, -0x64(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl %r14d, -0x58(%rbp)
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
movq %rbx, %rdi
leaq -0x64(%rbp), %rsi
callq 0x1a982
movl $0x8, -0x2c(%rbp)
movl %r14d, %r12d
negl %r12d
cmovsl %r14d, %r12d
movl $0x1, %ebx
cmpl $0xa, %r12d
jb 0xfba6
movl $0x4, %ebx
movl %r12d, %eax
cmpl $0x63, %eax
jbe 0xfb9f
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xfba4
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xfba6
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0xfb04
addl $-0x3, %ebx
jmp 0xfba6
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, -0x50(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x48(%rbp)
movq $-0x1, -0x44(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a982
movl $0x8, -0x64(%rbp)
leaq -0x64(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movq %rbx, %rdx
leaq 0x153fa(%rip), %rcx     # 0x24f80
callq 0x150ec
jmp 0xfc89
movl $0x1, %ebx
callq 0x19d18
jmp 0xfc96
addl $-0x2, %ebx
jmp 0xfba6
decl %ebx
shrl $0x1f, %r14d
leal (%rbx,%r14), %esi
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r15, %rdi
movl $0x2d, %edx
callq 0x3350
addq -0x50(%rbp), %r14
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x13e46
leaq -0x2c(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x90(%rbp), %rdx
movq %r15, %rcx
callq 0x150ec
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
leaq -0x80(%rbp), %r12
je 0xfc04
callq 0x32a0
callq 0x19d18
movl $0x20, -0x2c(%rbp)
movl $0x1, %edx
leaq -0xd0(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x13dee
movabsq $0x2600000022, %rax     # imm = 0x2600000022
movq %rax, -0x50(%rbp)
movl $0x2, %edx
leaq -0xc8(%rbp), %rdi
movq %r15, %rsi
callq 0x13dee
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0xd8a2
movl $0x20, -0x2c(%rbp)
movl $0x1, %edx
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x13dee
movl (%r13), %ebx
movq -0x50(%rbp), %r14
callq 0x19d18
btq %rbx, %r14
leaq -0x70(%rbp), %r14
jae 0xfcb1
xorl %eax, %eax
cmpl $0x24, (%r13)
setne %al
leal (%rax,%rax,4), %ebx
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0xfca7
callq 0x32a0
testl %ebx, %ebx
je 0xf973
jmp 0xfcb8
movl $0x1, %ebx
jmp 0xfc96
cmpl $0x5, %ebx
jne 0xfd5b
movl $0x26, -0x50(%rbp)
movl $0x1, %edx
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
callq 0x13dee
movabsq $0x2600000022, %rax     # imm = 0x2600000022
movq %rax, -0x90(%rbp)
movl $0x2, %edx
leaq -0xb8(%rbp), %rdi
leaq -0x90(%rbp), %rbx
movq %rbx, %rsi
callq 0x13dee
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0xd8a2
movl $0x26, -0x50(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13dee
movq -0x90(%rbp), %rax
movl (%r13), %ecx
xorl %ebx, %ebx
btq %rcx, %rax
setae %r14b
callq 0x19d18
movb %r14b, %bl
jmp 0xfd5b
movl $0x1, %ebx
callq 0x19d18
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xfd73
callq 0x32a0
testl %ebx, %ebx
leaq -0x70(%rbp), %r14
je 0xf918
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfde9
jmp 0xfde9
jmp 0xfde9
jmp 0xfde9
jmp 0xfdd3
jmp 0xfdd3
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xfdb7
callq 0x32a0
jmp 0xfdb7
movq %rax, %rbx
leaq -0x80(%rbp), %r12
jmp 0xfdd6
jmp 0xfdd3
jmp 0xfdd3
jmp 0xfdd3
jmp 0xfdd3
jmp 0xfdd3
jmp 0xfdd3
jmp 0xfde9
jmp 0xfdd3
jmp 0xfde9
jmp 0xfde9
jmp 0xfde9
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0xfdec
callq 0x32a0
jmp 0xfdec
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xfe04
callq 0x32a0
movq %rbx, %rdi
callq 0x3480