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

```asm
<lubksb>:
  endbr64
  push   %r15
  mov    %rcx,%rax
  push   %r14
  push   %r13
  push   %r12
  lea    -0x1(%rsi),%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  test   %esi,%esi
  jle    L86
  movslq %esi,%rdi
  mov    %rdx,%rbx
  mov    %r12d,%r13d
  xor    %r10d,%r10d
  mov    %rdi,-0x8(%rsp)
  lea    0x0(,%rdi,8),%r8
  mov    $0xffffffff,%r9d
  pxor   %xmm2,%xmm2
  nopl   0x0(%rax,%rax,1)
L154:
  movslq (%rbx,%r10,4),%rdx
  movsd  (%rax,%r10,8),%xmm0
  mov    %r10d,%ecx
  mov    %r10d,%edi
  lea    (%rax,%rdx,8),%rdx
  movsd  (%rdx),%xmm1
  movsd  %xmm0,(%rdx)
  cmp    $0xffffffff,%r9d
  jne    L14
  ucomisd %xmm2,%xmm1
  jp     L72
  je     L134
L72:
  mov    %edi,%r9d
L134:
  movsd  %xmm1,(%rax,%r10,8)
  cmp    %r13,%r10
  je     L155
  add    $0x1,%r10
  jmp    L154
  nopw   0x0(%rax,%rax,1)
L14:
  cmp    %r10d,%r9d
  jge    L87
  mov    %esi,%edx
  mov    %r10d,%r11d
  movslq %r9d,%r14
  imul   %r9d,%edx
  sub    %r9d,%r11d
  sub    $0x1,%r11d
  add    %r14,%r11
  movslq %edx,%rdx
  lea    0x8(%rax,%r11,8),%r11
  add    %r10,%rdx
  lea    0x0(%rbp,%rdx,8),%rdi
  lea    (%rax,%r14,8),%rdx
  nop
L99:
  movsd  (%rdi),%xmm0
  mulsd  (%rdx),%xmm0
  add    $0x8,%rdx
  add    %r8,%rdi
  subsd  %xmm0,%xmm1
  cmp    %r11,%rdx
  jne    L99
L87:
  movsd  %xmm1,(%rax,%r10,8)
  add    $0x1,%ecx
  cmp    %r13,%r10
  je     L155
  mov    %r9d,%edx
  movslq %r9d,%r13
  lea    0x8(%rax),%r14
  imul   %esi,%edx
  lea    (%rax,%r13,8),%r15
  movslq %edx,%rdx
  add    %rcx,%rdx
  lea    0x0(%rbp,%rdx,8),%r11
L80:
  movslq (%rbx,%rcx,4),%rdx
  movsd  (%rax,%rcx,8),%xmm0
  lea    (%rax,%rdx,8),%rdx
  movsd  (%rdx),%xmm1
  movsd  %xmm0,(%rdx)
  cmp    %ecx,%r9d
  jge    L156
  mov    %ecx,%edx
  mov    %r11,%rdi
  sub    %r9d,%edx
  sub    $0x1,%edx
  add    %r13,%rdx
  lea    (%r14,%rdx,8),%r10
  mov    %r15,%rdx
  nopl   0x0(%rax)
L13:
  movsd  (%rdx),%xmm0
  mulsd  (%rdi),%xmm0
  add    $0x8,%rdx
  add    %r8,%rdi
  subsd  %xmm0,%xmm1
  cmp    %rdx,%r10
  jne    L13
L156:
  movsd  %xmm1,(%rax,%rcx,8)
  add    $0x1,%rcx
  add    $0x8,%r11
  cmp    %ecx,%esi
  jg     L80
L155:
  movslq %r12d,%r8
  imul   %esi,%r12d
  mov    %esi,%r11d
  mov    %esi,%ebx
  mov    -0x8(%rsp),%rdi
  not    %r11d
  imul   %esi,%ebx
  mov    %esi,%r9d
  movslq %r11d,%r11
  shl    $0x3,%r11
  movslq %r12d,%rdx
  shl    $0x3,%rdi
  add    %r8,%rdx
  lea    0x0(%rbp,%rdx,8),%r10
  nopl   0x0(%rax)
L121:
  movsd  (%rax,%r8,8),%xmm1
  cmp    %r9d,%esi
  jle    L57
  movslq %ebx,%rcx
  movslq %r9d,%rdx
  add    %r8,%rcx
  lea    0x0(%rbp,%rcx,8),%rcx
  nopl   0x0(%rax)
L112:
  movsd  (%rcx),%xmm0
  mulsd  (%rax,%rdx,8),%xmm0
  add    $0x1,%rdx
  add    %rdi,%rcx
  subsd  %xmm0,%xmm1
  cmp    %edx,%esi
  jg     L112
L57:
  divsd  (%r10),%xmm1
  movsd  %xmm1,(%rax,%r8,8)
  sub    $0x1,%r8
  sub    $0x1,%r9d
  add    %r11,%r10
  sub    %esi,%ebx
  test   %r8d,%r8d
  jns    L121
L9:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L86:
  test   %r12d,%r12d
  js     L9
  movslq %esi,%rbx
  mov    %rbx,-0x8(%rsp)
  jmp    L155
```

assistant: ```c
void lubksb(const double *A, int n, const int *indx, double *b) {
  double s;
  int i, ii = -1, ip, j;
  for (i = 0; i < n; i++) {
    ip = indx[i];
    s = b[ip];
    b[ip] = b[i];
    if (ii >= 0)
      for (j = ii; j < i; j++)
        s -= A[i + j * n] * b[j];
    else if (s)
      ii = i;
    b[i] = s;
  }
  for (i = n - 1; i >= 0; i--) {
    s = b[i];
    for (j = i + 1; j < n; j++)
      s -= A[i + j * n] * b[j];
    b[i] = s / A[i + i * n];
  }
}
```