user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x3,%edi
  je     L99
  lea    D35(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <exit@plt>
L99:
  mov    0x8(%rbx),%rdi
  lea    D18(%rip),%rbp
  xor    %r13d,%r13d
  lea    0x14(%rsp),%r14
  mov    %rbp,%rsi
  call   <fopen@plt>
  mov    0x10(%rbx),%rdi
  mov    %rbp,%rsi
  lea    0x16(%rsp),%rbx
  mov    %rax,%r12
  call   <fopen@plt>
  mov    %rax,%rbp
  nopw   0x0(%rax,%rax,1)
L3:
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x2,%esi
  mov    %r14,%rdi
  call   <fread@plt>
  mov    %rbp,%rcx
  mov    $0x1,%edx
  mov    %rbx,%rdi
  mov    $0x2,%esi
  mov    %eax,%r15d
  call   <fread@plt>
  movswl 0x14(%rsp),%ecx
  movswl 0x16(%rsp),%edx
  mov    %r15d,%edi
  mov    %ecx,%esi
  sub    %edx,%esi
  or     %eax,%edi
  je     L22
  test   %r15d,%r15d
  je     L44
  test   %eax,%eax
  je     L44
L10:
  sub    %ecx,%edx
  test   %esi,%esi
  cmovs  %edx,%esi
  cmp    $0x1,%esi
  jg     L56
  test   %esi,%esi
  je     L3
  add    $0x1,%r13d
  jmp    L3
  nopl   (%rax)
L56:
  lea    D39(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%r13d
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L3
  nopl   0x0(%rax)
L44:
  lea    D3(%rip),%rdi
  mov    %esi,0xc(%rsp)
  mov    %edx,0x8(%rsp)
  mov    %ecx,0x4(%rsp)
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  mov    0xc(%rsp),%esi
  mov    0x8(%rsp),%edx
  mov    0x4(%rsp),%ecx
  jmp    L10
  nopl   0x0(%rax,%rax,1)
L22:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  lea    D8(%rip),%rdi
  xor    %eax,%eax
  mov    %r13d,%esi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L80
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L80:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D35
datatype: string
name: parse_data
arguments: label: D18
datatype: string
name: parse_data
arguments: label: D39
datatype: string
name: parse_data
arguments: label: D3
datatype: string
name: parse_data
arguments: label: D8
datatype: string

tool: D35: compare <file1> <file2>

tool: D18: rb

tool: D39: FATAL error, too large differnce found (%d)!


tool: D3: FATAL error, files have different size!

tool: D8: %d (+/-1)differences found


assistant: ```c
int main(int argc, char **argv) {
  FILE *f0, *f1;
  int dif = 0;
  if (argc != 3) {
    printf("compare <file1> <file2>\n");
    exit(2);
  }
  f0 = fopen(argv[1], "rb");
  f1 = fopen(argv[2], "rb");
  for (;;) {
    short c0;
    short c1;
    int d;
    int e0 = fread(&c0, 2, 1, f0);
    int e1 = fread(&c1, 2, 1, f1);
    d = c0 - c1;
    if (e0 == 0 && e1 == 0)
      break;
    if (e0 == 0 || e1 == 0) {
      printf("FATAL error, files have different size!\n");
      exit(1);
    }
    if (d < 0)
      d = -d;
    if (d > 1) {
      printf("FATAL error, too large differnce found (%d)!\n", d);
      exit(1);
    }
    if (d)
      dif++;
  }
  fclose(f0);
  fclose(f1);
  printf("%d (+/-1)differences found\n", dif);
  exit(0);
}
```