// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/writefil.c
// Function: single_month_one_column_html
void single_month_one_column_html (int this_month, int this_year)
{
   long holidays;
   int day, box = 0, len, i;
   year_info *py;
   month_info *pm;
   register day_info *pd;
   char *text_short;
   
   /* table heading with first 5 chars of the month */
   printf("<table border=%d>\n", BORDER);
   printf("<tr><th width=100px>%s</th></tr>\n", months_ml[output_language][this_month-1]);
   
   /* 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;
      
      /* print only one column for the month */
      printf("<tr>\n");
      printf("<td valign=top>");

      /* special HTML code for holidays (cf. pcaldefs.h) */
      if (holidays & 01) {
         printf("%s%d%s %c", HOLIDAY_PRE, day, HOLIDAY_POST,
                days_ml[output_language][(day + START_BOX(this_month, this_year) + 
                                          first_day_of_week - 1) % 7][0]);
      }
      else {
         /* print Sundays in bold */
         if ((day + START_BOX(this_month, this_year) + first_day_of_week - 1) % 7 == 0) {
            printf("<B>%d %c</B>", day,
                   days_ml[output_language][(day + START_BOX(this_month, this_year) + 
                                             first_day_of_week - 1) % 7][0]);
         }
         /* print Saturdays in gray */
         else if ((day + START_BOX(this_month, this_year) + first_day_of_week - 1) % 7 == 6) {
            printf("<B><FONT color=darkgray>%d</FONT> %c</B>", day,
                   days_ml[output_language][(day + START_BOX(this_month, this_year) + 
                                             first_day_of_week - 1) % 7][0]);
         }
         else {
            printf("%d %c", day, days_ml[output_language]
                   [(day + START_BOX(this_month, this_year) + first_day_of_week - 1) % 7][0]);
         }
         /* print associated text (count lines),
            not for holidays */
         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<I>");
            this_day = day;
            RESET_DATE();   /* reset working date */
            text_short = pd->text;
            for  (i=0; i < 5; i++) {
               if (text_short[i] == '\0') break;
               /* if text starts with < it is probably an HTML tag (e.g. <I>)
                  -> skip three letters
               */
               if(text_short[0] == '<' && text_short[i+3] == '\0') break;
               if(text_short[0] == '<') printf("%c",text_short[i+3]);
               else printf("%c",text_short[i]);
            }
            printf("</I>\n");
         }
      }
      
      /* TR-tag to end the row */
      printf("</td></TR>\n");
      if (box % 7 == 6) printf("</tr>\n");   /* end of row */
   }
   printf("</tr>\n");
   printf("</table>\n");

   return;   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebp
movl %edi, %ebx
leaq 0x104df(%rip), %rdi     # 0x2339f
movq $0x0, 0x10(%rsp)
movl $0x1, %esi
xorl %eax, %eax
callq 0x5130
leaq 0x1b938(%rip), %rax     # 0x2e814
movslq (%rax), %rax
movl %ebx, 0xc(%rsp)
movslq %ebx, %rbx
leaq -0x1(%rbx), %r14
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq 0x160af(%rip), %rax     # 0x28fa8
movq -0x8(%rax,%rbx,8), %rsi
leaq 0x104ad(%rip), %rdi     # 0x233b2
xorl %eax, %eax
callq 0x5130
movl %ebp, 0x24(%rsp)
movl %ebp, %edi
xorl %esi, %esi
callq 0xc8d0
testq %rax, %rax
je 0x12f24
movq (%rax,%rbx,8), %rdi
jmp 0x12f26
xorl %edi, %edi
leaq 0x16293(%rip), %rax     # 0x291c0
movsbl (%rax,%r14), %eax
movl 0xc(%rsp), %ebp
movl %ebp, %ecx
xorl $0x2, %ecx
movl 0x24(%rsp), %ebx
movl %ebx, %edx
andl $0x3, %edx
orl %ecx, %edx
jne 0x12f7e
imull $0xc28f5c29, %ebx, %ecx # imm = 0xC28F5C29
addl $0x51eb850, %ecx        # imm = 0x51EB850
movl %ecx, %edx
rorl $0x2, %edx
movl $0x1, %esi
movq %rsi, 0x10(%rsp)
cmpl $0x28f5c28, %edx        # imm = 0x28F5C28
ja 0x12f7e
rorl $0x4, %ecx
xorl %edx, %edx
cmpl $0xa3d70b, %ecx         # imm = 0xA3D70B
setb %dl
movq %rdx, 0x10(%rsp)
movq 0x10(%rsp), %rcx
addl %eax, %ecx
movq %rcx, 0x10(%rsp)
testq %rdi, %rdi
movq %rdi, 0x28(%rsp)
je 0x12f99
movq (%rdi), %r15
jmp 0x12f9c
xorl %r15d, %r15d
cmpl $0x0, 0x10(%rsp)
jle 0x133c6
movl $0x1, %r14d
leaq 0x1a634(%rip), %r13     # 0x2d5e8
xorl %r12d, %r12d
leaq 0x126fc(%rip), %rdi     # 0x256ba
callq 0x50b0
leaq 0x10368(%rip), %rdi     # 0x23332
xorl %eax, %eax
callq 0x5130
testb $0x1, %r15b
jne 0x13161
movl %ebp, %edi
movl $0x1, %esi
movl %ebx, %edx
callq 0xab15
movl (%r13), %ecx
subl %ecx, %eax
movl %eax, %edx
addl $0x7, %edx
movslq %edx, %rdx
imulq $-0x6db6db6d, %rdx, %rdx # imm = 0x92492493
shrq $0x20, %rdx
addl %eax, %edx
addl $0x7, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x2, %edx
addl %esi, %edx
leal (,%rdx,8), %esi
subl %esi, %edx
addl %edx, %eax
addl $0x7, %eax
leal -0x1(%r14), %edx
movl %edx, 0x18(%rsp)
addl %r14d, %ecx
decl %ecx
addl %eax, %ecx
imull $0xb6db6db7, %ecx, %eax # imm = 0xB6DB6DB7
addl $0x12492492, %eax       # imm = 0x12492492
cmpl $0x24924924, %eax       # imm = 0x24924924
jbe 0x13225
movl %ebp, %edi
movl $0x1, %esi
movl %ebx, %edx
callq 0xab15
movl (%r13), %ecx
subl %ecx, %eax
movl %eax, %edx
addl $0x7, %edx
movslq %edx, %rdx
imulq $-0x6db6db6d, %rdx, %rdx # imm = 0x92492493
shrq $0x20, %rdx
addl %eax, %edx
addl $0x7, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x2, %edx
addl %esi, %edx
leal (,%rdx,8), %esi
subl %esi, %edx
addl %edx, %eax
addl $0x7, %eax
addl 0x18(%rsp), %ecx
addl %eax, %ecx
movslq %ecx, %rax
movl %ebp, %edi
imulq $-0x6db6db6d, %rax, %rbp # imm = 0x92492493
shrq $0x20, %rbp
addl %eax, %ebp
movl %ebp, %ecx
shrl $0x1f, %ecx
sarl $0x2, %ebp
addl %ecx, %ebp
leal (,%rbp,8), %ecx
subl %ecx, %ebp
addl %eax, %ebp
leaq 0x1b758(%rip), %rax     # 0x2e814
movslq (%rax), %rax
movq %rax, 0x30(%rsp)
movl $0x1, %esi
movl %ebx, %edx
callq 0xab15
movl (%r13), %ecx
subl %ecx, %eax
movl %eax, %edx
addl $0x7, %edx
movslq %edx, %rdx
imulq $-0x6db6db6d, %rdx, %rdx # imm = 0x92492493
shrq $0x20, %rdx
addl %eax, %edx
addl $0x7, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x2, %edx
addl %esi, %edx
leal (,%rdx,8), %esi
subl %esi, %edx
addl %edx, %eax
addl $0x7, %eax
addl 0x18(%rsp), %ecx
addl %eax, %ecx
movslq %ecx, %rax
imulq $-0x6db6db6d, %rax, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x2, %ecx
addl %edx, %ecx
leal (,%rcx,8), %edx
subl %edx, %ecx
addl %eax, %ecx
imulq $0x8c, 0x30(%rsp), %rax
addq 0x15e8f(%rip), %rax     # 0x28fd0
movslq %ecx, %rcx
leaq (%rcx,%rcx,4), %rcx
movsbl (%rax,%rcx,4), %edx
cmpl $0x6, %ebp
jne 0x132c2
leaq 0x1028f(%rip), %rdi     # 0x233eb
jmp 0x132c9
leaq 0x1b6ac(%rip), %rax     # 0x2e814
movslq (%rax), %rax
movq %rax, 0x18(%rsp)
movl %ebp, %edi
movl $0x1, %esi
movl %ebx, %edx
callq 0xab15
movl (%r13), %ecx
subl %ecx, %eax
movl %eax, %edx
addl $0x7, %edx
movslq %edx, %rdx
imulq $-0x6db6db6d, %rdx, %rdx # imm = 0x92492493
shrq $0x20, %rdx
addl %eax, %edx
addl $0x7, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x2, %edx
addl %esi, %edx
leal (,%rdx,8), %esi
subl %esi, %edx
addl %edx, %eax
addl $0x7, %eax
addl %r14d, %ecx
leal (%rcx,%rax), %edx
addl %ecx, %eax
decl %eax
cltq
imulq $-0x6db6db6d, %rax, %rax # imm = 0x92492493
shrq $0x20, %rax
addl %edx, %eax
decl %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x2, %eax
addl %ecx, %eax
leal (,%rax,8), %ecx
subl %ecx, %eax
addl %edx, %eax
decl %eax
cltq
leaq (%rax,%rax,4), %rax
imulq $0x8c, 0x18(%rsp), %rcx
addq 0x15dd4(%rip), %rcx     # 0x28fd0
movsbl (%rcx,%rax,4), %r8d
leaq 0x101cc(%rip), %rdi     # 0x233d4
leaq 0x1013a(%rip), %rsi     # 0x23349
movl %r14d, %edx
leaq 0x10148(%rip), %rcx     # 0x23361
xorl %eax, %eax
callq 0x5130
jmp 0x13380
movl %ebp, %edi
leaq 0x1b5e6(%rip), %rax     # 0x2e814
movslq (%rax), %rbp
movl $0x1, %esi
movl %ebx, %edx
callq 0xab15
movl (%r13), %ecx
subl %ecx, %eax
movl %eax, %edx
addl $0x7, %edx
movslq %edx, %rdx
imulq $-0x6db6db6d, %rdx, %rdx # imm = 0x92492493
shrq $0x20, %rdx
addl %eax, %edx
addl $0x7, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x2, %edx
addl %esi, %edx
leal (,%rdx,8), %esi
subl %esi, %edx
addl %edx, %eax
addl $0x7, %eax
movl 0x18(%rsp), %edx
addl %ecx, %edx
addl %eax, %edx
movslq %edx, %rax
imulq $-0x6db6db6d, %rax, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x2, %ecx
addl %edx, %ecx
leal (,%rcx,8), %edx
subl %edx, %ecx
addl %eax, %ecx
movslq %ecx, %rax
leaq (%rax,%rax,4), %rax
imulq $0x8c, %rbp, %rcx
addq 0x15d1b(%rip), %rcx     # 0x28fd0
movsbl (%rcx,%rax,4), %edx
leaq 0x1011e(%rip), %rdi     # 0x233de
jmp 0x132c9
leaq 0x1014b(%rip), %rdi     # 0x23414
movl %r14d, %esi
xorl %eax, %eax
callq 0x5130
cmpq $0x0, 0x28(%rsp)
movl 0xc(%rsp), %ebp
je 0x13380
movq 0x28(%rsp), %rax
movq (%rax,%r14,8), %r13
testq %r13, %r13
je 0x13380
movq 0x8(%r13), %rdi
leaq 0x1006d(%rip), %rsi     # 0x2336d
movl $0x6, %edx
callq 0xa340
testl %eax, %eax
je 0x13377
leaq 0x10105(%rip), %rdi     # 0x2341a
xorl %eax, %eax
callq 0x5130
movl %r14d, 0x1ccc5(%rip)    # 0x2ffe8
movl %ebp, 0x1ccc3(%rip)     # 0x2ffec
movl %r14d, 0x1ccc0(%rip)    # 0x2fff0
movl %ebx, 0x1ccbe(%rip)     # 0x2fff4
movq 0x8(%r13), %rbp
xorl %ebx, %ebx
movb (%rbp,%rbx), %al
testb %al, %al
je 0x13363
cmpb $0x3c, (%rbp)
jne 0x13352
movb 0x3(%rbp,%rbx), %al
testb %al, %al
je 0x13363
movsbl %al, %edi
callq 0x5060
incq %rbx
cmpq $0x5, %rbx
jne 0x1333c
leaq 0x12355(%rip), %rdi     # 0x256bf
callq 0x50b0
movl 0x24(%rsp), %ebx
movl 0xc(%rsp), %ebp
movq 0x10(%r13), %r13
jmp 0x132ec
leaq 0x1233d(%rip), %rdi     # 0x256c4
callq 0x50b0
imull $0xb6db6db7, %r12d, %eax # imm = 0xB6DB6DB7
addl $0xb6db6db6, %eax       # imm = 0xB6DB6DB6
cmpl $0x24924923, %eax       # imm = 0x24924923
ja 0x133ab
leaq 0x12332(%rip), %rdi     # 0x256d8
callq 0x50b0
incq %r14
incl %r12d
sarq %r15
cmpl 0x10(%rsp), %r12d
leaq 0x1a228(%rip), %r13     # 0x2d5e8
jne 0x12fb7
leaq 0x1230b(%rip), %rdi     # 0x256d8
callq 0x50b0
leaq 0x122f6(%rip), %rdi     # 0x256cf
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50b0