// File: JameyWoo[P]csmile/parse.cpp
// Function: local_declaration()
TreeNode* local_declaration() {
    /**
     * 一系列的局部声明
     */
    TreeNode* t = NULL;
    TreeNode* p = NULL;
    TreeNode* q = NULL;
    while (ptoken.type == "int") {
        p            = new TreeNode("LocVarDecl");  // 局部变量声明, 只有int类型
        TreeNode* q1 = new TreeNode("int");
        p->child[0]  = q1;
        match("int");
        if (ptoken.type == "Id") {
            TreeNode* q2 = new TreeNode("Id");
            q2->name     = ptoken.value;
            q2->line     = ptoken.line;
            p->child[1]  = q2;
            match("Id");
            // TODO: 添加数组
            if (ptoken.type == "Semicolon") {
                match("Semicolon");
                p->child_cnt = 2;
            } else if (ptoken.type == "Assign") {
                match("Assign");
                Token tmp = match("Num");
                match("Semicolon");
                int val      = stoi(tmp.value);
                q2->val      = val;
                p->child_cnt = 2;
            } else {
                match("Semicolon");
            }
        }
        if (p != NULL) {
            if (t == NULL) {
                t = q = p;
            } else {
                q->sibling = p;
                q          = p;
            }
        }
    }
    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq 0x2596e(%rip), %rdi     # 0x2e588
leaq 0x184d7(%rip), %rsi     # 0x210f8
callq 0x5e70
testb $0x1, %al
jne 0x8c2f
jmp 0x9422
movl $0xe0, %edi
callq 0x3280
movq %rax, -0x3d0(%rbp)
movb $0x1, -0x4d(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x3480
movq -0x3c8(%rbp), %rdx
leaq 0x18554(%rip), %rsi     # 0x211b6
leaq -0x38(%rbp), %rdi
callq 0x4ef0
jmp 0x8c6d
movq -0x3d0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xdb50
jmp 0x8c7f
movq -0x3d0(%rbp), %rax
movb $0x0, -0x4d(%rbp)
movq %rax, -0x10(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x34e8
leaq -0x39(%rbp), %rdi
callq 0x32d0
movl $0xe0, %edi
callq 0x3280
movq %rax, -0x3e0(%rbp)
movb $0x1, -0x7a(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x3480
movq -0x3d8(%rbp), %rdx
leaq 0x18425(%rip), %rsi     # 0x210f8
leaq -0x78(%rbp), %rdi
callq 0x4ef0
jmp 0x8cde
movq -0x3e0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xdb50
jmp 0x8cf0
movb $0x0, -0x7a(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x34e8
leaq -0x79(%rbp), %rdi
callq 0x32d0
movq -0x3e0(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x3480
movq -0x3e8(%rbp), %rdx
leaq 0x183bb(%rip), %rsi     # 0x210f8
leaq -0xe8(%rbp), %rdi
callq 0x4ef0
jmp 0x8d4b
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x80b0
jmp 0x8d60
leaq -0xc8(%rbp), %rdi
callq 0x4ec0
leaq -0xe8(%rbp), %rdi
callq 0x34e8
leaq -0xe9(%rbp), %rdi
callq 0x32d0
leaq 0x257fd(%rip), %rdi     # 0x2e588
leaq 0x1841a(%rip), %rsi     # 0x211ac
callq 0x5e70
testb $0x1, %al
jne 0x8da0
jmp 0x93eb
movl $0xe0, %edi
callq 0x3280
movq %rax, -0x3f8(%rbp)
movb $0x1, -0x11a(%rbp)
leaq -0x119(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x3480
movq -0x3f0(%rbp), %rdx
leaq 0x183d3(%rip), %rsi     # 0x211ac
leaq -0x118(%rbp), %rdi
callq 0x4ef0
jmp 0x8de7
movq -0x3f8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xdb50
jmp 0x8dfc
movb $0x0, -0x11a(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x34e8
leaq -0x119(%rbp), %rdi
callq 0x32d0
movq -0x3f8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x2576a(%rip), %rsi     # 0x2e5a8
callq 0x3050
movl 0x2577f(%rip), %ecx     # 0x2e5c8
movq -0xf8(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0xf8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
leaq -0x189(%rbp), %rdi
movq %rdi, -0x400(%rbp)
callq 0x3480
movq -0x400(%rbp), %rdx
leaq 0x18329(%rip), %rsi     # 0x211ac
leaq -0x188(%rbp), %rdi
callq 0x4ef0
jmp 0x8e91
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x80b0
jmp 0x8ea6
leaq -0x168(%rbp), %rdi
callq 0x4ec0
leaq -0x188(%rbp), %rdi
callq 0x34e8
leaq -0x189(%rbp), %rdi
callq 0x32d0
leaq 0x256b7(%rip), %rdi     # 0x2e588
leaq 0x181f1(%rip), %rsi     # 0x210c9
callq 0x5e70
testb $0x1, %al
jne 0x8ee6
jmp 0x90ea
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x3480
movq -0x408(%rbp), %rdx
leaq 0x181c2(%rip), %rsi     # 0x210c9
leaq -0x1f8(%rbp), %rdi
callq 0x4ef0
jmp 0x8f15
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x80b0
jmp 0x8f2a
leaq -0x1d8(%rbp), %rdi
callq 0x4ec0
leaq -0x1f8(%rbp), %rdi
callq 0x34e8
leaq -0x1f9(%rbp), %rdi
callq 0x32d0
movq -0x10(%rbp), %rax
movl $0x2, 0x28(%rax)
jmp 0x93e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8f81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x34e8
leaq -0x39(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x4d(%rbp)
jne 0x8f92
jmp 0x8fa3
movq -0x3d0(%rbp), %rdi
movl $0xe0, %esi
callq 0x3290
jmp 0x942f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8fcb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x34e8
leaq -0x79(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x7a(%rbp)
jne 0x8fdc
jmp 0x8fed
movq -0x3e0(%rbp), %rdi
movl $0xe0, %esi
callq 0x3290
jmp 0x942f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9018
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x34e8
leaq -0xe9(%rbp), %rdi
callq 0x32d0
jmp 0x942f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x904f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x34e8
leaq -0x119(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x11a(%rbp)
jne 0x9066
jmp 0x9077
movq -0x3f8(%rbp), %rdi
movl $0xe0, %esi
callq 0x3290
jmp 0x942f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x90a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x34e8
leaq -0x189(%rbp), %rdi
callq 0x32d0
jmp 0x942f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x90d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x34e8
leaq -0x1f9(%rbp), %rdi
callq 0x32d0
jmp 0x942f
leaq 0x25497(%rip), %rdi     # 0x2e588
leaq 0x18136(%rip), %rsi     # 0x2122e
callq 0x5e70
testb $0x1, %al
jne 0x9106
jmp 0x9349
leaq -0x269(%rbp), %rdi
movq %rdi, -0x410(%rbp)
callq 0x3480
movq -0x410(%rbp), %rdx
leaq 0x18107(%rip), %rsi     # 0x2122e
leaq -0x268(%rbp), %rdi
callq 0x4ef0
jmp 0x9135
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x80b0
jmp 0x914a
leaq -0x248(%rbp), %rdi
callq 0x4ec0
leaq -0x268(%rbp), %rdi
callq 0x34e8
leaq -0x269(%rbp), %rdi
callq 0x32d0
leaq -0x2d9(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0x3480
movq -0x418(%rbp), %rdx
leaq 0x17efe(%rip), %rsi     # 0x2108d
leaq -0x2d8(%rbp), %rdi
callq 0x4ef0
jmp 0x919d
leaq -0x2b8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x80b0
jmp 0x91b2
leaq -0x2d8(%rbp), %rdi
callq 0x34e8
leaq -0x2d9(%rbp), %rdi
callq 0x32d0
leaq -0x349(%rbp), %rdi
movq %rdi, -0x420(%rbp)
callq 0x3480
movq -0x420(%rbp), %rdx
leaq 0x17ede(%rip), %rsi     # 0x210c9
leaq -0x348(%rbp), %rdi
callq 0x4ef0
jmp 0x91f9
leaq -0x328(%rbp), %rdi
leaq -0x348(%rbp), %rsi
callq 0x80b0
jmp 0x920e
leaq -0x328(%rbp), %rdi
callq 0x4ec0
leaq -0x348(%rbp), %rdi
callq 0x34e8
leaq -0x349(%rbp), %rdi
callq 0x32d0
leaq -0x298(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xdbf0
movl %eax, -0x424(%rbp)
jmp 0x924f
movl -0x424(%rbp), %eax
movl %eax, -0x350(%rbp)
movl -0x350(%rbp), %ecx
movq -0xf8(%rbp), %rax
movl %ecx, 0xb8(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x28(%rax)
leaq -0x2b8(%rbp), %rdi
callq 0x4ec0
jmp 0x93e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x92b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x34e8
leaq -0x269(%rbp), %rdi
callq 0x32d0
jmp 0x942f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x92e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x34e8
leaq -0x2d9(%rbp), %rdi
callq 0x32d0
jmp 0x942f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x931e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x348(%rbp), %rdi
callq 0x34e8
leaq -0x349(%rbp), %rdi
callq 0x32d0
jmp 0x9338
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x4ec0
jmp 0x942f
leaq -0x3b9(%rbp), %rdi
movq %rdi, -0x430(%rbp)
callq 0x3480
movq -0x430(%rbp), %rdx
leaq 0x17d5f(%rip), %rsi     # 0x210c9
leaq -0x3b8(%rbp), %rdi
callq 0x4ef0
jmp 0x9378
leaq -0x398(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x80b0
jmp 0x938d
leaq -0x398(%rbp), %rdi
callq 0x4ec0
leaq -0x3b8(%rbp), %rdi
callq 0x34e8
leaq -0x3b9(%rbp), %rdi
callq 0x32d0
jmp 0x93e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x93d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x34e8
leaq -0x3b9(%rbp), %rdi
callq 0x32d0
jmp 0x942f
jmp 0x93e9
jmp 0x93eb
cmpq $0x0, -0x10(%rbp)
je 0x941d
cmpq $0x0, -0x8(%rbp)
jne 0x9407
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, -0x8(%rbp)
jmp 0x941b
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x941d
jmp 0x8c13
movq -0x8(%rbp), %rax
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3470
nopl (%rax,%rax)