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

```asm
<lpc10_placea>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rax
  mov    %rdx,(%rsp)
  mov    %ecx,%r12d
  mov    %r8,0x8(%rsp)
  mov    %r9,0x10(%rsp)
  movslq %ecx,%rdx
  lea    0x0(,%rdx,8),%rbp
  cmpl   $0x1,-0xc(%rsi,%rdx,8)
  je     L19
L115:
  add    %rbp,%rax
  mov    (%rax),%r14d
  cmp    $0x1,%r14d
  je     L189
L135:
  cmpl   $0x1,0x4(%rax)
  sete   %r14b
  movzbl %r14b,%r14d
  je     L189
L65:
  sub    $0x8,%rbp
  mov    0x8(%rsp),%rax
  add    %rbp,%rax
  mov    0x10(%rsp),%r8
  add    %rbp,%r8
  mov    (%rax),%ecx
  mov    %ecx,(%r8)
  mov    0x4(%rax),%edi
  mov    %edi,0x4(%r8)
  mov    (%rbx),%esi
  mov    %edi,%eax
  sub    %ecx,%eax
  add    $0x1,%eax
  cltd
  idiv   %esi
  imul   %esi,%eax
  test   %eax,%eax
  je     L235
  test   %r14d,%r14d
  je     L235
  mov    (%rsp),%rbx
  cmpl   $0x2,(%rbx)
  jne    L222
  add    0x60(%rsp),%rbp
  sub    %eax,%edi
  add    $0x1,%edi
  mov    %edi,0x0(%rbp)
  mov    0x4(%r8),%eax
  mov    %eax,0x4(%rbp)
  jmp    L31
L19:
  lea    -0x8(%rsi,%rbp,1),%rdx
  cmpl   $0x1,(%rdx)
  jne    L115
  cmpl   $0x1,0x4(%rdx)
  jne    L115
  lea    (%rsi,%rbp,1),%rdx
  mov    (%rdx),%r14d
  mov    %rdx,%rax
  cmp    $0x1,%r14d
  jne    L135
  mov    0x4(%rdx),%eax
  cmp    $0x1,%eax
  je     L158
L189:
  mov    (%rsp),%rax
  cmpl   $0x0,(%rax)
  jne    L65
L139:
  sub    $0x2,%r12d
  imul   0x68(%rsp),%r12d
  lea    0x1(%r12),%r13d
  mov    (%rbx),%ecx
  mov    0x10(%rsp),%rax
  mov    -0x10(%rax,%rbp,1),%edi
  lea    (%r12,%rcx,1),%eax
  sub    %edi,%eax
  cltd
  idiv   %ecx
  imul   %ecx,%eax
  add    %edi,%eax
  mov    %eax,%edi
  sub    $0x8,%rbp
  mov    0x8(%rsp),%rdx
  lea    (%rdx,%rbp,1),%r15
  mov    0x4(%r15),%eax
  add    (%r15),%eax
  add    $0x1,%eax
  sub    0x70(%rsp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %edi,0x1c(%rsp)
  sub    %edi,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %ecx,%xmm1
  divss  %xmm1,%xmm0
  addss  D5(%rip),%xmm0
  call   <floorf@plt>
  mov    0x10(%rsp),%rsi
  lea    (%rsi,%rbp,1),%rdx
  imul   (%rbx),%eax
  add    0x1c(%rsp),%eax
  mov    %eax,(%rdx)
  mov    0x70(%rsp),%edi
  lea    -0x1(%rax,%rdi,1),%ecx
  mov    %ecx,0x4(%rdx)
  mov    (%rsp),%rdi
  cmpl   $0x1,(%rdi)
  jle    L157
  cmp    0x4(%r15),%ecx
  jle    L157
  sub    (%rbx),%eax
  mov    %eax,(%rdx)
  sub    (%rbx),%ecx
  mov    %ecx,0x4(%rdx)
L157:
  mov    (%rsp),%rax
  mov    (%rax),%eax
  and    $0xfffffffd,%eax
  cmp    $0x1,%eax
  jne    L230
  mov    (%rdx),%eax
  cmp    (%r15),%eax
  jge    L230
  add    (%rbx),%eax
  mov    %eax,(%rdx)
  mov    (%rbx),%eax
  add    %eax,0x4(%rdx)
L230:
  mov    0x68(%rsp),%eax
  lea    (%r12,%rax,2),%esi
  mov    0x4(%rdx),%eax
  cmp    %eax,%esi
  jge    L40
L231:
  mov    (%rbx),%ecx
  sub    %ecx,(%rdx)
  sub    (%rbx),%eax
  mov    %eax,0x4(%rdx)
  cmp    %esi,%eax
  jg     L231
L40:
  mov    (%rdx),%ecx
  cmp    %ecx,%r13d
  jle    L120
L186:
  mov    %ecx,%eax
  add    (%rbx),%eax
  mov    %eax,%ecx
  mov    %eax,(%rdx)
  mov    (%rbx),%esi
  add    %esi,0x4(%rdx)
  cmp    %r13d,%eax
  jl     L186
L120:
  mov    (%rdx),%ecx
  mov    (%rbx),%esi
  mov    0x4(%rdx),%eax
  sub    %ecx,%eax
  add    $0x1,%eax
  cltd
  idiv   %esi
  imul   %esi,%eax
  test   %eax,%eax
  je     L235
  test   %r14d,%r14d
  je     L235
L222:
  add    0x60(%rsp),%rbp
  mov    %ecx,0x0(%rbp)
  lea    -0x1(%rcx,%rax,1),%eax
  mov    %eax,0x4(%rbp)
  jmp    L31
L158:
  mov    %eax,%r14d
  jmp    L139
L235:
  mov    0x8(%rsp),%rax
  add    %rbp,%rax
  add    0x60(%rsp),%rbp
  mov    (%rax),%edx
  mov    %edx,0x0(%rbp)
  mov    0x4(%rax),%eax
  mov    %eax,0x4(%rbp)
L31:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D5
type_guessed: byte[4]

tool: {"D5": [0x00,0x00,0x00,0x3f]}

assistant: ```c
void lpc10_placea(int32_t *ipitch, int32_t voibuf[3][2], int32_t *obound, int32_t af, int32_t vwin[3][2], int32_t awin[3][2], int32_t ewin[3][2], int32_t lframe, int32_t maxwin) {
  int allv;
  int winv;
  int32_t i;
  int32_t j;
  int32_t k;
  int32_t l;
  int32_t hrange;
  int ephase;
  int32_t lrange;
  lrange = (af - 2) * lframe + 1;
  hrange = af * lframe;
  allv = voibuf[af - 2][1] == 1 && voibuf[af - 1][0] == 1 && voibuf[af - 1][1] == 1 && voibuf[af][0] == 1 && voibuf[af][1] == 1;
  winv = voibuf[af][0] == 1 || voibuf[af][1] == 1;
  if (allv || (winv && *obound == 0)) {
    i = (lrange + *ipitch - 1 - awin[af - 2][0]) / *ipitch;
    i *= *ipitch;
    i += awin[af - 2][0];
    l = maxwin;
    k = (vwin[af - 1][0] + vwin[af - 1][1] + 1 - l) / 2;
    awin[af - 1][0] = i + ((int)floorf((float)(k - i) / (float)*ipitch + 0.5f)) * (*ipitch);
    awin[af - 1][1] = awin[af - 1][0] + l - 1;
    if (*obound >= 2 && awin[af - 1][1] > vwin[af - 1][1]) {
      awin[af - 1][0] -= *ipitch;
      awin[af - 1][1] -= *ipitch;
    }
    if ((*obound == 1 || *obound == 3) && awin[af - 1][0] < vwin[af - 1][0]) {
      awin[af - 1][0] += *ipitch;
      awin[af - 1][1] += *ipitch;
    }
    while (awin[af - 1][1] > hrange) {
      awin[af - 1][0] -= *ipitch;
      awin[af - 1][1] -= *ipitch;
    }
    while (awin[af - 1][0] < lrange) {
      awin[af - 1][0] += *ipitch;
      awin[af - 1][1] += *ipitch;
    }
    ephase = (!0);
  } else {
    awin[af - 1][0] = vwin[af - 1][0];
    awin[af - 1][1] = vwin[af - 1][1];
    ephase = 0;
  }
  j = (awin[af - 1][1] - awin[af - 1][0] + 1) / *ipitch * *ipitch;
  if (j == 0 || !winv) {
    ewin[af - 1][0] = vwin[af - 1][0];
    ewin[af - 1][1] = vwin[af - 1][1];
  } else if (!ephase && *obound == 2) {
    ewin[af - 1][0] = awin[af - 1][1] - j + 1;
    ewin[af - 1][1] = awin[af - 1][1];
  } else {
    ewin[af - 1][0] = awin[af - 1][0];
    ewin[af - 1][1] = awin[af - 1][0] + j - 1;
  }
}
```