// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/writefil.c
// Function: print_month
void print_month (int month, int year)
{
   static int nmonths = 0;
#ifdef EPS_DSC
   static int page = 0;
#endif
   int startbox;

#ifdef EPS_DSC
   /* start of new physical page? */
   if (!do_whole_year || nmonths % 12 == 0) {
      page++;
      printf("%%%%Page: %d %d\n", page, page);
      printf("%%%%BeginPageSetup\n");
      printf("clear flush\n");
      printf("/PageNum { %d } def\n", page);
      printf("/PageState save def\n");
      printf("%%%%EndPageSetup\n\n");
   }
#endif

   if (do_whole_year) {
      /* reset foot strings at start of each page */
      if (nmonths % 12 == 0) {
         def_footstring(lfoot, "Lfootstring");
         def_footstring(cfoot, "Cfootstring");
         def_footstring(rfoot, "Rfootstring");
         def_footstring(notes_hdr, "notesheading");
         printf("\n");
      }
   }
   
   /* set up year and month */
   printf("/year %d def\n", year);
   printf("/month %d def\n", month);
   
   /* move starting box to second row if conflict with small calendars */
   startbox = START_BOX(month, year);
   if (!do_whole_year &&
       (prev_cal_box[small_cal_pos] == startbox ||
        next_cal_box[small_cal_pos] == startbox)) {
      startbox += 7;
   }

   printf("/startbox %d def\n", startbox);
   printf("/ndays %d def\n", LENGTH_OF(month, year));
   
   find_noteboxes(month, year);   /* make list of note boxes */
   print_colors(month, year);   /* make list of date colors */

   /* Are we printing 12 months per page or only one? */
   if (do_whole_year) {
      printf("/posn %d def\n", nmonths % 12);   /* location on page */

      print_julian_info(month, year);   /* Julian date info */
      print_moon_info(month, year);   /* moon info */

      printf("printmonth\n\n");
   }
   else {
      /* reset foot strings each month (may change) */
      def_footstring(lfoot, "Lfootstring");
      def_footstring(cfoot, "Cfootstring");
      def_footstring(rfoot, "Rfootstring");
      def_footstring(notes_hdr, "notesheading");
      
      /* generate information necessary for small calendars */
      
      if (small_cal_pos != SC_NONE) {
         int m, y;
         
         printf("/p_year %d def\n", y = PREV_YEAR(month, year));
         printf("/p_month %d def\n", m = PREV_MONTH(month, year));
         printf("/p_startbox %d def\n", START_BOX(m, y));
         printf("/p_ndays %d def\n", LENGTH_OF(m, y));
         
         printf("/n_year %d def\n", y = NEXT_YEAR(month, year));
         printf("/n_month %d def\n", m = NEXT_MONTH(month, year));
         printf("/n_startbox %d def\n", START_BOX(m, y));
         printf("/n_ndays %d def\n", LENGTH_OF(m, y));
      }

      print_julian_info(month, year);   /* Julian date info */
      print_moon_info(month, year);   /* moon info */
      
      printf("printmonth\n");
      find_daytext(month, year, TRUE);   /* holiday text */
      find_daytext(month, year, FALSE);   /* day and note text */
      find_images(month, year);   /* EPS images */
   }
   
   /* end of physical page? */
   if (!do_whole_year || ++nmonths % 12 == 0) {
#ifdef EPS_DSC
      printf("%%%%PageTrailer\n");
      printf("showpage\n");
      printf("clear flush\n");
      printf("PageState restore\n");
#else
      printf("showpage\n");
#endif
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0x1c11f(%rip), %rax     # 0x32744
cmpl $0x0, (%rax)
je 0x1663d
movl 0x1eb28(%rip), %eax     # 0x35158
movl $0xc, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x166b2
movl 0x1eb19(%rip), %eax     # 0x3515c
addl $0x1, %eax
movl %eax, 0x1eb10(%rip)     # 0x3515c
movl 0x1eb0a(%rip), %esi     # 0x3515c
movl 0x1eb04(%rip), %edx     # 0x3515c
leaq 0x142a0(%rip), %rdi     # 0x2a8ff
movb $0x0, %al
callq 0x5110
leaq 0x142a3(%rip), %rdi     # 0x2a910
movb $0x0, %al
callq 0x5110
leaq 0x13dde(%rip), %rdi     # 0x2a459
movb $0x0, %al
callq 0x5110
movl 0x1ead4(%rip), %esi     # 0x3515c
leaq 0x14295(%rip), %rdi     # 0x2a924
movb $0x0, %al
callq 0x5110
leaq 0x1429c(%rip), %rdi     # 0x2a939
movb $0x0, %al
callq 0x5110
leaq 0x142a3(%rip), %rdi     # 0x2a94e
movb $0x0, %al
callq 0x5110
leaq 0x1c08b(%rip), %rax     # 0x32744
cmpl $0x0, (%rax)
je 0x1672d
movl 0x1ea94(%rip), %eax     # 0x35158
movl $0xc, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1672b
leaq 0x1bd28(%rip), %rdi     # 0x32400
leaq 0x14282(%rip), %rsi     # 0x2a961
callq 0x196e0
leaq 0x1bde5(%rip), %rdi     # 0x324d0
leaq 0x1427b(%rip), %rsi     # 0x2a96d
callq 0x196e0
leaq 0x1bea2(%rip), %rdi     # 0x325a0
leaq 0x14274(%rip), %rsi     # 0x2a979
callq 0x196e0
leaq 0x1c0af(%rip), %rdi     # 0x327c0
leaq 0x1426d(%rip), %rsi     # 0x2a985
callq 0x196e0
leaq 0x11e05(%rip), %rdi     # 0x28529
movb $0x0, %al
callq 0x5110
jmp 0x1672d
movl -0x8(%rbp), %esi
leaq 0x1425b(%rip), %rdi     # 0x2a992
movb $0x0, %al
callq 0x5110
movl -0x4(%rbp), %esi
leaq 0x14258(%rip), %rdi     # 0x2a9a0
movb $0x0, %al
callq 0x5110
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %edx
movl $0x1, %esi
callq 0xc110
leaq 0x1bf02(%rip), %rcx     # 0x32668
subl (%rcx), %eax
addl $0x7, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %edx, -0xc(%rbp)
leaq 0x1bfc7(%rip), %rax     # 0x32744
cmpl $0x0, (%rax)
jne 0x167bd
leaq 0x17df3(%rip), %rax     # 0x2e57c
movslq (%rax), %rcx
leaq 0x17ded(%rip), %rax     # 0x2e580
movl (%rax,%rcx,4), %eax
cmpl -0xc(%rbp), %eax
je 0x167b4
leaq 0x17dda(%rip), %rax     # 0x2e57c
movslq (%rax), %rcx
leaq 0x17de4(%rip), %rax     # 0x2e590
movl (%rax,%rcx,4), %eax
cmpl -0xc(%rbp), %eax
jne 0x167bd
movl -0xc(%rbp), %eax
addl $0x7, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
leaq 0x141e8(%rip), %rdi     # 0x2a9af
movb $0x0, %al
callq 0x5110
movl -0x4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x179b2(%rip), %rax     # 0x2e190
movsbl (%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x2, -0x4(%rbp)
movb %al, -0x15(%rbp)
jne 0x1683a
movl -0x8(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x1d(%rbp)
jne 0x16834
movl -0x8(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x1e(%rbp)
jne 0x1682e
movl -0x8(%rbp), %eax
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x1e(%rbp)
movb -0x1e(%rbp), %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
movb %al, -0x15(%rbp)
movl -0x1c(%rbp), %esi
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addl %eax, %esi
leaq 0x14173(%rip), %rdi     # 0x2a9c1
movb $0x0, %al
callq 0x5110
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x19f20
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x19d00
leaq 0x1bed2(%rip), %rax     # 0x32744
cmpl $0x0, (%rax)
je 0x168be
movl 0x1e8db(%rip), %eax     # 0x35158
movl $0xc, %ecx
cltd
idivl %ecx
movl %edx, %esi
leaq 0x14142(%rip), %rdi     # 0x2a9d0
movb $0x0, %al
callq 0x5110
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x1a2e0
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x19fe0
leaq 0x1412c(%rip), %rdi     # 0x2a9de
movb $0x0, %al
callq 0x5110
jmp 0x16b8c
leaq 0x1bb3b(%rip), %rdi     # 0x32400
leaq 0x14095(%rip), %rsi     # 0x2a961
callq 0x196e0
leaq 0x1bbf8(%rip), %rdi     # 0x324d0
leaq 0x1408e(%rip), %rsi     # 0x2a96d
callq 0x196e0
leaq 0x1bcb5(%rip), %rdi     # 0x325a0
leaq 0x14087(%rip), %rsi     # 0x2a979
callq 0x196e0
leaq 0x1bec2(%rip), %rdi     # 0x327c0
leaq 0x14080(%rip), %rsi     # 0x2a985
callq 0x196e0
leaq 0x17c6b(%rip), %rax     # 0x2e57c
cmpl $0x0, (%rax)
je 0x16b40
cmpl $0x1, -0x4(%rbp)
jne 0x1692b
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x16931
movl -0x8(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %esi
movl %esi, -0x14(%rbp)
leaq 0x140ad(%rip), %rdi     # 0x2a9eb
movb $0x0, %al
callq 0x5110
cmpl $0x1, -0x4(%rbp)
jne 0x16955
movl $0xc, %eax
movl %eax, -0x28(%rbp)
jmp 0x1695e
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %esi
movl %esi, -0x10(%rbp)
leaq 0x14090(%rip), %rdi     # 0x2a9fb
movb $0x0, %al
callq 0x5110
movl -0x10(%rbp), %edi
movl -0x14(%rbp), %edx
movl $0x1, %esi
callq 0xc110
leaq 0x1bcdf(%rip), %rcx     # 0x32668
subl (%rcx), %eax
addl $0x7, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %edx, %esi
leaq 0x1406d(%rip), %rdi     # 0x2aa0c
movb $0x0, %al
callq 0x5110
movl -0x10(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x177da(%rip), %rax     # 0x2e190
movsbl (%rax,%rcx), %eax
movl %eax, -0x30(%rbp)
xorl %eax, %eax
cmpl $0x2, -0x10(%rbp)
movb %al, -0x29(%rbp)
jne 0x16a12
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x31(%rbp)
jne 0x16a0c
movl -0x14(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x32(%rbp)
jne 0x16a06
movl -0x14(%rbp), %eax
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
movb %al, -0x29(%rbp)
movl -0x30(%rbp), %esi
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addl %eax, %esi
leaq 0x13ffa(%rip), %rdi     # 0x2aa20
movb $0x0, %al
callq 0x5110
cmpl $0xc, -0x4(%rbp)
jne 0x16a3e
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x16a44
movl -0x8(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %esi
movl %esi, -0x14(%rbp)
leaq 0x13fe0(%rip), %rdi     # 0x2aa31
movb $0x0, %al
callq 0x5110
cmpl $0xc, -0x4(%rbp)
jne 0x16a68
movl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x16a71
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl %esi, -0x10(%rbp)
leaq 0x13fc3(%rip), %rdi     # 0x2aa41
movb $0x0, %al
callq 0x5110
movl -0x10(%rbp), %edi
movl -0x14(%rbp), %edx
movl $0x1, %esi
callq 0xc110
leaq 0x1bbcc(%rip), %rcx     # 0x32668
subl (%rcx), %eax
addl $0x7, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %edx, %esi
leaq 0x13fa0(%rip), %rdi     # 0x2aa52
movb $0x0, %al
callq 0x5110
movl -0x10(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x176c7(%rip), %rax     # 0x2e190
movsbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
xorl %eax, %eax
cmpl $0x2, -0x10(%rbp)
movb %al, -0x3d(%rbp)
jne 0x16b25
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x45(%rbp)
jne 0x16b1f
movl -0x14(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x46(%rbp)
jne 0x16b19
movl -0x14(%rbp), %eax
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x46(%rbp)
movb -0x46(%rbp), %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
movb %al, -0x3d(%rbp)
movl -0x44(%rbp), %esi
movb -0x3d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addl %eax, %esi
leaq 0x13f2d(%rip), %rdi     # 0x2aa66
movb $0x0, %al
callq 0x5110
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x1a2e0
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x19fe0
leaq 0x13f1a(%rip), %rdi     # 0x2aa77
movb $0x0, %al
callq 0x5110
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl $0x1, %edx
callq 0x198f0
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
xorl %edx, %edx
callq 0x198f0
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x19b70
leaq 0x1bbb1(%rip), %rax     # 0x32744
cmpl $0x0, (%rax)
je 0x16bb4
movl 0x1e5ba(%rip), %eax     # 0x35158
addl $0x1, %eax
movl %eax, 0x1e5b1(%rip)     # 0x35158
movl $0xc, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x16bec
leaq 0x13ec8(%rip), %rdi     # 0x2aa83
movb $0x0, %al
callq 0x5110
leaq 0x13ecb(%rip), %rdi     # 0x2aa94
movb $0x0, %al
callq 0x5110
leaq 0x13882(%rip), %rdi     # 0x2a459
movb $0x0, %al
callq 0x5110
leaq 0x13eb9(%rip), %rdi     # 0x2aa9e
movb $0x0, %al
callq 0x5110
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)