user: Translate the below assembly code into C programming language:

```asm
<integrated_profile>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x2a8,%rsp
  mov    %edi,-0x264(%rbp)
  mov    %esi,-0x268(%rbp)
  mov    %edx,-0x26c(%rbp)
  movsd  %xmm0,-0x278(%rbp)
  movsd  %xmm1,-0x280(%rbp)
  mov    %rcx,-0x288(%rbp)
  mov    %r8,-0x290(%rbp)
  mov    %r9,-0x298(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x2a0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movsd  D363(%rip),%xmm0
  movsd  %xmm0,-0x238(%rbp)
  movsd  D260(%rip),%xmm0
  movsd  %xmm0,-0x230(%rbp)
  mov    -0x288(%rbp),%rax
  movsd  (%rax),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x24c(%rbp)
  mov    -0x288(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x228(%rbp)
  mov    -0x288(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,-0x220(%rbp)
  mov    -0x288(%rbp),%rax
  movsd  0x18(%rax),%xmm0
  movsd  %xmm0,-0x218(%rbp)
  mov    -0x288(%rbp),%rax
  movsd  0x20(%rax),%xmm0
  movsd  %xmm0,-0x210(%rbp)
  mov    -0x288(%rbp),%rax
  movsd  0x28(%rax),%xmm0
  movsd  %xmm0,-0x208(%rbp)
  cmpl   $0x0,-0x264(%rbp)
  jne    L163
  movsd  -0x228(%rbp),%xmm1
  movsd  D402(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  -0x238(%rbp),%xmm0
  mulsd  -0x230(%rbp),%xmm0
  mulsd  -0x230(%rbp),%xmm0
  movsd  %xmm0,-0x2a8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x268(%rbp),%xmm0
  movsd  D25(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D402(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x220(%rbp),%xmm2
  movsd  D384(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  call   <erf@plt>
  movq   %xmm0,%rbx
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x268(%rbp),%xmm0
  movsd  D25(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  D402(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0x220(%rbp),%xmm2
  movsd  D384(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm0,%xmm4
  divsd  %xmm1,%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <erf@plt>
  movq   %rbx,%xmm1
  subsd  %xmm0,%xmm1
  mulsd  -0x2a8(%rbp),%xmm1
  movsd  %xmm1,-0x2a8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x26c(%rbp),%xmm0
  movsd  D25(%rip),%xmm2
  movapd %xmm0,%xmm5
  subsd  %xmm2,%xmm5
  movapd %xmm5,%xmm1
  movsd  D402(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x218(%rbp),%xmm2
  movsd  D384(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm0,%xmm6
  divsd  %xmm1,%xmm6
  movq   %xmm6,%rax
  movq   %rax,%xmm0
  call   <erf@plt>
  movq   %xmm0,%rbx
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x26c(%rbp),%xmm0
  movsd  D25(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  D402(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0x218(%rbp),%xmm2
  movsd  D384(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm0,%xmm7
  divsd  %xmm1,%xmm7
  movq   %xmm7,%rax
  movq   %rax,%xmm0
  call   <erf@plt>
  movq   %rbx,%xmm3
  subsd  %xmm0,%xmm3
  movapd %xmm3,%xmm1
  movsd  -0x2a8(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x240(%rbp)
  mov    -0x24c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x268(%rbp),%eax
  add    %eax,%eax
  add    %edx,%eax
  sub    $0xf,%eax
  mov    %eax,-0x248(%rbp)
  mov    -0x24c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x26c(%rbp),%eax
  add    %eax,%eax
  add    %edx,%eax
  sub    $0xf,%eax
  mov    %eax,-0x244(%rbp)
  cmpl   $0x0,-0x248(%rbp)
  js     L138
  mov    -0x24c(%rbp),%eax
  cmp    -0x248(%rbp),%eax
  jle    L138
  cmpl   $0x0,-0x244(%rbp)
  js     L138
  mov    -0x24c(%rbp),%eax
  cmp    -0x244(%rbp),%eax
  jle    L138
  mov    -0x24c(%rbp),%eax
  imul   -0x244(%rbp),%eax
  mov    %eax,%edx
  mov    -0x248(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x290(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x24c(%rbp),%eax
  imul   -0x244(%rbp),%eax
  mov    %eax,%edx
  mov    -0x248(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x298(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  -0x278(%rbp),%xmm0
  subsd  -0x208(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x24c(%rbp),%eax
  imul   -0x244(%rbp),%eax
  mov    %eax,%edx
  mov    -0x248(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x2a0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  -0x280(%rbp),%xmm0
  subsd  -0x210(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x240(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x240(%rbp)
L138:
  movsd  -0x240(%rbp),%xmm0
  jmp    L155
L163:
  cmpl   $0x1,-0x264(%rbp)
  jne    L206
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x120(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x118(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x110(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  D357(%rip),%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  D127(%rip),%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movsd  D309(%rip),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  D504(%rip),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movsd  D470(%rip),%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  movsd  D449(%rip),%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  D459(%rip),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  D8(%rip),%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  D195(%rip),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  D402(%rip),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  D402(%rip),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  D353(%rip),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  D414(%rip),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  D353(%rip),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  D303(%rip),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  D371(%rip),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  D371(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D303(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D193(%rip),%xmm0
  movsd  %xmm0,-0x200(%rbp)
  mov    -0x288(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  mov    -0x288(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1f8(%rbp)
  mov    -0x288(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mov    -0x288(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1f0(%rbp)
  mov    -0x288(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  mov    -0x288(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1e8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x268(%rbp),%xmm0
  movsd  D25(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D402(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1e0(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x26c(%rbp),%xmm0
  movsd  D25(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D402(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1d8(%rbp)
  movsd  -0x1e0(%rbp),%xmm0
  mulsd  -0x1d8(%rbp),%xmm0
  movsd  %xmm0,-0x1d0(%rbp)
  movsd  -0x1e0(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x1f8(%rbp),%xmm1
  movsd  -0x1d8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  divsd  -0x1f0(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x288(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x1d0(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x200(%rbp),%xmm1
  movsd  D195(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1c8(%rbp)
  movsd  -0x1c8(%rbp),%xmm0
  comisd D427(%rip),%xmm0
  jbe    L110
  pxor   %xmm0,%xmm0
  jmp    L155
L110:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x240(%rbp)
  movsd  D171(%rip),%xmm0
  mov    -0x1c8(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x1e8(%rbp),%xmm1
  movsd  D195(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1c0(%rbp)
  movsd  -0x1c0(%rbp),%xmm0
  comisd D90(%rip),%xmm0
  jb     L103
  movl   $0x4,-0x258(%rbp)
  jmp    L223
L103:
  movsd  -0x1c0(%rbp),%xmm0
  comisd D133(%rip),%xmm0
  jb     L289
  movl   $0x3,-0x258(%rbp)
  jmp    L223
L289:
  movsd  -0x1c0(%rbp),%xmm0
  comisd D103(%rip),%xmm0
  jb     L259
  movl   $0x2,-0x258(%rbp)
  jmp    L223
L259:
  movsd  -0x1c0(%rbp),%xmm0
  comisd D74(%rip),%xmm0
  jb     L223
  movsd  -0x1c0(%rbp),%xmm1
  movsd  D501(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x240(%rbp)
L223:
  movsd  -0x1c0(%rbp),%xmm0
  comisd D103(%rip),%xmm0
  jb     L22
  movl   $0x0,-0x254(%rbp)
  jmp    L106
L215:
  mov    -0x254(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x258(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movsd  -0x120(%rbp,%rax,8),%xmm0
  addsd  -0x1e0(%rbp),%xmm0
  mov    -0x254(%rbp),%eax
  cltq
  movsd  %xmm0,-0x180(%rbp,%rax,8)
  mov    -0x254(%rbp),%eax
  cltq
  movsd  -0x180(%rbp,%rax,8),%xmm1
  mov    -0x254(%rbp),%eax
  cltq
  movsd  -0x180(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x254(%rbp),%eax
  cltq
  movsd  %xmm0,-0x160(%rbp,%rax,8)
  mov    -0x254(%rbp),%eax
  cltq
  movsd  -0x160(%rbp,%rax,8),%xmm0
  divsd  -0x1f8(%rbp),%xmm0
  mov    -0x254(%rbp),%eax
  cltq
  movsd  %xmm0,-0x140(%rbp,%rax,8)
  addl   $0x1,-0x254(%rbp)
L106:
  mov    -0x254(%rbp),%eax
  cmp    -0x258(%rbp),%eax
  jl     L215
  movl   $0x0,-0x250(%rbp)
  jmp    L31
L97:
  mov    -0x250(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x258(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movsd  -0x120(%rbp,%rax,8),%xmm0
  movsd  -0x1d8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1b8(%rbp)
  movsd  -0x1b8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x1b0(%rbp)
  movsd  -0x1b0(%rbp),%xmm0
  divsd  -0x1f0(%rbp),%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
  movl   $0x0,-0x254(%rbp)
  jmp    L74
L121:
  mov    -0x250(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x258(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movsd  -0xa0(%rbp,%rax,8),%xmm1
  mov    -0x254(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x258(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movsd  -0xa0(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1a0(%rbp)
  mov    -0x254(%rbp),%eax
  cltq
  movsd  -0x180(%rbp,%rax,8),%xmm0
  movsd  -0x1b8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1d0(%rbp)
  mov    -0x254(%rbp),%eax
  cltq
  movsd  -0x140(%rbp,%rax,8),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x1a8(%rbp),%xmm1
  mov    -0x288(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x1d0(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x200(%rbp),%xmm1
  movsd  D195(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1c8(%rbp)
  movsd  D171(%rip),%xmm0
  mov    -0x1c8(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x1e8(%rbp),%xmm1
  movsd  D501(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1c0(%rbp)
  movsd  -0x200(%rbp),%xmm1
  movsd  D171(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  -0x1c0(%rbp),%xmm0
  divsd  -0x1c8(%rbp),%xmm0
  movsd  %xmm0,-0x198(%rbp)
  movsd  -0x1a0(%rbp),%xmm0
  mulsd  -0x198(%rbp),%xmm0
  movsd  %xmm0,-0x190(%rbp)
  movsd  -0x1a0(%rbp),%xmm0
  mulsd  -0x1c0(%rbp),%xmm0
  movsd  %xmm0,-0x188(%rbp)
  movsd  -0x240(%rbp),%xmm0
  addsd  -0x188(%rbp),%xmm0
  movsd  %xmm0,-0x240(%rbp)
  addl   $0x1,-0x254(%rbp)
L74:
  mov    -0x254(%rbp),%eax
  cmp    -0x258(%rbp),%eax
  jl     L121
  addl   $0x1,-0x250(%rbp)
L31:
  mov    -0x250(%rbp),%eax
  cmp    -0x258(%rbp),%eax
  jl     L97
L22:
  mov    -0x288(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  movsd  -0x240(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x240(%rbp)
  mov    -0x24c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x268(%rbp),%eax
  add    %eax,%eax
  add    %edx,%eax
  sub    $0xf,%eax
  mov    %eax,-0x248(%rbp)
  mov    -0x24c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x26c(%rbp),%eax
  add    %eax,%eax
  add    %edx,%eax
  sub    $0xf,%eax
  mov    %eax,-0x244(%rbp)
  cmpl   $0x0,-0x248(%rbp)
  js     L171
  mov    -0x24c(%rbp),%eax
  cmp    -0x248(%rbp),%eax
  jle    L171
  cmpl   $0x0,-0x244(%rbp)
  js     L171
  mov    -0x24c(%rbp),%eax
  cmp    -0x244(%rbp),%eax
  jle    L171
  mov    -0x24c(%rbp),%eax
  imul   -0x244(%rbp),%eax
  mov    %eax,%edx
  mov    -0x248(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x290(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x24c(%rbp),%eax
  imul   -0x244(%rbp),%eax
  mov    %eax,%edx
  mov    -0x248(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x298(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  -0x278(%rbp),%xmm0
  subsd  -0x208(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x24c(%rbp),%eax
  imul   -0x244(%rbp),%eax
  mov    %eax,%edx
  mov    -0x248(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x2a0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  -0x280(%rbp),%xmm0
  subsd  -0x210(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x240(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x240(%rbp)
L171:
  movsd  -0x240(%rbp),%xmm0
  jmp    L155
L206:
  pxor   %xmm0,%xmm0
L155:
  movq   %xmm0,%rax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L282
  call   <__stack_chk_fail@plt>
L282:
  movq   %rax,%xmm0
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D363
type: f64
name: unpack_data
arguments: tag: D260
type: f64
name: unpack_data
arguments: tag: D402
type: f64
name: unpack_data
arguments: tag: D25
type: f64
name: unpack_data
arguments: tag: D384
type: f64
name: unpack_data
arguments: tag: D357
type: byte[8]
name: unpack_data
arguments: tag: D127
type: f64
name: unpack_data
arguments: tag: D309
type: byte[8]
name: unpack_data
arguments: tag: D504
type: f64
name: unpack_data
arguments: tag: D470
type: byte[8]
name: unpack_data
arguments: tag: D449
type: byte[8]
name: unpack_data
arguments: tag: D459
type: f64
name: unpack_data
arguments: tag: D8
type: f64
name: unpack_data
arguments: tag: D195
type: f64
name: unpack_data
arguments: tag: D353
type: f64
name: unpack_data
arguments: tag: D414
type: f64
name: unpack_data
arguments: tag: D303
type: f64
name: unpack_data
arguments: tag: D371
type: f64
name: unpack_data
arguments: tag: D193
type: f64
name: unpack_data
arguments: tag: D427
type: f64[2]
name: unpack_data
arguments: tag: D171
type: f64
name: unpack_data
arguments: tag: D90
type: f64[2]
name: unpack_data
arguments: tag: D133
type: f64[2]
name: unpack_data
arguments: tag: D103
type: f64[2]
name: unpack_data
arguments: tag: D74
type: byte[16]
name: unpack_data
arguments: tag: D501
type: f32[2]

tool: D363: 3.14159265

tool: D260: 0.8493218

tool: D402: 0.5

tool: D25: 7.5

tool: D384: 1.41421356

tool: {"D357": [0xe6,0x2f,0xa1,0x40,0xa7,0x79,0xd2,0xbf]}

tool: D127: 0.28867513

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

tool: D504: 0.38729833

tool: {"D470": [0x80,0x87,0x79,0xc1,0x6d,0x8e,0xdb,0xbf]}

tool: {"D449": [0x27,0xd8,0x03,0xd6,0x3f,0xc2,0xc5,0xbf]}

tool: D459: 0.16999052

tool: D8: 0.43056816

tool: D195: 1

tool: D353: 0.27777778

tool: D414: 0.44444444

tool: D303: 0.17392742

tool: D371: 0.32607258

tool: D193: 0.3195079

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

tool: D171: 2.5

tool: {"D90": [0.046,0.0022]}

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

tool: {"D103": [0.0001,1e-10]}

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

tool: {"D501": [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;
  }
}
```