// File: /workspace/github_cpp_makefile_star2_O3/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 0xde45
leaq 0x69cb(%rip), %rcx      # 0x14720
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%r14), %r15
leaq 0xe74f(%rip), %rcx      # 0x1c4b8
movl (%rcx), %eax
decl %eax
movl %eax, (%rcx)
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0xdfcb
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%r14)
jmp 0xdfda
movq 0x28(%r14), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl %r15d, %edx
callq *0x8(%rax)
leaq 0x10(%r14), %r15
leaq 0xe70e(%rip), %rcx      # 0x1c4b8
movl (%rcx), %eax
decl %eax
movl %eax, (%rcx)
movq 0x18(%r14), %rdx
cmpq 0x20(%r14), %rdx
je 0xde6c
movl %eax, (%rdx)
addq $0x4, %rdx
movq %rdx, 0x18(%r14)
jmp 0xde85
movq 0x28(%r14), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl %r15d, %edx
callq *0x8(%rax)
leaq 0xe6d1(%rip), %rcx      # 0x1c4b8
movl (%rcx), %eax
decl %eax
movl %eax, (%rcx)
movq 0x18(%r14), %rdx
cmpq 0x20(%r14), %rdx
je 0xe0fb
movl %eax, (%rdx)
addq $0x4, %rdx
movq %rdx, 0x18(%r14)
jmp 0xe115
cmpl %r15d, 0xe6b3(%rip)     # 0x1c4c4
je 0xe329
movq 0x28(%r14), %rax
cmpq %rax, 0x30(%r14)
je 0xe31a
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 0xe31a
movq (%r12), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl %r15d, %edx
callq *0x8(%rax)
addq $0x10, %r12
jmp 0xde4d
leaq 0xe645(%rip), %rax      # 0x1c4b8
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x11c0a
movq 0x18(%r14), %rdx
addq $-0x4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xdea1
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xdea9
movq %rbx, %rdi
callq 0x11c0a
leaq -0x38(%rbp), %r13
movq $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 0xe4c3(%rip), %rdi      # 0x1c3a0
leaq 0xe5d4(%rip), %rsi      # 0x1c4b8
callq 0xb9ba
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4820
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0xad94
movq $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 0xe54a(%rip), %rdi      # 0x1c480
leaq -0x2c(%rbp), %rsi
callq 0xb1ce
addq $0x8, %rax
leaq 0xe56e(%rip), %r12      # 0x1c4b8
movq %rax, %rdi
movq %r12, %rsi
callq 0x11302
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4a6c
leaq -0x68(%rbp), %rdi
callq 0xab54
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 0xc32c
addq $-0x4, 0x8(%rbx)
movq 0x30(%r14), %rax
subq 0x28(%r14), %rax
cmpq $0x21, %rax
jb 0xe31a
movl (%r12), %eax
decl %eax
movl %eax, (%r12)
movq 0x18(%r14), %rdx
cmpq 0x20(%r14), %rdx
je 0xe204
movl %eax, (%rdx)
addq $0x4, %rdx
movq %rdx, 0x18(%r14)
jmp 0xe21d
leaq 0xe4e6(%rip), %rdx      # 0x1c4b8
movq %r15, %rdi
callq 0x11c0a
movq (%r15), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xdff5
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xdffd
movq %rbx, %rdi
callq 0x11c0a
leaq -0x38(%rbp), %r12
movq $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 0xe369(%rip), %rdi      # 0x1c3a0
leaq 0xe47a(%rip), %rsi      # 0x1c4b8
callq 0xb9ba
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4820
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0xad94
movq $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 0xe3f6(%rip), %rdi      # 0x1c480
leaq -0x2c(%rbp), %rsi
callq 0xb1ce
addq $0x8, %rax
leaq 0xe41a(%rip), %rsi      # 0x1c4b8
movq %rax, %rdi
callq 0x11302
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4a6c
leaq -0x68(%rbp), %rdi
callq 0xab54
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 0xe2f2
leaq 0x10(%r14), %rdi
leaq 0xe3b2(%rip), %rax      # 0x1c4b8
movq %rdx, %rsi
movq %rax, %rdx
callq 0x11c0a
movq 0x18(%r14), %rdx
addq $-0x4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xe131
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xe139
movq %rbx, %rdi
callq 0x11c0a
leaq -0x38(%rbp), %r12
movq $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 0xe22d(%rip), %rdi      # 0x1c3a0
leaq 0xe33e(%rip), %rsi      # 0x1c4b8
callq 0xb9ba
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4820
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0xad94
movq $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 0xe2ba(%rip), %rdi      # 0x1c480
leaq -0x2c(%rbp), %rsi
callq 0xb1ce
addq $0x8, %rax
leaq 0xe2de(%rip), %rsi      # 0x1c4b8
movq %rax, %rdi
callq 0x11302
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4a6c
leaq -0x68(%rbp), %rdi
callq 0xab54
movq 0x28(%r14), %rax
movq 0x10(%rax), %rdi
jmp 0xe2fa
leaq 0xe2ad(%rip), %rax      # 0x1c4b8
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x11c0a
movq 0x18(%r14), %rdx
addq $-0x4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xe239
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xe241
movq %rbx, %rdi
callq 0x11c0a
movq $0x0, -0x48(%rbp)
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 0xe132(%rip), %rdi      # 0x1c3a0
leaq 0xe243(%rip), %rsi      # 0x1c4b8
callq 0xb9ba
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4820
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0xad94
movq $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 0xe1bf(%rip), %rdi      # 0x1c480
leaq -0x2c(%rbp), %rsi
callq 0xb1ce
addq $0x8, %rax
leaq 0xe1e3(%rip), %rsi      # 0x1c4b8
movq %rax, %rdi
callq 0x11302
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4a6c
leaq -0x68(%rbp), %rdi
callq 0xab54
movq 0x28(%r14), %rax
movq 0x20(%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 0xc32c
addq $-0x4, 0x8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xdcb8(%rip), %rdi      # 0x1bfe8
leaq 0x6557(%rip), %rsi      # 0x1488e
callq 0x4200
movq %rax, %rdi
callq 0x4120
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x42a0
jmp 0xe360
jmp 0xe360
jmp 0xe36c
jmp 0xe37e
jmp 0xe360
jmp 0xe360
jmp 0xe360
jmp 0xe360
jmp 0xe360
movq %rax, %rdi
callq 0x85ab
jmp 0xe36c
jmp 0xe36c
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0xad94
jmp 0xe38a
jmp 0xe37e
jmp 0xe37e
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0xab54
movq %rbx, %rdi
callq 0x43b0