user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<calculoCoeficienteLinear>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,-0x5c(%rbp)
  mov    %rsp,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %edi,%rax
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rsi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rsi
  and    $0xfffffffffffffff0,%rdx
  sub    %rsi,%rcx
  cmp    %rcx,%rsp
  je     L100
L108:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L108
L100:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L70
L68:
  mov    %rax,%rdx
  mov    %rsp,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,-0x58(%rbp)
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L105
L72:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L72
L105:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L42
L23:
  mov    %rsp,%rbx
  lea    D6(%rip),%rsi
  movsd  %xmm2,-0x50(%rbp)
  lea    D18(%rip),%rdi
  movsd  %xmm0,-0x48(%rbp)
  mov    %rbx,-0x68(%rbp)
  call   <fopen@plt>
  movsd  -0x48(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm2
  mov    %rax,%r15
  mov    -0x5c(%rbp),%eax
  cmp    $0x1,%eax
  jle    L104
  mov    -0x58(%rbp),%rcx
  sub    $0x2,%eax
  pxor   %xmm1,%xmm1
  lea    0x8(%rbx),%r14
  movapd %xmm1,%xmm0
  lea    D19(%rip),%rbx
  lea    0x8(%rcx),%r12
  lea    0x10(%rcx,%rax,8),%r13
  nopl   0x0(%rax,%rax,1)
L75:
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  movsd  %xmm1,-0x50(%rbp)
  movsd  %xmm0,-0x48(%rbp)
  add    $0x8,%r12
  call   <fscanf@plt>
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <fscanf@plt>
  movsd  -0x48(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  add    $0x8,%r14
  addsd  -0x8(%r12),%xmm0
  addsd  -0x8(%r14),%xmm1
  cmp    %r12,%r13
  jne    L75
  mov    -0x5c(%rbp),%r12d
  pxor   %xmm5,%xmm5
  mov    -0x58(%rbp),%rax
  cvtsi2sd %r12d,%xmm5
  sub    $0x1,%r12d
  movslq %r12d,%r12
  movsd  (%rax,%r12,8),%xmm2
  mov    -0x68(%rbp),%rax
  divsd  %xmm5,%xmm0
  movsd  (%rax,%r12,8),%xmm4
  movapd %xmm4,%xmm3
  divsd  %xmm5,%xmm1
  subsd  %xmm0,%xmm3
  mulsd  %xmm2,%xmm3
  movapd %xmm3,%xmm0
  subsd  %xmm1,%xmm2
  mulsd  %xmm4,%xmm2
L104:
  divsd  %xmm2,%xmm0
  mov    %r15,%rdi
  movsd  %xmm0,-0x48(%rbp)
  call   <fclose@plt>
  movsd  -0x48(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L26
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L70:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L68
L42:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L23
L26:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
datatype: string
name: extract_symbolic_data
arguments: label: D18
datatype: string
name: extract_symbolic_data
arguments: label: D19
datatype: string

tool: D6: rt

tool: D18: dadosMinimosQuadrados.txt

tool: D19: %lf

assistant: ```c
double calculoCoeficienteLinear(int quantidadeVelas) {
  FILE *arquivo;
  double x[quantidadeVelas], y[quantidadeVelas];
  double soma_x = 0, soma_y = 0;
  double numerador, denominador;
  double variacaoLinear;
  int i;
  arquivo = fopen("dadosMinimosQuadrados.txt", "rt");
  for (i = 1; i < quantidadeVelas; i++) {
    fscanf(arquivo, "%lf", &x[i]);
    fscanf(arquivo, "%lf", &y[i]);
    soma_x = soma_x + x[i];
    soma_y = soma_y + y[i];
  }
  for (i = 1; i < quantidadeVelas; i++) {
    numerador = x[i] * (y[i] - soma_x / quantidadeVelas);
    denominador = y[i] * (x[i] - soma_y / quantidadeVelas);
  }
  variacaoLinear = numerador / denominador;
  fclose(arquivo);
  return variacaoLinear;
}
```