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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1b0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x1b0(%rbp),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x1b0(%rbp),%eax
  mov    %eax,%esi
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x1ac(%rbp)
  jmp    L95
L54:
  lea    -0x1a0(%rbp),%rdx
  mov    -0x1ac(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x1ac(%rbp)
L95:
  mov    -0x1b0(%rbp),%eax
  cmp    %eax,-0x1ac(%rbp)
  jl     L54
  movl   $0x0,-0x1ac(%rbp)
  jmp    L88
L56:
  movl   $0x0,-0x1a8(%rbp)
  jmp    L66
L68:
  mov    -0x1a8(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%edx
  mov    -0x1a8(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  jle    L76
  mov    -0x1a8(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%eax
  mov    %eax,-0x1a4(%rbp)
  mov    -0x1a8(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%edx
  mov    -0x1a8(%rbp),%eax
  cltq
  mov    %edx,-0x1a0(%rbp,%rax,4)
  mov    -0x1a8(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    -0x1a4(%rbp),%edx
  mov    %edx,-0x1a0(%rbp,%rax,4)
L76:
  addl   $0x1,-0x1a8(%rbp)
L66:
  mov    -0x1b0(%rbp),%eax
  sub    -0x1ac(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x1a8(%rbp)
  jl     L68
  addl   $0x1,-0x1ac(%rbp)
L88:
  mov    -0x1b0(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x1ac(%rbp)
  jl     L56
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x1ac(%rbp)
  jmp    L50
L45:
  mov    -0x1ac(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x1ac(%rbp)
L50:
  mov    -0x1b0(%rbp),%eax
  cmp    %eax,-0x1ac(%rbp)
  jl     L45
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L96
  call   <__stack_chk_fail@plt>
L96:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D40
type_guessed: string
name: unpack_data
arguments: data_tag: D4
type_guessed: string
name: unpack_data
arguments: data_tag: D50
type_guessed: string
name: unpack_data
arguments: data_tag: D43
type_guessed: string
name: unpack_data
arguments: data_tag: D38
type_guessed: string

tool: D40: Enter number of elements

tool: D4: %d

tool: D50: Enter %d integers


tool: D43: Sorted list:

tool: D38: %d


assistant: ```c
int main() {
  int array[100], n, c, d, swap;
  printf("Enter number of elements\n");
  scanf("%d", &n);
  printf("Enter %d integers\n", n);
  for (c = 0; c < n; c++)
    scanf("%d", &array[c]);
  for (c = 0; c < (n - 1); c++) {
    for (d = 0; d < n - c - 1; d++) {
      if (array[d] > array[d + 1]) {
        swap = array[d];
        array[d] = array[d + 1];
        array[d + 1] = swap;
      }
    }
  }
  printf("Sorted list:\n");
  for (c = 0; c < n; c++)
    printf("%d\n", array[c]);
  return 0;
}
```