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

```asm
<cdflib_cdfnor>:
  endbr64
  push   %r15
  push   %r14
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    0x60(%rsp),%r14
  mov    0x68(%rsp),%r15
  movq   $0x0,(%r15)
  movl   $0x0,(%r14)
  mov    (%rdi),%eax
  lea    -0x1(%rax),%edx
  cmp    $0x3,%edx
  jbe    L166
  movsd  D63(%rip),%xmm0
  test   %eax,%eax
  jle    L68
L123:
  movsd  %xmm0,(%r15)
  movl   $0xffffffff,(%r14)
L6:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L212
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L68:
  movsd  D0(%rip),%xmm0
  jmp    L123
  nopw   0x0(%rax,%rax,1)
L166:
  mov    %rsi,%rbp
  cmp    $0x1,%eax
  je     L119
  movsd  (%rsi),%xmm0
  pxor   %xmm5,%xmm5
  comisd %xmm0,%xmm5
  jae    L45
  movsd  D0(%rip),%xmm2
  comisd %xmm2,%xmm0
  movapd %xmm2,%xmm1
  jbe    L122
L243:
  movsd  %xmm1,(%r15)
  movl   $0xfffffffe,(%r14)
  jmp    L6
  nopw   0x0(%rax,%rax,1)
L45:
  pxor   %xmm1,%xmm1
  jmp    L243
  cs nopw 0x0(%rax,%rax,1)
L122:
  movsd  (%r12),%xmm1
  pxor   %xmm6,%xmm6
  comisd %xmm1,%xmm6
  jae    L252
  comisd %xmm2,%xmm1
  movapd %xmm2,%xmm3
  jbe    L49
L134:
  movsd  %xmm3,(%r15)
  movl   $0xfffffffd,(%r14)
  jmp    L6
  nop
L49:
  addsd  %xmm0,%xmm1
  mov    %rdi,%rbx
  mov    $0x1,%edi
  mov    %r9,0x18(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %rcx,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <dpmpar@plt>
  movsd  (%rsp),%xmm1
  mov    0x8(%rsp),%rcx
  movsd  D65(%rip),%xmm4
  mulsd  D46(%rip),%xmm0
  movapd %xmm1,%xmm3
  mov    0x10(%rsp),%r8
  mov    0x18(%rsp),%r9
  subsd  %xmm4,%xmm3
  subsd  %xmm4,%xmm3
  andpd  D16(%rip),%xmm3
  comisd %xmm0,%xmm3
  jbe    L73
  pxor   %xmm7,%xmm7
  mov    D0(%rip),%rax
  cmpltsd %xmm7,%xmm1
  movq   %rax,%xmm2
  movapd %xmm1,%xmm0
  andnpd %xmm2,%xmm0
  movsd  %xmm0,(%r15)
  movl   $0x3,(%r14)
  jmp    L6
  nopl   0x0(%rax)
L252:
  pxor   %xmm3,%xmm3
  jmp    L134
  nopl   0x0(%rax)
L119:
  movsd  (%r9),%xmm0
  pxor   %xmm7,%xmm7
  comisd %xmm0,%xmm7
  jb     L120
L88:
  movq   $0x0,(%r15)
  movl   $0xfffffffa,(%r14)
  jmp    L6
L73:
  mov    (%rbx),%eax
  cmp    $0x4,%eax
  jne    L210
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %r9,0x10(%rsp)
  mov    %r8,0x8(%rsp)
  mov    %rcx,(%rsp)
  call   <cdflib_dinvnr@plt>
  mov    (%rsp),%rcx
  mov    0x8(%rsp),%r8
  movapd %xmm0,%xmm1
  mov    0x10(%rsp),%r9
  movsd  (%rcx),%xmm0
  subsd  (%r8),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r9)
  jmp    L6
L120:
  movsd  (%rcx),%xmm1
  subsd  (%r8),%xmm1
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    0x20(%rsp),%rdi
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x20(%rsp)
  call   <cdflib_cumnor@plt>
  jmp    L6
L212:
  call   <__stack_chk_fail@plt>
L210:
  movsd  (%r9),%xmm0
  pxor   %xmm7,%xmm7
  comisd %xmm0,%xmm7
  jae    L88
  cmp    $0x1,%eax
  je     L120
  cmp    $0x2,%eax
  je     L69
  cmp    $0x3,%eax
  jne    L6
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %r9,0x10(%rsp)
  mov    %r8,0x8(%rsp)
  mov    %rcx,(%rsp)
  call   <cdflib_dinvnr@plt>
  mov    0x10(%rsp),%r9
  mov    (%rsp),%rcx
  movapd %xmm0,%xmm1
  mov    0x8(%rsp),%r8
  mulsd  (%r9),%xmm1
  movsd  (%rcx),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%r8)
  jmp    L6
L69:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %r9,0x10(%rsp)
  mov    %r8,0x8(%rsp)
  mov    %rcx,(%rsp)
  call   <cdflib_dinvnr@plt>
  mov    0x10(%rsp),%r9
  mov    0x8(%rsp),%r8
  mov    (%rsp),%rcx
  mulsd  (%r9),%xmm0
  addsd  (%r8),%xmm0
  movsd  %xmm0,(%rcx)
  jmp    L6
```

