user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L85
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L85
  mov    -0x30(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L85
  mov    -0x30(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L156
L85:
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L174
L156:
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D86(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L202
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D1(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L189
  movl   $0x1,-0x14(%rbp)
  jmp    L7
L189:
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D11(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L7
  movl   $0x2,-0x14(%rbp)
  jmp    L7
L202:
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D46(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L7
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D1(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L12
  movl   $0x3,-0x14(%rbp)
  jmp    L7
L12:
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D11(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L7
  movl   $0x4,-0x14(%rbp)
L7:
  mov    -0x30(%rbp),%rax
  mov    0x18(%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    0x20(%rax),%rax
  mov    %rax,-0x8(%rbp)
  cmpl   $0x1,-0x14(%rbp)
  jne    L197
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <encryptECB@plt>
  mov    $0x0,%eax
  jmp    L174
L197:
  cmpl   $0x2,-0x14(%rbp)
  jne    L70
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <encryptCBC@plt>
  mov    $0x0,%eax
  jmp    L174
L70:
  cmpl   $0x3,-0x14(%rbp)
  jne    L122
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <decryptECB@plt>
  mov    $0x0,%eax
  jmp    L174
L122:
  cmpl   $0x4,-0x14(%rbp)
  jne    L163
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <decryptCBC@plt>
  mov    $0x0,%eax
  jmp    L174
L163:
  mov    $0x0,%eax
L174:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D30
type: string
name: disassemble_data
arguments: tag: D66
type: string
name: disassemble_data
arguments: tag: D86
type: string
name: disassemble_data
arguments: tag: D1
type: string
name: disassemble_data
arguments: tag: D11
type: string
name: disassemble_data
arguments: tag: D46
type: string
name: disassemble_data
arguments: tag: D7
type: string
name: disassemble_data
arguments: tag: D15
type: string
name: disassemble_data
arguments: tag: D54
type: string
name: disassemble_data
arguments: tag: D35
type: string

tool: D30: Upss, something is wrong, check your parameters!


tool: D66: Correct format: encrypt/decrypt ecb/cbc inFileName outFileName


tool: D86: encrypt

tool: D1: ecb

tool: D11: cbc

tool: D46: decrypt

tool: D7: Start encrypting in ECB mode...


tool: D15: Start encrypting in CBC mode...


tool: D54: Start decrypting in ECB mode...


tool: D35: Start decrypting in CBC mode...


assistant: ```c
int main(int argc, char *argv[]) {
  if (argv[1] == NULL || argv[2] == NULL || argv[3] == NULL || argv[4] == NULL) {
    printf("Upss, something is wrong, check your parameters!\n");
    printf("Correct format: encrypt/decrypt ecb/cbc inFileName outFileName\n");
    return 1;
  }
  int mode;
  if (strcmp(argv[1], "encrypt") == 0) {
    if (strcmp(argv[2], "ecb") == 0) {
      mode = 1;
    } else if (strcmp(argv[2], "cbc") == 0) {
      mode = 2;
    }
  } else if (strcmp(argv[1], "decrypt") == 0) {
    if (strcmp(argv[2], "ecb") == 0) {
      mode = 3;
    } else if (strcmp(argv[2], "cbc") == 0) {
      mode = 4;
    }
  }
  char *inFile = argv[3];
  char *outFile = argv[4];
  if (mode == 1) {
    printf("Start encrypting in ECB mode...\n");
    encryptECB(inFile, outFile);
    return 0;
  }
  if (mode == 2) {
    printf("Start encrypting in CBC mode...\n");
    encryptCBC(inFile, outFile);
    return 0;
  }
  if (mode == 3) {
    printf("Start decrypting in ECB mode...\n");
    decryptECB(inFile, outFile);
    return 0;
  }
  if (mode == 4) {
    printf("Start decrypting in CBC mode...\n");
    decryptCBC(inFile, outFile);
    return 0;
  }
  return 0;
}
```