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

```asm
<lm_enorm>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  pxor   %xmm0,%xmm0
  cvtsi2sd %edi,%xmm0
  movsd  D26(%rip),%xmm10
  divsd  %xmm0,%xmm10
  test   %edi,%edi
  jle    L74
  mov    %rsi,%rax
  lea    -0x1(%rdi),%edx
  lea    0x8(%rsi,%rdx,8),%rdx
  mov    D5(%rip),%rbx
  mov    %rbx,0x8(%rsp)
  movq   %rbx,%xmm3
  movq   %rbx,%xmm0
  movq   %rbx,%xmm4
  movq   D71(%rip),%xmm6
  movsd  D93(%rip),%xmm5
  movq   %rbx,%xmm8
  movq   %rbx,%xmm9
  movsd  D99(%rip),%xmm7
  jmp    L120
L93:
  movsd  0x8(%rsp),%xmm12
  comisd %xmm12,%xmm2
  jbe    L20
  movapd %xmm12,%xmm1
  divsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm4
  mulsd  %xmm1,%xmm4
  addsd  D99(%rip),%xmm4
  movsd  %xmm2,0x8(%rsp)
  jmp    L69
L20:
  divsd  0x8(%rsp),%xmm1
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm4
  jmp    L69
L68:
  movq   %rbx,%xmm11
  comisd %xmm11,%xmm2
  jbe    L3
  movq   %rbx,%xmm1
  divsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm3
  mulsd  %xmm1,%xmm3
  addsd  %xmm7,%xmm3
  movq   %xmm2,%rbx
L69:
  add    $0x8,%rax
  cmp    %rdx,%rax
  je     L213
L120:
  movsd  (%rax),%xmm1
  movapd %xmm1,%xmm2
  andpd  %xmm6,%xmm2
  comisd %xmm5,%xmm2
  jbe    L68
  comisd %xmm2,%xmm10
  jbe    L93
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  jmp    L69
L3:
  ucomisd %xmm8,%xmm1
  jp     L54
  ucomisd %xmm9,%xmm1
  je     L69
L54:
  movq   %rbx,%xmm2
  divsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm3
  jmp    L69
L213:
  ucomisd D5(%rip),%xmm4
  jp     L16
  jne    L16
  ucomisd D5(%rip),%xmm0
  jp     L204
  je     L269
L204:
  movq   %rbx,%xmm7
  comisd %xmm7,%xmm0
  jb     L111
  movq   %rbx,%xmm1
  divsd  %xmm0,%xmm1
  movq   %rbx,%xmm2
  mulsd  %xmm3,%xmm2
  mulsd  %xmm2,%xmm1
  addsd  D99(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L165
  sqrtsd %xmm0,%xmm0
L196:
  add    $0x10,%rsp
  pop    %rbx
  ret
L16:
  movsd  0x8(%rsp),%xmm7
  divsd  %xmm7,%xmm0
  divsd  %xmm7,%xmm0
  addsd  %xmm4,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L118
  sqrtsd %xmm0,%xmm0
L199:
  mulsd  0x8(%rsp),%xmm0
  jmp    L196
L118:
  call   <sqrt@plt>
  jmp    L199
L165:
  call   <sqrt@plt>
  jmp    L196
L111:
  divsd  %xmm7,%xmm0
  mulsd  %xmm7,%xmm3
  addsd  %xmm3,%xmm0
  mulsd  %xmm7,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L175
  sqrtsd %xmm0,%xmm0
  jmp    L196
L175:
  call   <sqrt@plt>
  jmp    L196
L269:
  pxor   %xmm0,%xmm0
  ucomisd %xmm3,%xmm0
  jbe    L115
  movapd %xmm3,%xmm0
  call   <sqrt@plt>
  jmp    L104
L74:
  mov    D5(%rip),%rbx
  movq   %rbx,%xmm3
L115:
  sqrtsd %xmm3,%xmm3
  movapd %xmm3,%xmm0
L104:
  movq   %rbx,%xmm7
  mulsd  %xmm0,%xmm7
  movapd %xmm7,%xmm0
  jmp    L196
```

tool_calls: name: parse_data
arguments: tag: D26
type_guessed: f64
name: parse_data
arguments: tag: D5
type_guessed: f64
name: parse_data
arguments: tag: D71
type_guessed: qword
name: parse_data
arguments: tag: D93
type_guessed: byte[8]
name: parse_data
arguments: tag: D99
type_guessed: byte[8]

tool: D26: 1.304e+19

tool: D5: 0

tool: D71: 9223372036854775807

tool: {"D93": [0x29,0x80,0xd9,0xe8,0xc6,0xa1,0xe6,0x3b]}

tool: {"D99": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
double lm_enorm(int n, const double *x) {
  int i;
  double agiant, s1, s2, s3, xabs, x1max, x3max, temp;
  s1 = 0;
  s2 = 0;
  s3 = 0;
  x1max = 0;
  x3max = 0;
  agiant = 1.304e19 / n;
  for (i = 0; i < n; i++) {
    xabs = fabs(x[i]);
    if (xabs > 3.834e-20) {
      if (xabs < agiant) {
        s2 += xabs * xabs;
      } else if (xabs > x1max) {
        temp = x1max / xabs;
        s1 = 1 + s1 * (temp) * (temp);
        x1max = xabs;
      } else {
        temp = xabs / x1max;
        s1 += (temp) * (temp);
      }
    } else if (xabs > x3max) {
      temp = x3max / xabs;
      s3 = 1 + s3 * (temp) * (temp);
      x3max = xabs;
    } else if (xabs != 0.) {
      temp = xabs / x3max;
      s3 += (temp) * (temp);
    }
  }
  if (s1 != 0)
    return x1max * sqrt(s1 + (s2 / x1max) / x1max);
  else if (s2 != 0)
    if (s2 >= x3max)
      return sqrt(s2 * (1 + (x3max / s2) * (x3max * s3)));
    else
      return sqrt(x3max * ((s2 / x3max) + (x3max * s3)));
  else
    return x3max * sqrt(s3);
}
```