// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1446f(%rip), %rax     # 0x2e190
movsbl (%rax,%rcx), %eax
movl %eax, -0x78(%rbp)
xorl %eax, %eax
cmpl $0x2, -0x4(%rbp)
movb %al, -0x71(%rbp)
jne 0x19d7d
movl -0x8(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x79(%rbp)
jne 0x19d77
movl -0x8(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x7a(%rbp)
jne 0x19d71
movl -0x8(%rbp), %eax
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x7a(%rbp)
movb -0x7a(%rbp), %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
movb %al, -0x71(%rbp)
movl -0x78(%rbp), %eax
movb -0x71(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x30(%rbp)
movl $0x1, -0xc(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %edx
movl $0x1, %esi
callq 0xc110
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x30(%rbp), %eax
jg 0x19de7
movslq -0x2c(%rbp), %rcx
leaq 0x189f1(%rip), %rax     # 0x327ac
movsbl (%rax,%rcx), %eax
movw %ax, %cx
movslq -0xc(%rbp), %rax
movw %cx, -0x70(%rbp,%rax,2)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %edx, -0x2c(%rbp)
jmp 0x19da8
movl -0x8(%rbp), %edi
xorl %esi, %esi
callq 0xefe0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x19e16
movq -0x18(%rbp), %rax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
jmp 0x19e21
xorl %eax, %eax
movq %rax, -0x88(%rbp)
jmp 0x19e21
movq -0x88(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x19e43
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x19e4e
xorl %eax, %eax
movq %rax, -0x90(%rbp)
jmp 0x19e4e
movq -0x90(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1, -0xc(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x19ea2
movq -0x28(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x19e8a
leaq 0x18938(%rip), %rax     # 0x327b4
movl (%rax), %eax
movw %ax, %cx
movslq -0xc(%rbp), %rax
movw %cx, -0x70(%rbp,%rax,2)
jmp 0x19e8c
movq -0x28(%rbp), %rax
shrq %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x19e60
leaq 0x1096e(%rip), %rdi     # 0x2a817
movb $0x0, %al
callq 0x5110
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x30(%rbp), %eax
jg 0x19f01
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
leaq 0xbdba(%rip), %rsi      # 0x25c8b
leaq 0x10910(%rip), %rax     # 0x2a7e8
cmpl $0x1, %edx
cmoveq %rax, %rsi
movslq -0xc(%rbp), %rax
movswl -0x70(%rbp,%rax,2), %edx
leaq 0x10939(%rip), %rdi     # 0x2a828
movb $0x0, %al
callq 0x5110
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x19eb7
leaq 0x10932(%rip), %rdi     # 0x2a83a
movb $0x0, %al
callq 0x5110
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)