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

```asm
<main>:
  endbr64
  push   %r13
  lea    D78(%rip),%rsi
  lea    D3(%rip),%rdi
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    $0x6,%ebx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    D75(%rip),%rsi
  lea    D62(%rip),%rdi
  mov    %rax,%r12
  call   <fopen@plt>
  pxor   %xmm0,%xmm0
  mov    %r12,%rdi
  lea    0xc(%rsp),%rdx
  lea    D67(%rip),%rsi
  mov    %rax,%rbp
  movaps %xmm0,0x10(%rsp)
  xor    %r12d,%r12d
  movq   $0x0,0x20(%rsp)
  movl   $0x0,0x28(%rsp)
  call   <fscanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L64
  nop
L6:
  lea    0x76c(%r12),%edi
  call   <leap_checker@plt>
  xor    %edx,%edx
  lea    0xd(%r13),%esi
  cmp    $0x1,%eax
  mov    %rsi,%rcx
  sete   %dl
  imul   $0x24924925,%rsi,%rsi
  mov    %ecx,%eax
  shr    $0x20,%rsi
  sub    %esi,%eax
  shr    %eax
  add    %esi,%eax
  shr    $0x2,%eax
  lea    0x0(,%rax,8),%esi
  sub    %eax,%esi
  sub    %esi,%ecx
  lea    0x2c(%r13),%esi
  lea    -0x1(%rcx),%eax
  mov    %rsi,%rcx
  cmove  %ebx,%eax
  imul   $0x24924925,%rsi,%rsi
  cltq
  addl   $0x1,0x10(%rsp,%rax,4)
  shr    $0x20,%rsi
  mov    %ecx,%eax
  sub    %esi,%eax
  shr    %eax
  add    %esi,%eax
  shr    $0x2,%eax
  lea    0x0(,%rax,8),%esi
  sub    %eax,%esi
  sub    %esi,%ecx
  lea    -0x1(%rcx),%eax
  cmove  %ebx,%eax
  cltq
  addl   $0x1,0x10(%rsp,%rax,4)
  lea    0x3b(%r13,%rdx,1),%eax
  lea    0xd(%rax),%esi
  mov    %rsi,%rcx
  imul   $0x24924925,%rsi,%rsi
  mov    %ecx,%edx
  shr    $0x20,%rsi
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0x2c(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  addl   $0x1,0x10(%rsp,%rdx,4)
  shr    $0x20,%rsi
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0x4a(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  addl   $0x1,0x10(%rsp,%rdx,4)
  shr    $0x20,%rsi
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0x69(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  addl   $0x1,0x10(%rsp,%rdx,4)
  shr    $0x20,%rsi
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0x87(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  addl   $0x1,0x10(%rsp,%rdx,4)
  shr    $0x20,%rsi
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0xa6(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  addl   $0x1,0x10(%rsp,%rdx,4)
  shr    $0x20,%rsi
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0xc5(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  addl   $0x1,0x10(%rsp,%rdx,4)
  shr    $0x20,%rsi
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0xe3(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  addl   $0x1,0x10(%rsp,%rdx,4)
  shr    $0x20,%rsi
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0x102(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  shr    $0x20,%rsi
  addl   $0x1,0x10(%rsp,%rdx,4)
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    0x120(%rax),%esi
  lea    -0x1(%rcx),%edx
  mov    %rsi,%rcx
  cmove  %ebx,%edx
  imul   $0x24924925,%rsi,%rsi
  movslq %edx,%rdx
  shr    $0x20,%rsi
  addl   $0x1,0x10(%rsp,%rdx,4)
  mov    %ecx,%edx
  sub    %esi,%edx
  shr    %edx
  add    %esi,%edx
  shr    $0x2,%edx
  lea    0x0(,%rdx,8),%esi
  sub    %edx,%esi
  sub    %esi,%ecx
  lea    -0x1(%rcx),%edx
  je     L20
  movslq %edx,%rdx
  lea    0x132(%rax),%r13d
  add    $0x1,%r12d
  addl   $0x1,0x10(%rsp,%rdx,4)
  cmp    %r12d,0xc(%rsp)
  jg     L6
L64:
  mov    0x28(%rsp),%ecx
  mov    0x24(%rsp),%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D42(%rip),%rsi
  lea    0x10(%rsp),%rbx
  call   <fprintf@plt>
  lea    0x20(%rsp),%r13
  lea    D39(%rip),%r12
L25:
  mov    (%rbx),%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <fprintf@plt>
  cmp    %rbx,%r13
  jne    L25
  mov    0x20(%rsp),%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D77(%rip),%rsi
  call   <fprintf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L49
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L20:
  addl   $0x1,0x28(%rsp)
  lea    0x132(%rax),%r13d
  add    $0x1,%r12d
  cmp    %r12d,0xc(%rsp)
  jg     L6
  jmp    L64
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D78
data_type: string
name: parse_data
arguments: data_tag: D3
data_type: string
name: parse_data
arguments: data_tag: D75
data_type: string
name: parse_data
arguments: data_tag: D62
data_type: string
name: parse_data
arguments: data_tag: D67
data_type: string
name: parse_data
arguments: data_tag: D42
data_type: string
name: parse_data
arguments: data_tag: D39
data_type: string
name: parse_data
arguments: data_tag: D77
data_type: string

tool: D78: r

tool: D3: friday.in

tool: D75: w

tool: D62: friday.out

tool: D67: %d

tool: D42: %d %d 

tool: D39: %d 

tool: D77: %d


assistant: ```c
main() {
  FILE *fin = fopen("friday.in", "r");
  FILE *fout = fopen("friday.out", "w");
  int mountdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int mountdays_leap[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int *year_p;
  int days[] = {0, 0, 0, 0, 0, 0, 0};
  int n, days_sum_n = 0, i, j, flag, x = 0, ind;
  fscanf(fin, "%d", &n);
  for (i = 0; i < n; ++i) {
    year_p = mountdays;
    flag = leap_checker(1900 + i);
    if (flag == 1) {
      year_p = mountdays_leap;
    }
    for (j = 0; j < 12; ++j) {
      ind = (x + 13) % 7 - 1;
      if (ind == -1) {
        ind += 7;
      }
      days[ind]++;
      x += year_p[j];
    }
  }
  fprintf(fout, "%d %d ", days[5], days[6]);
  for (i = 0; i < 5; ++i) {
    if (i < 4)
      fprintf(fout, "%d ", days[i]);
    else
      fprintf(fout, "%d\n", days[i]);
  }
  exit(0);
}
```