user: Converte this assembly snippet into its equivalent C code:

```asm
<recharger_act_avoid>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    $0xffffffd3,%r13d
  push   %r12
  mov    $0x7,%r12d
  push   %rbp
  mov    $0xffffffe9,%ebp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,0x24(%rsp)
  xor    %edi,%edi
  mov    %esi,0x28(%rsp)
  xor    %esi,%esi
  mov    %edx,0x2c(%rsp)
  call   <adcspi_get_output@plt>
  mov    $0xffffffe2,%edx
  mov    $0x1,%esi
  mov    %eax,%r8d
  mov    $0xfffffff8,%eax
  cmp    $0x399,%r8d
  cmovge %eax,%r12d
  cmovge %ebp,%eax
  cmovl  %edx,%r13d
  setge  %bl
  mov    %eax,0x1c(%rsp)
  mov    %eax,%r14d
  mov    $0xffffffda,%eax
  cmovge %eax,%ebp
  mov    $0xfffffff1,%eax
  cmovl  %eax,%edx
  mov    %edx,0x18(%rsp)
  mov    %edx,%r15d
  mov    $0x0,%edx
  cmovl  %edx,%eax
  xor    %edi,%edi
  mov    %eax,0xc(%rsp)
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L94
  movl   $0x15,0x14(%rsp)
  mov    %r14d,%r12d
  mov    $0x1,%ebx
  mov    $0xfffffff9,%r14d
  movl   $0xffffffeb,0x20(%rsp)
  movl   $0xfffffff2,0x10(%rsp)
  mov    %ebp,0x1c(%rsp)
  xor    %ebp,%ebp
  mov    %r15d,0xc(%rsp)
  mov    $0xe,%r15d
  mov    %r13d,0x18(%rsp)
  mov    $0x7,%r13d
L66:
  xor    %edi,%edi
  mov    $0x2,%esi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L26
  mov    0x20(%rsp),%eax
  mov    %r15d,0x14(%rsp)
  mov    %r13d,%r15d
  mov    %ebp,%r13d
  mov    %r14d,%ebp
  mov    0x10(%rsp),%r14d
  mov    $0x1,%ebx
  mov    %eax,0x10(%rsp)
L26:
  xor    %edi,%edi
  mov    $0x3,%esi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L68
  mov    %r15d,0x14(%rsp)
  mov    %r13d,%r15d
  mov    %ebp,%r13d
  mov    %r14d,%ebp
  mov    0x10(%rsp),%r14d
  mov    $0x1,%ebx
L68:
  xor    %edi,%edi
  mov    $0x4,%esi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L114
  mov    %ebp,%r14d
  mov    %r13d,%ebp
  mov    %r15d,%r13d
  mov    0x14(%rsp),%r15d
  mov    $0x1,%ebx
L114:
  xor    %edi,%edi
  mov    $0x5,%esi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L89
  mov    %ebp,%r14d
  mov    $0x1,%ebx
  mov    %r13d,%ebp
  mov    %r15d,%r13d
L89:
  xor    %edi,%edi
  mov    $0x6,%esi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L117
  mov    0x18(%rsp),%eax
  mov    0x1c(%rsp),%r12d
  mov    %ebp,%r14d
  mov    $0x1,%ebx
  mov    %r13d,%ebp
  mov    %eax,0xc(%rsp)
L117:
  xor    %edi,%edi
  mov    $0x7,%esi
  xor    %r15d,%r15d
  call   <adcspi_get_output@plt>
  mov    $0x8,%esi
  cmp    $0x399,%eax
  mov    $0x1,%eax
  setge  %r15b
  setge  %r13b
  cmovge %eax,%ebx
  xor    %edi,%edi
  call   <adcspi_get_output@plt>
  movzbl %r13b,%r13d
  mov    $0x9,%esi
  xor    %edi,%edi
  lea    0x4(,%r15,4),%r15d
  shl    $0x2,%r13d
  cmp    $0x398,%eax
  jle    L119
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  cmovle 0xc(%rsp),%r12d
  cmovle %r14d,%ebp
L111:
  add    $0x38,%rsp
  mov    %r15d,%edx
  mov    %ebp,%esi
  pop    %rbx
  mov    %r12d,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <recharger_act@plt>
  nopw   0x0(%rax,%rax,1)
L94:
  movl   $0x1c,0x14(%rsp)
  mov    $0x15,%r15d
  mov    $0xe,%r13d
  xor    %r14d,%r14d
  movl   $0xfffffff2,0x20(%rsp)
  mov    $0x7,%ebp
  movl   $0xfffffff9,0x10(%rsp)
  jmp    L66
  nopl   0x0(%rax)
L119:
  call   <adcspi_get_output@plt>
  mov    %r13d,%r15d
  cmp    $0x398,%eax
  jg     L111
  test   %bl,%bl
  jne    L2
  mov    0x2c(%rsp),%r15d
  mov    0x28(%rsp),%ebp
  mov    0x24(%rsp),%r12d
  jmp    L111
L2:
  mov    0xc(%rsp),%r12d
  mov    %r14d,%ebp
  jmp    L111
```

assistant: ```c
void recharger_act_avoid(int x, int y, int theta) {
  int i;
  int baseX, baseY, baseTheta;
  char hasAvoid = 0;
  baseX = x;
  baseY = y;
  baseTheta = theta;
  x = y = theta = 0;
  if (adcspi_get_output(0, 0) > (230 * 4)) {
    x += (-20 + 5);
    y += 0;
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 1) > (230 * 4)) {
    x += (-20 + 5);
    y += (-20 + 5) / 2;
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 2) > (230 * 4)) {
    x += 0;
    y += (-20 + 5) / 2;
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 3) > (230 * 4)) {
    x += 0;
    y += (-20 + 5) / 2;
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 4) > (230 * 4)) {
    x += 0;
    y -= (-20 + 5) / 2;
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 5) > (230 * 4)) {
    x += 0;
    y -= (-20 + 5) / 2;
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 6) > (230 * 4)) {
    x += (-20 + 5);
    y -= (-20 + 5) / 2;
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 7) > (230 * 4)) {
    theta += (4);
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 8) > (230 * 4)) {
    theta += (4);
    hasAvoid = 1;
  }
  if (adcspi_get_output(0, 9) > (230 * 4)) {
    x -= (-20 + 5) / 2;
    y -= (-20 + 5) / 2;
    hasAvoid = 1;
  }
  if (!hasAvoid) {
    x = baseX;
    y = baseY;
    theta = baseTheta;
  }
  recharger_act(x, y, theta);
}
```