// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edi, %ebp
movl %esi, 0x10(%rsp)
movslq %esi, %rbx
imulq $0x51eb851f, %rbx, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
imull $0x64, %eax, %eax
movl %ebx, %edx
subl %eax, %edx
leaq 0xfe22(%rip), %rdi      # 0x22224
movl %ebp, %esi
movl %edx, 0x18(%rsp)
xorl %eax, %eax
callq 0x5130
leaq 0xfe22(%rip), %rdi      # 0x22238
movl $0x1, %esi
xorl %eax, %eax
callq 0x5130
leaq 0xfe2e(%rip), %rdi      # 0x22257
leaq 0xfe3c(%rip), %rsi      # 0x2226c
xorl %eax, %eax
callq 0x5130
leaq 0x1b3d6(%rip), %rax     # 0x2d814
movslq (%rax), %rax
movl %ebp, 0x14(%rsp)
movslq %ebp, %rdx
leaq -0x1(%rdx), %rcx
movq %rcx, 0x28(%rsp)
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq 0x15b48(%rip), %rax     # 0x27fa8
movq %rdx, 0x20(%rsp)
movq -0x8(%rax,%rdx,8), %rdi
callq 0x12976
leaq 0xfe09(%rip), %rdi      # 0x2227f
leaq 0xfe13(%rip), %rdx      # 0x22290
movl %ebx, %esi
xorl %eax, %eax
callq 0x5130
leaq 0x121bd(%rip), %rdi     # 0x2464a
xorl %eax, %eax
callq 0x5130
leaq 0x1a14d(%rip), %rbp     # 0x2c5e8
leaq 0x1809e(%rip), %r15     # 0x2a540
leaq 0x40(%rsp), %rbx
leaq 0xfdf4(%rip), %r14      # 0x222a2
leaq 0xff28(%rip), %r12      # 0x223dd
xorl %r13d, %r13d
leaq 0x1b355(%rip), %rax     # 0x2d814
movslq (%rax), %rax
movl (%rbp), %ecx
addl %r13d, %ecx
movslq %ecx, %rcx
imulq $-0x6db6db6d, %rcx, %rdx # imm = 0x92492493
shrq $0x20, %rdx
addl %ecx, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x2, %edx
addl %esi, %edx
leal (,%rdx,8), %esi
subl %esi, %edx
addl %ecx, %edx
movslq %edx, %rcx
leaq (%rcx,%rcx,4), %rcx
imulq $0x8c, %rax, %rax
addq %r15, %rax
leaq (%rax,%rcx,4), %rsi
movq %rbx, %rdi
callq 0x50a0
movq %r14, %rdi
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
callq 0x12976
movq %r12, %rdi
xorl %eax, %eax
callq 0x5130
incl %r13d
cmpl $0x7, %r13d
jne 0x124b8
leaq 0x12132(%rip), %rdi     # 0x24668
callq 0x50b0
leaq 0x12108(%rip), %rdi     # 0x2464a
callq 0x50b0
movl $0x1, %r15d
movl 0x14(%rsp), %edi
movl $0x1, %esi
movl 0x10(%rsp), %edx
callq 0xa53f
movl (%rbp), %ecx
movl %eax, %edx
subl %ecx, %edx
negl %ecx
addl %ecx, %eax
addl $0x7, %eax
cltq
imulq $-0x6db6db6d, %rax, %rax # imm = 0x92492493
shrq $0x20, %rax
addl %edx, %eax
addl $0x7, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x2, %eax
addl %ecx, %eax
leal (,%rax,8), %ecx
subl %ecx, %eax
leal (%rax,%rdx), %r14d
addl $0x7, %r14d
testl %r14d, %r14d
jle 0x125d2
leaq 0xfd0c(%rip), %rdi      # 0x222b2
movl %r14d, %esi
xorl %eax, %eax
callq 0x5130
leaq 0xfce0(%rip), %rbx      # 0x22297
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
decl %r15d
je 0x125b7
leaq 0xfe2e(%rip), %rdi      # 0x223fb
callq 0x50b0
xorl %ebx, %ebx
movl 0x10(%rsp), %edi
xorl %esi, %esi
callq 0xc3f7
testq %rax, %rax
je 0x125ef
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rbp
jmp 0x125f1
xorl %ebp, %ebp
leaq 0x15bc8(%rip), %rax     # 0x281c0
movq 0x28(%rsp), %rcx
movsbl (%rax,%rcx), %edx
movl 0x14(%rsp), %eax
xorl $0x2, %eax
movl 0x10(%rsp), %ecx
andl $0x3, %ecx
orl %eax, %ecx
jne 0x12639
movl $0x1, %ebx
cmpl $0x0, 0x18(%rsp)
jne 0x12639
imull $0xc28f5c29, 0x10(%rsp), %eax # imm = 0xC28F5C29
addl $0x51eb850, %eax        # imm = 0x51EB850
rorl $0x4, %eax
xorl %ebx, %ebx
cmpl $0xa3d70b, %eax         # imm = 0xA3D70B
setb %bl
leal (%rbx,%rdx), %eax
testq %rbp, %rbp
je 0x12647
movq (%rbp), %rcx
jmp 0x12649
xorl %ecx, %ecx
testl %eax, %eax
jle 0x1282a
movl %ebx, %eax
addl %r14d, %ebx
movq %rbx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
addl %edx, %eax
incl %eax
movq %rax, 0x18(%rsp)
movl $0x1, %r15d
leaq 0xfc21(%rip), %r12      # 0x22297
leaq 0xfc80(%rip), %r13      # 0x222fd
movq %rcx, %rbx
movq %rbp, 0x20(%rsp)
testl %r14d, %r14d
jle 0x126be
movl %r14d, %eax
imulq $0x24924925, %rax, %rax # imm = 0x24924925
shrq $0x20, %rax
movl %r14d, %ecx
subl %eax, %ecx
shrl %ecx
addl %eax, %ecx
shrl $0x2, %ecx
leal (,%rcx,8), %eax
subl %eax, %ecx
addl %r14d, %ecx
jne 0x126be
leaq 0x11f91(%rip), %rdi     # 0x2464a
callq 0x50b0
leaq 0xfbfd(%rip), %rdi      # 0x222c2
xorl %eax, %eax
callq 0x5130
testb $0x1, %bl
jne 0x126e4
leaq 0xcba2(%rip), %rdi      # 0x1f27a
movl %r15d, %esi
xorl %eax, %eax
callq 0x5130
jmp 0x12703
leaq 0xfbe7(%rip), %rdi      # 0x222d2
leaq 0xfbe7(%rip), %rsi      # 0x222d9
movl %r15d, %edx
leaq 0xfbf5(%rip), %rcx      # 0x222f1
xorl %eax, %eax
callq 0x5130
movq %rbx, 0x28(%rsp)
testq %rbp, %rbp
je 0x12714
movq (%rbp,%r15,8), %rbx
jmp 0x12716
xorl %ebx, %ebx
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x12773
movq 0x8(%rbx), %rdi
movq %r13, %rsi
movl $0x6, %edx
callq 0x9d60
testl %eax, %eax
je 0x1276b
leaq 0xfbcb(%rip), %rdi      # 0x22304
xorl %eax, %eax
callq 0x5130
movl %r15d, 0x1c8a1(%rip)    # 0x2efe8
movl 0x14(%rsp), %eax
movl %eax, 0x1c89b(%rip)     # 0x2efec
movl %r15d, 0x1c898(%rip)    # 0x2eff0
movl 0x10(%rsp), %eax
movl %eax, 0x1c892(%rip)     # 0x2eff4
movq 0x8(%rbx), %rdi
callq 0x12976
movq 0x10(%rbx), %rbx
incl %ebp
jmp 0x12718
movslq %r14d, %rax
imulq $-0x6db6db6d, %rax, %rbx # imm = 0x92492493
shrq $0x20, %rbx
addl %r14d, %ebx
movl %ebx, %eax
shrl $0x1f, %eax
sarl $0x2, %ebx
addl %eax, %ebx
leal (,%rbx,8), %eax
subl %eax, %ebx
addl %r14d, %ebx
sete %al
cmpl $0x2, %ebp
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x127bb
addl $-0x2, %ebp
movq %r12, %rdi
xorl %eax, %eax
callq 0x5130
incl %ebp
jne 0x127ad
leaq 0xfc39(%rip), %rdi      # 0x223fb
callq 0x50b0
cmpl $0x6, %ebx
jne 0x127d8
leaq 0x11e95(%rip), %rdi     # 0x24668
callq 0x50b0
incq %r15
incl %r14d
movq 0x28(%rsp), %rbx
sarq %rbx
cmpq 0x18(%rsp), %r15
movq 0x20(%rsp), %rbp
jne 0x12685
movq 0x38(%rsp), %rax
addl 0x30(%rsp), %eax
cltq
imulq $-0x6db6db6d, %rax, %r14 # imm = 0x92492493
shrq $0x20, %r14
addl %eax, %r14d
movl %r14d, %ecx
shrl $0x1f, %ecx
sarl $0x2, %r14d
addl %ecx, %r14d
leal (,%r14,8), %ecx
subl %ecx, %r14d
addl %eax, %r14d
testl %r14d, %r14d
je 0x1286b
movl $0x7, %esi
subl %r14d, %esi
leaq 0xfa74(%rip), %rdi      # 0x222b2
xorl %eax, %eax
callq 0x5130
movl $0x1, %ebp
leaq 0xfa46(%rip), %rbx      # 0x22297
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
decl %ebp
je 0x12851
leaq 0xfb95(%rip), %rdi      # 0x223fb
callq 0x50b0
leaq 0x11df6(%rip), %rdi     # 0x24668
callq 0x50b0
leaq 0x11de1(%rip), %rdi     # 0x2465f
callq 0x50b0
leaq 0x1ac12(%rip), %r15     # 0x2d49c
cmpl $0x3, (%r15)
jl 0x12967
leaq 0x19d51(%rip), %rax     # 0x2c5ec
movl (%rax), %ebp
leaq 0xfbd3(%rip), %rdi      # 0x22477
xorl %eax, %eax
callq 0x5130
cmpl $0x0, (%r15)
jle 0x12967
leaq 0x1abdc(%rip), %rax     # 0x2d498
movl (%rax), %eax
leaq 0x1abcf(%rip), %rcx     # 0x2d494
movl (%rcx), %r14d
xorl %ebx, %ebx
cmpl $0x1, %ebp
sete %bl
xorl $0x2f, %ebx
movl $0x1, %r13d
xorl %ebp, %ebp
movl %ebp, %ecx
movl $0xaaaaaaab, %edx       # imm = 0xAAAAAAAB
imulq %rdx, %rcx
shrq $0x23, %rcx
leal (%rcx,%rcx,2), %ecx
leal 0xb(,%rcx,4), %ecx
movslq %eax, %r12
imulq $0x51eb851f, %r12, %rax # imm = 0x51EB851F
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rax
addl %edx, %eax
imull $0x64, %eax, %eax
movl %r12d, %edx
subl %eax, %edx
cmpl %ebp, %ecx
leaq 0xf97f(%rip), %rax      # 0x2229b
leaq 0xf9e2(%rip), %rcx      # 0x22305
cmoveq %rcx, %rax
movq %rax, (%rsp)
leaq 0xf9d8(%rip), %rdi      # 0x2230a
movl %r14d, %esi
movl %r14d, %ecx
movl %ebx, %r8d
movl %edx, %r9d
xorl %eax, %eax
callq 0x5130
incl %ebp
xorl %eax, %eax
cmpl $0xc, %r14d
leal 0x1(%r14), %ecx
sete %al
cmovel %r13d, %ecx
addl %r12d, %eax
movl %ecx, %r14d
cmpl (%r15), %ebp
jl 0x128db
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq