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

```asm
<Mutation_HitAndRun>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %r8,%r14
  push   %r13
  push   %r12
  mov    %r9d,%r12d
  push   %rbp
  mov    %rsi,%rbp
  mov    %r8,%rsi
  push   %rbx
  mov    %edx,%ebx
  mov    %r9d,%edx
  sub    $0x38,%rsp
  mov    0x70(%rsp),%rax
  mov    %rcx,0x8(%rsp)
  lea    0x20(%rsp),%rdi
  movsd  %xmm0,0x10(%rsp)
  mov    0x78(%rsp),%r13
  movsd  0x0(%rbp),%xmm0
  mov    %rax,0x18(%rsp)
  movsd  %xmm1,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <self_adj_index_search@plt>
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <uniformdirectionrng@plt>
  xor    %eax,%eax
  call   <normalrng@plt>
  mulsd  (%rsp),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %r12d,%xmm1
  addsd  D44(%rip),%xmm1
  movsd  %xmm0,(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x20(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edi
  movsd  D34(%rip),%xmm0
  call   <pow@plt>
  movsd  (%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  test   %ebx,%ebx
  jle    L68
  lea    0x1(%rbx),%edx
  mov    $0x1,%eax
  nopl   0x0(%rax)
L16:
  movsd  0x0(%r13,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%r15,%rax,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L16
L68:
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <cost@plt>
  lea    0x24(%rsp),%rdi
  mov    %r12d,%edx
  mov    %r14,%rsi
  movsd  %xmm0,(%rsp)
  call   <self_adj_index_search@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  movslq 0x24(%rsp),%rax
  mov    0x8(%rsp),%rcx
  divsd  %xmm2,%xmm1
  movsd  (%rcx,%rax,8),%xmm0
  xorpd  D10(%rip),%xmm0
  movslq 0x20(%rsp),%rax
  subsd  %xmm1,%xmm0
  movsd  0x0(%rbp),%xmm1
  addsd  (%rcx,%rax,8),%xmm0
  mov    D44(%rip),%rax
  divsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  comisd D11(%rip),%xmm0
  movq   %rax,%xmm1
  jbe    L17
L62:
  mov    0x18(%rsp),%r14
  xor    %eax,%eax
  movsd  %xmm1,(%r14)
  call   <uniformrng@plt>
  movsd  (%r14),%xmm1
  comisd %xmm0,%xmm1
  jbe    L6
  movsd  (%rsp),%xmm4
  movsd  %xmm4,0x0(%rbp)
  test   %ebx,%ebx
  jle    L6
  lea    0x1(%rbx),%edx
  mov    $0x1,%eax
  nopl   0x0(%rax)
L13:
  movsd  0x0(%r13,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L13
L6:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L71
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L17:
  call   <exp@plt>
  movapd %xmm0,%xmm1
  jmp    L62
L71:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D44
type: f64
name: parse_data
arguments: data_tag: D34
type: f64
name: parse_data
arguments: data_tag: D10
type: f32[4]
name: parse_data
arguments: data_tag: D11
type: f32

tool: D44: 1

tool: D34: 0.5

tool: {"D10": [0.0,-0.0,0.0,0.0]}

tool: D11: 0

assistant: ```c
void Mutation_HitAndRun(double *z, double *fz, int N_dimension, double *theta, double *grid_points, int grid_size, double temp, double scl, double *accpr_pop, double *z_new) {
  int k_old;
  int k_new;
  int i;
  double fz_new;
  double rat;
  double un;
  self_adj_index_search(&k_old, *fz, grid_points, grid_size);
  uniformdirectionrng(z_new, N_dimension);
  un = normalrng() * scl * pow(k_old / (grid_size + 1.0), 0.5);
  for (i = 1; i <= N_dimension; i++)
    z_new[i] = z[i] + z_new[i] * un;
  fz_new = cost(z_new, N_dimension);
  self_adj_index_search(&k_new, fz_new, grid_points, grid_size);
  rat = -theta[k_new] - fz_new / temp + theta[k_old] + *fz / temp;
  *accpr_pop = ((rat > 0.0) ? 1.0 : exp(rat));
  un = uniformrng();
  if (*accpr_pop > un) {
    *fz = fz_new;
    for (i = 1; i <= N_dimension; i++)
      z[i] = z_new[i];
  }
}
```