user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<recharger_act_avoid>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,0xc(%rsp)
  mov    %esi,%r13d
  mov    %edx,%r14d
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x399,%eax
  setge  %bpl
  mov    $0x0,%r12d
  mov    $0xfffffff1,%eax
  cmovge %eax,%r12d
  mov    $0x1,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  mov    $0x0,%ebx
  cmp    $0x398,%eax
  jle    L35
  sub    $0xf,%r12d
  mov    $0x1,%ebp
  mov    $0xfffffff9,%ebx
L35:
  mov    $0x2,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L52
  sub    $0x7,%ebx
  mov    $0x1,%ebp
L52:
  mov    $0x3,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L7
  sub    $0x7,%ebx
  mov    $0x1,%ebp
L7:
  mov    $0x4,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L92
  add    $0x7,%ebx
  mov    $0x1,%ebp
L92:
  mov    $0x5,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L31
  add    $0x7,%ebx
  mov    $0x1,%ebp
L31:
  mov    $0x6,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L25
  sub    $0xf,%r12d
  add    $0x7,%ebx
  mov    $0x1,%ebp
L25:
  mov    $0x7,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x399,%eax
  mov    $0x1,%edx
  cmovge %edx,%ebp
  setge  %r15b
  movzbl %r15b,%r15d
  shl    $0x2,%r15d
  mov    $0x8,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L56
  lea    0x4(%r15),%r14d
  mov    $0x9,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jle    L20
L57:
  lea    0x7(%r12),%eax
  mov    %eax,0xc(%rsp)
  lea    0x7(%rbx),%r13d
L34:
  mov    %r14d,%edx
  mov    %r13d,%esi
  mov    0xc(%rsp),%edi
  call   <recharger_act@plt>
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L20:
  mov    %ebx,%r13d
  mov    %r12d,0xc(%rsp)
  jmp    L34
L56:
  mov    $0x9,%esi
  mov    $0x0,%edi
  call   <adcspi_get_output@plt>
  cmp    $0x398,%eax
  jg     L51
  test   %bpl,%bpl
  cmovne %r15d,%r14d
  cmovne %ebx,%r13d
  cmove  0xc(%rsp),%r12d
  mov    %r12d,0xc(%rsp)
  jmp    L34
L51:
  mov    %r15d,%r14d
  jmp    L57
```

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);
}
```