user: Converte this assembly snippet into its equivalent C code:

```asm
<official_hdays>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,-0x98(%rbp)
  mov    %esi,-0x9c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movl   $0xb,-0x90(%rbp)
  movl   $0x0,-0x8c(%rbp)
  movl   $0x0,-0x88(%rbp)
  movl   $0x0,-0x84(%rbp)
  movl   $0x0,-0x80(%rbp)
  movl   $0x0,-0x7c(%rbp)
  movl   $0x0,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  movq   $0x0,-0x60(%rbp)
  movl   $0x0,-0x70(%rbp)
  movw   $0x0,-0x1d(%rbp)
  movl   $0x0,-0x6c(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   $0x2710,%eax,%eax
  lea    0x65(%rax),%edx
  mov    -0x98(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x9c(%rbp),%eax
  sub    $0x76c,%eax
  mov    %eax,-0x8c(%rbp)
  mov    -0x8c(%rbp),%edx
  movslq %edx,%rax
  imul   $0x6bca1af3,%rax,%rax
  shr    $0x20,%rax
  sar    $0x3,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x3,%eax
  add    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  sub    %eax,%edx
  mov    %edx,-0x88(%rbp)
  mov    -0x88(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  imul   $0x6bca1af3,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x3,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x84(%rbp)
  mov    -0x88(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  sub    -0x84(%rbp),%eax
  add    $0x4,%eax
  movslq %eax,%rdx
  imul   $0xffffffff8d3dcb09,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x4,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x80(%rbp)
  mov    -0x80(%rbp),%edx
  imul   $0x1d,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x80(%rbp)
  mov    -0x8c(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  mov    %eax,-0x7c(%rbp)
  mov    -0x8c(%rbp),%eax
  sub    -0x80(%rbp),%eax
  mov    %eax,%edx
  mov    -0x7c(%rbp),%eax
  add    %edx,%eax
  add    $0x1f,%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x78(%rbp)
  mov    -0x78(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x78(%rbp)
  mov    $0x19,%eax
  sub    -0x80(%rbp),%eax
  sub    -0x78(%rbp),%eax
  mov    %eax,-0x74(%rbp)
  mov    -0x9c(%rbp),%eax
  sub    $0x76c,%eax
  mov    %eax,-0x50(%rbp)
  movl   $0x2,-0x4c(%rbp)
  movl   $0x1f,-0x48(%rbp)
  movq   $0x0,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  lea    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x74(%rbp),%eax
  add    $0x1,%eax
  imul   $0x15180,%eax,%eax
  cltq
  add    %rax,-0x60(%rbp)
  cmpl   $0x7d8,-0x9c(%rbp)
  jne    L32
  addq   $0x15180,-0x60(%rbp)
L32:
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  lea    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <localtime@plt>
  mov    %rax,-0x58(%rbp)
  mov    -0x98(%rbp),%rax
  lea    0x4(%rax),%rbx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <convert_date@plt>
  mov    %eax,(%rbx)
  movl   $0x0,-0x6c(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   $0x2710,%eax,%edx
  mov    -0x98(%rbp),%rax
  add    $0x8,%rax
  add    $0x1f5,%edx
  mov    %edx,(%rax)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  addq   $0x321900,-0x60(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  lea    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <localtime@plt>
  mov    %rax,-0x58(%rbp)
  cmpl   $0x7d8,-0x9c(%rbp)
  jne    L2
  mov    -0x98(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1406fa5,(%rax)
  jmp    L4
L2:
  mov    -0x98(%rbp),%rax
  lea    0xc(%rax),%rbx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <convert_date@plt>
  mov    %eax,(%rbx)
L4:
  movl   $0x0,-0x6c(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  addq   $0xe8080,-0x60(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  lea    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <localtime@plt>
  mov    %rax,-0x58(%rbp)
  cmpl   $0x7d8,-0x9c(%rbp)
  jne    L25
  mov    -0x98(%rbp),%rax
  add    $0x10,%rax
  movl   $0x1326780,(%rax)
  jmp    L24
L25:
  mov    -0x98(%rbp),%rax
  lea    0x10(%rax),%rbx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <convert_date@plt>
  mov    %eax,(%rbx)
L24:
  movl   $0x0,-0x6c(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   $0x2710,%eax,%edx
  mov    -0x98(%rbp),%rax
  add    $0x14,%rax
  add    $0x2d1,%edx
  mov    %edx,(%rax)
  mov    -0x9c(%rbp),%eax
  imul   $0x2710,%eax,%edx
  mov    -0x98(%rbp),%rax
  add    $0x18,%rax
  add    $0x32f,%edx
  mov    %edx,(%rax)
  mov    -0x9c(%rbp),%eax
  imul   $0x2710,%eax,%edx
  mov    -0x98(%rbp),%rax
  add    $0x1c,%rax
  add    $0x44d,%edx
  mov    %edx,(%rax)
  mov    -0x9c(%rbp),%eax
  imul   $0x2710,%eax,%edx
  mov    -0x98(%rbp),%rax
  add    $0x20,%rax
  add    $0x457,%edx
  mov    %edx,(%rax)
  mov    -0x9c(%rbp),%eax
  imul   $0x2710,%eax,%edx
  mov    -0x98(%rbp),%rax
  add    $0x24,%rax
  add    $0x4c9,%edx
  mov    %edx,(%rax)
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int official_hdays(int hdays[], int c_year) {
  int sizetab = 11;
  int n = 0;
  int a = 0;
  int b = 0;
  int c = 0;
  int d = 0;
  int e = 0;
  int p = 0;
  char year[5];
  struct tm date_tm;
  struct tm *date_tmp_p;
  time_t tps;
  long date_tmp_l = 0;
  char year_tmp[5], month_tmp[3], day_tmp[3];
  int buffer_i = 0;
  char buffer_c[2] = "";
  int test = 0;
  hdays[0] = (c_year * 10000) + 101;
  n = c_year - 1900;
  a = n % 19;
  b = ((a * 7) + 1) / 19;
  c = ((11 * a) - b + 4) % 29;
  d = n / 4;
  e = (n - c + d + 31) % 7;
  p = 25 - c - e;
  date_tm.tm_year = c_year - 1900;
  date_tm.tm_mon = 3 - 1;
  date_tm.tm_mday = 31;
  date_tm.tm_hour = date_tm.tm_min = date_tm.tm_sec = 0;
  tps = mktime(&date_tm);
  date_tmp_l = tps;
  date_tmp_l = date_tmp_l + ((p + 1) * 86400);
  if (c_year == 2008)
    date_tmp_l = date_tmp_l + 86400;
  tps = date_tmp_l;
  date_tmp_p = localtime(&tps);
  hdays[1] = convert_date(date_tmp_p);
  test = 0;
  hdays[2] = (c_year * 10000) + 501;
  date_tmp_l = tps;
  date_tmp_l = date_tmp_l + ((40 - 2) * 86400);
  tps = date_tmp_l;
  date_tmp_p = localtime(&tps);
  if (c_year == 2008)
    hdays[3] = 21000101;
  else
    hdays[3] = convert_date(date_tmp_p);
  test = 0;
  date_tmp_l = tps;
  date_tmp_l = date_tmp_l + ((10 + 1) * 86400);
  tps = date_tmp_l;
  date_tmp_p = localtime(&tps);
  if (c_year == 2008)
    hdays[4] = 20080512;
  else
    hdays[4] = convert_date(date_tmp_p);
  test = 0;
  hdays[5] = (c_year * 10000) + 721;
  hdays[6] = (c_year * 10000) + 815;
  hdays[7] = (c_year * 10000) + 1101;
  hdays[8] = (c_year * 10000) + 1111;
  hdays[9] = (c_year * 10000) + 1225;
  return 0;
}
```