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

```asm
<stopcheck_mt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %edi,-0x3c(%rbp)
  mov    %rsi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  movsd  %xmm1,-0x68(%rbp)
  movsd  %xmm2,-0x70(%rbp)
  movsd  %xmm3,-0x78(%rbp)
  mov    %r9d,-0x40(%rbp)
  movl   $0x0,-0x28(%rbp)
  cmpl   $0x3,-0x40(%rbp)
  jne    L76
  movl   $0x4,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  jmp    L103
L76:
  cmpl   $0xf,-0x40(%rbp)
  jne    L11
  movl   $0xf,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  jmp    L103
L11:
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  -0x68(%rbp),%xmm1
  movq   D174(%rip),%xmm2
  andpd  %xmm2,%xmm1
  comisd %xmm1,%xmm0
  jbe    L168
  movsd  -0x38(%rbp),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L149
L168:
  movsd  -0x68(%rbp),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L149:
  movl   $0x0,-0x24(%rbp)
  jmp    L39
L36:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movq   D174(%rip),%xmm2
  andpd  %xmm1,%xmm2
  movsd  D35(%rip),%xmm1
  divsd  %xmm2,%xmm1
  comisd %xmm1,%xmm0
  jbe    L54
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L0
L54:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D35(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
L0:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x24(%rbp)
L39:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L36
  mov    -0x3c(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <array_max_abs@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x70(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L135
  movl   $0x1,-0x28(%rbp)
  jmp    L88
L135:
  movl   $0x0,-0x24(%rbp)
  jmp    L155
L129:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movq   D174(%rip),%xmm2
  andpd  %xmm1,%xmm2
  movsd  D35(%rip),%xmm1
  divsd  %xmm2,%xmm1
  comisd %xmm1,%xmm0
  jbe    L143
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L38
L143:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D35(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L38:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   D174(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x20(%rbp),%xmm0
  divsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x24(%rbp)
L155:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L129
  mov    -0x3c(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <array_max_abs@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x78(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L88
  movl   $0x2,-0x28(%rbp)
L88:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%eax
L103:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D174
datatype: qword
name: extract_symbolic_data
arguments: data_tag: D35
datatype: f64

tool: D174: 9223372036854775807

tool: D35: 1

assistant: ```c
int stopcheck_mt(double fx, int N, double *xc, double *xf, double *jac, double *dx, double fsval, double gtol, double stol, int retval) {
  int rcode, i;
  double num, den;
  double stop0;
  double *scheck;
  rcode = 0;
  if (retval == 3) {
    rcode = 4;
    return rcode;
  }
  if (retval == 15) {
    rcode = 15;
    return rcode;
  }
  scheck = (double *)malloc(sizeof(double) * N);
  if (fabs(fx) > fabs(fsval)) {
    den = fabs(fx);
  } else {
    den = fabs(fsval);
  }
  for (i = 0; i < N; ++i) {
    if (fabs(xf[i]) > 1.0 / fabs(dx[i])) {
      num = fabs(xf[i]);
    } else {
      num = 1.0 / fabs(dx[i]);
    }
    scheck[i] = fabs(jac[i]) * num / den;
  }
  stop0 = array_max_abs(scheck, N);
  if (stop0 <= gtol) {
    rcode = 1;
  } else {
    for (i = 0; i < N; ++i) {
      if (fabs(xf[i]) > 1.0 / fabs(dx[i])) {
        den = fabs(xf[i]);
      } else {
        den = 1.0 / fabs(dx[i]);
      }
      num = fabs(xf[i] - xc[i]);
      scheck[i] = num / den;
    }
    stop0 = array_max_abs(scheck, N);
    if (stop0 <= stol) {
      rcode = 2;
    }
  }
  free(scheck);
  return rcode;
}
```