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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  cmpl   $0x1,-0x54(%rbp)
  jg     L18
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L21
L18:
  mov    -0x60(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D12(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x38(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  jne    L8
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%eax
  jmp    L21
L8:
  lea    -0x20(%rbp),%rcx
  lea    -0x44(%rbp),%rdx
  lea    -0x48(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <get_encks_der_file@plt>
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    -0x3c(%rbp),%rdi
  lea    -0x40(%rbp),%rcx
  lea    -0x20(%rbp),%rdx
  lea    -0x44(%rbp),%rsi
  lea    -0x48(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <make_session_key@plt>
  lea    -0x3c(%rbp),%rdx
  lea    -0x40(%rbp),%rsi
  lea    -0x30(%rbp),%rax
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <get_cryptogram@plt>
  lea    -0x3c(%rbp),%rdx
  lea    -0x40(%rbp),%rsi
  lea    -0x28(%rbp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <get_cryptogram@plt>
  lea    -0x30(%rbp),%rax
  mov    $0x8,%edx
  mov    %rax,%rsi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <print_hex@plt>
  lea    -0x28(%rbp),%rax
  mov    $0x8,%edx
  mov    %rax,%rsi
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <print_hex@plt>
  mov    $0x0,%eax
L21:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D23
datatype: string
name: read_data
arguments: data_label: D19
datatype: string
name: read_data
arguments: data_label: D30
datatype: string
name: read_data
arguments: data_label: D12
datatype: string
name: read_data
arguments: data_label: D32
datatype: string
name: read_data
arguments: data_label: D40
datatype: string
name: read_data
arguments: data_label: D34
datatype: string

tool: D23: Usage: ./%s <filename>


tool: D19: Put HC, CC, S ENC key, S MAC key to the file.

tool: D30: Bytes have to be seperated by white space.

tool: D12: r

tool: D32: fopen

tool: D40: Card Cryptogram

tool: D34: Host Cryptogram

assistant: ```c
int main(int argc, char *argv[]) {
  FILE *fd;
  char ccrgram[8];
  char hcrgram[8];
  char derdat[(8 * 2)] = {0};
  DES_key_schedule enc1, enc2;
  DES_key_schedule s_enc1, s_enc2;
  if (argc < 2) {
    printf("Usage: ./%s <filename>\n", argv[0]);
    printf("Put HC, CC, S ENC key, S MAC key to the file.\n");
    printf("Bytes have to be seperated by white space.\n");
    return 1;
  }
  fd = fopen(argv[1], "r");
  if (fd == NULL) {
    perror("fopen");
    return 1;
  }
  get_encks_der_file(fd, &enc1, &enc2, derdat);
  fclose(fd);
  make_session_key(&enc1, &enc2, derdat, &s_enc1, &s_enc2);
  get_cryptogram(ccrgram, &s_enc1, &s_enc2, 0);
  get_cryptogram(hcrgram, &s_enc1, &s_enc2, 1);
  print_hex("Card Cryptogram", ccrgram, 8);
  print_hex("Host Cryptogram", hcrgram, 8);
  return 0;
}
```