LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl (%rdi), %r10d
movl 0x4(%rdi), %esi
movl $0xc, %r11d
leaq 0x1e6f0(%rip), %r8      # 0x281b0
movl $0x64, %r9d
movl $0x1, %ebx
movl $0x190, %ebp            # imm = 0x190
testl %esi, %esi
jg 0x9b2f
xorl %eax, %eax
cmpl $0x1, %r10d
leal -0x1(%r10), %edx
sete %al
movl 0x8(%rdi), %ecx
movl %edx, %r10d
cmovel %r11d, %r10d
subl %eax, %ecx
movl %ecx, 0x8(%rdi)
movl %r10d, (%rdi)
movslq %r10d, %rdx
movsbl -0x1(%rdx,%r8), %r14d
xorl $0x2, %edx
movl %ecx, %r15d
andl $0x3, %r15d
xorl %eax, %eax
orl %edx, %r15d
jne 0x9b25
movl %ecx, %eax
cltd
idivl %r9d
movl %ebx, %eax
testl %edx, %edx
jne 0x9b25
movl %ecx, %eax
cltd
idivl %ebp
xorl %eax, %eax
testl %edx, %edx
sete %al
addl %r14d, %esi
addl %eax, %esi
movl %esi, 0x4(%rdi)
jmp 0x9ad0
movl $0x1, %r11d
movl $0x190, %ebx            # imm = 0x190
movslq %r10d, %rcx
movsbl -0x1(%rcx,%r8), %ebp
xorl %eax, %eax
cmpl $0x2, %ecx
jne 0x9b6b
movl 0x8(%rdi), %ecx
testb $0x3, %cl
jne 0x9b6b
movl %ecx, %eax
cltd
idivl %r9d
movl %r11d, %eax
testl %edx, %edx
jne 0x9b6b
movl %ecx, %eax
cltd
idivl %ebx
xorl %eax, %eax
testl %edx, %edx
sete %al
addl %ebp, %eax
subl %eax, %esi
jle 0x9b8f
movl %esi, 0x4(%rdi)
xorl %eax, %eax
cmpl $0xc, %r10d
leal 0x1(%r10), %ecx
cmovel %r11d, %ecx
sete %al
addl %eax, 0x8(%rdi)
movl %ecx, (%rdi)
movl %ecx, %r10d
jmp 0x9b3a
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x28, %rsp
movq %rdx, %r12
leal -0x7(%rsi), %eax
cmpl $0xa, %eax
ja 0x9e67
movq %r12, 0x18(%rsp)
movl %eax, %eax
leaq 0x1e397(%rip), %rcx     # 0x281e0
movl %edi, %r12d
sarl $0x1f, %r12d
movl %edi, %r13d
negl %r13d
cmovsl %edi, %r13d
testl %edi, %edi
js 0x9e88
movaps 0x1368b(%rip), %xmm0    # 0x1d4f0
jmp 0x9e90
imull $0x7, %edi, %ebx
testl %edi, %edi
js 0x9f12
pushq $0x1
popq %r14
movl %r14d, %edi
movl %r14d, %edx
callq 0x9b96
pushq $-0x7
jmp 0x9f23
movsd 0x13650(%rip), %xmm0    # 0x1d4e0
movq (%rcx,%rax,8), %rax
movq %rax, 0x20(%rsp)
orl $0x1, %r12d
leaq 0x2372c(%rip), %rax     # 0x2d5d0
movl (%rax), %ebp
leaq 0x8(%rsp), %rax
movlps %xmm0, (%rax)
movl %ebp, 0x8(%rax)
movl %ebp, %r14d
cmpl %ebp, %r14d
jne 0x9f0b
movl 0x8(%rsp), %edi
movl 0xc(%rsp), %r15d
movl %r15d, %esi
movl %ebp, %edx
callq *0x20(%rsp)
leal -0x1(%r13), %ebx
testl %eax, %eax
je 0x9ed7
testl %ebx, %ebx
je 0x9f02
testl %eax, %eax
cmovel %r13d, %ebx
addl %r12d, %r15d
movl %r15d, 0xc(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x9aa7
movl 0x10(%rsp), %r14d
leaq 0x236d5(%rip), %rax     # 0x2d5d0
movl (%rax), %ebp
movl %ebx, %r13d
jmp 0x9eb4
leaq 0x236c7(%rip), %rax     # 0x2d5d0
movl (%rax), %ebp
movq 0x18(%rsp), %r12
jmp 0x9f4d
pushq $-0x1
popq %rdi
pushq $0xc
popq %r14
movl %r14d, %edx
callq 0x9b96
pushq $0x7
popq %rcx
addl %eax, %ecx
addl %ecx, %ebx
leaq 0x236a1(%rip), %rax     # 0x2d5d0
movl (%rax), %ebp
leaq 0x8(%rsp), %r15
movl %r14d, (%r15)
movl %ebx, 0x4(%r15)
movl %ebp, 0x8(%r15)
movq %r15, %rdi
callq 0x9aa7
movl 0x8(%r15), %r14d
xorl %eax, %eax
cmpl %ebp, %r14d
jne 0x9f69
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r12)
movq 0x8(%rsp), %rax
movq %rax, (%r12)
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movl %edx, %ecx
movslq %edi, %rax
leaq 0x1e22c(%rip), %rdx     # 0x281b0
movsbl -0x1(%rax,%rdx), %r8d
xorl $0x2, %eax
movl %ecx, %edx
andl $0x3, %edx
xorl %edi, %edi
orl %eax, %edx
movl $0x0, %eax
jne 0x9fc3
pushq $0x64
popq %r9
movl %ecx, %eax
cltd
idivl %r9d
testl %edx, %edx
je 0x9fb0
pushq $-0x1
popq %rax
jmp 0x9fc3
movl $0x190, %r9d            # imm = 0x190
movl %ecx, %eax
cltd
idivl %r9d
xorl %eax, %eax
cmpl $0x1, %edx
sbbl %eax, %eax
cmpl $0x1, %esi
movl $0x0, %ecx
sbbl %ecx, %ecx
orl %esi, %ecx
leaq 0x1e5c6(%rip), %rdx     # 0x2859c
xorl %esi, %esi
cmpl %edi, (%rdx)
sete %sil
subl %r8d, %eax
leal (%rax,%rsi,2), %edx
leal (%rax,%rsi,2), %eax
addl $0x47, %eax
leal 0x1f(%rcx), %esi
testl %ecx, %ecx
leal 0x48(%rcx,%rdx), %ecx
cmovgl %esi, %ecx
cmpl %eax, %ecx
movl %ecx, %eax
cmovgl %edi, %eax
cmpl $0x20, %ecx
cmovll %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movl %edi, %r14d
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x9d79
leaq 0x225b4(%rip), %rcx     # 0x2c5d8
movl (%rcx), %ecx
negl %ecx
addl %ecx, %eax
addl $0x7, %eax
pushq $0x7
popq %rcx
cltd
idivl %ecx
leaq 0x1e562(%rip), %rax     # 0x2859c
movslq (%rax), %rax
leaq 0x1e55c(%rip), %rcx     # 0x285a0
leaq 0x1e565(%rip), %rsi     # 0x285b0
movl (%rsi,%rax,4), %esi
leal 0x7(%rdx), %edi
cmpl %edx, %esi
movl %edx, %r8d
cmovel %edi, %r8d
movl (%rcx,%rax,4), %eax
cmpl %edx, %eax
cmovel %edi, %r8d
xorl %ecx, %ecx
cmpl $0x1, %esi
sete %cl
cmpl $0x1, %eax
adcl %r15d, %ecx
addl $-0x20, %ecx
cmpl %r8d, %ecx
jl 0xa0bb
movslq %r14d, %rax
leaq 0x1e12d(%rip), %rdx     # 0x281b0
movsbl -0x1(%rax,%rdx), %esi
xorl $0x2, %r14d
movl %ebx, %edx
andl $0x3, %edx
xorl %eax, %eax
orl %r14d, %edx
jne 0xa0b7
pushq $0x64
popq %rdi
movl %ebx, %eax
cltd
idivl %edi
movl %ebp, %eax
testl %edx, %edx
jne 0xa0b7
movl $0x190, %edi            # imm = 0x190
movl %ebx, %eax
cltd
idivl %edi
xorl %eax, %eax
testl %edx, %edx
sete %al
addl %esi, %ecx
addl %eax, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mmayer[P]pcal/src/pcalutil.c
// Function: century
int century (void)
{
   static int this_century = -1;
   struct tm *p_tm;
   time_t tmp;
   
   if (this_century < 0) {   /* calculate first time only */
      time(&tmp);
      p_tm = localtime(&tmp);
      this_century = ((TM_YEAR + p_tm->tm_year) / 100) * 100;
   }
   
   return this_century;
}

