user: Please show me the C implementation that matches the assembly code listed below:

```asm
<target_phi>:
  endbr64
  push   %rbx
  pxor   %xmm0,%xmm0
  mov    %rsi,%rbx
  add    $0xffffffffffffff80,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x50(%rsp)
  test   %edx,%edx
  jle    L28
  movss  D434(%rip),%xmm5
  cmp    $0x1,%edx
  je     L47
  movss  %xmm5,0x54(%rsp)
  cmp    $0x2,%edx
  je     L47
  movl   $0x3d637931,0x58(%rsp)
  cmp    $0x3,%edx
  je     L47
  movl   $0x3d637acf,0x5c(%rsp)
L47:
  movss  0x54(%rsp),%xmm10
  movss  0x58(%rsp),%xmm9
  pxor   %xmm0,%xmm0
  movss  0x5c(%rsp),%xmm7
L40:
  movss  D189(%rip),%xmm1
  movss  (%rdi),%xmm3
  movss  0x8(%rdi),%xmm4
  movss  0x4(%rdi),%xmm2
  subss  %xmm1,%xmm3
  subss  D366(%rip),%xmm4
  movss  D431(%rip),%xmm6
  movss  D367(%rip),%xmm14
  subss  %xmm1,%xmm2
  movss  0xc(%rdi),%xmm1
  subss  D217(%rip),%xmm1
  movss  D334(%rip),%xmm15
  movss  D409(%rip),%xmm8
  mulss  %xmm5,%xmm3
  mulss  %xmm9,%xmm4
  mulss  %xmm10,%xmm2
  mulss  %xmm7,%xmm1
  mulss  (%rbx),%xmm5
  addss  %xmm6,%xmm3
  mulss  0x4(%rbx),%xmm10
  addss  %xmm6,%xmm4
  mulss  0x8(%rbx),%xmm9
  addss  %xmm6,%xmm2
  mulss  0xc(%rbx),%xmm7
  mulss  %xmm3,%xmm14
  addss  %xmm6,%xmm1
  movaps %xmm3,%xmm12
  mulss  %xmm3,%xmm15
  movaps %xmm4,%xmm6
  mulss  %xmm4,%xmm6
  movaps %xmm2,%xmm13
  mulss  %xmm2,%xmm8
  movaps %xmm1,%xmm11
  mulss  %xmm1,%xmm11
  movss  %xmm14,0x8(%rsp)
  mulss  %xmm3,%xmm12
  movss  D328(%rip),%xmm14
  movss  %xmm15,0xc(%rsp)
  mulss  %xmm2,%xmm13
  movss  D291(%rip),%xmm15
  mulss  %xmm3,%xmm14
  mulss  %xmm6,%xmm15
  mulss  D99(%rip),%xmm6
  movss  %xmm14,0x10(%rsp)
  movss  D303(%rip),%xmm14
  movss  %xmm15,0x14(%rsp)
  movss  D171(%rip),%xmm15
  mulss  %xmm2,%xmm14
  mulss  %xmm3,%xmm15
  subss  D144(%rip),%xmm15
  addss  %xmm15,%xmm14
  movss  D358(%rip),%xmm15
  mulss  %xmm4,%xmm15
  addss  %xmm14,%xmm15
  movss  D98(%rip),%xmm14
  mulss  %xmm1,%xmm14
  addss  %xmm15,%xmm14
  movaps %xmm8,%xmm15
  mulss  %xmm1,%xmm15
  addss  %xmm14,%xmm15
  movss  D1(%rip),%xmm14
  mulss  %xmm11,%xmm14
  addss  %xmm15,%xmm14
  movss  D310(%rip),%xmm15
  mulss  %xmm12,%xmm15
  addss  %xmm14,%xmm15
  movss  0x8(%rsp),%xmm14
  mulss  %xmm4,%xmm14
  addss  %xmm15,%xmm14
  movss  0xc(%rsp),%xmm15
  mulss  %xmm2,%xmm15
  addss  %xmm14,%xmm15
  movss  D353(%rip),%xmm14
  mulss  %xmm13,%xmm14
  addss  %xmm15,%xmm14
  addss  %xmm14,%xmm6
  movss  0x10(%rsp),%xmm14
  mulss  D357(%rip),%xmm12
  mulss  %xmm1,%xmm14
  addss  %xmm14,%xmm6
  movss  0x14(%rsp),%xmm14
  mulss  %xmm1,%xmm14
  addss  %xmm6,%xmm14
  movss  D207(%rip),%xmm6
  mulss  %xmm2,%xmm6
  mulss  %xmm11,%xmm6
  addss  %xmm14,%xmm6
  movaps %xmm1,%xmm14
  mulss  %xmm11,%xmm14
  mulss  D39(%rip),%xmm14
  addss  %xmm14,%xmm6
  movss  D225(%rip),%xmm14
  mulss  %xmm4,%xmm14
  movaps %xmm14,%xmm15
  mulss  %xmm1,%xmm15
  addss  %xmm6,%xmm15
  movaps %xmm12,%xmm6
  mulss  %xmm2,%xmm6
  addss  %xmm15,%xmm6
  movaps %xmm2,%xmm15
  mulss  %xmm13,%xmm15
  mulss  D86(%rip),%xmm15
  addss  %xmm6,%xmm15
  movss  D302(%rip),%xmm6
  mulss  %xmm3,%xmm6
  mulss  %xmm11,%xmm6
  addss  %xmm15,%xmm6
  movaps %xmm5,%xmm15
  addss  %xmm0,%xmm15
  addss  %xmm10,%xmm15
  addss  %xmm9,%xmm15
  addss  %xmm7,%xmm15
  ucomiss %xmm0,%xmm15
  jp     L39
  jne    L39
L68:
  movss  %xmm0,(%rbx)
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L49
  sub    $0xffffffffffffff80,%rsp
  movaps %xmm6,%xmm0
  pop    %rbx
  ret
  nopl   (%rax)
L39:
  movss  %xmm7,0x44(%rsp)
  mulss  %xmm5,%xmm5
  mov    $0x2,%edi
  movss  D296(%rip),%xmm7
  movss  D367(%rip),%xmm0
  movss  %xmm6,0x4c(%rsp)
  mulss  %xmm3,%xmm7
  movss  %xmm14,0x38(%rsp)
  mulss  %xmm4,%xmm0
  movss  %xmm8,0x34(%rsp)
  movss  %xmm9,0x40(%rsp)
  movss  %xmm5,0x18(%rsp)
  movss  %xmm4,0x30(%rsp)
  movaps %xmm7,%xmm5
  movss  D334(%rip),%xmm7
  subss  D403(%rip),%xmm5
  movss  %xmm13,0x48(%rsp)
  movss  %xmm10,0x1c(%rsp)
  mulss  %xmm2,%xmm7
  movss  %xmm12,0x3c(%rsp)
  addss  %xmm5,%xmm0
  movss  %xmm1,0x28(%rsp)
  movss  %xmm3,0x2c(%rsp)
  movss  %xmm2,0x24(%rsp)
  movss  %xmm11,0x20(%rsp)
  movaps %xmm7,%xmm5
  movaps %xmm3,%xmm7
  addss  %xmm0,%xmm5
  movss  D328(%rip),%xmm0
  mulss  D395(%rip),%xmm7
  mulss  %xmm1,%xmm0
  addss  %xmm5,%xmm0
  movaps %xmm7,%xmm5
  movss  D302(%rip),%xmm7
  mulss  %xmm2,%xmm5
  mulss  %xmm11,%xmm7
  addss  %xmm5,%xmm0
  addss  %xmm7,%xmm0
  call   <pow@plt>
  movss  0x28(%rsp),%xmm1
  mov    $0x2,%edi
  movss  D409(%rip),%xmm3
  movss  D303(%rip),%xmm5
  movss  0x24(%rsp),%xmm2
  mulss  %xmm1,%xmm3
  movss  0x20(%rsp),%xmm11
  movss  0x3c(%rsp),%xmm12
  mulss  0x18(%rsp),%xmm0
  movss  0x48(%rsp),%xmm13
  mulss  D36(%rip),%xmm13
  movss  0x1c(%rsp),%xmm10
  mulss  %xmm10,%xmm10
  addss  %xmm3,%xmm5
  movss  D256(%rip),%xmm3
  addss  0xc(%rsp),%xmm5
  movss  %xmm0,0x18(%rsp)
  mulss  %xmm2,%xmm3
  movss  %xmm10,0x1c(%rsp)
  movaps %xmm3,%xmm0
  addss  %xmm5,%xmm0
  movss  D207(%rip),%xmm5
  mulss  %xmm11,%xmm5
  addss  %xmm5,%xmm0
  addss  %xmm12,%xmm0
  addss  %xmm13,%xmm0
  call   <pow@plt>
  mulss  0x1c(%rsp),%xmm0
  mov    $0x2,%edi
  movss  0x18(%rsp),%xmm4
  movss  D79(%rip),%xmm5
  movss  0x28(%rsp),%xmm1
  movss  D225(%rip),%xmm7
  movss  0x40(%rsp),%xmm9
  movss  %xmm1,0x1c(%rsp)
  mulss  %xmm1,%xmm7
  addss  %xmm0,%xmm4
  movss  D358(%rip),%xmm0
  addss  0x8(%rsp),%xmm0
  mulss  %xmm9,%xmm9
  movss  %xmm4,0xc(%rsp)
  movss  0x30(%rsp),%xmm4
  mulss  %xmm4,%xmm5
  movss  %xmm9,0x18(%rsp)
  mulss  D155(%rip),%xmm4
  addss  %xmm5,%xmm0
  mulss  %xmm1,%xmm4
  addss  %xmm4,%xmm0
  addss  %xmm7,%xmm0
  call   <pow@plt>
  movss  0x1c(%rsp),%xmm1
  movss  D378(%rip),%xmm4
  mov    $0x2,%edi
  mulss  0x18(%rsp),%xmm0
  movss  0x34(%rsp),%xmm8
  mulss  %xmm1,%xmm4
  addss  0xc(%rsp),%xmm0
  subss  D458(%rip),%xmm8
  movss  0x24(%rsp),%xmm2
  movss  0x20(%rsp),%xmm11
  mulss  D20(%rip),%xmm11
  movss  0x2c(%rsp),%xmm3
  movss  %xmm0,0x8(%rsp)
  movaps %xmm8,%xmm0
  movss  0x38(%rsp),%xmm14
  movss  0x44(%rsp),%xmm7
  addss  %xmm4,%xmm0
  movss  D53(%rip),%xmm4
  addss  0x10(%rsp),%xmm0
  mulss  %xmm7,%xmm7
  addss  0x14(%rsp),%xmm0
  mulss  %xmm1,%xmm4
  mulss  D56(%rip),%xmm1
  movss  %xmm7,0xc(%rsp)
  mulss  %xmm4,%xmm2
  mulss  %xmm3,%xmm1
  addss  %xmm2,%xmm0
  addss  %xmm11,%xmm0
  addss  %xmm14,%xmm0
  addss  %xmm1,%xmm0
  call   <pow@plt>
  mulss  0xc(%rsp),%xmm0
  addss  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  movss  0x4c(%rsp),%xmm6
  jmp    L68
  nopl   0x0(%rax,%rax,1)
L28:
  pxor   %xmm0,%xmm0
  movaps %xmm0,%xmm7
  movaps %xmm0,%xmm9
  movaps %xmm0,%xmm10
  movaps %xmm0,%xmm5
  jmp    L40
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D434
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D189
type_infered: f32
name: unpack_data
arguments: data_tag: D366
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D431
type_infered: f32
name: unpack_data
arguments: data_tag: D367
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D217
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D334
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D409
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D328
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D291
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D99
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D303
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D171
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D144
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D358
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D98
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D1
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D310
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D353
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D357
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D207
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D39
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D225
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D86
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D302
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D296
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D403
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D395
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D36
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D256
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D79
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D155
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D378
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D458
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D20
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D53
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D56
type_infered: byte[4]

tool: {"D434": [0x89,0x88,0x88,0x3d]}

tool: D189: 15

tool: {"D366": [0x7b,0x14,0x90,0x41]}

tool: D431: 1

tool: {"D367": [0x44,0x12,0x2f,0x3a]}

tool: {"D217": [0x19,0x04,0x90,0x41]}

tool: {"D334": [0xb4,0x49,0x2a,0x39]}

tool: {"D409": [0xf4,0xaf,0xad,0x3a]}

tool: {"D328": [0xf6,0x82,0x2c,0xb9]}

tool: {"D291": [0x93,0xdf,0xbe,0xb8]}

tool: {"D99": [0x24,0x13,0x16,0xba]}

tool: {"D303": [0x0e,0x49,0x05,0x3d]}

tool: {"D171": [0x6b,0x38,0x4d,0xbd]}

tool: {"D144": [0x7f,0x55,0xc4,0x3c]}

tool: {"D358": [0xaa,0xe2,0x6a,0x3d]}

tool: {"D98": [0x67,0xd9,0x4d,0xbd]}

tool: {"D1": [0xc9,0xec,0x88,0xba]}

tool: {"D310": [0x03,0xf2,0x4c,0xb9]}

tool: {"D353": [0x30,0x05,0xdf,0xb9]}

tool: {"D357": [0x36,0xc3,0x23,0x38]}

tool: {"D207": [0x20,0xf2,0x34,0x3a]}

tool: {"D39": [0x1c,0xf3,0x2b,0xba]}

tool: {"D225": [0x8c,0xe6,0x78,0xb8]}

tool: {"D86": [0xfd,0xbe,0xf5,0xb8]}

tool: {"D302": [0x8a,0xfa,0x77,0xb7]}

tool: {"D296": [0x03,0xf2,0xcc,0xb9]}

tool: {"D403": [0x6b,0x38,0x4d,0x3d]}

tool: {"D395": [0x36,0xc3,0xa3,0x38]}

tool: {"D36": [0x3e,0x4f,0xb8,0xb9]}

tool: {"D256": [0x30,0x05,0x5f,0xba]}

tool: {"D79": [0x24,0x13,0x96,0xba]}

tool: {"D155": [0x93,0xdf,0x3e,0xb9]}

tool: {"D378": [0xc9,0xec,0x08,0xbb]}

tool: {"D458": [0x67,0xd9,0x4d,0x3d]}

tool: {"D20": [0x55,0xf6,0x00,0xbb]}

tool: {"D53": [0x20,0xf2,0xb4,0x3a]}

tool: {"D56": [0x8a,0xfa,0xf7,0xb7]}

assistant: ```c
float target_phi(float *x, float *dx, int m) {
  int ncoeff = 20;
  float avdat = -0.2402258E-01;
  float xmin[10] = {-0.15000E+02, -0.15000E+02, -0.18003E+02, -0.18010E+02, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00};
  float xmax[10] = {0.15000E+02, 0.15000E+02, 0.18010E+02, 0.18002E+02, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00};
  float scale[10] = {0};
  float coeff[21] = {0.56029367E-04, -0.50102632E-01, 0.32540374E-01, 0.57345070E-01, -0.50256159E-01, 0.13251291E-02, -0.10446544E-02, -0.19545112E-03, 0.66784420E-03, 0.16239920E-03, -0.42537740E-03, -0.57248981E-03, -0.16451985E-03, -0.91015499E-04, 0.69025345E-03, -0.65593584E-03, -0.59342521E-04, 0.39044033E-04, -0.11718085E-03, -0.14780680E-04, 0.};
  int ientry = 0;
  int i;
  if (ientry == 0) {
    ientry = 1;
    for (i = 0; i < m; i++) {
      if (xmin[i] == xmax[i])
        continue;
      scale[i] = 2. / (xmax[i] - xmin[i]);
    }
  }
  float x1 = 1. + (x[0] - xmax[0]) * scale[0];
  float dx1 = dx[0] * scale[0];
  float x2 = 1. + (x[1] - xmax[1]) * scale[1];
  float dx2 = dx[1] * scale[1];
  float x3 = 1. + (x[2] - xmax[2]) * scale[2];
  float dx3 = dx[2] * scale[2];
  float x4 = 1. + (x[3] - xmax[3]) * scale[3];
  float dx4 = dx[3] * scale[3];
  float x11 = x1;
  float x12 = x11 * x1;
  float x21 = x2;
  float x22 = x21 * x2;
  float x23 = x22 * x2;
  float x31 = x3;
  float x32 = x31 * x3;
  float x41 = x4;
  float x42 = x41 * x4;
  float x43 = x42 * x4;
  float v_target_phi = avdat + coeff[0] + coeff[1] * x11 + coeff[2] * x21 + coeff[3] * x31 + coeff[4] * x41 + coeff[5] * x21 * x41 + coeff[6] * x42 + coeff[7] * x12;
  v_target_phi = v_target_phi + coeff[8] * x11 * x31 + coeff[9] * x11 * x21 + coeff[10] * x22 + coeff[11] * x32 + coeff[12] * x11 * x41 + coeff[13] * x32 * x41 + coeff[14] * x21 * x42 + coeff[15] * x43 + coeff[16] * x31 * x41;
  v_target_phi = v_target_phi + coeff[17] * x12 * x21 + coeff[18] * x23 + coeff[19] * x11 * x42;
  float dxall = 0 + dx1 + dx2 + dx3 + dx4;
  float dv_target_phi = dxall == 0 ? 0 : sqrt(+dx1 * dx1 * pow(0 + coeff[1] + 2 * coeff[7] * x11 + coeff[8] * x31 + coeff[9] * x21 + coeff[12] * x41 + 2 * coeff[17] * x11 * x21 + coeff[19] * x42, 2) + dx2 * dx2 * pow(0 + coeff[2] + coeff[5] * x41 + coeff[9] * x11 + 2 * coeff[10] * x21 + coeff[14] * x42 + coeff[17] * x12 + 3 * coeff[18] * x22, 2) + dx3 * dx3 * pow(0 + coeff[3] + coeff[8] * x11 + 2 * coeff[11] * x31 + 2 * coeff[13] * x31 * x41 + coeff[16] * x41, 2) + dx4 * dx4 * pow(0 + coeff[4] + coeff[5] * x21 + 2 * coeff[6] * x41 + coeff[12] * x11 + coeff[13] * x32 + 2 * coeff[14] * x41 * x21 + 3 * coeff[15] * x42 + coeff[16] * x31 + 2 * coeff[19] * x41 * x11, 2));
  dx[0] = dv_target_phi;
  return v_target_phi;
}
```