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

```asm
<dot_product>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rsi
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%rcx
  mov    $0x0,%ebx
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L9:
  cmp    %rdx,%rsp
  je     L34
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L9
L34:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L75
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L75:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x38(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L82:
  cmp    %rdx,%rsp
  je     L89
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L82
L89:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L81
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L81:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x30(%rbp)
  movss  D13(%rip),%xmm0
  movss  %xmm0,-0x54(%rbp)
  movl   $0x0,-0x50(%rbp)
  jmp    L17
L22:
  mov    -0x40(%rbp),%rax
  mov    -0x50(%rbp),%edx
  movslq %edx,%rdx
  movss  -0x54(%rbp),%xmm0
  movss  %xmm0,(%rax,%rdx,4)
  mov    -0x30(%rbp),%rax
  mov    -0x50(%rbp),%edx
  movslq %edx,%rdx
  movss  D13(%rip),%xmm0
  movss  %xmm0,(%rax,%rdx,4)
  movss  -0x54(%rbp),%xmm1
  movss  D2(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x54(%rbp)
  addl   $0x1,-0x50(%rbp)
L17:
  mov    -0x50(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jl     L22
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  movl   $0x0,-0x50(%rbp)
  jmp    L50
L47:
  mov    -0x40(%rbp),%rax
  mov    -0x50(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm1
  mov    -0x30(%rbp),%rax
  mov    -0x50(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x4c(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  addl   $0x1,-0x50(%rbp)
L50:
  mov    -0x50(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jl     L47
  movss  -0x4c(%rbp),%xmm0
  mov    %rsi,%rsp
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L71
  call   <__stack_chk_fail@plt>
L71:
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: label: D13
type_guessed: f32
name: read_data
arguments: label: D2
type_guessed: f32

tool: D13: 2

tool: D2: 1

assistant: ```c
float dot_product(int num_elems) {
  float a[num_elems];
  float b[num_elems];
  float init = 2.0;
  int i = 0;
  while (i < num_elems) {
    a[i] = init;
    b[i] = 2.0;
    init = init + 1.0;
    i = i + 1;
  }
  float res = 0.0;
  i = 0;
  while (i < num_elems) {
    res = res + (a[i] * b[i]);
    i = i + 1;
  }
  return res;
}
```