// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, -0x2c(%rbp)
movl $0xfffffef9, %eax       # imm = 0xFFFFFEF9
addl 0x8(%rdi), %eax
cmpl $0x8, %eax
ja 0xe374
leaq 0x6492(%rip), %rcx      # 0x14720
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%r14), %r15
leaq 0xe216(%rip), %rcx      # 0x1c4b8
movl (%rcx), %eax
decl %eax
movl %eax, (%rcx)
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0xe508
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%r14)
jmp 0xe517
movq 0x28(%r14), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x10(%r14), %r15
leaq 0xe1d8(%rip), %rcx      # 0x1c4b8
movl (%rcx), %eax
decl %eax
movl %eax, (%rcx)
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0xe39a
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%r14)
jmp 0xe3a9
movq 0x28(%r14), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0xe19e(%rip), %rcx      # 0x1c4b8
movl (%rcx), %eax
decl %eax
movl %eax, (%rcx)
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0xe64c
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%r14)
jmp 0xe65c
cmpl %edx, 0xe181(%rip)      # 0x1c4c4
je 0xe893
movq 0x28(%r14), %rax
cmpq %rax, 0x30(%r14)
je 0xe884
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq 0x28(%r14), %r15
movq 0x30(%r14), %r14
cmpq %r14, %r15
je 0xe884
movq (%r15), %rdi
movl -0x2c(%rbp), %edx
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
addq $0x10, %r15
jmp 0xe37c
leaq 0xe117(%rip), %rdx      # 0x1c4b8
movq %r15, %rdi
callq 0x12182
movq 0x18(%r14), %rdx
addq $-0x4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xe3c9
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xe3d1
movq %rbx, %rdi
callq 0x12182
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %r13
movaps %xmm0, -0x30(%r13)
movaps %xmm0, -0x10(%r13)
movaps %xmm0, -0x20(%r13)
movq $0x0, (%r13)
movq %r13, -0x30(%r13)
movq $0x1, -0x28(%r13)
movl $0x3f800000, -0x10(%r13) # imm = 0x3F800000
movups %xmm0, -0x8(%r13)
leaq 0xdf91(%rip), %rdi      # 0x1c3a0
leaq 0xe0a2(%rip), %rsi      # 0x1c4b8
callq 0xbe56
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x4964
leaq -0x70(%rbp), %r12
movq %r12, %rdi
callq 0xb170
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movq $0x0, 0x30(%r12)
movq %r13, (%r12)
movq $0x1, 0x8(%r12)
movl $0x3f800000, 0x20(%r12) # imm = 0x3F800000
movups %xmm0, 0x28(%r12)
leaq 0xe00d(%rip), %rdi      # 0x1c480
leaq -0x2c(%rbp), %rsi
callq 0xb5dc
addq $0x8, %rax
leaq 0xe031(%rip), %r12      # 0x1c4b8
movq %rax, %rdi
movq %r12, %rsi
callq 0x11870
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x4bc2
leaq -0x70(%rbp), %rdi
callq 0xaf34
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 0xc881
addq $-0x4, 0x8(%rbx)
movq 0x30(%r14), %rax
subq 0x28(%r14), %rax
cmpq $0x21, %rax
jb 0xe884
movl (%r12), %eax
decl %eax
movl %eax, (%r12)
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0xe763
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%r14)
jmp 0xe772
leaq 0xdfa9(%rip), %rdx      # 0x1c4b8
movq %r15, %rdi
callq 0x12182
movq (%r15), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xe532
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xe53a
movq %rbx, %rdi
callq 0x12182
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %r12
movaps %xmm0, -0x30(%r12)
movaps %xmm0, -0x10(%r12)
movaps %xmm0, -0x20(%r12)
movq $0x0, (%r12)
movq %r12, -0x30(%r12)
movq $0x1, -0x28(%r12)
movl $0x3f800000, -0x10(%r12) # imm = 0x3F800000
movups %xmm0, -0x8(%r12)
leaq 0xde21(%rip), %rdi      # 0x1c3a0
leaq 0xdf32(%rip), %rsi      # 0x1c4b8
callq 0xbe56
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x4964
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0xb170
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movq $0x0, 0x30(%r15)
movq %r12, (%r15)
movq $0x1, 0x8(%r15)
movl $0x3f800000, 0x20(%r15) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
leaq 0xdea5(%rip), %rdi      # 0x1c480
leaq -0x2c(%rbp), %rsi
callq 0xb5dc
addq $0x8, %rax
leaq 0xdec9(%rip), %rsi      # 0x1c4b8
movq %rax, %rdi
callq 0x11870
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x4bc2
leaq -0x70(%rbp), %rdi
callq 0xaf34
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 0xe85c
leaq 0x10(%r14), %rdi
leaq 0xde61(%rip), %rdx      # 0x1c4b8
callq 0x12182
movq 0x18(%r14), %rdx
addq $-0x4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xe67c
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xe684
movq %rbx, %rdi
callq 0x12182
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %r12
movaps %xmm0, -0x30(%r12)
movaps %xmm0, -0x10(%r12)
movaps %xmm0, -0x20(%r12)
movq $0x0, (%r12)
movq %r12, -0x30(%r12)
movq $0x1, -0x28(%r12)
movl $0x3f800000, -0x10(%r12) # imm = 0x3F800000
movups %xmm0, -0x8(%r12)
leaq 0xdcd7(%rip), %rdi      # 0x1c3a0
leaq 0xdde8(%rip), %rsi      # 0x1c4b8
callq 0xbe56
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x4964
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0xb170
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movq $0x0, 0x30(%r15)
movq %r12, (%r15)
movq $0x1, 0x8(%r15)
movl $0x3f800000, 0x20(%r15) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
leaq 0xdd5b(%rip), %rdi      # 0x1c480
leaq -0x2c(%rbp), %rsi
callq 0xb5dc
addq $0x8, %rax
leaq 0xdd7f(%rip), %rsi      # 0x1c4b8
movq %rax, %rdi
callq 0x11870
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x4bc2
leaq -0x70(%rbp), %rdi
callq 0xaf34
movq 0x28(%r14), %rax
movq 0x10(%rax), %rdi
jmp 0xe864
leaq 0xdd4e(%rip), %rdx      # 0x1c4b8
movq %r15, %rdi
callq 0x12182
movq 0x18(%r14), %rdx
addq $-0x4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xe792
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xe79a
movq %rbx, %rdi
callq 0x12182
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movq $0x0, -0x40(%rbp)
movq %r13, -0x70(%rbp)
movq $0x1, -0x68(%rbp)
movl $0x3f800000, -0x50(%rbp) # imm = 0x3F800000
movups %xmm0, -0x48(%rbp)
leaq 0xdbd1(%rip), %rdi      # 0x1c3a0
leaq 0xdce2(%rip), %rsi      # 0x1c4b8
callq 0xbe56
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x4964
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0xb170
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movq $0x0, 0x30(%r15)
movq %r13, (%r15)
movq $0x1, 0x8(%r15)
movl $0x3f800000, 0x20(%r15) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
leaq 0xdc55(%rip), %rdi      # 0x1c480
leaq -0x2c(%rbp), %rsi
callq 0xb5dc
addq $0x8, %rax
leaq 0xdc79(%rip), %rsi      # 0x1c4b8
movq %rax, %rdi
callq 0x11870
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x4bc2
leaq -0x70(%rbp), %rdi
callq 0xaf34
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 0xc881
addq $-0x4, 0x8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd756(%rip), %rdi      # 0x1bff0
leaq 0x5fed(%rip), %rsi      # 0x1488e
callq 0x4200
movq %rax, %rdi
callq 0x4120
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x42a0
jmp 0xe8ca
jmp 0xe8ca
jmp 0xe8d6
jmp 0xe8e8
jmp 0xe8ca
jmp 0xe8ca
jmp 0xe8ca
jmp 0xe8ca
jmp 0xe8ca
movq %rax, %rdi
callq 0x88cd
jmp 0xe8d6
jmp 0xe8d6
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0xb170
jmp 0xe8f4
jmp 0xe8e8
jmp 0xe8e8
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0xaf34
movq %rbx, %rdi
callq 0x43b0