tool_calls: name: read_data
arguments: data_label: D63
type_guessed: f64
name: read_data
arguments: data_label: D0
type_guessed: f64
name: read_data
arguments: data_label: D65
type_guessed: f64
name: read_data
arguments: data_label: D46
type_guessed: f64
name: read_data
arguments: data_label: D16
type_guessed: qword[2]

tool: D63: 4

tool: D0: 1

tool: D65: 0.5

tool: D46: 3

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

assistant: ```c
void cdflib_cdfnor(const int *which, double *p, double *q, double *x, double *mean, double *sd, int *status, double *bound) {
  static const int K1 = 1;
  double z, pq;
  *status = 0;
  *bound = 0.0;
  *status = 0;
  if (!(*which < 1 || *which > 4)) {
    goto S30;
  }
  if (!(*which < 1)) {
    goto S10;
  }
  *bound = 1.0e0;
  goto S20;
S10:
  *bound = 4.0e0;
S20:
  *status = -1;
  return;
S30:
  if (*which == 1) {
    goto S70;
  }
  if (!(*p <= 0.0e0 || *p > 1.0e0)) {
    goto S60;
  }
  if (!(*p <= 0.0e0)) {
    goto S40;
  }
  *bound = 0.0e0;
  goto S50;
S40:
  *bound = 1.0e0;
S50:
  *status = -2;
  return;
S70:
S60:
  if (*which == 1) {
    goto S110;
  }
  if (!(*q <= 0.0e0 || *q > 1.0e0)) {
    goto S100;
  }
  if (!(*q <= 0.0e0)) {
    goto S80;
  }
  *bound = 0.0e0;
  goto S90;
S80:
  *bound = 1.0e0;
S90:
  *status = -3;
  return;
S110:
S100:
  if (*which == 1) {
    goto S150;
  }
  pq = *p + *q;
  if (!(fabs(pq - 0.5e0 - 0.5e0) > 3.0e0 * dpmpar(K1))) {
    goto S140;
  }
  if (!(pq < 0.0e0)) {
    goto S120;
  }
  *bound = 0.0e0;
  goto S130;
S120:
  *bound = 1.0e0;
S130:
  *status = 3;
  return;
S150:
S140:
  if (*which == 4) {
    goto S170;
  }
  if (!(*sd <= 0.0e0)) {
    goto S160;
  }
  *bound = 0.0e0;
  *status = -6;
  return;
S170:
S160:
  if (1 == *which) {
    z = (*x - *mean) / *sd;
    cdflib_cumnor(&z, p, q);
  } else if (2 == *which) {
    z = cdflib_dinvnr(p, q);
    *x = *sd * z + *mean;
  } else if (3 == *which) {
    z = cdflib_dinvnr(p, q);
    *mean = *x - *sd * z;
  } else if (4 == *which) {
    z = cdflib_dinvnr(p, q);
    *sd = (*x - *mean) / z;
  }
  return;
}
```