// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/readfile.c
// Function: parse_as_non_preproc
int parse_as_non_preproc (char **pword, char *filename)
{
   register char *cp;
   char **ptext;
   int mm, yy;
   int text_type, n, v, match;
   int token;
   
   /*
      Get first field and call date_type() to decode it
   */
   cp = *pword;

   switch (token = date_type(cp, &n, &v)) {

   case DT_YEAR:
      if ((cp = *++pword) != NULL && (yy = atoi(cp)) > 0) {
         if (yy < 100) yy += century();
         curr_year = yy;
         return PARSE_OK;
      }
      if (strcmp(cp, ALL) == 0 || strcmp(cp, "*") == 0) {
         curr_year = ALL_YEARS;
         return PARSE_OK;
      }
      return PARSE_INVLINE;   /* year missing or non-numeric */
      break;

   case DT_OPT:
      if (!get_args(pword, P_OPT, filename, FALSE)) {
         display_usage(stderr, FALSE);
         exit(EXIT_FAILURE);
      }
      return PARSE_OK;
      break;
      
   case DT_INPUT_LANGUAGE:
      pword++;  /* point to 2-letter 'language code' string */
      if (*pword) {
         int i;
         for (i = 0; i < NUM_LANGUAGES; i++) {
            if (ci_strncmp(lang_id[i], *pword, MIN_LANG_LEN) == 0) {
               input_language = i;
               return PARSE_OK;
            }
         }
      }
      return PARSE_INVLINE;
      break;

   case DT_NOTE:
      /* look for optional "/<n>" following keyword */
      n = (cp = strrchr(cp, '/')) ? atoi(++cp) : 0;
      
      if ((mm = get_month(*++pword, TRUE, TRUE)) == NOT_MONTH) return PARSE_INVLINE;
      
      /* if "year all" in effect, wildcard all applicable years */
      if (curr_year == ALL_YEARS) {
         match = FALSE;
         for (curr_year = init_year; curr_year <= final_year; curr_year++) {
            match |= enter_note(mm, pword, n) == PARSE_OK;
         }
         curr_year = ALL_YEARS;   /* reset to wildcard */
         return match ? PARSE_OK : PARSE_NOMATCH;
      } 
      else return enter_note(mm, pword, n);
      break;

   case DT_OTHER:   /* unrecognized token */
      return PARSE_INVLINE;
      break;
      
   case DT_DELETE:   /* fall through to actually delete event entry */
      pword++;
      delete_entry = TRUE;
      
   default:
      /* At this point, we assume that the configuration file line is an event
         specification... */

      /* If the current year is a wildcard ("all" or "*" - see above), enter
         the date for each year covered at least partially by the calendar.
         Note that a "mm/dd/yy" date spec explicitly resets curr_year;
         parse_date() sets the 'curr_year_reset' flag when this happens so
         that we can quit immediately.
      */
      if (curr_year == ALL_YEARS) {
         match = FALSE;
         /* loop over each applicable year */
         for (curr_year = init_year; curr_year <= final_year; curr_year++) {
            match |= process_event_specification(pword, &text_type, &ptext) == PARSE_OK;
            if (curr_year_reset) {   /* quit if year reset */
               return match ? PARSE_OK : PARSE_NOMATCH;
            }
         }
         
         /* restore year to wildcard for next time */
         curr_year = ALL_YEARS;
         delete_entry = FALSE;
         return match ? PARSE_OK : PARSE_NOMATCH;
      }

      match = process_event_specification(pword, &text_type, &ptext);
      delete_entry = FALSE;
      return match;
      
      break;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x10050
movl %eax, -0x44(%rbp)
incl %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0xc, %eax
ja 0xe908
movq -0x50(%rbp), %rax
leaq 0x16709(%rip), %rcx     # 0x24d64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xe6bb
movq -0x20(%rbp), %rdi
callq 0x5280
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
jle 0xe6bb
cmpl $0x64, -0x30(%rbp)
jge 0xe6a3
callq 0xc610
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
leaq 0x24fb3(%rip), %rax     # 0x33660
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xe9ee
movq -0x20(%rbp), %rdi
leaq 0x16dc1(%rip), %rsi     # 0x25487
callq 0x51a0
cmpl $0x0, %eax
je 0xe6e5
movq -0x20(%rbp), %rdi
leaq 0x16979(%rip), %rsi     # 0x25054
callq 0x51a0
cmpl $0x0, %eax
jne 0xe6fe
leaq 0x24f74(%rip), %rax     # 0x33660
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl $0x0, -0x4(%rbp)
jmp 0xe9ee
movl $0x2, -0x4(%rbp)
jmp 0xe9ee
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x10, %esi
xorl %ecx, %ecx
callq 0x62c0
cmpl $0x0, %eax
jne 0xe73e
movq 0x1f8ce(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x5970
movl $0x1, %edi
callq 0x52b0
movl $0x0, -0x4(%rbp)
jmp 0xe9ee
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xe7bc
movl $0x0, -0x48(%rbp)
cmpl $0x18, -0x48(%rbp)
jge 0xe7ba
movslq -0x48(%rbp), %rax
leaq 0x237e8(%rip), %rdi     # 0x31f60
imulq $0x14, %rax, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl $0x2, %edx
callq 0xb3b0
cmpl $0x0, %eax
jne 0xe7ad
movl -0x48(%rbp), %ecx
leaq 0x250e1(%rip), %rax     # 0x33880
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xe9ee
jmp 0xe7af
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xe767
jmp 0xe7bc
movl $0x2, -0x4(%rbp)
jmp 0xe9ee
movq -0x20(%rbp), %rdi
movl $0x2f, %esi
callq 0x5130
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xe7f6
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movq %rdi, -0x20(%rbp)
callq 0x5280
movl %eax, -0x54(%rbp)
jmp 0xe7fd
xorl %eax, %eax
movl %eax, -0x54(%rbp)
jmp 0xe7fd
movl -0x54(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0xf970
movl %eax, -0x2c(%rbp)
cmpl $-0x1, %eax
jne 0xe836
movl $0x2, -0x4(%rbp)
jmp 0xe9ee
leaq 0x24e23(%rip), %rax     # 0x33660
cmpl $-0x1, (%rax)
jne 0xe8cf
movl $0x0, -0x40(%rbp)
leaq 0x24cc4(%rip), %rax     # 0x33518
movl (%rax), %ecx
leaq 0x24e03(%rip), %rax     # 0x33660
movl %ecx, (%rax)
leaq 0x24dfa(%rip), %rax     # 0x33660
movl (%rax), %eax
leaq 0x24ded(%rip), %rcx     # 0x3365c
cmpl (%rcx), %eax
jg 0xe8aa
movl -0x2c(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x38(%rbp), %edx
callq 0x10ac0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
orl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
leaq 0x24dc6(%rip), %rax     # 0x33660
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x24dba(%rip), %rax     # 0x33660
movl %ecx, (%rax)
jmp 0xe85f
leaq 0x24daf(%rip), %rax     # 0x33660
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl -0x40(%rbp), %edx
movl $0x3, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xe9ee
movl -0x2c(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x38(%rbp), %edx
callq 0x10ac0
movl %eax, -0x4(%rbp)
jmp 0xe9ee
movl $0x2, -0x4(%rbp)
jmp 0xe9ee
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movl $0x1, 0x2672c(%rip)     # 0x35034
leaq 0x24d51(%rip), %rax     # 0x33660
cmpl $-0x1, (%rax)
jne 0xe9ca
movl $0x0, -0x40(%rbp)
leaq 0x24bf2(%rip), %rax     # 0x33518
movl (%rax), %ecx
leaq 0x24d31(%rip), %rax     # 0x33660
movl %ecx, (%rax)
leaq 0x24d28(%rip), %rax     # 0x33660
movl (%rax), %eax
leaq 0x24d1b(%rip), %rcx     # 0x3365c
cmpl (%rcx), %eax
jg 0xe99e
movq -0x10(%rbp), %rdi
leaq -0x34(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x10bb0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
orl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, 0x266ca(%rip)     # 0x35038
je 0xe985
movl -0x40(%rbp), %edx
movl $0x3, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xe9ee
jmp 0xe987
leaq 0x24cd2(%rip), %rax     # 0x33660
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x24cc6(%rip), %rax     # 0x33660
movl %ecx, (%rax)
jmp 0xe931
leaq 0x24cbb(%rip), %rax     # 0x33660
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl $0x0, 0x2667f(%rip)     # 0x35034
movl -0x40(%rbp), %edx
movl $0x3, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xe9ee
movq -0x10(%rbp), %rdi
leaq -0x34(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x10bb0
movl %eax, -0x40(%rbp)
movl $0x0, 0x2664c(%rip)     # 0x35034
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)