user: 请将以下的汇编代码转换成C语言代码：

```asm
<pet_c_oplem_dda_att>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %esi,%r12d
  mov    %rdx,0x18(%rsp)
  mov    %r8,0x20(%rsp)
  mov    0xc0(%rsp),%rbp
  mov    0xc8(%rsp),%ebx
  mov    0xd0(%rsp),%eax
  mov    0x100(%rsp),%r14
  mov    %eax,%r15d
  imul   0xd8(%rsp),%r15d
  cmp    %ebx,%eax
  mov    $0x0,%eax
  cmovl  %ebx,%eax
  cmp    0xd8(%rsp),%eax
  cmovl  0xd8(%rsp),%eax
  movslq %eax,%rdi
  imul   $0x55555556,%rdi,%rdi
  shr    $0x20,%rdi
  cltd
  sub    %edx,%edi
  add    %eax,%edi
  movslq %edi,%rdi
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    %rax,0x28(%rsp)
  imul   %r15d,%ebx
  mov    %ebx,0x4c(%rsp)
  lea    0x0(,%rbx,4),%eax
  mov    %eax,%eax
  mov    %rax,0x40(%rsp)
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,0x30(%rsp)
  test   %ebx,%ebx
  jle    L116
  mov    0xe0(%rsp),%rax
  lea    -0x1(%rbx),%edx
  lea    0x4(%rax,%rdx,4),%rdx
  movss  D51(%rip),%xmm1
L102:
  movaps %xmm1,%xmm0
  divss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L102
L116:
  cmpl   $0x0,0x120(%rsp)
  jle    L171
  pxor   %xmm1,%xmm1
  cvtsi2ss %r12d,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x120(%rsp),%xmm0
  divss  %xmm0,%xmm1
  movss  %xmm1,0x48(%rsp)
  movl   $0x0,0x3c(%rsp)
  jmp    L5
L117:
  pxor   %xmm0,%xmm0
  cvtsi2ss %r11d,%xmm0
  movss  D51(%rip),%xmm1
  divss  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ss %r8d,%xmm0
  mulss  %xmm1,%xmm0
  mulss  D24(%rip),%xmm0
  cvttss2si %xmm0,%r8d
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  mulss  %xmm1,%xmm0
  mulss  D24(%rip),%xmm0
  cvttss2si %xmm0,%r9d
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm1,%xmm0
  mulss  D24(%rip),%xmm0
  cvttss2si %xmm0,%r10d
  shl    $0x17,%ecx
  shl    $0x17,%esi
  shl    $0x17,%edi
  test   %r11d,%r11d
  jle    L182
  mov    0x28(%rsp),%rdx
  lea    -0x1(%r11),%eax
  lea    0x4(%rdx,%rax,4),%rbx
  pxor   %xmm0,%xmm0
  movss  %xmm0,0x4(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %r8d,%r12d
  mov    0xd8(%rsp),%r11d
L99:
  mov    %edi,%eax
  sar    $0x17,%eax
  imul   %r15d,%eax
  mov    %esi,%r8d
  sar    $0x17,%r8d
  imul   %r11d,%r8d
  add    %eax,%r8d
  mov    %ecx,%eax
  sar    $0x17,%eax
  add    %r8d,%eax
  mov    %eax,(%rdx)
  cltq
  movss  0x4(%rsp),%xmm3
  addss  0x0(%rbp,%rax,4),%xmm3
  movss  %xmm3,0x4(%rsp)
  subss  (%r14,%rax,4),%xmm0
  add    %r12d,%ecx
  add    %r9d,%esi
  add    %r10d,%edi
  add    $0x4,%rdx
  cmp    %rbx,%rdx
  jne    L99
  mov    0x8(%rsp),%r12
  movss  0x4(%rsp),%xmm4
  ucomiss D80(%rip),%xmm4
  jp     L159
  jne    L159
L182:
  add    $0x1,%r13
  cmp    %r13d,0x38(%rsp)
  jle    L92
L63:
  mov    0x10(%rsp),%rax
  movzwl (%rax,%r13,2),%ecx
  mov    0x18(%rsp),%rax
  movzwl (%rax,%r13,2),%esi
  mov    0x20(%rsp),%rax
  movzwl (%rax,%r13,2),%edi
  mov    0x90(%rsp),%rax
  movzwl (%rax,%r13,2),%r8d
  sub    %ecx,%r8d
  mov    0xa0(%rsp),%rax
  movzwl (%rax,%r13,2),%edx
  sub    %esi,%edx
  mov    0xb0(%rsp),%rax
  movzwl (%rax,%r13,2),%eax
  sub    %edi,%eax
  mov    %r8d,%r9d
  neg    %r9d
  cmovs  %r8d,%r9d
  pxor   %xmm1,%xmm1
  cvtsi2ss %r9d,%xmm1
  mov    %eax,%r9d
  neg    %r9d
  cmovs  %eax,%r9d
  pxor   %xmm0,%xmm0
  cvtsi2ss %r9d,%xmm0
  mov    %edx,%r9d
  neg    %r9d
  cmovs  %edx,%r9d
  pxor   %xmm2,%xmm2
  cvtsi2ss %r9d,%xmm2
  cvttss2si %xmm2,%r11d
  pxor   %xmm2,%xmm2
  cvtsi2ss %r11d,%xmm2
  comiss %xmm2,%xmm1
  jbe    L166
  cvttss2si %xmm1,%r11d
L166:
  pxor   %xmm1,%xmm1
  cvtsi2ss %r11d,%xmm1
  comiss %xmm1,%xmm0
  jbe    L117
  cvttss2si %xmm0,%r11d
  jmp    L117
L92:
  mov    0x4c(%rsp),%eax
  test   %eax,%eax
  jle    L91
  mov    %eax,%edx
  mov    $0x0,%eax
  mov    0x30(%rsp),%rcx
  mov    0xe0(%rsp),%rsi
L148:
  movss  0x0(%rbp,%rax,4),%xmm0
  mulss  (%rcx,%rax,4),%xmm0
  mulss  (%rsi,%rax,4),%xmm0
  movss  %xmm0,0x0(%rbp,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L148
L91:
  mov    0x3c(%rsp),%eax
  cmp    0x120(%rsp),%eax
  je     L171
L5:
  mov    0x3c(%rsp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  0x48(%rsp),%xmm5
  mulss  %xmm5,%xmm0
  addss  D25(%rip),%xmm0
  cvttss2si %xmm0,%r13d
  add    $0x1,%eax
  mov    %eax,0x3c(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm5,%xmm0
  addss  D25(%rip),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,%ebx
  mov    %eax,0x38(%rsp)
  mov    0x40(%rsp),%rdx
  mov    $0x0,%esi
  mov    0x30(%rsp),%rdi
  call   <memset@plt>
  cmp    %ebx,%r13d
  jge    L92
  movslq %r13d,%r13
  jmp    L63
L171:
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L159:
  mulss  D95(%rip),%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <exp@plt>
  movapd %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd 0x4(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  D51(%rip),%xmm1
  divss  %xmm0,%xmm1
  mov    0x30(%rsp),%rdx
L167:
  movslq (%r12),%rax
  lea    (%rdx,%rax,4),%rax
  movaps %xmm1,%xmm0
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  add    $0x4,%r12
  cmp    %r12,%rbx
  jne    L167
  jmp    L182
```

