user: Converte this assembly snippet into its equivalent C code:

```asm
<target_x>:
  endbr64
  push   %rbx
  pxor   %xmm0,%xmm0
  mov    %rsi,%rbx
  sub    $0x60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x30(%rsp)
  test   %edx,%edx
  jle    L52
  movss  D46(%rip),%xmm5
  cmp    $0x1,%edx
  je     L76
  movss  %xmm5,0x34(%rsp)
  cmp    $0x2,%edx
  je     L76
  movl   $0x3d638e39,0x38(%rsp)
  cmp    $0x3,%edx
  je     L76
  movl   $0x3d638c9b,0x3c(%rsp)
L76:
  movss  0x34(%rsp),%xmm8
  movss  0x38(%rsp),%xmm7
  pxor   %xmm9,%xmm9
  movss  0x3c(%rsp),%xmm6
L81:
  movss  D148(%rip),%xmm0
  movss  (%rdi),%xmm1
  movss  0x8(%rdi),%xmm4
  movss  0x4(%rdi),%xmm3
  subss  %xmm0,%xmm1
  movss  0xc(%rdi),%xmm2
  subss  D134(%rip),%xmm4
  subss  %xmm0,%xmm3
  subss  D44(%rip),%xmm2
  movss  D41(%rip),%xmm10
  movss  D105(%rip),%xmm15
  movss  D78(%rip),%xmm0
  movss  D191(%rip),%xmm12
  mulss  %xmm5,%xmm1
  movss  D43(%rip),%xmm13
  movss  D51(%rip),%xmm14
  mulss  %xmm7,%xmm4
  mulss  %xmm8,%xmm3
  mulss  %xmm6,%xmm2
  mulss  (%rbx),%xmm5
  addss  %xmm10,%xmm1
  mulss  0x4(%rbx),%xmm8
  addss  %xmm10,%xmm4
  mulss  0x8(%rbx),%xmm7
  addss  %xmm10,%xmm3
  mulss  0xc(%rbx),%xmm6
  movaps %xmm1,%xmm11
  addss  %xmm10,%xmm2
  movaps %xmm1,%xmm10
  mulss  %xmm4,%xmm0
  mulss  %xmm15,%xmm11
  mulss  D159(%rip),%xmm1
  addss  D174(%rip),%xmm1
  mulss  %xmm12,%xmm10
  mulss  %xmm4,%xmm13
  mulss  %xmm3,%xmm14
  addss  %xmm0,%xmm1
  movaps %xmm11,%xmm0
  mulss  %xmm3,%xmm0
  addss  %xmm0,%xmm1
  movaps %xmm10,%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movaps %xmm13,%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movaps %xmm14,%xmm0
  mulss  %xmm4,%xmm0
  addss  %xmm0,%xmm1
  movss  D55(%rip),%xmm0
  mulss  %xmm3,%xmm0
  addss  %xmm0,%xmm1
  movss  D27(%rip),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movaps %xmm5,%xmm0
  addss  %xmm9,%xmm0
  addss  %xmm8,%xmm0
  addss  %xmm7,%xmm0
  addss  %xmm6,%xmm0
  ucomiss %xmm9,%xmm0
  jp     L89
  movaps %xmm9,%xmm0
  jne    L89
L31:
  movss  %xmm0,(%rbx)
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  add    $0x60,%rsp
  movaps %xmm1,%xmm0
  pop    %rbx
  ret
  nopl   0x0(%rax)
L89:
  mulss  %xmm2,%xmm12
  mov    $0x2,%edi
  movss  %xmm1,0x28(%rsp)
  mulss  %xmm15,%xmm3
  movss  %xmm13,0x14(%rsp)
  subss  D42(%rip),%xmm3
  mulss  %xmm5,%xmm5
  movss  %xmm10,0x10(%rsp)
  movss  %xmm6,0x24(%rsp)
  movss  %xmm7,0x20(%rsp)
  addss  %xmm12,%xmm3
  movss  %xmm14,0x18(%rsp)
  movss  %xmm2,0xc(%rsp)
  movss  %xmm5,(%rsp)
  movaps %xmm3,%xmm0
  movss  %xmm9,0x2c(%rsp)
  movss  %xmm4,0x1c(%rsp)
  movss  %xmm8,0x4(%rsp)
  movss  %xmm11,0x8(%rsp)
  call   <pow@plt>
  movss  0x1c(%rsp),%xmm4
  movss  0x2c(%rsp),%xmm9
  mov    $0x2,%edi
  mulss  D51(%rip),%xmm4
  movss  0x8(%rsp),%xmm11
  movss  0x4(%rsp),%xmm8
  mulss  (%rsp),%xmm0
  movss  %xmm9,0x8(%rsp)
  addss  %xmm9,%xmm11
  mulss  %xmm8,%xmm8
  addss  %xmm4,%xmm11
  subss  D31(%rip),%xmm11
  movss  %xmm0,(%rsp)
  movaps %xmm11,%xmm0
  movss  %xmm8,0x4(%rsp)
  call   <pow@plt>
  mulss  0x4(%rsp),%xmm0
  movss  (%rsp),%xmm7
  mov    $0x2,%edi
  movss  0xc(%rsp),%xmm2
  mulss  D43(%rip),%xmm2
  addss  D78(%rip),%xmm2
  movss  0x18(%rsp),%xmm14
  addss  %xmm0,%xmm7
  addss  %xmm14,%xmm2
  movss  %xmm7,(%rsp)
  movss  0x20(%rsp),%xmm7
  movaps %xmm2,%xmm0
  movaps %xmm7,%xmm6
  mulss  %xmm7,%xmm6
  movss  %xmm6,0x4(%rsp)
  call   <pow@plt>
  movss  0x24(%rsp),%xmm6
  mov    $0x2,%edi
  movss  0x8(%rsp),%xmm9
  movss  0x10(%rsp),%xmm10
  movss  0x14(%rsp),%xmm13
  movss  D27(%rip),%xmm5
  mulss  0x4(%rsp),%xmm0
  addss  %xmm9,%xmm10
  mulss  %xmm6,%xmm6
  addss  (%rsp),%xmm0
  addss  %xmm13,%xmm10
  movss  %xmm0,(%rsp)
  movss  %xmm6,0x4(%rsp)
  addss  %xmm10,%xmm5
  movaps %xmm5,%xmm0
  call   <pow@plt>
  mulss  0x4(%rsp),%xmm0
  addss  (%rsp),%xmm0
  call   <sqrt@plt>
  movss  0x28(%rsp),%xmm1
  jmp    L31
L52:
  pxor   %xmm9,%xmm9
  movaps %xmm9,%xmm6
  movaps %xmm9,%xmm7
  movaps %xmm9,%xmm8
  movaps %xmm9,%xmm5
  jmp    L81
L78:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D46
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D148
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D134
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D44
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D41
type_guessed: f32
name: retrieve_data
arguments: data_label: D105
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D78
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D191
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D43
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D51
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D159
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D174
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D55
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D27
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D42
type_guessed: byte[4]
name: retrieve_data
arguments: data_label: D31
type_guessed: byte[4]

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

tool: {"D148": [0x00,0x00,0x70,0x41]}

tool: {"D134": [0x00,0x00,0x90,0x41]}

tool: {"D44": [0x6d,0xe7,0x8f,0x41]}

tool: D41: 1

tool: {"D105": [0xa9,0xa6,0xf3,0x3e]}

tool: {"D78": [0x3d,0x7f,0x84,0x42]}

tool: {"D191": [0x2b,0x82,0x4a,0xbf]}

tool: {"D43": [0x15,0xe9,0xb8,0x3f]}

tool: {"D51": [0xb9,0xae,0x5e,0xbf]}

tool: {"D159": [0xd2,0xa8,0x20,0xc2]}

tool: {"D174": [0x3e,0x08,0x9a,0x3e]}

tool: {"D55": [0x76,0x77,0xa4,0xbb]}

tool: {"D27": [0x54,0x59,0x08,0x3c]}

tool: {"D42": [0xd2,0xa8,0x20,0x42]}

tool: {"D31": [0x76,0x77,0xa4,0x3b]}

assistant: ```c
float target_x(float *x, float *dx, int m) {
  int ncoeff = 9;
  float avdat = 0.3008425E+00;
  float xmin[10] = {-0.15000E+02, -0.15000E+02, -0.18000E+02, -0.18013E+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.18000E+02, 0.17988E+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[10] = {0.16295412E-05, -0.40164864E+02, 0.66248512E+02, 0.47588089E+00, -0.79104871E+00, 0.14446131E+01, -0.86985356E+00, -0.50191237E-02, 0.83220787E-02, 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 x21 = x2;
  float x31 = x3;
  float x41 = x4;
  float v_target_x = avdat + coeff[0] + coeff[1] * x11 + coeff[2] * x31 + coeff[3] * x11 * x21 + coeff[4] * x11 * x41 + coeff[5] * x31 * x41 + coeff[6] * x21 * x31 + coeff[7] * x21;
  v_target_x = v_target_x + coeff[8] * x41;
  float dxall = 0 + dx1 + dx2 + dx3 + dx4;
  float dv_target_x = dxall == 0 ? 0 : sqrt(+dx1 * dx1 * pow(0 + coeff[1] + coeff[3] * x21 + coeff[4] * x41, 2) + dx2 * dx2 * pow(0 + coeff[3] * x11 + coeff[6] * x31 + coeff[7], 2) + dx3 * dx3 * pow(0 + coeff[2] + coeff[5] * x41 + coeff[6] * x21, 2) + dx4 * dx4 * pow(0 + coeff[4] * x11 + coeff[5] * x31 + coeff[8], 2));
  dx[0] = dv_target_x;
  return v_target_x;
}
```