user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  cmpl   $0x3,-0x24(%rbp)
  jne    L20
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L64
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <crc32@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L90
L64:
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D32(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L77
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <crc64@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L90
L77:
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L124
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <getFileSize@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L90
L124:
  mov    $0x1,%eax
  jmp    L90
L20:
  cmpl   $0x4,-0x24(%rbp)
  jne    L148
  mov    -0x30(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  lea    D41(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L115
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fcompare@plt>
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jne    L91
  lea    D111(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L32
L91:
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L32
L115:
  mov    $0x1,%eax
  jmp    L90
L148:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D110(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L90
L32:
  mov    $0x0,%eax
L90:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D66
data_type: string
name: unpack_data
arguments: label: D20
data_type: string
name: unpack_data
arguments: label: D32
data_type: string
name: unpack_data
arguments: label: D24
data_type: string
name: unpack_data
arguments: label: D40
data_type: string
name: unpack_data
arguments: label: D41
data_type: string
name: unpack_data
arguments: label: D111
data_type: string
name: unpack_data
arguments: label: D87
data_type: string
name: unpack_data
arguments: label: D110
data_type: string
name: unpack_data
arguments: label: D16
data_type: string
name: unpack_data
arguments: label: D84
data_type: string
name: unpack_data
arguments: label: D56
data_type: string

tool: D66: -CRC32

tool: D20: %lu

tool: D32: -CRC64

tool: D24: %llu

tool: D40: -SIZE

tool: D41: -COMP

tool: D111: same

tool: D87: different

tool: D110: please use: %s filename -CRC32 


tool: D16: please use: %s filename -CRC64 


tool: D84: please use: %s filename1 filename2 -COMP 


tool: D56: please use: %s filename1 -SIZE 


assistant: ```c
int main(int argc, const char *argv[]) {
  if (argc == 3) {
    if (strcmp(argv[2], "-CRC32") == 0) {
      unsigned long crcres = crc32(argv[1]);
      printf("%lu", crcres);
      return 0;
    } else if (strcmp(argv[2], "-CRC64") == 0) {
      uint64_t crcres = crc64(argv[1]);
      printf("%llu", crcres);
      return 0;
    } else if (strcmp(argv[2], "-SIZE") == 0) {
      unsigned long fsize = getFileSize(argv[1]);
      printf("%lu", fsize);
      return 0;
    } else {
      return 1;
    }
  } else if (argc == 4) {
    if (strcmp(argv[3], "-COMP") == 0) {
      int ret = fcompare(argv[1], argv[2]);
      if (ret == 0)
        printf("same");
      else
        printf("different");
    } else {
      return 1;
    }
  } else {
    printf("please use: %s filename -CRC32 \n", argv[0]);
    printf("please use: %s filename -CRC64 \n", argv[0]);
    printf("please use: %s filename1 filename2 -COMP \n", argv[0]);
    printf("please use: %s filename1 -SIZE \n", argv[0]);
    return 1;
  }
  return 0;
}
```