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

```asm
<target_phi>:
  endbr64
  push   %r14
  push   %rbx
  sub    $0xf8,%rsp
  mov    %rdi,%rcx
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  movss  D251(%rip),%xmm0
  movss  %xmm0,0x60(%rsp)
  movss  %xmm0,0x64(%rsp)
  movl   $0xc1900a3d,0x68(%rsp)
  movl   $0xc1901062,0x6c(%rsp)
  movl   $0x0,0x70(%rsp)
  movl   $0x0,0x74(%rsp)
  movl   $0x0,0x78(%rsp)
  movl   $0x0,0x7c(%rsp)
  movl   $0x0,0x80(%rsp)
  movl   $0x0,0x84(%rsp)
  movss  D422(%rip),%xmm0
  movss  %xmm0,0x90(%rsp)
  movss  %xmm0,0x94(%rsp)
  movl   $0x41900625,0x98(%rsp)
  movl   $0x4190020c,0x9c(%rsp)
  movl   $0x0,0xa0(%rsp)
  movl   $0x0,0xa4(%rsp)
  movl   $0x0,0xa8(%rsp)
  movl   $0x0,0xac(%rsp)
  movl   $0x0,0xb0(%rsp)
  movl   $0x0,0xb4(%rsp)
  movq   $0x0,0xc0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xd8(%rsp)
  movq   $0x0,0xe0(%rsp)
  test   %edx,%edx
  jle    L16
  mov    %edx,%edx
  movss  D131(%rip),%xmm2
  jmp    L46
L51:
  subss  %xmm1,%xmm0
  movaps %xmm2,%xmm1
  divss  %xmm0,%xmm1
  movss  %xmm1,0xc0(%rsp,%rax,4)
L49:
  add    $0x1,%rax
  cmp    %rdx,%rax
  je     L16
L46:
  movss  0x60(%rsp,%rax,4),%xmm1
  movss  0x90(%rsp,%rax,4),%xmm0
  ucomiss %xmm0,%xmm1
  jp     L51
  jne    L51
  jmp    L49
L16:
  movss  0xc0(%rsp),%xmm1
  movss  (%rcx),%xmm0
  movss  D422(%rip),%xmm4
  subss  %xmm4,%xmm0
  movaps %xmm0,%xmm2
  mulss  %xmm1,%xmm2
  movss  D353(%rip),%xmm0
  movaps %xmm2,%xmm5
  addss  %xmm0,%xmm5
  movss  %xmm5,0x2c(%rsp)
  mulss  (%rbx),%xmm1
  movss  0xc4(%rsp),%xmm3
  movss  0x4(%rcx),%xmm2
  subss  %xmm4,%xmm2
  mulss  %xmm3,%xmm2
  movaps %xmm2,%xmm8
  addss  %xmm0,%xmm8
  movaps %xmm8,%xmm10
  movss  %xmm8,0x24(%rsp)
  mulss  0x4(%rbx),%xmm3
  movss  %xmm3,0x14(%rsp)
  movss  0xc8(%rsp),%xmm3
  movss  0x8(%rcx),%xmm2
  subss  D260(%rip),%xmm2
  mulss  %xmm3,%xmm2
  movaps %xmm2,%xmm15
  addss  %xmm0,%xmm15
  movss  %xmm15,0x28(%rsp)
  mulss  0x8(%rbx),%xmm3
  movss  %xmm3,0x18(%rsp)
  movss  0xcc(%rsp),%xmm3
  movss  0xc(%rcx),%xmm2
  subss  D470(%rip),%xmm2
  mulss  %xmm3,%xmm2
  movaps %xmm2,%xmm13
  addss  %xmm0,%xmm13
  movss  %xmm13,0x4(%rsp)
  movaps %xmm3,%xmm6
  mulss  0xc(%rbx),%xmm6
  movss  %xmm6,0x1c(%rsp)
  movaps %xmm5,%xmm2
  mulss  %xmm5,%xmm2
  movaps %xmm5,%xmm0
  mulss  %xmm2,%xmm0
  movaps %xmm8,%xmm6
  mulss  %xmm8,%xmm6
  movaps %xmm6,%xmm8
  movss  %xmm6,0x54(%rsp)
  movaps %xmm10,%xmm3
  mulss  %xmm6,%xmm3
  movaps %xmm15,%xmm14
  mulss  %xmm15,%xmm14
  movaps %xmm13,%xmm12
  mulss  %xmm13,%xmm12
  movss  %xmm12,0x30(%rsp)
  movaps %xmm13,%xmm11
  mulss  %xmm12,%xmm11
  movss  %xmm11,0x58(%rsp)
  movaps %xmm5,%xmm7
  mulss  D31(%rip),%xmm7
  movss  %xmm7,0x34(%rsp)
  movaps %xmm5,%xmm6
  mulss  D377(%rip),%xmm6
  movss  %xmm6,0x38(%rsp)
  movaps %xmm10,%xmm9
  mulss  D261(%rip),%xmm9
  movss  %xmm9,0x3c(%rsp)
  movss  %xmm14,0x20(%rsp)
  movaps %xmm14,%xmm4
  mulss  D142(%rip),%xmm4
  movaps %xmm4,%xmm14
  movss  %xmm4,0x40(%rsp)
  movaps %xmm0,%xmm4
  mulss  D393(%rip),%xmm4
  movss  %xmm4,0x8(%rsp)
  movaps %xmm3,%xmm4
  mulss  D63(%rip),%xmm4
  movss  %xmm4,0xc(%rsp)
  mulss  D139(%rip),%xmm0
  movss  %xmm0,0x10(%rsp)
  mulss  D181(%rip),%xmm8
  movss  %xmm8,0x44(%rsp)
  mulss  %xmm15,%xmm8
  movss  %xmm8,0x48(%rsp)
  movaps %xmm5,%xmm0
  mulss  D469(%rip),%xmm0
  subss  D375(%rip),%xmm0
  movaps %xmm10,%xmm4
  mulss  D13(%rip),%xmm4
  addss  %xmm4,%xmm0
  movaps %xmm15,%xmm4
  mulss  D206(%rip),%xmm4
  addss  %xmm4,%xmm0
  movaps %xmm13,%xmm4
  mulss  D396(%rip),%xmm4
  addss  %xmm4,%xmm0
  mulss  %xmm15,%xmm7
  addss  %xmm7,%xmm0
  movss  0x20(%rsp),%xmm7
  movaps %xmm7,%xmm4
  mulss  D265(%rip),%xmm4
  addss  %xmm4,%xmm0
  mulss  %xmm13,%xmm6
  addss  %xmm6,%xmm0
  movaps %xmm9,%xmm4
  mulss  %xmm13,%xmm4
  addss  %xmm4,%xmm0
  movaps %xmm12,%xmm4
  mulss  D466(%rip),%xmm4
  addss  %xmm4,%xmm0
  movaps %xmm14,%xmm4
  mulss  %xmm13,%xmm4
  addss  %xmm4,%xmm0
  movss  0x8(%rsp),%xmm4
  mulss  %xmm10,%xmm4
  addss  %xmm4,%xmm0
  movaps %xmm5,%xmm4
  mulss  D382(%rip),%xmm4
  mulss  %xmm3,%xmm4
  addss  %xmm4,%xmm0
  movss  0xc(%rsp),%xmm4
  mulss  %xmm15,%xmm4
  addss  %xmm4,%xmm0
  movss  0x10(%rsp),%xmm4
  mulss  %xmm13,%xmm4
  addss  %xmm4,%xmm0
  movaps %xmm8,%xmm4
  mulss  %xmm13,%xmm4
  addss  %xmm4,%xmm0
  movaps %xmm5,%xmm4
  mulss  D387(%rip),%xmm4
  movss  %xmm4,0x4c(%rsp)
  mulss  %xmm10,%xmm4
  mulss  %xmm12,%xmm4
  addss  %xmm4,%xmm0
  mulss  D317(%rip),%xmm7
  movaps %xmm7,%xmm4
  mulss  %xmm11,%xmm4
  addss  %xmm4,%xmm0
  movaps %xmm2,%xmm4
  mulss  D271(%rip),%xmm4
  addss  %xmm4,%xmm0
  mulss  D188(%rip),%xmm5
  movss  %xmm5,0x50(%rsp)
  movaps %xmm5,%xmm4
  mulss  %xmm10,%xmm4
  addss  %xmm0,%xmm4
  movd   %xmm4,%r14d
  pxor   %xmm4,%xmm4
  movaps %xmm1,%xmm0
  addss  %xmm4,%xmm0
  addss  0x14(%rsp),%xmm0
  addss  0x18(%rsp),%xmm0
  addss  0x1c(%rsp),%xmm0
  ucomiss %xmm4,%xmm0
  jp     L29
  movaps %xmm4,%xmm0
  jne    L29
L52:
  movss  %xmm0,(%rbx)
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L79
  movd   %r14d,%xmm0
  add    $0xf8,%rsp
  pop    %rbx
  pop    %r14
  ret
L29:
  mulss  %xmm1,%xmm1
  movss  %xmm1,0x5c(%rsp)
  movss  0x28(%rsp),%xmm0
  mulss  D31(%rip),%xmm0
  subss  D41(%rip),%xmm0
  movss  0x4(%rsp),%xmm6
  movaps %xmm6,%xmm1
  mulss  D377(%rip),%xmm1
  addss  %xmm1,%xmm0
  movaps %xmm2,%xmm5
  mulss  D241(%rip),%xmm5
  movaps %xmm5,%xmm1
  movss  0x24(%rsp),%xmm5
  mulss  %xmm5,%xmm1
  addss  %xmm1,%xmm0
  mulss  D382(%rip),%xmm3
  addss  %xmm3,%xmm0
  mulss  D130(%rip),%xmm2
  mulss  %xmm6,%xmm2
  addss  %xmm2,%xmm0
  movaps %xmm5,%xmm1
  mulss  D387(%rip),%xmm1
  mulss  0x30(%rsp),%xmm1
  addss  %xmm1,%xmm0
  movss  0x2c(%rsp),%xmm1
  mulss  D4(%rip),%xmm1
  addss  %xmm1,%xmm0
  movaps %xmm5,%xmm1
  mulss  D188(%rip),%xmm1
  addss  %xmm1,%xmm0
  mov    $0x2,%edi
  call   <pow@plt>
  mulss  0x5c(%rsp),%xmm0
  movss  %xmm0,0x5c(%rsp)
  movss  0x14(%rsp),%xmm4
  mulss  %xmm4,%xmm4
  movss  %xmm4,0x14(%rsp)
  movss  0x4(%rsp),%xmm6
  movaps %xmm6,%xmm0
  mulss  D261(%rip),%xmm0
  addss  D13(%rip),%xmm0
  addss  0x8(%rsp),%xmm0
  movss  0x54(%rsp),%xmm4
  movaps %xmm4,%xmm9
  mulss  D102(%rip),%xmm9
  movaps %xmm9,%xmm1
  mulss  0x2c(%rsp),%xmm1
  addss  %xmm1,%xmm0
  mulss  D249(%rip),%xmm4
  movaps %xmm4,%xmm1
  movss  0x28(%rsp),%xmm7
  mulss  %xmm7,%xmm1
  addss  %xmm1,%xmm0
  movss  0x24(%rsp),%xmm1
  mulss  D431(%rip),%xmm1
  mulss  %xmm7,%xmm1
  mulss  %xmm6,%xmm1
  addss  %xmm1,%xmm0
  movss  0x4c(%rsp),%xmm9
  mulss  0x30(%rsp),%xmm9
  addss  %xmm9,%xmm0
  addss  0x50(%rsp),%xmm0
  mov    $0x2,%edi
  call   <pow@plt>
  mulss  0x14(%rsp),%xmm0
  addss  0x5c(%rsp),%xmm0
  movss  %xmm0,0x8(%rsp)
  movss  0x18(%rsp),%xmm4
  mulss  %xmm4,%xmm4
  movss  %xmm4,0x14(%rsp)
  movss  0x34(%rsp),%xmm0
  addss  D206(%rip),%xmm0
  movss  0x28(%rsp),%xmm7
  movaps %xmm7,%xmm1
  mulss  D104(%rip),%xmm1
  addss  %xmm1,%xmm0
  movaps %xmm7,%xmm1
  mulss  D170(%rip),%xmm1
  movss  0x4(%rsp),%xmm6
  mulss  %xmm6,%xmm1
  addss  %xmm1,%xmm0
  addss  0xc(%rsp),%xmm0
  movss  0x44(%rsp),%xmm9
  mulss  %xmm6,%xmm9
  addss  %xmm9,%xmm0
  mulss  D342(%rip),%xmm7
  movaps %xmm7,%xmm1
  mulss  0x58(%rsp),%xmm1
  addss  %xmm1,%xmm0
  mov    $0x2,%edi
  call   <pow@plt>
  mulss  0x14(%rsp),%xmm0
  movaps %xmm0,%xmm4
  addss  0x8(%rsp),%xmm4
  movss  %xmm4,0x8(%rsp)
  movss  0x1c(%rsp),%xmm7
  mulss  %xmm7,%xmm7
  movss  %xmm7,0xc(%rsp)
  movss  0x38(%rsp),%xmm0
  subss  D191(%rip),%xmm0
  addss  0x3c(%rsp),%xmm0
  movss  0x4(%rsp),%xmm6
  movaps %xmm6,%xmm1
  mulss  D202(%rip),%xmm1
  addss  %xmm1,%xmm0
  addss  0x40(%rsp),%xmm0
  addss  0x10(%rsp),%xmm0
  addss  0x48(%rsp),%xmm0
  mulss  D289(%rip),%xmm6
  movaps %xmm6,%xmm1
  mulss  0x2c(%rsp),%xmm1
  mulss  0x24(%rsp),%xmm1
  addss  %xmm1,%xmm0
  movss  0x30(%rsp),%xmm1
  mulss  D26(%rip),%xmm1
  mulss  0x20(%rsp),%xmm1
  addss  %xmm1,%xmm0
  mov    $0x2,%edi
  call   <pow@plt>
  mulss  0xc(%rsp),%xmm0
  addss  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  jmp    L52
L79:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D251
type_infered: byte[4]
name: read_data
arguments: label: D422
type_infered: f32
name: read_data
arguments: label: D131
type_infered: f32
name: read_data
arguments: label: D353
type_infered: f32
name: read_data
arguments: label: D260
type_infered: byte[4]
name: read_data
arguments: label: D470
type_infered: byte[4]
name: read_data
arguments: label: D31
type_infered: byte[4]
name: read_data
arguments: label: D377
type_infered: byte[4]
name: read_data
arguments: label: D261
type_infered: byte[4]
name: read_data
arguments: label: D142
type_infered: byte[4]
name: read_data
arguments: label: D393
type_infered: byte[4]
name: read_data
arguments: label: D63
type_infered: byte[4]
name: read_data
arguments: label: D139
type_infered: byte[4]
name: read_data
arguments: label: D181
type_infered: byte[4]
name: read_data
arguments: label: D469
type_infered: byte[4]
name: read_data
arguments: label: D375
type_infered: byte[4]
name: read_data
arguments: label: D13
type_infered: byte[4]
name: read_data
arguments: label: D206
type_infered: byte[4]
name: read_data
arguments: label: D396
type_infered: byte[4]
name: read_data
arguments: label: D265
type_infered: byte[4]
name: read_data
arguments: label: D466
type_infered: byte[4]
name: read_data
arguments: label: D382
type_infered: byte[4]
name: read_data
arguments: label: D387
type_infered: byte[4]
name: read_data
arguments: label: D317
type_infered: byte[4]
name: read_data
arguments: label: D271
type_infered: byte[4]
name: read_data
arguments: label: D188
type_infered: byte[4]
name: read_data
arguments: label: D41
type_infered: byte[4]
name: read_data
arguments: label: D241
type_infered: byte[4]
name: read_data
arguments: label: D130
type_infered: byte[4]
name: read_data
arguments: label: D4
type_infered: byte[4]
name: read_data
arguments: label: D102
type_infered: byte[4]
name: read_data
arguments: label: D249
type_infered: byte[4]
name: read_data
arguments: label: D431
type_infered: byte[4]
name: read_data
arguments: label: D104
type_infered: byte[4]
name: read_data
arguments: label: D170
type_infered: byte[4]
name: read_data
arguments: label: D342
type_infered: byte[4]
name: read_data
arguments: label: D191
type_infered: byte[4]
name: read_data
arguments: label: D202
type_infered: byte[4]
name: read_data
arguments: label: D289
type_infered: byte[4]
name: read_data
arguments: label: D26
type_infered: byte[4]

tool: {"D251": [0x00,0x00,0x70,0xc1]}

tool: D422: 15

tool: D131: 2

tool: D353: 1

tool: {"D260": [0x25,0x06,0x90,0x41]}

tool: {"D470": [0x0c,0x02,0x90,0x41]}

tool: {"D31": [0x2e,0x1f,0x4a,0x39]}

tool: {"D377": [0xf0,0xcd,0x9c,0xb8]}

tool: {"D261": [0x61,0xa2,0xa6,0x37]}

tool: {"D142": [0xed,0x3a,0x65,0x36]}

tool: {"D393": [0x90,0x83,0x4a,0x35]}

tool: {"D63": [0xba,0xd2,0x96,0x39]}

tool: {"D139": [0x1b,0x60,0xb2,0xb5]}

tool: {"D181": [0x13,0xd3,0xa7,0xb9]}

tool: {"D469": [0x4f,0x3c,0x59,0xbd]}

tool: {"D375": [0x11,0xb0,0xab,0x3a]}

tool: {"D13": [0xe1,0x17,0xbf,0x3c]}

tool: {"D206": [0x7e,0xdc,0x7e,0x3d]}

tool: {"D396": [0x03,0xe5,0x11,0xbd]}

tool: {"D265": [0x9a,0xc9,0x2d,0xb9]}

tool: {"D466": [0x32,0xa6,0xe2,0xb7]}

tool: {"D382": [0x69,0x31,0x04,0xb9]}

tool: {"D387": [0xd1,0xa2,0x23,0x39]}

tool: {"D317": [0xe2,0x95,0x9c,0xb7]}

tool: {"D271": [0xd1,0xce,0x6a,0xb8]}

tool: {"D188": [0xa2,0x00,0x7c,0x38]}

tool: {"D41": [0x4f,0x3c,0x59,0x3d]}

tool: {"D241": [0xac,0xe2,0x17,0x36]}

tool: {"D130": [0x14,0xc8,0x85,0xb6]}

tool: {"D4": [0xd1,0xce,0xea,0xb8]}

tool: {"D102": [0x1e,0x4a,0xc6,0xb9]}

tool: {"D249": [0x17,0x3c,0x62,0x3a]}

tool: {"D431": [0x13,0xd3,0x27,0xba]}

tool: {"D104": [0x9a,0xc9,0xad,0xb9]}

tool: {"D170": [0xed,0x3a,0xe5,0x36]}

tool: {"D342": [0xe2,0x95,0x1c,0xb8]}

tool: {"D191": [0x03,0xe5,0x11,0x3d]}

tool: {"D202": [0x32,0xa6,0x62,0xb8]}

tool: {"D289": [0xd1,0xa2,0xa3,0x39]}

tool: {"D26": [0xd3,0xe0,0x6a,0xb8]}

assistant: ```c
float target_phi(float *x, float *dx, int m) {
  int ncoeff = 20;
  float avdat = -0.1317067E-02;
  float xmin[10] = {-0.15000E+02, -0.15000E+02, -0.18005E+02, -0.18008E+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.18003E+02, 0.18001E+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.71932686E-05, -0.53036030E-01, 0.23326816E-01, 0.62221996E-01, -0.35618793E-01, 0.19275837E-03, -0.16573668E-03, -0.74770185E-04, 0.19864356E-04, -0.27018690E-04, 0.34157958E-05, 0.75442313E-06, -0.12606908E-03, 0.28767233E-03, -0.13290004E-05, -0.32009985E-03, 0.15605545E-03, -0.18666444E-04, -0.55982560E-04, 0.60082071E-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 x13 = x12 * 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] * x11 * x31 + coeff[6] * x32 + coeff[7] * x11 * x41;
  v_target_phi = v_target_phi + coeff[8] * x21 * x41 + coeff[9] * x42 + coeff[10] * x32 * x41 + coeff[11] * x13 * x21 + coeff[12] * x11 * x23 + coeff[13] * x23 * x31 + coeff[14] * x13 * x41 + coeff[15] * x22 * x31 * x41 + coeff[16] * x11 * x21 * x42;
  v_target_phi = v_target_phi + coeff[17] * x32 * x43 + coeff[18] * x12 + coeff[19] * x11 * x21;
  float dxall = 0 + dx1 + dx2 + dx3 + dx4;
  float dv_target_phi = dxall == 0 ? 0 : sqrt(+dx1 * dx1 * pow(0 + coeff[1] + coeff[5] * x31 + coeff[7] * x41 + 3 * coeff[11] * x12 * x21 + coeff[12] * x23 + 3 * coeff[14] * x12 * x41 + coeff[16] * x21 * x42 + 2 * coeff[18] * x11 + coeff[19] * x21, 2) + dx2 * dx2 * pow(0 + coeff[2] + coeff[8] * x41 + coeff[11] * x13 + 3 * coeff[12] * x22 * x11 + 3 * coeff[13] * x22 * x31 + 2 * coeff[15] * x21 * x31 * x41 + coeff[16] * x11 * x42 + coeff[19] * x11, 2) + dx3 * dx3 * pow(0 + coeff[3] + coeff[5] * x11 + 2 * coeff[6] * x31 + 2 * coeff[10] * x31 * x41 + coeff[13] * x23 + coeff[15] * x22 * x41 + 2 * coeff[17] * x31 * x43, 2) + dx4 * dx4 * pow(0 + coeff[4] + coeff[7] * x11 + coeff[8] * x21 + 2 * coeff[9] * x41 + coeff[10] * x32 + coeff[14] * x13 + coeff[15] * x22 * x31 + 2 * coeff[16] * x41 * x11 * x21 + 3 * coeff[17] * x42 * x32, 2));
  dx[0] = dv_target_phi;
  return v_target_phi;
}
```