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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x61000(%rsp),%r11
L97:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L97
  sub    $0xad0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L59:
  lea    D124(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x61ac0(%rbp),%rax
  mov    %rax,%rsi
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x61ac0(%rbp),%eax
  cmp    $0x3,%eax
  je     L24
  cmp    $0x3,%eax
  jg     L59
  cmp    $0x1,%eax
  je     L67
  cmp    $0x2,%eax
  je     L72
  jmp    L73
L67:
  lea    D100(%rip),%rax
  mov    %rax,%rsi
  lea    D101(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x61ab8(%rbp)
  movl   $0x64,-0x61abc(%rbp)
  jmp    L61
L11:
  mov    -0x61abc(%rbp),%edx
  lea    -0x61a90(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <fnGenRandInput@plt>
  lea    -0x61aa0(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x61a98(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x61aa0(%rbp),%xmm0
  movsd  D79(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x61ab0(%rbp)
  mov    -0x61abc(%rbp),%edx
  lea    -0x61a90(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <fnInsertionSort@plt>
  lea    -0x61aa0(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x61a98(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x61aa0(%rbp),%xmm0
  movsd  D79(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x61aa8(%rbp)
  movsd  -0x61aa8(%rbp),%xmm0
  subsd  -0x61ab0(%rbp),%xmm0
  movq   %xmm0,%rcx
  mov    -0x61abc(%rbp),%edx
  mov    -0x61ab8(%rbp),%rax
  movq   %rcx,%xmm0
  lea    D125(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  addl   $0x64,-0x61abc(%rbp)
L61:
  cmpl   $0x270f,-0x61abc(%rbp)
  jle    L11
  mov    -0x61ab8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D126(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L73
L72:
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x61ac4(%rbp),%rax
  mov    %rax,%rsi
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D72(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x61ac4(%rbp),%edx
  lea    -0x61a90(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <fnGenRandInput@plt>
  mov    -0x61ac4(%rbp),%edx
  lea    -0x61a90(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <fnDispArray@plt>
  mov    -0x61ac4(%rbp),%edx
  lea    -0x61a90(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <fnInsertionSort@plt>
  lea    D95(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x61ac4(%rbp),%edx
  lea    -0x61a90(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <fnDispArray@plt>
  jmp    L73
L24:
  mov    $0x0,%edi
  call   <exit@plt>
L73:
  jmp    L59
```

tool_calls: name: read_data
arguments: data_tag: D124
type: string
name: read_data
arguments: data_tag: D66
type: string
name: read_data
arguments: data_tag: D82
type: string
name: read_data
arguments: data_tag: D100
type: string
name: read_data
arguments: data_tag: D101
type: string
name: read_data
arguments: data_tag: D79
type: f64
name: read_data
arguments: data_tag: D125
type: string
name: read_data
arguments: data_tag: D126
type: string
name: read_data
arguments: data_tag: D56
type: string
name: read_data
arguments: data_tag: D72
type: string
name: read_data
arguments: data_tag: D95
type: string

tool: D124: 
1.Plot the Graph
2.InsertionSort
3.Exit

tool: D66: 
Enter your choice


tool: D82: %d

tool: D100: w

tool: D101: InsertionPlot.dat

tool: D79: 1000000

tool: D125: %d	%lf


tool: D126: 
Data File generated and stored in file < InsertionPlot.dat >.
 Use a plotting utility


tool: D56: 
Enter the number of elements to sort


tool: D72: 
Unsorted Array


tool: D95: 
Sorted Array


assistant: ```c
int main(void) {
  FILE *fp;
  struct timeval tv;
  double dStart, dEnd;
  int iaArr[100000], iNum, iPos, iKey, i, iChoice;
  for (;;) {
    printf("\n1.Plot the Graph\n2.InsertionSort\n3.Exit");
    printf("\nEnter your choice\n");
    scanf("%d", &iChoice);
    switch (iChoice) {
    case 1:
      fp = fopen("InsertionPlot.dat", "w");
      for (i = 100; i < 10000; i += 100) {
        fnGenRandInput(iaArr, i);
        gettimeofday(&tv, NULL);
        dStart = tv.tv_sec + (tv.tv_usec / 1000000.0);
        fnInsertionSort(iaArr, i);
        gettimeofday(&tv, NULL);
        dEnd = tv.tv_sec + (tv.tv_usec / 1000000.0);
        fprintf(fp, "%d\t%lf\n", i, dEnd - dStart);
      }
      fclose(fp);
      printf("\nData File generated and stored in file < InsertionPlot.dat >.\n Use a plotting utility\n");
      break;
    case 2:
      printf("\nEnter the number of elements to sort\n");
      scanf("%d", &iNum);
      printf("\nUnsorted Array\n");
      fnGenRandInput(iaArr, iNum);
      fnDispArray(iaArr, iNum);
      fnInsertionSort(iaArr, iNum);
      printf("\nSorted Array\n");
      fnDispArray(iaArr, iNum);
      break;
    case 3:
      exit(0);
    }
  }
  return 0;
}
```