LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/hilbix[P]unbuffered/unbuffered.c
// Function: terminate
static void
terminate()
{
  int	status;
  pid_t	pid;

  /* Be sure not to re-enter waitpid()!	*/
  while ((pid=tino_wait_child_poll(&status, NULL))!=0)
    if (pid==consumer)
      exit(status);	/* Premature termination of consumer	*/
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
leaq 0xc(%rsp), %r14
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7a54
testl %eax, %eax
jne 0x7a4b
movl 0xc(%rsp), %ecx
movl %ecx, %eax
andl $0x7f, %eax
je 0x7a33
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
xorl %edi, %edi
testb %cl, %cl
sets %dil
addl $-0x3, %edi
cmpl $0x2000000, %eax        # imm = 0x2000000
cmovgel %ebp, %edi
jmp 0x7a36
movzbl %ch, %edi
movl 0x8(%rsp), %eax
testl %eax, %eax
je 0x7a4b
cmpl 0x5890(%rip), %eax      # 0xd2d4
jne 0x79f2
callq 0x22c0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/hilbix[P]unbuffered/./tino/strprintf.h
// Function: tino_str_printf
static char *
tino_str_printf(const char *s, ...)
{
  tino_va_list	list;
  char		*tmp;

  tino_va_start(list, s);
  tmp	= tino_str_vprintf(&list);
  tino_va_end(list);
  return tmp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
leaq 0x20(%rsp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x7b14
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdi, (%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, 0x8(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movl $0x2000, %r14d          # imm = 0x2000
movl $0x2000, %edi           # imm = 0x2000
callq 0x2220
testq %rax, %rax
je 0x7ba6
movq %rax, %rbx
movl $0x2000, %ebp           # imm = 0x2000
movq %rsp, %r15
movl $0x2000, %r12d          # imm = 0x2000
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7bf8
testl %eax, %eax
js 0x7bd0
leal 0x1(%rax), %r14d
cmpl %r12d, %eax
jl 0x7bae
movq %rbx, %rdi
callq 0x2050
subl %r12d, %r14d
cmpl $0x2001, %r14d          # imm = 0x2001
cmovll %ebp, %r14d
addl %r12d, %r14d
movq %r14, %rdi
callq 0x2220
movq %rax, %rbx
movl %r14d, %r12d
testq %rax, %rax
jne 0x7b5f
movq %rsp, %rdi
callq 0x32d9
movl %r14d, %esi
movq %rbx, %rdi
callq 0x2240
testq %rax, %rax
cmoveq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1234(%rip), %rdi      # 0x8e0b
leaq 0x1f6b(%rip), %rsi      # 0x9b49
leaq 0x1fb7(%rip), %rcx      # 0x9b9c
leaq 0x1fac(%rip), %r8       # 0x9b98
movl $0x2f, %edx
xorl %eax, %eax
callq 0x4ead
// File: /workspace/github_c_makefile_star2_O3/hilbix[P]unbuffered/./tino/arg.h
// Function: tino_vsnprintf
static int
tino_vsnprintf(char *buf, size_t max, TINO_VA_LIST list)
{
  tino_va_list	list2;
  int		n;

  tino_va_copy(list2, *list);
  n	= vsnprintf(buf, max, tino_va_str(list2), tino_va_get(list2));
  tino_va_end(list2);
  if (max>0)
    buf[max-1]	= 0;
  return n;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdx), %rax
leaq 0x10(%rsp), %rcx
movq %rax, -0x8(%rcx)
movups 0x8(%rdx), %xmm0
movups %xmm0, (%rcx)
movq 0x18(%rdx), %rdx
movq %rdx, 0x10(%rcx)
movq %rax, %rdx
callq 0x20d0
testq %rbx, %rbx
je 0x7c33
movb $0x0, -0x1(%r14,%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/hilbix[P]unbuffered/./tino/buf_printf.h
// Function: tino_buf_vprintfO
static const char *
tino_buf_vprintfO(TINO_BUF *buf, TINO_VA_LIST list)
{
  cDP(("tino_buf_vprintf(%p,'%s',%ld)", buf, TINO_VA_STR(list), list));
  tino_buf_add_ptrO(buf, strlen(TINO_VA_STR(list))+1);
  for (;;)
    {
      int	out, max;

      max	= buf->max-buf->fill;
      out	= tino_vsnprintf(buf->data+buf->fill, max, list);
      tino_FATAL(out<0);
      if (out<max)
	{
	  buf->fill	+= out;
	  return buf->data+buf->off;
	}
      /* There is a bug in older libraries.
       * vsnprintf does not return the size needed,
       * instead it returns max.
       * We cannot distinguish between this case and the case,
       * that just the space for the \0 is missing.
       * Therefor we define to always extend buffer by BUFSIZ at minimum.
       */
      out	= out-max+1;
      if (out<BUFSIZ)
	out	= BUFSIZ;
      tino_buf_extendO(buf, out);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x7d08
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x20f0
movq (%rbx), %rdi
movq 0x8(%rbx), %r15
leaq (%rax,%rdi), %rsi
incq %rsi
subq %r15, %rsi
jb 0x7c7e
incq %rsi
movq %rbx, %rdi
callq 0x4f9e
movq (%rbx), %rdi
movq 0x8(%rbx), %r15
subq %rdi, %r15
addq 0x18(%rbx), %rdi
movslq %r15d, %rsi
movq %r14, %rdx
callq 0x7bf8
testl %eax, %eax
js 0x7cd0
movl $0x1fff, %ebp           # imm = 0x1FFF
movl %eax, %esi
subl %r15d, %esi
jl 0x7cf8
cmpl $0x2000, %esi           # imm = 0x2000
cmovll %ebp, %esi
incl %esi
movq %rbx, %rdi
callq 0x4f9e
movq (%rbx), %rdi
movq 0x8(%rbx), %r15
subq %rdi, %r15
addq 0x18(%rbx), %rdi
movslq %r15d, %rsi
movq %r14, %rdx
callq 0x7bf8
testl %eax, %eax
jns 0x7c99
leaq 0x1134(%rip), %rdi      # 0x8e0b
leaq 0x1f30(%rip), %rsi      # 0x9c0e
leaq 0x1f3d(%rip), %rcx      # 0x9c22
leaq 0x1f1c(%rip), %r8       # 0x9c08
movl $0x2e, %edx
xorl %eax, %eax
callq 0x4ead
movl %eax, %eax
addq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10fc(%rip), %rdi      # 0x8e0b
leaq 0x10d8(%rip), %rsi      # 0x8dee
leaq 0x110c(%rip), %rcx      # 0x8e29
leaq 0x1100(%rip), %r8       # 0x8e24
movl $0x11b, %edx            # imm = 0x11B
jmp 0x7cf1
// File: /workspace/github_c_makefile_star2_O3/hilbix[P]unbuffered/./tino/data.h
// Function: tino_data_fileA
static TINO_DATA *
tino_data_fileA(TINO_DATA *d, int fd)
{
  if (fd<0)
    {
      tino_data_error(d, "file open error");
      return d;
    }
  return tino_data_handlerO(d, TINO_DATA_FILE, tino_data_user_fd(fd));
}

// Assembly:
testl %edi, %edi
js 0x7d54
movl %edi, %esi
leaq 0x54c8(%rip), %rax      # 0xd200
movq %rax, 0x55b9(%rip)      # 0xd2f8
movq 0x5502(%rip), %rax      # 0xd248
testq %rax, %rax
je 0x7d69
leaq 0x5586(%rip), %rdi      # 0xd2d8
jmpq *%rax
leaq 0x557d(%rip), %rdi      # 0xd2d8
leaq 0x1ed2(%rip), %rsi      # 0x9c34
xorl %eax, %eax
jmp 0x5240
movq %rsi, 0x5590(%rip)      # 0xd300
retq
// File: /workspace/github_c_makefile_star2_O3/hilbix[P]unbuffered/./tino/data.h
// Function: tino_data_writeA
static void
tino_data_writeA(TINO_DATA *d, const void *ptr, size_t len)
{
  size_t	pos;
  int		put;

  if (!d || !d->handler || !d->handler->write)
    {
      tino_data_error(d, "write not defined");
      return;
    }
  put	= -1;
  for (pos=0; pos<len; )
    {
      errno	= 0;
      if ((put=d->handler->write(d, ((const char *)ptr)+pos, len-pos))>0)
	pos	+= put;
      else if (!put || errno!=EINTR)
	break;
      else
	{
#ifdef TINO_ALARM_RUN
	  TINO_ALARM_RUN();
#endif
	}
    }
  if (pos!=len)
    tino_data_error(d, "general write error %d", put);
}

// Assembly:
movq 0x5580(%rip), %rax      # 0xd2f8
testq %rax, %rax
je 0x7de2
cmpq $0x0, 0x10(%rax)
je 0x7de2
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
testq %rsi, %rsi
je 0x7df7
movq %rdi, %r14
xorl %r13d, %r13d
callq 0x2070
movq %rax, %r15
leaq 0x552e(%rip), %r12      # 0xd2d8
movl $0x0, (%r15)
movq 0x5540(%rip), %rax      # 0xd2f8
leaq (%r14,%r13), %rsi
movq %rbx, %rdx
subq %r13, %rdx
movq %r12, %rdi
callq *0x10(%rax)
testl %eax, %eax
jle 0x7dd3
movl %eax, %ecx
addq %rcx, %r13
jmp 0x7ddb
je 0x7e01
cmpl $0x4, (%r15)
jne 0x7e03
cmpq %rbx, %r13
jb 0x7daa
jmp 0x7e03
leaq 0x54ef(%rip), %rdi      # 0xd2d8
leaq 0x1e54(%rip), %rsi      # 0x9c44
xorl %eax, %eax
jmp 0x5240
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
jmp 0x7e03
xorl %eax, %eax
cmpq %rbx, %r13
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jne 0x7e12
retq
leaq 0x54bf(%rip), %rdi      # 0xd2d8
leaq 0x1e36(%rip), %rsi      # 0x9c56
movl %eax, %edx
xorl %eax, %eax
jmp 0x5240
// File: /workspace/github_c_makefile_star2_O3/hilbix[P]unbuffered/./tino/data.h
// Function: tino_data_printfA
static void
tino_data_printfA(TINO_DATA *d, const char *s, ...)
{
  tino_va_list	list;

  tino_va_start(list, s);
  tino_data_vprintfA(d, &list);
  tino_va_end(list);
}

// Assembly:
pushq %rbx
subq $0xf0, %rsp
leaq 0x40(%rsp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x7e87
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
leaq 0x20(%rsp), %rax
movq %rsi, (%rax)
movabsq $0x3000000010, %rcx     # imm = 0x3000000010
movq %rcx, 0x8(%rax)
leaq 0x100(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rdi, 0x18(%rax)
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7c3b
movq (%rbx), %rsi
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdi
addq %rax, %rdi
subq %rax, %rsi
callq 0x7d71
movq %rbx, %rdi
callq 0x7eec
addq $0xf0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/hilbix[P]unbuffered/./tino/buf.h
// Function: tino_buf_freeO
static void
tino_buf_freeO(TINO_BUF *buf)
{
  tino_FATAL(!buf);

  cDP(("(%p)", buf));
  if (buf->data)
    tino_freeO(buf->data);
  tino_buf_initO(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x7f2e
movq %rdi, %rbx
movq 0x18(%rdi), %r14
testq %r14, %r14
je 0x7f19
callq 0x2070
movq %rax, %r15
movl (%rax), %ebp
movq %r14, %rdi
callq 0x2050
movl %ebp, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xed6(%rip), %rdi       # 0x8e0b
leaq 0xeb2(%rip), %rsi       # 0x8dee
leaq 0x1d4e(%rip), %rcx      # 0x9c91
leaq 0xeda(%rip), %r8        # 0x8e24
movl $0xa4, %edx
xorl %eax, %eax
callq 0x4ead
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcal.c
// Function: init_misc
void init_misc (void)
{
   char tmp[STRSIZ], *p;
   
   INIT_COLORS;   /* copy default_color to day_color */
   strcpy(notes_hdr, default_notes_hdr);   /* initialize notes_hdr */
   
   /* define preprocessor symbol "lang_XX" for default language XX */
   do_define(gen_lang_sym(LANG_DEFAULT));
   
   /* Define 'PAPERSIZE_XXX' (where XXX is the name of the selected paper
    * size).
    */
   sprintf(tmp, "PAPERSIZE_%s", paper_info[paper_size].name);
   do_define(tmp);
   
   /* Define 'ORIENTATION_XXX' (where XXX is the name of the current paper
    * orientation -- 'portrait' or 'landscape').
    */
   sprintf(tmp, "ORIENTATION_%s", (rotate == PORTRAIT) ? "PORTRAIT" : "LANDSCAPE");
   do_define(tmp);
   
   /* define preprocessor symbol vN_N for Pcal version vN.N */
   strcpy(tmp, version);
   for (p = tmp; *p; p++) {
      if (*p == '.') *p = '_';
   }
   do_define(tmp);

   return;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movl 0x23a2e(%rip), %eax     # 0x29248
movl %eax, 0x27f0c(%rip)     # 0x2d72c
movl 0x23a25(%rip), %eax     # 0x2924b
movl %eax, 0x27f03(%rip)     # 0x2d72f
movl $0xffffffff, 0x27efe(%rip) # imm = 0xFFFFFFFF
movl $0x0, 0x27a68(%rip)     # 0x2d2a8
leaq 0x27ef9(%rip), %rdi     # 0x2d740
leaq 0x24442(%rip), %rsi     # 0x29c90
callq 0x50a0
movl $0x676e616c, 0x28c9b(%rip) # imm = 0x676E616C
movw $0x5f, 0x28c96(%rip)    # 0x2e4fc
leaq 0x28c8b(%rip), %rbx     # 0x2e4f8
movq %rbx, %rdi
callq 0x5100
leaq 0x27704(%rip), %rcx     # 0x2cf80
movzwl (%rcx), %ecx
movw %cx, (%rax,%rbx)
movb $0x0, 0x2(%rax,%rbx)
movq %rbx, %rdi
callq 0xc6f3
movslq 0x27e91(%rip), %rax     # 0x2d728
leaq (%rax,%rax,2), %rax
leaq 0x2518e(%rip), %rcx     # 0x2aa30
movq (%rcx,%rax,8), %rdx
leaq 0x11579(%rip), %rsi     # 0x16e26
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x52f0
movq %rbx, %rdi
callq 0xc6f3
cmpl $0x0, 0x2398b(%rip)     # 0x29254
leaq 0x116fb(%rip), %rax     # 0x16fcb
leaq 0x11709(%rip), %rdx     # 0x16fe0
cmoveq %rax, %rdx
leaq 0x11551(%rip), %rsi     # 0x16e33
movq %rbx, %rdi
xorl %eax, %eax
callq 0x52f0
movq %rbx, %rdi
callq 0xc6f3
leaq 0x27f15(%rip), %rsi     # 0x2d810
movq %rbx, %rdi
callq 0x50a0
movzbl (%rbx), %eax
cmpl $0x2e, %eax
je 0x5911
testl %eax, %eax
jne 0x5914
jmp 0x5919
movb $0x5f, (%rbx)
incq %rbx
jmp 0x5903
movq %rsp, %rdi
callq 0xc6f3
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcal.c
// Function: gen_lang_sym
char *gen_lang_sym (int lang)
{
   static char buf[sizeof(DEF_LANG) + MIN_LANG_LEN + 1];
   char *p;
   int i;
   
   strcpy(buf, DEF_LANG);
   p = buf + strlen(buf);
   for (i = 0; i < MIN_LANG_LEN; i++) p[i] = lang_id[lang][i];
   p[i] = '\0';
   
   return buf;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movw $0x5f, 0x28bc3(%rip)    # 0x2e4fc
movl $0x676e616c, 0x28bb5(%rip) # imm = 0x676E616C
leaq 0x28bae(%rip), %r14     # 0x2e4f8
movq %r14, %rdi
callq 0x5100
movslq %ebx, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq 0x27620(%rip), %rdx     # 0x2cf80
movzwl (%rdx,%rcx,4), %ecx
movw %cx, (%rax,%r14)
movb $0x0, 0x2(%rax,%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcal.c
// Function: change_color
void change_color (int col)
{
   int i;
   
   for (i = SUN; i <= SAT; i++) {
      if (day_color[i] != BLACK) day_color[i] = col;
   }
   
   if (holiday_color != BLACK && holiday_color != HOLIDAY_DEFAULT) {
      holiday_color = col;
   }
   return;   
}

// Assembly:
xorl %eax, %eax
leaq 0x27682(%rip), %rcx     # 0x2d72c
cmpb $0x0, (%rax,%rcx)
je 0x60b4
movb %dil, (%rax,%rcx)
incq %rax
cmpq $0x7, %rax
jne 0x60aa
movl 0x27671(%rip), %eax     # 0x2d734
decl %eax
cmpl $-0x3, %eax
ja 0x60d0
movl %edi, 0x27664(%rip)     # 0x2d734
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcal.c
// Function: get_flag
FLAG_USAGE * get_flag (char flag)
{
   FLAG_USAGE *pflag;
   
   for (pflag = flag_tbl; pflag->flag; pflag++) {
      if (flag == pflag->flag) return pflag;
   }
   
   return flag ? NULL : pflag;   /* '\0' is a valid flag */
}

// Assembly:
movb 0x23bc9(%rip), %cl      # 0x29ca0
leaq 0x23bc2(%rip), %rax     # 0x29ca0
testb %cl, %cl
je 0x60f0
cmpb %dil, %cl
je 0x60f9
movb 0x3(%rax), %cl
addq $0x3, %rax
jmp 0x60de
xorl %ecx, %ecx
testb %dil, %dil
cmovneq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcal.c
// Function: set_debug_flag
void set_debug_flag (char *flag)
{
   char f;
   DEBUG_INFO *pd;
   
   if (!flag) {   /* clear all if NULL */
      debug_flags = 0;
      return;
   }
   
   /* loop through all characters in "flag", setting corresponding
    * bits in debug_flags
    */
   while ((f = *flag++) != '\0') {
      for (pd = debug_info; pd->flag; pd++) {
         if (pd->flag == f) debug_flags |= pd->value;
      }
   }
   return;
}

// Assembly:
testq %rdi, %rdi
je 0x614b
movb (%rdi), %sil
testb %sil, %sil
je 0x614a
movl 0x275cf(%rip), %eax     # 0x2d6dc
movb 0x23c2d(%rip), %cl      # 0x29d40
leaq 0x23c2e(%rip), %rdx     # 0x29d48
testb %cl, %cl
je 0x613f
movq %rdx, %r8
movl %ecx, %r9d
cmpb %sil, %r9b
jne 0x6133
orl -0x4(%r8), %eax
movl %eax, 0x275a9(%rip)     # 0x2d6dc
movb (%r8), %r9b
addq $0x8, %r8
testb %r9b, %r9b
jne 0x6124
incq %rdi
movb (%rdi), %sil
testb %sil, %sil
jne 0x611a
retq
movl $0x0, 0x27587(%rip)     # 0x2d6dc
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ecx, %ecx
movl $0x1, %ebp
leaq 0x22c89(%rip), %r12     # 0x29248
xorl %eax, %eax
movsbl (%rcx,%r12), %edx
xorl %esi, %esi
testl %edx, %edx
cmovnel %edx, %ebp
setne %sil
addl %esi, %eax
incq %rcx
cmpq $0x7, %rcx
jne 0x65c1
movslq %ebp, %rcx
leaq 0x2318a(%rip), %rdx     # 0x29770
movq (%rdx,%rcx,8), %rbx
movq %rbx, 0x27eff(%rip)     # 0x2e4f0
cmpl $0x7, %eax
je 0x65fa
testl %eax, %eax
jne 0x6624
testl %eax, %eax
leaq 0xfead(%rip), %rax      # 0x164b0
cmoveq %rax, %rbx
leaq 0x27e92(%rip), %rdi     # 0x2e4a0
leaq 0x10aaa(%rip), %rsi     # 0x170bf
movq %rbx, %rdx
xorl %eax, %eax
callq 0x52f0
jmp 0x66ba
xorl %r13d, %r13d
cmpl $0x4, %eax
cmovbl %r13d, %ebp
movb $0x0, 0x27e6b(%rip)     # 0x2e4a0
leaq 0x24f04(%rip), %r15     # 0x2b540
leaq 0x27e5d(%rip), %r14     # 0x2e4a0
movsbl (%r13,%r12), %eax
cmpl %eax, %ebp
je 0x666c
movl $0x3, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x5190
movq %r14, %rdi
callq 0x5100
movw $0x2f, (%rax,%r14)
incq %r13
addq $0x14, %r15
cmpq $0x7, %r13
jne 0x6643
movq %r14, %rdi
callq 0x5100
movb $0x20, -0x1(%rax,%r14)
movq %r14, %rdi
callq 0x5100
addq %rax, %r14
testl %ebp, %ebp
leaq 0xfe15(%rip), %rax      # 0x164b0
movq %rax, %rdx
cmoveq %rbx, %rdx
cmoveq %rax, %rbx
leaq 0x10a21(%rip), %rsi     # 0x170ce
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x52f0
leaq 0x27ddf(%rip), %rax     # 0x2e4a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcal.c
// Function: recalc_paper_parameters
void recalc_paper_parameters (int paper_size_idx)
{
   page_dim_short_axis_pts = paper_info[paper_size_idx].page_dim_short_axis_pts;
   page_dim_long_axis_pts = paper_info[paper_size_idx].page_dim_long_axis_pts;
   
   daybox_width_pts = paper_info[paper_size_idx].daybox_width_pts;
   daybox_height_pts = paper_info[paper_size_idx].daybox_height_pts;
   
   xsval_pgm = ysval_pgm = (double)page_dim_short_axis_pts / (double)page_dim_long_axis_pts;
   xtval_pgm = (page_dim_long_axis_pts - (7 * daybox_width_pts)) / 2;
   
   if ((rotate == PORTRAIT) && do_whole_year) {
      ytval_pgm = page_dim_short_axis_pts + TOP_OF_CAL_BOXES_PTS + 
         6 * (daybox_height_pts - paper_info[paper_size_idx].daybox_height_pts);
   }
   else if ((rotate == PORTRAIT) && !do_whole_year) {
      /* 
       * Copied from the 'ReadMe' file for v4.6:
       * 
       *    The date box height for single-month portrait-mode calendars has
       *    been expanded from 80 points to 117.  If you prefer the original
       *    date box proportions (basically a scaled-down landscape-mode
       *    calendar), compile with -DORIG_BOX_HEIGHT.
       */
#ifndef ORIG_BOX_HEIGHT
      daybox_height_pts = (page_dim_long_axis_pts - DEFAULT_MARGIN_BOTTOM_PTS + 
                           TOP_OF_CAL_BOXES_PTS) / 6 / ysval_pgm;
#endif
      ytval_pgm = (page_dim_long_axis_pts + TOP_OF_CAL_BOXES_PTS) / ysval_pgm;
   }
   else {   /* landscape mode */
      xsval_pgm = ysval_pgm = 1.0;
      ytval_pgm = TOP_OF_CAL_BOXES_PTS;
   }
   return;
}

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,2), %rdx
leaq 0x24352(%rip), %rsi     # 0x2aa30
movl 0x8(%rsi,%rdx,8), %ecx
movl %ecx, 0x27210(%rip)     # 0x2d8f8
movl 0xc(%rsi,%rdx,8), %eax
movl %eax, 0x2720a(%rip)     # 0x2d8fc
movl 0x10(%rsi,%rdx,8), %edi
movl %edi, 0x27204(%rip)     # 0x2d900
movl 0x14(%rsi,%rdx,8), %edx
cvtsi2sd %ecx, %xmm0
cvtsi2sd %eax, %xmm1
movl %edx, 0x271f6(%rip)     # 0x2d904
divsd %xmm1, %xmm0
movsd %xmm0, 0x271ee(%rip)    # 0x2d908
movsd %xmm0, 0x271ee(%rip)    # 0x2d910
leal (,%rdi,8), %edx
subl %edx, %edi
addl %eax, %edi
movl %edi, %edx
shrl $0x1f, %edx
addl %edi, %edx
sarl %edx
movl %edx, 0x271dc(%rip)     # 0x2d918
movl 0x22b12(%rip), %edx     # 0x29254
testl %edx, %edx
sete %dil
movl 0x26f76(%rip), %esi     # 0x2d6c4
testl %esi, %esi
setne %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
jne 0x6762
addl $-0x55, %ecx
jmp 0x67c9
orl %esi, %edx
je 0x6785
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x27191(%rip)     # 0x2d908
movq %rax, 0x27192(%rip)     # 0x2d910
movl $0xffffffab, %ecx       # imm = 0xFFFFFFAB
jmp 0x67c9
leal -0x83(%rax), %ecx
movslq %ecx, %rcx
imulq $0x2aaaaaab, %rcx, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
addl $-0x55, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movl %ecx, 0x27143(%rip)     # 0x2d904
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
movl %ecx, 0x2714d(%rip)     # 0x2d91c
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcal.c
// Function: alt_fopen
FILE *alt_fopen (char *fullpath, char *name, char *pathlist[], char *access)
{
   char **path;
   FILE *fp;
   
   /* print complete list of paths if debugging path names */
   if (DEBUG(DEBUG_PATHS)) {
      fprintf(stderr, "Searching for %s in the following paths:\n", name);
      for (path = pathlist; *path; path++) {
         fprintf(stderr, "  %s\n", **path ? *path : ".");
      }
   }
   
   /* search path list for requested file */
   for (path = pathlist; *path; path++) {
      mk_filespec(fullpath, *path, name);
      if ((fp = fopen(fullpath, access)) != NULL) {
         if (DEBUG(DEBUG_PATHS)) fprintf(stderr, "found %s\n", fullpath);
         return fp;
      }
   }

   fullpath[0] = '\0';   /* file not found */
   return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
testb $0x8, 0x25e80(%rip)     # 0x2d6dc
jne 0x78b2
movq (%r15), %rsi
testq %rsi, %rsi
je 0x7891
addq $0x8, %r15
movq %rbx, %rdi
movq %r12, %rdx
callq 0xb775
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52a0
testq %rax, %rax
jne 0x7899
movq (%r15), %rsi
addq $0x8, %r15
testq %rsi, %rsi
jne 0x786a
movb $0x0, (%rbx)
xorl %r13d, %r13d
jmp 0x78a5
movq %rax, %r13
testb $0x8, 0x25e39(%rip)     # 0x2d6dc
jne 0x78c3
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r12, %rdi
movq %r15, %rsi
callq 0x5360
testb $0x1, %al
je 0x785e
jmp 0x7891
movq 0x21726(%rip), %rax     # 0x28ff0
movq (%rax), %rdi
leaq 0xf840(%rip), %rsi      # 0x17114
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5210
jmp 0x78a5
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/encvec.c
// Function: encvec_iso8859_6
void encvec_iso8859_6 (void)
{
   printf("%%%%%%   %%\n");
   printf("%%%%%%   %% ISO 8859-6 (Arabic) character mappings\n");
   printf("%%%%%%   %% \n");
   printf("%%%%%%   %% This PostScript encoding vector is currently undefined because the\n");
   printf("%%%%%%   %% information needed to create it was not found.\n");
   printf("%%%%%%   %% \n");
   printf("%%%%%%   /alt_mappings [\n");
   printf("%%%%%%   ] readonly def\n");
   printf("\n");
   
   return;
}

// Assembly:
pushq %rbx
leaq 0xedb8(%rip), %rdi      # 0x17337
xorl %eax, %eax
callq 0x5130
leaq 0xedb7(%rip), %rdi      # 0x17344
xorl %eax, %eax
callq 0x5130
leaq 0xeddd(%rip), %rbx      # 0x17378
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xedda(%rip), %rdi      # 0x17386
xorl %eax, %eax
callq 0x5130
leaq 0xee1c(%rip), %rdi      # 0x173d6
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xee40(%rip), %rdi      # 0x17412
xorl %eax, %eax
callq 0x5130
leaq 0xee4c(%rip), %rdi      # 0x1742c
xorl %eax, %eax
callq 0x5130
movl $0xa, %edi
popq %rbx
jmp 0x5060
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/encvec.c
// Function: encvec_iso8859_8
void encvec_iso8859_8 (void)
{
   printf("%%%%%%   %%\n");
   printf("%%%%%%   %% ISO 8859-8 (Hebrew) character mappings\n");
   printf("%%%%%%   %% \n");
   printf("%%%%%%   %% This PostScript encoding vector is currently undefined because the\n");
   printf("%%%%%%   %% information needed to create it was not found.\n");
   printf("%%%%%%   %% \n");
   printf("%%%%%%   /alt_mappings [\n");
   printf("%%%%%%   ] readonly def\n");

   return;
}

// Assembly:
pushq %rbx
leaq 0xeb94(%rip), %rdi      # 0x17337
xorl %eax, %eax
callq 0x5130
leaq 0xecbe(%rip), %rdi      # 0x1746f
xorl %eax, %eax
callq 0x5130
leaq 0xebb9(%rip), %rbx      # 0x17378
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xebb6(%rip), %rdi      # 0x17386
xorl %eax, %eax
callq 0x5130
leaq 0xebf8(%rip), %rdi      # 0x173d6
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xec1c(%rip), %rdi      # 0x17412
xorl %eax, %eax
callq 0x5130
leaq 0xec28(%rip), %rdi      # 0x1742c
xorl %eax, %eax
popq %rbx
jmp 0x5130
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/encvec.c
// Function: encvec_iso8859_16
void encvec_iso8859_16 (void)
{
   printf("%%%%%%   %%\n");
   printf("%%%%%%   %% ISO 8859-16 (Latin10) character mappings\n");
   printf("%%%%%%   %% \n");
   printf("%%%%%%   %% This PostScript encoding vector is currently undefined because the\n");
   printf("%%%%%%   %% information needed to create it was not found.\n");
   printf("%%%%%%   %% \n");
   printf("%%%%%%   /alt_mappings [\n");
   printf("%%%%%%   ] readonly def\n");

   return;
}

// Assembly:
pushq %rbx
leaq 0xe12d(%rip), %rdi      # 0x17337
xorl %eax, %eax
callq 0x5130
leaq 0xe39b(%rip), %rdi      # 0x175b3
xorl %eax, %eax
callq 0x5130
leaq 0xe152(%rip), %rbx      # 0x17378
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xe14f(%rip), %rdi      # 0x17386
xorl %eax, %eax
callq 0x5130
leaq 0xe191(%rip), %rdi      # 0x173d6
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xe1b5(%rip), %rdi      # 0x17412
xorl %eax, %eax
callq 0x5130
leaq 0xe1c1(%rip), %rdi      # 0x1742c
xorl %eax, %eax
popq %rbx
jmp 0x5130
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: ci_strcmp
int ci_strcmp (register char *s1, register char *s2)
{
   register char c1, c2;
   
   for ( ; (c1 = tolower(*s1)) == (c2 = tolower(*s2)); s1++, s2++) {
      if (c1 == '\0') return 0;
   }
   return c1 - c2;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5330
movq (%rax), %rcx
movsbq (%r14), %rax
movl (%rcx,%rax,4), %edx
movsbl %dl, %eax
movsbq (%rbx), %rsi
movsbl (%rcx,%rsi,4), %edi
cmpl %edi, %eax
jne 0xa332
shll $0x18, %edx
movl $0x1, %esi
testl %edx, %edx
je 0xa336
movsbq (%r14,%rsi), %rax
movl (%rcx,%rax,4), %edx
movsbl %dl, %eax
shll $0x18, %edx
movsbq (%rbx,%rsi), %rdi
movsbl (%rcx,%rdi,4), %edi
incq %rsi
cmpl %edi, %eax
je 0xa310
subl %edi, %eax
jmp 0xa338
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: ci_strncmp
int ci_strncmp (register char *s1, register char *s2, int n)
{
   register char c1, c2;
   
   for (c1 = c2 = '\0'; --n >= 0 && (c1 = tolower(*s1)) == (c2 = tolower(*s2)); s1++, s2++) {
      if (c1 == '\0') return 0;
   }

   return n < 0 ? 0 : c1 - c2;
}

// Assembly:
testl %edx, %edx
jle 0xa39e
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x5330
movq (%rax), %rax
incl %ebx
xorl %ecx, %ecx
movsbq (%r15,%rcx), %rdx
movl (%rax,%rdx,4), %edi
movl %edi, %edx
shll $0x18, %edx
movsbq (%r14,%rcx), %rsi
movl (%rax,%rsi,4), %r8d
movl %r8d, %esi
shll $0x18, %esi
cmpl %esi, %edx
jne 0xa38b
testl %edx, %edx
je 0xa3a1
decl %ebx
incq %rcx
cmpl $0x1, %ebx
ja 0xa35d
movsbl %dil, %ecx
movsbl %r8b, %eax
subl %eax, %ecx
xorl %eax, %eax
cmpl %esi, %edx
cmovnel %ecx, %eax
jmp 0xa3a3
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: define_font
void define_font (char *orig_font, char *new_font, char *dflt_font)
{
   char *ofont, *nfont, *osize, *nsize, tmp1[STRSIZ], tmp2[STRSIZ];

   /* use default font/size if new font is null */
   
   if (new_font == NULL || new_font[0] == '\0') {
      strcpy(orig_font, dflt_font);
      return;
   }
   
   /* split old and new fonts into font/size components */
   SPLIT(orig_font, ofont, osize, '/');
   
   new_font = strcpy(tmp1, new_font);
   SPLIT(new_font, nfont, nsize, '/');
   
   /* use default size if new font size invalid */
   if (nsize[0] && atoi(nsize) <= 0) nsize = strrchr(dflt_font, '/') + 1;
   
   /* replace fields of old font with specified fields from new */
   
   strcpy(tmp2, nfont[0] ? nfont : ofont);
   strcat(tmp2, "/");
   strcat(tmp2, nsize[0] ? nsize : osize);
   
   strcpy(orig_font, tmp2);

   return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdx, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0xa3e9
movq %rsi, %r12
cmpb $0x0, (%rsi)
je 0xa3e9
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x5150
testq %rax, %rax
je 0xa404
movq %rax, %r14
movb $0x0, (%rax)
incq %r14
jmp 0xa40b
movq %rbx, %rdi
movq %r15, %rsi
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x50a0
leaq 0x163a2(%rip), %r14     # 0x207ad
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x5120
testq %rax, %rax
je 0xa420
movb $0x0, (%rax)
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x50a0
movq %r13, %rdi
movl $0x2f, %esi
callq 0x5150
testq %rax, %rax
je 0xa44b
movq %rax, %r12
movb $0x0, (%rax)
incq %r12
jmp 0xa452
leaq 0x1635b(%rip), %r12     # 0x207ad
movq %rsp, %r13
movq %r13, %rdi
movl $0x2f, %esi
callq 0x5120
testq %rax, %rax
je 0xa46a
movb $0x0, (%rax)
cmpb $0x0, (%r12)
je 0xa490
movq %r12, %rdi
callq 0x52d0
testl %eax, %eax
jg 0xa490
movq %r15, %rdi
movl $0x2f, %esi
callq 0x5150
movq %rax, %r12
incq %r12
cmpb $0x0, (%rsp)
cmoveq %rbx, %r13
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x50a0
movq %r15, %rdi
callq 0x5100
movw $0x2f, 0xd0(%rsp,%rax)
cmpb $0x0, (%r12)
cmovneq %r12, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x52e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x50a0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: set_fontstyle
char *set_fontstyle (char *p, char *esc)
{
   if (output_type == OUTPUT_PS) {
      *p++ = ' ';
      strcpy(p, esc);
      p += strlen(esc);
      strcpy(prevfont, currfont);
      strcpy(currfont, esc);
   }
   else if (output_type == OUTPUT_HTML) {
      *p++ = '<';
      if (strchr("rpRP", esc[1])) {
         sprintf(p, "/%c", currfont[1]);
         p += 2;
         strcpy(currfont, prevfont);
      }
      else {
         *p++ = esc[1];
         strcpy(prevfont, currfont);
         strcpy(currfont, esc);
      }
   }
   
   return p;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x22fdd(%rip), %rax     # 0x2d6c8
movl (%rax), %eax
cmpl $0x2, %eax
je 0xa719
testl %eax, %eax
jne 0xa78a
leaq 0x1(%rbx), %rdi
movb $0x20, (%rbx)
movq %r14, %rsi
callq 0x50a0
movq %r14, %rdi
callq 0x5100
addq %rax, %rbx
incq %rbx
jmp 0xa768
movb $0x3c, (%rbx)
movb 0x1(%r14), %bpl
movsbl %bpl, %esi
leaq 0x14e4a(%rip), %rdi     # 0x1f575
movl $0x5, %edx
callq 0x51e0
testq %rax, %rax
je 0xa760
leaq 0x1(%rbx), %rdi
movsbl 0x23fe6(%rip), %edx     # 0x2e72b
leaq 0x14e2e(%rip), %rsi     # 0x1f57a
xorl %eax, %eax
callq 0x52f0
addq $0x3, %rbx
leaq 0x23fc2(%rip), %r14     # 0x2e720
jmp 0xa77b
movb %bpl, 0x1(%rbx)
addq $0x2, %rbx
leaq 0x23fb1(%rip), %rdi     # 0x2e720
leaq 0x23fb4(%rip), %rsi     # 0x2e72a
callq 0x50a0
leaq 0x23fa8(%rip), %rdi     # 0x2e72a
movq %r14, %rsi
callq 0x50a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: normalize
void normalize (date_str *pd)
{
   int len;

   /* adjust if day is in previous or following month */
   
   while (pd->dd < 1) {
      pd->yy = PREV_YEAR(pd->mm, pd->yy);
      pd->mm = PREV_MONTH(pd->mm, pd->yy);
      pd->dd += LENGTH_OF(pd->mm, pd->yy);
   }
   
   while (pd->dd > (len = LENGTH_OF(pd->mm, pd->yy))) {
      pd->dd -= len;
      pd->yy = NEXT_YEAR(pd->mm, pd->yy);
      pd->mm = NEXT_MONTH(pd->mm, pd->yy);
   }

   return;
}

// Assembly:
movl (%rdi), %ecx
movl 0x4(%rdi), %eax
testl %eax, %eax
jg 0xa823
movl 0x8(%rdi), %edx
movl $0xc, %esi
leaq 0x1ea12(%rip), %r8      # 0x291c0
xorl %r9d, %r9d
cmpl $0x1, %ecx
leal -0x1(%rcx), %ecx
sete %r9b
cmovel %esi, %ecx
subl %r9d, %edx
movl %edx, 0x8(%rdi)
movl %ecx, (%rdi)
xorl %r9d, %r9d
cmpl $0x2, %ecx
jne 0xa80d
movl %edx, %r10d
andl $0x3, %r10d
jne 0xa80d
imull $0xc28f5c29, %edx, %r10d # imm = 0xC28F5C29
addl $0x51eb850, %r10d       # imm = 0x51EB850
movl %r10d, %r11d
rorl $0x2, %r11d
movl $0x1, %r9d
cmpl $0x28f5c28, %r11d       # imm = 0x28F5C28
ja 0xa80d
rorl $0x4, %r10d
xorl %r9d, %r9d
cmpl $0xa3d70b, %r10d        # imm = 0xA3D70B
setb %r9b
movslq %ecx, %r10
movsbl -0x1(%r10,%r8), %r10d
addl %r10d, %eax
addl %r9d, %eax
movl %eax, 0x4(%rdi)
testl %eax, %eax
jle 0xa7ae
leaq 0x1e996(%rip), %rdx     # 0x291c0
movl $0x1, %esi
movslq %ecx, %r10
movsbl -0x1(%r10,%rdx), %r8d
xorl %r9d, %r9d
cmpl $0x2, %r10d
jne 0xa881
movl 0x8(%rdi), %r10d
testb $0x3, %r10b
jne 0xa881
imull $0xc28f5c29, %r10d, %r10d # imm = 0xC28F5C29
addl $0x51eb850, %r10d       # imm = 0x51EB850
movl %r10d, %r11d
rorl $0x2, %r11d
movl $0x1, %r9d
cmpl $0x28f5c28, %r11d       # imm = 0x28F5C28
ja 0xa881
rorl $0x4, %r10d
xorl %r9d, %r9d
cmpl $0xa3d70b, %r10d        # imm = 0xA3D70B
setb %r9b
addl %r8d, %r9d
subl %r9d, %eax
jle 0xa8a4
movl %eax, 0x4(%rdi)
xorl %r8d, %r8d
cmpl $0xc, %ecx
leal 0x1(%rcx), %ecx
cmovel %esi, %ecx
sete %r8b
addl %r8d, 0x8(%rdi)
movl %ecx, (%rdi)
jmp 0xa82f
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: calc_year_day
int calc_year_day (int ord, int wkd, date_str *pdate)
{
   int incr, (*pfcn) (int, int, int);
   date_str date;
   
   if (IS_WILD(wkd)) {   /* "day", "weekday", "workday", or "holiday" */
      pfcn = pdatefcn[wkd - WILD_FIRST];
      
      if (ord < 0) {   /* nth occurrence backwards */
         MAKE_DATE(date, DEC, 31, curr_year);
         ord = -ord;
         incr = -1;
      }
      else {   /* nth occurrence forwards */
         MAKE_DATE(date, JAN, 1, curr_year);
         incr = 1;
      }
      
      /* search for selected occurrence of specified wildcard */
      
      while (date.yy == curr_year && !((*pfcn)(date.mm, date.dd, date.yy) && --ord == 0)) {
         date.dd += incr;
         normalize(&date);
      }
   }
   else {   /* fixed weekday - calculate it */
      if (ord < 0) {
         MAKE_DATE(date, DEC, calc_day(-1, wkd, DEC) + 7 * (ord + 1), curr_year);
      }
      else {
         MAKE_DATE(date, JAN, calc_day(1, wkd, JAN) + 7 * (ord - 1), curr_year);
      }

      normalize(&date);
   }
   
   return date.yy == curr_year ? (*pdate = date, TRUE) : FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
leal -0x7(%rsi), %eax
cmpl $0xa, %eax
ja 0xac51
movl %eax, %eax
leaq 0x1e5bd(%rip), %rcx     # 0x291f0
movl %edi, %r12d
sarl $0x1f, %r12d
movl %edi, %r13d
negl %r13d
cmovsl %edi, %r13d
testl %edi, %edi
js 0xac80
movaps 0x148f1(%rip), %xmm0    # 0x1f540
jmp 0xac88
leal (,%rdi,8), %ebx
subl %edi, %ebx
testl %edi, %edi
js 0xacf8
movl $0x1, %ebp
movl $0x1, %edi
movl $0x1, %edx
callq 0xa8a5
movl $0xfffffff9, %ecx       # imm = 0xFFFFFFF9
jmp 0xad11
movsd 0x148a8(%rip), %xmm0    # 0x1f530
movq (%rcx,%rax,8), %rbx
orl $0x1, %r12d
leaq 0x23949(%rip), %rax     # 0x2e5e0
movl (%rax), %ebp
movq %rsp, %rax
movlps %xmm0, (%rax)
movl %ebp, 0x8(%rax)
movl (%rsp), %edi
movl 0x4(%rsp), %r15d
movl %r15d, %esi
movl %ebp, %edx
callq *%rbx
leal -0x1(%r13), %r14d
testl %eax, %eax
je 0xacbe
testl %r14d, %r14d
je 0xacec
testl %eax, %eax
cmovel %r13d, %r14d
addl %r12d, %r15d
movl %r15d, 0x4(%rsp)
movq %rsp, %rdi
callq 0xa792
movl 0x8(%rsp), %ebp
leaq 0x23901(%rip), %rax     # 0x2e5e0
movl (%rax), %r15d
movl %r14d, %r13d
cmpl %r15d, %ebp
je 0xaca2
jmp 0xad39
leaq 0x238ed(%rip), %rax     # 0x2e5e0
movl (%rax), %r15d
jmp 0xad39
movl $0xc, %ebp
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0xc, %edx
callq 0xa8a5
movl $0x7, %ecx
addl %ecx, %ebx
addl %eax, %ebx
leaq 0x238c4(%rip), %rax     # 0x2e5e0
movl (%rax), %r15d
movq %rsp, %r14
movl %ebp, (%r14)
movl %ebx, 0x4(%r14)
movl %r15d, 0x8(%r14)
movq %r14, %rdi
callq 0xa792
movl 0x8(%r14), %ebp
xorl %eax, %eax
cmpl %r15d, %ebp
jne 0xad58
movl 0x8(%rsp), %eax
movq 0x10(%rsp), %rcx
movl %eax, 0x8(%rcx)
movq (%rsp), %rax
movq %rax, (%rcx)
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: note_day
int note_day (int mm, int n, int yy)
{
   int day, lastday;
   
   if (n == 0) n = NOTE_DEFAULT;   /* convert 0 to appropriate default */
      
   
   /* lastday depends on month length and presence (but not position) of small
      calendars
   */
   lastday = LAST_NOTE_DAY - (LENGTH_OF(mm, yy) - 28) - (small_cal_pos == SC_NONE ? 0 : 2);
   
   /* count forward if n is positive, backward if negative */
   day = (n > 0) ? FIRST_NOTE_DAY + n - 1 : lastday + n + 1;
   
   /* make sure result is valid for this month/year */
   return (day >= FIRST_NOTE_DAY && day <= lastday) ? day : 0;
}

// Assembly:
movslq %edi, %rdi
leaq 0x1e44f(%rip), %rax     # 0x291c0
movsbl -0x1(%rdi,%rax), %eax
xorl $0x2, %edi
movl %edx, %r8d
andl $0x3, %r8d
xorl %ecx, %ecx
orl %edi, %r8d
movl $0x0, %edi
jne 0xadba
imull $0xc28f5c29, %edx, %edx # imm = 0xC28F5C29
addl $0x51eb850, %edx        # imm = 0x51EB850
movl %edx, %r8d
rorl $0x2, %r8d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmpl $0x28f5c28, %r8d        # imm = 0x28F5C28
ja 0xadba
rorl $0x4, %edx
xorl %edi, %edi
cmpl $0xa3d70b, %edx         # imm = 0xA3D70B
sbbl %edi, %edi
cmpl $0x1, %esi
movl $0x0, %edx
sbbl %edx, %edx
orl %esi, %edx
leaq 0x1e7df(%rip), %rsi     # 0x295ac
xorl %r8d, %r8d
cmpl %ecx, (%rsi)
sete %r8b
subl %eax, %edi
leal (%rdi,%r8,2), %eax
leal (%rdi,%r8,2), %esi
addl $0x47, %esi
leal 0x1f(%rdx), %edi
testl %edx, %edx
leal 0x48(%rdx,%rax), %edx
cmovgl %edi, %edx
cmpl %esi, %edx
movl %edx, %eax
cmovgl %ecx, %eax
cmpl $0x20, %edx
cmovll %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: note_box
int note_box (int mm, int dd, int yy)
{
   int startbox = START_BOX(mm, yy), pc, nc;
   
   /* move starting box to second row if conflict with small calendars */
   pc = prev_cal_box[small_cal_pos];
   nc = next_cal_box[small_cal_pos];
   if (pc == startbox || nc == startbox) startbox += 7;
   
   dd -= FIRST_NOTE_DAY;   /* convert to note box number 0..13 */
   dd += (pc == 0) + (nc == 1);   /* adjust for small calendars in 0, 1 */
   
   /* position box after calendar body if no room before */
   return dd < startbox ? dd : dd + LENGTH_OF(mm, yy);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
movl %edi, %ebp
movl $0x1, %esi
callq 0xab15
leaq 0x227cf(%rip), %rcx     # 0x2d5e8
movl (%rcx), %edx
movl %eax, %ecx
subl %edx, %ecx
negl %edx
addl %edx, %eax
addl $0x7, %eax
cltq
imulq $-0x6db6db6d, %rax, %rax # imm = 0x92492493
shrq $0x20, %rax
addl %ecx, %eax
addl $0x7, %eax
movl %eax, %edx
shrl $0x1f, %edx
sarl $0x2, %eax
addl %edx, %eax
leal (,%rax,8), %edx
subl %edx, %eax
leal (%rax,%rcx), %edx
addl $0x7, %edx
leaq 0x1e754(%rip), %rsi     # 0x295ac
movslq (%rsi), %rsi
leaq 0x1e74e(%rip), %rdi     # 0x295b0
leaq 0x1e757(%rip), %r8      # 0x295c0
movl (%r8,%rsi,4), %r8d
cmpl %edx, %r8d
leal 0xe(%rax,%rcx), %eax
movl %edx, %ecx
cmovel %eax, %ecx
movl (%rdi,%rsi,4), %esi
cmpl %edx, %esi
cmovel %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %r8d
sete %al
cmpl $0x1, %esi
adcl %r14d, %eax
addl $-0x20, %eax
cmpl %ecx, %eax
jl 0xaee4
movslq %ebp, %rcx
leaq 0x1e31f(%rip), %rdx     # 0x291c0
movsbl -0x1(%rcx,%rdx), %ecx
xorl $0x2, %ebp
movl %ebx, %esi
andl $0x3, %esi
xorl %edx, %edx
orl %ebp, %esi
jne 0xaee0
imull $0xc28f5c29, %ebx, %esi # imm = 0xC28F5C29
addl $0x51eb850, %esi        # imm = 0x51EB850
movl %esi, %edi
rorl $0x2, %edi
movl $0x1, %edx
cmpl $0x28f5c28, %edi        # imm = 0x28F5C28
ja 0xaee0
rorl $0x4, %esi
xorl %edx, %edx
cmpl $0xa3d70b, %esi         # imm = 0xA3D70B
setb %dl
addl %ecx, %eax
addl %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: century
int century (void)
{
   static int this_century = -1;
   struct tm *p_tm;
   time_t tmp;
   
   if (this_century < 0) {   /* calculate first time only */
      time(&tmp);
      p_tm = localtime(&tmp);
      this_century = ((TM_YEAR + p_tm->tm_year) / 100) * 100;
   }
   
   return this_century;
}

// Assembly:
movl 0x1fce1(%rip), %eax     # 0x2abd0
testl %eax, %eax
js 0xaef4
retq
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5230
movq %rbx, %rdi
callq 0x5070
movl 0x14(%rax), %eax
addl $0x76c, %eax            # imm = 0x76C
cltq
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
imull $0x64, %eax, %eax
movl %eax, 0x1fc9b(%rip)     # 0x2abd0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: copy_text
void copy_text (char *pbuf, char **ptext)
{
   char *p, *pb;

   /* copy words to pbuf, separating by one blank */
   
   for (*(pb = pbuf) = '\0'; (p = *ptext) != NULL; *pb++ = *++ptext ? ' ' : '\0') {
      for ( ; *p; p++) {
         if (! (*p == ' ' && (pb == pbuf || pb[-1] == ' '))) *pb++ = *p;
      }
      if (pb > pbuf && pb[-1] == ' ') pb--;
   }
   return;
}

// Assembly:
movb $0x0, (%rdi)
movq (%rsi), %rcx
testq %rcx, %rcx
je 0xb102
movq %rdi, %rax
movzbl (%rcx), %edx
cmpl $0x20, %edx
je 0xb0e4
testl %edx, %edx
jne 0xb0f2
cmpq %rdi, %rax
jbe 0xb0c5
leaq -0x1(%rax), %rcx
cmpb $0x20, -0x1(%rax)
cmoveq %rcx, %rax
cmpq $0x0, 0x8(%rsi)
setne %cl
shlb $0x5, %cl
movb %cl, (%rax)
movq 0x8(%rsi), %rcx
addq $0x8, %rsi
incq %rax
testq %rcx, %rcx
jne 0xb0a8
jmp 0xb102
movq %rdi, %r8
cmpq %rdi, %rax
je 0xb0fa
cmpb $0x20, -0x1(%rax)
je 0xb0f7
movb %dl, (%rax)
incq %rax
movq %rax, %r8
incq %rcx
movq %r8, %rax
jmp 0xb0a8
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: split_date
int split_date (char *pstr, int *pn1, int *pn2, int *pn3)
{
   int i, n, *pn;
   
   /* attempt to extract up to three numeric fields */
   for (n = 0, i = 1; i <= 3; i++) {
      pn = i == 1 ? pn1 : i == 2 ? pn2 : pn3;   /* crude but portable */
      if (pn) *pn = *pstr ? (n++, atoi(pstr)) : 0;
      SKIP_FIELD(pstr);   /* go to next field */
   }
   return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movb (%rdi), %bpl
movl $0x1, %r13d
movl $0x0, 0xc(%rsp)
cmpl $0x2, %r13d
movq 0x10(%rsp), %rbx
cmoveq %r14, %rbx
cmpl $0x1, %r13d
cmoveq %r15, %rbx
testq %rbx, %rbx
je 0xb165
testb %bpl, %bpl
je 0xb15d
incl 0xc(%rsp)
movq %r12, %rdi
callq 0x52d0
jmp 0xb15f
xorl %eax, %eax
movl %eax, (%rbx)
movb (%r12), %bpl
testb %bpl, %bpl
je 0xb1ac
callq 0x5340
movq (%rax), %rax
movsbq %bpl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0xb18c
movb 0x1(%r12), %bpl
incq %r12
testb %bpl, %bpl
jne 0xb172
jmp 0xb1ac
callq 0x5340
movq (%rax), %rax
movsbq %bpl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0xb1ae
movb 0x1(%r12), %bpl
incq %r12
testb %bpl, %bpl
jne 0xb194
xorl %ebp, %ebp
incl %r13d
cmpl $0x4, %r13d
jne 0xb130
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: mk_filespec
char *mk_filespec (char *filespec, char *path, char *name)
{
   char *p;
   
   *filespec = '\0';
   
   /* copy name intact if absolute; else merge path and relative name */
   
   /* if name starts with "~/", translate it for user */
   if (strncmp(name, "~/", 2) == 0 && (p = getenv(HOME_DIR)) != NULL) {
      strcpy(filespec, p);
      TERM_PATH(filespec);
      name += 2;   /* skip "~/" */
   }
   else if (*name != START_PATH) {   /* relative path */
      /* if path starts with "~/", translate it for user */
      if (strncmp(path, "~/", 2) == 0 && (p = getenv(HOME_DIR)) != NULL) {
         strcpy(filespec, p);
         TERM_PATH(filespec);
         path += 2;   /* skip "~/"; append rest below */
      }
      strcat(filespec, path);
      TERM_PATH(filespec);
   }
   
   return strcat(filespec, name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movb $0x0, (%rdi)
movzbl (%rdx), %eax
cmpl $0x2f, %eax
je 0xb84e
movq %rsi, %r15
cmpl $0x7e, %eax
jne 0xb7dc
cmpb $0x2f, 0x1(%rbx)
jne 0xb7dc
leaq 0xb9b6(%rip), %rdi      # 0x1715a
callq 0x5040
testq %rax, %rax
je 0xb7dc
movq %r14, %rdi
movq %rax, %rsi
callq 0x50a0
cmpb $0x0, (%r14)
je 0xb7d6
movq %r14, %rdi
callq 0x5100
cmpb $0x2f, -0x1(%r14,%rax)
je 0xb7d6
movw $0x2f, (%r14,%rax)
addq $0x2, %rbx
jmp 0xb84e
cmpb $0x7e, (%r15)
jne 0xb826
cmpb $0x2f, 0x1(%r15)
jne 0xb826
leaq 0xb96a(%rip), %rdi      # 0x1715a
callq 0x5040
testq %rax, %rax
je 0xb826
movq %r14, %rdi
movq %rax, %rsi
callq 0x50a0
cmpb $0x0, (%r14)
je 0xb822
movq %r14, %rdi
callq 0x5100
cmpb $0x2f, -0x1(%r14,%rax)
je 0xb822
movw $0x2f, (%r14,%rax)
addq $0x2, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x52e0
cmpb $0x0, (%r14)
je 0xb84e
movq %r14, %rdi
callq 0x5100
cmpb $0x2f, -0x1(%r14,%rax)
je 0xb84e
movw $0x2f, (%r14,%rax)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x52e0