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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x2,-0x44(%rbp)
  jg     L217
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L40
L217:
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D85(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x50(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D26(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L132
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  jmp    L40
L132:
  cmpq   $0x0,-0x20(%rbp)
  jne    L225
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x3,%eax
  jmp    L40
L225:
  lea    -0x34(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    D51(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  lea    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    D51(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  mov    -0x30(%rbp),%edx
  mov    -0x34(%rbp),%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x30(%rbp),%ecx
  mov    -0x34(%rbp),%edx
  mov    -0x20(%rbp),%rax
  lea    D21(%rip),%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
L168:
  mov    -0x28(%rbp),%rdx
  lea    -0x14(%rbp),%rax
  mov    $0xc,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L59
  movzbl -0x14(%rbp),%eax
  cmp    $0x20,%al
  je     L167
  movzbl -0x14(%rbp),%eax
  cmp    $0x2a,%al
  je     L167
  movzbl -0x14(%rbp),%eax
  cmp    $0x2e,%al
  jne    L59
L167:
  movzbl -0x14(%rbp),%eax
  cmp    $0x2a,%al
  jne    L55
  mov    $0x80,%eax
  jmp    L99
L55:
  mov    $0x0,%eax
L99:
  mov    %eax,-0x2c(%rbp)
  movzbl -0x13(%rbp),%eax
  cmp    $0x2a,%al
  jne    L161
  mov    $0x40,%eax
  jmp    L6
L161:
  mov    $0x0,%eax
L6:
  or     %eax,-0x2c(%rbp)
  movzbl -0x12(%rbp),%eax
  cmp    $0x2a,%al
  jne    L177
  mov    $0x20,%eax
  jmp    L105
L177:
  mov    $0x0,%eax
L105:
  or     %eax,-0x2c(%rbp)
  movzbl -0x11(%rbp),%eax
  cmp    $0x2a,%al
  jne    L235
  mov    $0x10,%eax
  jmp    L54
L235:
  mov    $0x0,%eax
L54:
  or     %eax,-0x2c(%rbp)
  movzbl -0x10(%rbp),%eax
  cmp    $0x2a,%al
  jne    L38
  mov    $0x8,%eax
  jmp    L170
L38:
  mov    $0x0,%eax
L170:
  or     %eax,-0x2c(%rbp)
  movzbl -0xf(%rbp),%eax
  cmp    $0x2a,%al
  jne    L147
  mov    $0x4,%eax
  jmp    L78
L147:
  mov    $0x0,%eax
L78:
  or     %eax,-0x2c(%rbp)
  movzbl -0xe(%rbp),%eax
  cmp    $0x2a,%al
  jne    L222
  mov    $0x2,%eax
  jmp    L76
L222:
  mov    $0x0,%eax
L76:
  or     %eax,-0x2c(%rbp)
  movzbl -0xd(%rbp),%eax
  cmp    $0x2a,%al
  sete   %al
  movzbl %al,%eax
  or     %eax,-0x2c(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x2c(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fputc@plt>
L59:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L168
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
L40:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L201
  call   <__stack_chk_fail@plt>
L201:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D17
data_type: string
name: unpack_data
arguments: label: D85
data_type: string
name: unpack_data
arguments: label: D26
data_type: string
name: unpack_data
arguments: label: D47
data_type: string
name: unpack_data
arguments: label: D14
data_type: string
name: unpack_data
arguments: label: D51
data_type: string
name: unpack_data
arguments: label: D45
data_type: string
name: unpack_data
arguments: label: D21
data_type: string

tool: D17: usage> makefont source.txt font.bin

tool: D85: r

tool: D26: wb

tool: D47: can't open input file.

tool: D14: can't open output file.

tool: D51: %d

tool: D45: font size: %dx%d


tool: D21: %d
%d


assistant: ```c
int main(int argc, char **argv) {
  FILE *fp0, *fp1;
  if (argc < 3) {
    puts("usage> makefont source.txt font.bin");
    return 1;
  }
  fp0 = fopen(argv[1], "r");
  fp1 = fopen(argv[2], "wb");
  if (fp0 == NULL) {
    puts("can't open input file.");
    return 2;
  }
  if (fp1 == NULL) {
    puts("can't open output file.");
    return 3;
  }
  unsigned int xsize, ysize;
  fscanf(fp0, "%d", &xsize);
  fscanf(fp0, "%d", &ysize);
  printf("font size: %dx%d\n", xsize, ysize);
  fprintf(fp1, "%d\n%d\n", xsize, ysize);
  do {
    char s[12];
    int i;
    if (fgets(s, 12, fp0) != NULL && (s[0] == ' ' || s[0] == '*' || s[0] == '.')) {
      i = (s[0] == '*') << 7;
      i |= (s[1] == '*') << 6;
      i |= (s[2] == '*') << 5;
      i |= (s[3] == '*') << 4;
      i |= (s[4] == '*') << 3;
      i |= (s[5] == '*') << 2;
      i |= (s[6] == '*') << 1;
      i |= (s[7] == '*');
      fputc(i, fp1);
    }
  } while (!feof(fp0));
  fclose(fp0);
  fclose(fp1);
  return 0;
}
```