LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0xd8, %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 0x7d1e
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 %rsp, %rbx
movq %rdi, (%rbx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, 0x8(%rbx)
leaq 0x110(%rsp), %rax
movq %rax, 0x10(%rbx)
movq %r10, 0x18(%rbx)
movl $0x2000, %ebp           # imm = 0x2000
movl $0x2000, %r13d          # imm = 0x2000
movl %r13d, %r12d
movq %r12, %rdi
callq 0x2220
testq %rax, %rax
je 0x7d94
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x7e04
testl %eax, %eax
js 0x7dd4
leal 0x1(%rax), %r12d
cmpl %r13d, %eax
jge 0x7d9b
movl %r12d, %esi
movq %r15, %rdi
callq 0x2240
testq %rax, %rax
cmovneq %rax, %r15
xorl %eax, %eax
movq %r15, %r14
jmp 0x7db6
xorl %r14d, %r14d
xorl %eax, %eax
jmp 0x7db6
movq %r15, %rdi
callq 0x2050
subl %r13d, %r12d
cmpl $0x2001, %r12d          # imm = 0x2001
cmovll %ebp, %r12d
addl %r12d, %r13d
movb $0x1, %al
testb %al, %al
jne 0x7d4d
testq %r14, %r14
je 0x7dfc
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1fc8(%rip), %rdi      # 0x9da3
leaq 0x2d30(%rip), %rsi      # 0xab12
leaq 0x2d7c(%rip), %rcx      # 0xab65
leaq 0x2d71(%rip), %r8       # 0xab61
movl $0x2f, %edx
xorl %eax, %eax
callq 0x5041
movq %rsp, %rdi
callq 0x3276
// File: /workspace/github_c_makefile_star2_O1/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 0x7e3f
movb $0x0, -0x1(%r14,%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x7efc
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
callq 0x20f0
movq (%r14), %rcx
leaq (%rax,%rcx), %rsi
incq %rsi
subq 0x8(%r14), %rsi
jb 0x7e80
incq %rsi
movq %r14, %rdi
callq 0x5136
movq (%r14), %rdi
movq 0x8(%r14), %r15
subq %rdi, %r15
addq 0x18(%r14), %rdi
movslq %r15d, %rsi
movq %rbx, %rdx
callq 0x7e04
testl %eax, %eax
js 0x7ed4
movl %eax, %ebp
movl %eax, %esi
subl %r15d, %esi
jge 0x7ead
movl %ebp, %eax
addq %rax, (%r14)
jmp 0x7ec4
cmpl $0x2000, %esi           # imm = 0x2000
jge 0x7eba
movl $0x1fff, %esi           # imm = 0x1FFF
incl %esi
movq %r14, %rdi
callq 0x5136
cmpl %r15d, %ebp
jge 0x7e80
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ec8(%rip), %rdi      # 0x9da3
leaq 0x2cf5(%rip), %rsi      # 0xabd7
leaq 0x2d02(%rip), %rcx      # 0xabeb
leaq 0x2ce1(%rip), %r8       # 0xabd1
movl $0x2e, %edx
xorl %eax, %eax
callq 0x5041
leaq 0x1ea0(%rip), %rdi      # 0x9da3
leaq 0x1e7c(%rip), %rsi      # 0x9d86
leaq 0x1eb0(%rip), %rcx      # 0x9dc1
leaq 0x1ea4(%rip), %r8       # 0x9dbc
movl $0x11b, %edx            # imm = 0x11B
jmp 0x7ef5
// File: /workspace/github_c_makefile_star2_O1/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 0x7f48
movl %edi, %esi
leaq 0x62d4(%rip), %rax      # 0xe200
movq %rax, 0x63c5(%rip)      # 0xe2f8
movq 0x630e(%rip), %rax      # 0xe248
testq %rax, %rax
je 0x7f5d
leaq 0x6392(%rip), %rdi      # 0xe2d8
jmpq *%rax
leaq 0x6389(%rip), %rdi      # 0xe2d8
leaq 0x2ca7(%rip), %rsi      # 0xabfd
xorl %eax, %eax
jmp 0x53c3
movq %rsi, 0x639c(%rip)      # 0xe300
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x638c(%rip), %rax      # 0xe2f8
testq %rax, %rax
je 0x7fd6
cmpq $0x0, 0x10(%rax)
je 0x7fd6
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
testq %rsi, %rsi
je 0x7feb
movq %rdi, %r14
xorl %r13d, %r13d
callq 0x2070
movq %rax, %r15
leaq 0x633a(%rip), %r12      # 0xe2d8
movl $0x0, (%r15)
movq 0x634c(%rip), %rax      # 0xe2f8
leaq (%r14,%r13), %rsi
movq %rbx, %rdx
subq %r13, %rdx
movq %r12, %rdi
callq *0x10(%rax)
testl %eax, %eax
jle 0x7fc7
movl %eax, %ecx
addq %rcx, %r13
jmp 0x7fcf
je 0x7ff5
cmpl $0x4, (%r15)
jne 0x7ff7
cmpq %rbx, %r13
jb 0x7f9e
jmp 0x7ff7
leaq 0x62fb(%rip), %rdi      # 0xe2d8
leaq 0x2c29(%rip), %rsi      # 0xac0d
xorl %eax, %eax
jmp 0x53c3
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
jmp 0x7ff7
xorl %eax, %eax
cmpq %rbx, %r13
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jne 0x8006
retq
leaq 0x62cb(%rip), %rdi      # 0xe2d8
leaq 0x2c0b(%rip), %rsi      # 0xac1f
movl %eax, %edx
xorl %eax, %eax
jmp 0x53c3
// File: /workspace/github_c_makefile_star2_O1/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 0x807b
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 0x7e47
movq (%rbx), %rsi
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdi
addq %rax, %rdi
subq %rax, %rsi
callq 0x7f65
movq %rbx, %rdi
callq 0x80e0
addq $0xf0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8122
movq %rdi, %rbx
movq 0x18(%rdi), %r14
testq %r14, %r14
je 0x810d
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 0x1c7a(%rip), %rdi      # 0x9da3
leaq 0x1c56(%rip), %rsi      # 0x9d86
leaq 0x2b23(%rip), %rcx      # 0xac5a
leaq 0x1c7e(%rip), %r8       # 0x9dbc
movl $0xa4, %edx
xorl %eax, %eax
callq 0x5041
// File: /workspace/github_c_makefile_star2_O1/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 0x229ce(%rip), %eax     # 0x28248
movl %eax, 0x26eac(%rip)     # 0x2c72c
movl 0x229c5(%rip), %eax     # 0x2824b
movl %eax, 0x26ea3(%rip)     # 0x2c72f
movl $0xffffffff, 0x26e9e(%rip) # imm = 0xFFFFFFFF
movl $0x0, 0x26a08(%rip)     # 0x2c2a8
leaq 0x26e99(%rip), %rdi     # 0x2c740
leaq 0x233e2(%rip), %rsi     # 0x28c90
callq 0x50a0
movl $0x676e616c, 0x27c3b(%rip) # imm = 0x676E616C
movw $0x5f, 0x27c36(%rip)    # 0x2d4fc
leaq 0x27c2b(%rip), %rbx     # 0x2d4f8
movq %rbx, %rdi
callq 0x5100
leaq 0x266a4(%rip), %rcx     # 0x2bf80
movzwl (%rcx), %ecx
movw %cx, (%rax,%rbx)
movb $0x0, 0x2(%rax,%rbx)
movq %rbx, %rdi
callq 0xc20f
movslq 0x26e31(%rip), %rax     # 0x2c728
leaq (%rax,%rax,2), %rax
leaq 0x2412e(%rip), %rcx     # 0x29a30
movq (%rcx,%rax,8), %rdx
leaq 0x104c1(%rip), %rsi     # 0x15dce
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x52f0
movq %rbx, %rdi
callq 0xc20f
cmpl $0x0, 0x2292b(%rip)     # 0x28254
leaq 0x10643(%rip), %rax     # 0x15f73
leaq 0x10651(%rip), %rdx     # 0x15f88
cmoveq %rax, %rdx
leaq 0x10499(%rip), %rsi     # 0x15ddb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x52f0
movq %rbx, %rdi
callq 0xc20f
leaq 0x26eb5(%rip), %rsi     # 0x2c810
movq %rbx, %rdi
callq 0x50a0
movzbl (%rbx), %eax
cmpl $0x2e, %eax
je 0x5971
testl %eax, %eax
jne 0x5974
jmp 0x5979
movb $0x5f, (%rbx)
incq %rbx
jmp 0x5963
movq %rsp, %rdi
callq 0xc20f
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x27b63(%rip)    # 0x2d4fc
movl $0x676e616c, 0x27b55(%rip) # imm = 0x676E616C
leaq 0x27b4e(%rip), %r14     # 0x2d4f8
movq %r14, %rdi
callq 0x5100
movslq %ebx, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq 0x265c0(%rip), %rdx     # 0x2bf80
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_O1/mmayer[P]pcal/src/pcal.c
// Function: set_color
void set_color (char *day, int col)
{
   int i, j, max, count[NUM_COLORS];
   char tmp[STRSIZ], *p;
   
   if (ci_strncmp(day, ALL, strlen(ALL)) == 0) {   /* set all days */
      for (i = 0; i < 7; i++) day_color[i] = col;
   }
   
   else if (ci_strncmp(day, HOLIDAY, MIN_DAY_LEN) == 0) { /* set holidays */
      holiday_color = col;
   }
   
   else {   /* set range of days */
      strcpy(tmp, day);
      if ((p = strchr(tmp, '-')) != NULL) *p++ = '\0';
      
      /* parse single day or range of days - return if error */
      if ((i = get_weekday(tmp, FALSE)) == NOT_WEEKDAY ||
          (j = p ? get_weekday(p, FALSE) : i) == NOT_WEEKDAY) {
         return;
      }

      /* set day colors, wrapping around end of week */
      for (j = (i > j) ? j + 7 : j; i <= j; i++) day_color[i % 7] = col;
   }
   
   /* reset weekday_color to most prevalent color */
   
   for (i = 0; i < NUM_COLORS; i++) {   /* clear counts */
      count[i] = 0;
   }
   
   for (i = SUN; i <= SAT; i++) { /* count colors */
      count[(int)day_color[i]]++;
   }
   
   for (i = max = 0; i < NUM_COLORS; i++) { /* get most prevalent */
      if (count[i] > max) max = count[weekday_color = i];
   }
   return;   
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xe0, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x197af(%rip), %rsi     # 0x1f1a1
movl $0x3, %edx
callq 0x9d60
testl %eax, %eax
je 0x5a45
leaq 0xf84d(%rip), %rsi      # 0x15254
movq %r14, %rdi
movl $0x3, %edx
callq 0x9d60
testl %eax, %eax
je 0x5a5f
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x50a0
movq %r15, %rdi
movl $0x2d, %esi
callq 0x5120
testq %rax, %rax
je 0x5a67
movq %rax, %r15
incq %r15
movb $0x0, (%rax)
jmp 0x5a6a
movzbl %bl, %eax
imull $0x1010101, %eax, %eax  # imm = 0x1010101
movl %eax, 0x26cdb(%rip)     # 0x2c72f
movl %eax, 0x26cd2(%rip)     # 0x2c72c
jmp 0x5ae6
movl %ebx, 0x26ccf(%rip)     # 0x2c734
jmp 0x5ae6
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0xcb3b
cmpl $-0x1, %eax
je 0x5b23
movl %eax, %r14d
testq %r15, %r15
je 0x5a91
movq %r15, %rdi
xorl %esi, %esi
callq 0xcb3b
cmpl $-0x1, %eax
je 0x5b23
leal 0x7(%rax), %ecx
cmpl %eax, %r14d
cmovlel %eax, %ecx
cmpl %ecx, %r14d
jg 0x5ae6
incl %ecx
leaq 0x26c7b(%rip), %rax     # 0x2c72c
movslq %r14d, %r14
imulq $-0x6db6db6d, %r14, %rdx # imm = 0x92492493
shrq $0x20, %rdx
addl %r14d, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x2, %edx
addl %esi, %edx
leal (,%rdx,8), %esi
subl %esi, %edx
addl %r14d, %edx
movslq %edx, %rdx
movb %bl, (%rdx,%rax)
incl %r14d
cmpl %r14d, %ecx
jne 0x5ab1
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
xorl %eax, %eax
leaq 0x26c36(%rip), %rcx     # 0x2c72c
movsbq (%rax,%rcx), %rdx
incl (%rsp,%rdx,4)
incq %rax
cmpq $0x7, %rax
jne 0x5af6
xorl %eax, %eax
xorl %ecx, %ecx
movl (%rsp,%rax,4), %edx
cmpl %ecx, %edx
jle 0x5b1a
movl %eax, 0x26790(%rip)     # 0x2c2a8
movl %edx, %ecx
incq %rax
cmpq $0x4, %rax
jne 0x5b0b
addq $0xe0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x26bf3(%rip), %rcx     # 0x2c72c
cmpb $0x0, (%rax,%rcx)
je 0x5b43
movb %dil, (%rax,%rcx)
incq %rax
cmpq $0x7, %rax
jne 0x5b39
movl 0x26be2(%rip), %eax     # 0x2c734
decl %eax
cmpl $-0x3, %eax
ja 0x5b5f
movl %edi, 0x26bd5(%rip)     # 0x2c734
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2313a(%rip), %cl      # 0x28ca0
leaq 0x23133(%rip), %rax     # 0x28ca0
testb %cl, %cl
je 0x5b7f
cmpb %dil, %cl
je 0x5b88
movb 0x3(%rax), %cl
addq $0x3, %rax
jmp 0x5b6d
xorl %ecx, %ecx
testb %dil, %dil
cmovneq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5bda
movb (%rdi), %sil
testb %sil, %sil
je 0x5bd9
movl 0x26b40(%rip), %eax     # 0x2c6dc
movb 0x2319e(%rip), %cl      # 0x28d40
leaq 0x2319f(%rip), %rdx     # 0x28d48
testb %cl, %cl
je 0x5bce
movq %rdx, %r8
movl %ecx, %r9d
cmpb %sil, %r9b
jne 0x5bc2
orl -0x4(%r8), %eax
movl %eax, 0x26b1a(%rip)     # 0x2c6dc
movb (%r8), %r9b
addq $0x8, %r8
testb %r9b, %r9b
jne 0x5bb3
incq %rdi
movb (%rdi), %sil
testb %sil, %sil
jne 0x5ba9
retq
movl $0x0, 0x26af8(%rip)     # 0x2c6dc
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x221fa(%rip), %r12     # 0x28248
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 0x6050
movslq %ebp, %rcx
leaq 0x226fb(%rip), %rdx     # 0x28770
movq (%rdx,%rcx,8), %rbx
movq %rbx, 0x27470(%rip)     # 0x2d4f0
cmpl $0x7, %eax
je 0x6089
testl %eax, %eax
jne 0x60b3
testl %eax, %eax
leaq 0xf3c6(%rip), %rax      # 0x15458
cmoveq %rax, %rbx
leaq 0x27403(%rip), %rdi     # 0x2d4a0
leaq 0xffc3(%rip), %rsi      # 0x16067
movq %rbx, %rdx
xorl %eax, %eax
callq 0x52f0
jmp 0x6149
xorl %r13d, %r13d
cmpl $0x4, %eax
cmovbl %r13d, %ebp
movb $0x0, 0x273dc(%rip)     # 0x2d4a0
leaq 0x24475(%rip), %r15     # 0x2a540
leaq 0x273ce(%rip), %r14     # 0x2d4a0
movsbl (%r13,%r12), %eax
cmpl %eax, %ebp
je 0x60fb
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 0x60d2
movq %r14, %rdi
callq 0x5100
movb $0x20, -0x1(%rax,%r14)
movq %r14, %rdi
callq 0x5100
addq %rax, %r14
testl %ebp, %ebp
leaq 0xf32e(%rip), %rax      # 0x15458
movq %rax, %rdx
cmoveq %rbx, %rdx
cmoveq %rax, %rbx
leaq 0xff3a(%rip), %rsi      # 0x16076
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x52f0
leaq 0x27350(%rip), %rax     # 0x2d4a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x238c3(%rip), %rsi     # 0x29a30
movl 0x8(%rsi,%rdx,8), %ecx
movl %ecx, 0x26781(%rip)     # 0x2c8f8
movl 0xc(%rsi,%rdx,8), %eax
movl %eax, 0x2677b(%rip)     # 0x2c8fc
movl 0x10(%rsi,%rdx,8), %edi
movl %edi, 0x26775(%rip)     # 0x2c900
movl 0x14(%rsi,%rdx,8), %edx
cvtsi2sd %ecx, %xmm0
cvtsi2sd %eax, %xmm1
movl %edx, 0x26767(%rip)     # 0x2c904
divsd %xmm1, %xmm0
movsd %xmm0, 0x2675f(%rip)    # 0x2c908
movsd %xmm0, 0x2675f(%rip)    # 0x2c910
leal (,%rdi,8), %edx
subl %edx, %edi
addl %eax, %edi
movl %edi, %edx
shrl $0x1f, %edx
addl %edi, %edx
sarl %edx
movl %edx, 0x2674d(%rip)     # 0x2c918
movl 0x22083(%rip), %edx     # 0x28254
testl %edx, %edx
sete %dil
movl 0x264e7(%rip), %esi     # 0x2c6c4
testl %esi, %esi
setne %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
jne 0x61f1
addl $-0x55, %ecx
jmp 0x6258
orl %esi, %edx
je 0x6214
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x26702(%rip)     # 0x2c908
movq %rax, 0x26703(%rip)     # 0x2c910
movl $0xffffffab, %ecx       # imm = 0xFFFFFFAB
jmp 0x6258
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, 0x266b4(%rip)     # 0x2c904
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
movl %ecx, 0x266be(%rip)     # 0x2c91c
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x25418(%rip)     # 0x2c6dc
jne 0x731a
movq (%r15), %rsi
testq %rsi, %rsi
je 0x72f9
addq $0x8, %r15
movq %rbx, %rdi
movq %r12, %rdx
callq 0xb209
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52a0
testq %rax, %rax
jne 0x7301
movq (%r15), %rsi
addq $0x8, %r15
testq %rsi, %rsi
jne 0x72d2
movb $0x0, (%rbx)
xorl %r13d, %r13d
jmp 0x730d
movq %rax, %r13
testb $0x8, 0x253d1(%rip)     # 0x2c6dc
jne 0x7327
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r12, %rdi
movq %r15, %rsi
callq 0x5360
jmp 0x72c6
movq 0x20cc2(%rip), %rax     # 0x27ff0
movq (%rax), %rdi
leaq 0xed84(%rip), %rsi      # 0x160bc
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5210
jmp 0x730d
// File: /workspace/github_c_makefile_star2_O1/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 0xe2f8(%rip), %rdi      # 0x162df
xorl %eax, %eax
callq 0x5130
leaq 0xe2f7(%rip), %rdi      # 0x162ec
xorl %eax, %eax
callq 0x5130
leaq 0xe31d(%rip), %rbx      # 0x16320
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xe31a(%rip), %rdi      # 0x1632e
xorl %eax, %eax
callq 0x5130
leaq 0xe35c(%rip), %rdi      # 0x1637e
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xe380(%rip), %rdi      # 0x163ba
xorl %eax, %eax
callq 0x5130
leaq 0xe38c(%rip), %rdi      # 0x163d4
xorl %eax, %eax
callq 0x5130
movl $0xa, %edi
popq %rbx
jmp 0x5060
// File: /workspace/github_c_makefile_star2_O1/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 0xe0d4(%rip), %rdi      # 0x162df
xorl %eax, %eax
callq 0x5130
leaq 0xe1fe(%rip), %rdi      # 0x16417
xorl %eax, %eax
callq 0x5130
leaq 0xe0f9(%rip), %rbx      # 0x16320
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xe0f6(%rip), %rdi      # 0x1632e
xorl %eax, %eax
callq 0x5130
leaq 0xe138(%rip), %rdi      # 0x1637e
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xe15c(%rip), %rdi      # 0x163ba
xorl %eax, %eax
callq 0x5130
leaq 0xe168(%rip), %rdi      # 0x163d4
xorl %eax, %eax
popq %rbx
jmp 0x5130
// File: /workspace/github_c_makefile_star2_O1/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 0xd66d(%rip), %rdi      # 0x162df
xorl %eax, %eax
callq 0x5130
leaq 0xd8db(%rip), %rdi      # 0x1655b
xorl %eax, %eax
callq 0x5130
leaq 0xd692(%rip), %rbx      # 0x16320
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xd68f(%rip), %rdi      # 0x1632e
xorl %eax, %eax
callq 0x5130
leaq 0xd6d1(%rip), %rdi      # 0x1637e
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5130
leaq 0xd6f5(%rip), %rdi      # 0x163ba
xorl %eax, %eax
callq 0x5130
leaq 0xd701(%rip), %rdi      # 0x163d4
xorl %eax, %eax
popq %rbx
jmp 0x5130
// File: /workspace/github_c_makefile_star2_O1/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 0x9d52
shll $0x18, %edx
movl $0x1, %esi
testl %edx, %edx
je 0x9d56
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 0x9d30
subl %edi, %eax
jmp 0x9d58
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
testl %edx, %edx
setg %r12b
jle 0x9de6
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0x5330
movq (%rax), %rdx
movsbq (%r15), %rax
movl (%rdx,%rax,4), %eax
movl %eax, %edi
shll $0x18, %edi
movsbq (%r14), %rcx
movl (%rdx,%rcx,4), %ecx
movl %ecx, %esi
shll $0x18, %esi
cmpl %esi, %edi
jne 0x9dd6
movl $0x1, %esi
testl %edi, %edi
je 0x9de6
cmpl $0x2, %ebp
setge %r12b
jl 0x9dd6
decl %ebp
movsbq (%r15,%rsi), %rax
movl (%rdx,%rax,4), %eax
movl %eax, %edi
shll $0x18, %edi
movsbq (%r14,%rsi), %rcx
movl (%rdx,%rcx,4), %ecx
movl %ecx, %r8d
shll $0x18, %r8d
incq %rsi
cmpl %r8d, %edi
je 0x9da3
movsbl %al, %eax
movsbl %cl, %ecx
subl %ecx, %eax
xorl %ebx, %ebx
testb %r12b, %r12b
cmovnel %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x9f06
movq %rsi, %r12
cmpb $0x0, (%rsi)
je 0x9f06
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x5150
testq %rax, %rax
je 0x9e39
movq %rax, %r15
movb $0x0, (%rax)
incq %r15
jmp 0x9e40
leaq 0x158fd(%rip), %r15     # 0x1f73d
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x5120
testq %rax, %rax
je 0x9e55
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 0x9e80
movq %rax, %r12
movb $0x0, (%rax)
incq %r12
jmp 0x9e87
leaq 0x158b6(%rip), %r12     # 0x1f73d
movq %rsp, %r13
movq %r13, %rdi
movl $0x2f, %esi
callq 0x5120
testq %rax, %rax
je 0x9e9f
movb $0x0, (%rax)
cmpb $0x0, (%r12)
je 0x9ec5
movq %r12, %rdi
callq 0x52d0
testl %eax, %eax
jg 0x9ec5
movq %r14, %rdi
movl $0x2f, %esi
callq 0x5150
movq %rax, %r12
incq %r12
cmpb $0x0, (%rsp)
cmoveq %rbx, %r13
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x50a0
movq %r14, %rdi
callq 0x5100
movw $0x2f, 0xd0(%rsp,%rax)
cmpb $0x0, (%r12)
cmovneq %r12, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x52e0
movq %rbx, %rdi
movq %r14, %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_O1/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 0x225be(%rip), %rax     # 0x2c6c8
movl (%rax), %eax
cmpl $0x2, %eax
je 0xa138
testl %eax, %eax
jne 0xa1a9
leaq 0x1(%rbx), %rdi
movb $0x20, (%rbx)
movq %r14, %rsi
callq 0x50a0
movq %r14, %rdi
callq 0x5100
addq %rax, %rbx
incq %rbx
jmp 0xa187
movb $0x3c, (%rbx)
movb 0x1(%r14), %bpl
movsbl %bpl, %esi
leaq 0x143b4(%rip), %rdi     # 0x1e4fe
movl $0x5, %edx
callq 0x51e0
testq %rax, %rax
je 0xa17f
leaq 0x1(%rbx), %rdi
movsbl 0x235c7(%rip), %edx     # 0x2d72b
leaq 0x14398(%rip), %rsi     # 0x1e503
xorl %eax, %eax
callq 0x52f0
addq $0x3, %rbx
leaq 0x235a3(%rip), %r14     # 0x2d720
jmp 0xa19a
movb %bpl, 0x1(%rbx)
addq $0x2, %rbx
leaq 0x23592(%rip), %rdi     # 0x2d720
leaq 0x23595(%rip), %rsi     # 0x2d72a
callq 0x50a0
leaq 0x23589(%rip), %rdi     # 0x2d72a
movq %r14, %rsi
callq 0x50a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4(%rdi), %eax
testl %eax, %eax
jg 0xa248
movl (%rdi), %r8d
movl 0x8(%rdi), %ecx
movl $0xc, %edx
leaq 0x1dff2(%rip), %rsi     # 0x281c0
xorl %r9d, %r9d
cmpl $0x1, %r8d
leal -0x1(%r8), %r8d
sete %r9b
cmovel %edx, %r8d
subl %r9d, %ecx
movl %ecx, 0x8(%rdi)
movl %r8d, (%rdi)
xorl %r9d, %r9d
cmpl $0x2, %r8d
jne 0xa232
movl %ecx, %r10d
andl $0x3, %r10d
jne 0xa232
imull $0xc28f5c29, %ecx, %r10d # imm = 0xC28F5C29
addl $0x51eb850, %r10d       # imm = 0x51EB850
movl %r10d, %r11d
rorl $0x2, %r11d
movl $0x1, %r9d
cmpl $0x28f5c28, %r11d       # imm = 0x28F5C28
ja 0xa232
rorl $0x4, %r10d
xorl %r9d, %r9d
cmpl $0xa3d70b, %r10d        # imm = 0xA3D70B
setb %r9b
movslq %r8d, %r10
movsbl -0x1(%r10,%rsi), %r10d
addl %r10d, %eax
addl %r9d, %eax
movl %eax, 0x4(%rdi)
testl %eax, %eax
jle 0xa1ce
movl (%rdi), %esi
movl 0x4(%rdi), %eax
leaq 0x1df6c(%rip), %rcx     # 0x281c0
movl $0x1, %edx
movslq %esi, %r10
movsbl -0x1(%r10,%rcx), %r8d
xorl %r9d, %r9d
cmpl $0x2, %r10d
jne 0xa2ab
movl 0x8(%rdi), %r10d
testb $0x3, %r10b
jne 0xa2ab
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 0xa2ab
rorl $0x4, %r10d
xorl %r9d, %r9d
cmpl $0xa3d70b, %r10d        # imm = 0xA3D70B
setb %r9b
addl %r8d, %r9d
subl %r9d, %eax
jle 0xa2d9
movl %eax, 0x4(%rdi)
cmpl $0xc, %esi
jne 0xa2c4
movl 0x8(%rdi), %r8d
incl %r8d
jmp 0xa2c8
movl 0x8(%rdi), %r8d
cmpl $0xc, %esi
leal 0x1(%rsi), %esi
movl %r8d, 0x8(%rdi)
cmovel %edx, %esi
movl %esi, (%rdi)
jmp 0xa259
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movl %edi, %r14d
leal -0x7(%rsi), %eax
cmpl $0xa, %eax
ja 0xa680
testl %r14d, %r14d
js 0xa6b5
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x4(%rsp)
leaq 0x22f6e(%rip), %rcx     # 0x2d5e0
movl (%rcx), %ecx
movl %ecx, 0xc(%rsp)
movl $0x1, %r12d
jmp 0xa6da
leal (,%r14,8), %ebx
subl %r14d, %ebx
testl %r14d, %r14d
js 0xa73b
movl $0x1, 0x4(%rsp)
movl $0x1, %edi
movl $0x1, %edx
callq 0xa2da
movl $0xfffffff9, %ecx       # imm = 0xFFFFFFF9
jmp 0xa757
movabsq $0x1f0000000c, %rcx     # imm = 0x1F0000000C
movq %rcx, 0x4(%rsp)
leaq 0x22f15(%rip), %rcx     # 0x2d5e0
movl (%rcx), %ecx
movl %ecx, 0xc(%rsp)
negl %r14d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl 0xc(%rsp), %edx
leaq 0x22efb(%rip), %r13     # 0x2d5e0
cmpl (%r13), %edx
jne 0xa774
movl %eax, %eax
leaq 0x1daf8(%rip), %rcx     # 0x281f0
movq (%rcx,%rax,8), %rbx
movl 0x4(%rsp), %edi
movl 0x8(%rsp), %ebp
movl %ebp, %esi
callq *%rbx
leal -0x1(%r14), %r15d
testl %eax, %eax
je 0xa715
testl %r15d, %r15d
je 0xa774
testl %eax, %eax
cmovel %r14d, %r15d
addl %r12d, %ebp
movl %ebp, 0x8(%rsp)
leaq 0x4(%rsp), %rdi
callq 0xa1b1
movl 0xc(%rsp), %edx
movl %r15d, %r14d
cmpl (%r13), %edx
je 0xa6fc
jmp 0xa774
movl $0xc, 0x4(%rsp)
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0xc, %edx
callq 0xa2da
movl $0x7, %ecx
addl %ecx, %ebx
addl %eax, %ebx
leaq 0x4(%rsp), %rdi
movl %ebx, 0x4(%rdi)
leaq 0x22e76(%rip), %rax     # 0x2d5e0
movl (%rax), %eax
movl %eax, 0x8(%rdi)
callq 0xa1b1
movl 0xc(%rsp), %ecx
leaq 0x22e61(%rip), %rdx     # 0x2d5e0
xorl %eax, %eax
cmpl (%rdx), %ecx
jne 0xa79e
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
movl %eax, 0x8(%rcx)
movq 0x4(%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_O1/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 0x1da09(%rip), %rax     # 0x281c0
movsbl -0x1(%rdi,%rax), %eax
xorl $0x2, %edi
movl %edx, %r8d
andl $0x3, %r8d
xorl %ecx, %ecx
orl %edi, %r8d
movl $0x0, %edi
jne 0xa800
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 0xa800
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 0x1dd99(%rip), %rsi     # 0x285ac
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_O1/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 0xa53f
leaq 0x21d89(%rip), %rcx     # 0x2c5e8
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 0x1dd0e(%rip), %rsi     # 0x285ac
movslq (%rsi), %rsi
leaq 0x1dd08(%rip), %rdi     # 0x285b0
leaq 0x1dd11(%rip), %r8      # 0x285c0
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 0xa92a
movslq %ebp, %rcx
leaq 0x1d8d9(%rip), %rdx     # 0x281c0
movsbl -0x1(%rcx,%rdx), %ecx
xorl $0x2, %ebp
movl %ebx, %esi
andl $0x3, %esi
xorl %edx, %edx
orl %ebp, %esi
jne 0xa926
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 0xa926
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_O1/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:
cmpl $0x0, 0x1f29a(%rip)     # 0x29bd0
jns 0xa97e
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, 0x1f257(%rip)     # 0x29bd0
addq $0x10, %rsp
popq %rbx
movl 0x1f24c(%rip), %eax     # 0x29bd0
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xab3a
movq %rdi, %rax
movzbl (%rcx), %edx
cmpl $0x20, %edx
je 0xab25
testl %edx, %edx
jne 0xab30
cmpq %rdi, %rax
jbe 0xab06
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 0xaae9
jmp 0xab3a
cmpq %rdi, %rax
je 0xab35
cmpb $0x20, -0x1(%rax)
je 0xab35
movb %dl, (%rax)
incq %rax
incq %rcx
jmp 0xaae9
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x1, %r13d
movl $0x0, 0x4(%rsp)
cmpl $0x2, %r13d
movq %rbp, %rbx
cmoveq %r14, %rbx
cmpl $0x1, %r13d
cmoveq %r15, %rbx
testq %rbx, %rbx
je 0xab91
cmpb $0x0, (%r12)
je 0xab8d
incl 0x4(%rsp)
movq %r12, %rdi
callq 0x52d0
jmp 0xab8f
xorl %eax, %eax
movl %eax, (%rbx)
movb (%r12), %bl
testb %bl, %bl
je 0xabb8
callq 0x5340
movq (%rax), %rax
movsbq %bl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0xabb8
movb 0x1(%r12), %bl
incq %r12
testb %bl, %bl
jne 0xaba1
movb (%r12), %bl
testb %bl, %bl
je 0xabdf
callq 0x5340
movq (%rax), %rax
movsbq %bl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0xabdf
movb 0x1(%r12), %bl
incq %r12
testb %bl, %bl
jne 0xabc8
incl %r13d
cmpl $0x4, %r13d
jne 0xab60
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mmayer[P]pcal/src/pcalutil.c
// Function: mk_path
char *mk_path (char *path, char *filespec)
{
   char *p;
   
   strcpy(path, filespec);
   if (!(p = strrchr(path, END_PATH))) {
      p = path - 1; /* return null string if no path */
   }

   *++p = '\0';
   return path;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x50a0
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x5150
leaq -0x1(%rbx), %rcx
testq %rax, %rax
cmovneq %rax, %rcx
movb $0x0, 0x1(%rcx)
movq %rbx, %rax
popq %rbx
retq