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

```asm
<date_tester>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x1323ed5,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x132664a,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x1328dbf,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x132b534,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x132dca9,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x133067c,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x1324385,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x1324340,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x1326a50,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x132dace,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13240e7,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13242db,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x132401f,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x1359c47,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x5f5bd93,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x3936393,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x1326665,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x1328d75,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x132b485,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x132db95,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13302a5,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x15ef4a5,%edi
  call   <is_valid_date@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x16e36e5,%edi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13240d3,%edi
  call   <get_day_of_week@plt>
  cmp    $0x1,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13240d4,%edi
  call   <get_day_of_week@plt>
  cmp    $0x2,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13240d2,%edi
  call   <get_day_of_week@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13240d5,%edi
  call   <get_day_of_week@plt>
  cmp    $0x3,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13265e5,%edi
  call   <get_day_of_week@plt>
  cmp    $0x2,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x1326665,%edi
  call   <get_day_of_week@plt>
  cmp    $0x5,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13265fd,%edi
  call   <get_day_of_week@plt>
  cmp    $0x5,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x132433f,%edi
  call   <add_a_day@plt>
  cmp    $0x13265e5,%rax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x13265e5,%edi
  call   <subtract_a_day@plt>
  cmp    $0x132433f,%rax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  movq   $0x1323ed5,-0x10(%rbp)
  jmp    L84
L22:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <add_a_day@plt>
  mov    %rax,%rdi
  call   <subtract_a_day@plt>
  cmp    %rax,-0x10(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <add_a_day@plt>
  mov    %rax,-0x10(%rbp)
L84:
  cmpq   $0x16e13bd,-0x10(%rbp)
  jle    L22
  movq   $0x5e7b095,-0x10(%rbp)
  jmp    L77
L57:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <subtract_a_day@plt>
  mov    %rax,%rdi
  call   <add_a_day@plt>
  cmp    %rax,-0x10(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <add_a_day@plt>
  mov    %rax,-0x10(%rbp)
L77:
  cmpq   $0x5f5bebd,-0x10(%rbp)
  jle    L57
  movq   $0x1323ed5,-0x10(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L65
L62:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <get_day_of_week@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <add_a_day@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <is_valid_date@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <get_day_of_week@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  mov    %eax,%esi
  sar    $0x1f,%esi
  mov    %edx,%ecx
  sub    %esi,%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  mov    %eax,%esi
  sar    $0x1f,%esi
  sub    %esi,%edx
  mov    %edx,%esi
  shl    $0x3,%esi
  sub    %edx,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  cmp    %edx,%ecx
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x28(%rbp),%rcx
  lea    -0x2c(%rbp),%rdx
  lea    -0x30(%rbp),%rsi
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <long_to_date@plt>
  mov    -0x28(%rbp),%edx
  mov    -0x2c(%rbp),%ecx
  mov    -0x30(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <date_to_long@plt>
  cmp    %rax,-0x10(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  addl   $0x1,-0x24(%rbp)
L65:
  cmpl   $0xb2b5f,-0x24(%rbp)
  jle    L62
  movl   $0x0,-0x24(%rbp)
  jmp    L89
L23:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <get_day_of_week@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <subtract_a_day@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <get_day_of_week@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  mov    %eax,%esi
  sar    $0x1f,%esi
  mov    %edx,%ecx
  sub    %esi,%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  mov    %eax,%esi
  sar    $0x1f,%esi
  sub    %esi,%edx
  mov    %edx,%esi
  shl    $0x3,%esi
  sub    %edx,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  cmp    %edx,%ecx
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  addl   $0x1,-0x24(%rbp)
L89:
  cmpl   $0xb2b5f,-0x24(%rbp)
  jle    L23
  lea    -0x28(%rbp),%rcx
  lea    -0x2c(%rbp),%rdx
  lea    -0x30(%rbp),%rsi
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <long_to_date@plt>
  mov    -0x30(%rbp),%eax
  cmp    $0x7d7,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x2c(%rbp),%eax
  cmp    $0x1,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x28(%rbp),%eax
  cmp    $0x1,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L69
  call   <__stack_chk_fail@plt>
L69:
  leave
  ret
```

assistant: ```c
void date_tester() {
  int i;
  long l;
  assert(is_valid_date(20070101));
  assert(is_valid_date(20080202));
  assert(is_valid_date(20090303));
  assert(is_valid_date(20100404));
  assert(is_valid_date(20110505));
  assert(is_valid_date(20121212));
  assert(!is_valid_date(20071301));
  assert(!is_valid_date(20071232));
  assert(!is_valid_date(20081232));
  assert(!is_valid_date(20110030));
  assert(!is_valid_date(20070631));
  assert(!is_valid_date(20071131));
  assert(!is_valid_date(20070431));
  assert(!is_valid_date(20290631));
  assert(!is_valid_date(99990931));
  assert(!is_valid_date(59990931));
  assert(is_valid_date(20080229));
  assert(!is_valid_date(20090229));
  assert(!is_valid_date(20100229));
  assert(!is_valid_date(20110229));
  assert(is_valid_date(20120229));
  assert(!is_valid_date(23000229));
  assert(is_valid_date(24000229));
  assert(get_day_of_week(20070611) == 1);
  assert(get_day_of_week(20070612) == 2);
  assert(get_day_of_week(20070610) == 0);
  assert(get_day_of_week(20070613) == 3);
  assert(get_day_of_week(20080101) == 2);
  assert(get_day_of_week(20080229) == 5);
  assert(get_day_of_week(20080125) == 5);
  assert(add_a_day(20071231) == 20080101);
  assert(subtract_a_day(20080101) == 20071231);
  for (l = 20070101; l < 23991230; l = add_a_day(l))
    assert(subtract_a_day(add_a_day(l)) == l);
  for (l = 99070101; l < 99991230; l = add_a_day(l))
    assert(add_a_day(subtract_a_day(l)) == l);
  l = 20070101;
  for (i = 0; i < 366 * 2000; ++i) {
    int dow1 = get_day_of_week(l);
    l = add_a_day(l);
    assert(is_valid_date(l));
    int dow2 = get_day_of_week(l);
    assert((dow1 + 1) % 7 == dow2 % 7);
    int y, m, d;
    long_to_date(l, &y, &m, &d);
    assert(l == date_to_long(y, m, d));
  }
  for (i = 0; i < 366 * 2000; ++i) {
    int dow1 = get_day_of_week(l);
    l = subtract_a_day(l);
    int dow2 = get_day_of_week(l);
    assert((dow2 + 1) % 7 == dow1 % 7);
  }
  int y2, m2, d2;
  long_to_date(l, &y2, &m2, &d2);
  assert(y2 == 2007);
  assert(m2 == 1);
  assert(d2 == 1);
}
```