// File: JameyWoo[P]csmile/parse.cpp
// Function: selection_stmt()
TreeNode* selection_stmt() {
    TreeNode* t = new TreeNode("Selection");
    match("if");
    match("LeftBracket");
    if (t != NULL) {
        t->child[0] = expression();
    }
    match("RightBracket");
    bool has_bracket = false;
    if (ptoken.type == "LeftBigBkt") {
        has_bracket = true;
        match("LeftBigBkt");
    }
    t->child[1] = statement_list();
    if (has_bracket)
        match("RightBigBkt");
    if (ptoken.type == "else") {
        match("else");  // else 部分, 存在child[2]里
        // cout << "else 的开始部分*******************" << endl;
        if (t != NULL) {
            bool has_bracket_2 = false;
            if (ptoken.type == "LeftBigBkt") {
                // cout << "else 有括号***********************" << endl;
                has_bracket_2 = true;
                match("LeftBigBkt");
            } else {
                // cout << "else 无括号***********************" << endl;
            }
            t->child[2] = statement_list();
            if (has_bracket_2)
                match("RightBigBkt");
        }
    }
    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x410, %rsp            # imm = 0x410
movl $0xe0, %edi
callq 0x3280
movq %rax, -0x3d0(%rbp)
movb $0x1, -0x3d(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x3480
movq -0x3c8(%rbp), %rdx
leaq 0x17d43(%rip), %rsi     # 0x211c1
leaq -0x28(%rbp), %rdi
callq 0x4ef0
jmp 0x9489
movq -0x3d0(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xdb50
jmp 0x949b
movb $0x0, -0x3d(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x34e8
leaq -0x29(%rbp), %rdi
callq 0x32d0
movq -0x3d0(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x3480
movq -0x3d8(%rbp), %rdx
leaq 0x17c24(%rip), %rsi     # 0x21101
leaq -0xa8(%rbp), %rdi
callq 0x4ef0
jmp 0x94eb
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x80b0
jmp 0x9500
leaq -0x88(%rbp), %rdi
callq 0x4ec0
leaq -0xa8(%rbp), %rdi
callq 0x34e8
leaq -0xa9(%rbp), %rdi
callq 0x32d0
leaq -0x119(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x3480
movq -0x3e0(%rbp), %rdx
leaq 0x17b6b(%rip), %rsi     # 0x210b0
leaq -0x118(%rbp), %rdi
callq 0x4ef0
jmp 0x9553
leaq -0xf8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x80b0
jmp 0x9568
leaq -0xf8(%rbp), %rdi
callq 0x4ec0
leaq -0x118(%rbp), %rdi
callq 0x34e8
leaq -0x119(%rbp), %rdi
callq 0x32d0
cmpq $0x0, -0x8(%rbp)
je 0x9663
callq 0x9b00
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x9663
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x95ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x34e8
leaq -0x29(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x3d(%rbp)
jne 0x95df
jmp 0x95f0
movq -0x3d0(%rbp), %rdi
movl $0xe0, %esi
callq 0x3290
jmp 0x9aea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x961b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x34e8
leaq -0xa9(%rbp), %rdi
callq 0x32d0
jmp 0x9aea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x9652
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x34e8
leaq -0x119(%rbp), %rdi
callq 0x32d0
jmp 0x9aea
leaq -0x189(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x3480
movq -0x3e8(%rbp), %rdx
leaq 0x17a38(%rip), %rsi     # 0x210bc
leaq -0x188(%rbp), %rdi
callq 0x4ef0
jmp 0x9692
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x80b0
jmp 0x96a7
leaq -0x168(%rbp), %rdi
callq 0x4ec0
leaq -0x188(%rbp), %rdi
callq 0x34e8
leaq -0x189(%rbp), %rdi
callq 0x32d0
movb $0x0, -0x18a(%rbp)
leaq 0x24eaf(%rip), %rdi     # 0x2e588
leaq 0x179fb(%rip), %rsi     # 0x210db
callq 0x5e70
testb $0x1, %al
jne 0x96ee
jmp 0x97cd
movb $0x1, -0x18a(%rbp)
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x3480
movq -0x3f0(%rbp), %rdx
leaq 0x179c5(%rip), %rsi     # 0x210db
leaq -0x1f8(%rbp), %rdi
callq 0x4ef0
jmp 0x9724
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x80b0
jmp 0x9739
leaq -0x1d8(%rbp), %rdi
callq 0x4ec0
leaq -0x1f8(%rbp), %rdi
callq 0x34e8
leaq -0x1f9(%rbp), %rdi
callq 0x32d0
jmp 0x97cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x9785
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x34e8
leaq -0x189(%rbp), %rdi
callq 0x32d0
jmp 0x9aea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x97bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x34e8
leaq -0x1f9(%rbp), %rdi
callq 0x32d0
jmp 0x9aea
callq 0xa310
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
testb $0x1, -0x18a(%rbp)
je 0x988b
leaq -0x269(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0x3480
movq -0x3f8(%rbp), %rdx
leaq 0x178db(%rip), %rsi     # 0x210e6
leaq -0x268(%rbp), %rdi
callq 0x4ef0
jmp 0x9819
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x80b0
jmp 0x982e
leaq -0x248(%rbp), %rdi
callq 0x4ec0
leaq -0x268(%rbp), %rdi
callq 0x34e8
leaq -0x269(%rbp), %rdi
callq 0x32d0
jmp 0x988b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x987a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x34e8
leaq -0x269(%rbp), %rdi
callq 0x32d0
jmp 0x9aea
leaq 0x24cf6(%rip), %rdi     # 0x2e588
leaq 0x1786b(%rip), %rsi     # 0x21104
callq 0x5e70
testb $0x1, %al
jne 0x98a7
jmp 0x9add
leaq -0x2d9(%rbp), %rdi
movq %rdi, -0x400(%rbp)
callq 0x3480
movq -0x400(%rbp), %rdx
leaq 0x1783c(%rip), %rsi     # 0x21104
leaq -0x2d8(%rbp), %rdi
callq 0x4ef0
jmp 0x98d6
leaq -0x2b8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x80b0
jmp 0x98eb
leaq -0x2b8(%rbp), %rdi
callq 0x4ec0
leaq -0x2d8(%rbp), %rdi
callq 0x34e8
leaq -0x2d9(%rbp), %rdi
callq 0x32d0
cmpq $0x0, -0x8(%rbp)
je 0x9adb
movb $0x0, -0x2da(%rbp)
leaq 0x24c60(%rip), %rdi     # 0x2e588
leaq 0x177ac(%rip), %rsi     # 0x210db
callq 0x5e70
testb $0x1, %al
jne 0x993d
jmp 0x9a1c
movb $0x1, -0x2da(%rbp)
leaq -0x349(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x3480
movq -0x408(%rbp), %rdx
leaq 0x17776(%rip), %rsi     # 0x210db
leaq -0x348(%rbp), %rdi
callq 0x4ef0
jmp 0x9973
leaq -0x328(%rbp), %rdi
leaq -0x348(%rbp), %rsi
callq 0x80b0
jmp 0x9988
leaq -0x328(%rbp), %rdi
callq 0x4ec0
leaq -0x348(%rbp), %rdi
callq 0x34e8
leaq -0x349(%rbp), %rdi
callq 0x32d0
jmp 0x9a1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x99d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x34e8
leaq -0x2d9(%rbp), %rdi
callq 0x32d0
jmp 0x9aea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x9a0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x348(%rbp), %rdi
callq 0x34e8
leaq -0x349(%rbp), %rdi
callq 0x32d0
jmp 0x9aea
jmp 0x9a1e
callq 0xa310
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
testb $0x1, -0x2da(%rbp)
je 0x9ad9
leaq -0x3b9(%rbp), %rdi
movq %rdi, -0x410(%rbp)
callq 0x3480
movq -0x410(%rbp), %rdx
leaq 0x1768a(%rip), %rsi     # 0x210e6
leaq -0x3b8(%rbp), %rdi
callq 0x4ef0
jmp 0x9a6a
leaq -0x398(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x80b0
jmp 0x9a7f
leaq -0x398(%rbp), %rdi
callq 0x4ec0
leaq -0x3b8(%rbp), %rdi
callq 0x34e8
leaq -0x3b9(%rbp), %rdi
callq 0x32d0
jmp 0x9ad9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x9acb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x34e8
leaq -0x3b9(%rbp), %rdi
callq 0x32d0
jmp 0x9aea
jmp 0x9adb
jmp 0x9add
movq -0x8(%rbp), %rax
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3470
nopw %cs:(%rax,%rax)