// File: jenniferdr[P]proyectoIAI/conflictos.cc
// Function: h_conflictos(char*)
int h_conflictos(int8 estado[16]) {
  int res = heuristicaManhattan(estado);
  for (int i = 0; i < 4; i++) {
    for (int j = i; j < 4; j++) {
      res += conflictos[estado[i]][estado[j]][i][j];
    }
  }
  for (int i = 4; i < 8; i++) {
    for (int j = i; j < 8; j++) {
      res += conflictos[estado[i]][estado[j]][i][j];
    }
  }
  for (int i = 8; i < 12; i++) {
    for (int j = i; j < 12; j++) {
      res += conflictos[estado[i]][estado[j]][i][j];
    }
  }
  for (int i = 8; i < 16; i++) {
    for (int j = i; j < 16; j++) {
      res += conflictos[estado[i]][estado[j]][i][j];
    }
  }

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7c00
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0xa950
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0xa943
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbq (%rax,%rcx), %rcx
leaq 0x3008a7b(%rip), %rax   # 0x3013380
shlq $0xe, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq -0x14(%rbp), %rdx
movsbq (%rcx,%rdx), %rcx
shlq $0xa, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa8eb
jmp 0xa945
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xa8df
movl $0x4, -0x18(%rbp)
cmpl $0x8, -0x18(%rbp)
jge 0xa9c8
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jge 0xa9bb
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbq (%rax,%rcx), %rcx
leaq 0x3008a03(%rip), %rax   # 0x3013380
shlq $0xe, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movsbq (%rcx,%rdx), %rcx
shlq $0xa, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa963
jmp 0xa9bd
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xa957
movl $0x8, -0x20(%rbp)
cmpl $0xc, -0x20(%rbp)
jge 0xaa40
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0xc, -0x24(%rbp)
jge 0xaa33
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbq (%rax,%rcx), %rcx
leaq 0x300898b(%rip), %rax   # 0x3013380
shlq $0xe, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movsbq (%rcx,%rdx), %rcx
shlq $0xa, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa9db
jmp 0xaa35
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xa9cf
movl $0x8, -0x28(%rbp)
cmpl $0x10, -0x28(%rbp)
jge 0xaab8
movl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x10, -0x2c(%rbp)
jge 0xaaab
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbq (%rax,%rcx), %rcx
leaq 0x3008913(%rip), %rax   # 0x3013380
shlq $0xe, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movsbq (%rcx,%rdx), %rcx
shlq $0xa, %rcx
addq %rcx, %rax
movslq -0x28(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xaa53
jmp 0xaaad
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xaa47
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)