// File: /workspace/github_cpp_makefile_star2_O3/ATOMIC-LICHESS[P]ATOMKRAFT/uci.cpp
// Function: execute_uci_command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool execute_uci_command(const string& cmd) {

  static Position pos(StartPositionFEN, false, 0); // The root position

  UCIParser up(cmd);
  string token;

  up >> token; // operator>>() skips any whitespace

  if (token == "quit")
      return false;

  if (token == "go")
      return go(pos, up);

  if (token == "ucinewgame")
      pos.from_fen(StartPositionFEN, false);

  else if (token == "isready")
      cout << "readyok" << endl;

  else if (token == "position")
      set_position(pos, up);

  else if (token == "setoption")
      set_option(up);

  else if (token == "perft")
      perft(pos, up);

  else if (token == "d")
      pos.print();

  else if (token == "flip")
      pos.flip();

  else if (token == "eval")
  {
      read_evaluation_uci_options(pos.side_to_move());
      cout << trace_evaluate(pos) << endl;
  }

  else if (token == "key")
      cout << "key: " << hex     << pos.get_key()
           << "\nmaterial key: " << pos.get_material_key()
           << "\npawn key: "     << pos.get_pawn_key() << endl;

  else if (token == "uci")
      cout << "id name "     << engine_name()
           << "\nid author " << engine_authors()
           << "\n"           << Options.print_all()
           << "\nuciok"      << endl;
  else
      cout << "Unknown command: " << cmd << endl;

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x608, %rsp            # imm = 0x608
movq %rdi, %rbx
movb 0x3a3456(%rip), %al     # 0x3ce068
testb %al, %al
je 0x2b55f
leaq 0x488(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x5720
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x5510
leaq 0x883b(%rip), %rsi      # 0x33496
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2adb0
leaq 0x931a(%rip), %rsi      # 0x33f8e
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2adb7
leaq 0x9213(%rip), %rsi      # 0x33ea0
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b009
leaq 0x9205(%rip), %rsi      # 0x33eab
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b025
leaq 0x91fc(%rip), %rsi      # 0x33ebb
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b072
leaq 0x91ec(%rip), %rsi      # 0x33ec4
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b11a
leaq 0x91dd(%rip), %rsi      # 0x33ece
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b12e
leaq 0x6a7a(%rip), %rsi      # 0x31784
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b171
leaq 0x91b1(%rip), %rsi      # 0x33ed4
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b2fa
leaq 0x919d(%rip), %rsi      # 0x33ed9
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b30d
leaq 0x9189(%rip), %rsi      # 0x33ede
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b36a
leaq 0x9190(%rip), %rsi      # 0x33efe
leaq 0x40(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b456
movq 0x12219(%rip), %rdi     # 0x3cfa0
leaq 0x9190(%rip), %rsi      # 0x33f1e
movl $0x11, %edx
callq 0x5460
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x121fa(%rip), %rdi     # 0x3cfa0
callq 0x5460
jmp 0x2b400
xorl %ebx, %ebx
jmp 0x2b40a
leaq 0x30(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
xorps %xmm0, %xmm0
leaq 0xc(%rsp), %rcx
movups %xmm0, (%rcx)
movaps %xmm0, -0xc(%rcx)
leaq 0x74(%rsp), %rcx
movq %rax, -0x4(%rcx)
leaq 0x6c(%rsp), %rcx
movq %rax, -0x4(%rcx)
leaq 0x80(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x488(%rsp), %rbx
leaq 0x20(%rsp), %r14
leaq 0x9156(%rip), %r15      # 0x33f61
leaq 0x9158(%rip), %r12      # 0x33f6a
leaq 0x9158(%rip), %r13      # 0x33f71
leaq 0x70(%rsp), %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5510
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2af9e
movq %r14, %rdi
movq %r15, %rsi
callq 0x5120
testl %eax, %eax
je 0x2af4d
movq %r14, %rdi
movq %r12, %rsi
callq 0x5120
testl %eax, %eax
je 0x2af57
movq %r14, %rdi
movq %r13, %rsi
callq 0x5120
movq %rbp, %rsi
testl %eax, %eax
je 0x2af40
movq %r14, %rdi
leaq 0x90f6(%rip), %rsi      # 0x33f77
callq 0x5120
leaq 0x74(%rsp), %rsi
testl %eax, %eax
je 0x2af40
movq %r14, %rdi
leaq 0x90e0(%rip), %rsi      # 0x33f7d
callq 0x5120
leaq 0x68(%rsp), %rsi
testl %eax, %eax
je 0x2af40
movq %r14, %rdi
leaq 0x90c9(%rip), %rsi      # 0x33f82
callq 0x5120
leaq 0x6c(%rsp), %rsi
testl %eax, %eax
je 0x2af40
movq %r14, %rdi
leaq 0x90b6(%rip), %rsi      # 0x33f87
callq 0x5120
leaq 0x8(%rsp), %rsi
testl %eax, %eax
je 0x2af40
movq %r14, %rdi
leaq 0x90a8(%rip), %rsi      # 0x33f91
callq 0x5120
leaq 0x10(%rsp), %rsi
testl %eax, %eax
je 0x2af40
movq %r14, %rdi
leaq 0x9096(%rip), %rsi      # 0x33f97
callq 0x5120
leaq 0x14(%rsp), %rsi
testl %eax, %eax
je 0x2af40
movq %r14, %rdi
leaq 0x9084(%rip), %rsi      # 0x33f9d
callq 0x5120
leaq 0xc(%rsp), %rsi
testl %eax, %eax
je 0x2af40
movq %r14, %rdi
leaq 0x9075(%rip), %rsi      # 0x33fa6
callq 0x5120
testl %eax, %eax
jne 0x2ae1e
jmp 0x2af80
movq %rbx, %rdi
callq 0x5220
jmp 0x2ae1e
movb $0x1, 0x18(%rsp)
jmp 0x2ae1e
movb $0x1, 0x19(%rsp)
jmp 0x2ae1e
leaq 0x3a17c0(%rip), %rdi    # 0x3cc728
movq %r14, %rsi
callq 0x17d3a
movq 0x60(%rsp), %rcx
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x60(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5510
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x2af61
jmp 0x2ae1e
movq 0x60(%rsp), %rax
movl $0x0, (%rax)
movl 0x3a2809(%rip), %eax    # 0x3cd7b8
leaq 0x3a1772(%rip), %rdi    # 0x3cc728
movl 0x70(%rsp,%rax,4), %ecx
movq %rsp, %rsi
movl %ecx, (%rsi)
movl 0x68(%rsp,%rax,4), %eax
movl %eax, 0x4(%rsi)
leaq 0x80(%rsp), %rdx
leaq 0x7c(%rsp), %rcx
leaq 0x78(%rsp), %r8
callq 0x21ea6
movl %eax, %ebx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %r15
je 0x2b40a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x2b40a
movb $0x1, %bl
leaq 0x3a1716(%rip), %rdi    # 0x3cc728
leaq 0x3a16ef(%rip), %rsi    # 0x3cc708
xorl %edx, %edx
callq 0x1cd22
jmp 0x2b40a
movq 0x11f74(%rip), %rbx     # 0x3cfa0
leaq 0x8e80(%rip), %rsi      # 0x33eb3
movl $0x7, %edx
movq %rbx, %rdi
callq 0x5460
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53c0
movsbl %al, %esi
movq 0x11f42(%rip), %rdi     # 0x3cfa0
callq 0x5050
movb $0x1, %bl
movq %rax, %rdi
callq 0x5270
jmp 0x2b40a
leaq 0x90(%rsp), %rbx
movq %rbx, -0x10(%rbx)
xorl %eax, %eax
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x488(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5510
leaq 0x8e7e(%rip), %rsi      # 0x33f30
leaq 0x80(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b142
leaq 0x8e6f(%rip), %rsi      # 0x33f39
leaq 0x80(%rsp), %rdi
callq 0x5120
testl %eax, %eax
je 0x2b186
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b0f6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x80(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2b113
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5400
movb $0x1, %bl
jmp 0x2b40a
movb $0x1, %bl
leaq 0x488(%rsp), %rdi
callq 0x2b6da
jmp 0x2b40a
movb $0x1, %bl
leaq 0x488(%rsp), %rdi
callq 0x2b9c5
jmp 0x2b40a
leaq 0x3a15df(%rip), %rdi    # 0x3cc728
leaq 0x3a15b8(%rip), %rsi    # 0x3cc708
xorl %edx, %edx
callq 0x1cd22
leaq 0x488(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5510
jmp 0x2b2af
movb $0x1, %bl
leaq 0x3a15ae(%rip), %rdi    # 0x3cc728
xorl %esi, %esi
callq 0x1dff6
jmp 0x2b40a
leaq 0x10(%rsp), %r13
leaq 0x488(%rsp), %rbx
leaq 0x80(%rsp), %r14
leaq 0x8e0a(%rip), %r15      # 0x33fac
movq %rsp, %r12
leaq 0x20(%rsp), %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5510
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2b229
movq %r14, %rdi
movq %r15, %rsi
callq 0x5120
testl %eax, %eax
je 0x2b229
movq %r13, (%rsp)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x15ea6
movq %r12, %rdi
leaq 0x64c5(%rip), %rsi      # 0x316c0
callq 0x5820
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rdi
callq 0x5130
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2b1aa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x2b1aa
movq %rsp, %rsi
movq %r13, (%rsi)
movabsq $0x736568435f494355, %rax # imm = 0x736568435F494355
movq %rax, 0x10(%rsi)
movl $0x30363973, 0x18(%rsi) # imm = 0x30363973
movq $0xc, 0x8(%rsi)
movb $0x0, 0x1c(%rsi)
leaq 0x3a2e21(%rip), %rdi    # 0x3ce078
callq 0x15a9c
addq $0x20, %rax
leaq 0x6fb0(%rip), %rsi      # 0x32217
movq %rax, %rdi
callq 0x5120
xorl %edx, %edx
testl %eax, %eax
sete %dl
leaq 0x3a14ab(%rip), %rdi    # 0x3cc728
leaq 0x20(%rsp), %rsi
callq 0x1cd22
movq (%rsp), %rdi
cmpq %r13, %rdi
leaq 0x50(%rsp), %r15
leaq 0x90(%rsp), %rbx
leaq 0x30(%rsp), %r14
je 0x2b2af
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5400
leaq 0x488(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5510
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2b0df
leaq 0x3a144b(%rip), %rdi    # 0x3cc728
leaq 0x80(%rsp), %rsi
callq 0x17d3a
leaq 0x3a1437(%rip), %rdi    # 0x3cc728
movl %eax, %esi
callq 0x1f374
jmp 0x2b2af
movb $0x1, %bl
leaq 0x3a1425(%rip), %rdi    # 0x3cc728
callq 0x20e6e
jmp 0x2b40a
movl 0x3a24a5(%rip), %edi    # 0x3cd7b8
callq 0x11214
leaq 0x3a1409(%rip), %rsi    # 0x3cc728
leaq 0x80(%rsp), %rdi
callq 0x1177c
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x11c5d(%rip), %rdi     # 0x3cfa0
callq 0x5460
movq %rax, %rdi
callq 0x51c0
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x2b103
jmp 0x2b113
movq 0x11c2f(%rip), %rbx     # 0x3cfa0
leaq 0x8b74(%rip), %rsi      # 0x33eec
movl $0x5, %edx
movq %rbx, %rdi
callq 0x5460
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq 0x3a2cbf(%rip), %rax    # 0x3ce060
movq 0x38(%rax), %rsi
movq %rbx, %rdi
callq 0x5260
movq %rax, %rbx
leaq 0x8b2b(%rip), %rsi      # 0x33ee2
movl $0xf, %edx
movq %rax, %rdi
callq 0x5460
movq 0x3a2c95(%rip), %rax    # 0x3ce060
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x5260
movq %rax, %rbx
leaq 0x8b11(%rip), %rsi      # 0x33ef2
movl $0xb, %edx
movq %rax, %rdi
callq 0x5460
movq 0x3a2c6b(%rip), %rax    # 0x3ce060
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x5260
movb $0x1, %bl
movq %rax, %rdi
callq 0x51c0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x2b421
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x11b58(%rip), %rsi     # 0x3cf80
leaq 0x488(%rsp), %rdi
callq 0x55b0
leaq 0x500(%rsp), %rdi
callq 0x5140
movl %ebx, %eax
addq $0x608, %rsp            # imm = 0x608
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x11b43(%rip), %rdi     # 0x3cfa0
leaq 0x8a9e(%rip), %rsi      # 0x33f02
movl $0x8, %edx
callq 0x5460
leaq 0x80(%rsp), %rdi
callq 0x169e4
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x11b0e(%rip), %rdi     # 0x3cfa0
callq 0x5460
movq %rax, %rbx
leaq 0x8a6a(%rip), %rsi      # 0x33f0b
movl $0xb, %edx
movq %rax, %rdi
callq 0x5460
leaq 0x20(%rsp), %rdi
callq 0x171ea
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x5460
movq %rax, %rbx
leaq 0x7739(%rip), %rsi      # 0x32c0d
movl $0x1, %edx
movq %rax, %rdi
callq 0x5460
leaq 0x3a2b90(%rip), %rsi    # 0x3ce078
movq %rsp, %rdi
callq 0x2dae2
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x5460
movq %rax, %rbx
leaq 0x8a0c(%rip), %rsi      # 0x33f17
movl $0x6, %edx
movq %rax, %rdi
callq 0x5460
movq %rbx, %rdi
callq 0x51c0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b53b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5400
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b350
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x2b350
leaq 0x3a2b02(%rip), %rdi    # 0x3ce068
callq 0x57c0
testl %eax, %eax
je 0x2ac1a
leaq 0x3a11ae(%rip), %rdi    # 0x3cc728
leaq 0x3a1187(%rip), %rsi    # 0x3cc708
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1ccf2
leaq 0x3a2ad7(%rip), %rdi    # 0x3ce068
callq 0x5240
jmp 0x2ac1a
movq %rax, %rbx
leaq 0x3a2ac3(%rip), %rdi    # 0x3ce068
callq 0x5230
jmp 0x2b6d2
jmp 0x2b5b5
jmp 0x2b5f9
jmp 0x2b633
movq %rax, %rbx
jmp 0x2b5dc
jmp 0x2b5f9
jmp 0x2b633
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b5dc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5400
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b5fc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x2b5fc
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x2b667
jmp 0x2b614
jmp 0x2b638
jmp 0x2b676
jmp 0x2b614
jmp 0x2b638
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2b63b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5400
jmp 0x2b63b
jmp 0x2b638
jmp 0x2b676
movq %rax, %rbx
jmp 0x2b695
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2b657
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2b695
movq 0x90(%rsp), %rsi
jmp 0x2b68d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2b695
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2b6b1
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x118c8(%rip), %rsi     # 0x3cf80
leaq 0x488(%rsp), %rdi
callq 0x55b0
leaq 0x500(%rsp), %rdi
callq 0x5140
movq %rbx, %rdi
callq 0x5790