// Assembly:
movl 0x1faf2(%rip), %ecx     # 0x29bc0
testl %ecx, %ecx
jns 0xa10a
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5220
movq %rbx, %rdi
callq 0x5070
movl 0x14(%rax), %ecx
addl $0x76c, %ecx            # imm = 0x76C
pushq $0x64
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
subl %edx, %ecx
movl %ecx, 0x1fabb(%rip)     # 0x29bc0
addq $0x10, %rsp
popq %rbx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdi, %rax
movq (%rsi), %rcx
testq %rcx, %rcx
jne 0xa27f
jmp 0xa2b2
movq %rdi, %r8
cmpq %rdi, %rax
je 0xa279
cmpb $0x20, -0x1(%rax)
je 0xa276
movb %dl, (%rax)
incq %rax
movq %rax, %r8
incq %rcx
movq %r8, %rax
movzbl (%rcx), %edx
cmpl $0x20, %edx
je 0xa263
testl %edx, %edx
jne 0xa271
cmpq %rdi, %rax
jbe 0xa29c
leaq -0x1(%rax), %rcx
cmpb $0x20, -0x1(%rax)
cmoveq %rcx, %rax
cmpq $0x0, 0x8(%rsi)
leaq 0x8(%rsi), %rsi
setne %cl
shlb $0x5, %cl
movb %cl, (%rax)
incq %rax
jmp 0xa259
retq
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x0, 0x4(%rsp)
pushq $0x1
popq %r13
cmpl $0x4, %r13d
je 0xa351
cmpl $0x2, %r13d
movq %rbx, %rbp
cmoveq %r14, %rbp
cmpl $0x1, %r13d
cmoveq %r15, %rbp
testq %rbp, %rbp
je 0xa30e
cmpb $0x0, (%r12)
je 0xa309
incl 0x4(%rsp)
movq %r12, %rdi
callq 0x52c0
jmp 0xa30b
xorl %eax, %eax
movl %eax, (%rbp)
movsbq (%r12), %rbp
testq %rbp, %rbp
je 0xa334
callq 0x5330
movq (%rax), %rax
testb $0x8, 0x1(%rax,%rbp,2)
je 0xa334
incq %r12
jmp 0xa30e
movb 0x1(%r12), %bpl
incq %r12
testb %bpl, %bpl
je 0xa34c
callq 0x5330
movq (%rax), %rax
movsbq %bpl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0xa32c
incl %r13d
jmp 0xa2d6
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_O2/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
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x5150
leaq -0x1(%rbx), %rcx
testq %rax, %rax
cmovneq %rax, %rcx
movb $0x0, 0x1(%rcx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mmayer[P]pcal/src/pcalutil.c
// Function: mk_filespec
char *mk_filespec (char *filespec, char *path, char *name)
{
   char *p;
   
   *filespec = '\0';
   
   /* copy name intact if absolute; else merge path and relative name */
   
   /* if name starts with "~/", translate it for user */
   if (strncmp(name, "~/", 2) == 0 && (p = getenv(HOME_DIR)) != NULL) {
      strcpy(filespec, p);
      TERM_PATH(filespec);
      name += 2;   /* skip "~/" */
   }
   else if (*name != START_PATH) {   /* relative path */
      /* if path starts with "~/", translate it for user */
      if (strncmp(path, "~/", 2) == 0 && (p = getenv(HOME_DIR)) != NULL) {
         strcpy(filespec, p);
         TERM_PATH(filespec);
         path += 2;   /* skip "~/"; append rest below */
      }
      strcat(filespec, path);
      TERM_PATH(filespec);
   }
   
   return strcat(filespec, name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movb $0x0, (%rdi)
movzbl (%rdx), %eax
cmpl $0x2f, %eax
je 0xa9a8
movq %rsi, %r15
cmpl $0x7e, %eax
jne 0xa936
cmpb $0x2f, 0x1(%rbx)
jne 0xa936
leaq 0xa804(%rip), %rdi      # 0x15102
callq 0x5040
testq %rax, %rax
je 0xa936
movq %r14, %rdi
movq %rax, %rsi
callq 0x50a0
cmpb $0x0, (%r14)
je 0xa930
movq %r14, %rdi
callq 0x5100
cmpb $0x2f, -0x1(%r14,%rax)
je 0xa930
movw $0x2f, (%r14,%rax)
addq $0x2, %rbx
jmp 0xa9a8
cmpb $0x7e, (%r15)
jne 0xa980
cmpb $0x2f, 0x1(%r15)
jne 0xa980
leaq 0xa7b8(%rip), %rdi      # 0x15102
callq 0x5040
testq %rax, %rax
je 0xa980
movq %r14, %rdi
movq %rax, %rsi
callq 0x50a0
cmpb $0x0, (%r14)
je 0xa97c
movq %r14, %rdi
callq 0x5100
cmpb $0x2f, -0x1(%r14,%rax)
je 0xa97c
movw $0x2f, (%r14,%rax)
addq $0x2, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x52d0
cmpb $0x0, (%r14)
je 0xa9a8
movq %r14, %rdi
callq 0x5100
cmpb $0x2f, -0x1(%r14,%rax)
je 0xa9a8
movw $0x2f, (%r14,%rax)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x52d0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2f
popq %rsi
callq 0x5120
testq %rax, %rax
jne 0xaae1
leaq 0x12b5b(%rip), %rdi     # 0x1d53f
callq 0x5040
testq %rax, %rax
je 0xaae1
movq %rax, %r14
movq %rax, %rdi
callq 0x5100
leal 0x1(%rax), %edi
callq 0x95e4
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
callq 0x50a0
pushq $0x3a
popq %rbp
leaq 0x22d13(%rip), %r15     # 0x2d730
leaq 0x8(%rsp), %r12
movq %r13, (%rsp)
movq %r13, %r14
cmpb $0x0, (%r14)
je 0xaad8
movq %r14, %rdi
movl %ebp, %esi
callq 0x5120
testq %rax, %rax
je 0xaa4d
movq %rax, %r13
incq %r13
movb $0x0, (%rax)
jmp 0xaa5b
movq %r14, %rdi
callq 0x5100
movq %rax, %r13
addq %r14, %r13
movb $0x0, 0x22cce(%rip)     # 0x2d730
cmpb $0x2e, (%r14)
jne 0xaa6f
cmpb $0x0, 0x1(%r14)
je 0xaa89
movq %r15, %rdi
movq %r14, %rsi
callq 0x52d0
movq %r15, %rdi
callq 0x5100
movw $0x2f, (%rax,%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x52d0
movq %r15, %rdi
movq %r12, %rsi
callq 0x5210
movq %r13, %r14
testl %eax, %eax
js 0xaa29
movl 0x20(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
movq %r13, %r14
cmpl $0x8000, %eax           # imm = 0x8000
jne 0xaa29
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x5270
movq %r13, %r14
testl %eax, %eax
jne 0xaa29
movq %r15, %rbx
movq (%rsp), %rdi
callq 0x5050
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
xorl %r14d, %r14d
leaq 0x1d667(%rip), %r12     # 0x287f0
pushq $-0x1
popq %rbx
pushq $0x3
popq %rbp
movq (%r12,%r14), %rsi
testq %rsi, %rsi
je 0xb1ba
movq %r15, %rdi
movl %ebp, %edx
callq 0x9665
testl %eax, %eax
je 0xb1ac
addq $0x18, %r14
jmp 0xb18f
pushq $0x18
popq %rcx
movq %r14, %rax
cqto
idivq %rcx
movq %rax, %rbx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xb7a5
cmpl $-0x1, %eax
je 0xb238
movslq %eax, %r14
leaq 0x22941(%rip), %r15     # 0x2db40
movq (%r15,%r14,8), %rdi
testq %rdi, %rdi
je 0xb212
callq 0x5050
andq $0x0, (%r15,%r14,8)
testq %rbx, %rbx
je 0xb23d
movq %rbx, %rdi
callq 0x5100
leal 0x1(%rax), %edi
callq 0x95e4
movq %rax, (%r15,%r14,8)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x50a0
jmp 0xb242
pushq $-0x1
popq %rax
jmp 0xb244
andq $0x0, (%r15,%r14,8)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x22151(%rip), %r14     # 0x2d820
leaq 0x2246a(%rip), %r15     # 0x2db40
cmpq $0x320, %rbx            # imm = 0x320
je 0xb70b
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0xb6f2
callq 0x5050
andq $0x0, (%rbx,%r14)
movq (%rbx,%r15), %rdi
testq %rdi, %rdi
je 0xb705
callq 0x5050
andq $0x0, (%rbx,%r15)
addq $0x8, %rbx
jmp 0xb6d6
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x20b6d(%rip), %rax     # 0x2c290
movq (%rax), %rbx
testq %rbx, %rbx
je 0xb792
movq 0x68(%rbx), %rax
movq %rax, (%rsp)
xorl %r13d, %r13d
cmpq $0xc, %r13
je 0xb784
movq 0x8(%rbx,%r13,8), %r14
testq %r14, %r14
je 0xb77f
xorl %ebp, %ebp
cmpq $0x2d, %rbp
je 0xb777
movq 0x8(%r14,%rbp,8), %r15
testq %r15, %r15
je 0xb772
movq 0x8(%r15), %rdi
movq 0x10(%r15), %r12
callq 0x5050
movq %r15, %rdi
callq 0x5050
movq %r12, %r15
jmp 0xb753
incq %rbp
jmp 0xb748
movq %r14, %rdi
callq 0x5050
incq %r13
jmp 0xb736
movq %rbx, %rdi
callq 0x5050
movq (%rsp), %rbx
jmp 0xb726
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb6c1
// File: /workspace/github_c_makefile_star2_O2/mmayer[P]pcal/src/readfile.c
// Function: find_sym_name
int find_sym_name (char *sym)
{
   int i;
   
   if (!sym) return PP_SYM_UNDEF;
   
   for (i = 0; i < MAX_PP_SYMS; i++) {
      if (pp_sym[i] && ci_strcmp(pp_sym[i], sym) == 0) return i;
   }
   
   return PP_SYM_UNDEF;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbx
testq %rdi, %rdi
je 0xb7e9
movq %rdi, %r14
leaq 0x22061(%rip), %r12     # 0x2d820
xorl %r15d, %r15d
cmpq $0x64, %r15
je 0xb7e9
movq (%r12), %rdi
testq %rdi, %rdi
je 0xb7dd
movq %r14, %rsi
callq 0x9624
testl %eax, %eax
je 0xb7e6
incq %r15
addq $0x8, %r12
jmp 0xb7c2
movl %r15d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xb875
movq %rdi, %rbx
leaq 0x20ea7(%rip), %rax     # 0x2c6cc
testb $0x20, (%rax)
jne 0xb882
movq %rbx, %rdi
callq 0x8c01
testl %eax, %eax
jne 0xb87a
xorl %eax, %eax
leaq 0x21fe1(%rip), %r14     # 0x2d820
cmpq $0x64, %rax
je 0xb89f
leaq 0x1(%rax), %r15
cmpq $0x0, (%r14,%rax,8)
movq %r15, %rax
jne 0xb83f
movq %rbx, %rdi
callq 0x5100
leal 0x1(%rax), %edi
callq 0x95e4
movq %rax, -0x8(%r14,%r15,8)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x50a0
jmp 0xb87a
callq 0xb6c1
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x1c76f(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
leaq 0x125bb(%rip), %rsi     # 0x1de4e
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5200
jmp 0xb82a
movq 0x1c752(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
leaq 0x12573(%rip), %rsi     # 0x1de23
leaq 0x20f69(%rip), %rdx     # 0x2c820
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5200
jmp 0xb87a
// File: /workspace/github_c_makefile_star2_O2/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 0xb921
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x20df6(%rip), %rax     # 0x2c6cc
testb $0x20, (%rax)
jne 0xb924
movq %rbx, %rdi
callq 0xb7a5
cmpl $-0x1, %eax
je 0xb91a
movslq %eax, %rbx
leaq 0x2224e(%rip), %r14     # 0x2db40
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0xb905
callq 0x5050
andq $0x0, (%r14,%rbx,8)
leaq 0x21f14(%rip), %r14     # 0x2d820
movq (%r14,%rbx,8), %rdi
callq 0x5050
andq $0x0, (%r14,%rbx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
movq 0x1c6cd(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
leaq 0x12517(%rip), %rsi     # 0x1de4c
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5200
jmp 0xb8db
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x208af(%rip), %rax     # 0x2c290
xorl %r14d, %r14d
movq (%rax), %r15
testq %r15, %r15
je 0xba01
cmpl %ebx, (%r15)
jge 0xb9fa
leaq 0x68(%r15), %rax
movq %r15, %r14
jmp 0xb9e4
jne 0xba01
movq %r15, %rax
jmp 0xba3f
testl %esi, %esi
je 0xba34
pushq $0x70
popq %rdi
callq 0x95e4
movl %ebx, (%rax)
pushq $0x1
popq %rcx
cmpq $0xd, %rcx
je 0xba22
andq $0x0, (%rax,%rcx,8)
incq %rcx
jmp 0xba12
movq %r15, 0x68(%rax)
testq %r14, %r14
jne 0xba38
leaq 0x2085e(%rip), %r14     # 0x2c290
jmp 0xba3c
xorl %eax, %eax
jmp 0xba3f
addq $0x68, %r14
movq %rax, (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mmayer[P]pcal/src/readfile.c
// Function: find_easter
int find_easter (date_str *pdate)   /* pointer into date array */
{
#define METONIC 19   /* length of metonic cycle */

   /* Easter is defined as the Sunday after the full moon on or after March
      21.  You could express that as "1st Sun after 1st full_moon ooa 21st day
      in March" instead of using this routine, but depending on your timezone
      your full moon might not fall on the same day as the "official" one.
   */

   date_str *sv_pdate = pdate;
   register int epact, fm;
   int golden, century, nleap;
   
   golden = curr_year % METONIC + 1;
   century = curr_year / 100 + 1;
   nleap = 3 * century / 4 - 12;
   
   /* correct for moon's orbit */
   epact = (11 * golden + 20 + (8 * century + 5) / 25 - 5 - nleap) % 30;
   if (epact < 0) epact += 30;
   if ((epact == 25 && golden > 11) || epact == 24) ++epact;
   
   /* find full moon on or after 3/21 */
   fm = 44 - epact;
   if (fm < 21) fm += 30;
   
   /* find date of following Sunday */
   fm += 7 - ((int)(5L * curr_year / 4) - nleap - 10 + fm) % 7;
   
   /* add Easter to date array (adjust if in April) */
   ADD_DATE(fm <= 31 ? MAR : APR, fm <= 31 ? fm : fm - 31, curr_year);
   
   /* return number of dates added (always 1 in this routine) */
   return pdate - sv_pdate;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x21ad8(%rip), %r14     # 0x2d5d0
movslq (%r14), %r9
pushq $0x13
popq %rcx
movl %r9d, %eax
cltd
idivl %ecx
movl %edx, %edi
pushq $0x64
popq %rcx
movl %r9d, %eax
cltd
idivl %ecx
movl %eax, %r8d
leal (%r8,%r8,2), %eax
addl $0x3, %eax
pushq $-0x4
popq %rcx
cltd
idivl %ecx
movl %eax, %esi
imull $0xb, %edi, %ecx
leal 0xd(,%r8,8), %eax
pushq $0x19
popq %r8
cltd
idivl %r8d
addl %ecx, %eax
addl %esi, %eax
addl $0x26, %eax
pushq $0x1e
popq %rcx
cltd
idivl %ecx
leal 0x1e(%rdx), %eax
testl %edx, %edx
cmovnsl %edx, %eax
cmpl $0x19, %eax
sete %cl
cmpl $0xb, %edi
setge %dl
andb %cl, %dl
cmpl $0x18, %eax
sete %cl
orb %dl, %cl
movzbl %cl, %ecx
addl %eax, %ecx
cmpl $0x18, %ecx
pushq $0x4a
popq %rax
pushq $0x2c
popq %rdi
cmovael %eax, %edi
subl %ecx, %edi
leaq (%r9,%r9,4), %rax
pushq $0x4
popq %rcx
cqto
idivq %rcx
addl %esi, %eax
addl $0xc, %eax
leal -0xa(%rdi,%rax), %eax
pushq $0x7
popq %rcx
cltd
idivl %ecx
movl %edi, %r15d
subl %edx, %r15d
negl %edx
leal (%rdi,%rdx), %ebp
addl $0x7, %ebp
leaq 0x20b2a(%rip), %rax     # 0x2c6cc
testb $0x2, (%rax)
jne 0xbbd3
leal -0x18(%r15), %r12d
xorl %eax, %eax
cmpl $0x19, %r15d
cmovll %ebp, %r12d
setge %al
addl $0x3, %eax
movl %eax, (%rbx)
movl %r12d, 0x4(%rbx)
movl (%r14), %eax
movl %eax, 0x8(%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x1c41e(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
leal -0x18(%r15), %r12d
xorl %ecx, %ecx
cmpl $0x19, %r15d
setge %cl
movl %r12d, %r8d
cmovll %ebp, %r8d
addl $0x3, %ecx
leaq 0x12260(%rip), %rsi     # 0x1de5b
movl %r9d, %edx
xorl %eax, %eax
callq 0x5200
jmp 0xbbab
// File: /workspace/github_c_makefile_star2_O2/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 %r15d, %r15d
testb $0x3, %bl
jne 0xbc3b
pushq $0x64
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
testl %edx, %edx
je 0xbc28
pushq $0x1
popq %r15
jmp 0xbc3b
movl $0x190, %ecx            # imm = 0x190
movl %ebx, %eax
cltd
idivl %ecx
xorl %r15d, %r15d
testl %edx, %edx
sete %r15b
leal -0x1(%rbx), %eax
pushq $0x13
popq %rcx
cltd
idivl %ecx
imull $0x13, %edx, %eax
addl $0x22, %eax
cwtd
movw $0x1e, %cx
idivw %cx
movswl %dx, %r14d
pushq $0x1
popq %rdi
movl %edi, %esi
movl %ebx, %edx
callq 0x9d79
addl %r14d, %r15d
addl %r15d, %eax
addl $0x5c, %eax
pushq $0x7
popq %rcx
cltd
idivl %ecx
leal 0xa(%r14), %eax
addl $-0x3, %r14d
cmpl $0x784, %ebx            # imm = 0x784
cmovgel %eax, %r14d
subl %edx, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2192f(%rip), %r15     # 0x2d5d0
movl (%r15), %edi
callq 0xbc07
movl %eax, %r14d
testl %eax, %eax
jle 0xbcc7
leal -0x1e(%r14), %eax
cmpl $0x1f, %r14d
cmovbl %r14d, %eax
pushq $0x4
popq %rbp
sbbl $-0x1, %ebp
movl %eax, %r14d
jmp 0xbcce
addl $0x1f, %r14d
pushq $0x3
popq %rbp
leaq 0x209f7(%rip), %rax     # 0x2c6cc
testb $0x2, (%rax)
jne 0xbcf4
movl %ebp, (%rbx)
movl %r14d, 0x4(%rbx)
movl (%r15), %eax
movl %eax, 0x8(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x1c2fd(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
movl (%r15), %edx
leaq 0x12153(%rip), %rsi     # 0x1de5b
movl %ebp, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x5200
jmp 0xbcda
// File: /workspace/github_c_makefile_star2_O2/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 0x218a9(%rip), %r15     # 0x2d5d0
movl (%r15), %edi
callq 0xbc07
cmpl $0x17, %eax
jl 0xbd6a
leal 0x1(%rax), %ecx
leal -0x1d(%rax), %ebp
cmpl $0x1e, %eax
cmovbl %ecx, %ebp
pushq $0x4
popq %r14
sbbl $-0x1, %r14d
leaq 0x2097d(%rip), %rax     # 0x2c6cc
testb $0x2, (%rax)
je 0xbd7d
movq 0x1c29d(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
movl (%r15), %edx
leaq 0x120f3(%rip), %rsi     # 0x1de5b
jmp 0xbdb2
leaq 0x2095b(%rip), %rax     # 0x2c6cc
testb $0x2, (%rax)
jne 0xbd97
pushq $0x17
popq %rbp
pushq $0x4
popq %r14
movl %r14d, (%rbx)
movl %ebp, 0x4(%rbx)
movl (%r15), %eax
movl %eax, 0x8(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x1c25a(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
movl (%r15), %edx
leaq 0x120b0(%rip), %rsi     # 0x1de5b
pushq $0x4
popq %r14
pushq $0x17
popq %rbp
movl %r14d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x5200
jmp 0xbd7d
// File: /workspace/github_c_makefile_star2_O2/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 0x217fe(%rip), %r15     # 0x2d5d0
movl (%r15), %edi
callq 0xbc07
cmpl $0x19, %eax
jl 0xbe15
leal 0x2(%rax), %ecx
leal -0x1c(%rax), %ebp
cmpl $0x1d, %eax
cmovbl %ecx, %ebp
pushq $0x4
popq %r14
sbbl $-0x1, %r14d
leaq 0x208d2(%rip), %rax     # 0x2c6cc
testb $0x2, (%rax)
je 0xbe28
movq 0x1c1f2(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
movl (%r15), %edx
leaq 0x12048(%rip), %rsi     # 0x1de5b
jmp 0xbe5d
leaq 0x208b0(%rip), %rax     # 0x2c6cc
testb $0x2, (%rax)
jne 0xbe42
pushq $0x19
popq %rbp
pushq $0x4
popq %r14
movl %r14d, (%rbx)
movl %ebp, 0x4(%rbx)
movl (%r15), %eax
movl %eax, 0x8(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x1c1af(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
movl (%r15), %edx
leaq 0x12005(%rip), %rsi     # 0x1de5b
pushq $0x4
popq %r14
pushq $0x19
popq %rbp
movl %r14d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x5200
jmp 0xbe28
// File: /workspace/github_c_makefile_star2_O2/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 0xbeab
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
callq 0xbf4e
testl %eax, %eax
je 0xbf1a
testl %r14d, %r14d
je 0xbeaf
movq %rbx, %rdi
callq 0xbf4e
cmpl $0x4, %eax
jne 0xbeaf
pushq $0xd
popq %rax
jmp 0xbf3f
pushq $-0x1
popq %rax
retq
testl %ebp, %ebp
je 0xbec6
callq 0x5330
movq (%rax), %rax
movsbq (%rbx), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0xbf26
xorl %r12d, %r12d
pushq $0xd
popq %r14
leaq 0x2192c(%rip), %r13     # 0x2d800
leaq 0x1dd55(%rip), %rbp     # 0x29c30
cmpq $0xc, %r12
je 0xbf31
movslq (%r13), %rax
imulq $0x60, %rax, %rax
addq %rbp, %rax
movq (%rax,%r12,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 0x9665
testl %eax, %eax
je 0xbf1e
incq %r12
jmp 0xbedb
xorl %eax, %eax
jmp 0xbf3f
incl %r12d
movl %r12d, %r14d
jmp 0xbf31
movq %rbx, %rdi
callq 0x52c0
movl %eax, %r14d
leal -0x1(%r14), %eax
cmpl $0xc, %eax
pushq $-0x1
popq %rax
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_O2/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:
pushq $-0x1
popq %rax
testq %rdi, %rdi
je 0xc070
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
testl %esi, %esi
je 0xbffd
pushq $0x7
popq %rbx
leaq 0x1c7bd(%rip), %r12     # 0x28780
cmpq $0xe, %rbx
je 0xbfeb
movq (%r12,%rbx,8), %r15
movq %r15, %rdi
callq 0x5100
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x9665
testl %eax, %eax
je 0xc056
incq %rbx
jmp 0xbfc3
movq %r14, %rdi
callq 0xc071
cmpl $-0x1, %eax
je 0xbffd
addl $0xe, %eax
jmp 0xc062
leaq 0x1e52c(%rip), %rbp     # 0x2a530
xorl %r13d, %r13d
leaq 0x217f2(%rip), %rbx     # 0x2d800
cmpq $0x7, %r13
je 0xc05a
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 0x9665
testl %eax, %eax
je 0xc05f
incq %r13
addq $0x14, %rbp
jmp 0xc00e
movl %ebx, %eax
jmp 0xc062
pushq $-0x1
popq %rax
jmp 0xc062
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_O2/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 0xc17c
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5330
movsbq (%r14), %r12
cmpq $0x2d, %r12
je 0xc114
movq (%rax), %rax
movzwl (%rax,%r12,2), %eax
andl $0x800, %eax            # imm = 0x800
jne 0xc114
leaq 0x1c7f0(%rip), %r15     # 0x288e0
addq $0xc, %r15
pushq $0x4
popq %rbp
movq -0xc(%r15), %rsi
testq %rsi, %rsi
je 0xc173
movq %r14, %rdi
movl %ebp, %edx
callq 0x9665
testl %eax, %eax
je 0xc173
addq $0x10, %r15
jmp 0xc0f7
movq %r14, %rdi
callq 0x52c0
testl %eax, %eax
je 0xc17c
movl %eax, %r15d
xorl %eax, %eax
cmpb $0x2d, %r12b
sete %al
addq %rax, %r14
leaq 0x8d72(%rip), %rsi      # 0x14ea8
movq %r14, %rdi
callq 0x5190
movq %rax, %r12
addq %r14, %r12
leaq 0x1c8e5(%rip), %r14     # 0x28a30
movq (%r14), %rsi
testq %rsi, %rsi
je 0xc17c
movq %r12, %rdi
callq 0x9624
addq $0x8, %r14
testl %eax, %eax
jne 0xc14b
movl %r15d, (%rbx)
sarl $0x1f, %r15d
orl $0x1, %r15d
movl %r15d, %ebp
jmp 0xc17c
movl (%r15), %eax
movl %eax, (%rbx)
movl -0x4(%r15), %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rdi, %r15
xorl %r14d, %r14d
leaq 0x1c790(%rip), %r13     # 0x28970
pushq $-0x1
popq %rbx
movq (%r13,%r14), %r12
testq %r12, %r12
je 0xc21a
movq %r12, %rdi
callq 0x5100
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x9665
testl %eax, %eax
je 0xc20c
addq $0x18, %r14
jmp 0xc1e3
pushq $0x18
popq %rcx
movq %r14, %rax
cqto
idivq %rcx
movq %rax, %rbx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0xbf9b
cmpl $-0x1, %eax
je 0xc24c
movl %eax, (%r14)
pushq $0x9
jmp 0xc27d
movq %rbx, %rdi
callq 0xc1ca
cmpl $-0x1, %eax
je 0xc260
movl %eax, (%r14)
pushq $0xa
jmp 0xc27d
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0xc0b2
testl %eax, %eax
je 0xc288
movl %eax, (%r14)
movl 0xc(%rsp), %eax
movl %eax, (%r15)
pushq $0x8
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x5330
movq (%rax), %r15
movsbq (%rbx), %rax
testb $0x8, 0x1(%r15,%rax,2)
jne 0xc2c1
movq %rbx, %rdi
callq 0xbf4e
cmpl $-0x1, %eax
jne 0xc27e
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xbe6c
cmpl $-0x1, %eax
je 0xc309
movl %eax, (%r14)
pushq $0x5
jmp 0xc27d
leaq 0x8be0(%rip), %rsi      # 0x14ea8
movq %rbx, %rdi
callq 0x5190
movsbq (%rbx,%rax), %rdx
testq %rdx, %rdx
je 0xc302
movq %rax, %rcx
leaq 0x202f8(%rip), %rsi     # 0x2c5dc
pushq $0x6
popq %rax
cmpl $0x1, (%rsi)
jne 0xc27e
testb $0x4, (%r15,%rdx,2)
je 0xc27e
xorl %eax, %eax
cmpb $0x1, 0x1(%rbx,%rcx)
adcl $0x6, %eax
jmp 0xc27e
pushq $0x7
jmp 0xc27d
pushq $-0x1
jmp 0xc27d
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
cmpl $0xd, %edi
je 0xc846
movl %edi, %r14d
testl %edi, %edi
jne 0xc8a9
addq $0x8, %rbx
xorl %r12d, %r12d
pushq $0x1
popq %r14
leaq 0x20d78(%rip), %r13     # 0x2d5d0
pushq $0x2
popq %r15
cmpl $0xd, %r14d
je 0xc88f
movl (%r13), %edx
movl %r14d, %edi
movl %ebp, %esi
callq 0x9f78
movl (%r13), %edx
movl %r14d, %edi
movl %eax, %esi
movl %r15d, %ecx
movq %rbx, %r8
callq 0xc310
xorl $0x1, %eax
orl %eax, %r12d
incl %r14d
jmp 0xc85c
xorl %eax, %eax
testl %r12d, %r12d
sete %al
leal (%rax,%rax,2), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20d20(%rip), %r15     # 0x2d5d0
movl (%r15), %edx
movl %r14d, %edi
movl %ebp, %esi
callq 0x9f78
movl (%r15), %edx
addq $0x8, %rbx
pushq $0x2
popq %rcx
movl %r14d, %edi
movl %eax, %esi
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc310
// File: /workspace/github_c_makefile_star2_O2/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 0xc9b3
testl %eax, %eax
jne 0xc9a4
leaq 0x21571(%rip), %r13     # 0x2de78
leaq 0x1fdbe(%rip), %rbp     # 0x2c6cc
movq 0x1b6e3(%rip), %r15     # 0x27ff8
xorl %r12d, %r12d
movl -0x8(%r13), %ecx
testl %ecx, %ecx
je 0xc999
movl (%r13), %edx
movl (%rbp), %eax
cmpl $-0x1, %edx
je 0xc952
testb $0x2, %al
jne 0xc982
movl -0x8(%r13), %edi
movl -0x4(%r13), %esi
movl (%r13), %edx
movl (%r14), %ecx
movq (%rbx), %r8
cmpb $0x1, 0x2265b(%rip)     # 0x2efa4
jne 0xc971
callq 0xc607
jmp 0xc976
testb $0x2, %al
je 0xc97c
movq (%r15), %rdi
movl -0x4(%r13), %eax
leaq 0x11563(%rip), %rsi     # 0x1dec7
movl %ecx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x5200
jmp 0xc97c
callq 0xc310
xorl $0x1, %eax
orl %eax, %r12d
addq $0xc, %r13
jmp 0xc918
movq (%r15), %rdi
movl -0x4(%r13), %r8d
leaq 0x1156e(%rip), %rsi     # 0x1defe
xorl %eax, %eax
callq 0x5200
jmp 0xc930
xorl %eax, %eax
testl %r12d, %r12d
sete %al
leal (%rax,%rax,2), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq