// File: /workspace/github_cpp_makefile_star2_O1/sighingnow[P]compile-pascal/pl0_opt.cpp
// Function: BasicBlock::buildDAG()
void BasicBlock::buildDAG() {
    size_t p = this->s;
    int rd, rs, rt, t;
    for (p = 1; code[p].op != "cmp" && code[p].op != "goto" && code[p].op != "call"
            && code[p].op != "loadret" && code[p].op != "exit" && code[p].op != "endproc"; ++p)
    {
        if (code[p].op == "*" || code[p].op == "/" || code[p].op == "%"
                || code[p].op == "+" || code[p].op == "-"
                || code[p].op == "cmp"
                || code[p].op == "=[]" || code[p].op == "[]=") {
            rs = findNode(code[p].rs);
            setMap(code[p].rs, rs);
            rt = findNode(code[p].rt);
            setMap(code[p].rt, rt);
            rd = findNode(code[p].op, code[p].rd, rs, rt);
            setMap(code[p].rd, rd);
        }
        else if (code[p].op == "=") {
            // rs = findNode(code[p].rs);
            // setMap(code[p].rs, rs);
            // setMap(code[p].rd, rs);
            code[p].rt = new Value(0, "integer");
            rs = findNode(code[p].rs);
            setMap(code[p].rs, rs);
            rt = findNode(code[p].rt);
            setMap(code[p].rt, rt);
            rd = findNode(code[p].op, code[p].rd, rs, rt);
            setMap(code[p].rd, rd);
        }
        else if (code[p].op == "write_s") {
            IOBuf.emplace_back(make_pair(p, code[p]));
        }
        else if (code[p].op == "write_e") {
            rd = findNode(code[p].rd);
            t = G.size();
            G.emplace_back(DAGNode(t, "write_e", new Value("~write_e", "cmd"), rd, p));
            G[rd].moreFa();
        }
        else if (code[p].op == "read") {
            rd = findNode(code[p].rd);
            t = G.size();
            G.emplace_back(DAGNode(t, "read", code[p].rd, rd, p));
            G[rd].moreFa();
            setMap(code[p].rd, t);
        }
    }
    this->t = p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, %rbx
movq $0x1, (%rsp)
movq 0x18(%rdi), %rdi
addq $0x50, %rdi
leaq 0x19317(%rip), %rsi     # 0x98a9e
callq 0x50c0
testl %eax, %eax
je 0x7ffdc
leaq 0x60(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0xa8(%rbx), %rax
movq %rax, 0xe8(%rsp)
leaq 0xb8(%rsp), %r15
leaq 0x100(%rsp), %r13
leaq 0x192df(%rip), %r12     # 0x98aa2
leaq 0xf0(%rsp), %r14
leaq 0x28(%rsp), %rbp
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0x50c0
testl %eax, %eax
je 0x7ffdc
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x1825f(%rip), %rsi     # 0x97a66
callq 0x50c0
testl %eax, %eax
je 0x7ffdc
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x1917d(%rip), %rsi     # 0x989a8
callq 0x50c0
testl %eax, %eax
je 0x7ffdc
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x190e7(%rip), %rsi     # 0x98936
callq 0x50c0
testl %eax, %eax
je 0x7ffdc
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x190c8(%rip), %rsi     # 0x9893b
callq 0x50c0
testl %eax, %eax
je 0x7ffdc
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x1986f(%rip), %rsi     # 0x99106
callq 0x50c0
testl %eax, %eax
je 0x7fb27
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x1942b(%rip), %rsi     # 0x98ce6
callq 0x50c0
testl %eax, %eax
je 0x7fb27
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x19409(%rip), %rsi     # 0x98ce8
callq 0x50c0
testl %eax, %eax
je 0x7fb27
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x19295(%rip), %rsi     # 0x98b98
callq 0x50c0
testl %eax, %eax
je 0x7fb27
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x19778(%rip), %rsi     # 0x9909f
callq 0x50c0
testl %eax, %eax
je 0x7fb27
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x19153(%rip), %rsi     # 0x98a9e
callq 0x50c0
testl %eax, %eax
je 0x7fb27
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x192b7(%rip), %rsi     # 0x98c26
callq 0x50c0
testl %eax, %eax
je 0x7fb27
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x190e5(%rip), %rsi     # 0x98a78
callq 0x50c0
testl %eax, %eax
je 0x7fb27
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x17761(%rip), %rsi     # 0x97118
callq 0x50c0
testl %eax, %eax
je 0x7fc71
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x191db(%rip), %rsi     # 0x98bb6
callq 0x50c0
testl %eax, %eax
je 0x7fdff
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x192ec(%rip), %rsi     # 0x98ceb
callq 0x50c0
movq (%rsp), %rcx
movq 0x18(%rbx), %rdi
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
testl %eax, %eax
je 0x7fe46
addq %rcx, %rdi
leaq 0x17706(%rip), %rsi     # 0x9712c
callq 0x50c0
testl %eax, %eax
jne 0x7fc41
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x20(%rcx,%rax), %rsi
movq %rbx, %rdi
callq 0x8015a
movl %eax, %ebp
movq 0x68(%rbx), %r15
subq 0x60(%rbx), %r15
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x176bc(%rip), %rsi     # 0x9712c
leaq 0x176b9(%rip), %rdx     # 0x97130
callq 0x2670a
shrq $0x3, %r15
imull $0xba2e8ba3, %r15d, %esi # imm = 0xBA2E8BA3
movq (%rsp), %r9
movq 0x18(%rbx), %rax
leaq (%r9,%r9,4), %rcx
shlq $0x4, %rcx
movq 0x20(%rax,%rcx), %rcx
leaq 0x110(%rsp), %r15
movq %r15, %rdi
movl %esi, 0xc(%rsp)
leaq 0x48(%rsp), %rdx
movl %ebp, 0x10(%rsp)
movl %ebp, %r8d
callq 0x81cfc
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x81cca
movq %r15, %rdi
leaq 0xb8(%rsp), %r15
callq 0x81d7c
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x7faf5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5260
movslq 0x10(%rsp), %rax
movq 0x60(%rbx), %rcx
imulq $0x58, %rax, %rax
incl 0x4(%rcx,%rax)
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x20(%rcx,%rax), %rsi
movq %rbx, %rdi
movl 0xc(%rsp), %edx
jmp 0x7fdf5
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x28(%rcx,%rax), %rsi
movq %rbx, %rdi
callq 0x8015a
movl %eax, %ebp
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x28(%rcx,%rax), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x80216
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x30(%rcx,%rax), %rsi
movq %rbx, %rdi
callq 0x8015a
movl %eax, %r15d
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x30(%rcx,%rax), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x80216
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq %r13, 0xf0(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x36590
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x20(%rcx,%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x8032a
movl %eax, %ebp
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x7fc15
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x20(%rcx,%rax), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x80216
leaq 0xb8(%rsp), %r15
leaq 0x28(%rsp), %rbp
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
leaq 0x18e3f(%rip), %rsi     # 0x98a9e
callq 0x50c0
testl %eax, %eax
jne 0x7f7d0
jmp 0x7ffdc
movl $0x48, %edi
callq 0x5250
movq %rax, %r12
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rbp, %rdi
leaq 0x1747d(%rip), %rsi     # 0x9710f
leaq 0x1747d(%rip), %rdx     # 0x97116
callq 0x2670a
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x7b654
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq %r12, 0x30(%rcx,%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7fcdc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x28(%rcx,%rax), %rsi
movq %rbx, %rdi
callq 0x8015a
movl %eax, %edx
movl %eax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x28(%rcx,%rax), %rsi
movq %rbx, %rdi
callq 0x80216
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x30(%rcx,%rax), %rsi
movq %rbx, %rdi
callq 0x8015a
movl %eax, %ebp
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x30(%rcx,%rax), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x80216
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq %r15, 0xa8(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %r12
movq %r12, %rdi
callq 0x36590
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x20(%rcx,%rax), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movl 0x10(%rsp), %ecx
movl %ebp, %r8d
callq 0x8032a
leaq 0x18ce6(%rip), %r12     # 0x98aa2
movl %eax, %ebp
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7fddb
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x20(%rcx,%rax), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x80216
jmp 0x7fc3c
movq (%rsp), %rax
leaq (%rax,%rax,4), %rdx
shlq $0x4, %rdx
addq 0x18(%rbx), %rdx
leaq 0x110(%rsp), %rdi
movq %rsp, %rsi
callq 0x82028
movq 0xe8(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x81c60
leaq 0x110(%rsp), %rdi
callq 0x81c96
jmp 0x7fc41
movq 0x20(%rdi,%rcx), %rsi
movq %rbx, %rdi
callq 0x8015a
movl %eax, 0xc(%rsp)
movq 0x68(%rbx), %r15
subq 0x60(%rbx), %r15
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x18e6d(%rip), %rsi     # 0x98ceb
leaq 0x18e6d(%rip), %rdx     # 0x98cf2
callq 0x2670a
movl $0x48, %edi
callq 0x5250
movq %rax, 0x10(%rsp)
leaq 0xc8(%rsp), %rbp
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x18e33(%rip), %rsi     # 0x98cea
leaq 0x18e34(%rip), %rdx     # 0x98cf2
callq 0x2670a
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq %rbp, %rdi
leaq 0x18e16(%rip), %rsi     # 0x98cf3
leaq 0x18e12(%rip), %rdx     # 0x98cf6
callq 0x2670a
movb $0x1, %al
movl %eax, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %rbp, %rdx
callq 0x7be1c
leaq 0x110(%rsp), %rbp
shrq $0x3, %r15
imull $0xba2e8ba3, %r15d, %esi # imm = 0xBA2E8BA3
movl (%rsp), %r9d
movl $0x0, 0x1c(%rsp)
movq %rbp, %rdi
leaq 0x88(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl 0xc(%rsp), %r8d
callq 0x81cfc
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x81cca
movq %rbp, %rdi
callq 0x81d7c
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
leaq 0xb8(%rsp), %r15
leaq 0x28(%rsp), %rbp
je 0x7ff81
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x7ff9d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x7ffc2
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5260
movslq 0xc(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
imulq $0x58, %rax, %rax
incl 0x4(%rcx,%rax)
jmp 0x7fc41
movl (%rsp), %eax
movl %eax, 0x14(%rbx)
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x81d7c
jmp 0x80009
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x80151
movq 0x58(%rsp), %rsi
jmp 0x80149
jmp 0x80051
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x81d7c
xorl %ebp, %ebp
jmp 0x80075
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x8009a
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x800b6
movq %rax, %rbx
jmp 0x800ca
movq %rax, %rbx
jmp 0x80151
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x81c96
jmp 0x80151
movl 0x1c(%rsp), %ebp
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x8009a
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x800b6
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5260
testb %bpl, %bpl
je 0x800ca
movl $0x48, %esi
movq 0x10(%rsp), %rdi
callq 0x5260
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x80151
movq 0x98(%rsp), %rsi
jmp 0x80149
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x80151
movq 0xb8(%rsp), %rsi
jmp 0x80149
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x80127
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5260
jmp 0x80127
movq %rax, %rbx
movl $0x48, %esi
movq %r12, %rdi
jmp 0x8014c
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x80151
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5260
movq %rbx, %rdi
callq 0x53d0
nop