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

```asm
<target_x>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x130,%rsp
  mov    %rdi,-0x118(%rbp)
  mov    %rsi,-0x120(%rbp)
  mov    %edx,-0x124(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x9,-0x108(%rbp)
  movss  D153(%rip),%xmm0
  movss  %xmm0,-0x104(%rbp)
  movss  D195(%rip),%xmm0
  movss  %xmm0,-0xc0(%rbp)
  movss  D195(%rip),%xmm0
  movss  %xmm0,-0xbc(%rbp)
  movss  D31(%rip),%xmm0
  movss  %xmm0,-0xb8(%rbp)
  movss  D0(%rip),%xmm0
  movss  %xmm0,-0xb4(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xb0(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xac(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xa8(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xa4(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xa0(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x9c(%rbp)
  movss  D48(%rip),%xmm0
  movss  %xmm0,-0x90(%rbp)
  movss  D48(%rip),%xmm0
  movss  %xmm0,-0x8c(%rbp)
  movss  D123(%rip),%xmm0
  movss  %xmm0,-0x88(%rbp)
  movss  D97(%rip),%xmm0
  movss  %xmm0,-0x84(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x80(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x7c(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x74(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x70(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x6c(%rbp)
  movq   $0x0,-0x60(%rbp)
  movq   $0x0,-0x58(%rbp)
  movq   $0x0,-0x50(%rbp)
  movq   $0x0,-0x48(%rbp)
  movq   $0x0,-0x40(%rbp)
  movss  D94(%rip),%xmm0
  movss  %xmm0,-0x30(%rbp)
  movss  D237(%rip),%xmm0
  movss  %xmm0,-0x2c(%rbp)
  movss  D53(%rip),%xmm0
  movss  %xmm0,-0x28(%rbp)
  movss  D129(%rip),%xmm0
  movss  %xmm0,-0x24(%rbp)
  movss  D167(%rip),%xmm0
  movss  %xmm0,-0x20(%rbp)
  movss  D106(%rip),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  D212(%rip),%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  D188(%rip),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  D88(%rip),%xmm0
  movss  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xc(%rbp)
  movl   $0x0,-0x100(%rbp)
  cmpl   $0x0,-0x100(%rbp)
  jne    L11
  movl   $0x1,-0x100(%rbp)
  movl   $0x0,-0x10c(%rbp)
  jmp    L24
L66:
  mov    -0x10c(%rbp),%eax
  cltq
  movss  -0xc0(%rbp,%rax,4),%xmm0
  mov    -0x10c(%rbp),%eax
  cltq
  movss  -0x90(%rbp,%rax,4),%xmm1
  ucomiss %xmm1,%xmm0
  jp     L56
  ucomiss %xmm1,%xmm0
  je     L81
L56:
  mov    -0x10c(%rbp),%eax
  cltq
  movss  -0x90(%rbp,%rax,4),%xmm0
  mov    -0x10c(%rbp),%eax
  cltq
  movss  -0xc0(%rbp,%rax,4),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D104(%rip),%xmm0
  divss  %xmm1,%xmm0
  mov    -0x10c(%rbp),%eax
  cltq
  movss  %xmm0,-0x60(%rbp,%rax,4)
  jmp    L14
L81:
  nop
L14:
  addl   $0x1,-0x10c(%rbp)
L24:
  mov    -0x10c(%rbp),%eax
  cmp    -0x124(%rbp),%eax
  jl     L66
L11:
  mov    -0x118(%rbp),%rax
  movss  (%rax),%xmm0
  movss  -0x90(%rbp),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  -0x60(%rbp),%xmm0
  mulss  %xmm0,%xmm1
  movss  D183(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xfc(%rbp)
  mov    -0x120(%rbp),%rax
  movss  (%rax),%xmm1
  movss  -0x60(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0xf8(%rbp)
  mov    -0x118(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  movss  -0x8c(%rbp),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  -0x5c(%rbp),%xmm0
  mulss  %xmm0,%xmm1
  movss  D183(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xf4(%rbp)
  mov    -0x120(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm1
  movss  -0x5c(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0xf0(%rbp)
  mov    -0x118(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  movss  -0x88(%rbp),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  -0x58(%rbp),%xmm0
  mulss  %xmm0,%xmm1
  movss  D183(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xec(%rbp)
  mov    -0x120(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm1
  movss  -0x58(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0xe8(%rbp)
  mov    -0x118(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm0
  movss  -0x84(%rbp),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  -0x54(%rbp),%xmm0
  mulss  %xmm0,%xmm1
  movss  D183(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xe4(%rbp)
  mov    -0x120(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm1
  movss  -0x54(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0xe0(%rbp)
  movss  -0xfc(%rbp),%xmm0
  movss  %xmm0,-0xdc(%rbp)
  movss  -0xf4(%rbp),%xmm0
  movss  %xmm0,-0xd8(%rbp)
  movss  -0xec(%rbp),%xmm0
  movss  %xmm0,-0xd4(%rbp)
  movss  -0xe4(%rbp),%xmm0
  movss  %xmm0,-0xd0(%rbp)
  movss  -0x30(%rbp),%xmm0
  movaps %xmm0,%xmm1
  addss  -0x104(%rbp),%xmm1
  movss  -0x2c(%rbp),%xmm0
  mulss  -0xdc(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x28(%rbp),%xmm0
  mulss  -0xd4(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x24(%rbp),%xmm0
  mulss  -0xd4(%rbp),%xmm0
  mulss  -0xd0(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x20(%rbp),%xmm0
  mulss  -0xdc(%rbp),%xmm0
  mulss  -0xd8(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x1c(%rbp),%xmm0
  mulss  -0xd8(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x18(%rbp),%xmm0
  mulss  -0xd0(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x14(%rbp),%xmm0
  mulss  -0xd8(%rbp),%xmm0
  mulss  -0xd4(%rbp),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xcc(%rbp)
  movss  -0x10(%rbp),%xmm0
  mulss  -0xdc(%rbp),%xmm0
  mulss  -0xd0(%rbp),%xmm0
  movss  -0xcc(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xcc(%rbp)
  movss  -0xf8(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  addss  %xmm1,%xmm0
  addss  -0xf0(%rbp),%xmm0
  addss  -0xe8(%rbp),%xmm0
  movss  -0xe0(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xc8(%rbp)
  pxor   %xmm0,%xmm0
  ucomiss -0xc8(%rbp),%xmm0
  jp     L40
  pxor   %xmm0,%xmm0
  ucomiss -0xc8(%rbp),%xmm0
  je     L1
L40:
  movss  -0xf8(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  movss  %xmm0,-0x128(%rbp)
  movss  -0x2c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x20(%rbp),%xmm0
  mulss  -0xd8(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x10(%rbp),%xmm0
  mulss  -0xd0(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movd   %xmm1,%eax
  mov    $0x2,%edi
  movd   %eax,%xmm0
  call   <pow@plt>
  movaps %xmm0,%xmm4
  mulss  -0x128(%rbp),%xmm4
  movss  %xmm4,-0x128(%rbp)
  movss  -0xf0(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  movss  %xmm0,-0x12c(%rbp)
  movss  -0x20(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0xdc(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x1c(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x14(%rbp),%xmm0
  mulss  -0xd4(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movd   %xmm1,%eax
  mov    $0x2,%edi
  movd   %eax,%xmm0
  call   <pow@plt>
  mulss  -0x12c(%rbp),%xmm0
  addss  -0x128(%rbp),%xmm0
  movss  %xmm0,-0x128(%rbp)
  movss  -0xe8(%rbp),%xmm0
  movaps %xmm0,%xmm7
  mulss  %xmm0,%xmm7
  movss  %xmm7,-0x12c(%rbp)
  movss  -0x28(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x24(%rbp),%xmm0
  mulss  -0xd0(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x14(%rbp),%xmm0
  mulss  -0xd8(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movd   %xmm1,%eax
  mov    $0x2,%edi
  movd   %eax,%xmm0
  call   <pow@plt>
  mulss  -0x12c(%rbp),%xmm0
  movaps %xmm0,%xmm3
  addss  -0x128(%rbp),%xmm3
  movss  %xmm3,-0x128(%rbp)
  movss  -0xe0(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  movss  %xmm0,-0x12c(%rbp)
  movss  -0x24(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0xd4(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x18(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movss  -0x10(%rbp),%xmm0
  mulss  -0xdc(%rbp),%xmm0
  addss  %xmm0,%xmm1
  movd   %xmm1,%eax
  mov    $0x2,%edi
  movd   %eax,%xmm0
  call   <pow@plt>
  mulss  -0x12c(%rbp),%xmm0
  addss  -0x128(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <sqrt@plt>
  movd   %xmm0,%eax
  jmp    L70
L1:
  mov    D40(%rip),%eax
L70:
  mov    %eax,-0xc4(%rbp)
  mov    -0x120(%rbp),%rax
  movss  -0xc4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  movss  -0xcc(%rbp),%xmm0
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L90
  call   <__stack_chk_fail@plt>
L90:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D153
datatype: byte[4]
name: read_data
arguments: data_label: D195
datatype: byte[4]
name: read_data
arguments: data_label: D31
datatype: byte[4]
name: read_data
arguments: data_label: D0
datatype: byte[4]
name: read_data
arguments: data_label: D48
datatype: byte[4]
name: read_data
arguments: data_label: D123
datatype: byte[4]
name: read_data
arguments: data_label: D97
datatype: byte[4]
name: read_data
arguments: data_label: D94
datatype: byte[4]
name: read_data
arguments: data_label: D237
datatype: byte[4]
name: read_data
arguments: data_label: D53
datatype: byte[4]
name: read_data
arguments: data_label: D129
datatype: byte[4]
name: read_data
arguments: data_label: D167
datatype: byte[4]
name: read_data
arguments: data_label: D106
datatype: byte[4]
name: read_data
arguments: data_label: D212
datatype: byte[4]
name: read_data
arguments: data_label: D188
datatype: byte[4]
name: read_data
arguments: data_label: D88
datatype: byte[4]
name: read_data
arguments: data_label: D104
datatype: f32
name: read_data
arguments: data_label: D183
datatype: f32
name: read_data
arguments: data_label: D40
datatype: f32

tool: {"D153": [0x70,0xb4,0x08,0x40]}

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

tool: {"D31": [0x00,0x00,0x90,0xc1]}

tool: {"D0": [0xdd,0x24,0x90,0xc1]}

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

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

tool: {"D97": [0x2f,0xdd,0x8f,0x41]}

tool: {"D94": [0xf6,0x82,0x92,0x38]}

tool: {"D237": [0x58,0x62,0x19,0xc2]}

tool: {"D53": [0x4f,0x2c,0x80,0x42]}

tool: {"D129": [0xf8,0xa0,0xcc,0x3f]}

tool: {"D167": [0x38,0xf8,0x05,0x3f]}

tool: {"D106": [0x2d,0xc1,0x03,0xbd]}

tool: {"D212": [0xf8,0xd8,0x5a,0x3d]}

tool: {"D188": [0xf1,0x0d,0x76,0xbf]}

tool: {"D88": [0x08,0xfe,0x5e,0xbf]}

tool: D104: 2

tool: D183: 1

tool: D40: 0

assistant: ```c
float target_x(float *x, float *dx, int m) {
  int ncoeff = 9;
  float avdat = 0.2136013E+01;
  float xmin[10] = {-0.15000E+02, -0.15000E+02, -0.18000E+02, -0.18018E+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.17983E+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.69862159E-04, -0.38346039E+02, 0.64086540E+02, 0.15986624E+01, 0.52331877E+00, -0.32166649E-01, 0.53429574E-01, -0.96115023E+00, -0.87106371E+00, 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] * x31 * x41 + coeff[4] * x11 * x21 + coeff[5] * x21 + coeff[6] * x41 + coeff[7] * x21 * x31;
  v_target_x = v_target_x + coeff[8] * x11 * x41;
  float dxall = 0 + dx1 + dx2 + dx3 + dx4;
  float dv_target_x = dxall == 0 ? 0 : sqrt(+dx1 * dx1 * pow(0 + coeff[1] + coeff[4] * x21 + coeff[8] * x41, 2) + dx2 * dx2 * pow(0 + coeff[4] * x11 + coeff[5] + coeff[7] * x31, 2) + dx3 * dx3 * pow(0 + coeff[2] + coeff[3] * x41 + coeff[7] * x21, 2) + dx4 * dx4 * pow(0 + coeff[3] * x31 + coeff[6] + coeff[8] * x11, 2));
  dx[0] = dv_target_x;
  return v_target_x;
}
```