// File: /workspace/github_c_makefile_star2_O1/mmayer[P]pcal/src/writefil.c
// Function: print_colors
void print_colors (int month, int year)
{
   register int day;
   year_info *py;
   month_info *pm;
   unsigned long holidays;
   int j, len;
   short color[32];
   
   len = LENGTH_OF(month, year);
   
   /* determine each date's color from its day of the week */
   for (day = 1, j = FIRST_OF(month, year);
        day <= len;
        day++, j = (j + 1) % 7) {
      color[day] = day_color[j];
   }
   
   pm = (py = find_year(year, FALSE)) ? py->month[month-1] : NULL;
   
   /* override weekday color for holidays */
   for (holidays = pm ? pm->holidays : 0, day = 1;
        holidays;
        holidays >>= 1, day++) {
      if (holidays & 01) color[day] = holiday_color;
   }
   
   printf("/date_color [ -1");   /* dummy value for element 0 */

   for (day = 1; day <= len; day++) {
      printf("%s %d", day % 10 == 1 ? " " : "", color[day]);
   }
   printf(" ] def\n");

   return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movslq %edi, %r12
leaq 0x138fd(%rip), %rax     # 0x281c0
movsbl -0x1(%r12,%rax), %r14d
movl %r12d, %eax
xorl $0x2, %eax
movl %esi, %ecx
andl $0x3, %ecx
xorl %r15d, %r15d
orl %eax, %ecx
jne 0x14908
imull $0xc28f5c29, %ebx, %eax # imm = 0xC28F5C29
addl $0x51eb850, %eax        # imm = 0x51EB850
movl %eax, %ecx
rorl $0x2, %ecx
movl $0x1, %r15d
cmpl $0x28f5c28, %ecx        # imm = 0x28F5C28
ja 0x14908
rorl $0x4, %eax
xorl %r15d, %r15d
cmpl $0xa3d70b, %eax         # imm = 0xA3D70B
setb %r15b
movl $0x1, %esi
movl %ebx, %edx
callq 0xa53f
movl %r15d, %ebp
addl %r14d, %ebp
jle 0x14972
leal (%r15,%r14), %ecx
incl %ecx
movl $0x1, %edx
leaq 0x17dfe(%rip), %rsi     # 0x2c72c
cltq
movsbl (%rsi,%rax), %edi
movw %di, (%rsp,%rdx,2)
incq %rdx
movl %eax, %edi
incl %edi
movslq %edi, %rdi
imulq $-0x6db6db6d, %rdi, %rdi # imm = 0x92492493
shrq $0x20, %rdi
addl %eax, %edi
incl %edi
movl %edi, %r8d
shrl $0x1f, %r8d
sarl $0x2, %edi
addl %r8d, %edi
leal (,%rdi,8), %r8d
subl %r8d, %edi
addl %edi, %eax
incl %eax
cmpq %rdx, %rcx
jne 0x1492e
xorl %r13d, %r13d
movl %ebx, %edi
xorl %esi, %esi
callq 0xc3f7
testq %rax, %rax
je 0x14987
movq (%rax,%r12,8), %r13
testq %r13, %r13
je 0x14992
movq (%r13), %rax
jmp 0x14994
xorl %eax, %eax
testq %rax, %rax
je 0x149c2
leaq 0x17d94(%rip), %rcx     # 0x2c734
movzwl (%rcx), %ecx
leaq 0x2(%rsp), %rdx
testb $0x1, %al
je 0x149af
movw %cx, (%rdx)
movq %rax, %rsi
shrq %rsi
addq $0x2, %rdx
cmpq $0x1, %rax
movq %rsi, %rax
ja 0x149a8
leaq 0xdb79(%rip), %rdi      # 0x22542
xorl %eax, %eax
callq 0x5130
testl %ebp, %ebp
jle 0x14a2d
addl %r15d, %r14d
incl %r14d
movl $0x1, %r15d
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
leaq 0xf560(%rip), %r13      # 0x23f4d
leaq 0xdb5f(%rip), %rbx      # 0x22553
xorl %ebp, %ebp
movl %r15d, %eax
imulq %r12, %rax
shrq $0x23, %rax
leal (%rax,%rax,4), %eax
addl %eax, %eax
movq %r13, %rsi
addl %ebp, %eax
je 0x14a14
leaq 0xad29(%rip), %rsi      # 0x1f73d
movswl (%rsp,%r15,2), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
incq %r15
decl %ebp
cmpq %r15, %r14
jne 0x149f6
leaq 0xfc8c(%rip), %rdi      # 0x246c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50b0