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

```asm
<LUBackSubst>:
  endbr64
  push   %r15
  mov    %rdi,%r8
  mov    %esi,%r9d
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  mov    %rcx,%rdx
  lea    -0x1(%rsi),%ecx
  push   %rbp
  push   %rbx
  test   %esi,%esi
  jle    L105
  movq   D3(%rip),%xmm3
  movsd  D18(%rip),%xmm2
  mov    %ecx,%r15d
  xor    %esi,%esi
  mov    $0xffffffff,%r10d
L82:
  movslq (%r12,%rsi,4),%rax
  movsd  (%rdx,%rsi,8),%xmm1
  mov    %esi,%edi
  lea    (%rdx,%rax,8),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm1,(%rax)
  cmp    $0xffffffff,%r10d
  jne    L141
  movapd %xmm0,%xmm1
  movsd  %xmm0,(%rdx,%rsi,8)
  andpd  %xmm3,%xmm1
  ucomisd %xmm2,%xmm1
  cmova  %esi,%r10d
  cmp    %r15,%rsi
  je     L37
  add    $0x1,%rsi
  jmp    L82
  nopl   0x0(%rax)
L141:
  cmp    %esi,%r10d
  jge    L62
  mov    %esi,%r14d
  mov    (%r8,%rsi,8),%rbp
  sub    %r10d,%r14d
  cmp    $0x1,%r14d
  je     L6
  movslq %r10d,%r11
  mov    %r14d,%ebx
  xor    %eax,%eax
  shl    $0x3,%r11
  shr    %ebx
  lea    0x0(%rbp,%r11,1),%r13
  shl    $0x4,%rbx
  add    %rdx,%r11
  nopl   0x0(%rax,%rax,1)
L92:
  movupd 0x0(%r13,%rax,1),%xmm1
  movupd (%r11,%rax,1),%xmm5
  add    $0x10,%rax
  mulpd  %xmm5,%xmm1
  subsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  subsd  %xmm1,%xmm0
  cmp    %rax,%rbx
  jne    L92
  mov    %r14d,%r11d
  and    $0xfffffffe,%r11d
  lea    (%r11,%r10,1),%eax
  cmp    %r11d,%r14d
  je     L62
L187:
  cltq
  movsd  0x0(%rbp,%rax,8),%xmm1
  mulsd  (%rdx,%rax,8),%xmm1
  subsd  %xmm1,%xmm0
L62:
  movsd  %xmm0,(%rdx,%rsi,8)
  add    $0x1,%edi
  cmp    %r15,%rsi
  je     L37
  movslq %r10d,%r14
  mov    %edi,%esi
  sub    %r10d,%edi
  shl    $0x3,%r14
  lea    (%rdx,%r14,1),%r13
L185:
  movslq (%r12,%rsi,4),%rax
  movsd  (%rdx,%rsi,8),%xmm1
  lea    (%rdx,%rax,8),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm1,(%rax)
  cmp    %esi,%r10d
  jge    L127
  mov    (%r8,%rsi,8),%rbx
  cmp    $0x1,%edi
  je     L154
  mov    %edi,%r11d
  lea    (%rbx,%r14,1),%rbp
  xor    %eax,%eax
  shr    %r11d
  shl    $0x4,%r11
  nop
L198:
  movupd 0x0(%rbp,%rax,1),%xmm1
  movupd 0x0(%r13,%rax,1),%xmm6
  add    $0x10,%rax
  mulpd  %xmm6,%xmm1
  subsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  subsd  %xmm1,%xmm0
  cmp    %r11,%rax
  jne    L198
  mov    %edi,%r11d
  and    $0xfffffffe,%r11d
  lea    (%r11,%r10,1),%eax
  cmp    %r11d,%edi
  je     L127
L149:
  cltq
  movsd  (%rdx,%rax,8),%xmm1
  mulsd  (%rbx,%rax,8),%xmm1
  subsd  %xmm1,%xmm0
L127:
  movsd  %xmm0,(%rdx,%rsi,8)
  add    $0x1,%rsi
  add    $0x1,%edi
  cmp    %esi,%r9d
  jg     L185
L37:
  movslq %ecx,%rcx
  mov    %r9d,%edi
  lea    0x8(%rdx),%r11
  xor    %r10d,%r10d
  lea    0x0(,%rcx,8),%rsi
L113:
  movsd  (%rdx,%rsi,1),%xmm0
  mov    (%r8,%rsi,1),%rbx
  mov    %edi,%eax
  cmp    %edi,%r9d
  jle    L20
  cmp    $0x1,%r10d
  je     L98
  mov    %r10d,%ecx
  lea    0x8(%rbx,%rsi,1),%r12
  lea    (%r11,%rsi,1),%rbp
  xor    %eax,%eax
  shr    %ecx
  shl    $0x4,%rcx
  nopw   0x0(%rax,%rax,1)
L117:
  movupd 0x0(%rbp,%rax,1),%xmm1
  movupd (%r12,%rax,1),%xmm4
  add    $0x10,%rax
  mulpd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  subsd  %xmm1,%xmm0
  cmp    %rax,%rcx
  jne    L117
  mov    %r10d,%ecx
  and    $0xfffffffe,%ecx
  lea    (%rdi,%rcx,1),%eax
  cmp    %ecx,%r10d
  je     L20
L98:
  cltq
  movsd  (%rdx,%rax,8),%xmm1
  mulsd  (%rbx,%rax,8),%xmm1
  subsd  %xmm1,%xmm0
L20:
  divsd  (%rbx,%rsi,1),%xmm0
  add    $0x1,%r10d
  movsd  %xmm0,(%rdx,%rsi,1)
  lea    -0x1(%rdi),%eax
  sub    $0x8,%rsi
  sub    $0x2,%edi
  js     L150
  mov    %eax,%edi
  jmp    L113
L105:
  test   %ecx,%ecx
  jns    L37
L150:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L6:
  mov    %r10d,%eax
  jmp    L187
L154:
  mov    %r10d,%eax
  jmp    L149
```

tool_calls: name: parse_data
arguments: data_tag: D3
type_guessed: qword
name: parse_data
arguments: data_tag: D18
type_guessed: byte[8]

tool: D3: 9223372036854775807

tool: {"D18": [0xa0,0xc2,0xeb,0xfe,0x4b,0x48,0xb4,0x39]}

assistant: ```c
void LUBackSubst(a, n, indx, b) double **a, *b;
int n, *indx;
{
  int i, ip, j, ii = -1;
  double sum;
  for (i = 0; i < n; i++) {
    ip = indx[i];
    sum = b[ip];
    b[ip] = b[i];
    if (ii >= 0) {
      for (j = ii; j <= i - 1; j++)
        sum -= a[i][j] * b[j];
    } else if (fabs(sum) > (1E-30))
      ii = i;
    b[i] = sum;
  }
  for (i = n - 1; i >= 0; i--) {
    sum = b[i];
    for (j = i + 1; j < n; j++)
      sum -= a[i][j] * b[j];
    b[i] = sum / a[i][i];
  }
}
```