LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/pcalutil.c
// Function: find_executable
char *find_executable (char *prog)
{
   char *pathvar, *p, *pnext;
   struct stat st;
   static char filepath[STRSIZ];
   
   /* if 'prog' is an absolute/relative path name or environment variable
      'PATH' does not exist, return 'prog'; otherwise, search the directories
      specified in 'PATH' for the executable
   */
   if (strchr(prog, END_PATH) == 0 && (p = getenv(PATH_ENV_VAR)) != 0) {
      pathvar = alloc(strlen(p) + 1);
      strcpy(pathvar, p);

      /* assumes PATH is of form "dir1:dir2:...:dirN"; strtok() would be handy
         here, but not everybody has it yet
      */
      for (p = pathvar; *p; p = pnext) {
         if ((pnext = strchr(p, ':')) != NULL) *pnext++ = '\0';
         else pnext = p + strlen(p);

         /* assume the executable lives in the path, and construct its
            complete file name
         */
         filepath[0] = '\0';
         if (strcmp(p, ".") != 0) {
            strcat(filepath, p);
            strcat(filepath, "/");
         }
         strcat(filepath, prog);
         
         /* check that file a) exists, b) is a "normal" file, and c) is
            executable - if so, return its full path
          */
         if (stat(filepath, &st) >= 0 &&
             (st.st_mode & S_IFMT) == S_IFREG &&
             access(filepath, X_OK) == 0) {
            free(pathvar);
            return filepath;
         }
      }
      free(pathvar);
   }
   
   return prog;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x5120
testq %rax, %rax
jne 0xb98c
leaq 0x13d03(%rip), %rdi     # 0x1f58f
callq 0x5040
testq %rax, %rax
je 0xb98c
movq %rax, %r15
movq %rax, %rdi
callq 0x5100
leal 0x1(%rax), %edi
callq 0xa2c0
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
callq 0x50a0
cmpb $0x0, (%r13)
je 0xb984
leaq 0x22e73(%rip), %r15     # 0x2e740
leaq 0x8(%rsp), %r12
movl $0xf000, %r14d          # imm = 0xF000
movq %r13, (%rsp)
movq %r13, %rbp
movq %r13, %rdi
movl $0x3a, %esi
callq 0x5120
testq %rax, %rax
je 0xb8fc
movq %rax, %r13
incq %r13
movb $0x0, (%rax)
jmp 0xb90a
movq %rbp, %rdi
callq 0x5100
movq %rax, %r13
addq %rbp, %r13
movb $0x0, 0x22e2f(%rip)     # 0x2e740
cmpb $0x2e, (%rbp)
jne 0xb91d
cmpb $0x0, 0x1(%rbp)
je 0xb937
movq %r15, %rdi
movq %rbp, %rsi
callq 0x52e0
movq %r15, %rdi
callq 0x5100
movw $0x2f, (%rax,%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x52e0
movq %r15, %rdi
movq %r12, %rsi
callq 0x5220
testl %eax, %eax
js 0xb970
movl 0x20(%rsp), %eax
andl %r14d, %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0xb970
movq %r15, %rdi
movl $0x1, %esi
callq 0x5280
testl %eax, %eax
je 0xb97d
cmpb $0x0, (%r13)
jne 0xb8dc
jmp 0xb980
movq %r15, %rbx
movq (%rsp), %r13
movq %r13, %rdi
callq 0x5050
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: get_token
int get_token (char *token)
{
   KWD_F *p;
   
   for (p = pp_info; p->name; p++) {
      if (ci_strncmp(token, p->name, MIN_PPTOK_LEN) == 0) return p - pp_info;
   }
   
   return PP_OTHER;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1d819(%rip), %r15     # 0x29800
movq (%r15), %rsi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0xc026
movq %rdi, %r14
xorl %r12d, %r12d
movq %r14, %rdi
movl $0x3, %edx
callq 0xa340
testl %eax, %eax
je 0xc01b
movq 0x18(%r15,%r12), %rsi
addq $0x18, %r12
testq %rsi, %rsi
jne 0xbffa
jmp 0xc026
shrq $0x3, %r12
imull $0xaaaaaaab, %r12d, %ebx # imm = 0xAAAAAAAB
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: do_define_sym_val
int do_define_sym_val (char *sym, char *val)
{
   int i;
   
   i = find_sym_name(sym);
   if (i == PP_SYM_UNDEF) return PP_SYM_UNDEF;
   
   if (pp_val[i]) {
      free(pp_val[i]);
      pp_val[i]=NULL;
   }
   
   if (val) strcpy(pp_val[i] = alloc(strlen(val)+1), val); 
   else pp_val[i]=NULL;
   
   return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0xc685
cmpl $-0x1, %eax
je 0xc0aa
movslq %eax, %r14
leaq 0x22ae2(%rip), %r15     # 0x2eb50
movq (%r15,%r14,8), %rdi
testq %rdi, %rdi
je 0xc084
callq 0x5050
movq $0x0, (%r15,%r14,8)
testq %rbx, %rbx
je 0xc0b1
movq %rbx, %rdi
callq 0x5100
leal 0x1(%rax), %edi
callq 0xa2c0
movq %rax, (%r15,%r14,8)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x50a0
jmp 0xc0b9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xc0bb
movq $0x0, (%r15,%r14,8)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: clear_syms
void clear_syms (void)
{
   int i;
   
   for (i = 0; i < MAX_PP_SYMS; i++) {
      if (pp_sym[i]) {
         free(pp_sym[i]);
         pp_sym[i] = NULL;
      }
      if (pp_val[i]) {
         free(pp_val[i]);
         pp_val[i] = NULL;
      }
   }
   return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
leaq 0x2228a(%rip), %r14     # 0x2e830
leaq 0x225a3(%rip), %r15     # 0x2eb50
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0xc5c3
callq 0x5050
movq $0x0, (%rbx,%r14)
movq (%rbx,%r15), %rdi
testq %rdi, %rdi
je 0xc5d9
callq 0x5050
movq $0x0, (%rbx,%r15)
addq $0x8, %rbx
cmpq $0x320, %rbx            # imm = 0x320
jne 0xc5ad
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: cleanup
void cleanup (void)
{
   int i, j;
   year_info *py, *pny;
   month_info *pm;
   day_info *pd, *pnd;
   
   for (py = head; py; py = pny) {   /* main data structure */
      pny = py->next;
      for (i = 0; i < 12; i++) {
         if ((pm = py->month[i]) == NULL) continue;
         for (j = 0; j < LAST_NOTE_DAY; j++) {
            for (pd = pm->day[j]; pd; pd = pnd) {
               pnd = pd->next;
               free(pd->text);
               free(pd);
            }
         }
         free(pm);
      }
      free(py);
   }
   
   clear_syms();   /* symbol table */

   return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x20ca2(%rip), %rax     # 0x2d2a0
movq (%rax), %rbx
testq %rbx, %rbx
je 0xc672
movq 0x68(%rbx), %rax
movq %rax, (%rsp)
xorl %r13d, %r13d
movq 0x8(%rbx,%r13,8), %r14
testq %r14, %r14
je 0xc655
xorl %ebp, %ebp
movq 0x8(%r14,%rbp,8), %r15
testq %r15, %r15
je 0xc644
movq 0x8(%r15), %rdi
movq 0x10(%r15), %r12
callq 0x5050
movq %r15, %rdi
callq 0x5050
movq %r12, %r15
testq %r12, %r12
jne 0xc627
incq %rbp
cmpq $0x2d, %rbp
jne 0xc61d
movq %r14, %rdi
callq 0x5050
incq %r13
cmpq $0xc, %r13
jne 0xc611
movq %rbx, %rdi
callq 0x5050
movq (%rsp), %rax
movq %rax, %rbx
testq %rax, %rax
jne 0xc606
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc598
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: do_define
int do_define (char *sym)
{
   int i;
   
   if (!sym) {   /* null argument - clear all definitions */
      clear_syms();
      return 0;
   }
   
   if (DEBUG(DEBUG_PP)) fprintf(stderr, "defining %s\n", sym);
   
   if (do_ifdef(sym)) return 0;   /* already defined? */
      
   for (i = 0; i < MAX_PP_SYMS; i++) {   /* find room for it */
      if (!pp_sym[i]) {
         strcpy(pp_sym[i] = alloc(strlen(sym)+1), sym);
         return 0;
      }
   }
   
   fprintf(stderr, E_SYMFULL, progname, sym);

   return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xc75a
movq %rdi, %rbx
leaq 0x20fd5(%rip), %rax     # 0x2d6dc
testb $0x20, (%rax)
jne 0xc788
movq %rbx, %rdi
callq 0x980d
testl %eax, %eax
jne 0xc780
xorl %r14d, %r14d
leaq 0x2210e(%rip), %r15     # 0x2e830
cmpq $0x0, (%r14,%r15)
je 0xc761
addq $0x8, %r14
cmpq $0x320, %r14            # imm = 0x320
jne 0xc722
movq 0x1c8b3(%rip), %rax     # 0x28ff0
movq (%rax), %rdi
leaq 0x1372c(%rip), %rsi     # 0x1fe73
leaq 0x210e2(%rip), %rdx     # 0x2d830
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5210
jmp 0xc780
callq 0xc598
jmp 0xc780
movq %rbx, %rdi
callq 0x5100
leal 0x1(%rax), %edi
callq 0xa2c0
movq %rax, (%r14,%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x50a0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x1c861(%rip), %rax     # 0x28ff0
movq (%rax), %rdi
leaq 0x13705(%rip), %rsi     # 0x1fe9e
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5210
jmp 0xc70c
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: do_undef
int do_undef (char *sym)
{
   int i;
   
   if (!sym) return 0;

   if (DEBUG(DEBUG_PP)) fprintf(stderr, "undefining %s\n", sym);

   if ((i = find_sym_name(sym)) != PP_SYM_UNDEF) {
      if (pp_val[i]) {
         free(pp_val[i]);
         pp_val[i] = NULL;
      }
      free(pp_sym[i]);
      pp_sym[i] = NULL;
   }
   
   return 0;
}

// Assembly:
testq %rdi, %rdi
je 0xc80c
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x20f21(%rip), %rax     # 0x2d6dc
testb $0x20, (%rax)
jne 0xc80f
movq %rbx, %rdi
callq 0xc685
cmpl $-0x1, %eax
je 0xc805
movslq %eax, %rbx
leaq 0x22379(%rip), %r14     # 0x2eb50
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0xc7ed
callq 0x5050
movq $0x0, (%r14,%rbx,8)
leaq 0x2203c(%rip), %r14     # 0x2e830
movq (%r14,%rbx,8), %rdi
callq 0x5050
movq $0x0, (%r14,%rbx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
movq 0x1c7da(%rip), %rax     # 0x28ff0
movq (%rax), %rdi
leaq 0x1367c(%rip), %rsi     # 0x1fe9c
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5210
jmp 0xc7c0
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: find_year
year_info *find_year (int year, int insert)
{
   year_info *pyear, *plast, *p;
   
   for (plast = NULL, pyear = head;   /* search linked list */
        pyear && pyear->year < year;
        plast = pyear, pyear = pyear->next)
      ;
   
   if (pyear && pyear->year == year) return pyear;   /* found - return it */

   if (insert) {   /* not found - insert it if requested */
      int i;
      p = (year_info *) alloc((int) sizeof(year_info));   /* create new record */
      p->year = year;
      for (i = 0; i < (int)(ARRAYSIZE(p->month)); i++) p->month[i] = NULL;
      p->next = pyear;   /* link it in */
      return *(plast ? &plast->next : &head) = p;
   }
   else return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0x209c0(%rip), %r14     # 0x2d2a0
movq (%r14), %rbx
testq %rbx, %rbx
je 0xc902
movl (%rbx), %eax
cmpl %ebp, %eax
jge 0xc909
movq %rbx, %r15
movq 0x68(%rbx), %rbx
testq %rbx, %rbx
je 0xc905
movl (%rbx), %eax
cmpl %ebp, %eax
jl 0xc8ee
jmp 0xc90c
xorl %r15d, %r15d
xorl %ebx, %ebx
jmp 0xc910
xorl %r15d, %r15d
cmpl %ebp, %eax
je 0xc955
testl %esi, %esi
je 0xc953
movl $0x70, %edi
callq 0xa2c0
movl %ebp, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x58(%rax)
movq %rbx, 0x68(%rax)
testq %r15, %r15
je 0xc94b
addq $0x68, %r15
movq %r15, %r14
movq %rax, (%r14)
movq %rax, %rbx
jmp 0xc955
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: odox_easter_from_april1
int odox_easter_from_april1 (int year)
{
   int a, b, leap;
   
   a = ( ( ((year-1) % METONIC) + 1 ) * METONIC + 15 ) % 30;
   leap = IS_LEAP(year) ? 1 : 0;
   b = (calc_weekday(1,1,year) + 90 + leap + a + 2) % 7;
   b = 7 - b + 3 + a;

   /* In 1923, 13 days  were added to the new greek calendar */
   if (year <= 1923) b -= 13;

   return (b);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
xorl %r14d, %r14d
testb $0x3, %bl
jne 0xcc32
imull $0xc28f5c29, %ebx, %eax # imm = 0xC28F5C29
addl $0x51eb850, %eax        # imm = 0x51EB850
movl %eax, %ecx
rorl $0x2, %ecx
movl $0x1, %r14d
cmpl $0x28f5c28, %ecx        # imm = 0x28F5C28
ja 0xcc32
rorl $0x4, %eax
xorl %r14d, %r14d
cmpl $0xa3d70b, %eax         # imm = 0xA3D70B
setb %r14b
leal -0x1(%rbx), %eax
cltq
imulq $0x6bca1af3, %rax, %rax # imm = 0x6BCA1AF3
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
sarl $0x3, %eax
addl %ecx, %eax
leal (%rax,%rax,8), %ecx
leal (%rax,%rcx,2), %eax
negl %eax
addl %ebx, %eax
decl %eax
leal (%rax,%rax,8), %ecx
leal (%rax,%rcx,2), %edx
leal (%rax,%rcx,2), %eax
addl $0x22, %eax
cwtl
imull $0xffff8889, %eax, %eax # imm = 0xFFFF8889
shrl $0x10, %eax
addl %edx, %eax
addl $0x22, %eax
movzwl %ax, %eax
movswl %ax, %ecx
shrl $0xf, %eax
sarl $0x4, %ecx
addl %eax, %ecx
movl %ecx, %eax
shll $0x5, %eax
addl %ecx, %ecx
subl %eax, %ecx
leal (%rcx,%rdx), %eax
addl $0x22, %eax
movswl %ax, %r15d
movl $0x1, %edi
movl $0x1, %esi
movl %ebx, %edx
callq 0xab15
addl %r15d, %r14d
movl %r14d, %ecx
addl %eax, %ecx
addl %r14d, %eax
addl $0x5c, %eax
movslq %eax, %rdx
imulq $-0x6db6db6d, %rdx, %rax # imm = 0x92492493
shrq $0x20, %rax
addl %eax, %ecx
addl $0x5c, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
sarl $0x2, %ecx
addl %eax, %ecx
leal (,%rcx,8), %eax
subl %ecx, %eax
leal 0xa(%r15), %ecx
addl $-0x3, %r15d
cmpl $0x784, %ebx            # imm = 0x784
cmovgel %ecx, %r15d
subl %edx, %eax
addl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: find_odox_easter
int find_odox_easter (date_str *pdate)   /* pointer into date array */
{
   date_str *sv_pdate = pdate;
   int offs;
   
   /* easter is days from 1st April for easter sun */
   offs = odox_easter_from_april1(curr_year);
   odox_add(offs);
   
   /* return number of dates added (always 1 in this routine) */
   return pdate - sv_pdate;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x218d7(%rip), %r15     # 0x2e5e0
movl (%r15), %edi
callq 0xcbf6
movl %eax, %r14d
testl %eax, %eax
jle 0xcd31
leal -0x1e(%r14), %eax
cmpl $0x1f, %r14d
cmovbl %r14d, %eax
movl $0x4, %ebp
sbbl $-0x1, %ebp
movl %eax, %r14d
jmp 0xcd3a
addl $0x1f, %r14d
movl $0x3, %ebp
leaq 0x2099b(%rip), %rax     # 0x2d6dc
testb $0x2, (%rax)
jne 0xcd62
movl %ebp, (%rbx)
movl %r14d, 0x4(%rbx)
movl (%r15), %eax
movl %eax, 0x8(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x1c287(%rip), %rax     # 0x28ff0
movq (%rax), %rdi
movl (%r15), %edx
leaq 0x13135(%rip), %rsi     # 0x1feab
movl %ebp, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x5210
jmp 0xcd46
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: find_odox_stgeorge
int find_odox_stgeorge (date_str *pdate)   /* pointer into date array */
{
   date_str *sv_pdate = pdate;
   int offs;
   
   /* offs is days from 1st April for easter sun */
   offs = odox_easter_from_april1(curr_year);
   if (offs >= 23) {   /* it's before easter; will move to easter Mon */
      offs++;
      odox_add(offs);
   } 
   else ADD_DATE(APR, 23, curr_year);

   /* return number of dates added */
   return pdate - sv_pdate;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2184b(%rip), %r15     # 0x2e5e0
movl (%r15), %edi
callq 0xcbf6
cmpl $0x17, %eax
jl 0xcde7
leal 0x1(%rax), %ecx
leal -0x1d(%rax), %ebp
cmpl $0x1e, %eax
cmovbl %ecx, %ebp
movl $0x4, %r14d
sbbl $-0x1, %r14d
leaq 0x2091d(%rip), %rax     # 0x2d6dc
testb $0x2, (%rax)
je 0xcdfe
movq 0x1c225(%rip), %rax     # 0x28ff0
movq (%rax), %rdi
movl (%r15), %edx
leaq 0x130d3(%rip), %rsi     # 0x1feab
movl %r14d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x5210
jmp 0xcdfe
leaq 0x208ee(%rip), %rax     # 0x2d6dc
movl $0x17, %ebp
movl $0x4, %r14d
testb $0x2, (%rax)
jne 0xce1a
movl %r14d, (%rbx)
movl %ebp, 0x4(%rbx)
movl (%r15), %eax
movl %eax, 0x8(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x54ee
jmp 0xcdfe
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: find_odox_marcus
int find_odox_marcus (date_str *pdate)   /* pointer into date array */
{
   date_str *sv_pdate = pdate;
   int offs;
   
   /* offs is days from 1st April for easter sun */
   offs = odox_easter_from_april1(curr_year);
   if (offs >= 25) {   /* it's before easter; will move to easter Tue */
      offs += 2;
      odox_add(offs);
   } 
   else ADD_DATE(APR, 25, curr_year);

   /* return number of dates added */
   return pdate - sv_pdate;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x217ae(%rip), %r15     # 0x2e5e0
movl (%r15), %edi
callq 0xcbf6
cmpl $0x19, %eax
jl 0xce84
leal 0x2(%rax), %ecx
leal -0x1c(%rax), %ebp
cmpl $0x1d, %eax
cmovbl %ecx, %ebp
movl $0x4, %r14d
sbbl $-0x1, %r14d
leaq 0x20880(%rip), %rax     # 0x2d6dc
testb $0x2, (%rax)
je 0xce9b
movq 0x1c188(%rip), %rax     # 0x28ff0
movq (%rax), %rdi
movl (%r15), %edx
leaq 0x13036(%rip), %rsi     # 0x1feab
movl %r14d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x5210
jmp 0xce9b
leaq 0x20851(%rip), %rax     # 0x2d6dc
movl $0x19, %ebp
movl $0x4, %r14d
testb $0x2, (%rax)
jne 0xceb7
movl %r14d, (%rbx)
movl %ebp, 0x4(%rbx)
movl (%r15), %eax
movl %eax, 0x8(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x5516
jmp 0xce9b
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: get_month
int get_month (char *cp, int numeric_ok, int year_ok)
{
   int mm;
   
   if (!cp) return NOT_MONTH;

   if (get_keywd(cp) == DT_ALL) return ALL_MONTHS;

   if (year_ok && get_keywd(cp) == DT_YEAR) return ENTIRE_YEAR;
   
   if (numeric_ok && isdigit((int)*cp)) mm = atoi(cp);
   else {
      /* accept month names in the active 'input' language only */
      for (mm = JAN; mm <= DEC; mm++) {
         /* Need to shorten length of string compare by 1 character when the
            last character is '*' so that event like '2nd Sunday in May*'
            don't report 'no match for wildcard'.
         */
         if ((ci_strncmp(cp, months_ml[input_language][mm-1], 
                         strlen(cp) - ((*(cp + strlen(cp) - 1) == '*') ? 1 : 0)) == 0))
            break;
      }
   }
   
   return mm >= JAN && mm <= DEC ? mm : NOT_MONTH;
}

// Assembly:
testq %rdi, %rdi
je 0xcf75
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
callq 0xcfae
testl %eax, %eax
je 0xcf7b
testl %r14d, %r14d
je 0xcf04
movq %rbx, %rdi
callq 0xcfae
movl %eax, %ecx
movl $0xd, %eax
cmpl $0x4, %ecx
je 0xcf9f
testl %ebp, %ebp
je 0xcf1b
callq 0x5340
movq (%rax), %rax
movsbq (%rbx), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0xcf84
xorl %r14d, %r14d
leaq 0x218eb(%rip), %r12     # 0x2e810
leaq 0x1dd14(%rip), %r13     # 0x2ac40
movslq (%r12), %rax
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq %r13, %rax
movq (%rax,%r14,8), %r15
movq %rbx, %rdi
callq 0x5100
xorl %ecx, %ecx
cmpb $0x2a, -0x1(%rbx,%rax)
sete %cl
subl %ecx, %eax
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0xa340
testl %eax, %eax
je 0xcf7f
incq %r14
cmpq $0xc, %r14
jne 0xcf2c
movl $0xd, %r14d
jmp 0xcf8f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %eax, %eax
jmp 0xcf9f
incl %r14d
jmp 0xcf8f
movq %rbx, %rdi
callq 0x52d0
movl %eax, %r14d
leal -0x1(%r14), %eax
cmpl $0xc, %eax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbl %r14d, %eax
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/readfile.c
// Function: get_keywd
int get_keywd (char *cp)
{
   KWD *k;
   
   if (!cp) return DT_OTHER;
   
   for (k = keywds; k->name && ci_strncmp(cp, k->name, strlen(k->name)); k++)
      ;
   
   return k->code;
}

// Assembly:
testq %rdi, %rdi
je 0xd001
pushq %r15
pushq %r14
pushq %rbx
leaq 0x1cb81(%rip), %r15     # 0x29b40
movq (%r15), %r14
testq %r14, %r14
je 0xcff7
movq %rdi, %rbx
leaq 0x1cb6f(%rip), %r15     # 0x29b40
movq %r14, %rdi
callq 0x5100
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0xa340
testl %eax, %eax
je 0xcff7
movq 0x10(%r15), %r14
addq $0x10, %r15
testq %r14, %r14
jne 0xcfd1
movl 0x8(%r15), %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: get_weekday
int get_weekday (char *cp, int wild_ok)
{
   int w;
   
   if (!cp) return NOT_WEEKDAY;

   if (wild_ok) {   /* try wildcards first */
      for (w = WILD_FIRST_WKD; w <= WILD_LAST_WKD; w++) {
         if (ci_strncmp(cp, days[w], strlen(days[w])) == 0) return w;
      }
      if ((w = get_phase(cp)) != MOON_OTHER) return w + WILD_FIRST_MOON;
   }
   
   /* accept day names in the active 'input' language only */
   for (w = SUN; w <= SAT; w++) {
      int compare_count;
      /* To allow for proper detection of the day-of-week name in constructs
         from the configuration file like 'all Fridays in Oct' (i.e. with the
         plural form of the day-of-week name), we need to compare the fewest
         number of characters of the 2 strings.
      */
      compare_count = 
         (strlen(cp) < strlen(days_ml[input_language][w])) ? 
         strlen(cp) : strlen(days_ml[input_language][w]);
      
      if (ci_strncmp(cp, days_ml[input_language][w], compare_count) == 0) return w;
   }
   
   return NOT_WEEKDAY;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0xd0de
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
testl %esi, %esi
je 0xd06b
movl $0x7, %ebx
leaq 0x1c75d(%rip), %r12     # 0x29790
movq (%r12,%rbx,8), %r15
movq %r15, %rdi
callq 0x5100
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0xa340
testl %eax, %eax
je 0xd0c9
incq %rbx
cmpq $0xe, %rbx
jne 0xd033
movq %r14, %rdi
callq 0xd0df
cmpl $-0x1, %eax
je 0xd06b
addl $0xe, %eax
jmp 0xd0d0
leaq 0x1e4ce(%rip), %rbp     # 0x2b540
xorl %r13d, %r13d
leaq 0x21794(%rip), %rbx     # 0x2e810
movq %r14, %rdi
callq 0x5100
movq %rax, %r15
movslq (%rbx), %rax
imulq $0x8c, %rax, %r12
addq %rbp, %r12
movq %r12, %rdi
callq 0x5100
cmpq %rax, %r15
cmovaeq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0xa340
testl %eax, %eax
je 0xd0cd
incq %r13
addq $0x14, %rbp
cmpq $0x7, %r13
jne 0xd07c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xd0d0
movl %ebx, %eax
jmp 0xd0d0
movl %r13d, %eax
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/readfile.c
// Function: get_phase
int get_phase (char *cp)
{
   KWD *p;
   
   if (!cp) return MOON_OTHER;
   
   for (p = phases; p->name && ci_strcmp(cp, p->name); p++)
      ;
   
   return p->code;
}

// Assembly:
testq %rdi, %rdi
je 0xd126
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1cae1(%rip), %r14     # 0x29bd0
movq (%r14), %rsi
testq %rsi, %rsi
je 0xd11a
movq %rdi, %rbx
leaq 0x1cacf(%rip), %r14     # 0x29bd0
movq %rbx, %rdi
callq 0xa2e0
testl %eax, %eax
je 0xd11a
movq 0x10(%r14), %rsi
addq $0x10, %r14
testq %rsi, %rsi
jne 0xd101
movl 0x8(%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: get_ordinal
int get_ordinal (char *cp, int *pval)
{
   KWD_O *o;
   int val;
   char **psuf;
   
   if (!cp) return ORD_OTHER;

   if (isdigit((int)*cp) || *cp == '-') {   /* numeric? */
      if ((val = atoi(cp)) == 0) return ORD_OTHER;
      
      if (*cp == '-') cp++;   /* skip over number */
         
      cp += strspn(cp, DIGITS);
      
      for (psuf = ord_suffix; *psuf; psuf++) {   /* find suffix */
         if (ci_strcmp(cp, *psuf) == 0) {
            *pval = val;
            return val < 0 ? ORD_NEGNUM : ORD_POSNUM;
         }
      }
      return ORD_OTHER;
   }
   
   /* look for word in ordinals list */

   for (o = ordinals; o->name && ci_strncmp(cp, o->name, MIN_ORD_LEN); o++)
      ;
   
   *pval = o->value;
   return o->code;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebp, %ebp
testq %rdi, %rdi
je 0xd20d
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5340
movsbq (%r14), %r12
cmpq $0x2d, %r12
je 0xd1a3
movq (%rax), %rax
movzwl (%rax,%r12,2), %eax
andl $0x800, %eax            # imm = 0x800
jne 0xd1a3
leaq 0x1c786(%rip), %r15     # 0x298f0
movq (%r15), %rsi
testq %rsi, %rsi
je 0xd197
leaq 0x1c777(%rip), %r15     # 0x298f0
movq %r14, %rdi
movl $0x4, %edx
callq 0xa340
testl %eax, %eax
je 0xd197
movq 0x10(%r15), %rsi
addq $0x10, %r15
testq %rsi, %rsi
jne 0xd179
movl 0xc(%r15), %eax
movl %eax, (%rbx)
movl 0x8(%r15), %ebp
jmp 0xd20d
movq %r14, %rdi
callq 0x52d0
testl %eax, %eax
je 0xd20d
movl %eax, %r15d
xorl %eax, %eax
cmpb $0x2d, %r12b
sete %al
addq %rax, %r14
leaq 0x9d3b(%rip), %rsi      # 0x16f00
movq %r14, %rdi
callq 0x51a0
leaq 0x1c86c(%rip), %r12     # 0x29a40
movq (%r12), %rsi
testq %rsi, %rsi
je 0xd20d
addq %rax, %r14
addq $0x8, %r12
movq %r14, %rdi
callq 0xa2e0
testl %eax, %eax
je 0xd1ff
movq (%r12), %rsi
addq $0x8, %r12
testq %rsi, %rsi
jne 0xd1e4
jmp 0xd20d
movl %r15d, (%rbx)
sarl $0x1f, %r15d
orl $0x1, %r15d
movl %r15d, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: get_prep
int get_prep (char *cp)
{
   KWD *p;
   
   if (!cp) return PR_OTHER;

   for (p = preps; p->name && ci_strncmp(cp, p->name, MIN_PREP_LEN); p++)
      ;
   
   return p->code;
}

// Assembly:
testq %rdi, %rdi
je 0xd264
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1c848(%rip), %r14     # 0x29a70
movq (%r14), %rsi
testq %rsi, %rsi
je 0xd258
movq %rdi, %rbx
leaq 0x1c836(%rip), %r14     # 0x29a70
movq %rbx, %rdi
movl $0x9, %edx
callq 0xa340
testl %eax, %eax
je 0xd258
movq 0x10(%r14), %rsi
addq $0x10, %r14
testq %rsi, %rsi
jne 0xd23a
movl 0x8(%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: get_predef_event
int get_predef_event (char *cp)
{
   KWD_H *p;
   
   for (p = predef_events; p->name; p++) {
      if (ci_strncmp(cp, p->name, strlen(p->name)) == 0) return p - predef_events;
   }
   
   return NOT_PREDEF_EVENT;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x1c706(%rip), %r12     # 0x29980
movq (%r12), %r15
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0xd2c2
movq %rdi, %r14
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x5100
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0xa340
testl %eax, %eax
je 0xd2b7
movq 0x18(%r12,%r13), %r15
addq $0x18, %r13
testq %r15, %r15
jne 0xd28e
jmp 0xd2c2
shrq $0x3, %r13
imull $0xaaaaaaab, %r13d, %ebx # imm = 0xAAAAAAAB
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: date_type
int date_type (char *cp, int *pn, int *pv)
{
   int n, v;
   
   /* look for weekdays first, to catch wildcards "1q", "3q", etc. */
   if ((n = get_weekday(cp, TRUE)) != NOT_WEEKDAY) {   /* weekday name? */
      return (*pn = n, DT_WEEKDAY);
   }
   
   if ((n = get_predef_event(cp)) != NOT_PREDEF_EVENT) {   /* pre-defined event? */
      return (*pn = n, DT_PREDEF_EVENT);
   }
   
   if ((n = get_ordinal(cp, &v)) != ORD_OTHER) {   /* ordinal? */
      return (*pn = n, *pv = v, DT_ORDINAL);
   }
   
   if (isdigit((int)*cp)) {   /* other digit? */
      return (IS_NUMERIC(cp) ||
              (date_style == EUR_DATES && IS_EURDATE(cp))) ?
         DT_EURDATE : DT_DATE;
   }
   
   /* "all" can be either a keyword or a month wildcard - look for the former
      usage first */
   
   if ((n = get_keywd(cp)) != DT_OTHER) return n;
   
   if ((n = get_month(cp, FALSE, FALSE)) != NOT_MONTH) {   /* month name? */
      return (*pn = n, DT_MONTH);
   }
   
   return DT_OTHER;   /* unrecognized keyword - give up */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %esi
callq 0xd007
cmpl $-0x1, %eax
je 0xd2f9
movl %eax, (%r14)
movl $0x9, %eax
jmp 0xd330
movq %rbx, %rdi
callq 0xd26a
cmpl $-0x1, %eax
je 0xd310
movl %eax, (%r14)
movl $0xa, %eax
jmp 0xd330
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0xd12c
testl %eax, %eax
je 0xd33a
movl %eax, (%r14)
movl 0xc(%rsp), %eax
movl %eax, (%r15)
movl $0x8, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x5340
movq (%rax), %r15
movsbq (%rbx), %rax
testb $0x8, 0x1(%r15,%rax,2)
jne 0xd376
movq %rbx, %rdi
callq 0xcfae
cmpl $-0x1, %eax
jne 0xd330
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xcebe
cmpl $-0x1, %eax
je 0xd3c3
movl %eax, (%r14)
movl $0x5, %eax
jmp 0xd330
leaq 0x9b83(%rip), %rsi      # 0x16f00
movq %rbx, %rdi
callq 0x51a0
movsbq (%rbx,%rax), %rdx
testq %rdx, %rdx
je 0xd3b9
movq %rax, %rcx
leaq 0x20253(%rip), %rsi     # 0x2d5ec
movl $0x6, %eax
cmpl $0x1, (%rsi)
jne 0xd330
testb $0x4, (%r15,%rdx,2)
je 0xd330
xorl %eax, %eax
cmpb $0x1, 0x1(%rbx,%rcx)
adcl $0x6, %eax
jmp 0xd330
movl $0x7, %eax
jmp 0xd330
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xd330
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: enter_note
int enter_note (int mm, char **pword, int n)
{
   int valid;
   
   /* expand "note all" into all twelve months */
   if (mm == ALL_MONTHS || mm == ENTIRE_YEAR) {
      valid = FALSE;   /* is at least one note box valid? */
      for (mm = JAN; mm <= DEC; mm++) {
         valid |= enter_day_info(mm,
                                 note_day(mm, n, curr_year),
                                 curr_year, NOTE_TEXT,
                                 pword+1) == PARSE_OK;
      }
      return valid ? PARSE_OK : PARSE_NOMATCH;
   }
   
   return enter_day_info(mm, note_day(mm, n, curr_year), curr_year, NOTE_TEXT, pword+1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
cmpl $0xd, %edi
je 0xd86f
movl %edi, %r14d
testl %edi, %edi
jne 0xd8ca
addq $0x8, %rbx
movl $0x1, %r14d
xorl %r15d, %r15d
leaq 0x20d5d(%rip), %r12     # 0x2e5e0
movl (%r12), %edx
movl %r14d, %edi
movl %ebp, %esi
callq 0xad67
movl (%r12), %edx
movl %r14d, %edi
movl %eax, %esi
movl $0x2, %ecx
movq %rbx, %r8
callq 0xd3cd
xorl $0x1, %eax
orl %eax, %r15d
incl %r14d
cmpl $0xd, %r14d
jne 0xd883
xorl %eax, %eax
testl %r15d, %r15d
sete %al
leal (%rax,%rax,2), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20d0f(%rip), %r15     # 0x2e5e0
movl (%r15), %edx
movl %r14d, %edi
movl %ebp, %esi
callq 0xad67
movl (%r15), %edx
addq $0x8, %rbx
movl %r14d, %edi
movl %eax, %esi
movl $0x2, %ecx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd3cd
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/readfile.c
// Function: process_event_specification
int process_event_specification (char **pword, int *ptext_type, char ***pptext)
{
   int rtn, match;
   date_str *pd;
   
   /* parse date spec and enter information for each match */
   if ((rtn = parse_date(pword, ptext_type, pptext)) == PARSE_OK) {
      match = FALSE;
      for (pd = candidate_dates; pd->mm; pd++) {

         if (pd->yy == -1) {
            if (DEBUG(DEBUG_DATES)) {
               fprintf(stderr, "Bypassing invalidated candidate date: yyyy-%02d-%02d.\n", pd->mm, pd->dd);
            }
         }
         else {
            if (DEBUG(DEBUG_DATES)) {
               fprintf(stderr, "Processing candidate date: %4d-%02d-%02d\n", pd->yy, pd->mm, pd->dd);
            }
            
            if (delete_entry) {
               match |= delete_day_info(pd->mm, pd->dd, pd->yy, *ptext_type, *pptext) == PARSE_OK;
            }
            else {
               match |= enter_day_info(pd->mm, pd->dd, pd->yy, *ptext_type, *pptext) == PARSE_OK;
            }
         }
      }
      rtn = match ? PARSE_OK : PARSE_NOMATCH;
   }
   return rtn;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
callq 0xd9e5
testl %eax, %eax
jne 0xd9d6
movl 0x2155d(%rip), %ecx     # 0x2ee80
testl %ecx, %ecx
je 0xd9d1
leaq 0x2155a(%rip), %r13     # 0x2ee8c
leaq 0x1fda3(%rip), %rbp     # 0x2d6dc
movq 0x1b6b0(%rip), %r15     # 0x28ff0
xorl %r12d, %r12d
movl -0x4(%r13), %edx
movl (%rbp), %eax
cmpl $-0x1, %edx
je 0xd975
testb $0x2, %al
jne 0xd9ad
movl -0xc(%r13), %edi
movl -0x8(%r13), %esi
movl -0x4(%r13), %edx
movl (%r14), %ecx
movq (%rbx), %r8
cmpb $0x1, 0x22648(%rip)     # 0x2ffb4
jne 0xd994
callq 0xd68e
jmp 0xd999
testb $0x2, %al
je 0xd99f
movq (%r15), %rdi
movl -0x8(%r13), %eax
leaq 0x12590(%rip), %rsi     # 0x1ff17
movl %ecx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x5210
jmp 0xd99f
callq 0xd3cd
xorl $0x1, %eax
orl %eax, %r12d
movl (%r13), %ecx
addq $0xc, %r13
testl %ecx, %ecx
jne 0xd943
jmp 0xd9c4
movq (%r15), %rdi
movl -0x8(%r13), %r8d
leaq 0x12593(%rip), %rsi     # 0x1ff4e
xorl %eax, %eax
callq 0x5210
jmp 0xd953
xorl %eax, %eax
testl %r12d, %r12d
sete %al
leal (%rax,%rax,2), %eax
jmp 0xd9d6
movl $0x3, %eax
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/writefil.c
// Function: ps_prtday_bw
void ps_prtday_bw (void)
{
   printf("%% print 'day' in 'color' (black, gray, outline, or outline-gray; cf. pcaldefs.h)\n");
   printf("%% using single value in 'dategray' as gray shade\n");
   printf("%%\n");
   printf("/prtday {					%% black and white version\n");
   printf("	gsave\n");
   printf("	day 3 string cvs			%% convert day to string\n");
   printf("	[\n");
   printf("		{ show }				%% black (0)\n");
   printf("		{ dategray setgray show }		%% gray (1)\n");
   printf("		{ true charpath stroke }		%% outline (2)\n");
   printf("		{ true charpath gsave			%% outline-gray (3)\n");
   printf("		  dategray setgray fill\n");
   printf("		  grestore stroke }\n");
   printf("	] color get exec			%% execute operators for color\n");
   printf("	grestore\n");
   printf("} bind def\n\n");
   return;
}

// Assembly:
pushq %rax
leaq 0x11a90(%rip), %rdi     # 0x2005c
xorl %eax, %eax
callq 0x5130
leaq 0x11ad5(%rip), %rdi     # 0x200af
xorl %eax, %eax
callq 0x5130
leaq 0x143fe(%rip), %rdi     # 0x229e6
xorl %eax, %eax
callq 0x5130
leaq 0x11aec(%rip), %rdi     # 0x200e2
xorl %eax, %eax
callq 0x5130
leaq 0x16157(%rip), %rdi     # 0x2475b
callq 0x50b0
leaq 0x11afc(%rip), %rdi     # 0x2010c
xorl %eax, %eax
callq 0x5130
leaq 0x167c5(%rip), %rdi     # 0x24de3
callq 0x50b0
leaq 0x11b10(%rip), %rdi     # 0x2013a
xorl %eax, %eax
callq 0x5130
leaq 0x11b1e(%rip), %rdi     # 0x20156
xorl %eax, %eax
callq 0x5130
leaq 0x11b3a(%rip), %rdi     # 0x20180
xorl %eax, %eax
callq 0x5130
leaq 0x11b58(%rip), %rdi     # 0x201ac
xorl %eax, %eax
callq 0x5130
leaq 0x151a5(%rip), %rdi     # 0x23807
callq 0x50b0
leaq 0x151b3(%rip), %rdi     # 0x23821
callq 0x50b0
leaq 0x11b61(%rip), %rdi     # 0x201db
xorl %eax, %eax
callq 0x5130
leaq 0x16142(%rip), %rdi     # 0x247ca
callq 0x50b0
leaq 0x13731(%rip), %rdi     # 0x21dc5
popq %rax
jmp 0x50b0
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/writefil.c
// Function: print_word
char *print_word (char *p)
{
   char c, buf[STRSIZ];
   int first = TRUE;   /* flag to avoid printing null strings */

   if (*p == '\0' || *(p += strspn(p, WHITESPACE)) == '\0') return NULL;
   
   while ((c = *p) && !isspace(c & CHAR_MSK)) {
      if (c == '%' && p[1] != '\0') {
         p = expand_fmt(buf, p + 1);
         if (*buf && first) {
            printf("(");
            first = FALSE;
         }
         PUTSTR(isalnum, buf, stdout);
      } 
      else {
         if (first) printf("(");
         first = FALSE;
         PUTCHAR(isalnum, c, stdout);
         p++;
      }
   }
   
   if (!first) printf(")");
   
   return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
cmpb $0x0, (%rdi)
je 0x11ffb
movq %rdi, %rbx
leaq 0xd6a6(%rip), %rsi      # 0x1f57e
callq 0x51a0
movb (%rbx,%rax), %r12b
testb %r12b, %r12b
je 0x11ffb
addq %rax, %rbx
callq 0x5340
movq %rax, %r14
movl $0x1, %r15d
movq 0x170be(%rip), %rbp     # 0x28fc0
leaq 0x1150e(%rip), %r13     # 0x23417
movzbl %r12b, %r12d
movq (%r14), %rax
testb $0x20, 0x1(%rax,%r12,2)
jne 0x11fea
cmpl $0x25, %r12d
jne 0x11f9c
cmpb $0x0, 0x1(%rbx)
je 0x11f9c
incq %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x13e41
movq %rax, %rbx
movb (%rsp), %al
testb %al, %al
setne %cl
testl %r15d, %r15d
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x11f5e
movl $0x28, %edi
callq 0x5060
xorl %r15d, %r15d
movb (%rsp), %al
testb %al, %al
je 0x11fde
leaq 0x1(%rsp), %r12
movzbl %al, %edx
movq %r13, %rsi
cmpb $0x20, %al
je 0x11f84
movq (%r14), %rax
testb $0x8, (%rax,%rdx,2)
leaq 0xdf71(%rip), %rsi      # 0x1fef0
je 0x11f84
movq %r13, %rsi
movq (%rbp), %rdi
xorl %eax, %eax
callq 0x5210
movb (%r12), %al
incq %r12
testb %al, %al
jne 0x11f67
jmp 0x11fde
testl %r15d, %r15d
je 0x11fab
movl $0x28, %edi
callq 0x5060
movq (%rbp), %rdi
movq %r13, %rsi
cmpl $0x20, %r12d
je 0x11fce
movq (%r14), %rax
testb $0x8, (%rax,%r12,2)
movq %r13, %rsi
leaq 0xdf26(%rip), %rax      # 0x1fef0
cmoveq %rax, %rsi
xorl %r15d, %r15d
movl %r12d, %edx
xorl %eax, %eax
callq 0x5210
incq %rbx
movb (%rbx), %r12b
testb %r12b, %r12b
jne 0x11f09
testl %r15d, %r15d
jne 0x11ffd
movl $0x29, %edi
callq 0x5060
jmp 0x11ffd
xorl %ebx, %ebx
movq %rbx, %rax
addq $0xc8, %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/writefil.c
// Function: set_rgb
char *set_rgb (char *s)
{
   static char buf[STRSIZ];
   char *p1, *p2;
   double val[3];
   int n;
   
   val[0] = val[1] = val[2] = 0;   /* defaults */
   
   /* extract 1 - 3 floating-point values from string */
   for (n = 1, p1 = s; n <= 3; n++, p1 = p2 + 1) {
      val[n-1] = atof(p1);
      if ((p2 = strchr(p1, RGB_CHAR)) == NULL) break;
   }
   
   /* single value is gray scale; assume anything else is [r g b] */
   if (n > 1) sprintf(buf, "[%.3f %.3f %.3f]", val[0], val[1], val[2]);
   else sprintf(buf, "%.3f", val[0]);

   return buf; 
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl $0x1, %r14d
movq %rbx, %rdi
callq 0x50c0
movsd %xmm0, -0x8(%rsp,%r14,8)
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x5120
testq %rax, %rax
je 0x12064
movq %rax, %rbx
incq %r14
incq %rbx
cmpq $0x4, %r14
jne 0x12032
jmp 0x1206a
cmpq $0x2, %r14
jb 0x12092
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
leaq 0x1df7e(%rip), %rdi     # 0x30000
leaq 0x114b3(%rip), %rsi     # 0x2353c
movb $0x3, %al
callq 0x52f0
jmp 0x120ac
movsd (%rsp), %xmm0
leaq 0x1df62(%rip), %rdi     # 0x30000
leaq 0x4dae(%rip), %rsi      # 0x16e53
movb $0x1, %al
callq 0x52f0
leaq 0x1df4d(%rip), %rax     # 0x30000
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/writefil.c
// Function: write_calfile
void write_calfile (void)
{
   KWD *k;
   int i;
   
   /* look up the Pcal keywords (assumed present) for the -c output file */
   for (k = keywds; k->name; k++) {
      if (k->code == DT_NOTE) kw_note = k->name;
      if (k->code == DT_OPT)  kw_opt  = k->name;
      if (k->code == DT_YEAR) kw_year = k->name;
   }
   
   /* print the date style for subsequent use by Pcal */
   printf("%s -%c\n", kw_opt, date_style == USA_DATES ? F_USA_DATES :
          F_EUR_DATES);
   
   for (i = 0, this_month = init_month, this_year = init_year;
        i < nmonths;
        i++, BUMP_MONTH_AND_YEAR(this_month, this_year)) {
      print_dates(this_month, this_year);
   }

   return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x174e8(%rip), %rax     # 0x29b40
movq (%rax), %rcx
testq %rcx, %rcx
je 0x126a9
addq $0x10, %rax
leaq 0x1d965(%rip), %rdx     # 0x2ffd0
leaq 0x1d96e(%rip), %rsi     # 0x2ffe0
leaq 0x1d95f(%rip), %rdi     # 0x2ffd8
movl -0x8(%rax), %r8d
movq %rdx, %r9
cmpl $0x1, %r8d
je 0x1269a
cmpl $0x4, %r8d
je 0x12697
cmpl $0x2, %r8d
jne 0x1269d
movq %rdi, %r9
jmp 0x1269a
movq %rsi, %r9
movq %rcx, (%r9)
movq (%rax), %rcx
addq $0x10, %rax
testq %rcx, %rcx
jne 0x12679
movq 0x1d928(%rip), %rsi     # 0x2ffd8
leaq 0x1af35(%rip), %rax     # 0x2d5ec
xorl %ecx, %ecx
cmpl $0x0, (%rax)
setne %cl
leal 0x41(,%rcx,4), %edx
leaq 0x10bbf(%rip), %rdi     # 0x2328c
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x5130
leaq 0x1bdb7(%rip), %rax     # 0x2e494
movl (%rax), %edi
movl %edi, 0x1d8df(%rip)     # 0x2ffc4
leaq 0x1bdac(%rip), %rax     # 0x2e498
movl (%rax), %eax
movl %eax, 0x1d8d4(%rip)     # 0x2ffc8
leaq 0x1bda1(%rip), %r14     # 0x2e49c
cmpl $0x0, (%r14)
jle 0x12733
movl 0x1d8c1(%rip), %esi     # 0x2ffc8
callq 0x1273b
movl 0x1d8b2(%rip), %edi     # 0x2ffc4
cmpl $0xc, %edi
jne 0x12724
incl 0x1d8ab(%rip)           # 0x2ffc8
movl $0x1, %edi
jmp 0x12726
incl %edi
incl %ebx
movl %edi, 0x1d896(%rip)     # 0x2ffc4
cmpl (%r14), %ebx
jl 0x12701
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/writefil.c
// Function: print_dates
void print_dates (int month, int year)
{
   register int day;
   year_info *py;
   month_info *pm;
   register day_info *pd;
   unsigned long holidays;
   int has_holiday_text;
   static int save_year = 0;
   
   /* if no text for this year and month, return */
   
   if ((py = find_year(year, FALSE)) == NULL || (pm = py->month[month-1]) == NULL) {
      return;
   }
   
   /* print the year if it has changed */
   
   if (year != save_year) printf("%s %d\n", kw_year, save_year = year);

   /* walk array of day text pointers and linked lists of text */
   
   for (holidays = pm->holidays, day = 1;
        day < FIRST_NOTE_DAY;
        holidays >>= 1L, day++) {
      has_holiday_text = FALSE;
      for (pd = pm->day[day-1]; pd; pd = pd->next) {
         /* Bypass entries that specify an EPS image... */
         if (ci_strncmp(pd->text, "image:", 6) == 0) continue;
         if (date_style == USA_DATES) printf("%02d/%02d", month, day);
         else printf("%02d/%02d", day, month);
#ifdef KEEP_ASTERISKS
         printf(pd->is_holiday ? "*\t" : "\t");
#else
         printf("\t");
#endif
         this_day = day;
         RESET_DATE();   /* reset working date */
         print_text(pd->text);
         printf("\n");
         has_holiday_text |= pd->is_holiday;
      }
#ifdef KEEP_ASTERISKS
      /* was date flagged as holiday w/o associated text? */
      if ((holidays & 01) && !has_holiday_text) {
         if (date_style == USA_DATES) printf("%02d/%02d*\n", month, day);
         else printf("%02d/%02d*\n", day, month);
      }
#endif
   }

   return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %ebx
movl %esi, %edi
xorl %esi, %esi
callq 0xc8d0
testq %rax, %rax
je 0x1284e
movslq %ebx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x1284e
cmpl %ebp, 0x1d95e(%rip)     # 0x300d4
je 0x12795
movq 0x1d861(%rip), %rsi     # 0x2ffe0
movl %ebp, 0x1d94f(%rip)     # 0x300d4
leaq 0x10e4a(%rip), %rdi     # 0x235d6
movl %ebp, %edx
xorl %eax, %eax
callq 0x5130
movl $0x1, %r14d
leaq 0x10bcb(%rip), %r15     # 0x2336d
leaq 0x1ae43(%rip), %rbp     # 0x2d5ec
leaq 0x10e2d(%rip), %r12     # 0x235dd
movq (%rsp), %rax
movq (%rax,%r14,8), %r13
testq %r13, %r13
je 0x12841
movq 0x8(%r13), %rdi
movq %r15, %rsi
movl $0x6, %edx
callq 0xa340
testl %eax, %eax
je 0x12838
cmpl $0x0, (%rbp)
je 0x127e6
movq %r12, %rdi
movl %r14d, %esi
movl %ebx, %edx
jmp 0x127ee
movq %r12, %rdi
movl %ebx, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x5130
movl $0x9, %edi
callq 0x5060
movl %r14d, 0x1d7e2(%rip)    # 0x2ffe8
movl 0x1d7b8(%rip), %eax     # 0x2ffc4
movl %eax, 0x1d7da(%rip)     # 0x2ffec
movl %r14d, 0x1d7d7(%rip)    # 0x2fff0
movl 0x1d7a9(%rip), %eax     # 0x2ffc8
movl %eax, 0x1d7cf(%rip)     # 0x2fff4
movq 0x8(%r13), %rdi
callq 0x1486e
movl $0xa, %edi
callq 0x5060
movq 0x10(%r13), %r13
jmp 0x127b8
incq %r14
cmpq $0x20, %r14
jne 0x127b0
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/writefil.c
// Function: print_html
void print_html (char *p)
{
   char c, buf[STRSIZ];
   
   while ((c = *p) != '\0') {
      if (c == '%' && p[1] != '\0') {
         p = expand_fmt(buf, p + 1);
         PUTSTR_CLEAN(isalnum, buf, stdout);
      }
      else if (c < ' ' || c > '\176') printf("&#%03d;", *p++ & CHAR_MSK);
      else printf("%c", *p++);
   }
   return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r14
leaq 0x1(%rsp), %r12
movq %rsp, %rbx
movq 0x1619b(%rip), %r13     # 0x28fc0
leaq 0x109c1(%rip), %r15     # 0x237ed
movzbl (%r14), %esi
cmpl $0x25, %esi
je 0x12e4f
testl %esi, %esi
je 0x12e95
leal -0x7f(%rsi), %eax
cmpb $-0x60, %al
ja 0x12e89
incq %r14
movq %r15, %rdi
xorl %eax, %eax
callq 0x5130
jmp 0x12e2c
cmpb $0x0, 0x1(%r14)
je 0x12e89
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13e41
movq %rax, %r14
movb (%rsp), %al
testb %al, %al
je 0x12e2c
movq %r12, %rbp
movq (%r13), %rsi
movzbl %al, %edi
callq 0x51c0
movb (%rbp), %al
incq %rbp
testb %al, %al
jne 0x12e71
jmp 0x12e2c
incq %r14
movl %esi, %edi
callq 0x5060
jmp 0x12e2c
addq $0xc8, %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/writefil.c
// Function: select_color
int select_color (void)
{
   int i, min, index = BLACK;
   char count[NUM_COLORS];
   
   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]]++;
   }
   
   /* find smallest non-zero count; set its index and value */
   for (i = 0, min = 99; i < NUM_COLORS; i++) {
      if (count[i] && count[i] < min) min = count[index = i];
   }
   
   /* return least-used color (or pick one if only one color used) */
   return min == 7 ? index == BLACK ? GRAY : BLACK : index;
}

// Assembly:
movl $0x0, -0x4(%rsp)
xorl %eax, %eax
leaq 0x199a6(%rip), %rcx     # 0x2d72c
movsbq (%rcx,%rax), %rdx
incb -0x4(%rsp,%rdx)
incq %rax
cmpq $0x7, %rax
jne 0x13d86
movl $0x63, %edx
xorl %eax, %eax
xorl %ecx, %ecx
movb -0x4(%rsp,%rax), %sil
movsbl %sil, %esi
testb %sil, %sil
setne %dil
cmpl %esi, %edx
setg %r8b
testb %r8b, %dil
cmovnel %esi, %edx
cmovnel %eax, %ecx
incq %rax
cmpq $0x4, %rax
jne 0x13da1
xorl %eax, %eax
testl %ecx, %ecx
sete %al
cmpl $0x7, %edx
cmovnel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mmayer[P]pcal/src/writefil.c
// Function: ordinal_suffix
char *ordinal_suffix (int num)
{
   static char buf[10];
   int tens, units;
   
   /* Select suffix according to rules for target language.  In English,
      the rules are as follows:
      
       tens digit      units digit     suffix
         (any)           0, 4..9        "th"
           1              (any)         "th"
         != 1               1           "st"
         != 1               2           "nd"
         != 1               3           "rd"
   */
   tens = (num / 10) % 10;
   units = num % 10;
   strcpy(buf, ord_suffix[(units > 3 || tens == 1) ? 0 : units]);
   
   return buf;
}

// Assembly:
movslq %edi, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
movl %ecx, %esi
subl %edx, %esi
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
xorl %ecx, %ecx
cmpl $0x1, %esi
cltq
movq %rax, %rdx
cmoveq %rcx, %rdx
cmpl $0x4, %eax
cmovgeq %rcx, %rdx
leaq 0x15c0f(%rip), %rax     # 0x29a40
movq (%rax,%rdx,8), %rsi
leaq 0x1c28c(%rip), %rdi     # 0x300c8
jmp 0x50a0