user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x3,%edi
  jne    L63
L71:
  mov    0x8(%rsp),%rbx
  mov    0x8(%rbx),%rsi
  lea    D207(%rip),%rbp
  mov    %rbp,%rdi
  call   <read_file@plt>
  mov    %eax,%r13d
  mov    0x10(%rbx),%rsi
  lea    D270(%rip),%rdi
  call   <read_file@plt>
  mov    %eax,%ebx
  lea    D56(%rip),%rdx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <md5@plt>
  test   %rax,%rax
  js     L103
  lea    D184(%rip),%rdx
  mov    %ebx,%esi
  lea    D270(%rip),%rdi
  call   <md5@plt>
  test   %rax,%rax
  jns    L18
L103:
  lea    D229(%rip),%rdi
  mov    $0x0,%eax
  call   <fail@plt>
L18:
  cmp    %ebx,%r13d
  jne    L147
L210:
  mov    %r13d,%edx
  lea    D270(%rip),%rsi
  lea    D207(%rip),%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  je     L47
L145:
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,0x14(%rsp)
  lea    0x14(%rsp),%rdi
  call   <localtime@plt>
  mov    %eax,%ecx
  lea    D269(%rip),%rdx
  mov    $0x1000,%esi
  lea    D193(%rip),%rbx
  mov    %rbx,%rdi
  call   <strftime@plt>
  mov    0x8(%rsp),%r14
  mov    0x10(%r14),%rdx
  mov    0x8(%r14),%rsi
  lea    D142(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  lea    D148(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D0(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%r14),%rsi
  lea    D233(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D164(%rip),%rdi
  call   <puts@plt>
  lea    D56(%rip),%rsi
  lea    D244(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  test   %r13d,%r13d
  jle    L58
  mov    $0x0,%ebp
  lea    D207(%rip),%r15
  lea    D270(%rip),%r14
  jmp    L128
L63:
  mov    (%rsi),%rsi
  lea    D240(%rip),%rdi
  mov    $0x0,%eax
  call   <fail@plt>
  jmp    L71
L147:
  lea    D194(%rip),%rdi
  mov    $0x0,%eax
  call   <fail@plt>
  jmp    L210
L47:
  lea    D51(%rip),%rdi
  call   <fail@plt>
  jmp    L145
L194:
  mov    0x4(%rsp),%ebp
  add    $0x1,%ebp
  add    $0x1,%rbx
  cmp    %ebx,%r13d
  jle    L190
L84:
  mov    %ebx,0x4(%rsp)
  mov    %ebx,%ebp
  movzbl (%r14,%rbx,1),%esi
  cmp    %sil,(%r15,%rbx,1)
  je     L190
  movzbl %sil,%esi
  lea    D130(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%r12d
  cmp    $0x10,%r12d
  jne    L194
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%r12d
  jmp    L194
L190:
  mov    $0xa,%edi
  call   <putchar@plt>
  test   %r12d,%r12d
  jne    L34
L193:
  add    $0x1,%ebp
  cmp    %ebp,%r13d
  jle    L58
L128:
  movslq %ebp,%rax
  movzbl (%r14,%rax,1),%ecx
  cmp    %cl,(%r15,%rax,1)
  je     L193
  mov    %ebp,%esi
  lea    D144(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    %ebp,%r13d
  jle    L72
  movslq %ebp,%rbx
  mov    $0x0,%r12d
  jmp    L84
L34:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L193
L58:
  lea    D83(%rip),%rdi
  call   <puts@plt>
  lea    D184(%rip),%rsi
  lea    D244(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D170(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  mov    0x10(%rax),%rsi
  lea    D119(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L206
  mov    $0x0,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L72:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L193
L206:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D229
datatype: string
name: extract_symbolic_data
arguments: tag: D269
datatype: string
name: extract_symbolic_data
arguments: tag: D142
datatype: string
name: extract_symbolic_data
arguments: tag: D148
datatype: string
name: extract_symbolic_data
arguments: tag: D0
datatype: string
name: extract_symbolic_data
arguments: tag: D233
datatype: string
name: extract_symbolic_data
arguments: tag: D164
datatype: string
name: extract_symbolic_data
arguments: tag: D244
datatype: string
name: extract_symbolic_data
arguments: tag: D240
datatype: string
name: extract_symbolic_data
arguments: tag: D194
datatype: string
name: extract_symbolic_data
arguments: tag: D51
datatype: string
name: extract_symbolic_data
arguments: tag: D130
datatype: string
name: extract_symbolic_data
arguments: tag: D144
datatype: string
name: extract_symbolic_data
arguments: tag: D83
datatype: string
name: extract_symbolic_data
arguments: tag: D170
datatype: string
name: extract_symbolic_data
arguments: tag: D119
datatype: string

tool: D229: can't calculate md5

tool: D269: %Y/%m/%d %H:%M:%S

tool: D142: # patch script: %s -> %s


tool: D148: # generated at %s 


tool: D0: # read old file

tool: D233: <%s


tool: D164: # check input md5sum

tool: D244: ?%s


tool: D240: usage: %s [old_file] [new_file]

tool: D194: file length mismatch

tool: D51: file content is same

tool: D130: %02X 

tool: D144: :%x


tool: D83: # check output md5sum

tool: D170: # write new file

tool: D119: >script_%s


assistant: ```c
int main(int argc, char *argv[]) {
  static char buf[4096];
  static char data1[(1024 * 1024 * 32)];
  static char data2[(1024 * 1024 * 32)];
  static char md5str1[33];
  static char md5str2[33];
  time_t timestamp;
  int len1, len2;
  int i, cnt;
  if (argc != 3)
    fail("usage: %s [old_file] [new_file]", argv[0]);
  len1 = read_file(data1, argv[1]);
  len2 = read_file(data2, argv[2]);
  if (md5(data1, len1, md5str1) < 0 || md5(data2, len2, md5str2) < 0)
    fail("can't calculate md5");
  if (len1 != len2)
    fail("file length mismatch");
  if (memcmp(data1, data2, len1) == 0)
    fail("file content is same");
  timestamp = time(NULL);
  strftime(buf, 4096, "%Y/%m/%d %H:%M:%S", localtime(&timestamp));
  printf("# patch script: %s -> %s\n", argv[1], argv[2]);
  printf("# generated at %s \n", buf);
  printf("\n");
  printf("# read old file\n");
  printf("<%s\n", argv[1]);
  printf("\n");
  printf("# check input md5sum\n");
  printf("?%s\n", md5str1);
  printf("\n");
  for (i = 0; i < len1; i++)
    if (data1[i] != data2[i]) {
      printf(":%x\n", i);
      cnt = 0;
      while (i < len1 && data1[i] != data2[i]) {
        printf("%02X ", (int)data2[i] & 0xff);
        cnt++;
        if (cnt == 16) {
          printf("\n");
          cnt = 0;
        }
        i++;
      }
      printf("\n");
      if (cnt)
        printf("\n");
    }
  printf("# check output md5sum\n");
  printf("?%s\n", md5str2);
  printf("\n");
  printf("# write new file\n");
  printf(">script_%s\n", argv[2]);
  return 0;
}
```