// File: luooofan[P]hblzbd_compiler/src/Pass/ssa_simple_optimize.cpp
// Function: SimpleOptimize::Run()
void SimpleOptimize::Run() {
  kCount = 0;
  auto m = dynamic_cast<SSAModule*>(*(this->m_));
  MyAssert(nullptr != m);
  std::unordered_set<SSAInstruction*> worklist;
#ifdef DEBUG_SIMPLE_OPTIMIZE_PROCESS
  std::cout << "SimpleOptimize :" << std::endl;
#endif
  for (auto func : m->GetFuncList()) {
    for (auto bb : func->GetBasicBlocks()) {
      for (auto inst : bb->GetInstList()) {
        worklist.insert(inst);
      }
    }
  }

  auto replace = [&worklist](SSAInstruction* from, SSAInstruction* to) {
#ifdef DEBUG_SIMPLE_OPTIMIZE_PROCESS
    std::cout << "Convert :", from->Print(std::cout);
    std::cout << "      ==>", to->Print(std::cout);
#endif
    from->ReplaceAllUseWith(to);
    worklist.insert(to);
    from->Remove();
    delete from;
  };

  while (!worklist.empty()) {
    auto inst = *worklist.begin();
    MyAssert(nullptr != inst);
    worklist.erase(inst);
    // 如果phi语句的参数全是一个常数 或者phi语句只有一个参数
    // NOTE HERE!!! 应该不用考虑phi指令间的并行赋值 会打破phi指令一定是bb中最前面几条的性质
    if (auto src_inst = dynamic_cast<PhiInst*>(inst)) {
      // 考虑只有一个参数
      if (2 == src_inst->GetNumOperands()) {
        ++kCount;
        auto mov_inst = new MovInst(src_inst->GetType(), src_inst->GetName(), src_inst->GetOperand(0), src_inst);
        replace(src_inst, mov_inst);
        continue;
      }
      // 考虑参数全是常数
      auto constint = dynamic_cast<ConstantInt*>(src_inst->GetOperand(0));
      if (nullptr == constint) continue;
      int i = 2;
      for (; i < src_inst->GetNumOperands(); i += 2) {
        auto operand = src_inst->GetOperand(i);
        auto constint2 = dynamic_cast<ConstantInt*>(operand);
        if (nullptr == constint2) break;
        if (constint2->GetImm() != constint->GetImm()) break;
      }
      if (i == src_inst->GetNumOperands()) {
        auto mov_inst = new MovInst(src_inst->GetType(), src_inst->GetName(), constint, src_inst);
        replace(src_inst, mov_inst);
        ++kCount;
        continue;
      }
    }
    // 如果是一条mov语句 该mov可删 用其操作数代替它自己
    else if (auto src_inst = dynamic_cast<MovInst*>(inst)) {
      ++kCount;
#ifdef DEBUG_SIMPLE_OPTIMIZE_PROCESS
      std::cout << "Remove :", src_inst->Print(std::cout);
#endif
      // 把所有使用该value的加入工作表 实际上只加入mov和phi语句即可
      for (auto use : src_inst->GetUses()) {
        worklist.insert(dynamic_cast<SSAInstruction*>(use->GetUser()));
      }
      src_inst->ReplaceAllUseWith(src_inst->GetOperand(0));
      src_inst->Remove();  // 从基本块中移除
      delete src_inst;
    }
    // 如果是二元运算语句 并且两个操作数都是常数 则转化为一条mov语句
    else if (auto src_inst = dynamic_cast<BinaryOperator*>(inst)) {
      // TODO: 如果有一个数是常数并且为0 并且操作符是mul div mod那么直接转为一条mov语句即可
      auto const_lhs = dynamic_cast<ConstantInt*>(src_inst->GetOperand(0));
      auto const_rhs = dynamic_cast<ConstantInt*>(src_inst->GetOperand(1));
      if (nullptr == const_lhs && nullptr == const_rhs) continue;
      MovInst* mov_inst = nullptr;
      if (nullptr != const_lhs && 0 == const_lhs->GetImm() &&
          (src_inst->op_ == BinaryOperator::DIV || src_inst->op_ == BinaryOperator::MOD ||
           src_inst->op_ == BinaryOperator::MUL)) {
        new MovInst(src_inst->GetType(), src_inst->GetName(), new ConstantInt(0), src_inst);
      } else if (nullptr != const_rhs && 0 == const_rhs->GetImm() && src_inst->op_ == BinaryOperator::MUL) {
        new MovInst(src_inst->GetType(), src_inst->GetName(), new ConstantInt(0), src_inst);
      } else if (nullptr != const_lhs && nullptr != const_rhs) {
        int res = src_inst->ComputeConstInt(const_lhs->GetImm(), const_rhs->GetImm());
        new MovInst(src_inst->GetType(), src_inst->GetName(), new ConstantInt(res), src_inst);
      }
      if (nullptr != mov_inst) {
        ++kCount;
        replace(src_inst, mov_inst);
      }
    }
    // 如果是一元运算语句 并且操作数是常数 则转化为一条mov语句
    else if (auto src_inst = dynamic_cast<UnaryOperator*>(inst)) {
      auto const_lhs = dynamic_cast<ConstantInt*>(src_inst->GetOperand(0));
      if (nullptr == const_lhs) continue;
      ++kCount;
      int res = src_inst->ComputeConstInt(const_lhs->GetImm());
      auto mov_inst = new MovInst(src_inst->GetType(), src_inst->GetName(), new ConstantInt(res), src_inst);
      replace(src_inst, mov_inst);
    }
    // 如果是条件跳转语句 并且两个操作数都是立即数 可转换为无条件跳转或者删除
    // NOTE: 还必须修改基本块的前驱后继关系
    else if (auto src_inst = dynamic_cast<BranchInst*>(inst)) {
      if (3 == src_inst->GetNumOperands()) {
        auto const_lhs = dynamic_cast<ConstantInt*>(src_inst->GetOperand(0));
        if (nullptr == const_lhs) continue;
        auto const_rhs = dynamic_cast<ConstantInt*>(src_inst->GetOperand(1));
        if (nullptr == const_rhs) continue;
        auto bb_val = dynamic_cast<BasicBlockValue*>(src_inst->GetOperand(2));
        MyAssert(nullptr != bb_val);
        auto bb = src_inst->GetParent(), target_bb = bb_val->GetBB();
        // continue;
        if (src_inst->ComputeConstInt(const_lhs->GetImm(), const_rhs->GetImm())) {
          ++kCount;
          // 条件判断永远为真 转换为无条件跳转
          auto new_inst = new BranchInst(bb_val, src_inst);
#ifdef DEBUG_SIMPLE_OPTIMIZE_PROCESS
          std::cout << "Convert :", src_inst->Print(std::cout);
          std::cout << "      ==>", new_inst->Print(std::cout);
#endif
          auto next_bb = bb->GetNextBB();
          MyAssert(nullptr != next_bb);
          bb->RemoveSuccBB(next_bb);
          next_bb->RemovePredBB(bb);
          // 修复next bb中的phi指令
          for (auto inst : next_bb->GetInstList()) {
            auto phi_inst = dynamic_cast<PhiInst*>(inst);
            if (nullptr == phi_inst) break;
            for (int i = 1; i < phi_inst->GetNumOperands(); i += 2) {
              auto bb_val = dynamic_cast<BasicBlockValue*>(phi_inst->GetOperand(i));
              MyAssert(nullptr != bb_val);
              if (bb_val->GetBB() == bb) {
                // NOTE: order and break
                phi_inst->RemoveOperand(i);
                phi_inst->RemoveOperand(i - 1);
                break;
              }
            }
          }
          src_inst->Remove();
          delete src_inst;
        } else {
          ++kCount;
          // 条件判断永远为假 直接删除
#ifdef DEBUG_SIMPLE_OPTIMIZE_PROCESS
          std::cout << "Remove :", src_inst->Print(std::cout);
#endif
          target_bb->RemovePredBB(bb);
          bb->RemoveSuccBB(target_bb);
          // 修复target bb中的phi指令
          for (auto inst : target_bb->GetInstList()) {
            auto phi_inst = dynamic_cast<PhiInst*>(inst);
            if (nullptr == phi_inst) break;
            for (int i = 1; i < phi_inst->GetNumOperands(); i += 2) {
              auto bb_val = dynamic_cast<BasicBlockValue*>(phi_inst->GetOperand(i));
              MyAssert(nullptr != bb_val);
              if (bb_val->GetBB() == bb) {
                // NOTE: order and break
                phi_inst->RemoveOperand(i);
                phi_inst->RemoveOperand(i - 1);
                break;
              }
            }
          }
          src_inst->Remove();
          delete src_inst;
        }
      }
    }
  }
#ifdef DEBUG_SIMPLE_OPTIMIZE_EFFECT
  std::cout << "SSA_SIMPLE_OPTIMIZE Pass works on " << kCount << " insts" << std::endl;
#endif
}

