LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ir_struct.cpp
// Function: IRModule::EmitCode(std::ostream&)
void IRModule::EmitCode(std::ostream& out) {
  out << "@ module: " << this->name_ << std::endl;
  // this->global_scope_.Print(out);
  for (auto func : this->func_list_) {
    func->EmitCode(out);
    out << std::endl;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x42a1a(%rip), %rsi     # 0x6e33c
movl $0xa, %edx
movq %rbx, %rdi
callq 0x8330
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x8330
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r15, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x28(%r14), %r15
movq 0x30(%r14), %r14
cmpq %r14, %r15
je 0x2b9ae
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2b9b4
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
addq $0x8, %r15
jmp 0x2b971
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ir_struct.cpp
// Function: IRFunction::EmitCode(std::ostream&)
void IRFunction::EmitCode(std::ostream& out) {
  out << "@ Function: " << this->name_ << std::endl;
#ifdef GENIR_WITH_COMMENT
  out << "@ call_func: ";
  for (auto func : this->call_func_list_) {
    out << func->name_ << " ";
  }
  out << std::endl;
#endif
  out << "@ Function Begin:" << std::endl;
  out << std::endl;
  for (auto bb : this->bb_list_) {
    bb->EmitCode(out);
    out << std::endl;
  }
  out << "@ Function End." << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4393b(%rip), %rsi     # 0x6f305
movl $0xc, %edx
movq %rbx, %rdi
callq 0x8330
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x8330
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r15, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
leaq 0x42a3d(%rip), %rsi     # 0x6e455
movl $0x11, %edx
movq %rbx, %rdi
callq 0x8330
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x30(%r14), %r15
movq 0x38(%r14), %r14
cmpq %r14, %r15
je 0x2bacf
movq (%r15), %rax
movq 0x8(%rax), %r12
movq 0x10(%rax), %r13
cmpq %r13, %r12
je 0x2baa2
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x29b96
addq $0x8, %r12
jmp 0x2ba8b
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
addq $0x8, %r15
jmp 0x2ba7b
leaq 0x42991(%rip), %rsi     # 0x6e467
movl $0xf, %edx
movq %rbx, %rdi
callq 0x8330
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x81f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ir_struct.cpp
// Function: IRBasicBlock::IsByDom(IRBasicBlock*)
bool IRBasicBlock::IsByDom(IRBasicBlock* bb) {
  auto n = this;
  while (nullptr != n) {
    if (bb == n) return true;
    n = n->idom_;
  }
  return false;
}

// Assembly:
cmpq %rsi, %rdi
je 0x2be8f
movq 0x250(%rdi), %rdi
testq %rdi, %rdi
setne %al
cmpq %rsi, %rdi
je 0x2be8e
testq %rdi, %rdi
jne 0x2be77
retq
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/../include/Pass/pass_manager.h
// Function: void PassManager::AddPass<GlobalValueNumbering>(bool)
void AddPass(bool emit = false) {
    try {
      Pass* pass = new PassTy(m_);
      pass->SetName(typeid(PassTy).name());
      pass->SetEmit(emit);
      passes_.push_back(pass);
    } catch (...) {
      std::cerr << "ERROR class type:" << typeid(PassTy).name() << " be passed to AddPass();" << std::endl;
      exit(255);
    }
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl $0xc0, %edi
callq 0x8290
movq %rax, %r14
movq 0x18(%rbx), %rax
movq %rax, 0x8(%r14)
leaq 0x20(%r14), %rax
movq %rax, 0x10(%r14)
xorl %eax, %eax
movq %rax, 0x18(%r14)
movb %al, 0x20(%r14)
movb %al, 0x30(%r14)
leaq 0x60bad(%rip), %rcx     # 0x8ebb0
addq $0x10, %rcx
movq %rcx, (%r14)
leaq 0x68(%r14), %rcx
movq %rcx, 0x38(%r14)
movl $0x1, %ecx
movq %rcx, 0x40(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r14)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, 0x58(%r14)
movups %xmm0, 0x60(%r14)
leaq 0xa0(%r14), %rsi
movq %rsi, 0x70(%r14)
movq %rcx, 0x78(%r14)
movups %xmm0, 0x80(%r14)
movl %edx, 0x90(%r14)
movups %xmm0, 0x98(%r14)
movups %xmm0, 0xa8(%r14)
movq %rax, 0xb8(%r14)
movq %r14, 0x8(%rsp)
leaq 0x60b56(%rip), %rax     # 0x8ebc8
movq 0x8(%rax), %rax
xorl %esi, %esi
cmpb $0x2a, (%rax)
sete %sil
addq %rax, %rsi
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2d0dc
movq %r14, %rdi
addq $0x10, %rdi
leaq 0x10(%rsp), %rsi
callq 0x81b0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e0bd
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x82a0
movb %bpl, 0x30(%r14)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2e0d5
movq %r14, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x2e0e2
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x2edb2
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e110
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x82a0
jmp 0x2e110
jmp 0x2e10d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x8150
movq 0x60ec9(%rip), %rdi     # 0x8efe8
leaq 0x41361(%rip), %rsi     # 0x6f487
movl $0x11, %edx
callq 0x8330
leaq 0x60a91(%rip), %rax     # 0x8ebc8
movq 0x8(%rax), %rax
xorl %esi, %esi
cmpb $0x2a, (%rax)
sete %sil
addq %rax, %rsi
movq 0x60e9a(%rip), %rdi     # 0x8efe8
callq 0x8280
movq %rax, %rbx
leaq 0x4133c(%rip), %rsi     # 0x6f499
movl $0x18, %edx
movq %rax, %rdi
callq 0x8330
movq %rbx, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
movq %rax, %rbx
callq 0x84e0
movq %rbx, %rdi
callq 0x8540
movq %rax, %rdi
callq 0xc54c
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/../include/Pass/pass_manager.h
// Function: PassManager::Run(bool, std::ostream&)
void Run(bool emit = false, std::ostream& out = std::cout) {
    int i = 1;
    for (auto pass : this->passes_) {
#ifdef DEBUG_PASSES_PROCESS
      std::cout << ">>>>>>>>>>>> Start pass " << pass->GetName() << " <<<<<<<<<<<<" << std::endl;
#endif
      pass->Run();

      if (emit || pass->IsEmit()) {
        out << ">>>>>>>>>>>> After pass " << pass->GetName() << " <<<<<<<<<<<<" << std::endl;
        (*m_)->EmitCode(out);
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, 0x2c(%rsp)
movq (%rdi), %rbp
movq %rdi, 0x30(%rsp)
movq 0x8(%rdi), %r15
cmpq %r15, %rbp
je 0x2ea77
movq %rdx, %rbx
leaq 0x18(%rsp), %r12
movq (%rbp), %r14
movl $0x18, %edx
movq 0x606a3(%rip), %r13     # 0x8efb8
movq %r13, %rdi
leaq 0x40b28(%rip), %rsi     # 0x6f447
callq 0x8330
movq %r12, 0x8(%rsp)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xc6dc
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rdi
callq 0x8330
movq %rax, %r13
movl $0xd, %edx
movq %rax, %rdi
leaq 0x40afe(%rip), %rsi     # 0x6f460
callq 0x8330
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r13, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e9a6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x82a0
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
cmpb $0x0, 0x2c(%rsp)
jne 0x2e9c0
cmpb $0x1, 0x30(%r14)
jne 0x2ea6a
movl $0x18, %edx
movq %rbx, %rdi
leaq 0x40a9f(%rip), %rsi     # 0x6f46e
callq 0x8330
movq %r12, 0x8(%rsp)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xc6dc
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x8330
movq %rax, %r14
movl $0xd, %edx
movq %rax, %rdi
leaq 0x40a4e(%rip), %rsi     # 0x6f460
callq 0x8330
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r14, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2ea55
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x82a0
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
addq $0x8, %rbp
cmpq %r15, %rbp
jne 0x2e905
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ea88
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2eaa2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x82a0
movq %rbx, %rdi
callq 0x8540
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: Value::KillUse(Value*)
void Value::KillUse(Value *val) {
  for (auto it = use_list_.begin(); it != use_list_.end();) {
    if (val == (*it)->Get()) {
      it = use_list_.erase(it);
    } else {
      ++it;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x10(%rdi), %r12
movq 0x10(%rdi), %r15
cmpq %r12, %r15
je 0x33329
movq %rsi, %rbx
movq %rdi, %r14
movq (%r15), %r13
movq 0x10(%r15), %rax
cmpq %rbx, (%rax)
jne 0x33321
decq 0x20(%r14)
movq %r15, %rdi
callq 0x84d0
movl $0x18, %esi
movq %r15, %rdi
callq 0x82a0
movq %r13, %r15
cmpq %r12, %r13
jne 0x332fc
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: Value::KillUse(SSAFunction*)
void Value::KillUse(SSAFunction *func) {
  // 删除该值在该函数中的全部使用
  for (auto it = use_list_.begin(); it != use_list_.end();) {
    auto inst = dynamic_cast<SSAInstruction *>((*it)->Get());
    if (nullptr != inst && inst->GetParent()->GetFunction() == func) {
      it = use_list_.erase(it);
    } else {
      ++it;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x10(%rdi), %rbp
movq %rdi, (%rsp)
movq 0x10(%rdi), %r15
cmpq %rbp, %r15
je 0x333c1
movq %rsi, %rbx
leaq 0x5b11c(%rip), %r12     # 0x8e480
leaq 0x5b05d(%rip), %r13     # 0x8e3c8
movq 0x10(%r15), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x33392
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x8320
testq %rax, %rax
je 0x33392
movq 0x60(%rax), %rax
cmpq %rbx, (%rax)
je 0x3339c
movq (%r15), %r15
cmpq %rbp, %r15
jne 0x3336b
jmp 0x333c1
movq (%r15), %r14
movq (%rsp), %rax
decq 0x20(%rax)
movq %r15, %rdi
callq 0x84d0
movl $0x18, %esi
movq %r15, %rdi
callq 0x82a0
movq %r14, %r15
jmp 0x33395
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: Value::ReplaceAllUseWith(Value*)
void Value::ReplaceAllUseWith(Value *val) {
  auto uses = GetUses();
  for (auto use : uses) {
    use->Set(val);
  }
  MyAssert(!IsUsed());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x10, %rbx
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x34a32
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0x3340e
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0x34a82
jmp 0x333f6
cmpq %rbx, (%rbx)
jne 0x3343f
movq %rsp, %rbx
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x33433
movq (%rdi), %r14
movl $0x18, %esi
callq 0x82a0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x3341e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x5bba2(%rip), %rdi     # 0x8efe8
leaq 0x3ad1b(%rip), %rsi     # 0x6e168
movl $0x8, %edx
callq 0x8330
movq 0x5bb8a(%rip), %rdi     # 0x8efe8
leaq 0x3e07c(%rip), %rsi     # 0x714e1
movl $0xb, %edx
callq 0x8330
movq 0x5bb72(%rip), %rdi     # 0x8efe8
leaq 0x3bf43(%rip), %rsi     # 0x6f3c0
movl $0x1, %edx
callq 0x8330
movq 0x5bb5a(%rip), %rdi     # 0x8efe8
movl $0x24, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
jmp 0x334ac
movq %rax, %rbx
movq %rsp, %r14
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x334cf
movq (%rdi), %r15
movl $0x18, %esi
callq 0x82a0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x334ba
movq %rbx, %rdi
callq 0x8540
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: BinaryOperator::ComputeConstInt(int, int)
int BinaryOperator::ComputeConstInt(int lhs, int rhs) {
  switch (op_) {
    case ADD:
      return lhs + rhs;
    case SUB:
      return lhs - rhs;
    case MUL:
      return lhs * rhs;
    case DIV:
      return lhs / rhs;
    case MOD:
      return lhs % rhs;
    default:
      MyAssert(0);
      break;
  }
  return 0;
}

// Assembly:
movl 0x68(%rdi), %eax
cmpq $0x4, %rax
ja 0x337bd
movl %edx, %ecx
leaq 0x3dbfe(%rip), %rdx     # 0x71390
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
addl %esi, %ecx
jmp 0x337ba
movl %esi, %eax
cltd
idivl %ecx
movl %edx, %ecx
jmp 0x337ba
imull %esi, %ecx
jmp 0x337ba
movl %esi, %eax
cltd
idivl %ecx
movl %eax, %ecx
jmp 0x337ba
subl %ecx, %esi
movl %esi, %ecx
movl %ecx, %eax
retq
pushq %rax
movq 0x5b823(%rip), %rdi     # 0x8efe8
leaq 0x3a99c(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x3dd09(%rip), %rsi     # 0x714e1
movq %rax, %rdi
callq 0x8280
leaq 0x3bbd9(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x61, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: UnaryOperator::ComputeConstInt(int)
int UnaryOperator::ComputeConstInt(int lhs) {
  switch (op_) {
    case NEG:
      return -lhs;
    case NOT:
      return !lhs;
    default:
      MyAssert(0);
      break;
  }
  return 0;
}

// Assembly:
movl 0x68(%rdi), %eax
cmpl $0x1, %eax
je 0x3381e
testl %eax, %eax
jne 0x3382a
negl %esi
jmp 0x33827
xorl %eax, %eax
testl %esi, %esi
sete %al
movl %eax, %esi
movl %esi, %eax
retq
pushq %rax
movq 0x5b7b6(%rip), %rdi     # 0x8efe8
leaq 0x3a92f(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x3dc9c(%rip), %rsi     # 0x714e1
movq %rax, %rdi
callq 0x8280
leaq 0x3bb6c(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x6e, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: BranchInst::ComputeConstInt(int, int)
bool BranchInst::ComputeConstInt(int lhs, int rhs) {
  switch (cond_) {
    case EQ:
      return lhs == rhs;
    case NE:
      return lhs != rhs;
    case GT:
      return lhs > rhs;
    case GE:
      return lhs >= rhs;
    case LT:
      return lhs < rhs;
    case LE:
      return lhs <= rhs;
    default:
      MyAssert(0);
      return false;
  }
}

// Assembly:
movl 0x68(%rdi), %eax
decl %eax
cmpl $0x5, %eax
ja 0x338ba
leaq 0x3db17(%rip), %rcx     # 0x713a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl %edx, %esi
sete %al
retq
cmpl %edx, %esi
setl %al
retq
cmpl %edx, %esi
setg %al
retq
cmpl %edx, %esi
setge %al
retq
cmpl %edx, %esi
setne %al
retq
cmpl %edx, %esi
setle %al
retq
pushq %rax
movq 0x5b726(%rip), %rdi     # 0x8efe8
leaq 0x3a89f(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x3dc0c(%rip), %rsi     # 0x714e1
movq %rax, %rdi
callq 0x8280
leaq 0x3badc(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x83, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: BinaryOperator::Print(std::ostream&)
void BinaryOperator::Print(std::ostream &outfile) {
  std::string op = "";
  switch (op_) {
    case ADD:
      op = "add";
      break;
    case SUB:
      op = "sub";
      break;
    case MUL:
      op = "mul";
      break;
    case DIV:
      op = "div";
      break;
    case MOD:
      op = "mod";
      break;
    default:
      break;
  }
  Value::Print(outfile);
  outfile << std::setw(INDENT) << "=" + op;
  User::Print(outfile);
  outfile << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x39fd4(%rip), %rdx     # 0x6e1c9
movq %rsp, %rdi
movq %rdx, %rsi
callq 0xc772
movl 0x68(%r14), %eax
cmpq $0x5, %rax
jae 0x3422c
leaq 0x3d28f(%rip), %rdx     # 0x714a0
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
movq %rsp, %rdi
movq 0x8(%rdi), %rdx
movl $0x3, %r8d
xorl %esi, %esi
callq 0x8490
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3390c
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
leaq 0x3bde6(%rip), %rsi     # 0x70034
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x25a7d
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x8330
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34288
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x82a0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33bec
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x342d0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82a0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x342ff
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x82a0
jmp 0x342ff
jmp 0x342fc
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x34315
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82a0
movq %rbx, %rdi
callq 0x8540
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: UnaryOperator::Print(std::ostream&)
void UnaryOperator::Print(std::ostream &outfile) {
  std::string op = "";
  switch (op_) {
    case NEG:
      op = "neg";
      break;
    case NOT:
      op = "not";
      break;
    default:
      break;
  }
  Value::Print(outfile);
  outfile << std::setw(INDENT) << "=" + op;
  User::Print(outfile);
  outfile << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x39e8c(%rip), %rdx     # 0x6e1c9
movq %rsp, %rdi
movq %rdx, %rsi
callq 0xc772
movl 0x68(%r14), %eax
testl %eax, %eax
je 0x3435e
cmpl $0x1, %eax
jne 0x34379
leaq 0x3af30(%rip), %rcx     # 0x6f28c
jmp 0x34365
leaq 0x3af23(%rip), %rcx     # 0x6f288
movq %rsp, %rdi
movq 0x8(%rdi), %rdx
movl $0x3, %r8d
xorl %esi, %esi
callq 0x8490
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3390c
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
leaq 0x3bc99(%rip), %rsi     # 0x70034
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x25a7d
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x8330
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x343d5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x82a0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33bec
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3441d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82a0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3444c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x82a0
jmp 0x3444c
jmp 0x34449
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x34462
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82a0
movq %rbx, %rdi
callq 0x8540
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: BranchInst::Print(std::ostream&)
void BranchInst::Print(std::ostream &outfile) {
  std::string cond = "b";
  switch (cond_) {
    case AL:
      cond += "";
      break;
    case EQ:
      cond += "eq";
      break;
    case NE:
      cond += "ne";
      break;
    case GT:
      cond += "gt";
      break;
    case GE:
      cond += "ge";
      break;
    case LT:
      cond += "lt";
      break;
    case LE:
      cond += "le";
      break;
    default:
      break;
  }
  outfile << std::setw(INDENT) << cond;
  User::Print(outfile);
  outfile << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3d446(%rip), %rsi     # 0x718cf
leaq 0x3d440(%rip), %rdx     # 0x718d0
movq %rsp, %rdi
callq 0xc772
movl 0x68(%r14), %eax
cmpq $0x7, %rax
jae 0x344b8
leaq 0x3d00b(%rip), %rcx     # 0x714b4
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
movq %rsp, %rdi
callq 0x8590
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8330
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33bec
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x34521
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x34544
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82a0
movq %rbx, %rdi
callq 0x8540
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: CallInst::Print(std::ostream&)
void CallInst::Print(std::ostream &outfile) {
  std::string prefix = "";
  if (!GetType()->IsVoid()) {
    Value::Print(outfile);
    prefix = "=";
  }
  prefix += "call";
  outfile << std::setw(INDENT) << prefix;
  User::Print(outfile);
  outfile << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x39c5e(%rip), %rdx     # 0x6e1c9
movq %rsp, %rdi
movq %rdx, %rsi
callq 0xc772
movq 0x8(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
jne 0x345aa
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3390c
movq %rsp, %rdi
movq 0x8(%rdi), %rdx
leaq 0x3ba97(%rip), %rcx     # 0x70034
movl $0x1, %r8d
xorl %esi, %esi
callq 0x8490
leaq 0x3ad10(%rip), %rsi     # 0x6f2c1
movq %rsp, %rdi
callq 0x8590
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8330
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33bec
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x34622
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x34645
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82a0
movq %rbx, %rdi
callq 0x8540
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: AllocaInst::Print(std::ostream&)
void AllocaInst::Print(std::ostream &outfile) {
  outfile << std::setw(INDENT) << "alloca";
  // outfile << (dynamic_cast<ArrayType *>(GetType()))->num_elements_;
  User::Print(outfile);
  outfile << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rsi,%rax)
leaq 0x3abf3(%rip), %rsi     # 0x6f2ca
movl $0x6, %edx
movq %rbx, %rdi
callq 0x8330
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33bec
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x81f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: LoadInst::Print(std::ostream&)
void LoadInst::Print(std::ostream &outfile) {
  Value::Print(outfile);
  outfile << std::setw(INDENT) << "=load";
  User::Print(outfile);
  outfile << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3390c
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
leaq 0x3cdce(%rip), %rsi     # 0x71512
movl $0x5, %edx
movq %rbx, %rdi
callq 0x8330
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33bec
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x81f0
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: MovInst::Print(std::ostream&)
void MovInst::Print(std::ostream &outfile) {
  Value::Print(outfile);
  outfile << std::setw(INDENT) << "=mov";
  User::Print(outfile);
  outfile << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3390c
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
leaq 0x3cd06(%rip), %rsi     # 0x7151e
movl $0x4, %edx
movq %rbx, %rdi
callq 0x8330
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33bec
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x81f0
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: PhiInst::Print(std::ostream&)
void PhiInst::Print(std::ostream &outfile) {
  Value::Print(outfile);
  outfile << std::setw(INDENT) << "=phi";
  User::Print(outfile);
  outfile << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3390c
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
leaq 0x3cc9f(%rip), %rsi     # 0x71523
movl $0x4, %edx
movq %rbx, %rdi
callq 0x8330
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33bec
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x81f0
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa.cpp
// Function: Value::~Value()
Value::~Value() {
  auto uses = GetUses();  // necessary. can't use reference
  for (auto use : uses) {
    use->Set(nullptr);  // necessary. when destruct a use instance, must ensure that its value_ is a valid pointer.
  }
  // 并没有删除使用它的那个user的operand 只是让operand的use中的value变为nullptr了
  MyAssert(!IsUsed());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x59b0e(%rip), %rax     # 0x8e3f0
movq %rax, (%rdi)
leaq 0x10(%rdi), %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x34a32
movq 0x10(%rsp), %r13
cmpq %r15, %r13
je 0x34937
leaq 0x8(%rsp), %r12
movq 0x10(%r13), %rbp
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x34926
movq %rbp, 0x8(%rsp)
addq $0x10, %rdi
movq %r12, %rsi
callq 0x34ed2
movq $0x0, (%rbp)
movq (%r13), %r13
cmpq %r15, %r13
jne 0x34908
cmpq %rbx, (%rbx)
jne 0x3499f
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x3495b
movq (%rdi), %r12
movl $0x18, %esi
callq 0x82a0
movq %r12, %rdi
cmpq %r15, %r12
jne 0x34946
movq 0x28(%r14), %rdi
addq $0x38, %r14
cmpq %r14, %rdi
je 0x34973
movq (%r14), %rsi
incq %rsi
callq 0x82a0
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x34990
movq (%rdi), %r14
movl $0x18, %esi
callq 0x82a0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x3497b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5a642(%rip), %rdi     # 0x8efe8
leaq 0x397bb(%rip), %rsi     # 0x6e168
movl $0x8, %edx
callq 0x8330
movq 0x5a62a(%rip), %rdi     # 0x8efe8
leaq 0x3cb1c(%rip), %rsi     # 0x714e1
movl $0xb, %edx
callq 0x8330
movq 0x5a612(%rip), %rdi     # 0x8efe8
leaq 0x3a9e3(%rip), %rsi     # 0x6f3c0
movl $0x1, %edx
callq 0x8330
movq 0x5a5fa(%rip), %rdi     # 0x8efe8
movl $0x2c, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
movq %rax, %rdi
callq 0xc54c
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/../include/ssa.h
// Function: Use::operator=(Use&&)
Use& operator=(Use&& u) {
    user_ = u.GetUser();
    Set(u.Get());
    u.Set(nullptr);
    return *this;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movq (%rsi), %rsi
callq 0x34a82
movq (%r14), %rdi
testq %rdi, %rdi
je 0x352f7
movq %rsp, %rsi
movq %r14, (%rsi)
addq $0x10, %rdi
callq 0x34ed2
movq $0x0, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa_struct.cpp
// Function: SSAFunction::RemoveBasicBlock(SSABasicBlock*)
void SSAFunction::RemoveBasicBlock(SSABasicBlock* bb) {
  bb_list_.remove(bb);
  // TODO: manage memory
  for (auto pred : bb->GetPredBB()) {
    pred->RemoveSuccBB(bb);
  }
  for (auto succ : bb->GetSuccBB()) {
    succ->RemovePredBB(bb);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rsp), %rbx
movq %rsi, (%rbx)
addq $0x30, %rdi
movq %rbx, %rsi
callq 0x36220
movq (%rbx), %r14
leaq 0x40(%r14), %r15
movq 0x40(%r14), %r12
cmpq %r15, %r12
je 0x35579
leaq 0x10(%rsp), %rbx
movq 0x10(%r12), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x58, %rdi
movq %rbx, %rsi
callq 0x36220
movq (%r12), %r12
cmpq %r15, %r12
jne 0x35550
movq 0x8(%rsp), %r14
movq 0x58(%r14), %r15
addq $0x58, %r14
cmpq %r14, %r15
je 0x355ad
leaq 0x10(%rsp), %rbx
movq 0x10(%r15), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x40, %rdi
movq %rbx, %rsi
callq 0x36220
movq (%r15), %r15
cmpq %r14, %r15
jne 0x3558b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa_struct.cpp
// Function: SSAFunction::MaintainCallFunc()
void SSAFunction::MaintainCallFunc() {
  call_func_list_.clear();
  for (auto bb : bb_list_) {
    for (auto inst : bb->GetInstList()) {
      if (auto call_inst = dynamic_cast<CallInst*>(inst)) {
        auto func_val = dynamic_cast<FunctionValue*>(call_inst->GetOperand(0));
        MyAssert(nullptr != func_val);
        call_func_list_.insert(func_val->GetFunction());
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movq %r14, %rdi
callq 0x363da
movq 0x30(%rbx), %rbp
addq $0x30, %rbx
movq %rbx, (%rsp)
cmpq %rbx, %rbp
je 0x35686
leaq 0x58dd5(%rip), %r15     # 0x8e3c8
leaq 0x590c6(%rip), %r12     # 0x8e6c0
movq 0x10(%rbp), %rbx
movq 0x28(%rbx), %r13
addq $0x28, %rbx
cmpq %rbx, %r13
je 0x35678
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x35672
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x8320
testq %rax, %rax
je 0x35672
movq %rax, %rdi
xorl %esi, %esi
callq 0x335d4
testq %rax, %rax
je 0x35695
movq %rax, %rdi
leaq 0x58e41(%rip), %rsi     # 0x8e480
leaq 0x58e92(%rip), %rdx     # 0x8e4d8
xorl %ecx, %ecx
callq 0x8320
testq %rax, %rax
je 0x35695
movq 0x60(%rax), %rax
movq %rax, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x36722
movq (%r13), %r13
jmp 0x35606
movq (%rbp), %rbp
cmpq (%rsp), %rbp
jne 0x355fa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5994c(%rip), %rdi     # 0x8efe8
leaq 0x38ac5(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x3be7f(%rip), %rsi     # 0x7152e
movq %rax, %rdi
callq 0x8280
leaq 0x39d02(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x38, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa_struct.cpp
// Function: SSAFunction::~SSAFunction()
SSAFunction::~SSAFunction() {
  // m_ = nullptr;
  // delete value_; // FIXME: should be delete and remove all use
  for (auto bb : bb_list_) delete bb;
  // bb_list_.clear();
  // call_func_list_.clear();
  // used_glob_var_list_.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rdi), %r15
movq 0x30(%rdi), %r12
cmpq %r15, %r12
je 0x359b9
movq 0x10(%r12), %r14
testq %r14, %r14
je 0x359a6
movq %r14, %rdi
callq 0x35b58
movl $0xd0, %esi
movq %r14, %rdi
callq 0x82a0
movq (%r12), %r12
jmp 0x3598f
leaq 0x80(%rbx), %rdi
callq 0x36344
leaq 0x48(%rbx), %rdi
callq 0x363b4
movq 0x30(%rbx), %rdi
cmpq %r15, %rdi
je 0x359ec
movq (%rdi), %r14
movl $0x18, %esi
callq 0x82a0
movq %r14, %rdi
cmpq %r15, %r14
jne 0x359d7
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x35a0e
movq (%rbx), %rsi
incq %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x82a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa_struct.cpp
// Function: SSABasicBlock::GetNextBB()
SSABasicBlock* SSABasicBlock::GetNextBB() {
  // maybe return nullptr
  auto& bb_list = func_->GetBBList();
  auto it = ++std::find(bb_list.begin(), bb_list.end(), this);
  if (it == bb_list.end())
    return nullptr;
  else
    return *it;
}

// Assembly:
movq (%rdi), %rax
movq 0x30(%rax), %rcx
addq $0x30, %rax
cmpq %rax, %rcx
je 0x35a35
cmpq %rdi, 0x10(%rcx)
je 0x35a35
movq (%rcx), %rcx
jmp 0x35a25
movq (%rcx), %rcx
cmpq %rax, %rcx
je 0x35a42
movq 0x10(%rcx), %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa_struct.cpp
// Function: SSABasicBlock::GetDomSet()
std::unordered_set<SSABasicBlock*> SSABasicBlock::GetDomSet() {
  // all ancestor in dom tree, including itself
  std::unordered_set<SSABasicBlock*> res;
  auto temp = this;
  while (nullptr != temp) {
    res.insert(temp);
    temp = temp->GetIDom();
  }
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movq $0x1, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0x3f800000, 0x20(%rdi) # imm = 0x3F800000
movups %xmm0, 0x28(%rdi)
movq %rsp, %r14
movq %rsi, (%r14)
leaq 0x8(%rsp), %r15
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x36494
movq (%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x35b14
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x36424
movq %r14, %rdi
callq 0x8540
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa_struct.cpp
// Function: SSABasicBlock::~SSABasicBlock()
SSABasicBlock::~SSABasicBlock() {
  // func_ = nullptr;
  // delete value_; // FIXME: should be delete and remove all use
  for (auto inst : inst_list_) {
    delete inst;
    // std::cout << "ok\n";
  }
  // inst_list_.clear();
  // pred_.clear();
  // succ_.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq 0x28(%rdi), %r15
cmpq %r14, %r15
je 0x35b84
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x35b7f
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r15), %r15
jmp 0x35b6b
leaq 0x90(%rbx), %rdi
callq 0x36424
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x35ba8
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
callq 0x82a0
leaq 0x58(%rbx), %r15
movq 0x58(%rbx), %rdi
cmpq %r15, %rdi
je 0x35bca
movq (%rdi), %r12
movl $0x18, %esi
callq 0x82a0
movq %r12, %rdi
cmpq %r15, %r12
jne 0x35bb5
leaq 0x40(%rbx), %r15
movq 0x40(%rbx), %rdi
cmpq %r15, %rdi
je 0x35bec
movq (%rdi), %r12
movl $0x18, %esi
callq 0x82a0
movq %r12, %rdi
cmpq %r15, %r12
jne 0x35bd7
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x35c09
movq (%rdi), %r15
movl $0x18, %esi
callq 0x82a0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x35bf4
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x35c2c
movq (%rbx), %rsi
incq %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x82a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa_struct.cpp
// Function: SSAModule::EmitCode(std::ostream&)
void SSAModule::EmitCode(std::ostream& out) {
  for (auto glob : glob_var_list_) {
    glob->Print(out);
  }
  out << std::endl;
  // for (auto func : builtin_func_list_) {
  //   func->EmitCode(out);
  //   out << std::endl;
  // }
  for (auto func : func_list_) {
    func->EmitCode(out);
    out << std::endl;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rdi), %r15
movq 0x28(%rdi), %r12
cmpq %r15, %r12
je 0x35c67
movq 0x10(%r12), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
movq (%r12), %r12
jmp 0x35c4e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x40(%r14), %r15
addq $0x40, %r14
cmpq %r14, %r15
je 0x35cd3
movq 0x10(%r15), %rdi
movq %rbx, %rsi
callq 0x35ce0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq (%r15), %r15
jmp 0x35c96
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ssa_struct.cpp
// Function: SSABasicBlock::EmitCode(std::ostream&)
void SSABasicBlock::EmitCode(std::ostream& out) {
  out << label_ << ":" << std::endl;
  out << "; BB Begin:" << std::endl;
  for (auto inst : inst_list_) {
    inst->Print(out);
  }
  out << "; BB End." << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdx
movq %rbx, %rdi
callq 0x8330
movq %rax, %r15
leaq 0x39393(%rip), %rsi     # 0x6f3c0
movl $0x1, %edx
movq %rax, %rdi
callq 0x8330
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r15, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
leaq 0x3b536(%rip), %rsi     # 0x7159e
movl $0xb, %edx
movq %rbx, %rdi
callq 0x8330
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x28(%r14), %r15
addq $0x28, %r14
cmpq %r14, %r15
je 0x360bb
movq 0x10(%r15), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
movq (%r15), %r15
jmp 0x360a4
leaq 0x3b4e8(%rip), %rsi     # 0x715aa
movl $0x9, %edx
movq %rbx, %rdi
callq 0x8330
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x81f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/Pass/allocate_register.cpp
// Function: RegAlloc::ValidAdjacentSet(int, std::unordered_map<int, std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>>, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>>>>>&, std::vector<int, std::allocator<int>>&, std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>>&)
RegAlloc::WorkList RegAlloc::ValidAdjacentSet(RegId reg, AdjList &adj_list, std::vector<RegId> &select_stack,
                                              WorkList &coalesced_nodes) {
  WorkList valid_adjacent = adj_list[reg];
  // outfile << valid_adjacent.size() << std::endl;
  for (auto iter = valid_adjacent.begin(); iter != valid_adjacent.end();) {
    // outfile << *iter << std::endl;
    // NOTE: erase
    if (std::find(select_stack.begin(), select_stack.end(), *iter) == select_stack.end() &&
        coalesced_nodes.find(*iter) == coalesced_nodes.end()) {
      ++iter;
    } else {
      iter = valid_adjacent.erase(iter);
    }
    // dbg_print_worklist(valid_adjacent, outfile);
  }
  return valid_adjacent;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
movq %rcx, %rdi
callq 0x3b01c
xorl %ecx, %ecx
movq %rcx, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
movq 0x18(%rax), %rdx
movq %rdx, 0x18(%rbx)
movups 0x20(%rax), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rcx, 0x30(%rbx)
leaq 0x8(%rsp), %rdx
movq %rbx, (%rdx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x39576
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x36e02
movq (%r15), %rdi
movq 0x8(%r15), %rsi
leaq 0x8(%r12), %r13
movq %r13, %rdx
callq 0x3b30f
cmpq 0x8(%r15), %rax
jne 0x36dec
movq %r14, %rdi
movq %r13, %rsi
callq 0x3b3b4
testq %rax, %rax
je 0x36dfc
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3b410
movq %rax, %r12
jmp 0x36dbd
movq (%r12), %r12
jmp 0x36dbd
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x36e17
jmp 0x36e17
movq %rax, %r14
movq %rbx, %rdi
callq 0x396fe
movq %r14, %rdi
callq 0x8540
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/Pass/arm_liveness_analysis.cpp
// Function: ArmLivenessAnalysis::Run()
void ArmLivenessAnalysis::Run() {
  auto m = dynamic_cast<ArmModule *>(*(this->m_));
  MyAssert(nullptr != m);
  for (auto func : m->func_list_) {
    this->Run4Func(func);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3c82d
leaq 0x50e51(%rip), %rsi     # 0x8d648
leaq 0x50e32(%rip), %rdx     # 0x8d630
xorl %ecx, %ecx
callq 0x8320
testq %rax, %rax
je 0x3c82d
movq 0x28(%rax), %rbx
movq 0x30(%rax), %r14
cmpq %r14, %rbx
je 0x3c825
movq (%rbx), %rdi
callq 0x3c4e4
addq $0x8, %rbx
jmp 0x3c812
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x527b4(%rip), %rdi     # 0x8efe8
leaq 0x3192d(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x34db2(%rip), %rsi     # 0x715f9
movq %rax, %rdi
callq 0x8280
leaq 0x32b6a(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0xd5, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/Pass/arm_offset_fixup.cpp
// Function: SPOffsetFixup::Run()
void SPOffsetFixup::Run() {
  auto m = dynamic_cast<ArmModule *>(*(this->m_));
  MyAssert(nullptr != m);
  for (auto func : m->func_list_) {
    Fixup4Func(func);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3d111
leaq 0x5056d(%rip), %rsi     # 0x8d648
leaq 0x5054e(%rip), %rdx     # 0x8d630
xorl %ecx, %ecx
callq 0x8320
testq %rax, %rax
je 0x3d111
movq 0x28(%rax), %rbx
movq 0x30(%rax), %r14
cmpq %r14, %rbx
je 0x3d109
movq (%rbx), %rsi
callq 0x3d162
addq $0x8, %rbx
jmp 0x3d0f6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x51ed0(%rip), %rdi     # 0x8efe8
leaq 0x31049(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x34511(%rip), %rsi     # 0x7163c
movq %rax, %rdi
callq 0x8280
leaq 0x32286(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0xd, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/Pass/cond_br_to_insts.cpp
// Function: CondBrToInsts::Run()
void CondBrToInsts::Run() {
  kCount = 0;
  auto m = dynamic_cast<ArmModule*>(*(this->m_));
  MyAssert(nullptr != m);
  for (auto func : m->func_list_) {
    Run4Func(func);
  }
#ifdef OUTPUT_CONDBRTOINSTS_EFFECT
  std::cout << "CondBrToInsts Pass works on: " << kCount << " ArmBBs" << std::endl;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x0, 0x5189a(%rip)     # 0x8f6d4
movq 0x8(%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3de83
leaq 0x4f7fb(%rip), %rsi     # 0x8d648
leaq 0x4f7dc(%rip), %rdx     # 0x8d630
xorl %ecx, %ecx
callq 0x8320
testq %rax, %rax
je 0x3de83
movq 0x28(%rax), %rbx
movq 0x30(%rax), %r14
cmpq %r14, %rbx
je 0x3de7b
movq (%rbx), %rsi
callq 0x3ded4
addq $0x8, %rbx
jmp 0x3de68
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x5115e(%rip), %rdi     # 0x8efe8
leaq 0x302d7(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x337cd(%rip), %rsi     # 0x7166a
movq %rax, %rdi
callq 0x8280
leaq 0x31514(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x13, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/Pass/convert_ssa.cpp
// Function: ConvertSSA::Run()
void ConvertSSA::Run() {
  auto m = dynamic_cast<IRModule*>(*(this->m_));
  MyAssert(nullptr != m);
  for (auto f : m->func_list_) {
    InsertPhiIR(f);
    // f->EmitCode(std::cout);
    this->count_.clear();
    this->stack_.clear();
    Rename(f->bb_list_.front());
  }
  // m->EmitCode();
  auto ssam = this->ConstructSSA(m);
  *(this->m_) = static_cast<Module*>(ssam);
  delete m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3f5a2
leaq 0x4e133(%rip), %rsi     # 0x8d648
leaq 0x4eb54(%rip), %rdx     # 0x8e070
xorl %ecx, %ecx
callq 0x8320
testq %rax, %rax
je 0x3f5a2
movq 0x28(%rax), %rbp
movq %rax, (%rsp)
movq 0x30(%rax), %r14
cmpq %r14, %rbp
je 0x3f575
leaq 0x38(%rbx), %r15
leaq 0x70(%rbx), %r12
movq (%rbp), %r13
movq %r13, %rsi
callq 0x3f5f2
movq %r15, %rdi
callq 0x45d56
movq %r12, %rdi
callq 0x4621e
movq 0x30(%r13), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x3f9f4
addq $0x8, %rbp
cmpq %r14, %rbp
jne 0x3f541
movq %rbx, %rdi
movq (%rsp), %r14
movq %r14, %rsi
callq 0x40358
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq (%r14), %rax
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
movq 0x4fa3f(%rip), %rdi     # 0x8efe8
leaq 0x2ebb8(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x321ec(%rip), %rsi     # 0x717a8
movq %rax, %rdi
callq 0x8280
leaq 0x2fdf5(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x10, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/Pass/convert_ssa.cpp
// Function: ConvertSSA::FindValueFromCompName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
Value* ConvertSSA::FindValueFromCompName(const std::string& comp_name, bool is_global) {
  if (is_global) {
    auto it = glob_map.find(comp_name);
    if (it != glob_map.end()) return (*it).second;
  } else {
    auto it = work_map.find(comp_name);
    if (it != work_map.end()) return (*it).second;
  }
  return nullptr;
}

// Assembly:
pushq %rax
testl %edx, %edx
je 0x407f2
addq $0xe0, %rdi
jmp 0x407f9
addq $0xa8, %rdi
callq 0x462be
testq %rax, %rax
je 0x40809
movq 0x28(%rax), %rax
jmp 0x4080b
xorl %eax, %eax
popq %rcx
retq
nop