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

```asm
<integrated_profile>:
  endbr64
  push   %r15
  mov    %edi,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x1f8,%rsp
  movsd  0x8(%rcx),%xmm5
  movsd  0x20(%rcx),%xmm6
  movsd  0x28(%rcx),%xmm7
  movsd  %xmm1,0x30(%rsp)
  cvttsd2si (%rcx),%r14d
  movsd  %xmm0,0x28(%rsp)
  movsd  0x10(%rcx),%xmm1
  movsd  0x18(%rcx),%xmm4
  mov    0x230(%rsp),%rdi
  mov    %r8,0x38(%rsp)
  mov    %r9,0x40(%rsp)
  mov    %rdi,0x48(%rsp)
  mov    %fs:0x28,%rdx
  mov    %rdx,0x1e8(%rsp)
  xor    %edx,%edx
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm6,(%rsp)
  movsd  %xmm7,0x20(%rsp)
  test   %eax,%eax
  je     L173
  pxor   %xmm2,%xmm2
  cmp    $0x1,%eax
  je     L114
L72:
  mov    0x1e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L215
  add    $0x1f8,%rsp
  movapd %xmm2,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L114:
  movq   D367(%rip),%xmm0
  pxor   %xmm3,%xmm3
  movapd %xmm1,%xmm5
  movsd  D176(%rip),%xmm7
  cvtsi2sd %esi,%xmm3
  movsd  D359(%rip),%xmm6
  movapd %xmm4,%xmm8
  movaps %xmm0,0x120(%rsp)
  movq   D283(%rip),%xmm0
  mulsd  %xmm4,%xmm8
  mulsd  %xmm1,%xmm5
  movaps %xmm0,0x130(%rsp)
  movapd D279(%rip),%xmm0
  subsd  %xmm7,%xmm3
  movaps %xmm0,0x140(%rsp)
  movapd D278(%rip),%xmm0
  movsd  %xmm8,0x70(%rsp)
  movaps %xmm0,0x150(%rsp)
  movapd D45(%rip),%xmm0
  addsd  %xmm6,%xmm3
  movaps %xmm0,0x1a0(%rsp)
  movq   D261(%rip),%xmm0
  movaps %xmm0,0x1b0(%rsp)
  movapd D79(%rip),%xmm0
  movaps %xmm0,0x1c0(%rsp)
  movapd D233(%rip),%xmm0
  movaps %xmm0,0x1d0(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  subsd  %xmm7,%xmm0
  movapd %xmm0,%xmm7
  movapd %xmm3,%xmm0
  addsd  %xmm6,%xmm7
  mulsd  %xmm3,%xmm0
  movapd %xmm7,%xmm6
  movsd  %xmm7,0x78(%rsp)
  mulsd  %xmm7,%xmm6
  divsd  %xmm5,%xmm0
  divsd  %xmm8,%xmm6
  addsd  %xmm6,%xmm0
  movapd %xmm7,%xmm6
  mulsd  %xmm3,%xmm6
  mulsd  (%rsp),%xmm6
  addsd  %xmm6,%xmm0
  mulsd  D363(%rip),%xmm0
  addsd  D190(%rip),%xmm0
  comisd D161(%rip),%xmm0
  ja     L72
  mulsd  %xmm4,%xmm1
  mov    D322(%rip),%rax
  movsd  %xmm2,0x58(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm1,0x50(%rsp)
  movq   %rax,%xmm1
  call   <pow@plt>
  mulsd  0x50(%rsp),%xmm0
  movsd  D190(%rip),%xmm1
  movsd  0x8(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm3
  movsd  0x58(%rsp),%xmm2
  divsd  %xmm0,%xmm1
  comisd D149(%rip),%xmm1
  jb     L7
  comisd D130(%rip),%xmm1
  jae    L244
L163:
  mulsd  0x18(%rsp),%xmm2
  mov    %r14d,%eax
  shr    $0x1f,%eax
  add    %r14d,%eax
  sar    %eax
  lea    -0xf(%rax,%rbx,2),%edx
  test   %edx,%edx
  js     L72
  cmp    %edx,%r14d
  jle    L72
  lea    -0xf(%rax,%rbp,2),%eax
  test   %eax,%eax
  js     L72
  cmp    %eax,%r14d
  jle    L72
  imul   %eax,%r14d
  lea    (%r14,%rdx,1),%eax
  jmp    L222
  nopl   0x0(%rax)
L173:
  pxor   %xmm2,%xmm2
  movsd  D359(%rip),%xmm0
  movsd  %xmm4,0x50(%rsp)
  cvtsi2sd %esi,%xmm2
  subsd  D176(%rip),%xmm2
  mulsd  D118(%rip),%xmm1
  addsd  %xmm2,%xmm0
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  divsd  %xmm1,%xmm0
  call   <erf@plt>
  movsd  0x10(%rsp),%xmm2
  subsd  D359(%rip),%xmm2
  movsd  0x8(%rsp),%xmm1
  movsd  %xmm0,0x60(%rsp)
  divsd  %xmm1,%xmm2
  movapd %xmm2,%xmm0
  call   <erf@plt>
  pxor   %xmm1,%xmm1
  movsd  D359(%rip),%xmm7
  movsd  0x50(%rsp),%xmm4
  cvtsi2sd %ebp,%xmm1
  subsd  D176(%rip),%xmm1
  mulsd  D118(%rip),%xmm4
  movsd  %xmm0,0x8(%rsp)
  addsd  %xmm1,%xmm7
  movsd  %xmm1,0x58(%rsp)
  movsd  %xmm4,0x50(%rsp)
  movapd %xmm7,%xmm0
  divsd  %xmm4,%xmm0
  call   <erf@plt>
  movsd  0x58(%rsp),%xmm1
  subsd  D359(%rip),%xmm1
  movsd  0x50(%rsp),%xmm4
  movsd  %xmm0,0x10(%rsp)
  divsd  %xmm4,%xmm1
  movapd %xmm1,%xmm0
  call   <erf@plt>
  movsd  D359(%rip),%xmm2
  mulsd  0x18(%rsp),%xmm2
  mov    %r14d,%eax
  mulsd  D77(%rip),%xmm2
  movapd %xmm0,%xmm1
  movsd  0x60(%rsp),%xmm5
  shr    $0x1f,%eax
  subsd  0x8(%rsp),%xmm5
  movsd  D85(%rip),%xmm0
  add    %r14d,%eax
  movsd  0x10(%rsp),%xmm3
  sar    %eax
  lea    -0xf(%rax,%rbx,2),%edx
  subsd  %xmm1,%xmm3
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  mulsd  %xmm5,%xmm2
  mulsd  %xmm3,%xmm2
  test   %edx,%edx
  js     L72
  cmp    %edx,%r14d
  jle    L72
  lea    -0xf(%rax,%rbp,2),%eax
  test   %eax,%eax
  js     L72
  cmp    %eax,%r14d
  jle    L72
  imul   %r14d,%eax
  add    %edx,%eax
L222:
  mov    0x40(%rsp),%rsi
  cltq
  movsd  0x28(%rsp),%xmm0
  subsd  0x20(%rsp),%xmm0
  movsd  0x30(%rsp),%xmm1
  mulsd  (%rsi,%rax,8),%xmm0
  mov    0x38(%rsp),%rsi
  subsd  (%rsp),%xmm1
  addsd  (%rsi,%rax,8),%xmm0
  mov    0x48(%rsp),%rsi
  mulsd  (%rsi,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm2
  jmp    L72
  nopl   (%rax)
L7:
  comisd D25(%rip),%xmm1
  jae    L75
  movsd  D130(%rip),%xmm0
  comisd %xmm0,%xmm1
  jae    L49
  comisd D194(%rip),%xmm1
  jb     L193
  movsd  D226(%rip),%xmm6
  movapd %xmm6,%xmm2
  mulsd  %xmm1,%xmm2
L193:
  comisd %xmm0,%xmm1
  jb     L163
  xor    %eax,%eax
  mov    %eax,0x90(%rsp)
  nopl   (%rax)
L148:
  movslq 0x90(%rsp),%rcx
  lea    0xe0(%rsp),%rsi
  movapd %xmm3,%xmm1
  movapd %xmm5,%xmm4
  unpcklpd %xmm1,%xmm1
  unpcklpd %xmm4,%xmm4
  mov    %rsi,0x88(%rsp)
  mov    %rcx,%rdx
  shl    $0x5,%rdx
  add    %rsi,%rdx
  mov    %eax,%esi
  movapd (%rdx),%xmm0
  shr    %esi
  addpd  %xmm1,%xmm0
  movaps %xmm0,0xa0(%rsp)
  mulpd  %xmm0,%xmm0
  divpd  %xmm4,%xmm0
  movaps %xmm0,0xc0(%rsp)
  cmp    $0x2,%esi
  jne    L0
  addpd  0x10(%rdx),%xmm1
  mov    $0x4,%eax
  movaps %xmm1,0xb0(%rsp)
  mulpd  %xmm1,%xmm1
  divpd  %xmm4,%xmm1
  movaps %xmm1,0xd0(%rsp)
L230:
  sub    $0x1,%eax
  movsd  D226(%rip),%xmm6
  mov    %rcx,%r12
  mov    %r14d,0x94(%rsp)
  lea    0x1(%rax,%rcx,4),%rax
  shl    $0x5,%r12
  lea    0x160(%rsp),%r13
  mov    %ebx,0x98(%rsp)
  shl    $0x3,%rax
  lea    0x0(%r13,%r12,1),%r15
  mov    %r13,%rbx
  mov    %ebp,0x9c(%rsp)
  mov    %rax,0x80(%rsp)
  lea    0xa0(%rsp),%rsi
  lea    0xc0(%rsp),%rax
  mov    %r12,%rbp
  movsd  %xmm6,0x68(%rsp)
  mov    %rax,%r12
  mov    %rsi,%r13
L35:
  mov    0x88(%rsp),%rax
  movsd  0x78(%rsp),%xmm0
  xor    %r14d,%r14d
  addsd  (%rax,%rbp,1),%xmm0
  mov    %rbx,%rax
  mov    %r14,%rbx
  mov    %rax,%r14
  movsd  %xmm0,0x58(%rsp)
  mulsd  %xmm0,%xmm0
  divsd  0x70(%rsp),%xmm0
  movsd  %xmm0,0x60(%rsp)
L178:
  movsd  (%r14,%rbp,1),%xmm0
  movsd  0x58(%rsp),%xmm1
  movsd  %xmm2,0x10(%rsp)
  mulsd  (%r15,%rbx,8),%xmm0
  movsd  0x60(%rsp),%xmm4
  mulsd  0x0(%r13,%rbx,8),%xmm1
  addsd  (%r12,%rbx,8),%xmm4
  add    $0x1,%rbx
  mulsd  (%rsp),%xmm1
  mov    D322(%rip),%rax
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm4,%xmm0
  addsd  %xmm1,%xmm0
  mulsd  D363(%rip),%xmm0
  movq   %rax,%xmm1
  addsd  D190(%rip),%xmm0
  call   <pow@plt>
  movsd  0x50(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm2
  mulsd  %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  divsd  %xmm1,%xmm3
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm2
  cmp    %ebx,0x90(%rsp)
  jg     L178
  mov    %r14,%rbx
  add    $0x8,%rbp
  cmp    %rbp,0x80(%rsp)
  jne    L35
  mov    0x94(%rsp),%r14d
  mov    0x98(%rsp),%ebx
  mov    0x9c(%rsp),%ebp
  jmp    L163
  xchg   %ax,%ax
L75:
  comisd D130(%rip),%xmm1
  jb     L163
  movl   $0x3,0x90(%rsp)
  mov    $0x3,%eax
  jmp    L148
  nopl   0x0(%rax,%rax,1)
L244:
  movl   $0x4,0x90(%rsp)
  mov    $0x4,%eax
  jmp    L148
  nopl   (%rax)
L0:
  cmp    $0x2,%eax
  je     L230
  mov    $0x2,%eax
  lea    (%rax,%rcx,4),%rdx
  addsd  0xe0(%rsp,%rdx,8),%xmm3
  movsd  %xmm3,0xa0(%rsp,%rax,8)
  mulsd  %xmm3,%xmm3
  divsd  %xmm5,%xmm3
  movsd  %xmm3,0xc0(%rsp,%rax,8)
  mov    $0x3,%eax
  jmp    L230
  nop
L49:
  movl   $0x2,0x90(%rsp)
  mov    $0x2,%eax
  jmp    L148
L215:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D367
data_type: byte[8]
name: parse_data
arguments: data_tag: D176
data_type: f64
name: parse_data
arguments: data_tag: D359
data_type: f64
name: parse_data
arguments: data_tag: D283
data_type: f64
name: parse_data
arguments: data_tag: D279
data_type: byte[16]
name: parse_data
arguments: data_tag: D278
data_type: f64[2]
name: parse_data
arguments: data_tag: D45
data_type: f64[2]
name: parse_data
arguments: data_tag: D261
data_type: f64
name: parse_data
arguments: data_tag: D79
data_type: f64[2]
name: parse_data
arguments: data_tag: D233
data_type: f64[2]
name: parse_data
arguments: data_tag: D363
data_type: f64
name: parse_data
arguments: data_tag: D190
data_type: f64
name: parse_data
arguments: data_tag: D161
data_type: f64[2]
name: parse_data
arguments: data_tag: D322
data_type: f64
name: parse_data
arguments: data_tag: D149
data_type: f64[2]
name: parse_data
arguments: data_tag: D130
data_type: f64[2]
name: parse_data
arguments: data_tag: D118
data_type: f64
name: parse_data
arguments: data_tag: D77
data_type: f64
name: parse_data
arguments: data_tag: D85
data_type: f64
name: parse_data
arguments: data_tag: D25
data_type: f64[2]
name: parse_data
arguments: data_tag: D194
data_type: byte[16]
name: parse_data
arguments: data_tag: D226
data_type: f32[2]

tool: {"D367": [0x7e,0x4e,0x49,0xef,0x7e,0xc9,0xd8,0xbf]}

tool: D176: 7.5

tool: D359: 0.5

tool: D283: 0.38729833

tool: {"D279": [0x80,0x87,0x79,0xc1,0x6d,0x8e,0xdb,0xbf,0x27,0xd8,0x03,0xd6,0x3f,0xc2,0xc5,0xbf]}

tool: {"D278": [0.16999052,0.43056816]}

tool: {"D45": [0.27777778,0.44444444]}

tool: D261: 0.27777778

tool: {"D79": [0.17392742,0.32607258]}

tool: {"D233": [0.32607258,0.17392742]}

tool: D363: 0.3195079

tool: D190: 1

tool: {"D161": [10000.0,2.5]}

tool: D322: 2.5

tool: {"D149": [0.046,0.0001]}

tool: {"D130": [0.0001,0.0022]}

tool: D118: 1.41421356

tool: D77: 3.14159265

tool: D85: 0.8493218

tool: {"D25": [0.0022,1e-10]}

tool: {"D194": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x3f]}

tool: {"D226": [0.0,1.9375]}

assistant: ```c
double integrated_profile(int profile_type, int idx, int idy, double xpos, double ypos, double *psf_parameters, double *lut_0, double *lut_xd, double *lut_yd) {
  int psf_size;
  double psf_height, psf_sigma_x, psf_sigma_y, psf_xpos, psf_ypos;
  double p0;
  int ip, jp;
  double pi = 3.14159265, fwtosig = 0.8493218;
  psf_size = (int)psf_parameters[0];
  psf_height = psf_parameters[1];
  psf_sigma_x = psf_parameters[2];
  psf_sigma_y = psf_parameters[3];
  psf_ypos = psf_parameters[4];
  psf_xpos = psf_parameters[5];
  if (profile_type == 0) {
    p0 = 0.5 * psf_height * pi * fwtosig * fwtosig * (erf((idx - 7.5 + 0.5) / (1.41421356 * psf_sigma_x)) - erf((idx - 7.5 - 0.5) / (1.41421356 * psf_sigma_x))) * (erf((idy - 7.5 + 0.5) / (1.41421356 * psf_sigma_y)) - erf((idy - 7.5 - 0.5) / (1.41421356 * psf_sigma_y)));
    ip = psf_size / 2 + 2 * idx - 15;
    jp = psf_size / 2 + 2 * idy - 15;
    if ((ip >= 0) && (ip <= psf_size - 1) && (jp >= 0) && (jp <= psf_size - 1)) {
      p0 += lut_0[ip + psf_size * jp] + lut_xd[ip + psf_size * jp] * (xpos - psf_xpos) + lut_yd[ip + psf_size * jp] * (ypos - psf_ypos);
    }
    return p0;
  } else if (profile_type == 1) {
    double d[4][4] = {{0.0, 0.0, 0.0, 0.0}, {-0.28867513, 0.28867513, 0.0, 0.0}, {-0.38729833, 0.0, 0.38729833, 0.0}, {-0.43056816, -0.16999052, 0.16999052, 0.43056816}};
    double w[4][4] = {{1.0, 0.0, 0.0, 0.0}, {0.5, 0.5, 0.0, 0.0}, {0.27777778, 0.44444444, 0.27777778, 0.0}, {0.17392742, 0.32607258, 0.32607258, 0.17392742}};
    double alpha = 0.3195079;
    double p1sq, p2sq, p1p2, dx, dy, xy, denom, func, x[4], xsq[4], p1xsq[4];
    double y, ysq, p2ysq, wt, p4fod, wp4fod, wf;
    int npt, ix, iy;
    p1sq = psf_parameters[2] * psf_parameters[2];
    p2sq = psf_parameters[3] * psf_parameters[3];
    p1p2 = psf_parameters[2] * psf_parameters[3];
    dx = idx - 7.5 + 0.5;
    dy = idy - 7.5 + 0.5;
    xy = dx * dy;
    denom = 1.0 + alpha * (dx * dx / p1sq + dy * dy / p2sq + xy * psf_parameters[4]);
    if (denom > 1.0e4) {
      return 0.0;
    }
    p0 = 0.0;
    func = 1.0 / (p1p2 * pow(denom, 2.5));
    if (func >= 0.046) {
      npt = 4;
    } else if (func >= 0.0022) {
      npt = 3;
    } else if (func >= 0.0001) {
      npt = 2;
    } else if (func >= 1.0e-10) {
      p0 = (2.5 - 1.0) * func;
    }
    if (func >= 0.0001) {
      for (ix = 0; ix < npt; ix++) {
        x[ix] = dx + d[npt][ix];
        xsq[ix] = x[ix] * x[ix];
        p1xsq[ix] = xsq[ix] / p1sq;
      }
      for (iy = 0; iy < npt; iy++) {
        y = dy + d[npt][iy];
        ysq = y * y;
        p2ysq = ysq / p2sq;
        for (ix = 0; ix < npt; ix++) {
          wt = w[npt][iy] * w[npt][ix];
          xy = x[ix] * y;
          denom = 1.0 + alpha * (p1xsq[ix] + p2ysq + xy * psf_parameters[4]);
          func = (2.5 - 1.0) / (p1p2 * pow(denom, 2.5));
          p4fod = 2.5 * alpha * func / denom;
          wp4fod = wt * p4fod;
          wf = wt * func;
          p0 += wf;
        }
      }
    }
    p0 *= psf_parameters[1];
    ip = psf_size / 2 + 2 * idx - 15;
    jp = psf_size / 2 + 2 * idy - 15;
    if ((ip >= 0) && (ip <= psf_size - 1) && (jp >= 0) && (jp <= psf_size - 1)) {
      p0 += lut_0[ip + psf_size * jp] + lut_xd[ip + psf_size * jp] * (xpos - psf_xpos) + lut_yd[ip + psf_size * jp] * (ypos - psf_ypos);
    }
    return p0;
  } else {
    return 0.0;
  }
}
```