user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    0x8(%rsi),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L8
  mov    %rsi,%rbx
  call   <atoi@plt>
  mov    0x10(%rbx),%rdi
  mov    %eax,%r12d
  test   %rdi,%rdi
  je     L68
  call   <atoi@plt>
  mov    $0x4,%esi
  mov    %eax,%edi
  mov    %eax,%ebp
  call   <calloc@plt>
  mov    %rax,0x18(%rsp)
  test   %rax,%rax
  je     L56
  test   %ebp,%ebp
  jle    L64
  mov    %rax,%rbx
  mov    %rax,%r13
  lea    0x24(%rsp),%rax
  xor    %r14d,%r14d
  mov    %rax,0x10(%rsp)
  lea    D29(%rip),%r15
  nopw   0x0(%rax,%rax,1)
L36:
  mov    %r15,%rsi
  lea    D18(%rip),%rdi
  add    $0x1,%r14d
  add    $0x4,%rbx
  call   <fopen@plt>
  mov    0x10(%rsp),%rdi
  mov    %rax,(%rsp)
  call   <timer_start@plt>
  mov    (%rsp),%rsi
  mov    %r12d,%edi
  call   <do_task@plt>
  mov    0x24(%rsp),%edi
  call   <timer_end@plt>
  pxor   %xmm0,%xmm0
  mov    %r14d,%esi
  lea    D38(%rip),%rdi
  cvtsi2ss %rax,%xmm0
  mov    $0x1,%eax
  divss  D11(%rip),%xmm0
  movss  %xmm0,-0x4(%rbx)
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  cmp    %ebp,%r14d
  jne    L36
  lea    -0x1(%rbp),%eax
  cmp    $0x2,%eax
  jbe    L11
  mov    %ebp,%eax
  mov    0x18(%rsp),%rcx
  shr    $0x2,%eax
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x10(%rcx,%rax,1),%rax
  nop
L112:
  movups 0x0(%r13),%xmm0
  movss  0xc(%rsp),%xmm1
  add    $0x10,%r13
  addss  %xmm0,%xmm1
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm1
  addss  %xmm0,%xmm1
  movss  %xmm1,0xc(%rsp)
  cmp    %rax,%r13
  jne    L112
  mov    %ebp,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%bpl
  je     L64
L146:
  mov    0x18(%rsp),%rbx
  movslq %eax,%rdx
  movss  0xc(%rsp),%xmm4
  lea    0x0(,%rdx,4),%rcx
  addss  (%rbx,%rdx,4),%xmm4
  lea    0x1(%rax),%edx
  movss  %xmm4,0xc(%rsp)
  cmp    %edx,%ebp
  jle    L64
  addss  0x4(%rbx,%rcx,1),%xmm4
  add    $0x2,%eax
  movss  %xmm4,0xc(%rsp)
  cmp    %eax,%ebp
  jle    L64
  addss  0x8(%rbx,%rcx,1),%xmm4
  movss  %xmm4,0xc(%rsp)
L64:
  pxor   %xmm1,%xmm1
  movss  0xc(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D17(%rip),%rdi
  cvtsi2ss %ebp,%xmm1
  divss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  xor    %eax,%eax
L37:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L127
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L11:
  xor    %eax,%eax
  jmp    L146
L56:
  lea    D10(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
  jmp    L37
L8:
  lea    D43(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
  jmp    L37
L68:
  lea    D62(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
  jmp    L37
L127:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D29
type: string
name: extract_symbolic_data
arguments: tag: D18
type: string
name: extract_symbolic_data
arguments: tag: D38
type: string
name: extract_symbolic_data
arguments: tag: D11
type: byte[4]
name: extract_symbolic_data
arguments: tag: D17
type: string
name: extract_symbolic_data
arguments: tag: D10
type: string
name: extract_symbolic_data
arguments: tag: D43
type: string
name: extract_symbolic_data
arguments: tag: D62
type: string

tool: D29: w

tool: D18: hr_test.txt

tool: D38: (%d) Time taken in nano grade = %.3f ms


tool: {"D11": [0x00,0x24,0x74,0x49]}

tool: D17: -> Average: %.3f ms


tool: D10: No memory!

tool: D43: lack of do count!

tool: D62: lack of repeat count!

assistant: ```c
int main(int argc, char *argv[]) {
  struct timespec vartime;
  long timeElapsed = 0;
  float *result = NULL, total;
  int maxCnt = 0, repeatCnt = 0, doCnt = 0;
  FILE *record_fp = NULL;
  if (argv[1])
    maxCnt = atoi(argv[1]);
  else {
    printf("lack of do count!\n");
    return -1;
  }
  if (argv[2])
    repeatCnt = atoi(argv[2]);
  else {
    printf("lack of repeat count!\n");
    return -1;
  }
  if (!(result = (float *)calloc(repeatCnt, sizeof(float)))) {
    printf("No memory!\n");
    return -1;
  }
  for (doCnt = 0; doCnt < repeatCnt; doCnt++) {
    record_fp = fopen("hr_test"
                      ".txt",
                      "w");
    timer_start(&vartime);
    do_task(maxCnt, record_fp);
    timeElapsed = timer_end(vartime);
    result[doCnt] = (float)((float)timeElapsed / 1000000L);
    printf("(%d) Time taken in nano grade = %.3f ms\n", doCnt + 1, result[doCnt]);
  }
  for (doCnt = 0; doCnt < repeatCnt; doCnt++)
    total += result[doCnt];
  total /= repeatCnt;
  printf("-> Average: %.3f ms\n", total);
  return 0;
}
```