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

```asm
<box_checksol>:
  endbr64
  push   %r12
  movapd %xmm1,%xmm2
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  lea    D162(%rip),%rdi
  sub    $0x10,%rsp
  movsd  %xmm1,0x8(%rsp)
  pxor   %xmm1,%xmm1
  call   <gsl_test_rel@plt>
  movsd  0x10(%rbx),%xmm0
  movsd  D6(%rip),%xmm3
  movq   D125(%rip),%xmm5
  movsd  D126(%rip),%xmm4
  movapd %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm2
  subsd  %xmm3,%xmm1
  andpd  %xmm5,%xmm1
  comisd %xmm1,%xmm4
  ja     L10
  addsd  %xmm3,%xmm0
  movsd  (%rbx),%xmm6
  mov    %r12,%rdx
  mov    %rbp,%rsi
  andpd  %xmm5,%xmm0
  comisd %xmm0,%xmm4
  ja     L16
  movsd  0x8(%rbx),%xmm1
  movapd %xmm6,%xmm0
  lea    D116(%rip),%rdi
  movsd  %xmm2,0x8(%rsp)
  call   <gsl_test_rel@plt>
  movsd  0x10(%rbx),%xmm0
  mov    %r12,%rdx
  mov    %rbp,%rsi
  movsd  0x8(%rsp),%xmm2
  add    $0x10,%rsp
  lea    D86(%rip),%rdi
  pxor   %xmm1,%xmm1
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    1050 <gsl_test_rel@plt>
  nopl   0x0(%rax)
L16:
  movsd  D106(%rip),%xmm1
  movapd %xmm6,%xmm0
  lea    D52(%rip),%rdi
  movsd  %xmm2,0x8(%rsp)
  call   <gsl_test_rel@plt>
  movsd  0x8(%rbx),%xmm0
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    D6(%rip),%rax
  movsd  0x8(%rsp),%xmm2
  lea    D24(%rip),%rdi
  movq   %rax,%xmm1
  call   <gsl_test_rel@plt>
  movsd  0x10(%rbx),%xmm0
  mov    %r12,%rdx
  mov    %rbp,%rsi
  movsd  0x8(%rsp),%xmm2
  movsd  D40(%rip),%xmm1
  add    $0x10,%rsp
  lea    D86(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    1050 <gsl_test_rel@plt>
  nopl   0x0(%rax)
L10:
  movsd  (%rbx),%xmm0
  mov    %r12,%rdx
  mov    %rbp,%rsi
  movapd %xmm3,%xmm1
  lea    D52(%rip),%rdi
  call   <gsl_test_rel@plt>
  movsd  0x8(%rbx),%xmm0
  mov    %r12,%rdx
  mov    %rbp,%rsi
  movsd  0x8(%rsp),%xmm2
  movsd  D106(%rip),%xmm1
  lea    D24(%rip),%rdi
  call   <gsl_test_rel@plt>
  movsd  0x10(%rbx),%xmm0
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    D6(%rip),%rax
  movsd  0x8(%rsp),%xmm2
  add    $0x10,%rsp
  lea    D86(%rip),%rdi
  pop    %rbx
  pop    %rbp
  movq   %rax,%xmm1
  pop    %r12
  jmp    1050 <gsl_test_rel@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D162
datatype: string
name: disassemble_data
arguments: data_label: D6
datatype: f64
name: disassemble_data
arguments: data_label: D125
datatype: qword
name: disassemble_data
arguments: data_label: D126
datatype: byte[8]
name: disassemble_data
arguments: data_label: D116
datatype: string
name: disassemble_data
arguments: data_label: D86
datatype: string
name: disassemble_data
arguments: data_label: D106
datatype: f64
name: disassemble_data
arguments: data_label: D52
datatype: string
name: disassemble_data
arguments: data_label: D24
datatype: string
name: disassemble_data
arguments: data_label: D40
datatype: f32[2]

tool: D162: %s/%s sumsq

tool: D6: 1

tool: D125: 9223372036854775807

tool: {"D126": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: D116: %s/%s i=0,1

tool: D86: %s/%s i=2

tool: D106: 10

tool: D52: %s/%s i=0

tool: D24: %s/%s i=1

tool: {"D40": [0.0,-1.875]}

assistant: ```c
void box_checksol(const double x[], const double sumsq, const double epsrel, const char *sname, const char *pname) {
  const double sumsq_exact = 0.0;
  const double eps = 1.0e-6;
  gsl_test_rel(sumsq, sumsq_exact, epsrel, "%s/%s sumsq", sname, pname);
  if (fabs(x[2] - 1.0) < eps) {
    gsl_test_rel(x[0], 1.0, epsrel, "%s/%s i=0", sname, pname);
    gsl_test_rel(x[1], 10.0, epsrel, "%s/%s i=1", sname, pname);
    gsl_test_rel(x[2], 1.0, epsrel, "%s/%s i=2", sname, pname);
  } else if (fabs(x[2] + 1.0) < eps) {
    gsl_test_rel(x[0], 10.0, epsrel, "%s/%s i=0", sname, pname);
    gsl_test_rel(x[1], 1.0, epsrel, "%s/%s i=1", sname, pname);
    gsl_test_rel(x[2], -1.0, epsrel, "%s/%s i=2", sname, pname);
  } else {
    gsl_test_rel(x[0], x[1], epsrel, "%s/%s i=0,1", sname, pname);
    gsl_test_rel(x[2], 0.0, epsrel, "%s/%s i=2", sname, pname);
  }
}
```