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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    0x8(%rsi),%rdi
  test   %rdi,%rdi
  je     L96
  cmpq   $0x0,0x10(%rsi)
  mov    %rsi,%rbx
  je     L96
  cmpq   $0x0,0x18(%rsi)
  je     L96
  cmpq   $0x0,0x20(%rsi)
  je     L96
  lea    D30(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L110
  mov    0x10(%rbx),%rdi
  lea    D115(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L72
  mov    0x18(%rbx),%r13
  mov    0x20(%rbx),%r12
L95:
  lea    D58(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <encryptECB@plt>
  xor    %eax,%eax
  jmp    L50
L96:
  lea    D54(%rip),%rdi
  call   <printf@plt>
  lea    D97(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
L50:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L110:
  mov    0x8(%rbx),%rdi
  lea    D112(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L150
L120:
  mov    0x18(%rbx),%r13
  mov    0x20(%rbx),%r12
  cmp    $0x1,%ebp
  je     L95
L180:
  cmp    $0x2,%ebp
  je     L84
  cmp    $0x3,%ebp
  je     L97
  lea    D16(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <decryptCBC@plt>
  xor    %eax,%eax
  jmp    L50
L150:
  mov    0x10(%rbx),%rdi
  lea    D115(%rip),%rsi
  mov    $0x3,%ebp
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L75
L159:
  mov    0x18(%rbx),%r13
  mov    0x20(%rbx),%r12
  jmp    L180
L72:
  mov    0x10(%rbx),%rdi
  lea    D12(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L120
  mov    $0x2,%ebp
  jmp    L159
L97:
  lea    D50(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <decryptECB@plt>
  xor    %eax,%eax
  jmp    L50
L75:
  mov    0x10(%rbx),%rdi
  lea    D12(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L120
  mov    $0x4,%ebp
  jmp    L159
L84:
  lea    D20(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <encryptCBC@plt>
  xor    %eax,%eax
  jmp    L50
```

tool_calls: name: unpack_data
arguments: tag: D30
datatype: string
name: unpack_data
arguments: tag: D115
datatype: string
name: unpack_data
arguments: tag: D58
datatype: string
name: unpack_data
arguments: tag: D54
datatype: string
name: unpack_data
arguments: tag: D97
datatype: string
name: unpack_data
arguments: tag: D112
datatype: string
name: unpack_data
arguments: tag: D16
datatype: string
name: unpack_data
arguments: tag: D12
datatype: string
name: unpack_data
arguments: tag: D50
datatype: string
name: unpack_data
arguments: tag: D20
datatype: string

tool: D30: encrypt

tool: D115: ecb

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


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


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


tool: D112: decrypt

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


tool: D12: cbc

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


tool: D20: Start encrypting 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;
}
```