// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/mastermind/mastermind.c
// Function: evaluate_and_give_hints
static void evaluate_and_give_hints(void)
{
  int i, j, code_only = 0, code_and_pos = 0;
  int guess_covered[CODE_SLOTS], hidden_covered[CODE_SLOTS];

  /* Check for correct code and position. */
  for (i = 0; i < CODE_SLOTS; i++) {
    if (guess[current_guess].code[i] == hidden_code[i]) {
      code_and_pos++;
      guess_covered[i] = 1;
      hidden_covered[i] = 1;
    } else {
      guess_covered[i] = 0;
      hidden_covered[i] = 0;
    }
  }

  /* Check for any remaining correct codes. */
  for (i = 0; i < CODE_SLOTS; i++) {
    if (guess_covered[i])
      continue;
    for (j = 0; j < CODE_SLOTS; j++) {
      if (hidden_covered[j])
        continue;
      if (guess[current_guess].code[i] == hidden_code[j]) {
        hidden_covered[j] = 1;
        code_only++;
        break;
      }
    }
  }

  i = 0;
  while (code_and_pos-- > 0)
    guess[current_guess].hint[i++] = HINT_CODE_AND_POSITION;
  while (code_only-- > 0)
    guess[current_guess].hint[i++] = HINT_CODE_ONLY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x1bd3
movslq 0x26aa(%rip), %rcx      # 0x4210
leaq 0x2563(%rip), %rax      # 0x40d0
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movslq -0x4(%rbp), %rdx
leaq 0x269a(%rip), %rcx      # 0x4220
cmpl (%rcx,%rdx,4), %eax
jne 0x1bae
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movslq -0x4(%rbp), %rax
movl $0x1, -0x20(%rbp,%rax,4)
movslq -0x4(%rbp), %rax
movl $0x1, -0x30(%rbp,%rax,4)
jmp 0x1bc6
movslq -0x4(%rbp), %rax
movl $0x0, -0x20(%rbp,%rax,4)
movslq -0x4(%rbp), %rax
movl $0x0, -0x30(%rbp,%rax,4)
jmp 0x1bc8
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b59
movl $0x0, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x1c6b
movslq -0x4(%rbp), %rax
cmpl $0x0, -0x20(%rbp,%rax,4)
je 0x1bf1
jmp 0x1c5d
movl $0x0, -0x8(%rbp)
cmpl $0x4, -0x8(%rbp)
jge 0x1c5b
movslq -0x8(%rbp), %rax
cmpl $0x0, -0x30(%rbp,%rax,4)
je 0x1c0b
jmp 0x1c50
movslq 0x25fe(%rip), %rcx      # 0x4210
leaq 0x24b7(%rip), %rax      # 0x40d0
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movslq -0x8(%rbp), %rdx
leaq 0x25ee(%rip), %rcx      # 0x4220
cmpl (%rcx,%rdx,4), %eax
jne 0x1c4e
movslq -0x8(%rbp), %rax
movl $0x1, -0x30(%rbp,%rax,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1c5b
jmp 0x1c50
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1bf8
jmp 0x1c5d
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1bda
movl $0x0, -0x4(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
cmpl $0x0, %eax
jle 0x1caf
movslq 0x2587(%rip), %rcx      # 0x4210
leaq 0x2440(%rip), %rax      # 0x40d0
shlq $0x5, %rcx
addq %rcx, %rax
movl -0x4(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x4(%rbp)
movslq %ecx, %rcx
movl $0x1, 0x10(%rax,%rcx,4)
jmp 0x1c72
jmp 0x1cb1
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
jle 0x1cee
movslq 0x2548(%rip), %rcx      # 0x4210
leaq 0x2401(%rip), %rax      # 0x40d0
shlq $0x5, %rcx
addq %rcx, %rax
movl -0x4(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x4(%rbp)
movslq %ecx, %rcx
movl $0x2, 0x10(%rax,%rcx,4)
jmp 0x1cb1
popq %rbp
retq