// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/writefil.c
// Function: single_month_html
void single_month_html (int this_month, int this_year)
{
   long holidays;
   int day, box, len;
   year_info *py;
   month_info *pm;
   register day_info *pd;
   
   /* table heading with month and year */
   printf("<a name=_%02d%02d>\n", this_month, this_year % 100);
   printf("<table width=100%% border=%d>\n", BORDER);
   printf("<tr><th colspan=7>%s", MONTHYEAR_PRE);
   print_html(months_ml[output_language][this_month-1]);
   printf(" %d%s</th></tr>\n", this_year, MONTHYEAR_POST);
   
   /* headings for weekday names */
   printf("<tr>");
   for (day = 0; day < 7; day++) {
      char buf[40];
      strcpy(buf, days_ml[output_language][(day + first_day_of_week) % 7]);

      /* buf[ABBR_MONTH_LEN] = '\0'; */

      printf("<th width=14%%>");
      print_html(buf);
      printf("</th>");
   }
   printf("</tr>\n");
   
   /* blank space at beginning (if necessary) - divide into N one-column
    * boxes (#if DIVIDE_BLANK_SPACE) or print as single N-column box
    */
   printf("<tr>\n");
   if ((box = START_BOX(this_month, this_year)) > 0) {

#if DIVIDE_BLANK_SPACE
      int i;
      for (i = 0; i < box; i++) {
         printf("<td>");
         BLANKLINES(TEXTLINES);
         printf("</td>\n");
      }
#else
      printf("<td colspan=%d>", box);
      BLANKLINES(TEXTLINES);
      printf("</td>\n");
#endif
   }

   /* get pointer to text information for current month */
   pm = (py = find_year(this_year, FALSE)) != NULL ? py->month[this_month-1] : NULL;

   /* main loop for dates */
   len = LENGTH_OF(this_month, this_year);
   for (day = 1, holidays = pm ? pm->holidays : 0;
        day <= len;
        day++, box++, holidays >>= 1) {
      int nrows;
      
      if (box > 0 && box % 7 == 0) printf("<tr>\n");   /* start of row */
         
      printf("<td valign=top>");

      /* special HTML code for holidays (cf. pcaldefs.h) */
      if (holidays & 01) printf("%s%d%s", HOLIDAY_PRE, day, HOLIDAY_POST);
      else printf("%d", day);

      /* print associated text (count lines) */
      for (nrows = 0, pd = pm ? pm->day[day-1] : NULL;
           pd;
           pd = pd->next, nrows++) {
         /* Skip lines specifying an EPS image... */
         if (ci_strncmp(pd->text, "image:", 6) == 0) continue;
         printf("\n<br>");
         this_day = day;
         RESET_DATE();   /* reset working date */
         print_html(pd->text);
      }
      
      /* pad first box in each row with blank lines */
      if (box % 7 == 0 && nrows < TEXTLINES) BLANKLINES(TEXTLINES - nrows);
      
      printf("</td>\n");
      if (box % 7 == 6) printf("</tr>\n");   /* end of row */
   }

   /* blank space at end (if necessary) - divide into N one-column
    * boxes (#if DIVIDE_BLANK_SPACE) or print as single N-column box
    */
   if ((box %= 7) != 0) {
#if DIVIDE_BLANK_SPACE
      int i;
      for (i = box; i < 7; i++) {
         printf("<td>");
         BLANKLINES(TEXTLINES);
         printf("</td>\n");
      }
#else
      printf("<td colspan=%d>", 7 - box);
      BLANKLINES(TEXTLINES);
      printf("</td>\n");
#endif
   }
   printf("</tr>\n");
   printf("</table>\n");

   /* links to other months on page */
   if (nmonths > 2) {
      int j, m, y;
      char c = date_style == EUR_DATES ? '.' : '/';
      
      printf("<p>");
      for (j = 0, m = init_month, y = init_year;
           j < nmonths;
           j++, BUMP_MONTH_AND_YEAR(m, y)) {
         printf("<a href=#_%02d%02d>%02d%c%02d</a>%s\n",
                m, y % 100, m, c, y % 100,
                j % 12 == 11 ? "<br>" : "&nbsp;");
      }
   }

   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %esi
movl -0x8(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
leaq 0x13581(%rip), %rdi     # 0x2a477
movb $0x0, %al
callq 0x5110
leaq 0x13587(%rip), %rdi     # 0x2a48b
movl $0x1, %esi
movb $0x0, %al
callq 0x5110
leaq 0x13593(%rip), %rdi     # 0x2a4aa
leaq 0x135a1(%rip), %rsi     # 0x2a4bf
movb $0x0, %al
callq 0x5110
leaq 0x1c958(%rip), %rax     # 0x33884
movslq (%rax), %rcx
leaq 0x18cea(%rip), %rax     # 0x2fc20
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x17500
movl -0x8(%rbp), %esi
leaq 0x13579(%rip), %rdi     # 0x2a4d2
leaq 0x13583(%rip), %rdx     # 0x2a4e3
movb $0x0, %al
callq 0x5110
leaq 0x13587(%rip), %rdi     # 0x2a4f5
movb $0x0, %al
callq 0x5110
movl $0x0, -0x14(%rbp)
cmpl $0x7, -0x14(%rbp)
jge 0x16ff4
leaq -0x60(%rbp), %rdi
leaq 0x1c8f7(%rip), %rax     # 0x33884
movslq (%rax), %rax
leaq 0x19589(%rip), %rsi     # 0x30520
imulq $0x8c, %rax, %rax
addq %rax, %rsi
movl -0x14(%rbp), %eax
leaq 0x1b6bd(%rip), %rcx     # 0x32668
addl (%rcx), %eax
movl $0x7, %ecx
cltd
idivl %ecx
movslq %edx, %rax
imulq $0x14, %rax, %rax
addq %rax, %rsi
callq 0x5080
leaq 0x1352f(%rip), %rdi     # 0x2a4fa
movb $0x0, %al
callq 0x5110
leaq -0x60(%rbp), %rdi
callq 0x17500
leaq 0x1367c(%rip), %rdi     # 0x2a65e
movb $0x0, %al
callq 0x5110
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x16f7c
leaq 0x135d1(%rip), %rdi     # 0x2a5cc
movb $0x0, %al
callq 0x5110
leaq 0x13501(%rip), %rdi     # 0x2a50a
movb $0x0, %al
callq 0x5110
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %edx
movl $0x1, %esi
callq 0xc110
leaq 0x1b641(%rip), %rcx     # 0x32668
subl (%rcx), %eax
addl $0x7, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %edx, -0x18(%rbp)
cmpl $0x0, %edx
jle 0x17083
movl -0x18(%rbp), %esi
leaq 0x134ca(%rip), %rdi     # 0x2a510
movb $0x0, %al
callq 0x5110
movl $0x0, -0x64(%rbp)
cmpl $0x2, -0x64(%rbp)
jge 0x17073
leaq 0x13489(%rip), %rdi     # 0x2a4ea
movb $0x0, %al
callq 0x5110
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x17054
jmp 0x17075
leaq 0x134a4(%rip), %rdi     # 0x2a520
movb $0x0, %al
callq 0x5110
movl -0x8(%rbp), %edi
xorl %esi, %esi
callq 0xefe0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x170b2
movq -0x28(%rbp), %rax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
jmp 0x170bd
xorl %eax, %eax
movq %rax, -0x88(%rbp)
jmp 0x170bd
movq -0x88(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x170b8(%rip), %rax     # 0x2e190
movsbl (%rax,%rcx), %eax
movl %eax, -0x90(%rbp)
xorl %eax, %eax
cmpl $0x2, -0x4(%rbp)
movb %al, -0x89(%rbp)
jne 0x1714f
movl -0x8(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x91(%rbp)
jne 0x17143
movl -0x8(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x92(%rbp)
jne 0x17137
movl -0x8(%rbp), %eax
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x92(%rbp)
movb -0x92(%rbp), %al
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
movb %al, -0x89(%rbp)
movl -0x90(%rbp), %eax
movb -0x89(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl $0x1, -0x14(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x17184
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
jmp 0x1718f
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x1718f
movq -0xa0(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x17372
cmpl $0x0, -0x18(%rbp)
jle 0x171ca
movl -0x18(%rbp), %eax
movl $0x7, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x171ca
leaq 0x13347(%rip), %rdi     # 0x2a50a
movb $0x0, %al
callq 0x5110
leaq 0x13356(%rip), %rdi     # 0x2a527
movb $0x0, %al
callq 0x5110
movq -0x10(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x17207
movl -0x14(%rbp), %edx
leaq 0x13347(%rip), %rdi     # 0x2a537
leaq 0x13347(%rip), %rsi     # 0x2a53e
leaq 0x13358(%rip), %rcx     # 0x2a556
movb $0x0, %al
callq 0x5110
jmp 0x17218
movl -0x14(%rbp), %esi
leaq 0xe34f(%rip), %rdi      # 0x25560
movb $0x0, %al
callq 0x5110
movl $0x0, -0x68(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x17241
movq -0x30(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0xa8(%rbp)
jmp 0x1724c
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0x1724c
movq -0xa8(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x172d7
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x132f5(%rip), %rsi     # 0x2a562
movl $0x6, %edx
callq 0xb3b0
cmpl $0x0, %eax
jne 0x1727e
jmp 0x172c0
leaq 0x132e4(%rip), %rdi     # 0x2a569
movb $0x0, %al
callq 0x5110
movl -0x14(%rbp), %eax
movl %eax, 0x1ddd3(%rip)     # 0x35068
movl -0x4(%rbp), %eax
movl %eax, 0x1ddce(%rip)     # 0x3506c
movl 0x1ddc4(%rip), %eax     # 0x35068
movl %eax, 0x1ddc6(%rip)     # 0x35070
movl -0x8(%rbp), %eax
movl %eax, 0x1ddc1(%rip)     # 0x35074
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17500
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x17257
movl -0x18(%rbp), %eax
movl $0x7, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x17322
cmpl $0x2, -0x68(%rbp)
jge 0x17322
jmp 0x172ef
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl $0x2, %ecx
subl -0x68(%rbp), %ecx
cmpl %ecx, %eax
jge 0x1731e
leaq 0x131de(%rip), %rdi     # 0x2a4ea
movb $0x0, %al
callq 0x5110
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x172f6
jmp 0x17320
jmp 0x17322
leaq 0x131f7(%rip), %rdi     # 0x2a520
movb $0x0, %al
callq 0x5110
movl -0x18(%rbp), %eax
movl $0x7, %ecx
cltd
idivl %ecx
cmpl $0x6, %edx
jne 0x1734e
leaq 0x13285(%rip), %rdi     # 0x2a5cc
movb $0x0, %al
callq 0x5110
jmp 0x17350
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
sarq %rax
movq %rax, -0x10(%rbp)
jmp 0x1719a
movl -0x18(%rbp), %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %edx, -0x18(%rbp)
cmpl $0x0, %edx
je 0x173d1
movl $0x7, %esi
subl -0x18(%rbp), %esi
leaq 0x1317c(%rip), %rdi     # 0x2a510
movb $0x0, %al
callq 0x5110
movl $0x0, -0x70(%rbp)
cmpl $0x2, -0x70(%rbp)
jge 0x173c1
leaq 0x1313b(%rip), %rdi     # 0x2a4ea
movb $0x0, %al
callq 0x5110
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x173a2
jmp 0x173c3
leaq 0x13156(%rip), %rdi     # 0x2a520
movb $0x0, %al
callq 0x5110
leaq 0x131f4(%rip), %rdi     # 0x2a5cc
movb $0x0, %al
callq 0x5110
leaq 0x13189(%rip), %rdi     # 0x2a56f
movb $0x0, %al
callq 0x5110
leaq 0x1c128(%rip), %rax     # 0x3351c
cmpl $0x2, (%rax)
jle 0x174ef
leaq 0x1b268(%rip), %rax     # 0x3266c
movl (%rax), %edx
movl $0x2f, %eax
movl $0x2e, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movb %al, -0x7d(%rbp)
leaq 0x132fb(%rip), %rdi     # 0x2a71b
movb $0x0, %al
callq 0x5110
movl $0x0, -0x74(%rbp)
leaq 0x1c0df(%rip), %rax     # 0x33514
movl (%rax), %eax
movl %eax, -0x78(%rbp)
leaq 0x1c0d7(%rip), %rax     # 0x33518
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
movl -0x74(%rbp), %eax
leaq 0x1c0cc(%rip), %rcx     # 0x3351c
cmpl (%rcx), %eax
jge 0x174ed
movl -0x78(%rbp), %esi
movl -0x7c(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %edx, -0xac(%rbp)
movl -0x78(%rbp), %ecx
movsbl -0x7d(%rbp), %r8d
movl -0x7c(%rbp), %eax
movl $0x64, %edi
cltd
idivl %edi
movl %edx, %r9d
movl -0x74(%rbp), %eax
movl $0xc, %edi
cltd
idivl %edi
movl %edx, %r10d
movl -0xac(%rbp), %edx
leaq 0x13051(%rip), %rax     # 0x2a4ee
leaq 0x130c6(%rip), %rdi     # 0x2a56a
cmpl $0xb, %r10d
cmoveq %rdi, %rax
leaq 0x130c6(%rip), %rdi     # 0x2a579
movq %rax, (%rsp)
movb $0x0, %al
callq 0x5110
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
cmpl $0xc, -0x78(%rbp)
jne 0x174df
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
movl $0x1, -0x78(%rbp)
jmp 0x174e8
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x17446
jmp 0x174ef
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)