// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0xf8fc(%rip), %rdi      # 0x2232f
movq $0x0, (%rsp)
movl $0x1, %esi
xorl %eax, %eax
callq 0x5130
leaq 0x1adc6(%rip), %rax     # 0x2d814
movslq (%rax), %rax
movslq %ebp, %r15
leaq -0x1(%r15), %r14
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq 0x15541(%rip), %rax     # 0x27fa8
movq -0x8(%rax,%r15,8), %rsi
leaq 0xf8cf(%rip), %rdi      # 0x22342
xorl %eax, %eax
callq 0x5130
movl %ebx, 0xc(%rsp)
movl %ebx, %edi
xorl %esi, %esi
callq 0xc3f7
testq %rax, %rax
je 0x12a92
movq (%rax,%r15,8), %rdi
jmp 0x12a94
xorl %edi, %edi
leaq 0x15725(%rip), %rax     # 0x281c0
movsbl (%rax,%r14), %eax
movl %ebp, %ecx
xorl $0x2, %ecx
movl 0xc(%rsp), %r15d
movl %r15d, %edx
andl $0x3, %edx
orl %ecx, %edx
jne 0x12ae9
imull $0xc28f5c29, %r15d, %ecx # imm = 0xC28F5C29
addl $0x51eb850, %ecx        # imm = 0x51EB850
movl %ecx, %edx
rorl $0x2, %edx
movl $0x1, %esi
movq %rsi, (%rsp)
cmpl $0x28f5c28, %edx        # imm = 0x28F5C28
ja 0x12ae9
rorl $0x4, %ecx
xorl %edx, %edx
cmpl $0xa3d70b, %ecx         # imm = 0xA3D70B
setb %dl
movq %rdx, (%rsp)
movq (%rsp), %rcx
addl %eax, %ecx
movq %rcx, (%rsp)
testq %rdi, %rdi
movq %rdi, 0x10(%rsp)
je 0x12b02
movq (%rdi), %rbx
jmp 0x12b04
xorl %ebx, %ebx
cmpl $0x0, (%rsp)
jle 0x12f47
movl $0x1, %r14d
leaq 0x19acd(%rip), %r13     # 0x2c5e8
xorl %r12d, %r12d
leaq 0x11b25(%rip), %rdi     # 0x2464a
callq 0x50b0
leaq 0xf791(%rip), %rdi      # 0x222c2
xorl %eax, %eax
callq 0x5130
testb $0x1, %bl
movq %rbx, 0x20(%rsp)
jne 0x12cd0
movl %ebp, %edi
movl $0x1, %esi
movl %r15d, %edx
callq 0xa53f
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
addl %eax, %ecx
imull $0xb6db6db7, %ecx, %eax # imm = 0xB6DB6DB7
addl $0x5b6db6db, %eax       # imm = 0x5B6DB6DB
cmpl $0x24924924, %eax       # imm = 0x24924924
jbe 0x12d8f
movl %ebp, %edi
movl $0x1, %esi
movl %r15d, %edx
callq 0xa53f
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
decl %ecx
addl %eax, %ecx
movslq %ecx, %rax
movq %r13, %rbx
imulq $-0x6db6db6d, %rax, %r13 # imm = 0x92492493
shrq $0x20, %r13
addl %eax, %r13d
movl %r13d, %ecx
shrl $0x1f, %ecx
sarl $0x2, %r13d
addl %ecx, %r13d
leal (,%r13,8), %ecx
subl %ecx, %r13d
addl %eax, %r13d
leaq 0x1abec(%rip), %rax     # 0x2d814
movslq (%rax), %rax
movq %rax, 0x18(%rsp)
movl %ebp, %edi
movl $0x1, %esi
movl %r15d, %edx
callq 0xa53f
movl (%rbx), %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
decl %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, 0x18(%rsp), %rax
addq 0x15321(%rip), %rax     # 0x27fd0
movslq %ecx, %rcx
leaq (%rcx,%rcx,4), %rcx
movsbl (%rax,%rcx,4), %edx
cmpl $0x6, %r13d
jne 0x12e32
leaq 0xf6b0(%rip), %rdi      # 0x2237b
jmp 0x12e39
leaq 0x1ab3d(%rip), %rax     # 0x2d814
movq %r13, %rbx
movslq (%rax), %r13
movl %ebp, %edi
movl $0x1, %esi
movl %r15d, %edx
callq 0xa53f
movl (%rbx), %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, %r13, %rcx
addq 0x1526a(%rip), %rcx     # 0x27fd0
movsbl (%rcx,%rax,4), %r8d
leaq 0xf5f2(%rip), %rdi      # 0x22364
leaq 0xf560(%rip), %rsi      # 0x222d9
movl %r14d, %edx
leaq 0xf56e(%rip), %rcx      # 0x222f1
xorl %eax, %eax
callq 0x5130
jmp 0x12efd
leaq 0x1aa7e(%rip), %rax     # 0x2d814
movq %r13, %rbx
movslq (%rax), %r13
movl %ebp, %edi
movl $0x1, %esi
movl %r15d, %edx
callq 0xa53f
movl (%rbx), %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, %r13, %rcx
addq 0x151ab(%rip), %rcx     # 0x27fd0
movsbl (%rcx,%rax,4), %edx
leaq 0xf53e(%rip), %rdi      # 0x2236e
jmp 0x12e39
leaq 0xf56b(%rip), %rdi      # 0x223a4
movl %r14d, %esi
xorl %eax, %eax
callq 0x5130
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x12e56
movq (%rax,%r14,8), %r13
jmp 0x12ef4
xorl %r13d, %r13d
jmp 0x12ef4
movq 0x8(%r13), %rdi
leaq 0xf494(%rip), %rsi      # 0x222fd
movl $0x6, %edx
callq 0x9d60
testl %eax, %eax
je 0x12ef0
leaq 0xf52c(%rip), %rdi      # 0x223aa
xorl %eax, %eax
callq 0x5130
movl %r14d, 0x1c15c(%rip)    # 0x2efe8
movl %ebp, %ebx
movl %ebp, 0x1c158(%rip)     # 0x2efec
movl %r14d, 0x1c155(%rip)    # 0x2eff0
movl %r15d, 0x1c152(%rip)    # 0x2eff4
movq 0x8(%r13), %r15
movl $0x3, %ebp
movb -0x3(%r15,%rbp), %al
testb %al, %al
je 0x12edd
movb (%r15), %cl
cmpb $0x3c, %cl
jne 0x12ecc
cmpb $0x0, (%r15,%rbp)
je 0x12edd
cmpb $0x3c, %cl
jne 0x12ecc
movb (%r15,%rbp), %al
movsbl %al, %edi
callq 0x5060
incq %rbp
cmpq $0x8, %rbp
jne 0x12eab
leaq 0x1176b(%rip), %rdi     # 0x2464f
callq 0x50b0
movl %ebx, %ebp
movl 0xc(%rsp), %r15d
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0x12e5e
leaq 0x11750(%rip), %rdi     # 0x24654
callq 0x50b0
imull $0xb6db6db7, %r12d, %eax # imm = 0xB6DB6DB7
addl $0xb6db6db6, %eax       # imm = 0xB6DB6DB6
cmpl $0x24924923, %eax       # imm = 0x24924923
ja 0x12f28
leaq 0x11745(%rip), %rdi     # 0x24668
callq 0x50b0
incq %r14
incl %r12d
movq 0x20(%rsp), %rbx
sarq %rbx
cmpl (%rsp), %r12d
leaq 0x196a7(%rip), %r13     # 0x2c5e8
jne 0x12b1e
leaq 0x1171a(%rip), %rdi     # 0x24668
callq 0x50b0
leaq 0x11705(%rip), %rdi     # 0x2465f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50b0