// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/position.cpp
// Function: Position::do_move(Move, StateInfo&, CheckInfo const&, bool)
void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveIsCheck) {

  assert(is_ok());
  assert(move_is_ok(m));
  assert(&newSt != st);

  nodes++;
  Key key = st->key;

  // Copy some fields of old state to our new StateInfo object except the
  // ones which are recalculated from scratch anyway, then switch our state
  // pointer to point to the new, ready to be updated, state.
  struct ReducedStateInfo {
    Key pawnKey, materialKey;
    int castleRights, rule50, gamePly, pliesFromNull;
    Square epSquare;
    Score value;
    Value npMaterial[2];
  };

  memcpy(&newSt, st, sizeof(ReducedStateInfo));

  newSt.previous = st;
  st = &newSt;

  // Save the current key to the history[] array, in order to be able to
  // detect repetition draws.
  history[st->gamePly++] = key;

  // Update side to move
  key ^= zobSideToMove;

  // Increment the 50 moves rule draw counter. Resetting it to zero in the
  // case of non-reversible moves is taken care of later.
  st->rule50++;
  st->pliesFromNull++;

  if (move_is_castle(m))
  {
      st->key = key;
      do_castle_move(m);
      return;
  }

  Color us = side_to_move();
  Color them = opposite_color(us);
  Square from = move_from(m);
  Square to = move_to(m);
  bool ep = move_is_ep(m);
  bool pm = move_is_promotion(m);

  Piece piece = piece_on(from);
  PieceType pt = type_of_piece(piece);
  PieceType capture = ep ? PAWN : type_of_piece_on(to);

  assert(color_of_piece_on(from) == us);
  assert(color_of_piece_on(to) == them || square_is_empty(to));
  assert(!(ep || pm) || piece == make_piece(us, PAWN));
  assert(!pm || relative_rank(us, to) == RANK_8);
  
  if (capture)
      do_capture_move(key, capture, them, to, from, ep);

  // Update hash key
  key ^= zobrist[us][pt][from] ^ zobrist[us][pt][to];

  // Reset en passant square
  if (st->epSquare != SQ_NONE)
  {
      key ^= zobEp[st->epSquare];
      st->epSquare = SQ_NONE;
  }

  // Update castle rights, try to shortcut a common case
  int cm = castleRightsMask[from] & castleRightsMask[to];
  NEW if (capture) cm &= expl_castleRightsMask[to];	// 
  if (cm != ALL_CASTLES && ((cm & st->castleRights) != st->castleRights))
  {
      key ^= zobCastle[st->castleRights];
      OLD st->castleRights &= castleRightsMask[from];
      OLD st->castleRights &= castleRightsMask[to];
      NEW st->castleRights &= cm;
      key ^= zobCastle[st->castleRights];
  }
  
  // TODO: PREFETCH
  // Prefetch TT access as soon as we know key is updated
  prefetch((char*)TT.first_entry(key));

  // Move the piece
  Bitboard move_bb = make_move_bb(from, to);
  do_move_bb(&(byColorBB[us]), move_bb);
  do_move_bb(&(byTypeBB[pt]), move_bb);
  do_move_bb(&(byTypeBB[0]), move_bb); // HACK: byTypeBB[0] == occupied squares

  board[to] = board[from];
  board[from] = PIECE_NONE;

  // Update piece lists, note that index[from] is not updated and
  // becomes stale. This works as long as index[] is accessed just
  // by known occupied squares.
  index[to] = index[from];
  pieceList[us][pt][index[to]] = to;

  // If the moving piece was a pawn do some special extra work
  if (pt == PAWN)
  {
      // Reset rule 50 draw counter
      st->rule50 = 0;

      // Update pawn hash key and prefetch in L1/L2 cache
      OLD st->pawnKey ^= zobrist[us][PAWN][from] ^ zobrist[us][PAWN][to];
      STARTNEW
      if (capture) {
    	  st->pawnKey ^= zobrist[us][PAWN][from];
      } else {
    	  st->pawnKey ^= zobrist[us][PAWN][from] ^ zobrist[us][PAWN][to];
      }
      ENDNEW

      // Set en passant square, only if moved pawn can be captured
      if ((to ^ from) == 16)
      {
          if (attacks_from<PAWN>(from + (us == WHITE ? DELTA_N : DELTA_S), us) & pieces(PAWN, them))
          {
              st->epSquare = Square((int(from) + int(to)) / 2);
              key ^= zobEp[st->epSquare];
          }
      }

      if (pm) // promotion ?
      //NEW if (pm && !capture)	// if capture the following code is unnecessary
      {
    	  NEW assert(!capture); // if capture the following code is unnecessary
    	  
          PieceType promotion = move_promotion_piece(m);

          assert(promotion >= KNIGHT && promotion <= QUEEN);

          // Insert promoted piece instead of pawn
          clear_bit(&(byTypeBB[PAWN]), to);
          set_bit(&(byTypeBB[promotion]), to);
          board[to] = make_piece(us, promotion);

          // Update piece counts
          pieceCount[us][promotion]++;
          pieceCount[us][PAWN]--;

          // Update material key
          st->materialKey ^= zobrist[us][PAWN][pieceCount[us][PAWN]];
          st->materialKey ^= zobrist[us][promotion][pieceCount[us][promotion]-1];

          // Update piece lists, move the last pawn at index[to] position
          // and shrink the list. Add a new promotion piece to the list.
          Square lastPawnSquare = pieceList[us][PAWN][pieceCount[us][PAWN]];
          index[lastPawnSquare] = index[to];
          pieceList[us][PAWN][index[lastPawnSquare]] = lastPawnSquare;
          pieceList[us][PAWN][pieceCount[us][PAWN]] = SQ_NONE;
          index[to] = pieceCount[us][promotion] - 1;
          pieceList[us][promotion][index[to]] = to;

          // Partially revert hash keys update
          key ^= zobrist[us][PAWN][to] ^ zobrist[us][promotion][to];
          st->pawnKey ^= zobrist[us][PAWN][to];

          // Partially revert and update incremental scores
          st->value -= pst(us, PAWN, to);
          st->value += pst(us, promotion, to);

          // Update material
          st->npMaterial[us] += PieceValueMidgame[promotion];
      }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
incq 0x1930(%rdi)
movl %esi, %r14d
movq 0x1938(%rdi), %rax
movq 0x38(%rax), %rdi
movq %rdi, 0x10(%rsp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
movq 0x1938(%rbx), %rax
movq %rax, 0x98(%rdx)
movq %rdx, 0x1938(%rbx)
movq 0x39b252(%rip), %rax    # 0x3ba210
xorq %rdi, %rax
movq %rax, 0x10(%rsp)
movq 0x14(%rdx), %xmm0
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
movd %xmm1, %esi
movslq %esi, %rsi
movq %rdi, 0x1098(%rbx,%rsi,8)
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x14(%rdx)
incl 0x1c(%rdx)
movl $0xc000, %esi           # imm = 0xC000
movl %r14d, %r15d
andl %esi, %r15d
cmpl %esi, %r15d
jne 0x1f01f
movq %rax, 0x38(%rdx)
movq %rbx, %rdi
movl %r14d, %esi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f8da
movl %r8d, 0x54(%rsp)
movq %rcx, 0x38(%rsp)
movl 0x1090(%rbx), %ecx
movq %rcx, 0x18(%rsp)
xorq $0x1, %rcx
movq %rcx, 0x40(%rsp)
movl %r14d, %r13d
shrl $0x6, %r13d
andl $0x3f, %r13d
movl %r14d, %ebp
andl $0x3f, %ebp
movl (%rbx,%r13,4), %r12d
movq %r12, 0x80(%rsp)
andl $0x7, %r12d
movl $0x1, %edx
movl %ebp, %edi
cmpl $0x8000, %r15d          # imm = 0x8000
je 0x1f074
movl (%rbx,%rdi,4), %edx
andl $0x7, %edx
testl %edx, %edx
movq %rdi, 0x48(%rsp)
movl %edx, 0x24(%rsp)
je 0x1f0b1
xorl %eax, %eax
cmpl $0x8000, %r15d          # imm = 0x8000
sete %al
movl %eax, (%rsp)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq 0x40(%rsp), %rcx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x1fcae
movl 0x24(%rsp), %edx
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rcx
shlq $0xc, %rcx
leaq 0x398ecf(%rip), %rax    # 0x3b7f90
movq %rcx, 0x30(%rsp)
addq %rax, %rcx
movl %r12d, %eax
shll $0x9, %eax
movq %rcx, 0x60(%rsp)
addq %rcx, %rax
movq (%rax,%rdi,8), %rcx
xorq (%rax,%r13,8), %rcx
xorq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x1938(%rbx), %rax
movslq 0x20(%rax), %r8
cmpq $0x40, %r8
je 0x1f111
leaq 0x39ae8f(%rip), %rsi    # 0x3b9f90
xorq (%rsi,%r8,8), %rcx
movq %rcx, 0x10(%rsp)
movl $0x40, 0x20(%rax)
movl 0x1778(%rbx,%rdi,4), %ecx
andl 0x1778(%rbx,%r13,4), %ecx
testl %edx, %edx
je 0x1f12e
leaq 0x12f95(%rip), %rdx     # 0x320c0
andl (%rdx,%rdi,4), %ecx
cmpl $0xf, %ecx
je 0x1f161
movslq 0x10(%rax), %rdx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x1f161
leaq 0x39b04c(%rip), %rsi    # 0x3ba190
movq 0x10(%rsp), %rdi
xorq (%rsi,%rdx,8), %rdi
movq %rdi, 0x10(%rsp)
movl %ecx, 0x10(%rax)
movslq %ecx, %rax
xorq (%rsi,%rax,8), %rdi
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rcx
leaq 0x3ac573(%rip), %rax    # 0x3cb6e0
movl (%rax), %edi
decl %edi
movq %rcx, 0x28(%rsp)
andl %ecx, %edi
shlq $0x6, %rdi
addq 0x8(%rax), %rdi
callq 0x16fd2
leaq 0xf9014(%rip), %rcx     # 0x1181a0
movq 0x48(%rsp), %r9
movq (%rcx,%r9,8), %rax
orq (%rcx,%r13,8), %rax
movq 0x18(%rsp), %rsi
xorq %rax, 0x140(%rbx,%rsi,8)
xorq %rax, 0x100(%rbx,%r12,8)
xorq %rax, 0x100(%rbx)
leal (,%r13,4), %eax
movl (%rbx,%rax), %ecx
leal (,%r9,4), %edx
movl %ecx, (%rbx,%rdx)
movl $0x10, (%rbx,%rax)
movslq 0x590(%rbx,%rax), %rax
movl %eax, 0x590(%rbx,%rdx)
leaq 0x190(%rbx), %rcx
movq %rcx, 0x68(%rsp)
shlq $0x9, %rsi
movq %rsi, 0x58(%rsp)
leaq (%rbx,%rsi), %rcx
addq $0x190, %rcx            # imm = 0x190
movl %r12d, %edx
shll $0x6, %edx
addq %rcx, %rdx
movl %ebp, (%rdx,%rax,4)
cmpl $0x1, %r12d
movl 0x24(%rsp), %edi
jne 0x1f46b
movq 0x1938(%rbx), %rax
movl $0x0, 0x14(%rax)
movq 0x60(%rsp), %rdx
movq 0x200(%rdx,%r13,8), %rcx
testl %edi, %edi
je 0x1f23f
movq (%rax), %rdx
jmp 0x1f24a
movq 0x200(%rdx,%r9,8), %rdx
xorq (%rax), %rdx
xorq %rcx, %rdx
movq %rdx, (%rax)
movl %r13d, %ecx
xorl %ebp, %ecx
cmpl $0x10, %ecx
jne 0x1f2bc
xorl %ecx, %ecx
movq 0x18(%rsp), %rdx
testq %rdx, %rdx
sete %cl
shll $0x4, %ecx
addl %r13d, %ecx
leal 0x1(,%rdx,8), %edx
shlq $0x9, %rdx
addq 0x1cd59(%rip), %rdx     # 0x3bfd8
movq 0x108(%rbx), %rsi
andq -0x40(%rdx,%rcx,8), %rsi
movq 0x40(%rsp), %rcx
testq %rsi, 0x140(%rbx,%rcx,8)
je 0x1f2bc
leal (%r13,%rbp), %ecx
shrb %cl
movzbl %cl, %ecx
movl %ecx, 0x20(%rax)
leaq 0x39ace2(%rip), %rdx    # 0x3b9f90
movq 0x28(%rsp), %rsi
xorq (%rdx,%rcx,8), %rsi
movq %rsi, 0x10(%rsp)
cmpl $0x4000, %r15d          # imm = 0x4000
jne 0x1f46b
shrl $0xc, %r14d
andl $0x3, %r14d
leal 0x2(%r14), %edi
leal (,%r9,8), %edx
movq %rdx, 0x28(%rsp)
leaq 0xf90c7(%rip), %rcx     # 0x1183b0
movq (%rcx,%rdx), %rcx
andq %rcx, 0x108(%rbx)
leaq 0xf8ea5(%rip), %rcx     # 0x1181a0
movq (%rcx,%rdx), %rcx
orq %rcx, 0x100(%rbx,%rdi,8)
movq 0x18(%rsp), %rdx
leal (%r14,%rdx,8), %ecx
addl $0x2, %ecx
leal (,%r9,4), %esi
movq %rsi, 0x78(%rsp)
movl %ecx, (%rbx,%rsi)
movq %rdx, %r9
shlq $0x5, %r9
leaq (%rbx,%r9), %r10
leal 0x8(,%r14,4), %edx
movq %rdx, 0x70(%rsp)
movslq 0x150(%rdx,%r10), %r11
leal 0x1(%r11), %r14d
movl %r14d, 0x150(%rdx,%r10)
movslq 0x154(%rbx,%r9), %r14
leaq -0x1(%r14), %rsi
movl %esi, 0x154(%rbx,%r9)
movl %edi, %esi
shll $0x9, %esi
leaq 0x398c21(%rip), %r8     # 0x3b7f90
addq %rsi, %r8
movq 0x8(%rax), %rsi
movq 0x60(%rsp), %rdx
xorq 0x1f8(%rdx,%r14,8), %rsi
addq 0x30(%rsp), %r8
movq %rsi, 0x8(%rax)
xorq (%r8,%r11,8), %rsi
movq %rsi, 0x8(%rax)
movq 0x68(%rsp), %rsi
movq 0x58(%rsp), %r11
addq %r11, %rsi
movslq 0x3c(%rsi,%r14,4), %r11
movq %r12, 0x30(%rsp)
movq 0x78(%rsp), %r12
movslq 0x590(%rbx,%r12), %r14
movl %r14d, 0x590(%rbx,%r11,4)
movl %r11d, 0x40(%rsi,%r14,4)
movslq 0x154(%rbx,%r9), %r9
movl $0x40, 0x40(%rsi,%r9,4)
movq 0x70(%rsp), %r11
movslq 0x150(%r11,%r10), %r9
leaq -0x1(%r9), %r10
movq %r12, %r14
movq 0x30(%rsp), %r12
movl %r10d, 0x590(%rbx,%r14)
shll $0x6, %edi
addq %rsi, %rdi
movl %ebp, -0x4(%rdi,%r9,4)
movq 0x28(%rsp), %rdi
movq 0x200(%rdx,%rdi), %rsi
movq (%rdi,%r8), %rdi
xorq 0x10(%rsp), %rdi
xorq %rsi, %rdi
movq %rdi, 0x10(%rsp)
xorq %rsi, (%rax)
movq 0x18(%rsp), %rdx
leal 0x1(,%rdx,8), %esi
shlq $0x8, %rsi
leaq 0x39ade6(%rip), %rdi    # 0x3ba220
addq %rdi, %rsi
movl 0x24(%rax), %r8d
subl (%r14,%rsi), %r8d
shlq $0x8, %rcx
addq %rdi, %rcx
movl %r8d, 0x24(%rax)
addl (%r14,%rcx), %r8d
movl %r8d, 0x24(%rax)
movl 0x24(%rsp), %edi
leaq 0x39bdbd(%rip), %rcx    # 0x3bb220
movl (%r11,%rcx), %ecx
addl %ecx, 0x28(%rax,%rdx,4)
testl %edi, %edi
je 0x1f486
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq 0x18(%rsp), %rdx
movl %ebp, %ecx
movl %r12d, %r8d
callq 0x1fedc
movslq 0x192c(%rbx), %rax
movq 0x1938(%rbx), %rcx
movq (%rcx), %rcx
imulq $0x560, %rax, %rax      # imm = 0x560
leaq 0x3a15eb(%rip), %r14    # 0x3c0a90
andl $0x3fff, %ecx           # imm = 0x3FFF
leaq (%rcx,%rcx,8), %rdi
shll $0x3, %edi
addq 0x60(%r14,%rax), %rdi
callq 0x16fd2
movslq 0x192c(%rbx), %rax
movq 0x1938(%rbx), %rcx
movq 0x8(%rcx), %rcx
imulq $0x560, %rax, %rax      # imm = 0x560
andl $0x1fff, %ecx           # imm = 0x1FFF
leaq (%rcx,%rcx,2), %rdi
shll $0x4, %edi
addq 0x48(%r14,%rax), %rdi
callq 0x16fd2
movq 0x80(%rsp), %rcx
shlq $0x8, %rcx
leaq 0x39ad21(%rip), %rax    # 0x3ba220
addq %rcx, %rax
movq 0x48(%rsp), %rdi
movl (%rax,%rdi,4), %ecx
subl (%rax,%r13,4), %ecx
movq 0x1938(%rbx), %rax
addl %ecx, 0x24(%rax)
movl 0x24(%rsp), %r8d
movl %r8d, 0x30(%rax)
movl %r12d, 0x34(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq $0x0, 0x40(%rax)
movl 0x40(%rsp), %ecx
movq %rcx, %rdx
shlq $0x5, %rdx
cmpl $0x0, 0x168(%rbx,%rdx)
sete %dl
movl 0x54(%rsp), %esi
xorb $0x1, %sil
orb %dl, %sil
jne 0x1f89d
shlq $0x9, %rcx
movq 0x68(%rsp), %rdx
movslq 0x180(%rdx,%rcx), %r14
movq %rdx, %rcx
cmpl $0x4000, %r15d          # imm = 0x4000
je 0x1f6c0
testl %r8d, %r8d
jne 0x1f6c0
cmpl $0x6, %r12d
jne 0x1f5b8
movl %r13d, %ecx
shll $0x6, %ecx
addq 0x1c9de(%rip), %rcx     # 0x3bf78
cmpb $0x0, (%r14,%rcx)
je 0x1f5b8
movl %edi, %ecx
shll $0x6, %ecx
addq 0x1c9cb(%rip), %rcx     # 0x3bf78
cmpb $0x0, (%r14,%rcx)
je 0x1f806
leaq 0xf8be1(%rip), %rcx     # 0x1181a0
movq (%rcx,%rdi,8), %rcx
movq 0x38(%rsp), %rdx
testq %rcx, 0x8(%rdx,%r12,8)
je 0x1f5d3
movq %rcx, 0x40(%rax)
movq (%rdx), %rax
testq %rax, %rax
je 0x1f89d
leaq 0xf8bba(%rip), %rcx     # 0x1181a0
testq %rax, (%rcx,%r13,8)
je 0x1f89d
cmpl $0x4, %r12d
je 0x1f639
movq 0x38(%rsp), %rax
movl 0x48(%rax), %esi
movq %rbx, %rdi
callq 0x20cfc
movq 0x128(%rbx), %rcx
orq 0x120(%rbx), %rcx
movq 0x18(%rsp), %rdx
andq 0x140(%rbx,%rdx,8), %rax
andq %rcx, %rax
movq 0x1938(%rbx), %rcx
orq %rax, 0x40(%rcx)
cmpl $0x3, %r12d
je 0x1f89d
movq 0x38(%rsp), %rax
movslq 0x48(%rax), %rax
leaq 0xee457(%rip), %rcx     # 0x10daa0
movq (%rcx,%rax,8), %rcx
andq 0x100(%rbx), %rcx
leaq 0xece5(%rip), %rdx      # 0x2e340
movq (%rdx,%rax,8), %rdx
movl %edx, %esi
imull %ecx, %esi
shrq $0x20, %rcx
shrq $0x20, %rdx
imull %ecx, %edx
xorl %esi, %edx
leaq 0xf0c8(%rip), %rcx      # 0x2e740
movb (%rcx,%rax,4), %cl
shrl %cl, %edx
leaq 0xee61c(%rip), %rcx     # 0x10dca0
addl (%rcx,%rax,4), %edx
leaq 0xee712(%rip), %rax     # 0x10dda0
movq 0x128(%rbx), %rcx
orq 0x118(%rbx), %rcx
movq 0x18(%rsp), %rsi
movq 0x140(%rbx,%rsi,8), %rsi
andq (%rax,%rdx,8), %rsi
andq %rcx, %rsi
movq 0x1938(%rbx), %rax
orq %rsi, 0x40(%rax)
jmp 0x1f89d
movq 0x58(%rsp), %rdx
movslq 0x180(%rcx,%rdx), %rcx
shlq $0x6, %rcx
addq 0x1c8a0(%rip), %rcx     # 0x3bf78
cmpb $0x0, (%r14,%rcx)
je 0x1f6ec
movq $0x0, 0x40(%rax)
jmp 0x1f89d
leaq 0xf905d(%rip), %rcx     # 0x118750
movq 0x140(%rbx), %rdx
andq 0x1200(%rcx,%r14,8), %rdx
movq 0x148(%rbx), %rsi
andq 0x200(%rcx,%r14,8), %rsi
orq %rdx, %rsi
andq 0x108(%rbx), %rsi
movq 0x100(%rbx), %rdx
movq 0x110(%rbx), %rdi
andq 0x400(%rcx,%r14,8), %rdi
leaq 0x26068(%rip), %rcx     # 0x457a0
movq (%rcx,%r14,8), %rcx
andq %rdx, %rcx
leaq 0xedfa(%rip), %r8       # 0x2e540
movq (%r8,%r14,8), %r9
movl %r9d, %r8d
imull %ecx, %r8d
shrq $0x20, %rcx
shrq $0x20, %r9
imull %ecx, %r9d
xorl %r8d, %r9d
leaq 0xf0d9(%rip), %rcx      # 0x2e840
movb (%rcx,%r14,4), %cl
shrl %cl, %r9d
orq %rsi, %rdi
leaq 0x26228(%rip), %rcx     # 0x459a0
addl (%rcx,%r14,4), %r9d
leaq 0x2631d(%rip), %rcx     # 0x45aa0
movq 0x128(%rbx), %rsi
movq 0x120(%rbx), %r8
orq %rsi, %r8
andq (%rcx,%r9,8), %r8
orq %rdi, %r8
leaq 0xee2fe(%rip), %rcx     # 0x10daa0
andq (%rcx,%r14,8), %rdx
leaq 0xeb93(%rip), %rcx      # 0x2e340
movq (%rcx,%r14,8), %rdi
movl %edi, %ecx
imull %edx, %ecx
shrq $0x20, %rdx
shrq $0x20, %rdi
imull %edx, %edi
xorl %ecx, %edi
leaq 0xef76(%rip), %rcx      # 0x2e740
movb (%rcx,%r14,4), %cl
shrl %cl, %edi
leaq 0xee4c9(%rip), %rcx     # 0x10dca0
addl (%rcx,%r14,4), %edi
leaq 0xee5be(%rip), %rcx     # 0x10dda0
orq 0x118(%rbx), %rsi
andq (%rcx,%rdi,8), %rsi
orq %r8, %rsi
movq 0x18(%rsp), %rcx
andq 0x140(%rbx,%rcx,8), %rsi
movq %rsi, 0x40(%rax)
jmp 0x1f89d
leaq 0xf8f43(%rip), %rax     # 0x118750
movq 0x110(%rbx), %r12
movq 0x140(%rbx), %rcx
andq 0x1200(%rax,%r14,8), %rcx
movq 0x148(%rbx), %r15
andq 0x200(%rax,%r14,8), %r15
orq %rcx, %r15
andq 0x108(%rbx), %r15
andq 0x400(%rax,%r14,8), %r12
movq %rbx, %rdi
movl %r14d, %esi
callq 0x20cfc
movq 0x128(%rbx), %r13
orq 0x120(%rbx), %r13
andq %rax, %r13
orq %r12, %r13
movq %rbx, %rdi
movl %r14d, %esi
callq 0xe010
movq 0x128(%rbx), %rcx
orq 0x118(%rbx), %rcx
andq %rax, %rcx
orq %r13, %rcx
orq %r15, %rcx
movq 0x18(%rsp), %rax
andq 0x140(%rbx,%rax,8), %rcx
movq 0x1938(%rbx), %rax
movq %rcx, 0x40(%rax)
movl 0x1090(%rbx), %eax
movl %eax, %ecx
xorl $0x1, %ecx
movl %ecx, 0x1090(%rbx)
movl 0x39ba2c(%rip), %ecx    # 0x3bb2e0
movl %ecx, %edx
negl %edx
cmpl $0x1, %eax
cmovel %ecx, %edx
movq 0x1938(%rbx), %rax
addl %edx, 0x24(%rax)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq