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

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  lea    -0x8000(%rsp),%r11
L33:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L33
  sub    $0x28,%rsp
  lea    D86(%rip),%rdx
  lea    D25(%rip),%rsi
  lea    D51(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8018(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  movb   $0x0,0x10(%rsp)
  mov    %rbp,%rcx
  call   <task1@plt>
  cmpb   $0x0,0x10(%rsp)
  je     L39
  mov    %rbp,%rsi
  lea    D20(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4010(%rsp),%r12
  lea    0xc(%rsp),%rcx
  mov    %rbp,%rdi
  lea    D24(%rip),%rsi
  mov    %r12,%rdx
  call   <task2@plt>
  mov    0xc(%rsp),%esi
  test   %esi,%esi
  jle    L10
  lea    D5(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0xc(%rsp),%edx
  mov    %r12,%rsi
  lea    D36(%rip),%rdi
  call   <write_file@plt>
  mov    0xc(%rsp),%esi
  lea    D8(%rip),%rdx
  mov    %r12,%rdi
  call   <task3@plt>
  mov    $0xa,%edi
  mov    %eax,%ebp
  call   <putchar@plt>
  cmp    $0x1,%ebp
  sbb    %eax,%eax
  and    $0x3,%eax
L40:
  mov    0x8018(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L55
  add    $0x8028,%rsp
  pop    %rbp
  pop    %r12
  ret
L39:
  lea    D80(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L40
L10:
  mov    $0x2,%eax
  jmp    L40
L55:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D86
data_type: string
name: extract_symbolic_data
arguments: data_tag: D25
data_type: string
name: extract_symbolic_data
arguments: data_tag: D51
data_type: string
name: extract_symbolic_data
arguments: data_tag: D20
data_type: string
name: extract_symbolic_data
arguments: data_tag: D24
data_type: string
name: extract_symbolic_data
arguments: data_tag: D5
data_type: string
name: extract_symbolic_data
arguments: data_tag: D36
data_type: string
name: extract_symbolic_data
arguments: data_tag: D8
data_type: string
name: extract_symbolic_data
arguments: data_tag: D80
data_type: string

tool: D86: s73331-sig.bin

tool: D25: pubkey.pem

tool: D51: s73331-cipher0%i.bin

tool: D20: 
Progressing with cipher file %s


tool: D24: s73331-key.bin

tool: D5: 
Wrote %i bytes to file plain.pdf


tool: D36: plain.pdf

tool: D8: s73331-hash.bin

tool: D80: No signature matched.
Exiting.

assistant: ```c
int main() {
  char *cipher_file_name_template = "s73331-cipher0%i.bin";
  char *key_file_name = "s73331-key.bin";
  char *pubkey_file_name = "pubkey.pem";
  char *signature_file_name = "s73331-sig.bin";
  char *hash_output_file_name = "s73331-hash.bin";
  char right_cipher_file_name[16384];
  right_cipher_file_name[0] = 0;
  task1(cipher_file_name_template, pubkey_file_name, signature_file_name, right_cipher_file_name);
  if (right_cipher_file_name[0] == 0) {
    printf("No signature matched.\nExiting.");
    return 1;
  }
  printf("\nProgressing with cipher file %s\n", right_cipher_file_name);
  unsigned char buf_plain[16384];
  int bytes_out;
  task2(right_cipher_file_name, key_file_name, buf_plain, &bytes_out);
  if (bytes_out > 0) {
    printf("\nWrote %i bytes to file plain.pdf\n", bytes_out);
    write_file("plain.pdf", buf_plain, bytes_out);
  } else {
    return 2;
  }
  int result = task3(buf_plain, bytes_out, hash_output_file_name);
  printf("\n");
  if (result == 0)
    return 3;
  return 0;
}
```