user: Translate the below assembly code into C programming language:

```asm
<ai_moverobber>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    $0x100004,%r13d
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%r14
  call   <map_getrobberhex@plt>
  mov    %eax,%edi
  mov    %eax,%ebp
  call   <robber_erase@plt>
  mov    $0xb,%ecx
  xor    %eax,%eax
  mov    %r14,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0xfffffc18,0x70(%rsp)
  movl   $0xfffffc18,0x28(%rsp)
  nopl   0x0(%rax,%rax,1)
L56:
  bt     %rbx,%r13
  mov    %ebx,%esi
  jb     L46
  mov    %r12d,%edi
  call   <ai_robweight@plt>
  mov    %eax,(%r14,%rbx,4)
L46:
  add    $0x1,%rbx
  cmp    $0x16,%rbx
  jne    L56
  mov    $0x1,%eax
  xor    %r13d,%r13d
  xor    %ecx,%ecx
L89:
  mov    (%r14,%rax,4),%edx
  cmp    %ecx,%edx
  jle    L23
  cmp    %eax,%ebp
  setne  %sil
  test   %sil,%sil
  cmovne %eax,%r13d
  cmovne %edx,%ecx
L23:
  add    $0x1,%rax
  cmp    $0x16,%rax
  jne    L89
  mov    %r13d,%edi
  mov    %rsp,%rbx
  lea    0x18(%rsp),%r14
  xor    %ebp,%ebp
  call   <robber_place@plt>
  mov    %r13d,%edi
  mov    %rbx,%rsi
  xor    %r13d,%r13d
  call   <ai_vertsonhex@plt>
  jmp    L8
  nopl   0x0(%rax)
L67:
  add    $0x4,%rbx
  cmp    %r14,%rbx
  je     L63
L8:
  mov    (%rbx),%r15d
  mov    %r15d,%edi
  call   <data_playeratvertex@plt>
  mov    %r15d,%edx
  mov    %r12d,%edi
  mov    %eax,%esi
  call   <ai_playerweight@plt>
  cmp    %ebp,%eax
  jle    L67
  mov    (%rbx),%r13d
  add    $0x4,%rbx
  mov    %r13d,%edi
  call   <data_playeratvertex@plt>
  mov    %r13d,%edx
  mov    %r12d,%edi
  mov    %eax,%esi
  call   <ai_playerweight@plt>
  mov    -0x4(%rbx),%edi
  mov    %eax,%ebp
  call   <data_playeratvertex@plt>
  mov    %eax,%r13d
  cmp    %r14,%rbx
  jne    L8
L63:
  mov    %r13d,%edi
  call   <data_totresources@plt>
  test   %rax,%rax
  jle    L80
  mov    %r13d,%edi
  call   <robber_steal@plt>
  mov    $0x1,%edx
  mov    %r12d,%edi
  mov    %eax,%esi
  call   <data_addresource@plt>
L80:
  mov    %r12d,%edi
  call   <data_refresh@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void ai_moverobber(int player) {
  int hexorig = map_getrobberhex();
  robber_erase(hexorig);
  int hexes[22], i;
  for (i = 0; i < 22; i++)
    hexes[i] = 0;
  hexes[0] = hexes[2] = hexes[20] = -1000;
  for (i = 1; i < 22; i++) {
    if (i == 2 || i == 20)
      continue;
    hexes[i] = ai_robweight(player, i);
  }
  int max, hex;
  hex = max = 0;
  for (i = 1; i < 22; i++) {
    if (hexes[i] > max && i != hexorig) {
      max = hexes[i];
      hex = i;
    }
  }
  robber_place(hex);
  int verts[6];
  ai_vertsonhex(hex, verts);
  max = 0;
  int maxp = 0;
  for (i = 0; i < 6; i++) {
    if (ai_playerweight(player, data_playeratvertex(verts[i]), verts[i]) > max) {
      max = ai_playerweight(player, data_playeratvertex(verts[i]), verts[i]);
      maxp = data_playeratvertex(verts[i]);
    }
  }
  if (data_totresources(maxp) > 0)
    data_addresource(player, robber_steal(maxp), 1);
  data_refresh(player);
}
```