user: Please show me the C implementation that matches the assembly code listed below:

```asm
<drfti1>:
  endbr64
  push   %r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x68,%rsp
  mov    %edi,0x54(%rsp)
  mov    %rsi,0x18(%rsp)
  movq   $0x0,0x10(%rsp)
L109:
  mov    0x10(%rsp),%rax
  cmp    $0x3,%rax
  ja     L117
  lea    D2(%rip),%rdi
  mov    (%rdi,%rax,4),%r14d
L52:
  movslq %ebx,%rax
  mov    %r13,%rcx
  lea    0x8(,%rax,4),%r15
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L101:
  mov    %r14d,(%rcx,%r15,1)
  cmp    $0x2,%r14d
  jne    L28
  test   %al,%al
  jne    L28
  lea    -0x1(%r13),%eax
  xor    %esi,%esi
  mov    %r13d,%edx
  mov    $0x4,%edi
  neg    %rax
  mov    %rcx,0x8(%rsp)
  shl    $0x2,%rax
  test   %r13d,%r13d
  cmovle %rsi,%rax
  shl    $0x2,%rdx
  test   %r13d,%r13d
  cmovle %rdi,%rdx
  lea    -0x4(%r15,%rax,1),%rsi
  add    %r15,%rax
  add    %rcx,%rsi
  lea    (%rcx,%rax,1),%rdi
  call   <memmove@plt>
  mov    0x8(%rsp),%rcx
  movl   $0x2,0x8(%rcx)
L28:
  add    $0x4,%r15
  cmp    $0x1,%r12d
  je     L68
L48:
  mov    %ebp,%eax
  mov    %ebx,%r13d
  add    $0x1,%ebx
  mov    %ebp,%esi
  cltd
  idiv   %r14d
  cmp    $0x1,%ebx
  mov    %eax,%r12d
  mov    %eax,%ebp
  sete   %al
  test   %edx,%edx
  je     L101
  mov    %rcx,%rax
  mov    %r13d,%ecx
  addq   $0x1,0x10(%rsp)
  mov    %esi,%ebp
  mov    %rax,%r13
  mov    %ecx,%ebx
  jmp    L109
L68:
  mov    0x54(%rsp),%eax
  mov    %ebp,0x4c(%rsp)
  mov    %ebx,0x4(%rcx)
  mov    %eax,(%rcx)
  test   %r13d,%r13d
  je     L47
  pxor   %xmm0,%xmm0
  movss  D0(%rip),%xmm1
  mov    0x18(%rsp),%r14
  movl   $0x0,0x48(%rsp)
  cvtsi2ss %eax,%xmm0
  lea    0x8(%rcx),%rax
  mov    %rax,0x40(%rsp)
  lea    -0x1(%r13),%eax
  lea    0xc(%rcx,%rax,4),%rax
  mov    %rax,0x58(%rsp)
  divss  %xmm0,%xmm1
  movss  %xmm1,0x34(%rsp)
  nopl   0x0(%rax)
L14:
  mov    0x40(%rsp),%rax
  mov    (%rax),%ecx
  mov    0x4c(%rsp),%eax
  mov    %eax,0x30(%rsp)
  imul   %ecx,%eax
  mov    %ecx,0x50(%rsp)
  mov    %eax,%edi
  mov    %eax,0x4c(%rsp)
  mov    0x54(%rsp),%eax
  cltd
  idiv   %edi
  lea    -0x1(%rcx),%edi
  mov    %edi,0x24(%rsp)
  mov    %eax,0x20(%rsp)
  test   %edi,%edi
  jle    L37
  movslq %eax,%rdi
  sub    $0x3,%eax
  movslq 0x48(%rsp),%rbp
  xor    %r13d,%r13d
  shr    %eax
  mov    %rdi,0x28(%rsp)
  xor    %r12d,%r12d
  add    %rax,%rax
  mov    %rax,0x38(%rsp)
  xchg   %ax,%ax
L36:
  add    0x30(%rsp),%r13d
  pxor   %xmm0,%xmm0
  cmpl   $0x2,0x20(%rsp)
  cvtsi2ss %r13d,%xmm0
  mulss  0x34(%rsp),%xmm0
  movss  %xmm0,0x18(%rsp)
  jle    L87
  mov    0x38(%rsp),%rax
  lea    (%r14,%rbp,4),%r15
  pxor   %xmm1,%xmm1
  lea    0x0(%rbp,%rax,1),%rdx
  lea    0x8(%r14,%rdx,4),%rbx
  nopl   0x0(%rax,%rax,1)
L138:
  addss  D11(%rip),%xmm1
  movss  0x18(%rsp),%xmm2
  add    $0x8,%r15
  mulss  %xmm1,%xmm2
  movss  %xmm1,0x10(%rsp)
  movaps %xmm2,%xmm0
  movss  %xmm2,0x8(%rsp)
  call   <cos@plt>
  movss  0x8(%rsp),%xmm2
  movss  %xmm0,-0x8(%r15)
  movaps %xmm2,%xmm0
  call   <sin@plt>
  movss  0x10(%rsp),%xmm1
  movss  %xmm0,-0x4(%r15)
  cmp    %r15,%rbx
  jne    L138
L87:
  add    $0x1,%r12d
  add    0x28(%rsp),%rbp
  cmp    %r12d,0x24(%rsp)
  jne    L36
  mov    0x50(%rsp),%eax
  mov    0x20(%rsp),%esi
  mov    0x48(%rsp),%edx
  sub    $0x2,%eax
  imul   %esi,%eax
  add    %esi,%edx
  add    %edx,%eax
  mov    %eax,0x48(%rsp)
L37:
  addq   $0x4,0x40(%rsp)
  mov    0x40(%rsp),%rax
  cmp    0x58(%rsp),%rax
  jne    L14
L47:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L117:
  add    $0x2,%r14d
  jmp    L52
```

