// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movl %edi, %ebp
movl %esi, 0x8(%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 0x109fe(%rip), %rdi     # 0x23294
movl %ebp, %esi
movl %edx, 0x10(%rsp)
xorl %eax, %eax
callq 0x5130
leaq 0x109fe(%rip), %rdi     # 0x232a8
movl $0x1, %esi
xorl %eax, %eax
callq 0x5130
leaq 0x10a0a(%rip), %rdi     # 0x232c7
leaq 0x10a18(%rip), %rsi     # 0x232dc
xorl %eax, %eax
callq 0x5130
leaq 0x1bf42(%rip), %rax     # 0x2e814
movslq (%rax), %rax
movl %ebp, 0xc(%rsp)
movslq %ebp, %rdx
leaq -0x1(%rdx), %rcx
movq %rcx, 0x20(%rsp)
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq 0x166b4(%rip), %rax     # 0x28fa8
movq %rdx, 0x18(%rsp)
movq -0x8(%rax,%rdx,8), %rdi
callq 0x12e02
leaq 0x109e5(%rip), %rdi     # 0x232ef
leaq 0x109ef(%rip), %rdx     # 0x23300
movl %ebx, %esi
xorl %eax, %eax
callq 0x5130
leaq 0x12d99(%rip), %rdi     # 0x256ba
xorl %eax, %eax
callq 0x5130
leaq 0x1acb9(%rip), %rbp     # 0x2d5e8
leaq 0x18c0a(%rip), %r15     # 0x2b540
leaq 0x30(%rsp), %rbx
leaq 0x109d0(%rip), %r14     # 0x23312
leaq 0x10b04(%rip), %r12     # 0x2344d
xorl %r13d, %r13d
leaq 0x1bec1(%rip), %rax     # 0x2e814
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 0x12e02
movq %r12, %rdi
xorl %eax, %eax
callq 0x5130
incl %r13d
cmpl $0x7, %r13d
jne 0x1294c
leaq 0x12d0e(%rip), %rdi     # 0x256d8
callq 0x50b0
leaq 0x12ce4(%rip), %rdi     # 0x256ba
callq 0x50b0
movl 0xc(%rsp), %edi
movl $0x1, %esi
movl 0x8(%rsp), %edx
callq 0xab15
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 0x12a65
leaq 0x108ee(%rip), %rdi     # 0x23322
movl %r14d, %esi
xorl %eax, %eax
callq 0x5130
leaq 0x108c2(%rip), %rbx     # 0x23307
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0x10a0b(%rip), %rdi     # 0x2346b
callq 0x50b0
xorl %ebx, %ebx
movl 0x8(%rsp), %edi
xorl %esi, %esi
callq 0xc8d0
testq %rax, %rax
je 0x12a82
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %r13
jmp 0x12a85
xorl %r13d, %r13d
leaq 0x16734(%rip), %rax     # 0x291c0
movq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %edx
movl 0xc(%rsp), %eax
xorl $0x2, %eax
movl 0x8(%rsp), %ecx
andl $0x3, %ecx
orl %eax, %ecx
jne 0x12acd
movl $0x1, %ebx
cmpl $0x0, 0x10(%rsp)
jne 0x12acd
imull $0xc28f5c29, 0x8(%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 %r13, %r13
je 0x12adb
movq (%r13), %rbp
jmp 0x12add
xorl %ebp, %ebp
testl %eax, %eax
jle 0x12cb5
movq %rdx, 0x28(%rsp)
addl %r14d, %ebx
movq %rbx, 0x10(%rsp)
incl %eax
movl $0x1, %r15d
leaq 0x10806(%rip), %r12     # 0x23307
movq %r13, 0x20(%rsp)
movq %rax, 0x18(%rsp)
testl %r14d, %r14d
jle 0x12b44
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 0x12b44
leaq 0x12b7b(%rip), %rdi     # 0x256ba
callq 0x50b0
leaq 0x107e7(%rip), %rdi     # 0x23332
xorl %eax, %eax
callq 0x5130
testb $0x1, %bpl
jne 0x12b6b
leaq 0xd78b(%rip), %rdi      # 0x202ea
movl %r15d, %esi
xorl %eax, %eax
callq 0x5130
jmp 0x12b8a
leaq 0x107d0(%rip), %rdi     # 0x23342
leaq 0x107d0(%rip), %rsi     # 0x23349
movl %r15d, %edx
leaq 0x107de(%rip), %rcx     # 0x23361
xorl %eax, %eax
callq 0x5130
xorl %ebx, %ebx
testq %r13, %r13
je 0x12bfa
movq (%r13,%r15,8), %r13
testq %r13, %r13
je 0x12bfa
xorl %ebx, %ebx
movq 0x8(%r13), %rdi
leaq 0x107c5(%rip), %rsi     # 0x2336d
movl $0x6, %edx
callq 0xa340
testl %eax, %eax
je 0x12bef
leaq 0x107b7(%rip), %rdi     # 0x23374
xorl %eax, %eax
callq 0x5130
movl %r15d, 0x1d41d(%rip)    # 0x2ffe8
movl 0xc(%rsp), %eax
movl %eax, 0x1d417(%rip)     # 0x2ffec
movl %r15d, 0x1d414(%rip)    # 0x2fff0
movl 0x8(%rsp), %eax
movl %eax, 0x1d40e(%rip)     # 0x2fff4
movq 0x8(%r13), %rdi
callq 0x12e02
movq 0x10(%r13), %r13
incl %ebx
testq %r13, %r13
jne 0x12b9d
movslq %r14d, %rax
imulq $-0x6db6db6d, %rax, %r13 # imm = 0x92492493
shrq $0x20, %r13
addl %r14d, %r13d
movl %r13d, %eax
shrl $0x1f, %eax
sarl $0x2, %r13d
addl %eax, %r13d
leal (,%r13,8), %eax
subl %eax, %r13d
addl %r14d, %r13d
sete %al
cmpl $0x2, %ebx
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x12c47
addl $-0x2, %ebx
movq %r12, %rdi
xorl %eax, %eax
callq 0x5130
incl %ebx
jne 0x12c39
leaq 0x1081d(%rip), %rdi     # 0x2346b
callq 0x50b0
cmpl $0x6, %r13d
jne 0x12c65
leaq 0x12a78(%rip), %rdi     # 0x256d8
callq 0x50b0
incq %r15
incl %r14d
sarq %rbp
movq 0x18(%rsp), %rax
cmpq %rax, %r15
movq 0x20(%rsp), %r13
jne 0x12b0b
movq 0x10(%rsp), %rax
addl 0x28(%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 0x12cf7
movl $0x7, %esi
subl %r14d, %esi
leaq 0x10659(%rip), %rdi     # 0x23322
xorl %eax, %eax
callq 0x5130
leaq 0x10630(%rip), %rbx     # 0x23307
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0x10779(%rip), %rdi     # 0x2346b
callq 0x50b0
leaq 0x129da(%rip), %rdi     # 0x256d8
callq 0x50b0
leaq 0x129c5(%rip), %rdi     # 0x256cf
callq 0x50b0
leaq 0x1b786(%rip), %r15     # 0x2e49c
cmpl $0x3, (%r15)
jl 0x12df3
leaq 0x1a8c5(%rip), %rax     # 0x2d5ec
movl (%rax), %ebp
leaq 0x107b7(%rip), %rdi     # 0x234e7
xorl %eax, %eax
callq 0x5130
cmpl $0x0, (%r15)
jle 0x12df3
leaq 0x1b750(%rip), %rax     # 0x2e498
movl (%rax), %eax
leaq 0x1b743(%rip), %rcx     # 0x2e494
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 0x10563(%rip), %rax     # 0x2330b
leaq 0x105c6(%rip), %rcx     # 0x23375
cmoveq %rcx, %rax
movq %rax, (%rsp)
leaq 0x105bc(%rip), %rdi     # 0x2337a
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 0x12d67
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq