// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/M5GB.cpp
// Function: M5GB(std::vector<polynomial, std::allocator<polynomial>>&, int)
vector<polynomial> M5GB(vector<polynomial>& system, int n) //table might overflow -> need to redefine inside
{
  auto start = std::chrono::steady_clock::now();
  degrees = create_degrees(n,10); //upper found for degree, have to change for larger examples
  Initialize(system,n);  

#ifdef DEBUG
  cout << "Size of P: " << P.size() << endl;
#endif
  int polys_left = m-2;
  int debug = 1000000;
  int maxiter = debug;
  int last_non_zero = maxiter-debug;
  //signature last_syz(table.size(),m);

  while (Spol_sign.size() > 0 && debug > 0)
    {
#ifdef DEBUG
      //cout << "iteration " << maxiter-debug << endl;
#endif
      if (Spol_sign.size() > 0)
	{
	  signature smallest_sign  = *Spol_sign.begin();
	  /*
	  */
	  Spol_sign.erase(Spol_sign.begin());//remove first item
	  if (Syzygy(smallest_sign,H))
	     {
	       syz_counter ++; //to be precise, take away all spairs of that syzygy
	       debug --;
	       continue;
	     }
	  if (smallest_sign.Get_term() != 0)
	    {
	      auto same_sign_pairs = Spairs_map.equal_range(smallest_sign);
	      for (auto pair = same_sign_pairs.first; pair!= same_sign_pairs.second; ++pair)
		{
		  Lab_poly uF = pair->second.first;
		  //Lab_poly vG = pair->second.second.first;
		  /*
		   if(Syzygy(vG.Get_sign(),H))//meets syzygy criterion
		    {
#ifdef DEBUG
		      cout << "syzygy criterion works for " << vG.Get_sign() << endl;
#endif
		      syz_counter ++;
		      debug --;
		      continue;
		    }
		  */
		   if (isRewritable(uF,pair->second.second)) //changed order, check!, could change first taking maximum w.r.t. rewrite order!
		    {
		      rewrite_counter++;
#ifdef DEBUG
		      cout << "Rewritable criterion works for " << uF << endl;
#endif
		      debug --;
		      continue;
		    }
		   /*
		    if (isRewritable(vG,pair->second.second.second))//Generations_G.find(G.Get_LT())->second)) //changed order, check!, could change first taking maximum w.r.t. rewrite order!)) //changed order, check!
		    {
		      rewrite_counter++;
#ifdef DEBUG
		      cout << "Rewritable criterion works for " << vG << endl;
#endif
		      debug --;
		      continue;
		    }
		   */
		    //Lab_poly Spol = uF - vG;
		   term_vec out = table[smallest_sign.Get_term()].first;
		   for (auto &it : out)
		     {
		       //cout << it;
		     }
		   //cout << endl;
#ifdef LOWER_POL
		   Lab_poly Spol = Low_pol(smallest_sign,uF,pair->second.second,n);
#else
		   Lab_poly Spol = uF;//variant
#endif
		   
		  /*
		  if (Spol.Get_LC() == 0)//is 0-polynomial
		    {
		      H[Spol.Get_sign().Get_index()].emplace_back(Spol.Get_sign().Get_term());//add syzygy signature
		      spol_is_zero ++;
		      debug --;
		      break;
		    }
		  */
#ifdef PRECISE_DEBUG
		  cout << "uF:" << uF<< endl;
		  //cout << "vG:" << vG << endl;
		  cout << "Next signature: " << Spol.Get_sign() << endl;
	  if (((maxiter - debug) % 1000) == 1)
	    {
	      cout << "size of G:" << G_.size() << endl;
	      cout << "iteration " << maxiter - debug << endl;
	      cout << "First Buchberger criterion works: " << BB_counter << endl;
	      cout << "spol is zero: " << spol_is_zero << endl;
	      cout << "rewritten: " << rewrite_counter << endl;
	      cout << "syzygy crit: " << syz_counter << endl;
	      cout << "actually reduced: " << actual_red << endl;
	      cout << "signature: " << Spol.Get_sign() << endl;
	    }
#endif
	  if (((maxiter - debug) % 100) == 33)
	    cout << "signature: " << Spol.Get_sign() << endl;
	  //if not rewriteable
	    
	  actual_red ++;
	  //cout << "signature: " << Spol.Get_sign() << endl;
	  //cout << Spol << endl << endl << endl;
	  if (actual_red == 1500)
	    {
	      debug = 0;
	      continue;
	    }
	  Full_S_Reduce(Spol,n);
	  //cout << " --> " << Spol << endl << endl << endl;
#ifdef DEBUG
	  cout << " --> " << Spol << endl << endl << endl;
#endif
	  if((Spol.Get_poly()).Get_LC() == 0)// 0-polynomial
	    {
	      //cout << maxiter-debug << endl;
	      debug = 0;
	      continue;
	      zero_reductions ++;
	      debug --;
	      H[Spol.Get_sign().Get_index()].emplace_back(Spol.Get_sign().Get_term());//add syzygy signature
	      break; //this signature already reduces to 0
	    }
	  else
	    {
	      last_non_zero = maxiter-debug;
	      Update_syz(Spol);//add new koszul syzygies
	      Update_pairs(Spol,system,n,BB_counter);//system needed? check!
#ifdef PRECISE_DEBUG
	      if (G_.find(Spol.Get_LT()) != G_.end())
		cout << "Same leading term! Error!" << endl;
#endif
	      Add_to_M(Spol);
	      Add_to_G(Spol);
	      /*
	      G_[Spol.Get_LT()] = Spol;
	      M[Spol.Get_LT()] = Spol;
	      Generations_M[Spol.Get_LT()] = G_.size(); //generation for M
	      Generations_G[Spol.Get_LT()] = G_.size(); //generation for G
	      Flags_M[Spol.Get_LT()] = Create_Flag(Spol.Get_poly()); //create flag for M
	      */
	      //Update_step(Spol); -> not needed since done in lazy manner!
	    }
	  debug --;
	  break; //one element of this signature already examined
		}
	    }
	}
    }
  vector<polynomial> basis = Poly(G_,n,p); //remove signatures

  sort(basis);
  Interreduce(basis);
  
#ifdef statistics
  cout << "Number of examined S-polynomials: " << maxiter - debug << endl;
  cout << "discarded since zero:" << spol_is_zero << endl;
  cout << "Discarded by Rewriteable criterion: " << rewrite_counter << endl;
  cout << "discarded by syzygy criterion: " << syz_counter << endl;
  cout << "actually reduced: " << actual_red << endl;
  cout << "Number of full reduction steps:" << full_red_steps << endl;
  cout << "Number of total reductions:" << number_of_reductions << endl;
  cout<< "Number of fast reductions: " <<  straight_m_reduces << endl;
  cout<< "Number of re-reductions: " <<  m_re_reduced << endl;
  cout<< "Number of g-reductions: " <<  g_reduced << endl;
  cout<< "Size of M: " << M.size() << endl;
  cout<< "Size of G: " << G_.size() << endl;
  cout << "Number of Zero reductions:" << zero_reductions << endl;
  cout << "First Buchberger criterion works: " << BB_counter << endl;
  cout << "Last non-zero: " << last_non_zero << endl;
#endif
  if (debug == 0)
    cout << "maximal number of iterations reached!!!"<< endl << endl;
  auto end = chrono::steady_clock::now();
  cout << "Elapsed time in Seconds : "
	 << chrono::duration_cast<chrono::milliseconds>(end - start).count()
	 << " milliseconds " << endl;
  return basis;
  //return G_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
callq 0x21d0
movq %rax, 0x20(%rsp)
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %ebp, 0x4(%rsp)
movl %ebp, %esi
movl $0xa, %edx
callq 0x37f1
movq 0x12abf(%rip), %rdi     # 0x1a500
movq 0x12ac8(%rip), %rsi     # 0x1a510
movaps (%r14), %xmm0
movaps %xmm0, 0x12aad(%rip)    # 0x1a500
movq 0x10(%r14), %rax
movq %rax, 0x12ab2(%rip)     # 0x1a510
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
testq %rdi, %rdi
je 0x7a97
subq %rdi, %rsi
callq 0x2180
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x7a97
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x8410
cmpq $0x0, 0x129e5(%rip)     # 0x1a490
je 0x7d6a
movl $0x0, (%rsp)
movl $0xf4240, %r13d         # imm = 0xF4240
leaq 0x129a3(%rip), %rbx     # 0x1a468
leaq 0x12984(%rip), %r14     # 0x1a450
leaq 0x10(%rsp), %r12
movq 0x129a8(%rip), %rsi     # 0x1a480
movups 0x20(%rsi), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0xdcd8
movq %r12, %rdi
movq %r14, %rsi
callq 0x8751
testb %al, %al
je 0x7b1e
incl 0x126da(%rip)           # 0x1a1d8
leal -0x1(%r13), %eax
cmpq $0x0, 0x12986(%rip)     # 0x1a490
je 0x7d65
cmpl $0x1, %r13d
movl %eax, %r13d
jg 0x7ad1
jmp 0x7d65
movq %r15, 0x8(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x7d47
leaq 0x12962(%rip), %rdi     # 0x1a498
movq %r12, %rsi
callq 0xdd14
movq %rdx, 0x28(%rsp)
cmpq %rdx, %rax
je 0x7d47
movq %rax, %r15
leaq 0x30(%r15), %rsi
leaq 0x80(%rsp), %rbp
movq %rbp, %rdi
callq 0x68a4
movl 0x48(%r15), %eax
movl %eax, 0x98(%rsp)
movl 0x60(%r15), %eax
leaq 0xa0(%rsp), %rcx
movl %eax, 0x10(%rcx)
movups 0x50(%r15), %xmm0
movups %xmm0, (%rcx)
movq %rbp, %rdi
callq 0x87ee
testb %al, %al
je 0x7ba2
incl 0x12639(%rip)           # 0x1a1d0
decl %r13d
movb $0x1, %bpl
jmp 0x7d0f
movq 0x18(%rsp), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
leaq 0x125ba(%rip), %rax     # 0x1a170
addq (%rax), %rsi
leaq 0x68(%rsp), %rdi
callq 0x4214
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
leaq 0x80(%rsp), %rdx
callq 0x89c6
movl $0xf4240, %ebx          # imm = 0xF4240
subl %r13d, %ebx
movslq %ebx, %rax
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
cmpl $0x21, %eax
jne 0x7c54
movl $0xb, %edx
movq 0x123cb(%rip), %rdi     # 0x19fd8
leaq 0xb600(%rip), %rsi      # 0x13214
callq 0x21a0
movq 0x123b8(%rip), %rdi     # 0x19fd8
leaq 0x50(%rsp), %rsi
callq 0x127f9
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movl 0x12582(%rip), %eax     # 0x1a1dc
incl %eax
movl %eax, 0x1257a(%rip)     # 0x1a1dc
xorl %r14d, %r14d
cmpl $0x5dc, %eax            # imm = 0x5DC
sete %bpl
je 0x7cc5
leaq 0x30(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x8e9c
movq 0x30(%rsp), %rdi
cmpl $0x0, 0x8(%rdi)
je 0x7cd4
leaq 0x30(%rsp), %rdi
callq 0x96a0
leaq 0x30(%rsp), %rdi
movl 0x4(%rsp), %edx
leaq 0x12541(%rip), %rcx     # 0x1a1e4
callq 0x9765
leaq 0x30(%rsp), %rdi
callq 0x9d77
leaq 0x30(%rsp), %rdi
callq 0x9f1b
decl %r13d
movl %r13d, %r14d
movl %ebx, (%rsp)
movq 0x30(%rsp), %rdi
movl %r14d, %r13d
testq %rdi, %rdi
jne 0x7cda
jmp 0x7cea
movb $0x1, %bpl
xorl %r14d, %r14d
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movl %r14d, %r13d
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x7d01
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
leaq 0x12760(%rip), %rbx     # 0x1a468
leaq 0x12741(%rip), %r14     # 0x1a450
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x7d2c
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
testb %bpl, %bpl
je 0x7d47
movq %r15, %rdi
callq 0x2100
movq %rax, %r15
cmpq 0x28(%rsp), %rax
jne 0x7b4f
cmpq $0x0, 0x12741(%rip)     # 0x1a490
je 0x8393
testl %r13d, %r13d
movq 0x8(%rsp), %r15
jg 0x7ad1
jmp 0x7d77
movl %eax, %r13d
jmp 0x7d77
movl $0xf4240, %r13d         # imm = 0xF4240
movl $0x0, (%rsp)
movq %r15, %rdi
callq 0xa05f
movq %r15, %rdi
callq 0x118a1
movq %r15, %rdi
callq 0xa11b
movq 0x12242(%rip), %rdi     # 0x19fd8
leaq 0xb483(%rip), %rsi      # 0x13220
movl $0x22, %edx
callq 0x21a0
movl $0xf4240, %esi          # imm = 0xF4240
subl %r13d, %esi
movq 0x12222(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x121ec(%rip), %rdi     # 0x19fd8
leaq 0xb450(%rip), %rsi      # 0x13243
movl $0x15, %edx
callq 0x21a0
movl 0x123d1(%rip), %esi     # 0x1a1d4
movq 0x121ce(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x12198(%rip), %rdi     # 0x19fd8
leaq 0xb412(%rip), %rsi      # 0x13259
movl $0x24, %edx
callq 0x21a0
movl 0x12379(%rip), %esi     # 0x1a1d0
movq 0x1217a(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x12144(%rip), %rdi     # 0x19fd8
leaq 0xb3e3(%rip), %rsi      # 0x1327e
movl $0x1f, %edx
callq 0x21a0
movl 0x1232d(%rip), %esi     # 0x1a1d8
movq 0x12126(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x120f0(%rip), %rdi     # 0x19fd8
leaq 0xb3af(%rip), %rsi      # 0x1329e
movl $0x12, %edx
callq 0x21a0
movl 0x122dd(%rip), %esi     # 0x1a1dc
movq 0x120d2(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x1209c(%rip), %rdi     # 0x19fd8
leaq 0xb36e(%rip), %rsi      # 0x132b1
movl $0x1f, %edx
callq 0x21a0
movl 0x12269(%rip), %esi     # 0x1a1bc
movq 0x1207e(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x12048(%rip), %rdi     # 0x19fd8
leaq 0xb33a(%rip), %rsi      # 0x132d1
movl $0x1b, %edx
callq 0x21a0
movl 0x12219(%rip), %esi     # 0x1a1c0
movq 0x1202a(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x11ff4(%rip), %rdi     # 0x19fd8
leaq 0xb302(%rip), %rsi      # 0x132ed
movl $0x1b, %edx
callq 0x21a0
movl 0x121c9(%rip), %esi     # 0x1a1c4
movq 0x11fd6(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x11fa0(%rip), %rdi     # 0x19fd8
leaq 0xb2ca(%rip), %rsi      # 0x13309
movl $0x19, %edx
callq 0x21a0
movl 0x12179(%rip), %esi     # 0x1a1c8
movq 0x11f82(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x11f4c(%rip), %rdi     # 0x19fd8
leaq 0xb290(%rip), %rsi      # 0x13323
movl $0x18, %edx
callq 0x21a0
movl 0x12129(%rip), %esi     # 0x1a1cc
movq 0x11f2e(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x11ef8(%rip), %rdi     # 0x19fd8
leaq 0xb255(%rip), %rsi      # 0x1333c
movl $0xb, %edx
callq 0x21a0
movq 0x12220(%rip), %rsi     # 0x1a318
movq 0x11ed9(%rip), %rdi     # 0x19fd8
callq 0x20e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x11ea3(%rip), %rdi     # 0x19fd8
leaq 0xb20c(%rip), %rsi      # 0x13348
movl $0xb, %edx
callq 0x21a0
movq 0x12193(%rip), %rsi     # 0x1a2e0
movq 0x11e84(%rip), %rdi     # 0x19fd8
callq 0x20e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x11e4e(%rip), %rdi     # 0x19fd8
leaq 0xb1c3(%rip), %rsi      # 0x13354
movl $0x1a, %edx
callq 0x21a0
movl 0x1203f(%rip), %esi     # 0x1a1e0
movq 0x11e30(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x11dfa(%rip), %rdi     # 0x19fd8
leaq 0xb18a(%rip), %rsi      # 0x1336f
movl $0x22, %edx
callq 0x21a0
movl 0x11fef(%rip), %esi     # 0x1a1e4
movq 0x11ddc(%rip), %rdi     # 0x19fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x11da6(%rip), %rdi     # 0x19fd8
leaq 0xb159(%rip), %rsi      # 0x13392
movl $0xf, %edx
callq 0x21a0
movq 0x11d8e(%rip), %rdi     # 0x19fd8
movl (%rsp), %esi
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
testl %r13d, %r13d
jne 0x82f1
movq 0x11d50(%rip), %rbx     # 0x19fd8
leaq 0xb113(%rip), %rsi      # 0x133a2
movl $0x27, %edx
movq %rbx, %rdi
callq 0x21a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq 0x11d1e(%rip), %rdi     # 0x19fd8
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
callq 0x21d0
movq %rax, %rbx
movq 0x11cd8(%rip), %rdi     # 0x19fd8
leaq 0xb0c3(%rip), %rsi      # 0x133ca
movl $0x1a, %edx
callq 0x21a0
subq 0x20(%rsp), %rbx
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %rbx, %rax
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x12, %rdx
addq %rdx, %rsi
movq 0x11c9d(%rip), %rdi     # 0x19fd8
callq 0x2150
movq %rax, %rbx
leaq 0xb09b(%rip), %rsi      # 0x133e5
movl $0xe, %edx
movq %rax, %rdi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq %r15, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %r15
jmp 0x7d77
jmp 0x83fd
movq %rax, %rbx
jmp 0x83c7
jmp 0x83a6
movq %rax, %rbx
jmp 0x83de
jmp 0x83fd
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x83c7
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x83de
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x8408
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x8408
movq %rax, %rbx
movq %r15, %rdi
callq 0x312c
movq %rbx, %rdi
callq 0x2240