// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/writefil.c
// Function: print_dates
void print_dates (int month, int year)
{
   register int day;
   year_info *py;
   month_info *pm;
   register day_info *pd;
   unsigned long holidays;
   int has_holiday_text;
   static int save_year = 0;
   
   /* if no text for this year and month, return */
   
   if ((py = find_year(year, FALSE)) == NULL || (pm = py->month[month-1]) == NULL) {
      return;
   }
   
   /* print the year if it has changed */
   
   if (year != save_year) printf("%s %d\n", kw_year, save_year = year);

   /* walk array of day text pointers and linked lists of text */
   
   for (holidays = pm->holidays, day = 1;
        day < FIRST_NOTE_DAY;
        holidays >>= 1L, day++) {
      has_holiday_text = FALSE;
      for (pd = pm->day[day-1]; pd; pd = pd->next) {
         /* Bypass entries that specify an EPS image... */
         if (ci_strncmp(pd->text, "image:", 6) == 0) continue;
         if (date_style == USA_DATES) printf("%02d/%02d", month, day);
         else printf("%02d/%02d", day, month);
#ifdef KEEP_ASTERISKS
         printf(pd->is_holiday ? "*\t" : "\t");
#else
         printf("\t");
#endif
         this_day = day;
         RESET_DATE();   /* reset working date */
         print_text(pd->text);
         printf("\n");
         has_holiday_text |= pd->is_holiday;
      }
#ifdef KEEP_ASTERISKS
      /* was date flagged as holiday w/o associated text? */
      if ((holidays & 01) && !has_holiday_text) {
         if (date_style == USA_DATES) printf("%02d/%02d*\n", month, day);
         else printf("%02d/%02d*\n", day, month);
      }
#endif
   }

   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %edi
xorl %esi, %esi
callq 0xefe0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x16d6e
movq -0x18(%rbp), %rax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x16d73
jmp 0x16ec9
movl -0x8(%rbp), %eax
cmpl 0x1e3d8(%rip), %eax     # 0x35154
je 0x16d9c
movq 0x1e2db(%rip), %rsi     # 0x35060
movl -0x8(%rbp), %edx
movl %edx, 0x1e3c6(%rip)     # 0x35154
leaq 0x13aba(%rip), %rdi     # 0x2a84f
movb $0x0, %al
callq 0x5110
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x1, -0xc(%rbp)
cmpl $0x20, -0xc(%rbp)
jge 0x16ec7
movl $0x0, -0x34(%rbp)
movq -0x20(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x16eac
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x13773(%rip), %rsi     # 0x2a562
movl $0x6, %edx
callq 0xb3b0
cmpl $0x0, %eax
jne 0x16e03
jmp 0x16e9b
leaq 0x1b862(%rip), %rax     # 0x3266c
cmpl $0x0, (%rax)
jne 0x16e25
movl -0x4(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0x13a3a(%rip), %rdi     # 0x2a856
movb $0x0, %al
callq 0x5110
jmp 0x16e39
movl -0xc(%rbp), %esi
movl -0x4(%rbp), %edx
leaq 0x13a24(%rip), %rdi     # 0x2a856
movb $0x0, %al
callq 0x5110
leaq 0xee4a(%rip), %rdi      # 0x25c8a
movb $0x0, %al
callq 0x5110
movl -0xc(%rbp), %eax
movl %eax, 0x1e218(%rip)     # 0x35068
movl 0x1e1ee(%rip), %eax     # 0x35044
movl %eax, 0x1e210(%rip)     # 0x3506c
movl 0x1e206(%rip), %eax     # 0x35068
movl %eax, 0x1e208(%rip)     # 0x35070
movl 0x1e1da(%rip), %eax     # 0x35048
movl %eax, 0x1e200(%rip)     # 0x35074
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x195f0
leaq 0x116a1(%rip), %rdi     # 0x28529
movb $0x0, %al
callq 0x5110
movq -0x28(%rbp), %rax
movl (%rax), %eax
orl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x16dd5
jmp 0x16eae
movq -0x30(%rbp), %rax
shrq %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16dae
jmp 0x16ec9
addq $0x40, %rsp
popq %rbp
retq
nop