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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x148,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  cmp    $0x4,%edi
  je     L87
  mov    (%rsi),%rsi
  lea    D56(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
L87:
  mov    0x10(%rbp),%rcx
  mov    0x8(%rbp),%rdx
  lea    0x30(%rsp),%rbx
  lea    D81(%rip),%rsi
  mov    0x18(%rbp),%r8
  mov    %rbx,%rdi
  call   <sprintf@plt>
  lea    D72(%rip),%rsi
  mov    %rbx,%rdi
  call   <popen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L29
L45:
  pxor   %xmm2,%xmm2
  lea    0x14(%rsp),%r15
  lea    0x10(%rsp),%r14
  movss  %xmm2,(%rsp)
  lea    D11(%rip),%r13
  lea    D73(%rip),%r12
  movss  %xmm2,0x4(%rsp)
  jmp    L109
  nopl   (%rax)
L114:
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L99
L109:
  mov    %rbp,%rdx
  mov    $0xff,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L114
  mov    0x20(%rsp),%r12
  mov    %r12,%rax
  or     0x28(%rsp),%rax
  je     L65
  lea    0x20(%rsp),%rdi
  call   <ctime@plt>
  mov    %r12,%rdx
  lea    D53(%rip),%rdi
  pxor   %xmm0,%xmm0
  mov    %rax,%rsi
  mov    $0x1,%eax
  cvtss2sd 0x4(%rsp),%xmm0
  call   <printf@plt>
  mov    0x28(%rsp),%r12
  lea    0x28(%rsp),%rdi
  call   <ctime@plt>
  pxor   %xmm0,%xmm0
  lea    D17(%rip),%rdi
  mov    %rax,%rsi
  mov    %r12,%rdx
  mov    $0x1,%eax
  cvtss2sd (%rsp),%xmm0
  call   <printf@plt>
L5:
  mov    %rbp,%rdi
  call   <pclose@plt>
  xor    %edi,%edi
  call   <exit@plt>
  mov    0x138(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  add    $0x148,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L99:
  lea    0x18(%rsp),%r9
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %r13,%rsi
  mov    %r9,%rdx
  mov    %rbx,%rdi
  mov    %r9,0x8(%rsp)
  call   <sscanf@plt>
  mov    0x8(%rsp),%rdi
  call   <ctime@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  mov    %r12,%rdi
  mov    %rax,%rsi
  mov    $0x2,%eax
  cvtss2sd 0x10(%rsp),%xmm0
  cvtss2sd 0x14(%rsp),%xmm1
  call   <printf@plt>
  movss  0x10(%rsp),%xmm0
  comiss 0x4(%rsp),%xmm0
  jbe    L41
  mov    0x18(%rsp),%rax
  movss  %xmm0,0x4(%rsp)
  mov    %rax,0x20(%rsp)
L41:
  movss  0x14(%rsp),%xmm0
  comiss (%rsp),%xmm0
  jbe    L109
  mov    0x18(%rsp),%rax
  movss  %xmm0,(%rsp)
  mov    %rax,0x28(%rsp)
  jmp    L109
L65:
  lea    D27(%rip),%rdi
  call   <puts@plt>
  jmp    L5
L29:
  mov    %rbx,%rsi
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L45
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D56
type: string
name: unpack_data
arguments: tag: D81
type: string
name: unpack_data
arguments: tag: D72
type: string
name: unpack_data
arguments: tag: D11
type: string
name: unpack_data
arguments: tag: D73
type: string
name: unpack_data
arguments: tag: D53
type: string
name: unpack_data
arguments: tag: D17
type: string
name: unpack_data
arguments: tag: D27
type: string
name: unpack_data
arguments: tag: D12
type: string

tool: D56: usage: %s <rrd file> <start time> <end time>


tool: D81: rrdtool fetch %.128s AVERAGE -s %.32s -e %.32s

tool: D72: r

tool: D11: %lu: %f %f

tool: D73: %2.2f %2.2f %s

tool: D53: Max in: %2.2f at %s (%lu)


tool: D17: Max out: %2.2f at %s (%lu)


tool: D27: No valid data found

tool: D12: error %s


assistant: ```c
int main(int iArg, char **cArg) {
  FILE *pp;
  float fIn, fOut, fMaxIn = 0.0, fMaxOut = 0.0;
  char cBuf[256];
  long unsigned luDate = 0;
  long unsigned luMaxInDate = 0;
  long unsigned luMaxOutDate = 0;
  if (iArg != 4) {
    printf("usage: %s <rrd file> <start time> <end time>\n", cArg[0]);
    exit(0);
  }
  sprintf(cBuf, "rrdtool fetch %.128s AVERAGE -s %.32s -e %.32s", cArg[1], cArg[2], cArg[3]);
  pp = popen(cBuf, "r");
  if (pp == NULL) {
    printf("error %s\n", cBuf);
    exit(1);
  }
  while (fgets(cBuf, 255, pp) != NULL) {
    if (strchr(cBuf, ':')) {
      sscanf(cBuf, "%lu: %f %f", &luDate, &fIn, &fOut);
      printf("%2.2f %2.2f %s", fIn, fOut, ctime(&luDate));
      if (fIn > fMaxIn) {
        fMaxIn = fIn;
        luMaxInDate = luDate;
      }
      if (fOut > fMaxOut) {
        fMaxOut = fOut;
        luMaxOutDate = luDate;
      }
    }
  }
  if (luMaxInDate || luMaxOutDate) {
    printf("Max in: %2.2f at %s (%lu)\n", fMaxIn, ctime(&luMaxInDate), luMaxInDate);
    printf("Max out: %2.2f at %s (%lu)\n", fMaxOut, ctime(&luMaxOutDate), luMaxOutDate);
  } else {
    printf("No valid data found\n");
  }
  pclose(pp);
  exit(0);
  return (0);
}
```