// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/move.cpp
// Function: pretty_pv[abi:cxx11](Position&, int, Value, int, Move*)
const string pretty_pv(Position& pos, int depth, Value score, int time, Move pv[]) {

  const int64_t K = 1000;
  const int64_t M = 1000000;
  const int startColumn = 28;
  const size_t maxLength = 80 - startColumn;
  const string lf = string("\n") + string(startColumn, ' ');

  StateInfo state[PLY_MAX_PLUS_2], *st = state;
  Move* m = pv;
  string san;
  std::stringstream s;
  size_t length = 0;

  // First print depth, score, time and searched nodes...
  s << std::setw(2) << depth
    << std::setw(8) << score_string(score)
    << std::setw(8) << time_string(time);

  if (pos.nodes_searched() < M)
      s << std::setw(8) << pos.nodes_searched() / 1 << "  ";
  else if (pos.nodes_searched() < K * M)
      s << std::setw(7) << pos.nodes_searched() / K << "K  ";
  else
      s << std::setw(7) << pos.nodes_searched() / M << "M  ";

  // ...then print the full PV line in short algebraic notation
  while (*m != MOVE_NONE)
  {
      san = move_to_san(pos, *m);
      length += san.length() + 1;

      if (length > maxLength)
      {
          length = san.length() + 1;
          s << lf;
      }
      s << san << ' ';

      pos.do_move(*m++, *st++);
  }

  // Restore original position before to leave
  while (m != pv) pos.undo_move(*--m);

  return s.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4378, %rsp           # imm = 0x4378
movq %r9, 0x10(%rsp)
movl %r8d, %r14d
movl %ecx, %ebp
movl %edx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, 0x38(%rsp)
leaq 0x3c0(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x19e3a(%rip), %rsi     # 0x31b8d
leaq 0x19e34(%rip), %rdx     # 0x31b8e
leaq 0x3b0(%rsp), %r12
movq %r12, %rdi
callq 0xa7de
leaq 0xb0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0xa0(%rsp), %rdi
movl $0x1c, %esi
movl $0x20, %edx
callq 0x5480
movq 0x3b0(%rsp), %rcx
movq 0x3b8(%rsp), %r8
movq 0xa8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x17dbb
movq 0x3c0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x17ddc
movl $0xf, %esi
cmpq %rbx, 0xa0(%rsp)
je 0x17dd7
movq 0xb0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x17df3
movq 0xa0(%rsp), %rsi
leaq 0x3b0(%rsp), %rdi
callq 0x5130
jmp 0x17e04
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x28(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x17e28
movq %rsi, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x17e2e
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x20(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x17e68
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x3b0(%rsp), %rdi
cmpq %r13, %rdi
je 0x17e85
movq 0x3c0(%rsp), %rsi
incq %rsi
callq 0x5400
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x228(%rsp), %rdi
callq 0x5290
movl %ebp, %r13d
leaq 0x238(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x248(%rsp,%rax)
movl 0x8(%rsp), %esi
callq 0x5760
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rax
movq $0x8, 0x10(%rbp,%rax)
leaq 0xa0(%rsp), %rdi
callq 0x5290
cmpl $0x7468, %r13d          # imm = 0x7468
jge 0x17f71
leaq 0xb0(%rsp), %rbx
cmpl $0xffff8b98, %r13d      # imm = 0xFFFF8B98
jle 0x17f8f
movq 0xb0(%rsp), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0xb8(%rsp,%rcx)
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0xc8(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0xc8(%rsp,%rcx)
movq -0x18(%rax), %rax
orl $0x800, 0xc8(%rsp,%rax) # imm = 0x800
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
leaq 0x244ed(%rip), %rax     # 0x3c448
cvtsi2ssl (%rax), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x56b0
jmp 0x17fbe
leaq 0x19753(%rip), %rsi     # 0x316cb
movl $0x1, %edx
movq %rbx, %rdi
callq 0x5460
movl $0x7531, %eax           # imm = 0x7531
subl %r13d, %eax
jmp 0x17fad
leaq 0x19734(%rip), %rsi     # 0x316ca
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5460
addl $0x7530, %r13d          # imm = 0x7530
movl %r13d, %eax
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
movq %rbx, %rdi
callq 0x5760
leaq 0xb8(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x5690
movq 0x23f5e(%rip), %rsi     # 0x3bf38
leaq 0xa0(%rsp), %rdi
callq 0x52c0
leaq 0x120(%rsp), %rdi
callq 0x5140
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq %rbp, %rdi
callq 0x5460
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movq $0x8, 0x10(%rbx,%rax)
leaq 0xa0(%rsp), %rdi
callq 0x5290
movq %rbx, 0x8(%rsp)
movslq %r14d, %rax
imulq $0x4a90be59, %rax, %rbx # imm = 0x4A90BE59
movq %rbx, %rax
shrq $0x3f, %rax
sarq $0x34, %rbx
addl %eax, %ebx
leal 0x36ee7f(%r14), %eax
cmpl $0x6ddcff, %eax         # imm = 0x6DDCFF
jb 0x1807a
leaq 0xb0(%rsp), %rdi
movl %ebx, %esi
callq 0x5760
leaq 0x7(%rsp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x5460
movq 0xb0(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rbp
addq $0xb0, %rbp
cmpb $0x0, 0xe1(%rbp)
jne 0x180b4
movq %rbp, %rdi
movl $0x20, %esi
callq 0x53c0
movb %al, 0xe0(%rbp)
movb $0x1, 0xe1(%rbp)
imull $0x36ee80, %ebx, %eax   # imm = 0x36EE80
subl %eax, %r14d
movslq %r14d, %rax
imulq $0x45e7b273, %rax, %r13 # imm = 0x45E7B273
movq %r13, %rax
shrq $0x3f, %rax
sarq $0x2e, %r13
addl %eax, %r13d
leaq 0xb0(%rsp), %rdi
movb $0x30, 0xe0(%rbp)
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x2, 0xc0(%rsp,%rax)
movl %r13d, %esi
callq 0x5760
leaq 0x7(%rsp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x5460
imull $0xea60, %r13d, %ecx    # imm = 0xEA60
subl %ecx, %r14d
movslq %r14d, %rcx
imulq $0x10624dd3, %rcx, %rsi # imm = 0x10624DD3
movq %rsi, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rsi
addl %ecx, %esi
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movq %rax, %rdi
callq 0x5760
leaq 0xb8(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x5690
movq 0x23dd2(%rip), %rsi     # 0x3bf38
leaq 0xa0(%rsp), %rdi
callq 0x52c0
leaq 0x120(%rsp), %rdi
callq 0x5140
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x5460
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x181af
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5400
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x181d0
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x1930(%r15), %rax
cmpq $0xf423f, %rax          # imm = 0xF423F
jg 0x18218
movq 0x238(%rsp), %rcx
movq -0x18(%rcx), %rcx
movq $0x8, 0x248(%rsp,%rcx)
leaq 0x238(%rsp), %rdi
movq %rax, %rsi
callq 0x5390
movl $0x2, %edx
leaq 0x1842c(%rip), %rsi     # 0x3063f
jmp 0x18298
movq 0x238(%rsp), %rcx
movq -0x18(%rcx), %rcx
movq $0x7, 0x248(%rsp,%rcx)
cmpq $0x3b9ac9ff, %rax       # imm = 0x3B9AC9FF
jg 0x1826b
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
leaq 0x238(%rsp), %rdi
movq %rdx, %rsi
callq 0x5390
movl $0x3, %edx
leaq 0x19459(%rip), %rsi     # 0x316c2
jmp 0x18298
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
mulq %rcx
shrq $0x12, %rdx
leaq 0x238(%rsp), %rdi
movq %rdx, %rsi
callq 0x5390
movl $0x3, %edx
leaq 0x1942e(%rip), %rsi     # 0x316c6
movq %rax, %rdi
callq 0x5460
xorl %ebx, %ebx
leaq 0xa0(%rsp), %rbp
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
movl (%rax,%rbx), %edx
testl %edx, %edx
je 0x18393
movq %rbp, %rdi
movq %r15, %rsi
callq 0x17895
leaq 0x40(%rsp), %rdi
movq %rbp, %rsi
callq 0x5200
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x182fa
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x48(%rsp), %r13
addq %r13, %r14
incq %r14
cmpq $0x35, %r14
jb 0x18328
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x238(%rsp), %rdi
callq 0x5460
incq %r13
movq %r13, %r14
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x238(%rsp), %rdi
callq 0x5460
movb $0x20, 0xa0(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5460
movq 0x10(%rsp), %rax
movl (%rax,%rbx), %esi
leaq 0xa0(%r12), %r13
addq $0x4, %rbx
movq %r15, %rdi
movq %r12, %rdx
callq 0x1ef10
movq %r13, %r12
jmp 0x182ad
movq 0x10(%rsp), %rax
movl -0x4(%rax,%rbx), %esi
addq $-0x4, %rbx
movq %r15, %rdi
callq 0x20056
testq %rbx, %rbx
jne 0x1837e
leaq 0x240(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x5690
movq 0x23b87(%rip), %rsi     # 0x3bf38
leaq 0x228(%rsp), %rdi
callq 0x52c0
leaq 0x2a8(%rsp), %rdi
callq 0x5140
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x183e7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5400
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18402
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x38(%rsp), %rax
addq $0x4378, %rsp           # imm = 0x4378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x184ee
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x184ee
jmp 0x18442
movq %rax, %r14
jmp 0x184ee
jmp 0x18537
movq %rax, %r14
jmp 0x1855b
movq %rax, %r14
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1847c
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x1847c
movq %rax, %r14
movq 0x3b0(%rsp), %rdi
cmpq %r13, %rdi
je 0x18592
movq 0x3c0(%rsp), %rsi
jmp 0x1858a
movq %rax, %r14
jmp 0x18592
movq %rax, %r14
movq 0x23a8c(%rip), %rsi     # 0x3bf38
leaq 0xa0(%rsp), %rdi
callq 0x52c0
leaq 0x120(%rsp), %rdi
callq 0x5140
jmp 0x1853a
jmp 0x18537
movq %rax, %r14
movq 0x23a64(%rip), %rsi     # 0x3bf38
leaq 0xa0(%rsp), %rdi
callq 0x52c0
leaq 0x120(%rsp), %rdi
callq 0x5140
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1853a
movq 0x90(%rsp), %rsi
jmp 0x1852d
jmp 0x18537
jmp 0x18537
movq %rax, %r14
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x1853a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x1853a
movq %rax, %r14
movq 0x239f7(%rip), %rsi     # 0x3bf38
leaq 0x228(%rsp), %rdi
callq 0x52c0
leaq 0x2a8(%rsp), %rdi
callq 0x5140
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x18577
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5400
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18592
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5400
movq %r14, %rdi
callq 0x5790