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

```asm
<orthes>:
  endbr64
  push   %r15
  lea    -0x1(%rdi),%r15d
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %edi,0x14(%rsp)
  cmp    $0x1,%r15d
  jle    L140
  lea    0x10(%rcx),%rax
  cmp    $0x1,%edi
  jle    L418
  mov    %rax,0x8(%rsp)
  mov    %r15d,%eax
  pxor   %xmm4,%xmm4
  movq   D47(%rip),%xmm3
  lea    0x8(%rsi,%rax,8),%rax
  mov    %r15d,0x18(%rsp)
  movq   D41(%rip),%xmm7
  mov    %rax,0x60(%rsp)
  movslq %edi,%rax
  lea    -0x10(,%rax,8),%rax
  mov    %rdx,0x88(%rsp)
  mov    %rax,0x68(%rsp)
  lea    (%rcx,%rax,1),%r10
  movq   $0x8,0x20(%rsp)
  movq   $0x1,0x40(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L470:
  mov    0x40(%rsp),%rax
  mov    0x20(%rsp),%rsi
  movapd %xmm4,%xmm5
  mov    %eax,%r8d
  mov    %eax,%edi
  lea    -0x8(%rsi),%r14
  nopw   0x0(%rax,%rax,1)
L582:
  mov    0x0(%r13,%rax,8),%rdx
  add    $0x1,%rax
  movsd  (%rdx,%r14,1),%xmm0
  andpd  %xmm3,%xmm0
  addsd  %xmm0,%xmm5
  cmp    %eax,%r15d
  jge    L582
  ucomisd %xmm4,%xmm5
  jp     L286
  jne    L286
L136:
  subl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  addq   $0x1,0x40(%rsp)
  addq   $0x8,0x20(%rsp)
  addq   $0x8,0x8(%rsp)
  cmp    $0x1,%eax
  jne    L470
  mov    0x88(%rsp),%r12
L140:
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L36
  movsd  D57(%rip),%xmm0
  movslq %eax,%rcx
  xor    %edx,%edx
  nopl   0x0(%rax)
L96:
  mov    (%r12,%rdx,8),%rsi
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L280:
  cmp    %eax,%edx
  je     L495
  movq   $0x0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L280
  add    $0x1,%rdx
  cmp    %rdx,%rcx
  jne    L96
L36:
  mov    0x14(%rsp),%ecx
  sub    $0x2,%ecx
  test   %ecx,%ecx
  jle    L446
  movslq %ecx,%rcx
  mov    %r15d,%r10d
  pxor   %xmm4,%xmm4
  lea    0x0(,%rcx,8),%rdi
  jmp    L82
  nopl   (%rax)
L133:
  sub    $0x1,%rcx
  sub    $0x1,%r10d
  test   %ecx,%ecx
  jle    L446
L82:
  mov    0x0(%r13,%rdi,1),%r8
  mov    %rdi,%r9
  sub    $0x8,%rdi
  mov    %ecx,%esi
  add    %rdi,%r8
  ucomisd (%r8),%xmm4
  jp     L453
  je     L133
L453:
  movslq %r10d,%rax
  cmp    %r10d,%r15d
  jl     L244
  nopw   0x0(%rax,%rax,1)
L271:
  mov    0x0(%r13,%rax,8),%rdx
  movsd  (%rdx,%rdi,1),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r15d
  jge    L271
L244:
  mov    %r9,%rdx
  nopl   0x0(%rax)
L147:
  mov    %rcx,%rax
  movapd %xmm4,%xmm1
  nopw   0x0(%rax,%rax,1)
L85:
  mov    (%r12,%rax,8),%r11
  movsd  (%r11,%rdx,1),%xmm0
  mulsd  0x0(%rbp,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm1
  cmp    %eax,%r15d
  jge    L85
  mov    %rcx,%rax
  divsd  0x0(%rbp,%r9,1),%xmm1
  divsd  (%r8),%xmm1
  nopl   0x0(%rax)
L489:
  mov    (%r12,%rax,8),%r11
  movsd  0x0(%rbp,%rax,8),%xmm0
  add    $0x1,%rax
  mulsd  %xmm1,%xmm0
  add    %rdx,%r11
  addsd  (%r11),%xmm0
  movsd  %xmm0,(%r11)
  cmp    %eax,%r15d
  jge    L489
  add    $0x1,%esi
  add    $0x8,%rdx
  cmp    %esi,%r15d
  jge    L147
  sub    $0x1,%rcx
  sub    $0x1,%r10d
  test   %ecx,%ecx
  jg     L82
L446:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L495:
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L280
  add    $0x1,%rdx
  cmp    %rdx,%rcx
  jne    L96
  jmp    L36
  nopl   0x0(%rax)
L286:
  mov    0x40(%rsp),%rcx
  movslq %r15d,%r12
  movapd %xmm4,%xmm6
  mov    %r12,%rax
  mov    %ecx,%ebx
  nopl   0x0(%rax)
L131:
  mov    0x0(%r13,%rax,8),%rdx
  movsd  (%rdx,%r14,1),%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  mulsd  %xmm0,%xmm0
  sub    $0x1,%rax
  addsd  %xmm0,%xmm6
  cmp    %eax,%ecx
  jle    L131
  ucomisd %xmm6,%xmm4
  ja     L40
  movapd %xmm6,%xmm8
  sqrtsd %xmm8,%xmm8
L541:
  mov    0x20(%rsp),%rax
  lea    0x0(%rbp,%rax,1),%r9
  mov    0x8(%rsp),%rax
  movsd  -0x8(%rax),%xmm0
  comisd %xmm4,%xmm0
  jbe    L234
  xorpd  %xmm7,%xmm8
L234:
  movapd %xmm0,%xmm1
  subsd  %xmm8,%xmm0
  mov    0x8(%rsp),%rax
  mov    %edi,%ecx
  mulsd  %xmm8,%xmm1
  mov    %edi,0x28(%rsp)
  mov    0x20(%rsp),%rdx
  mov    0x40(%rsp),%rdi
  mov    0x14(%rsp),%esi
  movsd  %xmm0,-0x8(%rax)
  subsd  %xmm1,%xmm6
L228:
  mov    %r12,%rax
  movapd %xmm4,%xmm1
  nopw   0x0(%rax,%rax,1)
L165:
  mov    0x0(%r13,%rax,8),%r11
  movsd  (%r11,%rdx,1),%xmm0
  mulsd  0x0(%rbp,%rax,8),%xmm0
  sub    $0x1,%rax
  addsd  %xmm0,%xmm1
  cmp    %eax,%ebx
  jle    L165
  divsd  %xmm6,%xmm1
  mov    %rdi,%rax
  nopl   0x0(%rax)
L31:
  movsd  0x0(%rbp,%rax,8),%xmm2
  mov    0x0(%r13,%rax,8),%r11
  add    $0x1,%rax
  mulsd  %xmm1,%xmm2
  add    %rdx,%r11
  movsd  (%r11),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%r11)
  cmp    %eax,%r15d
  jge    L31
  add    $0x1,%ecx
  add    $0x8,%rdx
  cmp    %ecx,%esi
  jg     L228
  mov    0x14(%rsp),%esi
  mov    0x28(%rsp),%edi
  mov    %r14,0x70(%rsp)
  mov    %r13,%r12
  mov    $0x1,%r11d
  mov    %r13,0x80(%rsp)
  cmp    %esi,%edi
  mov    0x18(%rsp),%edi
  mov    %ebx,0x58(%rsp)
  cmovl  %edi,%r11d
  cmp    %ebx,%esi
  setle  %al
  cmp    $0x1,%edi
  mov    %r11d,%edx
  sete   %cl
  mov    %r11d,0x30(%rsp)
  and    $0xfffffffe,%r11d
  shr    %edx
  mov    %r11d,0x38(%rsp)
  lea    -0x1(%rdx),%esi
  mov    %r15d,%edx
  sub    %r11d,%edx
  not    %rsi
  shl    $0x4,%rsi
  or     %cl,%al
  mov    %edx,%ecx
  cmovne %r15d,%ecx
  add    %r11d,%r8d
  mov    %al,0x50(%rsp)
  mov    %rsi,%rax
  movslq %r8d,%r8
  neg    %rax
  movslq %ecx,%rcx
  shl    $0x3,%r8
  mov    %rax,%rbx
  shl    $0x3,%rcx
  lea    0x0(%rbp,%r8,1),%r11
  lea    0x0(%rbp,%rcx,1),%rdi
  cs nopw 0x0(%rax,%rax,1)
L184:
  cmpb   $0x0,0x50(%rsp)
  mov    (%r12),%rax
  jne    L3
  mov    0x68(%rsp),%rdx
  movapd %xmm4,%xmm0
  lea    (%rax,%rdx,1),%r13
  xor    %edx,%edx
  xchg   %ax,%ax
L308:
  movupd (%r10,%rdx,1),%xmm2
  movupd 0x0(%r13,%rdx,1),%xmm1
  sub    $0x10,%rdx
  shufpd $0x1,%xmm2,%xmm2
  shufpd $0x1,%xmm1,%xmm1
  mulpd  %xmm1,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %rdx,%rsi
  jne    L308
  mov    0x38(%rsp),%r14d
  cmp    %r14d,0x30(%rsp)
  je     L558
L451:
  movsd  (%rax,%rcx,1),%xmm1
  mulsd  (%rdi),%xmm1
  addsd  %xmm1,%xmm0
L558:
  mov    0x20(%rsp),%rdx
  mov    0x58(%rsp),%r14d
  divsd  %xmm6,%xmm0
  add    %rax,%rdx
  cmpl   $0x1,0x18(%rsp)
  setne  0x28(%rsp)
  cmp    %r14d,0x14(%rsp)
  setg   %r13b
  test   %r13b,0x28(%rsp)
  je     L616
  cmp    0x8(%rsp),%rdx
  je     L616
  movapd %xmm0,%xmm9
  xor    %r13d,%r13d
  unpcklpd %xmm9,%xmm9
L87:
  movupd (%r9,%r13,1),%xmm2
  movupd (%rdx,%r13,1),%xmm1
  mulpd  %xmm9,%xmm2
  subpd  %xmm2,%xmm1
  movups %xmm1,(%rdx,%r13,1)
  add    $0x10,%r13
  cmp    %rbx,%r13
  jne    L87
  mov    0x38(%rsp),%r14d
  cmp    %r14d,0x30(%rsp)
  je     L54
  mulsd  (%r11),%xmm0
  add    %r8,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
L54:
  mov    0x8(%rsp),%rax
  add    $0x8,%r12
  movsd  -0x8(%rax),%xmm0
  cmp    0x60(%rsp),%r12
  jne    L184
  mulsd  %xmm5,%xmm0
  mov    0x80(%rsp),%r13
  mov    0x70(%rsp),%r14
  mulsd  %xmm8,%xmm5
  movsd  %xmm0,-0x8(%rax)
  mov    0x20(%rsp),%rax
  mov    0x0(%r13,%rax,1),%rax
  movsd  %xmm5,(%rax,%r14,1)
  jmp    L136
  nopl   0x0(%rax)
L616:
  mov    0x40(%rsp),%rdx
  nopl   (%rax)
L186:
  movsd  0x0(%rbp,%rdx,8),%xmm2
  movsd  (%rax,%rdx,8),%xmm1
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rax,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,%r15d
  jge    L186
  jmp    L54
  nopl   0x0(%rax,%rax,1)
L3:
  movapd %xmm4,%xmm0
  jmp    L451
L418:
  mov    %rax,0x60(%rsp)
  movslq 0x14(%rsp),%rax
  pxor   %xmm4,%xmm4
  mov    $0x1,%r14d
  mov    %r15d,0x28(%rsp)
  movq   D47(%rip),%xmm3
  lea    -0x10(,%rax,8),%rax
  mov    %rdx,0x80(%rsp)
  movq   D41(%rip),%xmm7
  mov    %rax,0x58(%rsp)
  lea    (%rcx,%rax,1),%r9
  mov    %rcx,0x68(%rsp)
L248:
  mov    %r14d,%ebx
  mov    %r14d,%ebp
  movapd %xmm4,%xmm5
  mov    %r14,%rdx
  lea    0x0(,%r14,8),%rax
  mov    %rax,0x30(%rsp)
  sub    $0x8,%rax
  xchg   %ax,%ax
L597:
  mov    0x0(%r13,%rdx,8),%rcx
  add    $0x1,%rdx
  movsd  (%rcx,%rax,1),%xmm0
  andpd  %xmm3,%xmm0
  addsd  %xmm0,%xmm5
  cmp    %edx,%r15d
  jge    L597
  ucomisd %xmm4,%xmm5
  jp     L536
  jne    L536
L346:
  add    $0x1,%r14
  subl   $0x1,0x28(%rsp)
  addq   $0x8,0x60(%rsp)
  cmp    %r14d,%r15d
  jg     L248
  mov    0x80(%rsp),%r12
  mov    0x68(%rsp),%rbp
  jmp    L140
  nopl   0x0(%rax)
L536:
  mov    %r14d,0x38(%rsp)
  mov    0x68(%rsp),%rsi
  movslq %r15d,%rdx
  movapd %xmm4,%xmm6
  nopl   0x0(%rax)
L194:
  mov    0x0(%r13,%rdx,8),%rcx
  movsd  (%rcx,%rax,1),%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,(%rsi,%rdx,8)
  mulsd  %xmm0,%xmm0
  sub    $0x1,%rdx
  addsd  %xmm0,%xmm6
  cmp    %edx,%r14d
  jle    L194
  ucomisd %xmm6,%xmm4
  ja     L341
  movapd %xmm6,%xmm8
  sqrtsd %xmm8,%xmm8
L465:
  mov    0x60(%rsp),%rax
  movsd  -0x8(%rax),%xmm0
  lea    -0x8(%rax),%r11
  comisd %xmm4,%xmm0
  jbe    L252
  xorpd  %xmm7,%xmm8
L252:
  mov    0x14(%rsp),%edi
  mov    0x28(%rsp),%eax
  mov    $0x1,%r8d
  movapd %xmm8,%xmm1
  mulsd  %xmm0,%xmm1
  subsd  %xmm8,%xmm0
  mov    0x60(%rsp),%r12
  mov    %r14,0x70(%rsp)
  cmp    %ebp,%edi
  mov    %r13,0x40(%rsp)
  cmovg  %eax,%r8d
  cmp    $0x1,%eax
  mov    %r12,%r13
  sete   %al
  cmp    0x38(%rsp),%edi
  movsd  %xmm0,-0x8(%r12)
  mov    %r8d,%edx
  setle  %cl
  mov    %r8d,0x20(%rsp)
  and    $0xfffffffe,%r8d
  shr    %edx
  mov    %r8d,0x18(%rsp)
  subsd  %xmm1,%xmm6
  lea    -0x1(%rdx),%esi
  mov    %r15d,%edx
  sub    %r8d,%edx
  not    %rsi
  shl    $0x4,%rsi
  or     %cl,%al
  mov    %edx,%ecx
  cmovne %r15d,%ecx
  add    %ebx,%r8d
  mov    %al,0x50(%rsp)
  mov    0x68(%rsp),%rax
  movslq %r8d,%r8
  mov    %rsi,%r10
  xor    %ebp,%ebp
  movslq %ecx,%rcx
  shl    $0x3,%r8
  neg    %r10
  shl    $0x3,%rcx
  lea    (%rax,%r8,1),%rbx
  lea    (%rax,%rcx,1),%rdi
  nopw   0x0(%rax,%rax,1)
L625:
  mov    0x40(%rsp),%rax
  cmpb   $0x0,0x50(%rsp)
  mov    (%rax,%rbp,8),%rax
  jne    L380
  mov    0x58(%rsp),%rdx
  movapd %xmm4,%xmm0
  lea    (%rax,%rdx,1),%r12
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L474:
  movupd (%r12,%rdx,1),%xmm2
  movupd (%r9,%rdx,1),%xmm1
  sub    $0x10,%rdx
  shufpd $0x1,%xmm2,%xmm2
  shufpd $0x1,%xmm1,%xmm1
  mulpd  %xmm1,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %rsi,%rdx
  jne    L474
  mov    0x20(%rsp),%r14d
  cmp    %r14d,0x18(%rsp)
  je     L37
L395:
  movsd  (%rax,%rcx,1),%xmm1
  mulsd  (%rdi),%xmm1
  addsd  %xmm1,%xmm0
L37:
  mov    0x30(%rsp),%rdx
  mov    0x38(%rsp),%r14d
  divsd  %xmm6,%xmm0
  add    %rax,%rdx
  cmpl   $0x1,0x28(%rsp)
  setne  0x8(%rsp)
  cmp    %r14d,0x14(%rsp)
  setg   %r12b
  test   %r12b,0x8(%rsp)
  je     L383
  cmp    %r13,%rdx
  je     L383
  movapd %xmm0,%xmm9
  xor    %r12d,%r12d
  unpcklpd %xmm9,%xmm9
  nopl   (%rax)
L73:
  movupd (%r11,%r12,1),%xmm2
  movupd (%rdx,%r12,1),%xmm1
  mulpd  %xmm9,%xmm2
  subpd  %xmm2,%xmm1
  movups %xmm1,(%rdx,%r12,1)
  add    $0x10,%r12
  cmp    %r10,%r12
  jne    L73
  mov    0x20(%rsp),%r14d
  cmp    %r14d,0x18(%rsp)
  je     L493
  mulsd  (%rbx),%xmm0
  add    %r8,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
L493:
  add    $0x1,%rbp
  movsd  -0x8(%r13),%xmm0
  cmp    %ebp,%r15d
  jge    L625
  mulsd  %xmm5,%xmm0
  mov    0x60(%rsp),%rax
  mov    0x70(%rsp),%r14
  mulsd  %xmm8,%xmm5
  mov    0x40(%rsp),%r13
  mov    0x30(%rsp),%rbx
  movsd  %xmm0,-0x8(%rax)
  mov    0x0(%r13,%r14,8),%rax
  movsd  %xmm5,-0x8(%rax,%rbx,1)
  jmp    L346
  nop
L383:
  mov    0x70(%rsp),%rdx
  mov    0x68(%rsp),%r12
  nopw   0x0(%rax,%rax,1)
L384:
  movsd  (%r12,%rdx,8),%xmm2
  movsd  (%rax,%rdx,8),%xmm1
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rax,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,%r15d
  jge    L384
  jmp    L493
  cs nopw 0x0(%rax,%rax,1)
L380:
  movapd %xmm4,%xmm0
  jmp    L395
L40:
  movapd %xmm6,%xmm0
  mov    %r10,0x80(%rsp)
  mov    %r8d,0x50(%rsp)
  mov    %edi,0x30(%rsp)
  movaps %xmm3,0x70(%rsp)
  movsd  %xmm4,0x58(%rsp)
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm6,0x28(%rsp)
  call   <sqrt@plt>
  movapd 0x70(%rsp),%xmm3
  mov    0x50(%rsp),%r8d
  movsd  0x58(%rsp),%xmm4
  mov    0x30(%rsp),%edi
  movapd %xmm0,%xmm8
  mov    0x80(%rsp),%r10
  movq   D41(%rip),%xmm7
  movsd  0x38(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm6
  jmp    L541
L341:
  movapd %xmm6,%xmm0
  mov    %r9,0x50(%rsp)
  movaps %xmm3,0x40(%rsp)
  movsd  %xmm4,0x20(%rsp)
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm6,0x8(%rsp)
  call   <sqrt@plt>
  mov    0x50(%rsp),%r9
  movq   D41(%rip),%xmm7
  movapd 0x40(%rsp),%xmm3
  movsd  0x20(%rsp),%xmm4
  movapd %xmm0,%xmm8
  movsd  0x18(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm6
  jmp    L465
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D47
type: qword
name: extract_symbolic_data
arguments: data_tag: D41
type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D57
type: f64

tool: D47: 9223372036854775807

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

tool: D57: 1

assistant: ```c
void orthes(int n, double **H, double **V, double *ort) {
  int low = 0;
  int high = n - 1;
  for (int m = low + 1; m <= high - 1; m++) {
    double scale = 0.0;
    for (int i = m; i <= high; i++) {
      scale = scale + fabs(H[i][m - 1]);
    }
    if (scale != 0.0) {
      double h = 0.0;
      for (int i = high; i >= m; i--) {
        ort[i] = H[i][m - 1] / scale;
        h += ort[i] * ort[i];
      }
      double g = sqrt(h);
      if (ort[m] > 0) {
        g = -g;
      }
      h = h - ort[m] * g;
      ort[m] = ort[m] - g;
      for (int j = m; j < n; j++) {
        double f = 0.0;
        for (int i = high; i >= m; i--) {
          f += ort[i] * H[i][j];
        }
        f = f / h;
        for (int i = m; i <= high; i++) {
          H[i][j] -= f * ort[i];
        }
      }
      for (int i = 0; i <= high; i++) {
        double f = 0.0;
        for (int j = high; j >= m; j--) {
          f += ort[j] * H[i][j];
        }
        f = f / h;
        for (int j = m; j <= high; j++) {
          H[i][j] -= f * ort[j];
        }
      }
      ort[m] = scale * ort[m];
      H[m][m - 1] = scale * g;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      V[i][j] = (i == j ? 1.0 : 0.0);
    }
  }
  for (int m = high - 1; m >= low + 1; m--) {
    if (H[m][m - 1] != 0.0) {
      for (int i = m + 1; i <= high; i++) {
        ort[i] = H[i][m - 1];
      }
      for (int j = m; j <= high; j++) {
        double g = 0.0;
        for (int i = m; i <= high; i++) {
          g += ort[i] * V[i][j];
        }
        g = (g / ort[m]) / H[m][m - 1];
        for (int i = m; i <= high; i++) {
          V[i][j] += g * ort[i];
        }
      }
    }
  }
}
```