// File: /workspace/github_cpp_makefile_star2_O2/CHEN-Zhihan[P]Compiler/Node.cpp
// Function: StmtNode::check(std::vector<int, std::allocator<int>>&, int)
void StmtNode::check(vector<int>& sList, int functionID) {
    switch (oper) {
        case RETURN: {
            if (functionID == GLOBAL) {
                cerr << "return occurs in the global scope" << endl;
                exit(-1);
            }
            if (op.size() != 0) {
                op[0]->check(sList, functionID);
            }
            break;
        } case FOR: {
            scopes.push_back(--scopeCounter);
            sList.push_back(scopes[0]);
            variableTable[scopeCounter] = unordered_set<int>();
            addressTable[functionID].second[scopeCounter] = unordered_map<int, int>();
            op[0]->check(sList, functionID);
            op[1]->check(sList, functionID);
            op[3]->check(sList, functionID);
            op[2]->check(sList, functionID);
            releaseSpace(functionID, sList.back());
            sList.pop_back();
            break;
        } case WHILE: {
            op[0]->check(sList, functionID);
            ADDSCOPE(op[1]);
            break;
        } case IF: {
            op[0]->check(sList, functionID);
            ADDSCOPE(op[1]);
            if (op.size() > 2) {
                ADDSCOPE(op[2]);
            }
            break;
        } default: {
            for (const auto & i: op) {
                i->check(sList, functionID);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, -0x2c(%rbp)
movl $0xfffffef9, %eax       # imm = 0xFFFFFEF9
addl 0x8(%rdi), %eax
cmpl $0x8, %eax
ja 0xcdb4
leaq 0x6dbf(%rip), %rcx      # 0x13700
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%r14), %rdi
leaq 0x10b4b(%rip), %r15     # 0x1d4a0
decl (%r15)
movq %r15, %rsi
callq 0xee54
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0xee54
leaq -0x38(%rbp), %r12
andq $0x0, -0x10(%r12)
movq %r12, -0x30(%r12)
movq $0x1, -0x28(%r12)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%r12)
movl $0x3f800000, -0x10(%r12) # imm = 0x3F800000
movups %xmm0, -0x8(%r12)
leaq 0x109e5(%rip), %rdi     # 0x1d388
movq %r15, %rsi
callq 0xa758
leaq -0x68(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x95e6
movq %r15, %rdi
callq 0x96f6
andq $0x0, 0x20(%r15)
movq %r12, (%r15)
movq $0x1, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movl $0x3f800000, 0x20(%r15) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
leaq 0x10a7a(%rip), %rdi     # 0x1d468
leaq -0x2c(%rbp), %rsi
callq 0x9d9e
addq $0x8, %rax
leaq 0x10a9e(%rip), %rsi     # 0x1d4a0
movq %rax, %rdi
callq 0xf958
movq %rax, %rdi
movq %r15, %rsi
callq 0xf400
movq %r15, %rdi
callq 0x92ea
movq 0x28(%r14), %rax
movq (%rax), %rdi
movl -0x2c(%rbp), %edx
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
movq 0x28(%r14), %rax
movq 0x10(%rax), %rdi
movl -0x2c(%rbp), %edx
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
movq 0x28(%r14), %rax
movq 0x30(%rax), %rdi
movl -0x2c(%rbp), %edx
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
jmp 0xcc53
movq 0x28(%r14), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl %r15d, %edx
callq *0x8(%rax)
leaq 0x10(%r14), %r15
leaq 0x10a25(%rip), %r12     # 0x1d4a0
decl (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xee54
movq 0x18(%r14), %rsi
addq $-0x4, %rsi
movq %rbx, %rdi
callq 0xee54
leaq -0x38(%rbp), %r13
andq $0x0, -0x10(%r13)
movq %r13, -0x30(%r13)
movq $0x1, -0x28(%r13)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%r13)
movl $0x3f800000, -0x10(%r13) # imm = 0x3F800000
movups %xmm0, -0x8(%r13)
leaq 0x108bd(%rip), %rdi     # 0x1d388
movq %r12, %rsi
callq 0xa758
leaq -0x68(%rbp), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x95e6
movq %r12, %rdi
callq 0x96f6
andq $0x0, 0x20(%r12)
movq %r13, (%r12)
movq $0x1, 0x8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
movl $0x3f800000, 0x20(%r12) # imm = 0x3F800000
movups %xmm0, 0x28(%r12)
leaq 0x1094c(%rip), %rdi     # 0x1d468
leaq -0x2c(%rbp), %rsi
callq 0x9d9e
addq $0x8, %rax
leaq 0x10970(%rip), %r12     # 0x1d4a0
movq %rax, %rdi
movq %r12, %rsi
callq 0xf958
leaq -0x68(%rbp), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0xf400
movq %r13, %rdi
callq 0x92ea
movq 0x28(%r14), %rax
movq 0x10(%rax), %rdi
movl -0x2c(%rbp), %edx
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
movl -0x2c(%rbp), %edi
movq 0x8(%rbx), %rax
movl -0x4(%rax), %esi
callq 0xb45d
addq $-0x4, 0x8(%rbx)
movq 0x30(%r14), %rax
subq 0x28(%r14), %rax
cmpq $0x21, %rax
jb 0xcd72
decl (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0xee54
movq 0x18(%r14), %rsi
addq $-0x4, %rsi
movq %rbx, %rdi
callq 0xee54
andq $0x0, -0x48(%rbp)
leaq -0x38(%rbp), %r13
movq %r13, -0x68(%rbp)
movq $0x1, -0x60(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x58(%rbp)
movl $0x3f800000, -0x48(%rbp) # imm = 0x3F800000
movups %xmm0, -0x40(%rbp)
leaq 0x107af(%rip), %rdi     # 0x1d388
movq %r12, %rsi
callq 0xa758
leaq -0x68(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x95e6
movq %r15, %rdi
callq 0x96f6
andq $0x0, 0x20(%r15)
movq %r13, (%r15)
movq $0x1, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movl $0x3f800000, 0x20(%r15) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
leaq 0x10844(%rip), %rdi     # 0x1d468
leaq -0x2c(%rbp), %rsi
callq 0x9d9e
addq $0x8, %rax
leaq 0x10868(%rip), %rsi     # 0x1d4a0
movq %rax, %rdi
callq 0xf958
movq %rax, %rdi
movq %r15, %rsi
callq 0xf400
movq %r15, %rdi
callq 0x92ea
movq 0x28(%r14), %rax
movq 0x20(%rax), %rdi
jmp 0xcd52
movq 0x28(%r14), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl %r15d, %edx
callq *0x8(%rax)
leaq 0x10(%r14), %rdi
leaq 0x10822(%rip), %r15     # 0x1d4a0
decl (%r15)
movq %r15, %rsi
callq 0xee54
movq 0x18(%r14), %rsi
addq $-0x4, %rsi
movq %rbx, %rdi
callq 0xee54
leaq -0x38(%rbp), %r12
andq $0x0, -0x10(%r12)
movq %r12, -0x30(%r12)
movq $0x1, -0x28(%r12)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%r12)
movl $0x3f800000, -0x10(%r12) # imm = 0x3F800000
movups %xmm0, -0x8(%r12)
leaq 0x106b8(%rip), %rdi     # 0x1d388
movq %r15, %rsi
callq 0xa758
leaq -0x68(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x95e6
movq %r15, %rdi
callq 0x96f6
andq $0x0, 0x20(%r15)
movq %r12, (%r15)
movq $0x1, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movl $0x3f800000, 0x20(%r15) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
leaq 0x1074d(%rip), %rdi     # 0x1d468
leaq -0x2c(%rbp), %rsi
callq 0x9d9e
addq $0x8, %rax
leaq 0x10771(%rip), %rsi     # 0x1d4a0
movq %rax, %rdi
callq 0xf958
movq %rax, %rdi
movq %r15, %rsi
callq 0xf400
movq %r15, %rdi
callq 0x92ea
movq 0x28(%r14), %rax
movq 0x10(%rax), %rdi
movl -0x2c(%rbp), %edx
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
movl -0x2c(%rbp), %edi
movq 0x8(%rbx), %rax
movl -0x4(%rax), %esi
callq 0xb45d
addq $-0x4, 0x8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl %r15d, 0x10724(%rip)    # 0x1d4ac
je 0xcdd7
movq 0x28(%r14), %rax
cmpq %rax, 0x30(%r14)
je 0xcd72
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
movq %rbx, %rsi
movl %r15d, %edx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq 0x28(%r14), %r12
movq 0x30(%r14), %r14
cmpq %r14, %r12
je 0xcd72
movq (%r12), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl %r15d, %edx
callq *0x8(%rax)
addq $0x10, %r12
jmp 0xcdbc
movq 0x1020a(%rip), %rdi     # 0x1cfe8
leaq 0x6a89(%rip), %rsi      # 0x1386e
callq 0x31e0
movq %rax, %rdi
callq 0x3130
pushq $-0x1
popq %rdi
callq 0x3260
jmp 0xce02
jmp 0xce14
jmp 0xce02
jmp 0xce02
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x96f6
jmp 0xce20
jmp 0xce14
jmp 0xce14
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x92ea
movq %rbx, %rdi
callq 0x3390