user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1c0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1ac(%rbp)
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1b4(%rbp),%rax
  mov    %rax,%rsi
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x1b0(%rbp)
  jmp    L64
L76:
  lea    -0x1a0(%rbp),%rdx
  mov    -0x1b0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x1b0(%rbp)
L64:
  mov    -0x1b4(%rbp),%eax
  cmp    %eax,-0x1b0(%rbp)
  jl     L76
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x1b0(%rbp)
  jmp    L16
L91:
  mov    -0x1b0(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x1b0(%rbp)
L16:
  mov    -0x1b4(%rbp),%eax
  cmp    %eax,-0x1b0(%rbp)
  jl     L91
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1b8(%rbp),%rax
  mov    %rax,%rsi
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x1b0(%rbp)
  jmp    L23
L51:
  mov    -0x1b8(%rbp),%eax
  mov    %eax,-0x1a4(%rbp)
  movl   $0x0,-0x1a8(%rbp)
  jmp    L17
L69:
  mov    -0x1a4(%rbp),%eax
  add    %eax,-0x1a8(%rbp)
  addl   $0x1,-0x1ac(%rbp)
  mov    -0x1b0(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%eax
  cmp    %eax,-0x1a8(%rbp)
  jle    L17
  mov    -0x1a4(%rbp),%eax
  sub    %eax,-0x1a8(%rbp)
  subl   $0x1,-0x1a4(%rbp)
  subl   $0x1,-0x1ac(%rbp)
L17:
  mov    -0x1b0(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%eax
  cmp    %eax,-0x1a8(%rbp)
  jne    L69
  addl   $0x1,-0x1b0(%rbp)
L23:
  mov    -0x1b4(%rbp),%eax
  cmp    %eax,-0x1b0(%rbp)
  jl     L51
  mov    -0x1ac(%rbp),%eax
  mov    %eax,%esi
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L8
  call   <__stack_chk_fail@plt>
L8:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D89
type_guessed: string
name: parse_data
arguments: tag: D82
type_guessed: string
name: parse_data
arguments: tag: D30
type_guessed: string
name: parse_data
arguments: tag: D75
type_guessed: string
name: parse_data
arguments: tag: D66
type_guessed: string
name: parse_data
arguments: tag: D5
type_guessed: string
name: parse_data
arguments: tag: D51
type_guessed: string

tool: D89: Array size : 

tool: D82: %d

tool: D30: Elements to Array : 

tool: D75: Array   elements  : 

tool: D66: %d 

tool: D5: 
Threshold value   : 

tool: D51: count = %d


assistant: ```c
int main(void) {
  int a[100], i, th, n, count = 0, sum, temp;
  printf("Array size : ");
  scanf("%d", &n);
  printf("Elements to Array : ");
  for (i = 0; i < n; i++)
    scanf("%d", &a[i]);
  printf("Array   elements  : ");
  for (i = 0; i < n; i++)
    printf("%d ", a[i]);
  printf("\nThreshold value   : ");
  scanf("%d", &th);
  for (i = 0; i < n; i++) {
    temp = th;
    sum = 0;
    while (sum != a[i]) {
      sum += temp;
      count++;
      if (sum > a[i]) {
        sum -= temp;
        temp--;
        count--;
      }
    }
  }
  printf("count = %d\n", count);
  return 0;
}
```