// File: /workspace/github_cpp_makefile_star2_O3/ATOMIC-LICHESS[P]ATOMKRAFT/movegen.cpp
// Function: MoveStack* generate<(MoveType)4>(Position const&, MoveStack*)
MoveStack* generate<MV_EVASION>(const Position& pos, MoveStack* mlist) {
  NEW assert(pos.piece_count(WHITE, KING) && pos.piece_count(BLACK, KING));
		
  assert(pos.is_ok());
  assert(pos.in_check());

  Bitboard b, target;
  Square from, checksq;
  int checkersCnt = 0;
  Color us = pos.side_to_move();
  NEW assert(pos.piece_count(us, KING));
  Square ksq = pos.king_square(us);
  Bitboard checkers = pos.checkers();
  Bitboard sliderAttacks = EmptyBoardBB;

  assert(pos.piece_on(ksq) == make_piece(us, KING));
  assert(checkers);

  // Find squares attacked by slider checkers, we will remove
  // them from the king evasions set so to early skip known
  // illegal moves and avoid an useless legality check later.
  b = checkers;
  do
  {
      checkersCnt++;
      checksq = pop_1st_bit(&b);
      
      STARTNEW
//      if (pos.color_of_piece_on(checksq) != opposite_color(us)) {
//    	  cout << "ERROR" << endl;
//    	  print_pos(pos);
//    	  cout << checksq <<  endl;
//    	  cout << PIECE_NAME[pos.piece_on(checksq)] << endl;
//    	  cout << pos.color_of_piece_on(checksq) << endl;
//    	  cout << opposite_color(us) << endl;
//    	  
//  	  }
      ENDNEW
      
      assert(pos.color_of_piece_on(checksq) == opposite_color(us));

      switch (pos.type_of_piece_on(checksq))
      {
      case BISHOP: sliderAttacks |= BishopPseudoAttacks[checksq]; break;
      case ROOK:   sliderAttacks |= RookPseudoAttacks[checksq];   break;
      case QUEEN:
          // In case of a queen remove also squares attacked in the other direction to
          // avoid possible illegal moves when queen and king are on adjacent squares.
          if (RookPseudoAttacks[checksq] & (1ULL << ksq))
              sliderAttacks |= RookPseudoAttacks[checksq] | pos.attacks_from<BISHOP>(checksq);
          else
              sliderAttacks |= BishopPseudoAttacks[checksq] | pos.attacks_from<ROOK>(checksq);
          break;
      default:
          break;
      }
  } while (b);

  // Generate evasions for king, capture and non capture moves
  OLD b = pos.attacks_from<KING>(ksq) & ~pos.pieces_of_color(us) & ~sliderAttacks;
  
  
  STARTNEW
  // while capture moves by the king are never allowed
  // moving our king next to the opponents king is also check evasion evasion
  assert(pos.piece_count(opposite_color(us), KING));
  Square opp_ksq = pos.king_square(opposite_color(us));
  //b = pos.attacks_from<KING>(ksq) & ~pos.occupied_squares() & ~sliderAttacks;
  //b |= (pos.attacks_from<KING>(ksq) & pos.attacks_from<KING>(opp_ksq));
  // A & ~B & ~C | (A & D) == A & ((~B & ~C) | D)
  b = pos.attacks_from<KING>(ksq) & ((~pos.occupied_squares() & ~sliderAttacks) | pos.attacks_from<KING>(opp_ksq));
  ENDNEW
  
  from = ksq;
  SERIALIZE_MOVES(b);
  
  NEW // unfortunatly this is not true for atomic
  // Generate evasions for other pieces only if not double check
  OLD if (checkersCnt > 1)
  OLD    return mlist;

  // Find squares where a blocking evasion or a capture of the
  // checker piece is possible.
  OLD target = squares_between(checksq, ksq) | checkers;
  
  STARTNEW
  
  if (checkersCnt <= 1) {
	  // one checker => moving a piece between is a possible evasion
	  target = squares_between(checksq, ksq) | checkers;
  } else {
	  // more checkers and we have to move the king or capture all of them
	  target = EmptyBoardBB;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x1090(%rdi), %ecx
leaq 0x190(%rdi), %rax
movq %rax, 0x30(%rsp)
movq %rcx, 0x20(%rsp)
movq %rcx, %rax
shlq $0x9, %rax
movq %rax, 0x50(%rsp)
movslq 0x310(%rdi,%rax), %rcx
movq 0x1938(%rdi), %rax
movq 0x40(%rax), %rax
movl $0x1, %esi
movq %rcx, 0x28(%rsp)
shlq %cl, %rsi
movq %rsi, 0x10(%rsp)
leaq 0x38(%rsp), %r12
movq %rax, 0x18(%rsp)
movq %rax, (%r12)
movl $0x1, %r13d
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x827b
movslq %eax, %rbp
movl (%r14,%rbp,4), %eax
andl $0x7, %eax
cmpl $0x5, %eax
je 0x19c39
cmpl $0x4, %eax
je 0x19c29
cmpl $0x3, %eax
jne 0x19cfb
leaq 0x10a729(%rip), %rax    # 0x124350
jmp 0x19c30
leaq 0x10a920(%rip), %rax    # 0x124550
orq (%rax,%rbp,8), %r15
jmp 0x19cfb
leaq 0x10a910(%rip), %rax    # 0x124550
movq (%rax,%rbp,8), %rax
testq %rax, 0x10(%rsp)
je 0x19c9d
leaq 0xf4e4e(%rip), %rcx     # 0x10eaa0
movq (%rcx,%rbp,8), %rcx
andq 0x100(%r14), %rcx
leaq 0x1575c(%rip), %rdx     # 0x2f3c0
movq (%rdx,%rbp,8), %rdx
movl %edx, %esi
imull %ecx, %esi
shrq $0x20, %rcx
shrq $0x20, %rdx
imull %ecx, %edx
xorl %esi, %edx
leaq 0x15b3f(%rip), %rcx     # 0x2f7c0
movb (%rcx,%rbp,4), %cl
shrl %cl, %edx
leaq 0xf5013(%rip), %rcx     # 0x10eca0
addl (%rcx,%rbp,4), %edx
leaq 0xf5109(%rip), %rcx     # 0x10eda0
orq (%rcx,%rdx,8), %r15
jmp 0x19cf8
leaq 0x2cafc(%rip), %rax     # 0x467a0
movq (%rax,%rbp,8), %rax
andq 0x100(%r14), %rax
leaq 0x1590a(%rip), %rcx     # 0x2f5c0
movq (%rcx,%rbp,8), %rdx
movl %edx, %ecx
imull %eax, %ecx
shrq $0x20, %rax
shrq $0x20, %rdx
imull %eax, %edx
xorl %ecx, %edx
leaq 0x15bed(%rip), %rax     # 0x2f8c0
movb (%rax,%rbp,4), %cl
shrl %cl, %edx
leaq 0x2ccc1(%rip), %rax     # 0x469a0
addl (%rax,%rbp,4), %edx
leaq 0x10a667(%rip), %rax    # 0x124350
movq (%rax,%rbp,8), %rax
leaq 0x2cdac(%rip), %rcx     # 0x46aa0
orq (%rcx,%rdx,8), %rax
orq %rax, %r15
decl %r13d
cmpq $0x0, 0x38(%rsp)
jne 0x19bfb
movq 0x20(%rsp), %rax
movl %eax, %ecx
xorl $0x1, %ecx
movq %rcx, 0x10(%rsp)
shlq $0x9, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x40(%rsp)
movslq 0x180(%rax,%rcx), %rax
orq 0x100(%r14), %r15
leaq 0xffa13(%rip), %rcx     # 0x119750
notq %r15
orq 0xc00(%rcx,%rax,8), %r15
movq 0x28(%rsp), %rax
andq 0xc00(%rcx,%rax,8), %r15
movq %r15, 0x38(%rsp)
je 0x19d81
movl %eax, %r15d
shll $0x6, %r15d
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x827b
orl %r15d, %eax
movl %eax, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x38(%rsp)
jne 0x19d68
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
addq %rcx, %rax
addq $0x180, %rax            # imm = 0x180
testl %r13d, %r13d
je 0x19da3
xorl %r13d, %r13d
movq 0x18(%rsp), %rcx
jmp 0x19dc0
shlq $0x9, %rbp
addq 0x231fa(%rip), %rbp     # 0x3cfa8
movq 0x28(%rsp), %rcx
movq (%rbp,%rcx,8), %r13
movq 0x18(%rsp), %rcx
orq %rcx, %r13
movslq (%rax), %rax
leaq 0x189b6(%rip), %rbp     # 0x32780
movq (%rbp,%rax,8), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq 0x140(%r14,%rax,8), %r12
leaq 0x38(%rsp), %r15
movq %rcx, (%r15)
movq %r12, 0x10(%rsp)
movq %r15, %rdi
callq 0x827b
cltq
movl (%r14,%rax,4), %ecx
andl $0x7, %ecx
cmpl $0x1, %ecx
je 0x19e13
andq (%rbp,%rax,8), %r12
cmpq $0x0, 0x38(%rsp)
jne 0x19dee
jmp 0x19e16
xorl %r12d, %r12d
movabsq $0xffffffffffff00, %rax # imm = 0xFFFFFFFFFFFF00
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
andq 0x18(%rsp), %rax
orq %r13, %rax
orq %r12, %rax
cmpq $0x0, 0x20(%rsp)
movq %rax, 0x10(%rsp)
je 0x1a08e
movq 0x148(%r14), %rcx
andq 0x108(%r14), %rcx
movq 0x100(%r14), %r13
notq %r13
movq %rax, %rdx
andq %r13, %rdx
movq 0x140(%r14), %rsi
andq %rax, %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movq %rcx, %rax
andq $0xff00, %rax           # imm = 0xFF00
leaq 0x2c918(%rip), %r12     # 0x467a0
movq %rdx, 0x40(%rsp)
je 0x19ee9
shrl $0x8, %eax
movl %edx, %ecx
andl %eax, %ecx
movq %rcx, 0x8(%rsp)
je 0x19ee9
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0x200, %ecx            # imm = 0x200
orl %eax, %ecx
movl %ecx, %eax
orl $0x7000, %eax           # imm = 0x7000
movl %eax, (%rbx)
movl %ecx, %eax
orl $0x6000, %eax           # imm = 0x6000
movl %eax, 0x8(%rbx)
movl %ecx, %eax
orl $0x5000, %eax           # imm = 0x5000
movl %eax, 0x10(%rbx)
orl $0x4000, %ecx           # imm = 0x4000
movl %ecx, 0x18(%rbx)
addq $0x20, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x19ea2
movq 0x20(%rsp), %rax
movq %rax, %rbp
shrq $0x8, %rbp
shrq $0x7, %rax
andq 0x18(%rsp), %rax
movabsq $0xfefefefefefefe, %rcx # imm = 0xFEFEFEFEFEFEFE
andq %rax, %rcx
movq %rcx, 0x8(%rsp)
je 0x19f3a
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0x1c0, %ecx            # imm = 0x1C0
orl %eax, %ecx
movl %ecx, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x19f17
andq %rbp, 0x28(%rsp)
andq %rbp, %r13
movq 0x20(%rsp), %rax
shrq $0x9, %rax
movq 0x18(%rsp), %rcx
andq %rax, %rcx
movabsq $0x7f7f7f7f7f7f7f, %rax # imm = 0x7F7F7F7F7F7F7F
andq %rcx, %rax
movq %rax, 0x8(%rsp)
je 0x19f8f
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0x240, %ecx            # imm = 0x240
orl %eax, %ecx
movl %ecx, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x19f6c
shrq $0x8, %r13
movq 0x40(%rsp), %rcx
andq %rcx, %r13
movabsq $0xff00000000, %rbp     # imm = 0xFF00000000
andq %r13, %rbp
movq %rbp, 0x48(%rsp)
movq 0x28(%rsp), %rax
andq %rcx, %rax
movq %rax, 0x8(%rsp)
je 0x19fe4
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0x200, %ecx            # imm = 0x200
orl %eax, %ecx
movl %ecx, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x19fc1
testq %rbp, %rbp
je 0x1a011
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0x400, %ecx            # imm = 0x400
orl %eax, %ecx
movl %ecx, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x48(%rsp)
jne 0x19fee
movq 0x1938(%r14), %rax
movslq 0x20(%rax), %rax
cmpq $0x40, %rax
je 0x1a2bc
leaq 0xff173(%rip), %rcx     # 0x1191a0
movq 0x10(%rsp), %rdx
testq %rdx, 0x40(%rcx,%rax,8)
je 0x1a2bc
leaq 0xff70c(%rip), %rcx     # 0x119750
movq 0x20(%rsp), %rdx
andq 0x200(%rcx,%rax,8), %rdx
movq %rdx, 0x8(%rsp)
je 0x1a2bc
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movq 0x1938(%r14), %rcx
shll $0x6, %eax
orl 0x20(%rcx), %eax
orl $0x8000, %eax           # imm = 0x8000
movl %eax, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a061
jmp 0x1a2bc
movq 0x140(%r14), %rbp
andq 0x108(%r14), %rbp
movq 0x100(%r14), %r13
notq %r13
movq %rax, %rcx
andq %r13, %rcx
movq 0x148(%r14), %rdx
andq %rax, %rdx
movq %rdx, 0x20(%rsp)
movabsq $0xff000000000000, %rax # imm = 0xFF000000000000
andq %rbp, %rax
leaq 0x2c6d1(%rip), %r12     # 0x467a0
movq %rcx, 0x40(%rsp)
je 0x1a130
shlq $0x8, %rax
andq %rcx, %rax
movq %rax, 0x8(%rsp)
je 0x1a130
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl %eax, %ecx
movl %ecx, %eax
orl $0x7000, %eax           # imm = 0x7000
movl %eax, (%rbx)
movl %ecx, %eax
orl $0x6000, %eax           # imm = 0x6000
movl %eax, 0x8(%rbx)
movl %ecx, %eax
orl $0x5000, %eax           # imm = 0x5000
movl %eax, 0x10(%rbx)
orl $0x4000, %ecx           # imm = 0x4000
movl %ecx, 0x18(%rbx)
addq $0x20, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a0e9
movq %rbp, %rax
shlq $0x8, %rbp
movq %rax, 0x18(%rsp)
shlq $0x9, %rax
andq 0x20(%rsp), %rax
movabsq $-0x101010101010200, %rcx # imm = 0xFEFEFEFEFEFEFE00
andq %rax, %rcx
movq %rcx, 0x8(%rsp)
je 0x1a181
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0xfffffdc0, %ecx       # imm = 0xFFFFFDC0
orl %eax, %ecx
movl %ecx, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a15e
andq %rbp, 0x28(%rsp)
andq %rbp, %r13
movq 0x18(%rsp), %rbp
movq %rbp, %rax
shlq $0x7, %rax
movq 0x20(%rsp), %rcx
andq %rax, %rcx
movabsq $0x7f7f7f7f7f7f7f00, %rax # imm = 0x7F7F7F7F7F7F7F00
andq %rcx, %rax
movq %rax, 0x8(%rsp)
je 0x1a1d9
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0xfffffe40, %ecx       # imm = 0xFFFFFE40
orl %eax, %ecx
movl %ecx, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a1b6
shll $0x8, %r13d
movq 0x40(%rsp), %rcx
andl %ecx, %r13d
andl $0xff000000, %r13d      # imm = 0xFF000000
movq %r13, 0x48(%rsp)
movq 0x28(%rsp), %rax
andq %rcx, %rax
movq %rax, 0x8(%rsp)
je 0x1a228
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl %eax, %ecx
movl %ecx, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a205
testq %r13, %r13
je 0x1a255
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movl %eax, %ecx
shll $0x6, %ecx
addl $0xfffffc00, %ecx       # imm = 0xFFFFFC00
orl %eax, %ecx
movl %ecx, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x48(%rsp)
jne 0x1a232
movq 0x1938(%r14), %rax
movslq 0x20(%rax), %rax
cmpq $0x40, %rax
je 0x1a2bc
leaq 0xfef33(%rip), %rcx     # 0x1191a0
movq 0x10(%rsp), %rdx
testq %rdx, -0x40(%rcx,%rax,8)
je 0x1a2bc
leaq 0xff4d0(%rip), %rcx     # 0x119750
andq 0x1200(%rcx,%rax,8), %rbp
movq %rbp, 0x8(%rsp)
je 0x1a2bc
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x827b
movq 0x1938(%r14), %rcx
shll $0x6, %eax
orl 0x20(%rcx), %eax
orl $0x8000, %eax           # imm = 0x8000
movl %eax, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a294
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0x80(%rax,%rcx), %ebp
cmpl $0x40, %ebp
je 0x1a328
leaq (%rax,%rcx), %r13
addq $0x80, %r13
leaq 0x8(%rsp), %r15
movslq %ebp, %rax
leaq 0xff464(%rip), %rcx     # 0x119750
movq 0x400(%rcx,%rax,8), %rax
andq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
je 0x1a31b
shll $0x6, %ebp
movq %r15, %rdi
callq 0x827b
orl %ebp, %eax
movl %eax, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a303
movl 0x4(%r13), %ebp
addq $0x4, %r13
cmpl $0x40, %ebp
jne 0x1a2e2
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0xc0(%rax,%rcx), %ebp
cmpl $0x40, %ebp
je 0x1a3dd
leaq (%rax,%rcx), %r13
addq $0xc0, %r13
leaq 0x8(%rsp), %r15
movslq %ebp, %rax
leaq 0xf4744(%rip), %rcx     # 0x10eaa0
movq (%rcx,%rax,8), %rcx
andq 0x100(%r14), %rcx
leaq 0x15052(%rip), %rdx     # 0x2f3c0
movq (%rdx,%rax,8), %rdx
movl %edx, %esi
imull %ecx, %esi
shrq $0x20, %rcx
shrq $0x20, %rdx
imull %ecx, %edx
xorl %esi, %edx
leaq 0x15435(%rip), %rcx     # 0x2f7c0
movb (%rcx,%rax,4), %cl
shrl %cl, %edx
leaq 0xf4909(%rip), %rcx     # 0x10eca0
addl (%rcx,%rax,4), %edx
leaq 0xf49ff(%rip), %rax     # 0x10eda0
movq (%rax,%rdx,8), %rax
andq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
je 0x1a3cc
shll $0x6, %ebp
movq %r15, %rdi
callq 0x827b
orl %ebp, %eax
movl %eax, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a3b4
movl 0x4(%r13), %ebp
addq $0x4, %r13
cmpl $0x40, %ebp
jne 0x1a352
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0x100(%rax,%rcx), %ebp
cmpl $0x40, %ebp
je 0x1a487
leaq (%rax,%rcx), %r13
addq $0x100, %r13            # imm = 0x100
leaq 0x8(%rsp), %r15
movslq %ebp, %rax
movq (%r12,%rax,8), %rcx
andq 0x100(%r14), %rcx
leaq 0x151a4(%rip), %rdx     # 0x2f5c0
movq (%rdx,%rax,8), %rdx
movl %edx, %esi
imull %ecx, %esi
shrq $0x20, %rcx
shrq $0x20, %rdx
imull %ecx, %edx
xorl %esi, %edx
leaq 0x15487(%rip), %rcx     # 0x2f8c0
movb (%rcx,%rax,4), %cl
shrl %cl, %edx
leaq 0x2c55b(%rip), %rcx     # 0x469a0
addl (%rcx,%rax,4), %edx
leaq 0x2c651(%rip), %rax     # 0x46aa0
movq (%rax,%rdx,8), %rax
andq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
je 0x1a47a
shll $0x6, %ebp
movq %r15, %rdi
callq 0x827b
orl %ebp, %eax
movl %eax, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a462
movl 0x4(%r13), %ebp
addq $0x4, %r13
cmpl $0x40, %ebp
jne 0x1a407
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0x140(%rax,%rcx), %ebp
cmpl $0x40, %ebp
je 0x1a581
leaq (%rax,%rcx), %r13
addq $0x140, %r13            # imm = 0x140
leaq 0x8(%rsp), %r15
movq 0x100(%r14), %rcx
movslq %ebp, %rax
movq (%r12,%rax,8), %rsi
andq %rcx, %rsi
leaq 0x150f7(%rip), %rdx     # 0x2f5c0
movq (%rdx,%rax,8), %rdx
movl %edx, %edi
imull %esi, %edi
shrq $0x20, %rsi
shrq $0x20, %rdx
imull %esi, %edx
leaq 0xf45bc(%rip), %rsi     # 0x10eaa0
andq (%rsi,%rax,8), %rcx
xorl %edi, %edx
leaq 0x14ecf(%rip), %rsi     # 0x2f3c0
movq (%rsi,%rax,8), %rsi
movl %esi, %edi
imull %ecx, %edi
shrq $0x20, %rcx
shrq $0x20, %rsi
imull %ecx, %esi
leaq 0x153b4(%rip), %rcx     # 0x2f8c0
movb (%rcx,%rax,4), %cl
shrl %cl, %edx
xorl %edi, %esi
leaq 0x2c486(%rip), %rcx     # 0x469a0
addl (%rcx,%rax,4), %edx
leaq 0x1529c(%rip), %rcx     # 0x2f7c0
movb (%rcx,%rax,4), %cl
shrl %cl, %esi
leaq 0xf4770(%rip), %rcx     # 0x10eca0
addl (%rcx,%rax,4), %esi
leaq 0xf4866(%rip), %rax     # 0x10eda0
movq (%rax,%rsi,8), %rax
leaq 0x2c55b(%rip), %rcx     # 0x46aa0
orq (%rcx,%rdx,8), %rax
andq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
je 0x1a570
shll $0x6, %ebp
movq %r15, %rdi
callq 0x827b
orl %ebp, %eax
movl %eax, (%rbx)
addq $0x8, %rbx
cmpq $0x0, 0x8(%rsp)
jne 0x1a558
movl 0x4(%r13), %ebp
addq $0x4, %r13
cmpl $0x40, %ebp
jne 0x1a4b1
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq