user: Translate the below assembly code into C programming language:

```asm
<interpret_xsq>:
  endbr64
  push   %r14
  movapd %xmm0,%xmm6
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  movsd  %xmm0,0x28(%rsp)
  movsd  D76(%rip),%xmm0
  movsd  %xmm2,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  comisd %xmm1,%xmm0
  ja     L288
  pxor   %xmm7,%xmm7
  comisd %xmm6,%xmm7
  ja     L288
  movsd  D115(%rip),%xmm6
  comisd %xmm2,%xmm6
  ja     L288
  pxor   %xmm7,%xmm7
  ucomisd %xmm1,%xmm7
  ja     L124
  movapd %xmm1,%xmm3
  sqrtsd %xmm3,%xmm3
L109:
  mulsd  D253(%rip),%xmm3
  movsd  D4(%rip),%xmm2
  movsd  D398(%rip),%xmm6
  movapd %xmm3,%xmm0
  andpd  %xmm2,%xmm0
  ucomisd %xmm0,%xmm6
  ja     L125
L89:
  movapd %xmm1,%xmm7
  mov    $0x1f4,%ebx
  lea    0x34(%rsp),%rbp
  mulsd  %xmm1,%xmm7
  movq   %xmm7,%r14
  jmp    L206
  nopw   0x0(%rax,%rax,1)
L195:
  mulsd  D5(%rip),%xmm3
  movsd  D4(%rip),%xmm2
  movsd  D398(%rip),%xmm6
  movapd %xmm3,%xmm0
  andpd  %xmm2,%xmm0
  ucomisd %xmm0,%xmm6
  jbe    L48
  cvttsd2si %xmm3,%rax
  pxor   %xmm0,%xmm0
  movapd %xmm3,%xmm4
  movsd  D115(%rip),%xmm6
  andnpd %xmm3,%xmm2
  cvtsi2sd %rax,%xmm0
  cmpnlesd %xmm0,%xmm4
  andpd  %xmm6,%xmm4
  addsd  %xmm4,%xmm0
  movapd %xmm0,%xmm3
  orpd   %xmm2,%xmm3
L48:
  sub    $0x1,%ebx
  je     L181
L206:
  movapd %xmm3,%xmm2
  movq   %r14,%xmm4
  movapd %xmm1,%xmm0
  mov    %rbp,%rdi
  maxsd  %xmm1,%xmm2
  subsd  %xmm3,%xmm0
  mulsd  D388(%rip),%xmm2
  mov    $0x3,%eax
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  divsd  %xmm2,%xmm4
  movapd %xmm3,%xmm2
  maxsd  %xmm4,%xmm0
  call   <xsq_to_stddev@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm3
  cmp    $0xffffffff,%eax
  jge    L195
L181:
  pxor   %xmm7,%xmm7
  ucomisd %xmm1,%xmm7
  ja     L40
  movapd %xmm1,%xmm2
  sqrtsd %xmm2,%xmm2
L297:
  mulsd  D134(%rip),%xmm2
  movsd  D4(%rip),%xmm4
  movsd  D398(%rip),%xmm6
  movapd %xmm2,%xmm0
  andpd  %xmm4,%xmm0
  ucomisd %xmm0,%xmm6
  ja     L182
L191:
  mov    $0x1f4,%ebx
  jmp    L234
  nopl   0x0(%rax)
L250:
  mulsd  D5(%rip),%xmm2
  movsd  D4(%rip),%xmm4
  movsd  D398(%rip),%xmm7
  movapd %xmm2,%xmm0
  andpd  %xmm4,%xmm0
  ucomisd %xmm0,%xmm7
  jbe    L320
  cvttsd2si %xmm2,%rax
  pxor   %xmm0,%xmm0
  movapd %xmm2,%xmm5
  movsd  D115(%rip),%xmm7
  andnpd %xmm2,%xmm4
  cvtsi2sd %rax,%xmm0
  cmpnlesd %xmm0,%xmm5
  andpd  %xmm7,%xmm5
  addsd  %xmm5,%xmm0
  movapd %xmm0,%xmm2
  orpd   %xmm4,%xmm2
L320:
  sub    $0x1,%ebx
  je     L196
L234:
  movapd %xmm2,%xmm4
  movq   %r14,%xmm5
  movapd %xmm1,%xmm0
  mov    %rbp,%rdi
  maxsd  %xmm1,%xmm4
  subsd  %xmm2,%xmm0
  mulsd  D388(%rip),%xmm4
  mov    $0x3,%eax
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  divsd  %xmm4,%xmm5
  maxsd  %xmm5,%xmm0
  call   <xsq_to_stddev@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  cmp    $0xfffffffc,%eax
  movsd  0x18(%rsp),%xmm3
  jge    L250
L196:
  comisd 0x20(%rsp),%xmm3
  ja     L75
  comisd 0x20(%rsp),%xmm2
  ja     L12
L311:
  lea    D392(%rip),%rdi
  xor    %eax,%eax
  movsd  %xmm1,0x8(%rsp)
  call   <printf@plt>
  movsd  0x28(%rsp),%xmm0
  mov    $0x1,%eax
  call   <print2digits@plt>
  lea    D131(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm1
  mov    $0x1,%eax
  movapd %xmm1,%xmm0
  call   <print2digits@plt>
  lea    D68(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x34(%rsp),%edx
  lea    D28(%rip),%rax
  lea    D251(%rip),%rdi
  test   %edx,%edx
  cmove  %rax,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsd  0x20(%rsp),%xmm2
  mov    %rbp,%rdi
  mov    $0x3,%eax
  movsd  0x8(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm0
  call   <xsq_to_stddev@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    $0x1,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <print2digits@plt>
  movsd  0x8(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D279(%rip),%rdi
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
  andpd  D4(%rip),%xmm0
  comisd D421(%rip),%xmm0
  ja     L96
  comisd D344(%rip),%xmm0
  ja     L24
  comisd D232(%rip),%xmm0
  ja     L230
  xor    %eax,%eax
  lea    D322(%rip),%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <printf@plt>
  mov    0x34(%rsp),%eax
  movsd  0x8(%rsp),%xmm0
  test   %eax,%eax
  je     L238
L261:
  comisd D92(%rip),%xmm0
  jbe    L140
  lea    D296(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L280
  nopl   (%rax)
L182:
  cvttsd2si %xmm2,%rax
  pxor   %xmm0,%xmm0
  movapd %xmm2,%xmm5
  movsd  D115(%rip),%xmm7
  andnpd %xmm2,%xmm4
  cvtsi2sd %rax,%xmm0
  cmpnlesd %xmm0,%xmm5
  andpd  %xmm7,%xmm5
  addsd  %xmm5,%xmm0
  movapd %xmm0,%xmm2
  orpd   %xmm4,%xmm2
  jmp    L191
L125:
  cvttsd2si %xmm3,%rax
  pxor   %xmm0,%xmm0
  movapd %xmm3,%xmm4
  movsd  D115(%rip),%xmm7
  andnpd %xmm3,%xmm2
  cvtsi2sd %rax,%xmm0
  cmpnlesd %xmm0,%xmm4
  andpd  %xmm7,%xmm4
  addsd  %xmm4,%xmm0
  movapd %xmm0,%xmm3
  orpd   %xmm2,%xmm3
  jmp    L89
  nopl   0x0(%rax,%rax,1)
L96:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D102(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
L280:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L309
  add    $0x40,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  ret
  nopl   (%rax)
L12:
  lea    D305(%rip),%rdi
  xor    %eax,%eax
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm2
  mov    $0x1,%eax
  movapd %xmm2,%xmm0
  call   <print2digits@plt>
  lea    D331(%rip),%rdi
  call   <puts@plt>
  lea    D42(%rip),%rdi
  call   <puts@plt>
  movsd  0x10(%rsp),%xmm1
  jmp    L311
  nopl   0x0(%rax)
L75:
  lea    D62(%rip),%rdi
  xor    %eax,%eax
  movsd  %xmm3,0x8(%rsp)
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm3
  mov    $0x1,%eax
  movapd %xmm3,%xmm0
  call   <print2digits@plt>
  lea    D377(%rip),%rdi
  call   <puts@plt>
  jmp    L280
  nopl   0x0(%rax)
L230:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D275(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L280
  nopl   (%rax)
L24:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D309(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L280
L140:
  lea    D149(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L280
L238:
  lea    D158(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
  jmp    L261
L288:
  movsd  0x20(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm0
  mov    $0x3,%eax
  lea    D187(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L309:
  call   <__stack_chk_fail@plt>
L124:
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm1
  movapd %xmm0,%xmm3
  jmp    L109
L40:
  movapd %xmm1,%xmm0
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm1
  movapd %xmm0,%xmm2
  jmp    L297
```

tool_calls: name: retrieve_data
arguments: tag: D76
type_infered: f64
name: retrieve_data
arguments: tag: D115
type_infered: f64
name: retrieve_data
arguments: tag: D253
type_infered: f64
name: retrieve_data
arguments: tag: D4
type_infered: qword[2]
name: retrieve_data
arguments: tag: D398
type_infered: f32[2]
name: retrieve_data
arguments: tag: D5
type_infered: f64
name: retrieve_data
arguments: tag: D388
type_infered: f32[2]
name: retrieve_data
arguments: tag: D134
type_infered: f64
name: retrieve_data
arguments: tag: D392
type_infered: string
name: retrieve_data
arguments: tag: D131
type_infered: string
name: retrieve_data
arguments: tag: D68
type_infered: string
name: retrieve_data
arguments: tag: D28
type_infered: string
name: retrieve_data
arguments: tag: D251
type_infered: string
name: retrieve_data
arguments: tag: D279
type_infered: string
name: retrieve_data
arguments: tag: D421
type_infered: f64[2]
name: retrieve_data
arguments: tag: D344
type_infered: f64[2]
name: retrieve_data
arguments: tag: D232
type_infered: f64[2]
name: retrieve_data
arguments: tag: D322
type_infered: string
name: retrieve_data
arguments: tag: D92
type_infered: f64[2]
name: retrieve_data
arguments: tag: D296
type_infered: string
name: retrieve_data
arguments: tag: D102
type_infered: string
name: retrieve_data
arguments: tag: D305
type_infered: string
name: retrieve_data
arguments: tag: D331
type_infered: string
name: retrieve_data
arguments: tag: D42
type_infered: string
name: retrieve_data
arguments: tag: D62
type_infered: string
name: retrieve_data
arguments: tag: D377
type_infered: string
name: retrieve_data
arguments: tag: D275
type_infered: string
name: retrieve_data
arguments: tag: D309
type_infered: string
name: retrieve_data
arguments: tag: D149
type_infered: string
name: retrieve_data
arguments: tag: D158
type_infered: string
name: retrieve_data
arguments: tag: D187
type_infered: string

tool: D76: 2

tool: D115: 1

tool: D253: 3

tool: {"D4": [0x7fffffffffffffff,0x0000000000000000]}

tool: {"D398": [0.0,176.0]}

tool: D5: 1.1

tool: {"D388": [0.0,2.25]}

tool: D134: 7

tool: D392:   X^2 = 

tool: D131: , k = 

tool: D68: , equivalent normal standard deviation 

tool: D28: ~ 

tool: D251: = 

tool: D279: 


tool: {"D421": [6.1,4.9]}

tool: {"D344": [4.9,2.6]}

tool: {"D232": [2.6,1.645]}

tool: D322:   This message should appear 

tool: {"D92": [1.645,0.0]}

tool: D296: 10%% of the time.


tool: D102:   THIS RNG IS FAULTY!  Confidence level p > 1-1.0e-9

tool: D305:   Note: at least 

tool: D331:  random generates are needed

tool: D42:     for a two-tailed test with confidence p > 1-1.0e-6

tool: D62:   This test requires 

tool: D377:  or more random generates.

tool: D275:   This rng may be faulty.  Confidence level p > 1-1.0e-3

tool: D309:   This rng is faulty!  Confidence level p > 1-1.0e-6

tool: D149: 90%% of the time.


tool: D158: about 

tool: D187: Argument error in interpret_xsq(%f,%f,%f)!


assistant: ```c
extern void interpret_xsq(xsq, k, n) double xsq, k, n;
{
  double stddev;
  int i;
  int robust;
  int accurate;
  double nrobust, ngiveup;
  double smallxsq;
  if (k < 2.0 || xsq < 0.0 || n < 1.0) {
    printf("Argument error in interpret_xsq(%f,%f,%f)!\n", xsq, k, n);
    exit(1);
  }
  ngiveup = ceil(3.0 * sqrt(k));
  for (i = 0; i < 500; i++) {
    smallxsq = (((k - ngiveup) > (k * k / (4 * (((ngiveup) > (k)) ? (ngiveup) : (k))))) ? (k - ngiveup) : (k * k / (4 * (((ngiveup) > (k)) ? (ngiveup) : (k)))));
    if (xsq_to_stddev(smallxsq, k, ngiveup, &accurate) < -1.645)
      break;
    ngiveup = ceil(ngiveup * 1.1);
  }
  nrobust = ceil(7.0 * sqrt(k));
  for (i = 0; i < 500; i++) {
    smallxsq = (((k - nrobust) > (k * k / (4 * (((nrobust) > (k)) ? (nrobust) : (k))))) ? (k - nrobust) : (k * k / (4 * (((nrobust) > (k)) ? (nrobust) : (k)))));
    if (xsq_to_stddev(smallxsq, k, nrobust, &accurate) < -4.892)
      break;
    nrobust = ceil(nrobust * 1.1);
  }
  if (n < ngiveup) {
    printf("  This test requires ");
    print2digits(ngiveup);
    printf(" or more random generates.\n");
    return;
  }
  if (n < nrobust) {
    printf("  Note: at least ");
    print2digits(nrobust);
    printf(" random generates are needed\n");
    printf("    for a two-tailed test with confidence p > 1-1.0e-6\n");
  };
  printf("  X^2 = ");
  print2digits(xsq);
  printf(", k = ");
  print2digits(k);
  printf(", equivalent normal standard deviation ");
  printf(accurate ? "= " : "~ ");
  stddev = xsq_to_stddev(xsq, k, n, &accurate);
  print2digits(stddev);
  printf("\n", stddev);
  if (fabs(stddev) > 6.1) {
    printf("\n");
    printf("  THIS RNG IS FAULTY!  Confidence level p > 1-1.0e-9\n");
    printf("\n");
  } else if (fabs(stddev) > 4.9) {
    printf("\n");
    printf("  This rng is faulty!  Confidence level p > 1-1.0e-6\n");
    printf("\n");
  } else if (fabs(stddev) > 2.6) {
    printf("\n");
    printf("  This rng may be faulty.  Confidence level p > 1-1.0e-3\n");
    printf("\n");
  } else {
    printf("  This message should appear ");
    if (!accurate) {
      printf("about ");
    }
    if (fabs(stddev) > 1.645) {
      printf("10%% of the time.\n");
    } else {
      printf("90%% of the time.\n");
    }
  }
}
```