tool_calls: name: unpack_data
arguments: label: D2
type_infered: string
name: unpack_data
arguments: label: D0
type_infered: byte[4]
name: unpack_data
arguments: label: D11
type_infered: byte[4]

tool: D2: 

tool: {"D0": [0xdb,0x0f,0xc9,0x40]}

tool: {"D11": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void drfti1(int n, float *wa, int *ifac) {
  static int ntryh[4] = {4, 2, 3, 5};
  static float tpi = 6.28318530717958648f;
  float arg, argh, argld, fi;
  int ntry = 0, i, j = -1;
  int k1, l1, l2, ib;
  int ld, ii, ip, is, nq, nr;
  int ido, ipm, nfm1;
  int nl = n;
  int nf = 0;
L101:
  j++;
  if (j < 4)
    ntry = ntryh[j];
  else
    ntry += 2;
L104:
  nq = nl / ntry;
  nr = nl - ntry * nq;
  if (nr != 0)
    goto L101;
  nf++;
  ifac[nf + 1] = ntry;
  nl = nq;
  if (ntry != 2)
    goto L107;
  if (nf == 1)
    goto L107;
  for (i = 1; i < nf; i++) {
    ib = nf - i + 1;
    ifac[ib + 1] = ifac[ib];
  }
  ifac[2] = 2;
L107:
  if (nl != 1)
    goto L104;
  ifac[0] = n;
  ifac[1] = nf;
  argh = tpi / n;
  is = 0;
  nfm1 = nf - 1;
  l1 = 1;
  if (nfm1 == 0)
    return;
  for (k1 = 0; k1 < nfm1; k1++) {
    ip = ifac[k1 + 2];
    ld = 0;
    l2 = l1 * ip;
    ido = n / l2;
    ipm = ip - 1;
    for (j = 0; j < ipm; j++) {
      ld += l1;
      i = is;
      argld = (float)ld * argh;
      fi = 0.f;
      for (ii = 2; ii < ido; ii += 2) {
        fi += 1.f;
        arg = fi * argld;
        wa[i++] = cos(arg);
        wa[i++] = sin(arg);
      }
      is += ido;
    }
    l1 = l2;
  }
}
```