// Assembly:
subq $0x618, %rsp            # imm = 0x618
movq %rdi, 0x610(%rsp)
movq 0x610(%rsp), %rax
movl $0x0, 0x54c7f(%rip)     # 0x14c810
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, 0x3c0(%rsp)
cmpq $0x0, %rax
je 0xf7bcf
movq 0x3c0(%rsp), %rdi
leaq 0x52a23(%rip), %rsi     # 0x14a5d8
leaq 0x53d94(%rip), %rdx     # 0x14b950
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x3b8(%rsp)
jmp 0xf7bdb
xorl %eax, %eax
movq %rax, 0x3b8(%rsp)
jmp 0xf7bdb
movq 0x3b8(%rsp), %rax
movq %rax, 0x608(%rsp)
xorl %eax, %eax
cmpq 0x608(%rsp), %rax
jne 0xf7c4e
movq 0x543ea(%rip), %rdi     # 0x14bfe8
leaq 0x24f3(%rip), %rsi      # 0xfa0f8
callq 0x8330
movq %rax, %rdi
leaq 0x6020(%rip), %rsi      # 0xfdc34
callq 0x8330
movq %rax, %rdi
leaq 0x37c7(%rip), %rsi      # 0xfb3ea
callq 0x8330
movq %rax, %rdi
movl $0x10, %esi
callq 0x8650
movq %rax, %rdi
movq 0x54341(%rip), %rsi     # 0x14bf80
callq 0x8380
movl $0xff, %edi
callq 0x8460
leaq 0x5d0(%rsp), %rdi
callq 0xa0f80
movq 0x608(%rsp), %rdi
callq 0xa0ee0
movq %rax, 0x3b0(%rsp)
jmp 0xf7c72
movq 0x3b0(%rsp), %rax
movq %rax, 0x5c8(%rsp)
movq 0x5c8(%rsp), %rdi
callq 0x624d0
movq %rax, 0x5b0(%rsp)
movq 0x5c8(%rsp), %rdi
callq 0x62500
movq %rax, 0x5a8(%rsp)
leaq 0x5b0(%rsp), %rdi
leaq 0x5a8(%rsp), %rsi
callq 0x62530
testb $0x1, %al
jne 0xf7cca
jmp 0xf7e87
leaq 0x5b0(%rsp), %rdi
callq 0x62550
movq (%rax), %rax
movq %rax, 0x5a0(%rsp)
movq 0x5a0(%rsp), %rdi
callq 0xa0f90
movq %rax, 0x3a8(%rsp)
jmp 0xf7cf9
movq 0x3a8(%rsp), %rax
movq %rax, 0x598(%rsp)
movq 0x598(%rsp), %rdi
callq 0x62720
movq %rax, 0x590(%rsp)
movq 0x598(%rsp), %rdi
callq 0x62750
movq %rax, 0x588(%rsp)
leaq 0x590(%rsp), %rdi
leaq 0x588(%rsp), %rsi
callq 0x62780
testb $0x1, %al
jne 0xf7d51
jmp 0xf7e73
leaq 0x590(%rsp), %rdi
callq 0x627a0
movq (%rax), %rax
movq %rax, 0x580(%rsp)
movq 0x580(%rsp), %rdi
callq 0x62860
movq %rax, 0x3a0(%rsp)
jmp 0xf7d80
movq 0x3a0(%rsp), %rax
movq %rax, 0x578(%rsp)
movq 0x578(%rsp), %rdi
callq 0x62870
movq %rax, 0x570(%rsp)
movq 0x578(%rsp), %rdi
callq 0x628a0
movq %rax, 0x568(%rsp)
leaq 0x570(%rsp), %rdi
leaq 0x568(%rsp), %rsi
callq 0x628d0
testb $0x1, %al
jne 0xf7dd8
jmp 0xf7e5f
leaq 0x570(%rsp), %rdi
callq 0x628f0
movq (%rax), %rax
movq %rax, 0x560(%rsp)
leaq 0x5d0(%rsp), %rdi
leaq 0x560(%rsp), %rsi
callq 0xa1090
movb %dl, 0x397(%rsp)
movq %rax, 0x398(%rsp)
jmp 0xf7e16
movb 0x397(%rsp), %al
movq 0x398(%rsp), %rcx
movq %rcx, 0x550(%rsp)
movb %al, 0x558(%rsp)
leaq 0x570(%rsp), %rdi
callq 0x62960
jmp 0xf7dba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
jmp 0xf991c
jmp 0xf7e61
leaq 0x590(%rsp), %rdi
callq 0x627f0
jmp 0xf7d33
jmp 0xf7e75
leaq 0x5b0(%rsp), %rdi
callq 0x62570
jmp 0xf7cac
leaq 0x5d0(%rsp), %rax
movq %rax, 0x548(%rsp)
leaq 0x5d0(%rsp), %rdi
callq 0xa0fe0
xorb $-0x1, %al
testb $0x1, %al
jne 0xf7eaf
jmp 0xf9907
leaq 0x5d0(%rsp), %rdi
callq 0xa1000
movq %rax, 0x538(%rsp)
leaq 0x538(%rsp), %rdi
callq 0xa1030
movq (%rax), %rax
movq %rax, 0x540(%rsp)
xorl %eax, %eax
cmpq 0x540(%rsp), %rax
jne 0xf7f81
movq 0x540f5(%rip), %rdi     # 0x14bfe8
leaq 0x21fe(%rip), %rsi      # 0xfa0f8
callq 0x8330
movq %rax, 0x388(%rsp)
jmp 0xf7f09
movq 0x388(%rsp), %rdi
leaq 0x5d1c(%rip), %rsi      # 0xfdc34
callq 0x8330
movq %rax, 0x380(%rsp)
jmp 0xf7f27
movq 0x380(%rsp), %rdi
leaq 0x34b4(%rip), %rsi      # 0xfb3ea
callq 0x8330
movq %rax, 0x378(%rsp)
jmp 0xf7f45
movq 0x378(%rsp), %rdi
movl $0x2a, %esi
callq 0x8650
movq %rax, 0x370(%rsp)
jmp 0xf7f61
movq 0x370(%rsp), %rdi
movq 0x54010(%rip), %rsi     # 0x14bf80
callq 0x8380
jmp 0xf7f77
movl $0xff, %edi
callq 0x8460
leaq 0x5d0(%rsp), %rdi
leaq 0x540(%rsp), %rsi
callq 0xa1050
jmp 0xf7f98
movq 0x540(%rsp), %rax
movq %rax, 0x368(%rsp)
cmpq $0x0, %rax
je 0xf7fd7
movq 0x368(%rsp), %rdi
leaq 0x5345b(%rip), %rsi     # 0x14b418
leaq 0x538cc(%rip), %rdx     # 0x14b890
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x360(%rsp)
jmp 0xf7fe3
xorl %eax, %eax
movq %rax, 0x360(%rsp)
jmp 0xf7fe3
movq 0x360(%rsp), %rax
movq %rax, 0x530(%rsp)
cmpq $0x0, 0x530(%rsp)
je 0xf83f2
movq 0x530(%rsp), %rdi
callq 0x5e580
movl %eax, 0x35c(%rsp)
jmp 0xf8018
movl 0x35c(%rsp), %ecx
movl $0x2, %eax
cmpl %ecx, %eax
jne 0xf8123
movl 0x547de(%rip), %eax     # 0x14c810
incl %eax
movl %eax, 0x547d6(%rip)     # 0x14c810
movl $0x68, %edi
callq 0x8340
movq %rax, 0x350(%rsp)
jmp 0xf804e
movq 0x530(%rsp), %rdi
callq 0x5e940
movq %rax, 0x348(%rsp)
jmp 0xf8065
movq 0x530(%rsp), %rdi
callq 0x5e770
movq %rax, 0x340(%rsp)
jmp 0xf807c
movq 0x530(%rsp), %rdi
xorl %esi, %esi
callq 0x5c850
movq %rax, 0x338(%rsp)
jmp 0xf8095
movq 0x338(%rsp), %rcx
movq 0x340(%rsp), %rdx
movq 0x348(%rsp), %rsi
movq 0x350(%rsp), %rdi
movq 0x530(%rsp), %r8
callq 0xf99b0
jmp 0xf80c4
movq 0x350(%rsp), %rax
movq %rax, 0x528(%rsp)
movq 0x530(%rsp), %rsi
movq 0x528(%rsp), %rdx
leaq 0x548(%rsp), %rdi
callq 0xf9940
jmp 0xf80f3
jmp 0xf7e97
movq 0x350(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
movl $0x68, %esi
callq 0x8350
jmp 0xf991c
movq 0x530(%rsp), %rdi
xorl %esi, %esi
callq 0x5c850
movq %rax, 0x330(%rsp)
jmp 0xf813c
movq 0x330(%rsp), %rax
cmpq $0x0, %rax
je 0xf8173
movq 0x330(%rsp), %rdi
leaq 0x53377(%rip), %rsi     # 0x14b4d0
leaq 0x53398(%rip), %rdx     # 0x14b4f8
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x328(%rsp)
jmp 0xf817f
xorl %eax, %eax
movq %rax, 0x328(%rsp)
jmp 0xf817f
movq 0x328(%rsp), %rax
movq %rax, 0x520(%rsp)
xorl %eax, %eax
cmpq 0x520(%rsp), %rax
jne 0xf81a0
jmp 0xf7e97
movl $0x2, 0x51c(%rsp)
movl 0x51c(%rsp), %eax
movl %eax, 0x320(%rsp)
movq 0x530(%rsp), %rdi
callq 0x5e580
movl %eax, 0x324(%rsp)
jmp 0xf81cf
movl 0x320(%rsp), %eax
movl 0x324(%rsp), %ecx
cmpl %ecx, %eax
jae 0xf82d4
movq 0x530(%rsp), %rdi
movl 0x51c(%rsp), %esi
callq 0x5c850
movq %rax, 0x318(%rsp)
jmp 0xf8203
movq 0x318(%rsp), %rax
movq %rax, 0x510(%rsp)
movq 0x510(%rsp), %rax
movq %rax, 0x310(%rsp)
cmpq $0x0, %rax
je 0xf8252
movq 0x310(%rsp), %rdi
leaq 0x53298(%rip), %rsi     # 0x14b4d0
leaq 0x532b9(%rip), %rdx     # 0x14b4f8
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x308(%rsp)
jmp 0xf825e
xorl %eax, %eax
movq %rax, 0x308(%rsp)
jmp 0xf825e
movq 0x308(%rsp), %rax
movq %rax, 0x508(%rsp)
xorl %eax, %eax
cmpq 0x508(%rsp), %rax
jne 0xf827c
jmp 0xf82d4
movq 0x508(%rsp), %rdi
callq 0x5e800
movl %eax, 0x304(%rsp)
jmp 0xf8292
movq 0x520(%rsp), %rdi
callq 0x5e800
movl %eax, 0x300(%rsp)
jmp 0xf82a8
movl 0x304(%rsp), %eax
movl 0x300(%rsp), %ecx
cmpl %ecx, %eax
je 0xf82bc
jmp 0xf82d4
jmp 0xf82be
movl 0x51c(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x51c(%rsp)
jmp 0xf81ab
movl 0x51c(%rsp), %eax
movl %eax, 0x2f8(%rsp)
movq 0x530(%rsp), %rdi
callq 0x5e580
movl %eax, 0x2fc(%rsp)
jmp 0xf82f8
movl 0x2f8(%rsp), %eax
movl 0x2fc(%rsp), %ecx
cmpl %ecx, %eax
jne 0xf83ed
movl $0x68, %edi
callq 0x8340
movq %rax, 0x2f0(%rsp)
jmp 0xf8322
movq 0x530(%rsp), %rdi
callq 0x5e940
movq %rax, 0x2e8(%rsp)
jmp 0xf8339
movq 0x530(%rsp), %rdi
callq 0x5e770
movq %rax, 0x2e0(%rsp)
jmp 0xf8350
movq 0x2e0(%rsp), %rdx
movq 0x2e8(%rsp), %rsi
movq 0x2f0(%rsp), %rdi
movq 0x520(%rsp), %rcx
movq 0x530(%rsp), %r8
callq 0xf99b0
jmp 0xf837f
movq 0x2f0(%rsp), %rax
movq %rax, 0x500(%rsp)
movq 0x530(%rsp), %rsi
movq 0x500(%rsp), %rdx
leaq 0x548(%rsp), %rdi
callq 0xf9940
jmp 0xf83ae
movl 0x5445c(%rip), %eax     # 0x14c810
addl $0x1, %eax
movl %eax, 0x54453(%rip)     # 0x14c810
jmp 0xf7e97
movq 0x2f0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
movl $0x68, %esi
callq 0x8350
jmp 0xf991c
jmp 0xf9902
movq 0x540(%rsp), %rax
movq %rax, 0x2d8(%rsp)
cmpq $0x0, %rax
je 0xf8431
movq 0x2d8(%rsp), %rdi
leaq 0x53001(%rip), %rsi     # 0x14b418
leaq 0x53432(%rip), %rdx     # 0x14b850
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x2d0(%rsp)
jmp 0xf843d
xorl %eax, %eax
movq %rax, 0x2d0(%rsp)
jmp 0xf843d
movq 0x2d0(%rsp), %rax
movq %rax, 0x4f8(%rsp)
cmpq $0x0, 0x4f8(%rsp)
je 0xf8621
movl 0x543ae(%rip), %eax     # 0x14c810
incl %eax
movl %eax, 0x543a6(%rip)     # 0x14c810
movq 0x4f8(%rsp), %rdi
callq 0x5e2d0
movq %rax, 0x2c8(%rsp)
jmp 0xf8481
movq 0x2c8(%rsp), %rax
movq %rax, 0x4f0(%rsp)
movq 0x4f0(%rsp), %rdi
callq 0x5e160
movq %rax, 0x4e8(%rsp)
movq 0x4f0(%rsp), %rdi
callq 0x5e1b0
movq %rax, 0x4e0(%rsp)
leaq 0x4e8(%rsp), %rdi
leaq 0x4e0(%rsp), %rsi
callq 0x5e190
testb $0x1, %al
jne 0xf84d9
jmp 0xf85b1
leaq 0x4e8(%rsp), %rdi
callq 0x5e1e0
movq (%rax), %rax
movq %rax, 0x4d8(%rsp)
movq 0x4d8(%rsp), %rdi
callq 0x60410
movq %rax, 0x2c0(%rsp)
jmp 0xf8508
movq 0x2c0(%rsp), %rax
cmpq $0x0, %rax
je 0xf853f
movq 0x2c0(%rsp), %rdi
leaq 0x530eb(%rip), %rsi     # 0x14b610
leaq 0x52eec(%rip), %rdx     # 0x14b418
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x2b8(%rsp)
jmp 0xf854b
xorl %eax, %eax
movq %rax, 0x2b8(%rsp)
jmp 0xf854b
movq 0x2b8(%rsp), %rax
movq %rax, 0x4d0(%rsp)
leaq 0x5d0(%rsp), %rdi
leaq 0x4d0(%rsp), %rsi
callq 0xf9a80
movb %dl, 0x2af(%rsp)
movq %rax, 0x2b0(%rsp)
jmp 0xf8581
movb 0x2af(%rsp), %al
movq 0x2b0(%rsp), %rcx
movq %rcx, 0x4c0(%rsp)
movb %al, 0x4c8(%rsp)
leaq 0x4e8(%rsp), %rdi
callq 0x5e280
jmp 0xf84bb
movq 0x4f8(%rsp), %rdi
movq %rdi, 0x298(%rsp)
xorl %esi, %esi
callq 0x5c850
movq %rax, 0x2a0(%rsp)
jmp 0xf85d2
movq 0x2a0(%rsp), %rsi
movq 0x298(%rsp), %rdi
callq 0x5c330
jmp 0xf85e9
movq 0x4f8(%rsp), %rdi
callq 0x5cae0
jmp 0xf85f8
movq 0x4f8(%rsp), %rax
movq %rax, 0x290(%rsp)
cmpq $0x0, %rax
je 0xf861c
movq 0x290(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xf9900
movq 0x540(%rsp), %rax
movq %rax, 0x288(%rsp)
cmpq $0x0, %rax
je 0xf8660
movq 0x288(%rsp), %rdi
leaq 0x52dd2(%rip), %rsi     # 0x14b418
leaq 0x53003(%rip), %rdx     # 0x14b650
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x280(%rsp)
jmp 0xf866c
xorl %eax, %eax
movq %rax, 0x280(%rsp)
jmp 0xf866c
movq 0x280(%rsp), %rax
movq %rax, 0x4b8(%rsp)
cmpq $0x0, 0x4b8(%rsp)
je 0xf8bdb
movq 0x4b8(%rsp), %rdi
xorl %esi, %esi
callq 0x5c850
movq %rax, 0x278(%rsp)
jmp 0xf86a4
movq 0x278(%rsp), %rax
cmpq $0x0, %rax
je 0xf86db
movq 0x278(%rsp), %rdi
leaq 0x52e0f(%rip), %rsi     # 0x14b4d0
leaq 0x52e30(%rip), %rdx     # 0x14b4f8
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x270(%rsp)
jmp 0xf86e7
xorl %eax, %eax
movq %rax, 0x270(%rsp)
jmp 0xf86e7
movq 0x270(%rsp), %rax
movq %rax, 0x4b0(%rsp)
movq 0x4b8(%rsp), %rdi
movl $0x1, %esi
callq 0x5c850
movq %rax, 0x268(%rsp)
jmp 0xf8713
movq 0x268(%rsp), %rax
cmpq $0x0, %rax
je 0xf874a
movq 0x268(%rsp), %rdi
leaq 0x52da0(%rip), %rsi     # 0x14b4d0
leaq 0x52dc1(%rip), %rdx     # 0x14b4f8
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x260(%rsp)
jmp 0xf8756
xorl %eax, %eax
movq %rax, 0x260(%rsp)
jmp 0xf8756
movq 0x260(%rsp), %rax
movq %rax, 0x4a8(%rsp)
xorl %eax, %eax
cmpq 0x4b0(%rsp), %rax
jne 0xf8783
xorl %eax, %eax
cmpq 0x4a8(%rsp), %rax
jne 0xf8783
jmp 0xf7e97
movq $0x0, 0x4a0(%rsp)
xorl %eax, %eax
cmpq 0x4b0(%rsp), %rax
je 0xf88e2
movq 0x4b0(%rsp), %rdi
callq 0x5e800
movl %eax, 0x25c(%rsp)
jmp 0xf87b5
movl 0x25c(%rsp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0xf88e2
movq 0x4b8(%rsp), %rax
cmpl $0x3, 0x68(%rax)
je 0xf87f4
movq 0x4b8(%rsp), %rax
cmpl $0x4, 0x68(%rax)
je 0xf87f4
movq 0x4b8(%rsp), %rax
cmpl $0x2, 0x68(%rax)
jne 0xf88e2
movl $0x68, %edi
callq 0x8340
movq %rax, 0x250(%rsp)
jmp 0xf8808
movq 0x4b8(%rsp), %rdi
callq 0x5e940
movq %rax, 0x248(%rsp)
jmp 0xf881f
movq 0x4b8(%rsp), %rdi
callq 0x5e770
movq %rax, 0x240(%rsp)
jmp 0xf8836
movl $0x50, %edi
callq 0x8340
movq %rax, 0x238(%rsp)
jmp 0xf884a
movq 0x238(%rsp), %rdi
xorl %esi, %esi
callq 0x8cfa0
jmp 0xf885b
movq 0x238(%rsp), %rcx
movq 0x240(%rsp), %rdx
movq 0x248(%rsp), %rsi
movq 0x250(%rsp), %rdi
movq 0x4b8(%rsp), %r8
callq 0xf99b0
jmp 0xf888a
jmp 0xf8b9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
jmp 0xf88cb
movq 0x238(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
movl $0x50, %esi
callq 0x8350
movq 0x250(%rsp), %rdi
movl $0x68, %esi
callq 0x8350
jmp 0xf991c
xorl %eax, %eax
cmpq 0x4a8(%rsp), %rax
je 0xf8a19
movq 0x4a8(%rsp), %rdi
callq 0x5e800
movl %eax, 0x234(%rsp)
jmp 0xf8908
movl 0x234(%rsp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0xf8a19
movq 0x4b8(%rsp), %rax
cmpl $0x2, 0x68(%rax)
jne 0xf8a19
movl $0x68, %edi
callq 0x8340
movq %rax, 0x228(%rsp)
jmp 0xf893f
movq 0x4b8(%rsp), %rdi
callq 0x5e940
movq %rax, 0x220(%rsp)
jmp 0xf8956
movq 0x4b8(%rsp), %rdi
callq 0x5e770
movq %rax, 0x218(%rsp)
jmp 0xf896d
movl $0x50, %edi
callq 0x8340
movq %rax, 0x210(%rsp)
jmp 0xf8981
movq 0x210(%rsp), %rdi
xorl %esi, %esi
callq 0x8cfa0
jmp 0xf8992
movq 0x210(%rsp), %rcx
movq 0x218(%rsp), %rdx
movq 0x220(%rsp), %rsi
movq 0x228(%rsp), %rdi
movq 0x4b8(%rsp), %r8
callq 0xf99b0
jmp 0xf89c1
jmp 0xf8b99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
jmp 0xf8a02
movq 0x210(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
movl $0x50, %esi
callq 0x8350
movq 0x228(%rsp), %rdi
movl $0x68, %esi
callq 0x8350
jmp 0xf991c
xorl %eax, %eax
cmpq 0x4b0(%rsp), %rax
je 0xf8b97
xorl %eax, %eax
cmpq 0x4a8(%rsp), %rax
je 0xf8b97
movq 0x4b8(%rsp), %rax
movq %rax, 0x200(%rsp)
movq 0x4b0(%rsp), %rdi
callq 0x5e800
movl %eax, 0x20c(%rsp)
jmp 0xf8a5f
movq 0x4a8(%rsp), %rdi
callq 0x5e800
movl %eax, 0x1fc(%rsp)
jmp 0xf8a75
movl 0x1fc(%rsp), %edx
movl 0x20c(%rsp), %esi
movq 0x200(%rsp), %rdi
callq 0x5cb10
movl %eax, 0x1f8(%rsp)
jmp 0xf8a99
movl 0x1f8(%rsp), %eax
movl %eax, 0x49c(%rsp)
movl $0x68, %edi
callq 0x8340
movq %rax, 0x1f0(%rsp)
jmp 0xf8abb
movq 0x4b8(%rsp), %rdi
callq 0x5e940
movq %rax, 0x1e8(%rsp)
jmp 0xf8ad2
movq 0x4b8(%rsp), %rdi
callq 0x5e770
movq %rax, 0x1e0(%rsp)
jmp 0xf8ae9
movl $0x50, %edi
callq 0x8340
movq %rax, 0x1d8(%rsp)
jmp 0xf8afd
movq 0x1d8(%rsp), %rdi
movl 0x49c(%rsp), %esi
callq 0x8cfa0
jmp 0xf8b13
movq 0x1d8(%rsp), %rcx
movq 0x1e0(%rsp), %rdx
movq 0x1e8(%rsp), %rsi
movq 0x1f0(%rsp), %rdi
movq 0x4b8(%rsp), %r8
callq 0xf99b0
jmp 0xf8b42
jmp 0xf8b97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
jmp 0xf8b80
movq 0x1d8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
movl $0x50, %esi
callq 0x8350
movq 0x1f0(%rsp), %rdi
movl $0x68, %esi
callq 0x8350
jmp 0xf991c
jmp 0xf8b99
jmp 0xf8b9b
xorl %eax, %eax
cmpq 0x4a0(%rsp), %rax
je 0xf8bd6
movl 0x53c63(%rip), %eax     # 0x14c810
incl %eax
movl %eax, 0x53c5b(%rip)     # 0x14c810
movq 0x4b8(%rsp), %rsi
movq 0x4a0(%rsp), %rdx
leaq 0x548(%rsp), %rdi
callq 0xf9940
jmp 0xf8bd4
jmp 0xf8bd6
jmp 0xf98fe
movq 0x540(%rsp), %rax
movq %rax, 0x1d0(%rsp)
cmpq $0x0, %rax
je 0xf8c1a
movq 0x1d0(%rsp), %rdi
leaq 0x52818(%rip), %rsi     # 0x14b418
leaq 0x52a89(%rip), %rdx     # 0x14b690
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x1c8(%rsp)
jmp 0xf8c26
xorl %eax, %eax
movq %rax, 0x1c8(%rsp)
jmp 0xf8c26
movq 0x1c8(%rsp), %rax
movq %rax, 0x490(%rsp)
cmpq $0x0, 0x490(%rsp)
je 0xf8e43
movq 0x490(%rsp), %rdi
xorl %esi, %esi
callq 0x5c850
movq %rax, 0x1c0(%rsp)
jmp 0xf8c5e
movq 0x1c0(%rsp), %rax
cmpq $0x0, %rax
je 0xf8c95
movq 0x1c0(%rsp), %rdi
leaq 0x52855(%rip), %rsi     # 0x14b4d0
leaq 0x52876(%rip), %rdx     # 0x14b4f8
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x1b8(%rsp)
jmp 0xf8ca1
xorl %eax, %eax
movq %rax, 0x1b8(%rsp)
jmp 0xf8ca1
movq 0x1b8(%rsp), %rax
movq %rax, 0x488(%rsp)
xorl %eax, %eax
cmpq 0x488(%rsp), %rax
jne 0xf8cc2
jmp 0xf7e97
movl 0x53b48(%rip), %eax     # 0x14c810
incl %eax
movl %eax, 0x53b40(%rip)     # 0x14c810
movq 0x490(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movq 0x488(%rsp), %rdi
callq 0x5e800
movl %eax, 0x1b4(%rsp)
jmp 0xf8cf6
movl 0x1b4(%rsp), %esi
movq 0x1a8(%rsp), %rdi
callq 0x5cc00
movl %eax, 0x1a4(%rsp)
jmp 0xf8d13
movl 0x1a4(%rsp), %eax
movl %eax, 0x484(%rsp)
movl $0x68, %edi
callq 0x8340
movq %rax, 0x198(%rsp)
jmp 0xf8d35
movq 0x490(%rsp), %rdi
callq 0x5e940
movq %rax, 0x190(%rsp)
jmp 0xf8d4c
movq 0x490(%rsp), %rdi
callq 0x5e770
movq %rax, 0x188(%rsp)
jmp 0xf8d63
movl $0x50, %edi
callq 0x8340
movq %rax, 0x180(%rsp)
jmp 0xf8d77
movq 0x180(%rsp), %rdi
movl 0x484(%rsp), %esi
callq 0x8cfa0
jmp 0xf8d8d
movq 0x180(%rsp), %rcx
movq 0x188(%rsp), %rdx
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdi
movq 0x490(%rsp), %r8
callq 0xf99b0
jmp 0xf8dbc
movq 0x198(%rsp), %rax
movq %rax, 0x478(%rsp)
movq 0x490(%rsp), %rsi
movq 0x478(%rsp), %rdx
leaq 0x548(%rsp), %rdi
callq 0xf9940
jmp 0xf8deb
jmp 0xf98fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
jmp 0xf8e2c
movq 0x180(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
movl $0x50, %esi
callq 0x8350
movq 0x198(%rsp), %rdi
movl $0x68, %esi
callq 0x8350
jmp 0xf991c
movq 0x540(%rsp), %rax
movq %rax, 0x178(%rsp)
cmpq $0x0, %rax
je 0xf8e82
movq 0x178(%rsp), %rdi
leaq 0x525b0(%rip), %rsi     # 0x14b418
leaq 0x52861(%rip), %rdx     # 0x14b6d0
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x170(%rsp)
jmp 0xf8e8e
xorl %eax, %eax
movq %rax, 0x170(%rsp)
jmp 0xf8e8e
movq 0x170(%rsp), %rax
movq %rax, 0x470(%rsp)
cmpq $0x0, 0x470(%rsp)
je 0xf98fa
movq 0x470(%rsp), %rdi
callq 0x5e580
movl %eax, 0x16c(%rsp)
jmp 0xf8ec3
movl 0x16c(%rsp), %ecx
movl $0x3, %eax
cmpl %ecx, %eax
jne 0xf98f8
movq 0x470(%rsp), %rdi
xorl %esi, %esi
callq 0x5c850
movq %rax, 0x160(%rsp)
jmp 0xf8ef0
movq 0x160(%rsp), %rax
cmpq $0x0, %rax
je 0xf8f27
movq 0x160(%rsp), %rdi
leaq 0x525c3(%rip), %rsi     # 0x14b4d0
leaq 0x525e4(%rip), %rdx     # 0x14b4f8
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x158(%rsp)
jmp 0xf8f33
xorl %eax, %eax
movq %rax, 0x158(%rsp)
jmp 0xf8f33
movq 0x158(%rsp), %rax
movq %rax, 0x468(%rsp)
xorl %eax, %eax
cmpq 0x468(%rsp), %rax
jne 0xf8f54
jmp 0xf7e97
movq 0x470(%rsp), %rdi
movl $0x1, %esi
callq 0x5c850
movq %rax, 0x150(%rsp)
jmp 0xf8f70
movq 0x150(%rsp), %rax
cmpq $0x0, %rax
je 0xf8fa7
movq 0x150(%rsp), %rdi
leaq 0x52543(%rip), %rsi     # 0x14b4d0
leaq 0x52564(%rip), %rdx     # 0x14b4f8
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x148(%rsp)
jmp 0xf8fb3
xorl %eax, %eax
movq %rax, 0x148(%rsp)
jmp 0xf8fb3
movq 0x148(%rsp), %rax
movq %rax, 0x460(%rsp)
xorl %eax, %eax
cmpq 0x460(%rsp), %rax
jne 0xf8fd4
jmp 0xf7e97
movq 0x470(%rsp), %rdi
movl $0x2, %esi
callq 0x5c850
movq %rax, 0x140(%rsp)
jmp 0xf8ff0
movq 0x140(%rsp), %rax
cmpq $0x0, %rax
je 0xf9027
movq 0x140(%rsp), %rdi
leaq 0x524c3(%rip), %rsi     # 0x14b4d0
leaq 0x524fc(%rip), %rdx     # 0x14b510
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x138(%rsp)
jmp 0xf9033
xorl %eax, %eax
movq %rax, 0x138(%rsp)
jmp 0xf9033
movq 0x138(%rsp), %rax
movq %rax, 0x458(%rsp)
xorl %eax, %eax
cmpq 0x458(%rsp), %rax
jne 0xf90e8
movq 0x52f8e(%rip), %rdi     # 0x14bfe8
leaq 0x1097(%rip), %rsi      # 0xfa0f8
callq 0x8330
movq %rax, 0x130(%rsp)
jmp 0xf9070
movq 0x130(%rsp), %rdi
leaq 0x4bb5(%rip), %rsi      # 0xfdc34
callq 0x8330
movq %rax, 0x128(%rsp)
jmp 0xf908e
movq 0x128(%rsp), %rdi
leaq 0x234d(%rip), %rsi      # 0xfb3ea
callq 0x8330
movq %rax, 0x120(%rsp)
jmp 0xf90ac
movq 0x120(%rsp), %rdi
movl $0x7d, %esi
callq 0x8650
movq %rax, 0x118(%rsp)
jmp 0xf90c8
movq 0x118(%rsp), %rdi
movq 0x52ea9(%rip), %rsi     # 0x14bf80
callq 0x8380
jmp 0xf90de
movl $0xff, %edi
callq 0x8460
movq 0x470(%rsp), %rdi
callq 0x5e2b0
movq %rax, 0x110(%rsp)
jmp 0xf90ff
movq 0x110(%rsp), %rax
movq %rax, 0x450(%rsp)
movq 0x458(%rsp), %rdi
callq 0xb2db0
movq %rax, 0x108(%rsp)
jmp 0xf9126
movq 0x108(%rsp), %rax
movq %rax, 0x448(%rsp)
movq 0x470(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x468(%rsp), %rdi
callq 0x5e800
movl %eax, 0x104(%rsp)
jmp 0xf915c
movq 0x460(%rsp), %rdi
callq 0x5e800
movl %eax, 0xf4(%rsp)
jmp 0xf9172
movl 0xf4(%rsp), %edx
movl 0x104(%rsp), %esi
movq 0xf8(%rsp), %rdi
callq 0x5ccb0
movb %al, 0xf3(%rsp)
jmp 0xf9196
movb 0xf3(%rsp), %al
testb $0x1, %al
jne 0xf91a6
jmp 0xf960f
movl 0x53664(%rip), %eax     # 0x14c810
incl %eax
movl %eax, 0x5365c(%rip)     # 0x14c810
movl $0x70, %edi
callq 0x8340
movq %rax, 0xe8(%rsp)
jmp 0xf91c8
movq 0xe8(%rsp), %rdi
movq 0x458(%rsp), %rsi
movq 0x470(%rsp), %rdx
callq 0xf9ad0
jmp 0xf91e7
movq 0xe8(%rsp), %rax
movq %rax, 0x440(%rsp)
movq 0x450(%rsp), %rdi
callq 0x61810
movq %rax, 0xe0(%rsp)
jmp 0xf920e
movq 0xe0(%rsp), %rax
movq %rax, 0x438(%rsp)
xorl %eax, %eax
cmpq 0x438(%rsp), %rax
jne 0xf92ee
movq 0x52db3(%rip), %rdi     # 0x14bfe8
leaq 0xebc(%rip), %rsi       # 0xfa0f8
callq 0x8330
movq %rax, 0xd8(%rsp)
jmp 0xf924b
movq 0xd8(%rsp), %rdi
leaq 0x49da(%rip), %rsi      # 0xfdc34
callq 0x8330
movq %rax, 0xd0(%rsp)
jmp 0xf9269
movq 0xd0(%rsp), %rdi
leaq 0x2172(%rip), %rsi      # 0xfb3ea
callq 0x8330
movq %rax, 0xc8(%rsp)
jmp 0xf9287
movq 0xc8(%rsp), %rdi
movl $0x89, %esi
callq 0x8650
movq %rax, 0xc0(%rsp)
jmp 0xf92a3
movq 0xc0(%rsp), %rdi
movq 0x52cce(%rip), %rsi     # 0x14bf80
callq 0x8380
jmp 0xf92b9
movl $0xff, %edi
callq 0x8460
movq 0xe8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x5c0(%rsp)
movl %eax, 0x5bc(%rsp)
movl $0x70, %esi
callq 0x8350
jmp 0xf991c
movq 0x450(%rsp), %rdi
movq 0x438(%rsp), %rsi
callq 0x627c0
jmp 0xf9305
movq 0x438(%rsp), %rdi
movq 0x450(%rsp), %rsi
callq 0x62820
jmp 0xf931c
movq 0x438(%rsp), %rdi
callq 0x62860
movq %rax, 0xb8(%rsp)
jmp 0xf9333
movq 0xb8(%rsp), %rax
movq %rax, 0x430(%rsp)
movq 0x430(%rsp), %rdi
callq 0x62870
movq %rax, 0x428(%rsp)
movq 0x430(%rsp), %rdi
callq 0x628a0
movq %rax, 0x420(%rsp)
leaq 0x428(%rsp), %rdi
leaq 0x420(%rsp), %rsi
callq 0x628d0
testb $0x1, %al
jne 0xf938b
jmp 0xf95dd
leaq 0x428(%rsp), %rdi
callq 0x628f0
movq (%rax), %rax
movq %rax, 0x418(%rsp)
movq 0x418(%rsp), %rax
movq %rax, 0xb0(%rsp)
cmpq $0x0, %rax
je 0xf93e2
movq 0xb0(%rsp), %rdi
leaq 0x52050(%rip), %rsi     # 0x14b418
leaq 0x524c1(%rip), %rdx     # 0x14b890
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0xa8(%rsp)
jmp 0xf93ee
xorl %eax, %eax
movq %rax, 0xa8(%rsp)
jmp 0xf93ee
movq 0xa8(%rsp), %rax
movq %rax, 0x410(%rsp)
xorl %eax, %eax
cmpq 0x410(%rsp), %rax
jne 0xf940f
jmp 0xf95dd
movl $0x1, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
movl %eax, 0xa0(%rsp)
movq 0x410(%rsp), %rdi
callq 0x5e580
movl %eax, 0xa4(%rsp)
jmp 0xf943e
movl 0xa0(%rsp), %eax
movl 0xa4(%rsp), %ecx
cmpl %ecx, %eax
jae 0xf95c9
movq 0x410(%rsp), %rdi
movl 0x40c(%rsp), %esi
callq 0x5c850
movq %rax, 0x98(%rsp)
jmp 0xf9472
movq 0x98(%rsp), %rax
cmpq $0x0, %rax
je 0xf94a9
movq 0x98(%rsp), %rdi
leaq 0x52041(%rip), %rsi     # 0x14b4d0
leaq 0x5207a(%rip), %rdx     # 0x14b510
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x90(%rsp)
jmp 0xf94b5
xorl %eax, %eax
movq %rax, 0x90(%rsp)
jmp 0xf94b5
movq 0x90(%rsp), %rax
movq %rax, 0x400(%rsp)
xorl %eax, %eax
cmpq 0x400(%rsp), %rax
jne 0xf955e
movq 0x52b0c(%rip), %rdi     # 0x14bfe8
leaq 0xc15(%rip), %rsi       # 0xfa0f8
callq 0x8330
movq %rax, 0x88(%rsp)
jmp 0xf94f2
movq 0x88(%rsp), %rdi
leaq 0x4733(%rip), %rsi      # 0xfdc34
callq 0x8330
movq %rax, 0x80(%rsp)
jmp 0xf9510
movq 0x80(%rsp), %rdi
leaq 0x1ecb(%rip), %rsi      # 0xfb3ea
callq 0x8330
movq %rax, 0x78(%rsp)
jmp 0xf952b
movq 0x78(%rsp), %rdi
movl $0x92, %esi
callq 0x8650
movq %rax, 0x70(%rsp)
jmp 0xf9541
movq 0x70(%rsp), %rdi
movq 0x52a33(%rip), %rsi     # 0x14bf80
callq 0x8380
jmp 0xf9554
movl $0xff, %edi
callq 0x8460
movq 0x400(%rsp), %rdi
callq 0xb2db0
movq %rax, 0x68(%rsp)
jmp 0xf9572
movq 0x68(%rsp), %rax
cmpq 0x450(%rsp), %rax
jne 0xf95b1
movq 0x410(%rsp), %rdi
movl 0x40c(%rsp), %esi
callq 0x5c900
jmp 0xf9597
movq 0x410(%rsp), %rdi
movl 0x40c(%rsp), %esi
decl %esi
callq 0x5c900
jmp 0xf95af
jmp 0xf95c9
jmp 0xf95b3
movl 0x40c(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x40c(%rsp)
jmp 0xf941a
jmp 0xf95cb
leaq 0x428(%rsp), %rdi
callq 0x62960
jmp 0xf936d
movq 0x470(%rsp), %rdi
callq 0x5cae0
jmp 0xf95ec
movq 0x470(%rsp), %rax
movq %rax, 0x60(%rsp)
cmpq $0x0, %rax
je 0xf960a
movq 0x60(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xf98f6
movl 0x531fb(%rip), %eax     # 0x14c810
incl %eax
movl %eax, 0x531f3(%rip)     # 0x14c810
movq 0x448(%rsp), %rdi
movq 0x450(%rsp), %rsi
callq 0x62820
jmp 0xf9634
movq 0x450(%rsp), %rdi
movq 0x448(%rsp), %rsi
callq 0x627c0
jmp 0xf964b
movq 0x448(%rsp), %rdi
callq 0x62860
movq %rax, 0x58(%rsp)
jmp 0xf965f
movq 0x58(%rsp), %rax
movq %rax, 0x3f8(%rsp)
movq 0x3f8(%rsp), %rdi
callq 0x62870
movq %rax, 0x3f0(%rsp)
movq 0x3f8(%rsp), %rdi
callq 0x628a0
movq %rax, 0x3e8(%rsp)
leaq 0x3f0(%rsp), %rdi
leaq 0x3e8(%rsp), %rsi
callq 0x628d0
testb $0x1, %al
jne 0xf96b4
jmp 0xf98c9
leaq 0x3f0(%rsp), %rdi
callq 0x628f0
movq (%rax), %rax
movq %rax, 0x3e0(%rsp)
movq 0x3e0(%rsp), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
je 0xf9702
movq 0x50(%rsp), %rdi
leaq 0x51d2d(%rip), %rsi     # 0x14b418
leaq 0x5219e(%rip), %rdx     # 0x14b890
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x48(%rsp)
jmp 0xf970b
xorl %eax, %eax
movq %rax, 0x48(%rsp)
jmp 0xf970b
movq 0x48(%rsp), %rax
movq %rax, 0x3d8(%rsp)
xorl %eax, %eax
cmpq 0x3d8(%rsp), %rax
jne 0xf9729
jmp 0xf98c9
movl $0x1, 0x3d4(%rsp)
movl 0x3d4(%rsp), %eax
movl %eax, 0x40(%rsp)
movq 0x3d8(%rsp), %rdi
callq 0x5e580
movl %eax, 0x44(%rsp)
jmp 0xf9752
movl 0x40(%rsp), %eax
movl 0x44(%rsp), %ecx
cmpl %ecx, %eax
jae 0xf98b5
movq 0x3d8(%rsp), %rdi
movl 0x3d4(%rsp), %esi
callq 0x5c850
movq %rax, 0x38(%rsp)
jmp 0xf977d
movq 0x38(%rsp), %rax
cmpq $0x0, %rax
je 0xf97ab
movq 0x38(%rsp), %rdi
leaq 0x51d3c(%rip), %rsi     # 0x14b4d0
leaq 0x51d75(%rip), %rdx     # 0x14b510
xorl %eax, %eax
movl %eax, %ecx
callq 0x8410
movq %rax, 0x30(%rsp)
jmp 0xf97b4
xorl %eax, %eax
movq %rax, 0x30(%rsp)
jmp 0xf97b4
movq 0x30(%rsp), %rax
movq %rax, 0x3c8(%rsp)
xorl %eax, %eax
cmpq 0x3c8(%rsp), %rax
jne 0xf984a
movq 0x52814(%rip), %rdi     # 0x14bfe8
leaq 0x91d(%rip), %rsi       # 0xfa0f8
callq 0x8330
movq %rax, 0x28(%rsp)
jmp 0xf97e7
movq 0x28(%rsp), %rdi
leaq 0x4441(%rip), %rsi      # 0xfdc34
callq 0x8330
movq %rax, 0x20(%rsp)
jmp 0xf97ff
movq 0x20(%rsp), %rdi
leaq 0x1bdf(%rip), %rsi      # 0xfb3ea
callq 0x8330
movq %rax, 0x18(%rsp)
jmp 0xf9817
movq 0x18(%rsp), %rdi
movl $0xab, %esi
callq 0x8650
movq %rax, 0x10(%rsp)
jmp 0xf982d
movq 0x10(%rsp), %rdi
movq 0x52747(%rip), %rsi     # 0x14bf80
callq 0x8380
jmp 0xf9840
movl $0xff, %edi
callq 0x8460
movq 0x3c8(%rsp), %rdi
callq 0xb2db0
movq %rax, 0x8(%rsp)
jmp 0xf985e
movq 0x8(%rsp), %rax
cmpq 0x450(%rsp), %rax
jne 0xf989d
movq 0x3d8(%rsp), %rdi
movl 0x3d4(%rsp), %esi
callq 0x5c900
jmp 0xf9883
movq 0x3d8(%rsp), %rdi
movl 0x3d4(%rsp), %esi
decl %esi
callq 0x5c900
jmp 0xf989b
jmp 0xf98b5
jmp 0xf989f
movl 0x3d4(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x3d4(%rsp)
jmp 0xf9734
jmp 0xf98b7
leaq 0x3f0(%rsp), %rdi
callq 0x62960
jmp 0xf9696
movq 0x470(%rsp), %rdi
callq 0x5cae0
jmp 0xf98d8
movq 0x470(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0xf98f4
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xf98f6
jmp 0xf98f8
jmp 0xf98fa
jmp 0xf98fc
jmp 0xf98fe
jmp 0xf9900
jmp 0xf9902
jmp 0xf7e97
leaq 0x5d0(%rsp), %rdi
callq 0xa10e0
addq $0x618, %rsp            # imm = 0x618
retq
leaq 0x5d0(%rsp), %rdi
callq 0xa10e0
movq 0x5c0(%rsp), %rdi
callq 0x8670
nopw %cs:(%rax,%rax)