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

```asm
<sncndn>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  movss  %xmm0,0x18(%rsp)
  movss  %xmm1,0x14(%rsp)
  mov    %rdi,%r13
  mov    %rsi,%r15
  mov    %rdx,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  ucomiss D31(%rip),%xmm1
  jp     L37
  je     L79
L37:
  pxor   %xmm0,%xmm0
  comiss 0x14(%rsp),%xmm0
  ja     L22
  movss  0x14(%rsp),%xmm3
  movss  %xmm3,0xc(%rsp)
L86:
  movss  D27(%rip),%xmm0
  movss  %xmm0,(%r14)
  mov    $0x1,%r12d
  movd   %xmm0,%ebx
L87:
  mov    %r12d,%ebp
  mov    %ebx,0x20(%rsp,%r12,4)
  movss  0xc(%rsp),%xmm0
  call   <sqrt@plt>
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm0,%xmm4
  movss  %xmm4,0x60(%rsp,%r12,4)
  movd   %ebx,%xmm5
  movd   %ebx,%xmm0
  addss  %xmm4,%xmm0
  mulss  D50(%rip),%xmm0
  movd   %xmm0,%ebx
  movss  %xmm5,0xc(%rsp)
  movaps %xmm5,%xmm0
  movss  %xmm4,0x10(%rsp)
  subss  %xmm4,%xmm0
  call   <fabs@plt>
  movapd %xmm0,%xmm1
  movss  0xc(%rsp),%xmm5
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm5,%xmm0
  mulsd  D3(%rip),%xmm0
  comisd %xmm1,%xmm0
  jae    L41
  movss  0x10(%rsp),%xmm4
  mulss  %xmm5,%xmm4
  movss  %xmm4,0xc(%rsp)
  add    $0x1,%r12
  cmp    $0xe,%r12
  jne    L87
L41:
  movd   %ebx,%xmm3
  mulss  0x18(%rsp),%xmm3
  movd   %xmm3,%r12d
  movaps %xmm3,%xmm0
  call   <sin@plt>
  movss  %xmm0,0x0(%r13)
  movd   %r12d,%xmm0
  call   <cos@plt>
  movss  %xmm0,(%r15)
  movss  0x0(%r13),%xmm1
  ucomiss D31(%rip),%xmm1
  jp     L8
  jne    L8
L76:
  pxor   %xmm0,%xmm0
  comiss 0x14(%rsp),%xmm0
  ja     L150
L134:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L108
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  movss  D27(%rip),%xmm0
  movss  0x14(%rsp),%xmm3
  subss  %xmm3,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm3,%xmm1
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movsd  D101(%rip),%xmm2
  divsd  %xmm3,%xmm2
  divsd  %xmm2,%xmm1
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm1,%xmm3
  movss  %xmm3,0xc(%rsp)
  call   <sqrt@plt>
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm0,%xmm2
  movss  %xmm2,0x1c(%rsp)
  movss  0x18(%rsp),%xmm3
  mulss  %xmm2,%xmm3
  movss  %xmm3,0x18(%rsp)
  jmp    L86
L8:
  divss  %xmm1,%xmm0
  movd   %ebx,%xmm3
  mulss  %xmm0,%xmm3
  movss  %xmm3,0xc(%rsp)
  test   %ebp,%ebp
  jle    L130
  movss  (%r14),%xmm1
  movslq %ebp,%rax
  lea    0x60(%rsp),%rdx
L51:
  movss  0x20(%rsp,%rax,4),%xmm2
  movss  0xc(%rsp),%xmm7
  mulss  %xmm7,%xmm0
  movaps %xmm1,%xmm6
  mulss  %xmm7,%xmm6
  movss  %xmm6,0xc(%rsp)
  movaps %xmm0,%xmm1
  addss  (%rdx,%rax,4),%xmm1
  addss  %xmm2,%xmm0
  divss  %xmm0,%xmm1
  divss  %xmm2,%xmm6
  movaps %xmm6,%xmm0
  sub    $0x1,%rax
  test   %eax,%eax
  jg     L51
  movss  %xmm1,(%r14)
L130:
  movss  0xc(%rsp),%xmm3
  movaps %xmm3,%xmm0
  mulss  %xmm3,%xmm0
  addss  D27(%rip),%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  D113(%rip),%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  0x0(%r13),%xmm1
  comiss D31(%rip),%xmm1
  jb     L70
L116:
  movss  %xmm0,0x0(%r13)
  mulss  0xc(%rsp),%xmm0
  movss  %xmm0,(%r15)
  jmp    L76
L70:
  xorps  D26(%rip),%xmm0
  jmp    L116
L150:
  movss  (%r14),%xmm0
  movss  (%r15),%xmm1
  movss  %xmm1,(%r14)
  movss  %xmm0,(%r15)
  movss  0x0(%r13),%xmm0
  divss  0x1c(%rsp),%xmm0
  movss  %xmm0,0x0(%r13)
  jmp    L134
L79:
  movss  0x18(%rsp),%xmm0
  call   <cosh@plt>
  movapd %xmm0,%xmm1
  movsd  D113(%rip),%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%r15)
  movss  %xmm0,(%r14)
  movss  0x18(%rsp),%xmm0
  call   <tanh@plt>
  movss  %xmm0,0x0(%r13)
  jmp    L134
L108:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D31
data_type: f64
name: retrieve_data
arguments: data_label: D27
data_type: f32
name: retrieve_data
arguments: data_label: D50
data_type: f32
name: retrieve_data
arguments: data_label: D3
data_type: f64
name: retrieve_data
arguments: data_label: D101
data_type: byte[8]
name: retrieve_data
arguments: data_label: D113
data_type: byte[8]
name: retrieve_data
arguments: data_label: D26
data_type: byte[16]

tool: D31: 0

tool: D27: 1

tool: D50: 0.5

tool: D3: 0.0003

tool: {"D101": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: {"D113": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D26": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void sncndn(float uu, float emmc, float *sn, float *cn, float *dn) {
  float a, b, c, d, emc, u;
  float em[14], en[14];
  int i, ii, l, bo;
  emc = emmc;
  u = uu;
  if (emc) {
    bo = (emc < 0.0);
    if (bo) {
      d = 1.0 - emc;
      emc /= -1.0 / d;
      u *= (d = sqrt(d));
    }
    a = 1.0;
    *dn = 1.0;
    for (i = 1; i <= 13; i++) {
      l = i;
      em[i] = a;
      en[i] = (emc = sqrt(emc));
      c = 0.5 * (a + emc);
      if (fabs(a - emc) <= 0.0003 * a)
        break;
      emc *= a;
      a = c;
    }
    u *= c;
    *sn = sin(u);
    *cn = cos(u);
    if (*sn) {
      a = (*cn) / (*sn);
      c *= a;
      for (ii = l; ii >= 1; ii--) {
        b = em[ii];
        a *= c;
        c *= (*dn);
        *dn = (en[ii] + a) / (b + a);
        a = c / b;
      }
      a = 1.0 / sqrt(c * c + 1.0);
      *sn = (*sn >= 0.0 ? a : -a);
      *cn = c * (*sn);
    }
    if (bo) {
      a = (*dn);
      *dn = (*cn);
      *cn = a;
      *sn /= d;
    }
  } else {
    *cn = 1.0 / cosh(u);
    *dn = (*cn);
    *sn = tanh(u);
  }
}
```