user: Converte this assembly snippet into its equivalent C code:

```asm
<sgefa>:
  endbr64
  push   %r15
  lea    -0x1(%rdx),%eax
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  movl   $0xffffffff,(%r8)
  mov    %rdi,0x18(%rsp)
  mov    %edx,0x4(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    %r8,0x50(%rsp)
  mov    %eax,0x5c(%rsp)
  test   %eax,%eax
  jle    L136
  movslq %esi,%rax
  xor    %r14d,%r14d
  mov    $0x2,%r12d
  mov    %edx,%ebp
  mov    %rax,0x38(%rsp)
  pxor   %xmm4,%xmm4
  mov    %r14d,%r8d
  mov    %r12,%r15
  lea    0x8(,%rax,8),%rax
  movsd  %xmm4,0x28(%rsp)
  mov    %esi,%r14d
  mov    %rax,0x40(%rsp)
  mov    0x18(%rsp),%rax
  movq   $0x0,0x10(%rsp)
  mov    %rax,0x8(%rsp)
  lea    -0x2(%rdx),%eax
  add    $0x3,%rax
  mov    %rax,0x48(%rsp)
  jmp    L39
  nopw   0x0(%rax,%rax,1)
L56:
  mov    0x50(%rsp),%rax
  mov    %r12d,(%rax)
  lea    (%r8,%r14,1),%eax
  mov    %eax,0x58(%rsp)
L9:
  mov    0x40(%rsp),%rbx
  mov    0x38(%rsp),%rsi
  add    $0x1,%r15
  add    %rbx,0x8(%rsp)
  mov    0x58(%rsp),%r8d
  add    %rsi,0x10(%rsp)
  cmp    0x48(%rsp),%r15
  je     L52
L39:
  mov    0x8(%rsp),%rsi
  mov    %ebp,%edi
  mov    %r14d,%edx
  mov    %r8d,0x58(%rsp)
  lea    -0x1(%r15),%r13d
  sub    $0x1,%ebp
  lea    -0x2(%r15),%r12d
  mov    %r15d,%ebx
  call   <isamax@plt>
  mov    0x20(%rsp),%rsi
  mov    0x18(%rsp),%rcx
  lea    -0x1(%rax,%r13,1),%r9d
  mov    %eax,%edx
  mov    0x58(%rsp),%r8d
  lea    -0x1(%r15),%rax
  mov    %r9d,-0x8(%rsi,%r15,4)
  imul   %r14d,%r9d
  add    %r9d,%r13d
  movslq %r13d,%r13
  lea    -0x8(%rcx,%r13,8),%rcx
  movsd  (%rcx),%xmm0
  ucomisd 0x28(%rsp),%xmm0
  jp     L2
  je     L56
L2:
  mov    0x8(%rsp),%rdi
  mov    %r9d,0x60(%rsp)
  movsd  (%rdi),%xmm1
  test   %edx,%edx
  je     L77
  movsd  %xmm1,(%rcx)
  movsd  D14(%rip),%xmm1
  movsd  %xmm0,(%rdi)
  lea    (%r8,%r14,1),%edi
  divsd  %xmm0,%xmm1
  movslq %edi,%rdx
  mov    %edi,0x58(%rsp)
  mov    0x18(%rsp),%rdi
  add    %rdx,%rax
  mov    %rdx,0x30(%rsp)
  mov    %r14d,%edx
  lea    -0x8(%rdi,%rax,8),%rsi
  mov    %ebp,%edi
  mov    %rsi,0x68(%rsp)
  movapd %xmm1,%xmm0
  call   <sscal@plt>
  cmp    %r15d,0x4(%rsp)
  movslq 0x60(%rsp),%r9
  jl     L9
  mov    0x30(%rsp),%rdx
  mov    0x18(%rsp),%rdi
  mov    %r15,0x60(%rsp)
  lea    (%rdx,%r15,1),%rax
  sub    %rdx,%r9
  mov    %ebx,%r15d
  mov    0x68(%rsp),%rbx
  lea    -0x8(%rdi,%rax,8),%r13
  mov    %r14d,%eax
  mov    %r9,%r14
  mov    %eax,%r12d
  nopl   0x0(%rax,%rax,1)
L57:
  mov    0x10(%rsp),%rax
  sub    0x30(%rsp),%rax
  mov    %r13,%rcx
  mov    %r12d,%r8d
  movsd  0x0(%r13,%r14,8),%xmm0
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  movsd  0x0(%r13,%rax,8),%xmm1
  add    $0x1,%r15d
  movsd  %xmm1,0x0(%r13,%r14,8)
  movsd  %xmm0,0x0(%r13,%rax,8)
  add    $0x8,%r13
  call   <saxpy@plt>
  cmp    %r15d,0x4(%rsp)
  jge    L57
  mov    0x60(%rsp),%r15
  mov    %r12d,%r14d
  jmp    L9
  nopl   (%rax)
L77:
  movsd  D14(%rip),%xmm0
  lea    (%r8,%r14,1),%ecx
  mov    0x18(%rsp),%rdi
  mov    %r14d,%edx
  movslq %ecx,%r11
  mov    %ecx,0x58(%rsp)
  divsd  %xmm1,%xmm0
  add    %r11,%rax
  mov    %r11,0x30(%rsp)
  lea    -0x8(%rdi,%rax,8),%rsi
  mov    %ebp,%edi
  mov    %rsi,0x68(%rsp)
  call   <sscal@plt>
  cmp    %r15d,0x4(%rsp)
  mov    0x30(%rsp),%r11
  movslq 0x60(%rsp),%r9
  jl     L9
  mov    0x18(%rsp),%rdi
  lea    (%r11,%r15,1),%rax
  sub    %r11,%r9
  mov    0x68(%rsp),%r13
  mov    %r15,0x30(%rsp)
  mov    %r14d,%r15d
  mov    %r9,%r14
  lea    -0x8(%rdi,%rax,8),%r12
  cs nopw 0x0(%rax,%rax,1)
L70:
  movsd  (%r12,%r14,8),%xmm0
  mov    %r12,%rcx
  mov    %r15d,%r8d
  mov    %r15d,%edx
  mov    %r13,%rsi
  mov    %ebp,%edi
  add    $0x1,%ebx
  add    $0x8,%r12
  call   <saxpy@plt>
  cmp    %ebx,0x4(%rsp)
  jge    L70
  mov    %r15d,%r14d
  mov    0x30(%rsp),%r15
  jmp    L9
  nopl   0x0(%rax,%rax,1)
L52:
  mov    %r14d,%r13d
L65:
  mov    0x5c(%rsp),%ecx
  mov    %r13d,%r9d
  movslq 0x4(%rsp),%rax
  mov    0x20(%rsp),%rdx
  movsd  0x28(%rsp),%xmm3
  imul   %ecx,%r9d
  mov    %ecx,-0x4(%rdx,%rax,4)
  add    %eax,%r9d
  mov    0x18(%rsp),%rax
  movslq %r9d,%r9
  ucomisd -0x8(%rax,%r9,8),%xmm3
  jp     L71
  jne    L71
  mov    0x50(%rsp),%rax
  mov    %ecx,(%rax)
L71:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L136:
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x28(%rsp)
  jmp    L65
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D14
datatype: f32[2]

tool: {"D14": [0.0,-1.875]}

assistant: ```c
void sgefa(double *a, int lda, int n, int *ipvt, int *info) {
  int j, k, kp1, l, nm1;
  double t;
  *info = -1;
  nm1 = n - 1;
  if (nm1 > 0) {
    for (k = 1; k <= nm1; k++) {
      kp1 = k + 1;
      l = isamax(n - k + 1, &a[(k - 1) * lda + k - 1], lda) + k - 1;
      ipvt[k - 1] = l;
      if (a[l * lda + k - 1] != 0.0) {
        if (l != (k - 1)) {
          t = a[l * lda + k - 1];
          a[l * lda + k - 1] = a[(k - 1) * lda + k - 1];
          a[(k - 1) * lda + k - 1] = t;
        }
        t = -1.0 / a[(k - 1) * lda + k - 1];
        sscal(n - k, t, (a + k * lda + k - 1), lda);
        for (j = kp1; j <= n; j++) {
          t = a[l * lda + j - 1];
          if (l != (k - 1)) {
            a[l * lda + j - 1] = a[(k - 1) * lda + j - 1];
            a[(k - 1) * lda + j - 1] = t;
          }
          saxpy(n - k, t, (a + k * lda + k - 1), lda, (a + k * lda + j - 1), lda);
        }
      } else
        *info = k - 1;
    }
  }
  ipvt[n - 1] = n - 1;
  if (a[(n - 1) * lda + n - 1] == 0.0)
    *info = n - 1;
}
```