user: Please show me the C implementation that matches the assembly code listed below:

```asm
<alnorm>:
  endbr64
  push   %rbx
  movapd %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  mov    %edi,%ebx
  sub    $0x10,%rsp
  comisd %xmm1,%xmm0
  jbe    L37
  mov    $0x1,%eax
  xorpd  D234(%rip),%xmm1
  sub    %edi,%eax
  mov    %eax,%ebx
L37:
  movsd  D39(%rip),%xmm2
  comisd %xmm1,%xmm2
  jae    L7
  cmp    $0x1,%ebx
  je     L29
L36:
  test   %ebx,%ebx
  jne    L39
  movsd  D209(%rip),%xmm1
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
L39:
  add    $0x10,%rsp
  pop    %rbx
  ret
  nopw   0x0(%rax,%rax,1)
L29:
  movsd  D157(%rip),%xmm2
  comisd %xmm1,%xmm2
  jb     L39
  xchg   %ax,%ax
L7:
  movsd  D242(%rip),%xmm2
  movapd %xmm1,%xmm0
  movsd  D195(%rip),%xmm3
  mulsd  %xmm2,%xmm0
  comisd %xmm1,%xmm3
  mulsd  %xmm1,%xmm0
  jb     L67
  movsd  D25(%rip),%xmm6
  movsd  D99(%rip),%xmm3
  movsd  D154(%rip),%xmm4
  movsd  D7(%rip),%xmm5
  addsd  %xmm0,%xmm6
  mulsd  %xmm0,%xmm4
  addsd  %xmm0,%xmm5
  addsd  D212(%rip),%xmm0
  divsd  %xmm6,%xmm3
  addsd  %xmm3,%xmm0
  movsd  D62(%rip),%xmm3
  divsd  %xmm0,%xmm3
  movsd  D106(%rip),%xmm0
  subsd  %xmm3,%xmm5
  divsd  %xmm5,%xmm4
  subsd  %xmm4,%xmm0
  mulsd  %xmm0,%xmm1
  subsd  %xmm1,%xmm2
  movapd %xmm2,%xmm0
  jmp    L36
  nop
L67:
  xorpd  D234(%rip),%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  D75(%rip),%xmm4
  movsd  D40(%rip),%xmm2
  movsd  D56(%rip),%xmm3
  addsd  %xmm1,%xmm4
  mulsd  D41(%rip),%xmm0
  addsd  %xmm1,%xmm3
  divsd  %xmm4,%xmm2
  movsd  D16(%rip),%xmm4
  addsd  %xmm1,%xmm4
  addsd  %xmm4,%xmm2
  movsd  D82(%rip),%xmm4
  divsd  %xmm2,%xmm4
  movsd  D42(%rip),%xmm2
  subsd  %xmm4,%xmm3
  divsd  %xmm3,%xmm2
  movapd %xmm1,%xmm3
  subsd  D253(%rip),%xmm3
  addsd  %xmm3,%xmm2
  movsd  D124(%rip),%xmm3
  divsd  %xmm2,%xmm3
  movsd  D162(%rip),%xmm2
  addsd  %xmm1,%xmm2
  subsd  D22(%rip),%xmm1
  addsd  %xmm2,%xmm3
  movsd  D37(%rip),%xmm2
  divsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  jmp    L36
```

tool_calls: name: unpack_data
arguments: data_label: D234
type: f32[4]
name: unpack_data
arguments: data_label: D39
type: f64
name: unpack_data
arguments: data_label: D209
type: f64
name: unpack_data
arguments: data_label: D157
type: f64
name: unpack_data
arguments: data_label: D242
type: f64
name: unpack_data
arguments: data_label: D195
type: f64
name: unpack_data
arguments: data_label: D25
type: f64
name: unpack_data
arguments: data_label: D99
type: f64
name: unpack_data
arguments: data_label: D154
type: f64
name: unpack_data
arguments: data_label: D7
type: f64
name: unpack_data
arguments: data_label: D212
type: f64
name: unpack_data
arguments: data_label: D62
type: f64
name: unpack_data
arguments: data_label: D106
type: f64
name: unpack_data
arguments: data_label: D75
type: f64
name: unpack_data
arguments: data_label: D40
type: f64
name: unpack_data
arguments: data_label: D56
type: f64
name: unpack_data
arguments: data_label: D41
type: f64
name: unpack_data
arguments: data_label: D16
type: f64
name: unpack_data
arguments: data_label: D82
type: f64
name: unpack_data
arguments: data_label: D42
type: f64
name: unpack_data
arguments: data_label: D253
type: f64
name: unpack_data
arguments: data_label: D124
type: f64
name: unpack_data
arguments: data_label: D162
type: byte[8]
name: unpack_data
arguments: data_label: D22
type: byte[8]
name: unpack_data
arguments: data_label: D37
type: f64

tool: {"D234": [0.0,-0.0,0.0,0.0]}

tool: D39: 5

tool: D209: 1

tool: D157: 12.5

tool: D242: 0.5

tool: D195: 1.28

tool: D25: 5.92885724438

tool: D99: 48.6959930692

tool: D154: 0.399903438504

tool: D7: 5.75885480458

tool: D212: 2.62433121679

tool: D62: 29.8213557808

tool: D106: 0.398942280444

tool: D75: 3.99019417011

tool: D40: 30.789933034

tool: D56: 4.8385912808

tool: D41: 0.398942280385

tool: D16: 0.742380924027

tool: D82: 15.1508972451

tool: D42: 5.29330324926

tool: D253: 0.151679116635

tool: D124: 1.98615381364

tool: {"D162": [0x69,0x7b,0x9c,0x45,0x6b,0x16,0x3a,0x3f]}

tool: {"D22": [0x78,0x99,0x0a,0xba,0xd3,0x6d,0x64,0x3e]}

tool: D37: 1.00000615302

assistant: ```c
double alnorm(double x, int upper) {
  int up;
  double ltone, utzero, con, prob, z, y;
  con = 1.28;
  ltone = 5.0;
  utzero = 12.5;
  up = upper;
  z = x;
  if (z < 0.0) {
    up = 1 - up;
    z = -z;
  }
  if (z <= ltone || (up == 1 && z <= utzero)) {
    y = 0.5 * z * z;
    if (z <= con) {
      prob = 0.5 - z * (0.398942280444 - 0.399903438504 * y / (y + 5.75885480458 - 29.8213557808 / (y + 2.62433121679 + 48.6959930692 / (y + 5.92885724438))));
    } else {
      prob = 0.398942280385 * exp(-y) / (z - 3.8052e-8 + 1.00000615302 / (z + 3.98064794e-4 + 1.98615381364 / (z - 0.151679116635 + 5.29330324926 / (z + 4.8385912808 - 15.1508972451 / (z + 0.742380924027 + 30.789933034 / (z + 3.99019417011))))));
    }
  } else {
    prob = 0.0;
  }
  if (up == 0)
    prob = 1.0 - prob;
  return (prob);
}
```