// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %ebx
movl %esi, %edi
xorl %esi, %esi
callq 0xb9d3
testq %rax, %rax
je 0x115d4
movslq %ebx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x115d4
cmpl %ebp, 0x1dbd8(%rip)     # 0x2f0c4
je 0x1150b
movq 0x1dadb(%rip), %rsi     # 0x2efd0
movl %ebp, 0x1dbc9(%rip)     # 0x2f0c4
leaq 0x10084(%rip), %rdi     # 0x21586
movl %ebp, %edx
xorl %eax, %eax
callq 0x5130
addq $0x8, (%rsp)
pushq $0x1
popq %r14
leaq 0xfe02(%rip), %r15      # 0x2131d
pushq $0x6
popq %rbp
pushq $0xa
popq %r12
cmpq $0x20, %r14
je 0x115d4
movq (%rsp), %rax
leaq (%rax,%r14,8), %r13
addq $-0x8, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x115cc
movq 0x8(%r13), %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x9665
testl %eax, %eax
je 0x115c3
leaq 0x1b07e(%rip), %rax     # 0x2c5dc
cmpl $0x0, (%rax)
je 0x11571
leaq 0x10023(%rip), %rdi     # 0x2158d
movl %r14d, %esi
movl %ebx, %edx
jmp 0x1157d
leaq 0x10015(%rip), %rdi     # 0x2158d
movl %ebx, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x5130
pushq $0x9
popq %rdi
callq 0x5060
movl %r14d, 0x1da45(%rip)    # 0x2efd8
movl 0x1da1b(%rip), %eax     # 0x2efb4
movl %eax, 0x1da3d(%rip)     # 0x2efdc
movl %r14d, 0x1da3a(%rip)    # 0x2efe0
movl 0x1da0c(%rip), %eax     # 0x2efb8
movl %eax, 0x1da32(%rip)     # 0x2efe4
movq 0x8(%r13), %rdi
callq 0x13093
movl %r12d, %edi
callq 0x5060
addq $0x10, %r13
jmp 0x11538
incq %r14
jmp 0x11522
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq