LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dead_code_eliminate.cpp
// Function: DeadCodeEliminate::DeleteDeadInst(SSAFunction*)
void DeadCodeEliminate::DeleteDeadInst(SSAFunction* func) {
#ifdef DEBUG_DEAD_CODE_ELIMINATE_PROCESS
  std::cout << "Try To Remove Instruction in function: " << func->GetFuncName() << std::endl;
#endif
  // 没有使用过的一个定值value 如果其定值语句没有副作用 就可删除
  std::unordered_set<SSAInstruction*> worklist;
  for (auto bb : func->GetBasicBlocks()) {
    for (auto inst : bb->GetInstList()) {
      // 把有定值的 无副作用的语句加入到工作表中 有的指令是一次定值(在ssa.h中指定了[used]的) 有的不是([no used])
      if (!IsSideEffect(inst)) worklist.insert({inst});
    }
  }

  while (!worklist.empty()) {
    auto inst = *worklist.begin();
    auto bb = inst->GetParent();
    worklist.erase(inst);
    if (inst->IsUsed()) continue;
#ifdef DEBUG_DEAD_CODE_ELIMINATE_PROCESS
    std::cout << "  remove: ";
    inst->Print(std::cout);
#endif
    // 其使用可能优化
    for (auto& use : inst->GetOperands()) {
      auto src_inst = dynamic_cast<SSAInstruction*>(use.Get());
      if (!IsSideEffect(src_inst)) {
        worklist.insert(src_inst);
      }
    }
    bb->RemoveInstruction(inst);  // FIXME 只是从指令列表中移除 并未释放内存
    delete inst;  // delete会删除inst的所有操作数 移除其操作数对应的使用 还会维护所有被使用信息
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
addq $0x30, %r14
leaq 0x8(%rsp), %r13
movq %r14, 0x10(%rsp)
movq (%r14), %r14
cmpq 0x10(%rsp), %r14
je 0x39b5c
movq 0x10(%r14), %r12
addq $0x28, %r12
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x39b13
movq 0x10(%r15), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3a01a
testb %al, %al
jne 0x39b28
movq %rbp, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
leaq 0x10(%rsp), %rdx
callq 0x3a46a
jmp 0x39b28
leaq 0x8(%rsp), %r14
leaq 0x46918(%rip), %r13     # 0x80480
leaq 0x46859(%rip), %rbp     # 0x803c8
cmpq $0x0, 0x38(%rsp)
je 0x39c24
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rax), %r15
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x3a7ea
movq 0x8(%rsp), %rax
leaq 0x10(%rax), %rcx
cmpq %rcx, 0x10(%rax)
jne 0x39b6f
movq 0x48(%rax), %r12
movq 0x50(%rax), %r14
cmpq %r14, %r12
je 0x39bf9
movq (%r12), %rdi
testq %rdi, %rdi
je 0x39bd1
movq %r13, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x82c0
movq %rax, %rsi
jmp 0x39bd3
xorl %esi, %esi
movq %rsi, 0x18(%rsp)
movq %rbx, %rdi
callq 0x3a01a
testb %al, %al
jne 0x39bf3
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x3a8ec
addq $0x10, %r12
jmp 0x39bb1
movq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x284b4
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x39b6f
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x39b6f
leaq 0x20(%rsp), %rdi
callq 0x3a2a2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x39c43
jmp 0x39c43
jmp 0x39c43
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3a2a2
movq %rbx, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dead_code_eliminate.cpp
// Function: DeadCodeEliminate::IsSideEffect(SSAInstruction*)
bool DeadCodeEliminate::IsSideEffect(SSAInstruction* inst) {
  if (nullptr == inst) return true;
  // 除callinst外 如果本身无定值[no used]视为有副作用
  if (dynamic_cast<BinaryOperator*>(inst) || dynamic_cast<UnaryOperator*>(inst) || dynamic_cast<LoadInst*>(inst) ||
      dynamic_cast<MovInst*>(inst) || dynamic_cast<PhiInst*>(inst)) {
    return false;
  } else if (auto call_inst = dynamic_cast<CallInst*>(inst)) {
    // 如果call语句无副作用 即便没有定值 也可删除
    auto func_val = dynamic_cast<FunctionValue*>(call_inst->GetOperand(0));
    MyAssert(nullptr != func_val);
    if (no_side_effect_funcs.find(func_val->GetFunction()) != no_side_effect_funcs.end()) return false;
  }
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb $0x1, %r15b
testq %rsi, %rsi
je 0x3a153
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4638c(%rip), %rsi     # 0x803c8
leaq 0x465bd(%rip), %rdx     # 0x80600
xorl %r15d, %r15d
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
jne 0x3a153
leaq 0x46368(%rip), %rsi     # 0x803c8
leaq 0x465d9(%rip), %rdx     # 0x80640
xorl %r15d, %r15d
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
jne 0x3a153
leaq 0x46344(%rip), %rsi     # 0x803c8
leaq 0x466f5(%rip), %rdx     # 0x80780
xorl %r15d, %r15d
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
jne 0x3a153
leaq 0x46320(%rip), %rsi     # 0x803c8
leaq 0x46751(%rip), %rdx     # 0x80800
xorl %r15d, %r15d
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
jne 0x3a153
leaq 0x462fc(%rip), %rsi     # 0x803c8
leaq 0x4676d(%rip), %rdx     # 0x80840
xorl %r15d, %r15d
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
jne 0x3a153
leaq 0x462dc(%rip), %rsi     # 0x803c8
leaq 0x465cd(%rip), %rdx     # 0x806c0
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
je 0x3a150
movq %rax, %rdi
xorl %esi, %esi
callq 0x269a6
testq %rax, %rax
je 0x3a160
leaq 0x46368(%rip), %rsi     # 0x80480
leaq 0x463b9(%rip), %rdx     # 0x804d8
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
je 0x3a160
addq $0x38, %rbx
movq 0x60(%rax), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x3a44c
testq %rax, %rax
je 0x3a150
xorl %r15d, %r15d
jmp 0x3a153
movb $0x1, %r15b
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x46e81(%rip), %rdi     # 0x80fe8
leaq 0x1bf7a(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x1f5bf(%rip), %rsi     # 0x59739
movq %rax, %rdi
callq 0x8240
leaq 0x1d197(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
pushq $0x44
popq %rsi
movq %rax, %rdi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dead_code_eliminate.cpp
// Function: DeadCodeEliminate::RemoveFromNoSideEffectFuncs(SSAFunction*, std::unordered_set<SSAFunction*, std::hash<SSAFunction*>, std::equal_to<SSAFunction*>, std::allocator<SSAFunction*>>&)
void DeadCodeEliminate::RemoveFromNoSideEffectFuncs(SSAFunction* func,
                                                    std::unordered_set<SSAFunction*>& no_side_effect_funcs) {
  // 如果已经删了说明已经访问过直接返回
  if (no_side_effect_funcs.find(func) == no_side_effect_funcs.end()) return;
  // 先把func删了
  no_side_effect_funcs.erase(func);
  // 再把func的每个caller都删了
  for (auto use : func->GetValue()->GetUses()) {
    auto call_inst = dynamic_cast<CallInst*>(use->GetUser());
    MyAssert(nullptr != call_inst);
    auto caller = call_inst->GetParent()->GetFunction();
    // no_side_effect_funcs.erase(caller);
    RemoveFromNoSideEffectFuncs(caller, no_side_effect_funcs);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
movq %rbx, %rdi
callq 0x3a44c
testq %rax, %rax
je 0x3a238
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a34a
movq (%r14), %rax
movq 0x28(%rax), %r12
addq $0x10, %r12
leaq 0x463cb(%rip), %r14     # 0x805c0
leaq 0x464c4(%rip), %r15     # 0x806c0
movq %r12, %r13
movq (%r13), %r13
cmpq %r12, %r13
je 0x3a238
movq 0x10(%r13), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x3a246
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
je 0x3a246
movq 0x60(%rax), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x3a1ae
jmp 0x3a1ff
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x46d9b(%rip), %rdi     # 0x80fe8
leaq 0x1be94(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x1f4d9(%rip), %rsi     # 0x59739
movq %rax, %rdi
callq 0x8240
leaq 0x1d0b1(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
pushq $0x75
popq %rsi
movq %rax, %rdi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dead_function_eliminate.cpp
// Function: isLiveness(IRBasicBlock*, ir::IR*, ir::Opn)
bool isLiveness(IRBasicBlock *bb, ir::IR *end_ir, ir::Opn opn) {
  std::unordered_set<std::string> keepalive = bb->liveout_;
  auto it = find(bb->ir_list_.begin(), bb->ir_list_.end(), end_ir);
  std::string opn_str = opn.name_ + "." + std::to_string(opn.scope_id_);

  for (auto iter = it + 1; iter != bb->ir_list_.end(); ++iter) {
    auto ir = *iter;

    auto [def, use] = GetDefUse(ir);

    if (find(def.begin(), def.end(), opn_str) != def.end()) {
      return false;
    }

    if (find(use.begin(), use.end(), opn_str) != use.end()) {
      return true;
    }
  }

  if (keepalive.find(opn_str) != keepalive.end()) {
    return true;
  } else {
    return false;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x78(%rsp), %r14
movq %rsi, (%r14)
leaq 0x100(%rdi), %rsi
leaq 0x80(%rsp), %rdi
callq 0x3aed8
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %r14, %rdx
callq 0x3b017
movq %rax, %r14
leaq 0x8(%r15), %rsi
leaq 0x1ed2b(%rip), %rdx     # 0x5972c
leaq 0x8(%rsp), %rdi
callq 0xa334
movl 0x28(%r15), %esi
leaq 0x58(%rsp), %rdi
callq 0xa36c
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0xa2cd
leaq 0x58(%rsp), %rdi
callq 0x8578
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x8578
addq $0x8, %r14
leaq 0x38(%rsp), %r13
cmpq 0x10(%rbx), %r14
je 0x3aab7
movq (%r14), %rsi
movq %r15, %rdi
pushq $0x1
popq %rdx
callq 0x465cf
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x3b0a4
cmpq 0x10(%rsp), %rax
je 0x3aa81
xorl %r12d, %r12d
xorl %ebp, %ebp
jmp 0x3aaa4
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r13, %rdx
callq 0x3b0a4
cmpq 0x28(%rsp), %rax
sete %r12b
setne %al
orb %bpl, %al
movl %eax, %ebp
movq %r15, %rdi
callq 0x35d46
addq $0x8, %r14
testb %r12b, %r12b
jne 0x3aa4d
jmp 0x3aad0
leaq 0x80(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x38ee2
testq %rax, %rax
setne %bpl
leaq 0x38(%rsp), %rdi
callq 0x8578
leaq 0x80(%rsp), %rdi
callq 0x1aeba
andb $0x1, %bpl
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ab32
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x8578
jmp 0x3ab13
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x3ab3a
jmp 0x3ab1c
movq %rax, %rbx
jmp 0x3ab3f
jmp 0x3ab23
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x35d46
jmp 0x3ab35
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x8578
leaq 0x80(%rsp), %rdi
callq 0x1aeba
movq %rbx, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dominant.cpp
// Function: ComputeDominance::DFS(IRBasicBlock*, IRBasicBlock*)
void ComputeDominance::DFS(BB* p, BB* n) {
  if (dfnum.find(n) != dfnum.end()) return;
  dfnum.insert({n, N});
  vertex[N] = n;
  parent.insert({n, p});  // NOTE: parent[root]=nullptr
  ++N;
  for (auto succ : n->succ_) {
    DFS(n, succ);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rsi
movq %rdx, (%rsi)
leaq 0x50(%rdi), %r15
movq %r15, %rdi
callq 0x3bab8
testq %rax, %rax
je 0x3b2d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%rsp), %rax
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
movl 0x34(%rbx), %eax
movl %eax, 0x8(%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x3bb34
movq (%rsp), %rax
movslq 0x34(%rbx), %rcx
movq 0x38(%rbx), %rdx
movq %rax, (%rdx,%rcx,8)
leaq 0x88(%rbx), %rdi
movq %rax, (%r12)
movq %r14, 0x8(%r12)
leaq 0x8(%rsp), %rsi
callq 0x3be2e
incl 0x34(%rbx)
movq (%rsp), %rax
movq 0x40(%rax), %r14
movq 0x48(%rax), %r15
cmpq %r15, %r14
je 0x3b2c4
movq (%r14), %rdx
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x3b29c
addq $0x8, %r14
jmp 0x3b329
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dominant.cpp
// Function: ComputeDominance::AncestorWithLowestSemi(IRBasicBlock*)
ComputeDominance::BB* ComputeDominance::AncestorWithLowestSemi(ComputeDominance::BB* v) {
  MyAssert(ancestor.find(v) != ancestor.end());
  // 从a到v(included)这段已经算过了 存在best[v]里 compute min(dfnum[semi[y]])
  auto a = ancestor[v];
  MyAssert(nullptr != a);  // 不会出现a为空的情况 根节点不会被链入到ancestor中
  if (ancestor.find(a) != ancestor.end()) {
    // 把当前生成树森林中v的最小的祖先到a(included)这段也算了 存在best[a]里 即b
    auto b = AncestorWithLowestSemi(a);
    // 更新 使更新后从ancestor[a]到v(included)这段都算过 存在best[v]里
    ancestor[v] = ancestor[a];
    if (dfnum[semi[b]] < dfnum[semi[best[v]]]) {
      best[v] = b;
    }
  }
  return best[v];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0xc0(%rdi), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x3c186
testq %rax, %rax
je 0x3b4b4
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3c1a4
movq (%rax), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3b4e9
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x3c186
testq %rax, %rax
je 0x3b490
leaq 0x8(%rsp), %r15
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x3b390
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c1a4
movq (%rax), %r13
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c1a4
movq %r13, (%rax)
leaq 0x50(%rbx), %r13
leaq 0x130(%rbx), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3c1a4
movq %r13, %rdi
movq %rax, %rsi
callq 0x3c276
movl (%rax), %r12d
leaq 0xf8(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c1a4
movq %rbp, %rdi
movq %rax, %rsi
callq 0x3c1a4
movq %r13, %rdi
movq %rax, %rsi
callq 0x3c276
cmpl (%rax), %r12d
jge 0x3b490
movq 0x10(%rsp), %r15
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3c1a4
movq %r15, (%rax)
addq $0xf8, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3c1a4
movq (%rax), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x45b2d(%rip), %rdi     # 0x80fe8
leaq 0x1ac26(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x1e2b8(%rip), %rsi     # 0x59786
movq %rax, %rdi
callq 0x8240
leaq 0x1be43(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
pushq $0x17
jmp 0x3b51c
movq 0x45af8(%rip), %rdi     # 0x80fe8
leaq 0x1abf1(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x1e283(%rip), %rsi     # 0x59786
movq %rax, %rdi
callq 0x8240
leaq 0x1be0e(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
pushq $0x1a
popq %rsi
movq %rax, %rdi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dominant.cpp
// Function: ComputeDominance::ResetTempInfo(IRFunction*)
void ComputeDominance::ResetTempInfo(IRFunction* f) {
  // 初始化数据 9
  vertex.clear();
  dfnum.clear();
  parent.clear();
  semi.clear();
  // idom.clear();
  bucket.clear();
  ancestor.clear();
  samedom.clear();
  best.clear();
  vertex.resize(f->bb_list_.size());
  N = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq 0x38(%rdi), %rax
cmpq %rax, 0x40(%rdi)
je 0x3b555
movq %rax, 0x40(%rbx)
leaq 0x50(%rbx), %rdi
callq 0x3c346
leaq 0x88(%rbx), %rdi
callq 0x3c3ac
leaq 0x130(%rbx), %rdi
callq 0x3c3ac
leaq 0x1a0(%rbx), %rdi
callq 0x3c412
leaq 0xc0(%rbx), %rdi
callq 0x3c3ac
leaq 0x168(%rbx), %rdi
callq 0x3c3ac
leaq 0xf8(%rbx), %rdi
callq 0x3c3ac
movq 0x38(%r15), %rsi
subq 0x30(%r15), %rsi
sarq $0x3, %rsi
movq %r14, %rdi
callq 0x3ba86
andl $0x0, 0x34(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dominant.cpp
// Function: ComputeDominance::ComputeDomFrontier(IRBasicBlock*)
void ComputeDominance::ComputeDomFrontier(ComputeDominance::BB* bb) {
  for (auto succ : bb->succ_) {
    if (succ->idom_ != bb) {  // bb一定不是该succ的必经结点
      bb->df_.insert(succ);
    }
  }
  for (auto child : bb->doms_) {
    ComputeDomFrontier(child);
    for (auto child_df : child->df_) {
      if (!child_df->IsByDom(bb) || child_df == bb) {  // bb不是child_df的严格必经结点
        bb->df_.insert(child_df);
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movq 0x40(%rsi), %r14
movq 0x48(%rsi), %r13
leaq 0x270(%rsi), %r15
leaq 0x8(%rsp), %r12
cmpq %r13, %r14
je 0x3b947
movq (%r14), %rax
movq %rax, 0x8(%rsp)
cmpq %rbx, 0x250(%rax)
je 0x3b941
movq %r15, %rdi
movq %r12, %rsi
callq 0x38a9a
addq $0x8, %r14
jmp 0x3b920
movq 0x258(%rbx), %rbp
movq 0x260(%rbx), %r14
leaq 0x8(%rsp), %r12
cmpq %r14, %rbp
je 0x3b9af
movq (%rbp), %r13
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x3b8f6
addq $0x280, %r13            # imm = 0x280
movq (%r13), %r13
testq %r13, %r13
je 0x3b9a9
movq 0x8(%r13), %rdi
movq %rdi, 0x8(%rsp)
movq %rbx, %rsi
callq 0x1fce8
testb %al, %al
je 0x3b99c
cmpq %rbx, 0x8(%rsp)
jne 0x3b977
movq %r15, %rdi
movq %r12, %rsi
callq 0x38a9a
jmp 0x3b977
addq $0x8, %rbp
jmp 0x3b95a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/dominant.cpp
// Function: ComputeDominance::Run()
void ComputeDominance::Run() {
  auto m = dynamic_cast<IRModule*>(*(this->m_));
  MyAssert(nullptr != m);
  for (auto func : m->func_list_) {
    ResetTempInfo(func);
    ComputeIDomInfo(func);                       // 填写func中每个bb的idom和doms信息
    ComputeDomFrontier(func->bb_list_.front());  // 填写func中每个bb的df信息
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3ba36
leaq 0x43c6c(%rip), %rsi     # 0x7f648
leaq 0x4468d(%rip), %rdx     # 0x80070
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
je 0x3ba36
movq 0x28(%rax), %r15
movq 0x30(%rax), %r12
cmpq %r12, %r15
je 0x3ba2a
movq (%r15), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b538
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b5c4
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x3b8f6
addq $0x8, %r15
jmp 0x3b9f7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x455ab(%rip), %rdi     # 0x80fe8
leaq 0x1a6a4(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x1dd36(%rip), %rsi     # 0x59786
movq %rax, %rdi
callq 0x8240
leaq 0x1b8c1(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
movl $0x83, %esi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/generate_arm_from_ssa.cpp
// Function: GenerateArmFromSSA::ResolveImm2Reg(ArmBasicBlock*, int, bool)
Reg* GenerateArmFromSSA::ResolveImm2Reg(ArmBasicBlock* armbb, int imm, bool record) {
  auto vreg = NewVirtualReg();
  Instruction* inst = nullptr;
  if (Operand2::CheckImm8m(imm)) {
    // NOTE: 寄存器分配后立即数值可能会变
    inst = new Move(vreg, new Operand2(imm), armbb);
  } else {
    if (imm < 0 && Operand2::CheckImm8m(-imm - 1)) {  // mvn
      inst = new Move(vreg, new Operand2(-imm - 1), armbb, true);
    } else {  // use ldr pseudo-inst instead of mov.
      inst = new LdrPseudo(vreg, imm, armbb);
    }
  }
  MyAssert(nullptr != inst);
  if (record) {
    this->sp_fixup.insert(inst);
  }
  return vreg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
callq 0x3cb82
movq %rax, %rbx
movl %r12d, %edi
callq 0x9374
testb %al, %al
je 0x3cc23
pushq $0x28
popq %rdi
callq 0x8250
movq %rax, %r13
pushq $0x18
popq %rdi
callq 0x8250
movb $0x1, (%rax)
movl %r12d, 0x4(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
pushq $0x1
popq %r9
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x3fbc8
jmp 0x3cc99
testl %r12d, %r12d
jns 0x3cc79
movl %r12d, %r13d
notl %r13d
movl %r13d, %edi
callq 0x9374
testb %al, %al
je 0x3cc79
pushq $0x28
popq %rdi
callq 0x8250
movq %rax, %r12
pushq $0x18
popq %rdi
callq 0x8250
movb $0x1, (%rax)
movl %r13d, 0x4(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
pushq $0x1
popq %r8
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r15, %rcx
movl %r8d, %r9d
callq 0x3fbc8
movq %r12, (%rsp)
jmp 0x3cc9d
pushq $0x48
popq %rdi
callq 0x8250
movq %rax, %r13
pushq $0x1
popq %r8
movq %rax, %rdi
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x3fc1c
movq %r13, (%rsp)
testb %bpl, %bpl
je 0x3ccb4
addq $0xd0, %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0xa66a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r12, %rdi
jmp 0x3cce1
movq %rax, %rbx
pushq $0x48
jmp 0x3ccdd
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r13, %rdi
callq 0x8260
movq %rbx, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/generate_arm_from_ssa.cpp
// Function: GenerateArmFromSSA::ResolveValue2Operand2(ArmBasicBlock*, Value*)
Operand2* GenerateArmFromSSA::ResolveValue2Operand2(ArmBasicBlock* armbb, Value* val) {
  if (auto src_val = dynamic_cast<ConstantInt*>(val)) {
    return ResolveImm2Operand2(armbb, src_val->GetImm());
  } else {
    return new Operand2(ResolveValue2Reg(armbb, val));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rdx, %rdx
je 0x3d9b8
leaq 0x42af9(%rip), %rsi     # 0x80480
leaq 0x42b1a(%rip), %rdx     # 0x804a8
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
je 0x3d9b8
movl 0x48(%rax), %edx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3ccee
pushq $0x18
popq %rdi
callq 0x8250
movq %rax, %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3d242
movb $0x0, (%r12)
andl $0x0, 0x4(%r12)
movq %rax, 0x8(%r12)
andq $0x0, 0x10(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0x8260
movq %rbx, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/generate_arm_from_ssa.cpp
// Function: GenerateArmFromSSA::AddEpilogue(ArmFunction*)
void GenerateArmFromSSA::AddEpilogue(ArmFunction* func) {
  // add sp, sp, #stack_size 之后应该修改为栈大小 记录在sp_fixup里
  auto op2 = ResolveImm2Operand2(epilogue, 0, true);
  new BinaryInst(BiOp::ADD, machine_regs[ArmReg::sp], machine_regs[ArmReg::sp], op2, epilogue);
  MyAssert(!op2->is_imm_);

  // pop {pc} NOTE: same as bx lr
  auto pop_inst = new PushPop(PushPop::OpKind::POP, epilogue);
  pop_inst->reg_list_.push_back(machine_regs[ArmReg::pc]);

  // all pred bbs are already maintained
  func->bb_list_.push_back(epilogue);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x110(%rdi), %rsi
pushq $0x1
popq %rcx
xorl %edx, %edx
callq 0x3ccee
movq %rax, %r15
pushq $0x38
popq %rdi
callq 0x8250
movq %rax, %r12
movq 0x38(%r14), %rax
movq 0x110(%r14), %r9
movq 0x68(%rax), %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %rcx, %rdx
movq %r15, %r8
callq 0x3fd3c
cmpb $0x1, (%r15)
je 0x3dc92
leaq 0x110(%r14), %r15
pushq $0x30
popq %rdi
callq 0x8250
movq %rax, %r12
movq (%r15), %rdx
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x3fd94
addq $0x18, %r12
movq 0x38(%r14), %rsi
addq $0x78, %rsi
movq %r12, %rdi
callq 0x2f188
addq $0x38, %rbx
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3fe14
movq 0x4334f(%rip), %rdi     # 0x80fe8
leaq 0x18448(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x1bb48(%rip), %rsi     # 0x597f4
movq %rax, %rdi
callq 0x8240
leaq 0x19665(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
movl $0x16f, %esi            # imm = 0x16F
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
movq %rax, %rbx
pushq $0x30
jmp 0x3dcee
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r12, %rdi
callq 0x8260
movq %rbx, %rdi
callq 0x84d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/generate_arm_from_ssa.cpp
// Function: GenerateArmFromSSA::ResetFuncData()
void GenerateArmFromSSA::ResetFuncData() {
  machine_regs.clear();
  for (int i = 0; i < 16; ++i) {
    machine_regs.push_back(new Reg(i));
  }
  this->virtual_reg_id = 16;
  this->var_map.clear();
  this->stack_size = 0;
  this->sp_arg_fixup.clear();
  this->sp_fixup.clear();
  this->prologue = nullptr;
  this->epilogue = nullptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %rax
cmpq %rax, 0x40(%rdi)
je 0x3dd1d
movq %rax, 0x40(%rbx)
leaq 0x38(%rbx), %r14
xorl %ebp, %ebp
pushq $0x40
popq %r15
leaq 0x8(%rsp), %r12
cmpl $0x10, %ebp
je 0x3dd71
movq %r15, %rdi
callq 0x8250
leaq 0x30(%rax), %rcx
movq %rcx, (%rax)
movq $0x1, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movl $0x3f800000, 0x20(%rax) # imm = 0x3F800000
movups %xmm0, 0x28(%rax)
movl %ebp, 0x38(%rax)
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2f726
incl %ebp
jmp 0x3dd2c
movl $0x10, 0x50(%rbx)
leaq 0x58(%rbx), %rdi
callq 0x40284
andl $0x0, 0x90(%rbx)
leaq 0x98(%rbx), %rdi
callq 0x3053c
leaq 0xd0(%rbx), %rdi
callq 0x3053c
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/generate_arm_from_ssa.cpp
// Function: GenerateArmFromSSA::Run()
void GenerateArmFromSSA::Run() {
  auto m = dynamic_cast<SSAModule*>(*(this->m_));
  MyAssert(nullptr != m);
  auto arm_m = this->GenCode(m);
  *(this->m_) = static_cast<Module*>(arm_m);
  delete m;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3fae2
leaq 0x3fb9e(%rip), %rsi     # 0x7f648
leaq 0x40e4f(%rip), %rdx     # 0x80900
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
je 0x3fae2
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3e130
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq (%r14), %rax
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x8(%rax)
movq 0x414ff(%rip), %rdi     # 0x80fe8
leaq 0x165f8(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x19cf8(%rip), %rsi     # 0x597f4
movq %rax, %rdi
callq 0x8240
leaq 0x17815(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
movl $0x336, %esi            # imm = 0x336
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/global_value_numbering.cpp
// Function: ZNK20GlobalValueNumbering10ExpressioncvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv
GlobalValueNumbering::Expression::operator std::string() const {
  std::string res = "";
  for (auto opn : operands_) {
    auto constint = dynamic_cast<ConstantInt*>(opn);
    if (nullptr != constint)
      res += " " + std::to_string(constint->GetImm());
    else
      res += " " + opn->GetName();
  }
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x13688(%rip), %rsi     # 0x56149
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0xa292
movq 0x8(%r15), %r13
movq 0x10(%r15), %r15
leaq 0x28(%rsp), %rbp
cmpq %r15, %r13
je 0x42b71
movq (%r13), %r12
testq %r12, %r12
je 0x42b3f
movq %r12, %rdi
leaq 0x3d989(%rip), %rsi     # 0x80480
leaq 0x3d9aa(%rip), %rdx     # 0x804a8
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
je 0x42b3f
movl 0x48(%rax), %esi
movq %rbp, %rdi
callq 0xa36c
movq %r14, %rdi
leaq 0x13813(%rip), %rsi     # 0x56332
movq %rbp, %rdx
callq 0xa41c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8550
movq %r14, %rdi
callq 0x8578
movq %rbp, %rdi
jmp 0x42b63
addq $0x28, %r12
movq %r14, %rdi
leaq 0x137e5(%rip), %rsi     # 0x56332
movq %r12, %rdx
callq 0x1ae0c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8550
movq %r14, %rdi
callq 0x8578
addq $0x8, %r13
jmp 0x42adb
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x42bad
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x8578
jmp 0x42b97
movq %rax, %r14
leaq 0x28(%rsp), %rdi
jmp 0x42ba6
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x8578
jmp 0x42bb0
movq %rax, %r14
movq %rbx, %rdi
callq 0x8578
movq %r14, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/global_value_numbering.cpp
// Function: GlobalValueNumbering::DFS(std::vector<SSABasicBlock*, std::allocator<SSABasicBlock*>>&, std::unordered_set<SSABasicBlock*, std::hash<SSABasicBlock*>, std::equal_to<SSABasicBlock*>, std::allocator<SSABasicBlock*>>&, SSABasicBlock*, bool)
void GlobalValueNumbering::DFS(std::vector<SSABasicBlock*>& po, std::unordered_set<SSABasicBlock*>& vis,
                               SSABasicBlock* bb, bool succ) {
  MyAssert(nullptr != bb);
  if (vis.find(bb) == vis.end()) {
    vis.insert(bb);
    for (auto next_bb : (succ ? bb->GetSuccBB() : bb->GetPredBB())) {
      MyAssert(nullptr != next_bb);
      DFS(po, vis, next_bb);
    }
    po.push_back(bb);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, 0x8(%rsp)
testq %rdx, %rdx
je 0x42ca5
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4410a
testq %rax, %rax
jne 0x42c48
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x28e4c
testb %bpl, %bpl
pushq $0x58
popq %rax
pushq $0x40
popq %r12
cmovneq %rax, %r12
addq (%r15), %r12
pushq $0x1
popq %rbp
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x42c3b
movq 0x10(%r15), %rdx
testq %rdx, %rdx
je 0x42c55
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0x42bc0
jmp 0x42c1b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x36012
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x3e38c(%rip), %rdi     # 0x80fe8
leaq 0x13485(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x16c0c(%rip), %rsi     # 0x5987b
movq %rax, %rdi
callq 0x8240
leaq 0x146a2(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
movl $0x183, %esi            # imm = 0x183
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
movq 0x3e33c(%rip), %rdi     # 0x80fe8
leaq 0x13435(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x16bbc(%rip), %rsi     # 0x5987b
movq %rax, %rdi
callq 0x8240
leaq 0x14652(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
movl $0x17f, %esi            # imm = 0x17F
jmp 0x42c8e
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/global_value_numbering.cpp
// Function: GlobalValueNumbering::ComputeRPO(SSAFunction*)
std::vector<SSABasicBlock*> GlobalValueNumbering::ComputeRPO(SSAFunction* func) {
  std::vector<SSABasicBlock*> po;
  std::unordered_set<SSABasicBlock*> vis;
  if (func->GetBBList().size() > 0) DFS(po, vis, func->GetBBList().front());
  std::reverse(po.begin(), po.end());
  return po;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x30(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
cmpq $0x0, 0x40(%rsi)
je 0x42d3b
movq 0x30(%rsi), %rax
movq 0x10(%rax), %rdx
movq %rsp, %rsi
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x42bc0
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
jmp 0x42d3f
xorl %esi, %esi
xorl %edi, %edi
callq 0x44127
movq %rsp, %rdi
callq 0x28c50
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x28c50
movq %rbx, %rdi
callq 0x28d22
movq %r14, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/instruction_combining.cpp
// Function: isSameOpn(ir::Opn, ir::Opn)
static bool isSameOpn(ir::Opn opn1, ir::Opn opn2) {
  if (opn1.type_ == opn2.type_ && opn1.type_ == ir::Opn::Type::Var) {
    if (opn1.name_ == opn2.name_ && opn1.scope_id_ == opn2.scope_id_) {
      return true;
    }
    return false;
  } else if (opn1.type_ == opn2.type_ && opn1.type_ == ir::Opn::Type::Array) {
    //先不考虑数组的情况，这里什么也没有
  } else if (opn1.type_ == opn2.type_ && opn1.type_ == ir::Opn::Type::Imm) {
    return opn1.imm_num_ == opn2.imm_num_;
  }

  return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
movl (%rsi), %ecx
movl %ecx, %edx
orl %eax, %edx
jne 0x4630c
leaq 0x8(%r14), %rdi
leaq 0x8(%rbx), %rsi
callq 0xe1ca
testb %al, %al
je 0x46321
movl 0x28(%r14), %ecx
movb $0x1, %al
cmpl 0x28(%rbx), %ecx
jne 0x46321
jmp 0x46323
xorl %eax, %ecx
xorl $0x1, %eax
orl %ecx, %eax
jne 0x46321
movl 0x4(%r14), %eax
cmpl 0x4(%rbx), %eax
sete %al
jmp 0x46323
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/ir_liveness_analysis.cpp
// Function: isFound(std::unordered_set<ir::Opn*, std::hash<ir::Opn*>, std::equal_to<ir::Opn*>, std::allocator<ir::Opn*>>&, ir::Opn*)
bool isFound(std::unordered_set<Opn *> &inbb, Opn *inir) {
  for (auto i : inbb) {
    if (i->name_ == inir->name_ && i->scope_id_ == inir->scope_id_) {
      return true;
    }
  }
  return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x10, %rbx
leaq 0x8(%rsi), %r15
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x46b11
movq 0x8(%rbx), %r12
leaq 0x8(%r12), %rdi
movq %r15, %rsi
callq 0xe1ca
testb %al, %al
je 0x46ae9
movl 0x28(%r12), %eax
cmpl 0x28(%r14), %eax
jne 0x46ae9
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/ir_liveness_analysis.cpp
// Function: IRLivenessAnalysis::Run()
void IRLivenessAnalysis::Run() {
  auto m = dynamic_cast<IRModule *>(*(this->m_));

  MyAssert(nullptr != m);

  for (auto func : m->func_list_) {
    // std::cout << "analysis func:" << func->name_ << std::endl;
    this->Run4Func(func);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x46edb
leaq 0x387a3(%rip), %rsi     # 0x7f648
leaq 0x391c4(%rip), %rdx     # 0x80070
xorl %ecx, %ecx
callq 0x82c0
testq %rax, %rax
je 0x46edb
movq 0x28(%rax), %rbx
movq 0x30(%rax), %r14
cmpq %r14, %rbx
je 0x46ed3
movq (%rbx), %rdi
callq 0x46c18
addq $0x8, %rbx
jmp 0x46ec0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x3a106(%rip), %rdi     # 0x80fe8
leaq 0xf1ff(%rip), %rsi      # 0x560e8
callq 0x8240
leaq 0x12ab4(%rip), %rsi     # 0x599a9
movq %rax, %rdi
callq 0x8240
leaq 0x1041c(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
movl $0xf9, %esi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/loop_invariant_extrapolation.cpp
// Function: cross(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>)
vector<int> cross(vector<int> a, vector<int> b) {
  vector<int> ret;
  int ia = 0, ib = 0;
  while (ia < a.size() and ib < b.size()) {
    if (a[ia] < b[ib])
      ia++;
    else if (a[ia] > b[ib])
      ib++;
    else {
      ret.push_back(a[ia]);
      ia++, ib++;
    }
  }
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %ebp, %ebp
xorl %r12d, %r12d
movq (%r15), %rdx
movq 0x8(%r15), %rax
subq %rdx, %rax
sarq $0x2, %rax
movslq %ebp, %rcx
movslq %r12d, %r12
leaq (%rdx,%r12,4), %rsi
cmpq %r12, %rax
jbe 0x477ee
movq (%r14), %rdx
movq 0x8(%r14), %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
cmpq %rcx, %rdi
jbe 0x477ee
movl (%rdx,%rcx,4), %edx
cmpl %edx, (%rsi)
jge 0x477dd
incq %r12
addq $0x4, %rsi
jmp 0x477b5
jg 0x477ea
movq %rbx, %rdi
callq 0xf720
incl %r12d
incl %ebp
jmp 0x4779d
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b2b6
movq %r14, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/loop_invariant_extrapolation.cpp
// Function: will_not_live(std::pair<int, int>, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>, std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>)
bool will_not_live(pair<int, int> pos, vector<pair<int, int> > use, vector<int> suc,
                   vector<int> loop)  // use为变量x的use，suc为loop的后续节点
{
  set<int> se;
  for (int i = 0; i < use.size(); i++) se.insert(use[i].first);
  for (int i = 0; i < suc.size(); i++) {
    if (se.find(suc[i]) != se.end()) return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
leaq 0x10(%rsp), %r12
andl $0x0, (%r12)
andq $0x0, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
andq $0x0, 0x20(%r12)
movq %rsi, %r14
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
xorl %ebp, %ebp
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
sarq $0x3, %rax
cmpq %rbp, %rax
jbe 0x47a78
addq %r13, %rsi
movq %r15, %rdi
callq 0x2d45e
incq %rbp
addq $0x8, %r13
jmp 0x47a51
pushq $-0x1
popq %r15
xorl %r13d, %r13d
leaq 0x8(%rsp), %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %rbp
subq %rsi, %rbp
sarq $0x2, %rbp
incq %r15
cmpq %r15, %rbp
jbe 0x47aae
addq %r13, %rsi
movq %r14, %rdi
callq 0x304ea
addq $0x4, %r13
cmpq %r12, %rax
je 0x47a84
cmpq %r15, %rbp
setbe %bl
leaq 0x8(%rsp), %rdi
callq 0x2de44
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47ad1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2de44
movq %rbx, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/loop_invariant_extrapolation.cpp
// Function: check2(std::pair<int, int>, std::vector<int, std::allocator<int>>, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>)
bool check2(pair<int, int> pos, vector<int> loop,
            vector<pair<int, int> > def)  // pos为当前的基本块，要看loop中除了pos以外其他的基本块在不在def中
{
  set<int> se;
  for (int i = 0; i < def.size(); i++) {
    if (def[i] == pos) continue;
    se.insert(def[i].first);
  }
  for (int i = 0; i < loop.size(); i++) {
    if (se.find(loop[i]) != se.end()) return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rdi, %rbp
leaq 0x10(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
shrq $0x20, %rbp
xorl %r13d, %r13d
xorl %r12d, %r12d
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
sarq $0x3, %rax
cmpq %r12, %rax
jbe 0x47b5a
cmpl %r15d, (%rsi,%r13)
jne 0x47b44
cmpl %ebp, 0x4(%rsi,%r13)
je 0x47b51
addq %r13, %rsi
leaq 0x8(%rsp), %rdi
callq 0x2d45e
incq %r12
addq $0x8, %r13
jmp 0x47b24
pushq $-0x1
popq %r15
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
leaq 0x10(%rsp), %rbp
movq (%rbx), %rsi
movq 0x8(%rbx), %r13
subq %rsi, %r13
sarq $0x2, %r13
incq %r15
cmpq %r15, %r13
jbe 0x47b95
addq %r12, %rsi
movq %r14, %rdi
callq 0x304ea
addq $0x4, %r12
cmpq %rbp, %rax
je 0x47b6b
cmpq %r15, %r13
setbe %bl
leaq 0x8(%rsp), %rdi
callq 0x2de44
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47bb8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2de44
movq %rbx, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/loop_unroll.cpp
// Function: cross(std::vector<IRBasicBlock*, std::allocator<IRBasicBlock*>>, std::vector<IRBasicBlock*, std::allocator<IRBasicBlock*>>)
vector<IRBasicBlock*> cross(vector<IRBasicBlock*> a, vector<IRBasicBlock*> b) {
  sort(a.begin(), a.end()), sort(b.begin(), b.end());
  vector<IRBasicBlock*> res;
  int ia = 0, ib = 0;
  while (ia < a.size() && ib < b.size()) {
    if (a[ia] < b[ib])
      ia++;
    else if (a[ia] > b[ib])
      ib++;
    else {
      res.push_back(a[ia]);
      ia++, ib++;
    }
  }
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
callq 0x50e4f
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x50e4f
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
xorl %ebp, %ebp
xorl %r12d, %r12d
movq (%r15), %rdx
movq 0x8(%r15), %rax
subq %rdx, %rax
sarq $0x3, %rax
movslq %ebp, %rcx
movslq %r12d, %r12
leaq (%rdx,%r12,8), %rsi
cmpq %r12, %rax
jbe 0x4e028
movq (%r14), %rdx
movq 0x8(%r14), %rdi
subq %rdx, %rdi
sarq $0x3, %rdi
cmpq %rcx, %rdi
jbe 0x4e028
movq (%rdx,%rcx,8), %rdx
cmpq %rdx, (%rsi)
jae 0x4e017
incq %r12
addq $0x8, %rsi
jmp 0x4dfed
ja 0x4e024
movq %rbx, %rdi
callq 0xdd4a
incl %r12d
incl %ebp
jmp 0x4dfd5
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x1ff9a
movq %r14, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/loop_unroll.cpp
// Function: find_loop(std::pair<IRBasicBlock*, IRBasicBlock*>)
vector<IRBasicBlock*> find_loop(pair<IRBasicBlock*, IRBasicBlock*> edge) {
  auto &u = edge.first, v = edge.second;
  vector<IRBasicBlock*> res;
  res.push_back(v);
  if (u == v) return res;
  queue<IRBasicBlock*> q;
  q.push(u);
  while (!q.empty()) {
    auto x = q.front();
    q.pop();
    if (have(x, res)) continue;
    res.push_back(x);
    for (auto& pre : x->pred_) q.push(pre);
  }
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
leaq 0x8(%rsp), %rsi
movq %rdx, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0xdd4a
cmpq %r14, 0x8(%rsp)
je 0x4e9b4
leaq 0x20(%rsp), %rdi
callq 0x50d96
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x35d06
leaq 0x20(%rsp), %r14
leaq 0x70(%rsp), %r15
movq %rsp, %r12
movq 0x30(%rsp), %rax
cmpq %rax, 0x50(%rsp)
je 0x4e9aa
movq (%rax), %rax
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x35d28
movq (%rsp), %r13
movq %r15, %rdi
movq %rbx, %rsi
callq 0x50d2a
movq %r13, %rdi
movq %r15, %rsi
callq 0x50d77
movl %eax, %ebp
movq %r15, %rdi
callq 0x1ff9a
testb %bpl, %bpl
jne 0x4e939
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdd4a
movq (%rsp), %rax
movq 0x28(%rax), %r13
movq 0x30(%rax), %rbp
cmpq %rbp, %r13
je 0x4e939
movq %r14, %rdi
movq %r13, %rsi
callq 0x35d06
addq $0x8, %r13
jmp 0x4e994
leaq 0x20(%rsp), %rdi
callq 0x37aa2
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e9d4
jmp 0x4e9cd
movq %rax, %r14
jmp 0x4e9e1
jmp 0x4e9d4
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x37aa2
movq %rbx, %rdi
callq 0x1ff9a
movq %r14, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/loop_unroll.cpp
// Function: find_basicvar(ir::Opn*, IRBasicBlock*)
vector<ir::Opn*> find_basicvar(ir::Opn* var, IRBasicBlock* bb) {
  vector<ir::Opn*> basic;
  if (var->type_ == ir::Opn::Type::Imm) return basic;
  basic.push_back(var);
  vector<ir::IR*> rev(bb->ir_list_);
  reverse(rev.begin(), rev.end());
  for (auto& ir : rev) {
    if (ir->op_ == ir::IR::OpKind::LABEL || ir->op_ == ir::IR::OpKind::PARAM || ir->op_ == ir::IR::OpKind::CALL ||
        ir->op_ == ir::IR::OpKind::RET || ir->op_ == ir::IR::OpKind::GOTO)
      continue;
    auto res = &ir->res_;
    if (have1(res, basic)) basic.push_back(&ir->opn1_), basic.push_back(&ir->opn2_);
  }
  basic.erase(basic.begin());
  auto it = basic.begin();
  while (it != basic.end()) {
    string name = (*it)->name_;
    if (count(name.begin(), name.end(), '-') == 1)
      it = basic.erase(it);  // 删除临时变量，临时变量形如temp-x
    else
      it++;
  }
  return basic;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
cmpl $0x1, (%rsi)
je 0x4eb86
movq %rdx, %r14
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x46fa2
addq $0x8, %r14
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x4b4bc
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x519db
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r12
leaq 0x50(%rsp), %r14
cmpq %r12, %r15
je 0x4eb10
movq (%r15), %r13
movl (%r13), %eax
addl $-0x7, %eax
cmpl $0x5, %eax
jb 0x4eb0a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47104
addq $0x88, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x4e9f1
movl %eax, %ebp
movq %r14, %rdi
callq 0x366f8
testb %bpl, %bpl
je 0x4eb0a
movq (%r15), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0x51276
movq (%r15), %rax
addq $0x48, %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x51276
addq $0x8, %r15
jmp 0x4ea98
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x50db2
movq (%rbx), %r12
leaq 0x30(%rsp), %r14
leaq 0x8(%rsp), %r15
cmpq 0x8(%rbx), %r12
je 0x4eb7c
movq (%r12), %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x8390
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq %rdi, %rsi
movb $0x2d, 0x8(%rsp)
movq %r15, %rdx
callq 0x519fc
cmpq $0x1, %rax
jne 0x4eb6e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x50db2
movq %rax, %r12
jmp 0x4eb72
addq $0x8, %r12
movq %r14, %rdi
callq 0x8578
jmp 0x4eb28
leaq 0x10(%rsp), %rdi
callq 0x1ffb8
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4ebb8
jmp 0x4ebb8
jmp 0x4eb9e
movq %rax, %r14
jmp 0x4ebc5
jmp 0x4ebb8
jmp 0x4ebb8
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x8578
jmp 0x4ebbb
jmp 0x4ebb8
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x1ffb8
movq %rbx, %rdi
callq 0x366f8
movq %r14, %rdi
callq 0x84d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/Pass/reach_define.cpp
// Function: print_map(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::unordered_set<ir::IR*, std::hash<ir::IR*>, std::equal_to<ir::IR*>, std::allocator<ir::IR*>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::unordered_set<ir::IR*, std::hash<ir::IR*>, std::equal_to<ir::IR*>, std::allocator<ir::IR*>>>>>)
void print_map(std::unordered_map<std::string, std::unordered_set<ir::IR *>> umap) {
  for (auto iter : umap) {
    std::cout << iter.first << ": " << iter.second.size() << std::endl;
    for (auto ir : iter.second) {
      ir->PrintIR();
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
addq $0x10, %rbx
movq %rsp, %r14
movq 0x2f421(%rip), %r15     # 0x80fb0
leaq 0x56ba(%rip), %r12      # 0x57250
movq 0x2f3db(%rip), %r13     # 0x80f78
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x51c02
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x52db2
movq %r15, %rdi
movq %r14, %rsi
callq 0x8230
movq %rax, %rdi
movq %r12, %rsi
callq 0x8240
movq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x81d0
movq %rax, %rdi
callq 0x8170
leaq 0x30(%rsp), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x51bf8
movq 0x8(%rbp), %rdi
movq %r13, %rsi
callq 0x1e1dc
jmp 0x51be1
movq %r14, %rdi
callq 0x1fdfc
jmp 0x51b9d
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x51c13
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1fdfc
movq %rbx, %rdi
callq 0x84d0