tool_calls: name: parse_data
arguments: tag: D51
datatype: byte[4]
name: parse_data
arguments: tag: D24
datatype: byte[4]
name: parse_data
arguments: tag: D80
datatype: byte[4]
name: parse_data
arguments: tag: D25
datatype: byte[4]
name: parse_data
arguments: tag: D95
datatype: byte[4]

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

tool: {"D24": [0x00,0x00,0x00,0x4b]}

tool: {"D80": [0x00,0x00,0x00,0x00]}

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

tool: {"D95": [0x4c,0xa6,0xaa,0x3e]}

assistant: ```c
void pet_c_oplem_dda_att(unsigned short int *X1, int nx1, unsigned short int *Y1, int ny1, unsigned short int *Z1, int nz1, unsigned short int *X2, int nx2, unsigned short int *Y2, int ny2, unsigned short int *Z2, int nz2, float *im, int nim1, int nim2, int nim3, float *NM, int nm1, int nm2, int nm3, float *AM, int am1, int am2, int am3, int nsub) {
  int length, lengthy, lengthz, ilor, n;
  float flength, Qi, Ai;
  float lx, ly, lz;
  int fxinc, fyinc, fzinc, fx, fy, fz;
  int x1, y1, z1, x2, y2, z2, diffx, diffy, diffz;
  int step = nim2 * nim3;
  int ndata, ind;
  if (nim1 > nim2) {
    ndata = nim1;
  }
  if (nim3 > ndata) {
    ndata = nim3;
  }
  ndata += ndata / 3;
  int *buf = (int *)malloc(ndata * sizeof(int));
  step = nim2 * nim3;
  int lor_start, lor_stop, nlor, isub;
  int nvox = step * nim1;
  unsigned int mem_size_F = nvox * sizeof(float);
  float *F = (float *)malloc(mem_size_F);
  for (n = 0; n < nvox; ++n) {
    NM[n] = 1.0f / NM[n];
  }
  for (isub = 0; isub < nsub; ++isub) {
    lor_start = (int)((float)nx1 / nsub * isub + 0.5f);
    lor_stop = (int)((float)nx1 / nsub * (isub + 1) + 0.5f);
    nlor = lor_stop - lor_start;
    memset(F, 0, mem_size_F);
    for (ilor = lor_start; ilor < lor_stop; ++ilor) {
      Qi = 0.0f;
      Ai = 0.0f;
      x1 = X1[ilor];
      x2 = X2[ilor];
      y1 = Y1[ilor];
      y2 = Y2[ilor];
      z1 = Z1[ilor];
      z2 = Z2[ilor];
      diffx = x2 - x1;
      diffy = y2 - y1;
      diffz = z2 - z1;
      lx = abs(diffx);
      ly = abs(diffy);
      lz = abs(diffz);
      length = ly;
      if (lx > length) {
        length = lx;
      }
      if (lz > length) {
        length = lz;
      }
      flength = 1.0f / (float)length;
      fxinc = ((int)diffx * flength * (int)(pow(2, 23)));
      fyinc = ((int)diffy * flength * (int)(pow(2, 23)));
      fzinc = ((int)diffz * flength * (int)(pow(2, 23)));
      fx = ((int)x1 * (int)(pow(2, 23)));
      fy = ((int)y1 * (int)(pow(2, 23)));
      fz = ((int)z1 * (int)(pow(2, 23)));
      for (n = 0; n < length; ++n) {
        ind = (fz >> 23) * step + (fy >> 23) * nim3 + (fx >> 23);
        buf[n] = ind;
        Qi += im[ind];
        Ai -= AM[ind];
        fx = fx + fxinc;
        fy = fy + fyinc;
        fz = fz + fzinc;
      }
      if (Qi == 0.0f) {
        continue;
      }
      Qi = Qi * exp(Ai * 0.3333f);
      Qi = 1.0f / Qi;
      for (n = 0; n < length; ++n) {
        F[buf[n]] += Qi;
      }
    }
    for (n = 0; n < nvox; ++n) {
      im[n] = im[n] * F[n] * NM[n];
    }
  }
  free(buf);
  free(F);
}
```