user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %r13
  lea    D51(%rip),%rsi
  lea    D22(%rip),%rdi
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  movabs $0x1d0000001f,%rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    D67(%rip),%rsi
  lea    D77(%rip),%rdi
  mov    %rax,%r12
  call   <fopen@plt>
  pxor   %xmm0,%xmm0
  mov    %r12,%rdi
  movabs $0x1e0000001f,%rdx
  mov    %rax,%rbp
  mov    %rdx,0x38(%rsp)
  xor    %r12d,%r12d
  movabs $0x1c0000001f,%rax
  movabs $0x1f0000001f,%rcx
  mov    %rax,0x30(%rsp)
  lea    D33(%rip),%rsi
  movabs $0x1f0000001e,%rax
  mov    %rdx,0x40(%rsp)
  mov    %rdx,0x68(%rsp)
  mov    %rdx,0x70(%rsp)
  lea    0xc(%rsp),%rdx
  mov    %rbx,0x60(%rsp)
  lea    0x60(%rsp),%rbx
  mov    %rcx,0x48(%rsp)
  mov    %rax,0x50(%rsp)
  mov    %rax,0x58(%rsp)
  mov    %rcx,0x78(%rsp)
  mov    %rax,0x80(%rsp)
  mov    %rax,0x88(%rsp)
  movq   $0x0,0x20(%rsp)
  movl   $0x0,0x28(%rsp)
  movaps %xmm0,0x10(%rsp)
  call   <fscanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L31
  nopl   0x0(%rax)
L12:
  lea    0x76c(%r13),%edi
  call   <leap_checker@plt>
  lea    0x30(%rsp),%rdi
  mov    $0x1f,%esi
  mov    $0x6,%r8d
  cmp    $0x1,%eax
  cmove  %rbx,%rdi
  lea    0x4(%rdi),%rcx
  add    $0x30,%rdi
  jmp    L36
  nopl   (%rax)
L26:
  mov    (%rcx),%esi
  add    $0x4,%rcx
L36:
  lea    0xd(%r12),%edx
  movslq %edx,%rax
  mov    %edx,%r9d
  imul   $0xffffffff92492493,%rax,%rax
  sar    $0x1f,%r9d
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x2,%eax
  sub    %r9d,%eax
  lea    0x0(,%rax,8),%r9d
  sub    %eax,%r9d
  sub    %r9d,%edx
  lea    -0x1(%rdx),%eax
  cmove  %r8d,%eax
  add    %esi,%r12d
  cltq
  addl   $0x1,0x10(%rsp,%rax,4)
  cmp    %rcx,%rdi
  jne    L26
  add    $0x1,%r13d
  cmp    %r13d,0xc(%rsp)
  jg     L12
L31:
  mov    0x28(%rsp),%ecx
  mov    0x24(%rsp),%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D8(%rip),%rsi
  lea    0x10(%rsp),%rbx
  call   <fprintf@plt>
  lea    0x20(%rsp),%r13
  lea    D7(%rip),%r12
L38:
  mov    (%rbx),%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <fprintf@plt>
  cmp    %r13,%rbx
  jne    L38
  mov    0x20(%rsp),%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D23(%rip),%rsi
  call   <fprintf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0xa8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D51
datatype: string
name: extract_symbolic_data
arguments: tag: D22
datatype: string
name: extract_symbolic_data
arguments: tag: D67
datatype: string
name: extract_symbolic_data
arguments: tag: D77
datatype: string
name: extract_symbolic_data
arguments: tag: D33
datatype: string
name: extract_symbolic_data
arguments: tag: D8
datatype: string
name: extract_symbolic_data
arguments: tag: D7
datatype: string
name: extract_symbolic_data
arguments: tag: D23
datatype: string

tool: D51: r

tool: D22: friday.in

tool: D67: w

tool: D77: friday.out

tool: D33: %d

tool: D8: %d %d 

tool: D7: %d 

tool: D23: %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);
}
```