user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  cmp    $0x4,%edi
  je     L26
  lea    D44(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L26:
  mov    0x8(%rbx),%rdi
  call   <atoi@plt>
  mov    0x10(%rbx),%rdi
  lea    D49(%rip),%rsi
  mov    %eax,0x4(%rsp)
  mov    %eax,%r14d
  call   <fopen@plt>
  mov    0x18(%rbx),%rdi
  lea    D4(%rip),%rsi
  mov    %rax,0x8(%rsp)
  call   <fopen@plt>
  mov    $0x8,%edi
  mov    %rax,0x10(%rsp)
  call   <malloc@plt>
  mov    $0x8,%edi
  mov    %rax,%rbp
  call   <malloc@plt>
  mov    $0x8,%edi
  mov    %rax,%r12
  call   <malloc@plt>
  mov    %rax,%rcx
  mov    %rax,0x18(%rsp)
  mov    D13(%rip),%rax
  mov    %rax,(%rcx)
  movq   $0x0,0x0(%rbp)
  movq   $0x0,(%r12)
  test   %r14d,%r14d
  jle    L18
  xor    %r15d,%r15d
  lea    0x30(%rsp),%r14
  lea    0x20(%rsp),%rbx
  lea    0xa0(%rsp),%r13
  nopl   0x0(%rax)
L13:
  mov    0x8(%rsp),%rdi
  mov    %r14,%rdx
  lea    D11(%rip),%rsi
  add    $0x1,%r15d
  call   <fscanf@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <stringToBlock@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <convertToNum@plt>
  mov    0x18(%rsp),%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <encrypt@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <convertToBlock@plt>
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <blockToString@plt>
  mov    0x10(%rsp),%rdi
  mov    %r13,%rdx
  lea    D45(%rip),%rsi
  call   <fprintf@plt>
  cmp    %r15d,0x4(%rsp)
  jne    L13
L18:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  add    $0x118,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D44
type_guessed: string
name: disassemble_data
arguments: label: D49
type_guessed: string
name: disassemble_data
arguments: label: D4
type_guessed: string
name: disassemble_data
arguments: label: D13
type_guessed: byte[8]
name: disassemble_data
arguments: label: D11
type_guessed: string
name: disassemble_data
arguments: label: D45
type_guessed: string

tool: D44: Not enough args. eg : ./program <no of samples> <plain text> <cipher text>

tool: D49: r

tool: D4: w

tool: {"D13": [0x01,0x02,0x03,0x04,0x03,0x02,0x01,0x01]}

tool: D11: %s

tool: D45: %s


assistant: ```c
int main(int argc, char **argv) {
  if (argc != 4) {
    perror("Not enough args. eg : ./program <no of samples> <plain text> <cipher text>");
    exit(1);
  }
  int count = atoi(argv[1]);
  FILE *input = fopen(argv[2], "r");
  FILE *output = fopen(argv[3], "w");
  uint64_t *pt = malloc(sizeof(uint64_t) * 2);
  uint64_t *ct = malloc(sizeof(uint64_t) * 2);
  uint64_t *K = malloc(sizeof(uint64_t) * 2);
  unsigned char block[16];
  K[0] = 0x0807060504030201;
  K[1] = 0x0403020501010203;
  pt[0] = 0;
  pt[1] = 0;
  ct[0] = 0;
  ct[1] = 0;
  char cinp[100];
  char cout[100];
  int i = 0;
  for (i = 0; i < count; i++) {
    fscanf(input, "%s", cinp);
    stringToBlock(cinp, block);
    convertToNum(block, pt);
    encrypt(pt, ct, K);
    convertToBlock(block, ct);
    blockToString(block, cout);
    fprintf(output, "%s\n", cout);
  }
  return 0;
}
```