// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/pcal.c
// Function: color_msg
char *color_msg (void)
{
   int i, ngray = 0, others, gray = GRAY;
   static char msg[80], *alt_color;
   
   for (i = SUN; i <= SAT; i++) { /* count "logical gray" weekdays */
      if (default_color[i] != BLACK) {
         gray = default_color[i];
         ngray++;
      }
   }
   
   alt_color = color_names[gray];   /* map "logical gray" to its name */
   
   if (ngray == 0 || ngray == 7) {   /* all same color? */
      sprintf(msg, COLOR_MSG_1, ngray ? alt_color : W_BLACK);
      return msg;
   }
   
   others = ngray <= 3 ? BLACK : gray;   /* no - get predominant color */
   msg[0] = '\0';
   for (i = SUN; i <= SAT; i++) {
      if (default_color[i] != others) {
         strncat(msg, days_ml[LANG_DEFAULT][i], MIN_DAY_LEN);
         strcat(msg, "/");
      }
   }

   LASTCHAR(msg) = ' ';
   
   sprintf(msg + strlen(msg), COLOR_MSG_2,
           others == BLACK ? alt_color : W_BLACK,
           others == BLACK ? W_BLACK : alt_color);
   return msg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x10(%rbp)
movl $0x1, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x6, -0xc(%rbp)
jg 0x5f8f
movslq -0xc(%rbp), %rcx
leaq 0x282ba(%rip), %rax     # 0x2e218
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x5f82
movslq -0xc(%rbp), %rcx
leaq 0x282a6(%rip), %rax     # 0x2e218
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x5f84
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5f4d
movslq -0x18(%rbp), %rcx
leaq 0x287a6(%rip), %rax     # 0x2e740
movq (%rax,%rcx,8), %rax
movq %rax, 0x2d5cb(%rip)     # 0x33570
cmpl $0x0, -0x10(%rbp)
je 0x5fb1
cmpl $0x7, -0x10(%rbp)
jne 0x5ffa
cmpl $0x0, -0x10(%rbp)
je 0x5fc4
movq 0x2d5b2(%rip), %rax     # 0x33570
movq %rax, -0x20(%rbp)
jmp 0x5fd1
leaq 0x15492(%rip), %rax     # 0x1b45d
movq %rax, -0x20(%rbp)
jmp 0x5fd1
movq -0x20(%rbp), %rdx
leaq 0x2d544(%rip), %rdi     # 0x33520
leaq 0x16097(%rip), %rsi     # 0x1c07a
movb $0x0, %al
callq 0x52a0
leaq 0x2d52f(%rip), %rax     # 0x33520
movq %rax, -0x8(%rbp)
jmp 0x6124
cmpl $0x3, -0x10(%rbp)
jg 0x6007
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x600d
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x14(%rbp)
movb $0x0, 0x2d506(%rip)     # 0x33520
movl $0x0, -0xc(%rbp)
cmpl $0x6, -0xc(%rbp)
jg 0x607e
movslq -0xc(%rbp), %rcx
leaq 0x281e6(%rip), %rax     # 0x2e218
movsbl (%rax,%rcx), %eax
cmpl -0x14(%rbp), %eax
je 0x6071
movslq -0xc(%rbp), %rax
leaq 0x2a4da(%rip), %rsi     # 0x30520
imulq $0x14, %rax, %rax
addq %rax, %rsi
leaq 0x2d4cc(%rip), %rdi     # 0x33520
movl $0x3, %edx
callq 0x5150
leaq 0x2d4bb(%rip), %rdi     # 0x33520
leaq 0x1e5fd(%rip), %rsi     # 0x24669
callq 0x5290
jmp 0x6073
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6021
leaq 0x2d49b(%rip), %rdi     # 0x33520
callq 0x50e0
movq %rax, %rcx
subq $0x1, %rcx
leaq 0x2d488(%rip), %rax     # 0x33520
movb $0x20, (%rax,%rcx)
leaq 0x2d47d(%rip), %rdi     # 0x33520
callq 0x50e0
movq %rax, %rcx
leaq 0x2d46e(%rip), %rax     # 0x33520
addq %rcx, %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x60cc
movq 0x2d4aa(%rip), %rax     # 0x33570
movq %rax, -0x38(%rbp)
jmp 0x60d9
leaq 0x1538a(%rip), %rax     # 0x1b45d
movq %rax, -0x38(%rbp)
jmp 0x60d9
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x60f4
leaq 0x1536f(%rip), %rax     # 0x1b45d
movq %rax, -0x48(%rbp)
jmp 0x60ff
movq 0x2d475(%rip), %rax     # 0x33570
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdx
movq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rcx
leaq 0x15f77(%rip), %rsi     # 0x1c089
movb $0x0, %al
callq 0x52a0
leaq 0x2d400(%rip), %rax     # 0x33520
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop