user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  lea    -0x7a1000(%rsp),%r11
L249:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L249
  sub    $0x288,%rsp
  lea    D14(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    -0x7a124c(%rbp),%rsi
  call   <scanf@plt>
  mov    -0x7a124c(%rbp),%ebx
  xor    %edi,%edi
  cmp    $0x3e7,%ebx
  lea    0x1(%rbx),%r15d
  setbe  %dil
  call   <assert@plt>
  xor    %edi,%edi
  cmp    $0x3e7,%r15d
  setbe  %dil
  call   <assert@plt>
  mov    -0x7a124c(%rbp),%edx
  test   %edx,%edx
  je     L16
  lea    -0x7a1240(%rbp),%rax
  lea    D68(%rip),%r12
  movl   $0x0,-0x7a1258(%rbp)
  mov    %rax,-0x7a12a8(%rbp)
  mov    %rax,-0x7a1280(%rbp)
  mov    %ebx,%eax
  lea    0x0(,%rax,8),%r13
  mov    %rax,-0x7a12b0(%rbp)
  lea    -0x7a1238(%rbp,%r13,1),%rax
  mov    %rax,-0x7a1290(%rbp)
  mov    %rax,%rbx
  mov    $0xfffffffffffffff8,%rax
  sub    %r13,%rax
  mov    %rax,-0x7a1260(%rbp)
L301:
  mov    -0x7a1260(%rbp),%rax
  lea    (%rax,%rbx,1),%r14
  test   %r15d,%r15d
  je     L48
  nopl   0x0(%rax,%rax,1)
L336:
  mov    %r14,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x8,%r14
  call   <scanf@plt>
  cmp    %rbx,%r14
  jne    L336
L48:
  addl   $0x1,-0x7a1258(%rbp)
  mov    -0x7a124c(%rbp),%edx
  add    $0x1f40,%rbx
  mov    -0x7a1258(%rbp),%eax
  cmp    %eax,%edx
  ja     L301
  test   %edx,%edx
  je     L378
  lea    -0x79f300(%rbp),%rax
  movq   $0x0,-0x7a1288(%rbp)
  mov    %rax,-0x7a1298(%rbp)
  mov    $0xfffffffffffffff8,%rax
  movq   $0x0,-0x7a12a0(%rbp)
  sub    %r13,%rax
  movl   $0x0,-0x7a126c(%rbp)
  mov    %rax,-0x7a1258(%rbp)
L289:
  mov    -0x7a126c(%rbp),%ebx
  xor    %eax,%eax
  lea    D17(%rip),%rdi
  mov    %ebx,%esi
  call   <printf@plt>
  mov    -0x7a1298(%rbp),%rax
  pxor   %xmm6,%xmm6
  mov    %ebx,%esi
  add    $0x1,%ebx
  movsd  -0x1f40(%rax),%xmm5
  mov    %ebx,-0x7a126c(%rbp)
  ucomisd %xmm6,%xmm5
  movsd  %xmm5,-0x7a1278(%rbp)
  jp     L29
  je     L184
L29:
  mov    -0x7a124c(%rbp),%edx
  mov    -0x7a126c(%rbp),%eax
  cmp    %eax,%edx
  jbe    L174
  mov    -0x7a1298(%rbp),%rsi
  mov    %eax,-0x7a1260(%rbp)
  lea    D22(%rip),%r12
  mov    %rsi,-0x7a1268(%rbp)
  nopw   0x0(%rax,%rax,1)
L223:
  mov    -0x7a1268(%rbp),%rax
  mov    -0x7a126c(%rbp),%edx
  movsd  (%rax),%xmm2
  movq   $0x0,(%rax)
  divsd  -0x7a1278(%rbp),%xmm2
  cmp    %edx,%r15d
  jbe    L205
  mov    -0x7a1280(%rbp),%rsi
  mov    -0x7a1288(%rbp),%rdi
  sub    %rax,%rsi
  xchg   %ax,%ax
L221:
  lea    (%rsi,%rax,1),%rcx
  movsd  0x8(%rax),%xmm0
  add    $0x1,%edx
  add    $0x8,%rax
  movsd  0x8(%rcx,%rdi,1),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  cmp    %edx,%r15d
  ja     L221
L205:
  mov    -0x7a1290(%rbp),%rbx
  xor    %r13d,%r13d
  nopl   0x0(%rax)
L41:
  mov    -0x7a1258(%rbp),%rax
  lea    (%rax,%rbx,1),%r14
  test   %r15d,%r15d
  je     L226
  nopl   0x0(%rax,%rax,1)
L208:
  movsd  (%r14),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  add    $0x8,%r14
  call   <printf@plt>
  cmp    %rbx,%r14
  jne    L208
L226:
  mov    $0xa,%edi
  add    $0x1,%r13d
  add    $0x1f40,%rbx
  call   <putchar@plt>
  cmp    %r13d,-0x7a124c(%rbp)
  ja     L41
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x7a1260(%rbp)
  mov    -0x7a124c(%rbp),%edx
  mov    -0x7a1260(%rbp),%eax
  addq   $0x1f40,-0x7a1268(%rbp)
  cmp    %eax,%edx
  ja     L223
  addq   $0x1,-0x7a12a0(%rbp)
  addq   $0x8,-0x7a1280(%rbp)
  addq   $0x1f40,-0x7a1288(%rbp)
  addq   $0x1f48,-0x7a1298(%rbp)
  cmp    -0x7a126c(%rbp),%edx
  ja     L289
L174:
  mov    %edx,%eax
  mov    %rsp,%rcx
  lea    0xf(,%rax,8),%rax
  shr    $0x4,%rax
  shl    $0x4,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  sub    %rsi,%rcx
L419:
  cmp    %rcx,%rsp
  je     L64
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L419
L184:
  mov    -0x7a124c(%rbp),%ecx
  mov    %ebx,%edx
  cmp    %ebx,%ecx
  ja     L1
  jmp    L198
  nopl   0x0(%rax)
L234:
  add    $0x1,%edx
  add    $0x1f40,%rax
  cmp    %edx,%ecx
  jbe    L198
L1:
  movsd  (%rax),%xmm0
  pxor   %xmm4,%xmm4
  ucomisd %xmm4,%xmm0
  jp     L72
  je     L234
L72:
  mov    -0x7a12a0(%rbp),%rcx
  cmp    %ecx,%r15d
  jbe    L296
  movslq %edx,%rax
  mov    %esi,%edi
  imul   $0x3e8,%rax,%rax
  add    %rcx,%rax
  mov    -0x7a12a8(%rbp),%rcx
  lea    (%rcx,%rax,8),%rcx
  mov    -0x7a1298(%rbp),%rax
  sub    $0x1f40,%rax
  jmp    L375
L201:
  movsd  (%rax),%xmm6
  movsd  (%rcx),%xmm0
  movsd  %xmm6,-0x7a1278(%rbp)
L375:
  movsd  -0x7a1278(%rbp),%xmm7
  add    $0x1,%edi
  add    $0x8,%rcx
  add    $0x8,%rax
  movsd  %xmm7,-0x8(%rcx)
  movsd  %xmm0,-0x8(%rax)
  cmp    %edi,%r15d
  ja     L201
L296:
  lea    D74(%rip),%rdi
  xor    %eax,%eax
  xor    %r13d,%r13d
  call   <printf@plt>
  mov    -0x7a124c(%rbp),%eax
  mov    -0x7a1290(%rbp),%rbx
  lea    D22(%rip),%r12
  test   %eax,%eax
  je     L239
L213:
  mov    -0x7a1258(%rbp),%rax
  lea    (%rax,%rbx,1),%r14
  test   %r15d,%r15d
  je     L96
  nopl   0x0(%rax)
L204:
  movsd  (%r14),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  add    $0x8,%r14
  call   <printf@plt>
  cmp    %rbx,%r14
  jne    L204
L96:
  mov    $0xa,%edi
  add    $0x1,%r13d
  add    $0x1f40,%rbx
  call   <putchar@plt>
  cmp    %r13d,-0x7a124c(%rbp)
  ja     L213
L239:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x7a1298(%rbp),%rax
  movsd  -0x1f40(%rax),%xmm7
  movsd  %xmm7,-0x7a1278(%rbp)
  jmp    L29
L198:
  lea    D49(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  mov    -0x7a1298(%rbp),%rax
  movsd  -0x1f40(%rax),%xmm6
  movsd  %xmm6,-0x7a1278(%rbp)
  jmp    L29
L64:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L194
L175:
  mov    %rsp,%rsi
  lea    -0x1(%rdx),%r13d
  mov    %rsi,%r10
  test   %edx,%edx
  je     L319
  movslq %r13d,%r9
  lea    -0x2(%rdx),%r12d
  mov    -0x7a12a8(%rbp),%rcx
  movslq %r12d,%r8
  imul   $0x3e8,%r9,%rax
  lea    -0x1(%r9),%r15
  mov    %r9,%rdi
  add    -0x7a12b0(%rbp),%rax
  imul   $0x1f48,%r9,%r11
  sub    %r8,%rdi
  imul   $0x1f40,%r8,%rbx
  lea    (%rsi,%rdi,8),%r14
  movsd  -0x7a1240(%rbp,%rax,8),%xmm1
  imul   $0x1f40,%r9,%rax
  add    %rcx,%r11
  sub    %rax,%rbx
  lea    -0x1f40(%rcx,%rax,1),%rcx
L368:
  divsd  (%r11),%xmm1
  movsd  %xmm1,(%r14,%r8,8)
  cmp    $0xffffffff,%r8d
  je     L319
  mov    -0x7a12b0(%rbp),%rdi
  lea    (%rcx,%rbx,1),%rax
  movsd  0x1f40(%rax,%rdi,8),%xmm1
  cmp    %r8d,%r13d
  jle    L94
  mov    %r12d,%eax
  mov    %r15,%rdi
  sub    %r8d,%eax
  sub    %rax,%rdi
  mov    %r9,%rax
L303:
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  sub    $0x1,%rax
  subsd  %xmm0,%xmm1
  cmp    %rax,%rdi
  jne    L303
L94:
  sub    $0x1,%r8
  sub    $0x1f48,%r11
  sub    $0x1f40,%rcx
  jmp    L368
L16:
  xor    %edx,%edx
L378:
  lea    -0x7a1248(%rbp),%r10
L319:
  mov    %r10,%r12
  xor    %ebx,%ebx
  lea    D12(%rip),%r13
  test   %edx,%edx
  je     L169
L27:
  movsd  (%r12),%xmm0
  add    $0x1,%ebx
  mov    %r13,%rdi
  add    $0x8,%r12
  mov    %ebx,%esi
  mov    $0x1,%eax
  call   <printf@plt>
  cmp    %ebx,-0x7a124c(%rbp)
  ja     L27
L169:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L202
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L194:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L175
L202:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D14
datatype: string
name: extract_symbolic_data
arguments: data_tag: D68
datatype: string
name: extract_symbolic_data
arguments: data_tag: D17
datatype: string
name: extract_symbolic_data
arguments: data_tag: D22
datatype: string
name: extract_symbolic_data
arguments: data_tag: D74
datatype: string
name: extract_symbolic_data
arguments: data_tag: D49
datatype: string
name: extract_symbolic_data
arguments: data_tag: D12
datatype: string

tool: D14: %d

tool: D68: %lf

tool: D17: 
Row %d
------


tool: D22: %lf	

tool: D74: Pivoting row %d with row %d



tool: D49: Cannot pivot. Exiting

tool: D12: 
Value of x[%d] is %lf

assistant: ```c
int main() {
  unsigned int rows, columns;
  scanf("%d", &rows);
  columns = rows + 1;
  assert(rows < 1000);
  assert(columns < 1000);
  double matrix[1000][1000];
  int i, j;
  for (i = 0; i < rows; i++) {
    for (j = 0; j < columns; j++) {
      scanf("%lf", &matrix[i][j]);
    }
  }
  double pivot, coefficient, swap;
  int k, l, m, flag;
  int temp1, temp2;
  for (i = 0; i < rows; i++) {
    printf("\nRow %d\n------\n", i);
    if (matrix[i][i] == 0) {
      flag = 0;
      for (l = i + 1; l < rows; l++) {
        if (matrix[l][i] != 0) {
          flag = 1;
          for (m = i; m < columns; m++) {
            swap = matrix[l][m];
            matrix[l][m] = matrix[i][m];
            matrix[i][m] = swap;
          }
          printf("Pivoting row %d with row %d\n\n", i, l);
          for (temp1 = 0; temp1 < rows; temp1++) {
            for (temp2 = 0; temp2 < columns; temp2++) {
              printf("%lf\t", matrix[temp1][temp2]);
            }
            printf("\n");
          }
          printf("\n");
          break;
        }
      }
      if (!flag) {
        printf("Cannot pivot. Exiting");
        exit(1);
      }
    }
    pivot = matrix[i][i];
    for (j = i + 1; j < rows; j++) {
      coefficient = matrix[j][i] / pivot;
      matrix[j][i] = 0;
      for (k = i + 1; k < columns; k++) {
        matrix[j][k] -= coefficient * matrix[i][k];
      }
      for (temp1 = 0; temp1 < rows; temp1++) {
        for (temp2 = 0; temp2 < columns; temp2++) {
          printf("%lf\t", matrix[temp1][temp2]);
        }
        printf("\n");
      }
      printf("\n");
    }
  }
  double result[rows];
  double sum;
  for (i = rows - 1; i >= 0; i--) {
    sum = matrix[i][columns - 1];
    for (j = rows - 1; j > i; j--) {
      sum -= matrix[i][j] * result[j];
    }
    result[i] = sum / matrix[i][i];
  }
  for (i = 0; i < rows; i++) {
    printf("\nValue of x[%d] is %lf", i + 1, result[i]);
  }
  return 0;
}
```