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

```asm
<init_gymy>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %ecx,-0x44(%rbp)
  mov    %r8d,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L47
L11:
  movl   $0x0,-0x20(%rbp)
  jmp    L65
L14:
  mov    -0x20(%rbp),%eax
  imul   -0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  movl   $0x0,-0x1c(%rbp)
  jmp    L46
L28:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L32
L26:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x44(%rbp),%xmm1
  movsd  D30(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x24(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x1c(%rbp),%eax
  imul   0x18(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  mov    -0x1c(%rbp),%eax
  imul   0x18(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm2,%xmm0
  movapd %xmm1,%xmm3
  addsd  %xmm0,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  -0x58(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D17(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  movsd  -0x8(%rbp),%xmm1
  subsd  %xmm0,%xmm1
  movsd  D31(%rip),%xmm0
  comisd %xmm1,%xmm0
  seta   %al
  movzbl %al,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L98
  movsd  -0x10(%rbp),%xmm0
  movsd  D2(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L2
L98:
  movsd  -0x10(%rbp),%xmm1
  movsd  D2(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
L2:
  addl   $0x1,-0x18(%rbp)
L32:
  mov    -0x18(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L26
  mov    -0x20(%rbp),%eax
  imul   -0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x20(%rbp),%eax
  imul   -0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  cvttsd2si %xmm0,%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x1c(%rbp)
L46:
  mov    -0x1c(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L28
  mov    -0x48(%rbp),%eax
  add    %eax,-0x20(%rbp)
L65:
  mov    -0x20(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L14
  mov    -0x48(%rbp),%eax
  add    %eax,-0x24(%rbp)
L47:
  mov    -0x24(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L11
  nop
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D30
data_type: f64
name: unpack_data
arguments: data_label: D17
data_type: f64
name: unpack_data
arguments: data_label: D31
data_type: f64
name: unpack_data
arguments: data_label: D2
data_type: f32[2]

tool: D30: 2

tool: D17: 0.75

tool: D31: 0.5

tool: {"D2": [0.0,1.875]}

assistant: ```c
void init_gymy(int *gymy_space, int width, int height, int q, int skip, int *input, int num_obj, int num_obj_values, int *in_dist) {
  for (int x2 = 0; x2 < height; x2 += skip) {
    for (int x1 = 0; x1 < width; x1 += skip) {
      gymy_space[x1 * height + x2] = 0;
      for (int obj = 0; obj < num_obj; obj++) {
        double sum = 0;
        for (int val = 0; val < num_obj_values; val++) {
          double X = (0.75 + 2.0 / q * (sqrt(((x2) * ((double)x2)) + ((in_dist[val]) * ((double)in_dist[val])) + ((abs(x1 - input[val + obj * num_obj_values])) * ((double)abs(x1 - input[val + obj * num_obj_values]))))));
          int a = ((((double)X) - floor(X)) < 0.5);
          if (a)
            sum -= 1;
          else
            sum += 1;
        }
        gymy_space[x1 * height + x2] += ((sum) * ((double)sum));
      }
    }
  }
}
```