// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/writefil.c
// Function: find_daytext
void find_daytext (int month, int year, int is_holiday)
{
   register int day;
   year_info *py;
   month_info *pm;
   register day_info *pd;
   int first;
   char *fcn = is_holiday ? "holidaytext" : "daytext";
   char hol = is_holiday ? '*' : ' ';
   
   /* if no text for this year and month, return */
   
   if ((py = find_year(year, FALSE)) == NULL || (pm = py->month[month-1]) == NULL) {
      return;
   }
   
   /* walk array of day text pointers and linked lists of text */

   for (day = 1; day <= LAST_NOTE_DAY; day++) {
      for (pd = pm->day[day-1], first = TRUE;
           pd;
           pd = pd->next) {
         if (pd->is_holiday != is_holiday) continue;
         /* Skip lines specifying an EPS image... */
         if (ci_strncmp(pd->text, "image:", 6) == 0) continue;
         if (first) {
            printf("%d [ \n", day >= FIRST_NOTE_DAY ?
                   note_box(month, day, year) : day);
         }
         else {
            printf("\n");
            print_word(LINE_SEP);   /* separate lines */
            printf("\n");
         }
         this_day = day >= FIRST_NOTE_DAY ? 1 : day;
         RESET_DATE();   /* reset working date */
         if (debug_text) {
            if (day < FIRST_NOTE_DAY) {
               fprintf(stderr, "%02d/%02d/%d%c ", month, day, year, hol);
            }
            else {
               fprintf(stderr, "%02d[%02d]%d  ", month, day - FIRST_NOTE_DAY + 1, year);
            }
         }
         print_pstext(pd->text);
         if (debug_text) fprintf(stderr, "\n");
         first = FALSE;
      }
      if (! first) {   /* wrap up call (if one made) */
         printf("\n] %s\n", day >= FIRST_NOTE_DAY ? "notetext" : fcn);
      }
   }

   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl -0xc(%rbp), %edx
leaq 0x10eb1(%rip), %rax     # 0x2a7bc
leaq 0x10ea6(%rip), %rcx     # 0x2a7b8
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %edx
movl $0x20, %eax
movl $0x2a, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, -0x39(%rbp)
movl -0x8(%rbp), %edi
xorl %esi, %esi
callq 0xefe0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x19963
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 0x19968
jmp 0x19b64
movl $0x1, -0x10(%rbp)
cmpl $0x2d, -0x10(%rbp)
jg 0x19b62
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movl $0x1, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x19b1f
movq -0x28(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
je 0x199b1
jmp 0x19b0e
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x10ba2(%rip), %rsi     # 0x2a562
movl $0x6, %edx
callq 0xb3b0
cmpl $0x0, %eax
jne 0x199d4
jmp 0x19b0e
cmpl $0x0, -0x2c(%rbp)
je 0x19a0c
cmpl $0x20, -0x10(%rbp)
jl 0x199f3
movl -0x4(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
callq 0xc4c0
movl %eax, -0x40(%rbp)
jmp 0x199f9
movl -0x10(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %esi
leaq 0x10dc1(%rip), %rdi     # 0x2a7c4
movb $0x0, %al
callq 0x5110
jmp 0x19a34
leaq 0xeb16(%rip), %rdi      # 0x28529
movb $0x0, %al
callq 0x5110
leaq 0xc29c(%rip), %rdi      # 0x25cbd
callq 0x16270
leaq 0xeafc(%rip), %rdi      # 0x28529
movb $0x0, %al
callq 0x5110
cmpl $0x20, -0x10(%rbp)
jl 0x19a44
movl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x19a4a
movl -0x10(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, 0x1b615(%rip)     # 0x35068
movl 0x1b5eb(%rip), %eax     # 0x35044
movl %eax, 0x1b60d(%rip)     # 0x3506c
movl 0x1b603(%rip), %eax     # 0x35068
movl %eax, 0x1b605(%rip)     # 0x35070
movl 0x1b5d7(%rip), %eax     # 0x35048
movl %eax, 0x1b5fd(%rip)     # 0x35074
cmpl $0x0, 0x1b5c2(%rip)     # 0x35040
je 0x19ad9
cmpl $0x20, -0x10(%rbp)
jge 0x19aaf
movq 0x1456b(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
movl -0x10(%rbp), %ecx
movl -0x8(%rbp), %r8d
movsbl -0x39(%rbp), %r9d
leaq 0x10d25(%rip), %rsi     # 0x2a7cb
movb $0x0, %al
callq 0x51b0
jmp 0x19ad7
movq 0x14542(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
movl -0x10(%rbp), %ecx
subl $0x20, %ecx
addl $0x1, %ecx
movl -0x8(%rbp), %r8d
leaq 0x10d0b(%rip), %rsi     # 0x2a7db
movb $0x0, %al
callq 0x51b0
jmp 0x19ad9
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x19570
cmpl $0x0, 0x1b553(%rip)     # 0x35040
je 0x19b07
movq 0x14502(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
leaq 0xea29(%rip), %rsi      # 0x28529
movb $0x0, %al
callq 0x51b0
movl $0x0, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x19996
cmpl $0x0, -0x2c(%rbp)
jne 0x19b52
cmpl $0x20, -0x10(%rbp)
jl 0x19b38
leaq 0x10cbf(%rip), %rax     # 0x2a7f1
movq %rax, -0x50(%rbp)
jmp 0x19b40
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rsi
leaq 0x10c9f(%rip), %rdi     # 0x2a7ea
movb $0x0, %al
callq 0x5110
jmp 0x19b54
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1996f
jmp 0x19b64
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)