user: What would the C source look like for the assembly code provided here:

```asm
<fk2mtg>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r12d
  mov    %rsi,%rbx
  mov    %rdx,%rbp
  cvtss2sd %xmm0,%xmm0
  mulsd  D247(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0xc(%rsp)
  cvttss2si %xmm0,%r13d
  mov    %r13d,%edi
  call   <sin@plt>
  movss  %xmm0,0x4(%rsp)
  mov    %r13d,%edi
  call   <cos@plt>
  movss  %xmm0,0x8(%rsp)
  movss  0xc(%rsp),%xmm0
  addss  %xmm0,%xmm0
  cvttss2si %xmm0,%r13d
  mov    %r13d,%edi
  call   <sin@plt>
  movss  %xmm0,0xc(%rsp)
  mov    %r13d,%edi
  call   <cos@plt>
  test   %r12d,%r12d
  jle    L76
  movaps %xmm0,%xmm1
  mov    %r12d,%eax
  shl    $0x2,%rax
  mov    $0x0,%edx
  movsd  D213(%rip),%xmm5
  movsd  D125(%rip),%xmm4
  movss  D131(%rip),%xmm3
L39:
  mov    0x0(%rbp),%rcx
  mov    0x48(%rbx),%rsi
  pxor   %xmm0,%xmm0
  cvtss2sd (%rsi,%rdx,1),%xmm0
  divsd  %xmm5,%xmm0
  mov    (%rbx),%rsi
  pxor   %xmm2,%xmm2
  cvtss2sd (%rsi,%rdx,1),%xmm2
  divsd  %xmm4,%xmm2
  subsd  %xmm2,%xmm0
  mov    0x30(%rbx),%rsi
  movaps %xmm1,%xmm2
  mulss  (%rsi,%rdx,1),%xmm2
  mulss  %xmm3,%xmm2
  cvtss2sd %xmm2,%xmm2
  subsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L39
  mov    $0x0,%edx
  movsd  D213(%rip),%xmm5
  movsd  D125(%rip),%xmm4
  movss  D131(%rip),%xmm3
L145:
  mov    0x8(%rbp),%rcx
  mov    0x50(%rbx),%rsi
  pxor   %xmm0,%xmm0
  cvtss2sd (%rsi,%rdx,1),%xmm0
  divsd  %xmm5,%xmm0
  mov    0x8(%rbx),%rsi
  pxor   %xmm2,%xmm2
  cvtss2sd (%rsi,%rdx,1),%xmm2
  divsd  %xmm4,%xmm2
  subsd  %xmm2,%xmm0
  mov    0x38(%rbx),%rsi
  movaps %xmm1,%xmm2
  mulss  (%rsi,%rdx,1),%xmm2
  mulss  %xmm3,%xmm2
  cvtss2sd %xmm2,%xmm2
  subsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L145
  mov    $0x0,%edx
  movss  D19(%rip),%xmm3
  movss  D131(%rip),%xmm2
L13:
  mov    0x10(%rbp),%rcx
  mov    0x40(%rbx),%rsi
  movss  (%rsi,%rdx,1),%xmm0
  xorps  %xmm3,%xmm0
  mulss  0xc(%rsp),%xmm0
  mulss  %xmm2,%xmm0
  movss  %xmm0,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L13
  mov    $0x0,%edx
  movss  D19(%rip),%xmm2
L32:
  mov    0x18(%rbp),%rcx
  mov    0x30(%rbx),%rsi
  movss  (%rsi,%rdx,1),%xmm0
  xorps  %xmm2,%xmm0
  mulss  0xc(%rsp),%xmm0
  movss  %xmm0,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L32
  mov    $0x0,%edx
  movss  D19(%rip),%xmm2
L131:
  mov    0x20(%rbp),%rcx
  mov    0x38(%rbx),%rsi
  movss  (%rsi,%rdx,1),%xmm0
  xorps  %xmm2,%xmm0
  mulss  0xc(%rsp),%xmm0
  movss  %xmm0,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L131
  mov    $0x0,%edx
L64:
  mov    0x28(%rbp),%rcx
  mov    0x40(%rbx),%rsi
  movaps %xmm1,%xmm0
  mulss  (%rsi,%rdx,1),%xmm0
  movss  %xmm0,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L64
  mov    $0x0,%edx
  movss  D19(%rip),%xmm2
L60:
  mov    0x30(%rbp),%rcx
  mov    0x18(%rbx),%rsi
  movss  (%rsi,%rdx,1),%xmm0
  xorps  %xmm2,%xmm0
  mulss  0x8(%rsp),%xmm0
  movss  %xmm0,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L60
  mov    $0x0,%edx
  movss  D19(%rip),%xmm2
L139:
  mov    0x38(%rbp),%rcx
  mov    0x20(%rbx),%rsi
  movss  (%rsi,%rdx,1),%xmm0
  xorps  %xmm2,%xmm0
  mulss  0x8(%rsp),%xmm0
  movss  %xmm0,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L139
  mov    $0x0,%eax
  movss  D19(%rip),%xmm2
L75:
  mov    0x40(%rbp),%rdx
  mov    0x28(%rbx),%rcx
  movss  (%rcx,%rax,4),%xmm0
  xorps  %xmm2,%xmm0
  mulss  0x4(%rsp),%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L75
  mov    $0x0,%eax
  movsd  D213(%rip),%xmm5
  movsd  D125(%rip),%xmm4
  movss  D131(%rip),%xmm3
L124:
  mov    0x48(%rbp),%rdx
  mov    0x48(%rbx),%rcx
  pxor   %xmm0,%xmm0
  cvtss2sd (%rcx,%rax,4),%xmm0
  divsd  %xmm5,%xmm0
  mov    (%rbx),%rcx
  pxor   %xmm2,%xmm2
  cvtss2sd (%rcx,%rax,4),%xmm2
  divsd  %xmm4,%xmm2
  subsd  %xmm2,%xmm0
  mov    0x30(%rbx),%rcx
  movaps %xmm1,%xmm2
  mulss  (%rcx,%rax,4),%xmm2
  mulss  %xmm3,%xmm2
  cvtss2sd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L124
  mov    $0x0,%eax
  movsd  D213(%rip),%xmm5
  movsd  D125(%rip),%xmm4
  movss  D131(%rip),%xmm3
L30:
  mov    0x50(%rbp),%rdx
  mov    0x50(%rbx),%rcx
  pxor   %xmm0,%xmm0
  cvtss2sd (%rcx,%rax,4),%xmm0
  divsd  %xmm5,%xmm0
  mov    0x8(%rbx),%rcx
  pxor   %xmm2,%xmm2
  cvtss2sd (%rcx,%rax,4),%xmm2
  divsd  %xmm4,%xmm2
  subsd  %xmm2,%xmm0
  mov    0x38(%rbx),%rcx
  movaps %xmm1,%xmm2
  mulss  (%rcx,%rax,4),%xmm2
  mulss  %xmm3,%xmm2
  cvtss2sd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L30
  mov    $0x0,%eax
  movss  D19(%rip),%xmm1
L31:
  mov    0x58(%rbp),%rdx
  mov    0x10(%rbp),%rcx
  movss  (%rcx,%rax,4),%xmm0
  xorps  %xmm1,%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L31
  mov    $0x0,%eax
  movss  D19(%rip),%xmm1
L71:
  mov    0x60(%rbp),%rdx
  mov    0x18(%rbx),%rcx
  movss  (%rcx,%rax,4),%xmm0
  xorps  %xmm1,%xmm0
  mulss  0x4(%rsp),%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L71
  mov    $0x0,%eax
  movss  D19(%rip),%xmm1
L148:
  mov    0x68(%rbp),%rdx
  mov    0x20(%rbx),%rcx
  movss  (%rcx,%rax,4),%xmm0
  xorps  %xmm1,%xmm0
  mulss  0x4(%rsp),%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L148
  mov    $0x0,%eax
L118:
  mov    0x70(%rbp),%rdx
  mov    0x28(%rbx),%rcx
  movss  0x8(%rsp),%xmm0
  mulss  (%rcx,%rax,4),%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L118
  mov    $0x0,%eax
  movss  D226(%rip),%xmm1
L49:
  mov    0x78(%rbp),%rdx
  mov    0x48(%rbx),%rsi
  mov    (%rbx),%rcx
  movss  (%rsi,%rax,4),%xmm0
  addss  (%rcx,%rax,4),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L49
  mov    $0x0,%eax
  movss  D226(%rip),%xmm1
L25:
  mov    0x80(%rbp),%rdx
  mov    0x50(%rbx),%rsi
  mov    0x8(%rbx),%rcx
  movss  (%rsi,%rax,4),%xmm0
  addss  (%rcx,%rax,4),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L25
  mov    $0x0,%eax
L156:
  mov    0x88(%rbp),%rdx
  movl   $0x0,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L156
L76:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: read_data
arguments: tag: D247
type: byte[8]
name: read_data
arguments: tag: D213
type: f64
name: read_data
arguments: tag: D125
type: f64
name: read_data
arguments: tag: D131
type: byte[4]
name: read_data
arguments: tag: D19
type: byte[4]
name: read_data
arguments: tag: D226
type: byte[4]

tool: {"D247": [0x11,0xdd,0x52,0xa2,0x46,0xdf,0x91,0x3f]}

tool: D213: 3

tool: D125: 6

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

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

tool: {"D226": [0x00,0x00,0x40,0x40]}

assistant: ```c
void fk2mtg(float az, int npt, float *fk[12], float *mt[18]) {
  int i;
  float sa, ca, sa2, ca2;
  az = az * 1.745329252e-2;
  sa = sin(az);
  ca = cos(az);
  sa2 = sin(2 * az);
  ca2 = cos(2 * az);
  for (i = 0; i < npt; i++)
    mt[0][i] = fk[9][i] / 3. - fk[0][i] / 6. - fk[6][i] * ca2 / 2;
  for (i = 0; i < npt; i++)
    mt[1][i] = fk[10][i] / 3. - fk[1][i] / 6. - fk[7][i] * ca2 / 2;
  for (i = 0; i < npt; i++)
    mt[2][i] = -fk[8][i] * sa2 / 2;
  for (i = 0; i < npt; i++)
    mt[3][i] = -fk[6][i] * sa2;
  for (i = 0; i < npt; i++)
    mt[4][i] = -fk[7][i] * sa2;
  for (i = 0; i < npt; i++)
    mt[5][i] = fk[8][i] * ca2;
  for (i = 0; i < npt; i++)
    mt[6][i] = -fk[3][i] * ca;
  for (i = 0; i < npt; i++)
    mt[7][i] = -fk[4][i] * ca;
  for (i = 0; i < npt; i++)
    mt[8][i] = -fk[5][i] * sa;
  for (i = 0; i < npt; i++)
    mt[9][i] = fk[9][i] / 3. - fk[0][i] / 6. + fk[6][i] * ca2 / 2;
  for (i = 0; i < npt; i++)
    mt[10][i] = fk[10][i] / 3. - fk[1][i] / 6. + fk[7][i] * ca2 / 2;
  for (i = 0; i < npt; i++)
    mt[11][i] = -mt[2][i];
  for (i = 0; i < npt; i++)
    mt[12][i] = -fk[3][i] * sa;
  for (i = 0; i < npt; i++)
    mt[13][i] = -fk[4][i] * sa;
  for (i = 0; i < npt; i++)
    mt[14][i] = fk[5][i] * ca;
  for (i = 0; i < npt; i++)
    mt[15][i] = (fk[9][i] + fk[0][i]) / 3.;
  for (i = 0; i < npt; i++)
    mt[16][i] = (fk[10][i] + fk[1][i]) / 3.;
  for (i = 0; i < npt; i++)
    mt[17][i] = 0.;
  return;
}
```