// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/feature/UctFeature.cpp
// Function: CheckFeaturesForTree(game_info_t const*, int, unsigned int*)
int
CheckFeaturesForTree( const game_info_t *game, const int color, unsigned int *tactical_features )
{
  const char *board = game->board;
  const string_t *string = game->string;
  const int *string_id = game->string_id;
  int status = 0;
  int checked = 0, previous_move = PASS, id;
  int neighbor4[4], check[4] = { 0 };
  bool ladder, already_checked;

  if (game->moves > 1) previous_move = game->record[game->moves - 1].pos;

  if (previous_move == PASS) return status;

  GetNeighbor4(neighbor4, previous_move);

  for (int i = 0; i < 4; i++) {
    if (board[neighbor4[i]] == color) {
      id = string_id[neighbor4[i]];
      already_checked = false;
      for (int j = 0; j < checked; j++) {
        if (check[j] == id) {
          already_checked = true;
          break;
        }
      }
      if (already_checked) continue;
      if (string[id].libs == 1) {
        ladder = CheckLadderExtension(game, color, neighbor4[i]);
        CheckFeaturesLib1ForTree(game, color, id, ladder, tactical_features);
        status = MOVE_DISTANCE_MAX * 3;
      } else if (string[id].libs == 2) {
        CheckFeaturesLib2ForTree(game, color, id, tactical_features);
        status = (status <= MOVE_DISTANCE_MAX * 1) ? MOVE_DISTANCE_MAX * 2 : status;
      } else if (string[id].libs == 3) {
        CheckFeaturesLib3ForTree(game, color, id, tactical_features);
        status = (status <= MOVE_DISTANCE_MAX * 0) ? MOVE_DISTANCE_MAX * 1 : status;
      }
      check[checked++] = id;
    }
  }

  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %esi, 0x4(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movl 0x43b0(%rdi), %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
jl 0x41401
movq %rdi, %rbp
decl %ecx
shlq $0x4, %rcx
movl 0x4(%rdi,%rcx), %esi
testl %esi, %esi
je 0x41401
movq %rdx, %r15
leaq 0x9620(%rbp), %rbx
leaq 0x70(%rsp), %rdi
callq 0x3b128
movq %rbx, %r8
xorl %r14d, %r14d
xorl %r9d, %r9d
movl $0x0, 0x2c(%rsp)
movq %r15, 0x20(%rsp)
movq %rbp, 0x18(%rsp)
movq %rbx, 0x8(%rsp)
cmpq $0x4, %r14
je 0x413fd
movslq 0x70(%rsp,%r14,4), %rdx
movsbl 0x43f8(%rbp,%rdx), %eax
cmpl 0x4(%rsp), %eax
jne 0x413f5
movl 0x95720(%rbp,%rdx,4), %r10d
movslq %r10d, %rax
testl %r9d, %r9d
movl $0x0, %ecx
cmovgl %r9d, %ecx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x40569
leaq 0x1(%rsi), %rdi
cmpl %r10d, 0x60(%rsp,%rsi,4)
movq %rdi, %rsi
jne 0x40551
jmp 0x413f5
movl %r10d, 0x30(%rsp)
movl %r9d, 0x5c(%rsp)
imulq $0x7c8, %rax, %rbx      # imm = 0x7C8
movl 0x4(%r8,%rbx), %eax
cmpl $0x3, %eax
je 0x4066f
cmpl $0x2, %eax
je 0x405dc
cmpl $0x1, %eax
jne 0x413e2
movq %rbp, %rdi
movl 0x4(%rsp), %esi
callq 0x430b9
movq 0x8(%rsp), %r8
leaq (%r8,%rbx), %rsi
movswq 0x8(%r8,%rbx), %rcx
testb %al, %al
movq %r14, 0x40(%rsp)
je 0x40723
imulq $0x7, %rcx, %rax
cmpl $0x3, 0x4(%r15,%rax,4)
ja 0x41218
movl $0x4, 0x4(%r15,%rax,4)
jmp 0x41218
leaq (%r8,%rbx), %rcx
movswl 0x8(%r8,%rbx), %eax
movslq %eax, %rsi
movq %rcx, 0x10(%rsp)
movswl 0x8(%rcx,%rsi,2), %eax
movl %eax, 0x34(%rsp)
movq %rbp, %rdi
movq %rsi, 0x38(%rsp)
movl 0x4(%rsp), %ebx
movl %ebx, %edx
movl 0x30(%rsp), %r13d
movl %r13d, %ecx
callq 0x41e2a
movl %eax, %r12d
movq %rbp, %rdi
movl 0x34(%rsp), %ebp
movl %ebp, %esi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x41e2a
cmpl $0x2, %r12d
je 0x4077d
cmpl $0x1, %r12d
je 0x4075a
testl %r12d, %r12d
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
jne 0x4079e
imulq $0x7, 0x38(%rsp), %rcx
cmpl $0x1, 0xc(%r15,%rcx,4)
ja 0x4079e
movl $0x2, 0xc(%r15,%rcx,4)
jmp 0x4079e
leaq (%r8,%rbx), %rcx
movswl 0x8(%r8,%rbx), %eax
movslq %eax, %rsi
movswl 0x8(%rcx,%rsi,2), %eax
movslq %eax, %r13
movq %rcx, 0x10(%rsp)
movswl 0x8(%rcx,%r13,2), %eax
movl %eax, 0x34(%rsp)
movq %rbp, %rdi
movq %rsi, 0x48(%rsp)
movl 0x4(%rsp), %ebx
movl %ebx, %edx
movl 0x30(%rsp), %r12d
movl %r12d, %ecx
callq 0x41e2a
movl %eax, 0x38(%rsp)
movq %rbp, %rdi
movq %r13, 0x50(%rsp)
movl %r13d, %esi
movl %ebx, %edx
movl %r12d, %ecx
callq 0x41e2a
movl %eax, %r13d
movq %rbp, %rdi
movl 0x34(%rsp), %esi
movl %ebx, %edx
movl %r12d, %ecx
callq 0x41e2a
movl 0x38(%rsp), %ecx
cmpl $0x2, %ecx
je 0x40bd4
cmpl $0x1, %ecx
je 0x407dd
testl %ecx, %ecx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
jne 0x40bf5
imulq $0x7, 0x48(%rsp), %rcx
cmpl $0x0, 0xc(%r15,%rcx,4)
jne 0x40bf5
movl $0x1, 0xc(%r15,%rcx,4)
jmp 0x40bf5
movl 0x7c0(%rsi), %edx
imulq $0x7, %rcx, %rax
movl 0x4(%r15,%rax,4), %ecx
cmpl $0x2, %edx
je 0x411fa
cmpl $0x1, %edx
jne 0x4120a
testl %ecx, %ecx
jne 0x41218
movl $0x1, 0x4(%r15,%rax,4)
jmp 0x41218
imulq $0x7, 0x38(%rsp), %rcx
cmpl $0x3, 0xc(%r15,%rcx,4)
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x4079e
movl $0x4, 0xc(%r15,%rcx,4)
jmp 0x4079e
imulq $0x7, 0x38(%rsp), %rcx
cmpl $0x5, 0xc(%r15,%rcx,4)
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x4079e
movl $0x6, 0xc(%r15,%rcx,4)
movslq %ebp, %rcx
cmpl $0x2, %eax
je 0x40807
cmpl $0x1, %eax
je 0x407c6
testl %eax, %eax
jne 0x4081c
imulq $0x7, %rcx, %rax
cmpl $0x1, 0xc(%r15,%rax,4)
ja 0x4081c
movl $0x2, 0xc(%r15,%rax,4)
jmp 0x4081c
imulq $0x7, %rcx, %rax
cmpl $0x3, 0xc(%r15,%rax,4)
ja 0x4081c
movl $0x4, 0xc(%r15,%rax,4)
jmp 0x4081c
imulq $0x7, 0x48(%rsp), %rcx
cmpl $0x2, 0xc(%r15,%rcx,4)
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x40bf5
movl $0x3, 0xc(%r15,%rcx,4)
jmp 0x40bf5
imulq $0x7, %rcx, %rax
cmpl $0x5, 0xc(%r15,%rax,4)
ja 0x4081c
movl $0x6, 0xc(%r15,%rax,4)
movq %r14, 0x40(%rsp)
movswl 0x57c(%rdx), %eax
cmpl $0x3, 0x7c0(%rdx)
jge 0x409f5
cmpl $0x11f, %eax            # imm = 0x11F
je 0x40bb9
movslq %eax, %r14
imulq $0x7c8, %r14, %rax      # imm = 0x7C8
leaq (%r8,%rax), %rbx
movl 0x4(%r8,%rax), %eax
cmpl $0x2, %eax
je 0x4088d
cmpl $0x1, %eax
jne 0x409e7
movswq 0x8(%rbx), %rax
imulq $0x1c, %rax, %rax
cmpl $0x2, 0x7c0(%rbx)
movl (%r15,%rax), %ecx
jg 0x408e0
cmpl $0x8, %ecx
ja 0x409e7
movl $0x9, (%r15,%rax)
jmp 0x409e7
movswl 0x8(%rbx), %eax
movslq %eax, %r12
movswl 0x8(%rbx,%r12,2), %eax
movslq %eax, %r13
movl 0x7bc(%rbx), %ecx
movl 0x7c0(%rbx), %ebp
movq 0x18(%rsp), %rdi
movl %r12d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r12, %rcx
movl 0x8(%r15,%rcx,4), %edx
cmpl $0x2, %ebp
jg 0x408f6
testb %al, %al
je 0x4090e
pushq $0xb
popq %rax
cmpl $0xb, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rdi
jb 0x40920
jmp 0x40925
cmpl $0xa, %ecx
ja 0x409e7
movl $0xb, (%r15,%rax)
jmp 0x409e7
testb %al, %al
je 0x40965
pushq $0xd
popq %rax
cmpl $0xd, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rdi
jb 0x40977
jmp 0x4097c
pushq $0x3
popq %rax
cmpl $0x2, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rdi
ja 0x40925
movl %eax, 0x8(%r15,%rcx,4)
movl 0x7bc(%rbx), %ecx
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r13, %rcx
movl 0x8(%r15,%rcx,4), %edx
testb %al, %al
je 0x409b5
cmpl $0xa, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x409e7
movl $0xb, 0x8(%r15,%rcx,4)
jmp 0x409e7
pushq $0x5
popq %rax
cmpl $0x4, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rdi
ja 0x4097c
movl %eax, 0x8(%r15,%rcx,4)
movl 0x7bc(%rbx), %ecx
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r13, %rcx
movl 0x8(%r15,%rcx,4), %edx
testb %al, %al
je 0x409cf
cmpl $0xc, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x409e7
movl $0xd, 0x8(%r15,%rcx,4)
jmp 0x409e7
cmpl $0x2, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x409e7
movl $0x3, 0x8(%r15,%rcx,4)
jmp 0x409e7
cmpl $0x4, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x409e7
movl $0x5, 0x8(%r15,%rcx,4)
movswl 0x57c(%rdx,%r14,2), %eax
jmp 0x40835
cmpl $0x11f, %eax            # imm = 0x11F
je 0x40bb9
movslq %eax, %r14
imulq $0x7c8, %r14, %rax      # imm = 0x7C8
leaq (%r8,%rax), %rbx
movl 0x4(%r8,%rax), %eax
cmpl $0x2, %eax
je 0x40a4d
cmpl $0x1, %eax
jne 0x40bab
movswq 0x8(%rbx), %rax
imulq $0x1c, %rax, %rax
cmpl $0x2, 0x7c0(%rbx)
movl (%r15,%rax), %ecx
jg 0x40aa4
cmpl $0xc, %ecx
ja 0x40bab
movl $0xd, (%r15,%rax)
jmp 0x40bab
movswl 0x8(%rbx), %eax
movslq %eax, %r12
movswl 0x8(%rbx,%r12,2), %eax
movslq %eax, %r13
movl 0x7bc(%rbx), %ecx
movq %r15, %rbp
movl 0x7c0(%rbx), %r15d
movq 0x18(%rsp), %rdi
movl %r12d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r12, %rcx
movl 0x8(%rbp,%rcx,4), %edx
cmpl $0x2, %r15d
jg 0x40aba
testb %al, %al
je 0x40ad2
pushq $0xf
popq %rax
cmpl $0xf, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rdi
jb 0x40ae4
jmp 0x40ae9
cmpl $0xd, %ecx
ja 0x40bab
movl $0xe, (%r15,%rax)
jmp 0x40bab
testb %al, %al
je 0x40b29
pushq $0x11
popq %rax
cmpl $0x11, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rdi
jb 0x40b3b
jmp 0x40b40
pushq $0x7
popq %rax
cmpl $0x6, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rdi
ja 0x40ae9
movl %eax, 0x8(%r15,%rcx,4)
movl 0x7bc(%rbx), %ecx
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r13, %rcx
movl 0x8(%r15,%rcx,4), %edx
testb %al, %al
je 0x40b79
cmpl $0xe, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x40bab
movl $0xf, 0x8(%r15,%rcx,4)
jmp 0x40bab
pushq $0x9
popq %rax
cmpl $0x8, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rdi
ja 0x40b40
movl %eax, 0x8(%r15,%rcx,4)
movl 0x7bc(%rbx), %ecx
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r13, %rcx
movl 0x8(%r15,%rcx,4), %edx
testb %al, %al
je 0x40b93
cmpl $0x10, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x40bab
movl $0x11, 0x8(%r15,%rcx,4)
jmp 0x40bab
cmpl $0x6, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x40bab
movl $0x7, 0x8(%r15,%rcx,4)
jmp 0x40bab
cmpl $0x8, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
ja 0x40bab
movl $0x9, 0x8(%r15,%rcx,4)
movswl 0x57c(%rdx,%r14,2), %eax
jmp 0x409f5
movl 0x2c(%rsp), %ecx
cmpl $0x11, %ecx
pushq $0x20
popq %rax
cmovll %eax, %ecx
movl %ecx, 0x2c(%rsp)
movq 0x18(%rsp), %rbp
jmp 0x413dd
imulq $0x7, 0x48(%rsp), %rcx
cmpl $0x4, 0xc(%r15,%rcx,4)
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x40bf5
movl $0x5, 0xc(%r15,%rcx,4)
cmpl $0x2, %r13d
je 0x40c38
cmpl $0x1, %r13d
je 0x40c1f
testl %r13d, %r13d
jne 0x40c4f
imulq $0x7, 0x50(%rsp), %rcx
cmpl $0x0, 0xc(%r15,%rcx,4)
jne 0x40c4f
movl $0x1, 0xc(%r15,%rcx,4)
jmp 0x40c4f
imulq $0x7, 0x50(%rsp), %rcx
cmpl $0x2, 0xc(%r15,%rcx,4)
ja 0x40c4f
movl $0x3, 0xc(%r15,%rcx,4)
jmp 0x40c4f
imulq $0x7, 0x50(%rsp), %rcx
cmpl $0x4, 0xc(%r15,%rcx,4)
ja 0x40c4f
movl $0x5, 0xc(%r15,%rcx,4)
movslq 0x34(%rsp), %rcx
cmpl $0x2, %eax
je 0x40c90
cmpl $0x1, %eax
je 0x40c79
testl %eax, %eax
jne 0x40ca5
imulq $0x7, %rcx, %rax
cmpl $0x0, 0xc(%r15,%rax,4)
jne 0x40ca5
movl $0x1, 0xc(%r15,%rax,4)
jmp 0x40ca5
imulq $0x7, %rcx, %rax
cmpl $0x2, 0xc(%r15,%rax,4)
ja 0x40ca5
movl $0x3, 0xc(%r15,%rax,4)
jmp 0x40ca5
imulq $0x7, %rcx, %rax
cmpl $0x4, 0xc(%r15,%rax,4)
ja 0x40ca5
movl $0x5, 0xc(%r15,%rax,4)
movq %r14, 0x40(%rsp)
movswl 0x57c(%rdi), %eax
cmpl $0x3, 0x7c0(%rdi)
jge 0x40f51
cmpl $0x11f, %eax            # imm = 0x11F
je 0x411e5
movslq %eax, %r14
imulq $0x7c8, %r14, %rax      # imm = 0x7C8
leaq (%r8,%rax), %rbx
movl 0x4(%r8,%rax), %eax
cmpl $0x3, %eax
je 0x40d87
cmpl $0x2, %eax
je 0x40d23
cmpl $0x1, %eax
jne 0x40f43
movswq 0x8(%rbx), %rax
imulq $0x1c, %rax, %rax
cmpl $0x2, 0x7c0(%rbx)
movl (%r15,%rax), %ecx
jg 0x40e4e
cmpl $0x7, %ecx
ja 0x40f43
movl $0x8, (%r15,%rax)
jmp 0x40f43
movswl 0x8(%rbx), %eax
movslq %eax, %r12
movswl 0x8(%rbx,%r12,2), %eax
movslq %eax, %r13
movl 0x7bc(%rbx), %ecx
movq %rbp, %rdi
movq %r15, %rbp
movl 0x7c0(%rbx), %r15d
movl %r12d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r12, %rcx
movl 0x8(%rbp,%rcx,4), %edx
cmpl $0x2, %r15d
jg 0x40dea
testb %al, %al
je 0x40e64
pushq $0xa
popq %rax
cmpl $0xa, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rbp
jb 0x40e76
jmp 0x40e7b
movswq 0x8(%rbx), %rdx
movswq 0x8(%rbx,%rdx,2), %rcx
movswq 0x8(%rbx,%rcx,2), %rax
imulq $0x1c, %rdx, %rdx
cmpl $0x2, 0x7c0(%rbx)
movl 0x10(%r15,%rdx), %esi
jg 0x40e0d
testl %esi, %esi
jne 0x40db7
movl $0x1, 0x10(%r15,%rdx)
imulq $0x7, %rcx, %rcx
cmpl $0x0, 0x10(%r15,%rcx,4)
jne 0x40dcc
movl $0x1, 0x10(%r15,%rcx,4)
imulq $0x7, %rax, %rax
cmpl $0x0, 0x10(%r15,%rax,4)
jne 0x40f43
movl $0x1, 0x10(%r15,%rax,4)
jmp 0x40f43
testb %al, %al
je 0x40ebe
pushq $0xc
popq %rax
cmpl $0xc, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rbp
jb 0x40ed0
jmp 0x40ed5
cmpl $0x1, %esi
ja 0x40e1b
movl $0x2, 0x10(%r15,%rdx)
imulq $0x7, %rcx, %rcx
cmpl $0x1, 0x10(%r15,%rcx,4)
ja 0x40e30
movl $0x2, 0x10(%r15,%rcx,4)
imulq $0x7, %rax, %rax
cmpl $0x1, 0x10(%r15,%rax,4)
ja 0x40f43
movl $0x2, 0x10(%r15,%rax,4)
jmp 0x40f43
cmpl $0x9, %ecx
ja 0x40f43
movl $0xa, (%r15,%rax)
jmp 0x40f43
pushq $0x2
popq %rax
cmpl $0x1, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rbp
ja 0x40e7b
movl %eax, 0x8(%r15,%rcx,4)
movl 0x7bc(%rbx), %ecx
movq %rbp, %rdi
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r13, %rcx
movl 0x8(%r15,%rcx,4), %edx
testb %al, %al
je 0x40f11
cmpl $0x9, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x40f43
movl $0xa, 0x8(%r15,%rcx,4)
jmp 0x40f43
pushq $0x4
popq %rax
cmpl $0x3, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rbp
ja 0x40ed5
movl %eax, 0x8(%r15,%rcx,4)
movl 0x7bc(%rbx), %ecx
movq %rbp, %rdi
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r13, %rcx
movl 0x8(%r15,%rcx,4), %edx
testb %al, %al
je 0x40f2b
cmpl $0xb, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x40f43
movl $0xc, 0x8(%r15,%rcx,4)
jmp 0x40f43
cmpl $0x1, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x40f43
movl $0x2, 0x8(%r15,%rcx,4)
jmp 0x40f43
cmpl $0x3, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x40f43
movl $0x4, 0x8(%r15,%rcx,4)
movswl 0x57c(%rdi,%r14,2), %eax
jmp 0x40cbe
cmpl $0x11f, %eax            # imm = 0x11F
je 0x411e5
movslq %eax, %r14
imulq $0x7c8, %r14, %rax      # imm = 0x7C8
leaq (%r8,%rax), %rbx
movl 0x4(%r8,%rax), %eax
cmpl $0x3, %eax
je 0x4101a
cmpl $0x2, %eax
je 0x40fb6
cmpl $0x1, %eax
jne 0x411d7
movswq 0x8(%rbx), %rax
imulq $0x1c, %rax, %rax
cmpl $0x2, 0x7c0(%rbx)
movl (%r15,%rax), %ecx
jg 0x410e2
cmpl $0xb, %ecx
ja 0x411d7
movl $0xc, (%r15,%rax)
jmp 0x411d7
movswl 0x8(%rbx), %eax
movslq %eax, %r12
movswl 0x8(%rbx,%r12,2), %eax
movslq %eax, %r13
movl 0x7bc(%rbx), %ecx
movq %rbp, %rdi
movq %r15, %rbp
movl 0x7c0(%rbx), %r15d
movl %r12d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r12, %rcx
movl 0x8(%rbp,%rcx,4), %edx
cmpl $0x2, %r15d
jg 0x4107e
testb %al, %al
je 0x410f8
pushq $0xe
popq %rax
cmpl $0xe, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rbp
jb 0x4110a
jmp 0x4110f
movswq 0x8(%rbx), %rdx
movswq 0x8(%rbx,%rdx,2), %rcx
movswq 0x8(%rbx,%rcx,2), %rax
imulq $0x1c, %rdx, %rdx
cmpl $0x2, 0x7c0(%rbx)
movl 0x10(%r15,%rdx), %esi
jg 0x410a1
cmpl $0x2, %esi
ja 0x4104b
movl $0x3, 0x10(%r15,%rdx)
imulq $0x7, %rcx, %rcx
cmpl $0x2, 0x10(%r15,%rcx,4)
ja 0x41060
movl $0x3, 0x10(%r15,%rcx,4)
imulq $0x7, %rax, %rax
cmpl $0x2, 0x10(%r15,%rax,4)
ja 0x411d7
movl $0x3, 0x10(%r15,%rax,4)
jmp 0x411d7
testb %al, %al
je 0x41152
pushq $0x10
popq %rax
cmpl $0x10, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rbp
jb 0x41164
jmp 0x41169
cmpl $0x3, %esi
ja 0x410af
movl $0x4, 0x10(%r15,%rdx)
imulq $0x7, %rcx, %rcx
cmpl $0x3, 0x10(%r15,%rcx,4)
ja 0x410c4
movl $0x4, 0x10(%r15,%rcx,4)
imulq $0x7, %rax, %rax
cmpl $0x3, 0x10(%r15,%rax,4)
ja 0x411d7
movl $0x4, 0x10(%r15,%rax,4)
jmp 0x411d7
cmpl $0xe, %ecx
ja 0x411d7
movl $0xf, (%r15,%rax)
jmp 0x411d7
pushq $0x6
popq %rax
cmpl $0x5, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rbp
ja 0x4110f
movl %eax, 0x8(%r15,%rcx,4)
movl 0x7bc(%rbx), %ecx
movq %rbp, %rdi
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r13, %rcx
movl 0x8(%r15,%rcx,4), %edx
testb %al, %al
je 0x411a5
cmpl $0xd, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x411d7
movl $0xe, 0x8(%r15,%rcx,4)
jmp 0x411d7
pushq $0x8
popq %rax
cmpl $0x7, %edx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %rbp
ja 0x41169
movl %eax, 0x8(%r15,%rcx,4)
movl 0x7bc(%rbx), %ecx
movq %rbp, %rdi
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0x419a8
imulq $0x7, %r13, %rcx
movl 0x8(%r15,%rcx,4), %edx
testb %al, %al
je 0x411bf
cmpl $0xf, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x411d7
movl $0x10, 0x8(%r15,%rcx,4)
jmp 0x411d7
cmpl $0x5, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x411d7
movl $0x6, 0x8(%r15,%rcx,4)
jmp 0x411d7
cmpl $0x7, %edx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdi
ja 0x411d7
movl $0x8, 0x8(%r15,%rcx,4)
movswl 0x57c(%rdi,%r14,2), %eax
jmp 0x40f51
movl 0x2c(%rsp), %ecx
testl %ecx, %ecx
pushq $0x10
popq %rax
cmovlel %eax, %ecx
movl %ecx, 0x2c(%rsp)
jmp 0x413dd
cmpl $0x1, %ecx
ja 0x41218
movl $0x2, 0x4(%r15,%rax,4)
jmp 0x41218
cmpl $0x2, %ecx
ja 0x41218
movl $0x3, 0x4(%r15,%rax,4)
leaq 0x57c(%rsi), %r13
movq %r13, %rax
movq %rsi, %rbx
movswq (%rax), %r14
cmpq $0x11f, %r14            # imm = 0x11F
je 0x413d6
imulq $0x7c8, %r14, %rax      # imm = 0x7C8
cmpl $0x1, 0x4(%r8,%rax)
jne 0x413c6
addq %r8, %rax
movswl 0x8(%rax), %ecx
movslq %ecx, %r12
movl 0x7c0(%rsi), %ecx
movl 0x7c0(%rax), %eax
cmpl $0x2, %ecx
je 0x41299
cmpl $0x1, %ecx
jne 0x412e8
imulq $0x7, %r12, %rcx
movl (%r15,%rcx,4), %edx
cmpl $0x2, %eax
je 0x4133b
cmpl $0x1, %eax
jne 0x41363
cmpl $0x10, %edx
ja 0x413c6
movl $0x11, (%r15,%rcx,4)
jmp 0x413c6
cmpl $0x2, %eax
je 0x4134e
cmpl $0x1, %eax
jne 0x41372
movq %rbp, %rdi
movl %r12d, %esi
movl 0x4(%rsp), %edx
movl 0x30(%rsp), %ecx
callq 0x41d70
imulq $0x7, %r12, %rcx
movl (%r15,%rcx,4), %edx
testb %al, %al
jne 0x4131d
cmpl $0x13, %edx
movq 0x8(%rsp), %r8
movq %rbx, %rsi
ja 0x413c6
movl $0x14, (%r15,%rcx,4)
jmp 0x413c6
cmpl $0x2, %eax
je 0x41387
cmpl $0x1, %eax
jne 0x4139c
movq %rbp, %rdi
movl %r12d, %esi
movl 0x4(%rsp), %edx
movl 0x30(%rsp), %ecx
callq 0x41d70
imulq $0x7, %r12, %rcx
movl (%r15,%rcx,4), %edx
testb %al, %al
je 0x413b1
cmpl $0x19, %edx
movq 0x8(%rsp), %r8
movq %rbx, %rsi
ja 0x413c6
movl $0x1a, (%r15,%rcx,4)
jmp 0x413c6
cmpl $0x11, %edx
ja 0x413c6
movl $0x12, (%r15,%rcx,4)
jmp 0x413c6
imulq $0x7, %r12, %rax
cmpl $0x14, (%r15,%rax,4)
ja 0x413c6
movl $0x15, (%r15,%rax,4)
jmp 0x413c6
cmpl $0x12, %edx
ja 0x413c6
movl $0x13, (%r15,%rcx,4)
jmp 0x413c6
imulq $0x7, %r12, %rax
cmpl $0x15, (%r15,%rax,4)
ja 0x413c6
movl $0x16, (%r15,%rax,4)
jmp 0x413c6
imulq $0x7, %r12, %rax
cmpl $0x17, (%r15,%rax,4)
ja 0x413c6
movl $0x18, (%r15,%rax,4)
jmp 0x413c6
imulq $0x7, %r12, %rax
cmpl $0x18, (%r15,%rax,4)
ja 0x413c6
movl $0x19, (%r15,%rax,4)
jmp 0x413c6
cmpl $0x16, %edx
movq 0x8(%rsp), %r8
movq %rbx, %rsi
ja 0x413c6
movl $0x17, (%r15,%rcx,4)
leaq (,%r14,2), %rax
addq %r13, %rax
jmp 0x41225
pushq $0x30
popq %rax
movl %eax, 0x2c(%rsp)
movq 0x40(%rsp), %r14
movl 0x5c(%rsp), %r9d
movslq %r9d, %rax
incl %r9d
movl 0x30(%rsp), %ecx
movl %ecx, 0x60(%rsp,%rax,4)
incq %r14
jmp 0x40517
movl 0x2c(%rsp), %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq