user: 请将以下的汇编代码转换成C语言代码:

```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)
L20:
  bt     %rbx,%r13
  mov    %ebx,%esi
  jb     L94
  mov    %r12d,%edi
  call   <ai_robweight@plt>
  mov    %eax,(%r14,%rbx,4)
L94:
  add    $0x1,%rbx
  cmp    $0x16,%rbx
  jne    L20
  mov    $0x1,%eax
  xor    %r13d,%r13d
  xor    %ecx,%ecx
L36:
  mov    (%r14,%rax,4),%edx
  cmp    %eax,%ebp
  je     L29
  cmp    %ecx,%edx
  setg   %sil
  test   %sil,%sil
  cmovne %eax,%r13d
  cmovne %edx,%ecx
L29:
  add    $0x1,%rax
  cmp    $0x16,%rax
  jne    L36
  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    L17
  nopl   0x0(%rax)
L32:
  add    $0x4,%rbx
  cmp    %rbx,%r14
  je     L4
L17:
  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    L32
  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    %rbx,%r14
  jne    L17
L4:
  mov    %r13d,%edi
  call   <data_totresources@plt>
  test   %rax,%rax
  jle    L79
  mov    %r13d,%edi
  call   <robber_steal@plt>
  mov    $0x1,%edx
  mov    %r12d,%edi
  mov    %eax,%esi
  call   <data_addresource@plt>
L79:
  mov    %r12d,%edi
  call   <data_refresh@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L59
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L59:
  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);
}
```