// File: /workspace/github_cpp_makefile_star2_O1/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 0x19c30(%rip), %r13     # 0x29630
leaq -0x70(%rbp), %r14
leaq -0x50(%rbp), %r15
movl (%r13), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0xfe6f
xorl %ecx, %ecx
cmpl $0x2, %eax
sete %cl
leaq 0xc907(%rip), %rsi      # 0x1c330
leaq 0xcc0f(%rip), %rax      # 0x1c63f
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 0x14454
callq 0x19e44
movl $0x0, -0x50(%rbp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x13eac
movabsq $0x2600000022, %rax     # imm = 0x2600000022
movq %rax, -0x90(%rbp)
movl $0x2, %edx
leaq -0xe8(%rbp), %rdi
leaq -0x90(%rbp), %rbx
movq %rbx, %rsi
callq 0x13eac
movq -0x70(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0xd8a2
movl $0x0, -0x50(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13eac
movq -0x90(%rbp), %rax
movl (%r13), %ecx
btq %rcx, %rax
jae 0xfe41
movq %r12, -0x90(%rbp)
leaq 0x19b43(%rip), %rax     # 0x29638
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe4c0
callq 0x19e44
cmpl $0x1f, (%r13)
jne 0xfc33
callq 0x19e44
movl $0x11, -0x64(%rbp)
movl $0x1, %edx
leaq -0xe0(%rbp), %rdi
leaq -0x64(%rbp), %rsi
callq 0x13eac
movabsq $0x2600000022, %rax     # imm = 0x2600000022
movq %rax, -0x50(%rbp)
movl $0x2, %edx
leaq -0xd8(%rbp), %rdi
movq %r15, %rsi
callq 0x13eac
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 0x13eac
movq -0x50(%rbp), %rax
movl (%r13), %ecx
btq %rcx, %rax
jae 0xfc80
leaq 0x19abe(%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 0x1aaca
movl $0x8, -0x2c(%rbp)
movl %r14d, %r12d
negl %r12d
cmovsl %r14d, %r12d
movl $0x1, %ebx
cmpl $0xa, %r12d
jb 0xfc96
movl $0x4, %ebx
movl %r12d, %eax
cmpl $0x63, %eax
jbe 0xfc8f
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xfc94
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xfc96
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 0xfbf4
addl $-0x3, %ebx
jmp 0xfc96
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 0x1aaca
movl $0x8, -0x64(%rbp)
leaq -0x64(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movq %rbx, %rdx
leaq 0x1530a(%rip), %rcx     # 0x24f80
callq 0x151b0
jmp 0xfd79
movl $0x1, %ebx
callq 0x19e44
jmp 0xfd86
addl $-0x2, %ebx
jmp 0xfc96
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 0x13f04
leaq -0x2c(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x90(%rbp), %rdx
movq %r15, %rcx
callq 0x151b0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
leaq -0x80(%rbp), %r12
je 0xfcf4
callq 0x32a0
callq 0x19e44
movl $0x20, -0x2c(%rbp)
movl $0x1, %edx
leaq -0xd0(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x13eac
movabsq $0x2600000022, %rax     # imm = 0x2600000022
movq %rax, -0x50(%rbp)
movl $0x2, %edx
leaq -0xc8(%rbp), %rdi
movq %r15, %rsi
callq 0x13eac
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 0x13eac
movl (%r13), %ebx
movq -0x50(%rbp), %r14
callq 0x19e44
btq %rbx, %r14
leaq -0x70(%rbp), %r14
jae 0xfda1
xorl %eax, %eax
cmpl $0x24, (%r13)
setne %al
leal (%rax,%rax,4), %ebx
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0xfd97
callq 0x32a0
testl %ebx, %ebx
je 0xfa63
jmp 0xfda8
movl $0x1, %ebx
jmp 0xfd86
cmpl $0x5, %ebx
jne 0xfe4b
movl $0x26, -0x50(%rbp)
movl $0x1, %edx
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
callq 0x13eac
movabsq $0x2600000022, %rax     # imm = 0x2600000022
movq %rax, -0x90(%rbp)
movl $0x2, %edx
leaq -0xb8(%rbp), %rdi
leaq -0x90(%rbp), %rbx
movq %rbx, %rsi
callq 0x13eac
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0xd8a2
movl $0x26, -0x50(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13eac
movq -0x90(%rbp), %rax
movl (%r13), %ecx
xorl %ebx, %ebx
btq %rcx, %rax
setae %r14b
callq 0x19e44
movb %r14b, %bl
jmp 0xfe4b
movl $0x1, %ebx
callq 0x19e44
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xfe63
callq 0x32a0
testl %ebx, %ebx
leaq -0x70(%rbp), %r14
je 0xfa08
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfed9
jmp 0xfed9
jmp 0xfed9
jmp 0xfed9
jmp 0xfec3
jmp 0xfec3
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xfea7
callq 0x32a0
jmp 0xfea7
movq %rax, %rbx
leaq -0x80(%rbp), %r12
jmp 0xfec6
jmp 0xfec3
jmp 0xfec3
jmp 0xfec3
jmp 0xfec3
jmp 0xfec3
jmp 0xfec3
jmp 0xfed9
jmp 0xfec3
jmp 0xfed9
jmp 0xfed9
jmp 0xfed9
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0xfedc
callq 0x32a0
jmp 0xfedc
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xfef4
callq 0x32a0
movq %rbx, %rdi
callq 0x3480