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

```asm
<main>:
  endbr64
  push   %rbp
  lea    D89(%rip),%rdi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    -0x3c(%rbp),%rsi
  lea    D66(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x3c(%rbp),%ecx
  lea    0x1(%rcx),%eax
  cltq
  lea    0x0(,%rax,4),%rdi
  lea    -0x4(%rdi),%rdx
  mov    %rdi,-0x50(%rbp)
  mov    %rsp,%rdi
  imul   %rdx,%rax
  add    $0xf,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rdi
  and    $0xfffffffffffffff0,%rsi
  cmp    %rdi,%rsp
  je     L232
L274:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdi,%rsp
  jne    L274
L232:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L202
L295:
  lea    0xf(%rdx),%rax
  mov    %rsp,%rsi
  mov    %rsp,%rbx
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  and    $0xfffffffffffffff0,%rdx
  sub    %rax,%rsi
L319:
  cmp    %rsi,%rsp
  je     L239
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L319
L202:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L295
L239:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L205
L102:
  mov    %rsp,-0x78(%rbp)
  test   %ecx,%ecx
  jle    L78
  mov    -0x50(%rbp),%r13
  mov    %r15d,-0x58(%rbp)
  xor    %r14d,%r14d
  xor    %r12d,%r12d
  mov    %rbx,-0x48(%rbp)
  shr    $0x2,%r13
  xchg   %ax,%ax
L229:
  add    $0x1,%r12d
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  mov    %r12d,%esi
  call   <printf@plt>
  mov    -0x3c(%rbp),%esi
  test   %esi,%esi
  js     L225
  mov    -0x48(%rbp),%rax
  xor    %r15d,%r15d
  lea    (%rax,%r14,4),%rbx
  nopw   0x0(%rax,%rax,1)
L35:
  mov    %rbx,%rsi
  lea    D79(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <scanf@plt>
  mov    -0x3c(%rbp),%esi
  add    $0x4,%rbx
  cmp    %r15d,%esi
  jge    L35
  add    %r13,%r14
  cmp    %esi,%r12d
  jl     L229
L225:
  mov    -0x58(%rbp),%r15d
  mov    -0x48(%rbp),%rbx
  test   %esi,%esi
  jle    L78
  lea    0x1(%r13),%rax
  movl   $0x0,-0x58(%rbp)
  mov    %rbx,%r12
  mov    %r15d,%r14d
  movq   $0x0,-0x68(%rbp)
  mov    %r13,%rbx
  mov    %rax,-0x70(%rbp)
  nopl   0x0(%rax)
L199:
  mov    -0x58(%rbp),%edi
  lea    0x1(%rdi),%eax
  mov    %eax,-0x60(%rbp)
  cmp    %esi,%eax
  jge    L92
  mov    %eax,%r15d
  mov    -0x70(%rbp),%rax
  movslq %edi,%r13
  imul   %r13,%rax
  mov    %rax,-0x48(%rbp)
  mov    %r13,%rax
  mov    %r12,%r13
  mov    %r15d,%r12d
  mov    %rax,%r15
  nopl   0x0(%rax,%rax,1)
L44:
  movslq %r12d,%rax
  imul   %rbx,%rax
  add    %r15,%rax
  movss  0x0(%r13,%rax,4),%xmm0
  mov    -0x48(%rbp),%rax
  subss  0x0(%r13,%rax,4),%xmm0
  call   <fabs@plt>
  mov    -0x3c(%rbp),%esi
  test   %rax,%rax
  cmovg  %r12d,%r14d
  add    $0x1,%r12d
  cmp    %r12d,%esi
  jg     L44
  mov    %r13,%r12
  test   %esi,%esi
  js     L103
L92:
  mov    -0x50(%rbp),%rax
  mov    -0x68(%rbp),%rcx
  movslq %r14d,%rdx
  imul   %rdx,%rax
  sub    %rdx,%rcx
  xor    %edx,%edx
  imul   %rbx,%rcx
  add    %r12,%rax
  nopw   0x0(%rax,%rax,1)
L27:
  movss  (%rax,%rcx,4),%xmm0
  movss  (%rax),%xmm1
  add    $0x1,%edx
  movss  %xmm1,(%rax,%rcx,4)
  add    $0x4,%rax
  movss  %xmm0,-0x4(%rax)
  cmp    %esi,%edx
  jle    L27
  mov    -0x60(%rbp),%r11d
  cmp    %esi,%r11d
  jge    L103
  movslq %r11d,%rdx
  movslq -0x58(%rbp),%r13
  mov    -0x70(%rbp),%r15
  movslq %esi,%rax
  imul   %rbx,%rdx
  mov    %rbx,%rcx
  mov    -0x50(%rbp),%r8
  imul   %r13,%r15
  neg    %rcx
  add    %rax,%rdx
  not    %rax
  lea    0x4(%r12,%rdx,4),%rdx
  lea    0x0(,%rax,4),%rdi
  xchg   %ax,%ax
L159:
  movslq %r11d,%rax
  imul   %rbx,%rax
  add    %r13,%rax
  movss  (%r12,%rax,4),%xmm2
  lea    (%rdi,%rdx,1),%rax
  divss  (%r12,%r15,4),%xmm2
  nopw   0x0(%rax,%rax,1)
L318:
  movss  (%rax,%rcx,4),%xmm1
  movss  (%rax),%xmm0
  add    $0x4,%rax
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rax)
  cmp    %rdx,%rax
  jne    L318
  add    $0x1,%r11d
  sub    %rbx,%rcx
  lea    (%rax,%r8,1),%rdx
  cmp    %esi,%r11d
  jne    L159
  mov    -0x60(%rbp),%eax
  addq   $0x1,-0x68(%rbp)
  mov    %eax,-0x58(%rbp)
  jmp    L199
L103:
  mov    %r12,%rbx
L78:
  lea    D12(%rip),%rdi
  call   <puts@plt>
  mov    -0x3c(%rbp),%edx
  test   %edx,%edx
  jle    L265
  mov    -0x50(%rbp),%rax
  mov    %rbx,-0x48(%rbp)
  xor    %r13d,%r13d
  lea    D50(%rip),%r12
  mov    %rbx,-0x58(%rbp)
  lea    D81(%rip),%r14
  shr    $0x2,%rax
  mov    %rax,-0x60(%rbp)
  xchg   %ax,%ax
L249:
  mov    -0x48(%rbp),%r15
  xor    %ebx,%ebx
  cs nopw 0x0(%rax,%rax,1)
L222:
  pxor   %xmm0,%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  add    $0x1,%ebx
  cvtss2sd (%r15),%xmm0
  call   <printf@plt>
  add    $0x4,%r15
  cmp    %ebx,-0x3c(%rbp)
  jg     L222
  movslq %r13d,%rdx
  imul   -0x60(%rbp),%rdx
  mov    -0x58(%rbp),%rdi
  movslq %ebx,%rax
  pxor   %xmm0,%xmm0
  add    $0x1,%r13d
  add    %rdx,%rax
  cvtss2sd (%rdi,%rax,4),%xmm0
  mov    %r14,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x3c(%rbp),%edx
  mov    -0x50(%rbp),%rdi
  add    %rdi,-0x48(%rbp)
  cmp    %r13d,%edx
  jg     L249
  mov    -0x58(%rbp),%rbx
L265:
  mov    %edx,%r10d
  sub    $0x1,%r10d
  js     L300
  mov    -0x50(%rbp),%rax
  movslq %r10d,%rdi
  mov    -0x78(%rbp),%r12
  mov    %edx,%esi
  pxor   %xmm2,%xmm2
  mov    %rax,%r8
  neg    %rax
  shr    $0x2,%r8
  mov    %rax,%r11
  mov    %r8,%rax
  lea    0x1(%r8),%r9
  imul   %rdi,%rax
  lea    (%rbx,%rax,4),%rcx
  cs nopw 0x0(%rax,%rax,1)
L135:
  mov    %edi,%r14d
  movslq %edi,%r13
  mov    %esi,%eax
  cmp    %edx,%esi
  jge    L260
  movslq %esi,%rax
  movaps %xmm2,%xmm1
  cs nopw 0x0(%rax,%rax,1)
L301:
  movss  (%rcx,%rax,4),%xmm0
  mulss  (%r12,%rax,4),%xmm0
  add    $0x1,%rax
  addss  %xmm0,%xmm1
  cmp    %eax,%edx
  jg     L301
  lea    (%r10,%rsi,1),%eax
  sub    %r14d,%eax
L173:
  mov    %r13,%r14
  imul   %r9,%r13
  cltq
  add    %r11,%rcx
  imul   %r8,%r14
  add    %r14,%rax
  movss  (%rbx,%rax,4),%xmm0
  subss  %xmm1,%xmm0
  divss  (%rbx,%r13,4),%xmm0
  movss  %xmm0,(%r12,%rdi,4)
  sub    $0x1,%rdi
  sub    $0x1,%esi
  jne    L135
L300:
  lea    D42(%rip),%rdi
  xor    %ebx,%ebx
  lea    D67(%rip),%r12
  call   <puts@plt>
  mov    -0x3c(%rbp),%eax
  mov    -0x78(%rbp),%r13
  test   %eax,%eax
  jle    L241
  nop
L168:
  mov    %ebx,%esi
  pxor   %xmm0,%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  cvtss2sd 0x0(%r13,%rbx,4),%xmm0
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,-0x3c(%rbp)
  jg     L168
L241:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L149
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L260:
  movaps %xmm2,%xmm1
  jmp    L173
L205:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L102
L149:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D89
type: string
name: retrieve_data
arguments: label: D66
type: string
name: retrieve_data
arguments: label: D43
type: string
name: retrieve_data
arguments: label: D79
type: string
name: retrieve_data
arguments: label: D12
type: string
name: retrieve_data
arguments: label: D50
type: string
name: retrieve_data
arguments: label: D81
type: string
name: retrieve_data
arguments: label: D42
type: string
name: retrieve_data
arguments: label: D67
type: string

tool: D89: Enter no of equations: 

tool: D66: %d

tool: D43: Enter row %d :


tool: D79: %f

tool: D12: Triangular Matrix: 

tool: D50: %f 	

tool: D81: | %f

tool: D42: Results: 

tool: D67: x[%d] = %f


assistant: ```c
int main() {
  int n, i, j, k, p;
  float t, sum;
  printf("Enter no of equations: \n");
  scanf("%d", &n);
  float A[n][n + 1];
  float X[n];
  for (i = 0; i < n; i++) {
    printf("Enter row %d :\n", i + 1);
    for (j = 0; j < n + 1; j++)
      scanf("%f", &A[i][j]);
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      if (fabs(A[j][i] - A[i][i]) > 0)
        p = j;
    }
    for (j = 0; j < n + 1; j++) {
      t = A[i][j];
      A[i][j] = A[p][j];
      A[p][j] = t;
    }
    for (j = i + 1; j < n; j++) {
      float x = A[j][i] / A[i][i];
      for (k = 0; k < n + 1; k++) {
        A[j][k] = A[j][k] - A[i][k] * x;
      }
    }
  }
  printf("Triangular Matrix: \n");
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++)
      printf("%f \t", A[i][j]);
    printf("| %f", A[i][j]);
    printf("\n");
  }
  for (i = n - 1; i >= 0; i--) {
    sum = 0;
    for (j = i + 1; j < n; j++) {
      sum += A[i][j] * X[j];
    }
    X[i] = (A[i][j] - sum) / A[i][i];
  }
  printf("Results: \n");
  for (i = 0; i < n; i++)
    printf("x[%d] = %f\n", i, X[i]);
  return 0;
}
```