// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/writefil.c
// Function: expand_fmt
char *expand_fmt (char *buf,   /* output buffer (filled in) */
                   char *p)    /* character following percent sign */
{
   char c;
   static char *prefixes = "0o+-";
   int firstday, wkday;
   int adjust = 0, print_lz = FALSE, ordinal = FALSE, prev_num = -1;
   int num_present = FALSE, num_value = 0;
   date_str date;
   
   /* For compatibility with version 4.1, still support %[+-][bBdmY] (print
      the next/last month-name/day/month/year).  Version 4.11 introduces
      %[+-]<n>[DWMY], which adjusts the working date by [+-]<n>
      days/weeks/months/years; this method is preferred due to its greater
      flexibility.
   */

   buf[0] = '\0';   /* initialize output to null string */
   
   do {   /* loop until format character found */
      switch (c = *p++) {
      case 'a':   /* %a : abbreviated weekday */
         wkday = calc_weekday(work_month, work_day, work_year);
         strcpy(buf, days_ml_short[output_language][wkday]);
         break;
         
      case 'A':   /* %A : full weekday */
         wkday = calc_weekday(work_month, work_day, work_year);
         strcpy(buf, days_ml[output_language][wkday]);
         break;
         
      case 'b':   /* %b : abbreviated month name */
      case 'B':   /* %B : full month name */
         strcpy(buf, months_ml[output_language][(work_month + adjust + 11) % 12]);
         if (c == 'b')
            buf[ABBR_MONTH_LEN] = '\0';
         break;
         
      case 'd':   /* %d : day of month (01-31) */
         prev_num = work_day;
         sprintf(buf, print_lz ? "%02d" : "%d", prev_num);
         break;
         
      case 'D':   /* %D : adjust working date by <N> days (NEW) */
         if (!num_present || num_value == 0) RESET_DATE();
         else SET_DATE(adjust * num_value);
         break;
         
      case 'j':   /* %j : day of year (001-366) */
         prev_num = DAY_OF_YEAR(work_month, work_day, work_year);
         sprintf(buf, print_lz ? "%03d" : "%d", prev_num);
         break;
         
      case 'l':   /* %l : days left in year (000-365) (NEW) */
         prev_num = YEAR_LEN(work_year) - DAY_OF_YEAR(work_month, work_day, work_year);
         sprintf(buf, print_lz ? "%03d" : "%d", prev_num);
         break;
         
      case 'm':   /* %m : month (01-12) */
         prev_num = (work_month + adjust + 11) % 12 + 1;
         sprintf(buf, print_lz ? "%02d" : "%d", prev_num);
         break;
         
      case 'M':   /* %M : adjust date by <N> months (NEW) */
         if (!num_present || num_value == 0) {
            RESET_DATE();
         }
         else {
            int len;
            
            work_month += adjust * num_value;
            while (work_month > DEC) {
               work_month -= 12;
               work_year++;
            }
            while (work_month < JAN) {
               work_month += 12;
               work_year--;
            }
            
            /* make sure day of new month is legal */
            len = LENGTH_OF(work_month, work_year);
            if (work_day > len) work_day = len;
         }
         break;

         /* %u considers the week containing 1/1 to be week 1 and the next
            "logical Sunday" (the first day of the week as printed - cf. the
            -F option) to be the start of week 2; %U considers the first
            "logical Sunday" of the year to be the start of week 1.  %w and %W
            behave like %u and %U respectively, but use the first "logical
            Monday" instead.
         */
      case 'W':   /* %W : week number (00-53)       */
         /* %W, if prefaced by [+-]N, adjusts the date by [+-]N weeks (resets
            if N == 0); check for this case first
         */
         if (num_present) {
            if (num_value == 0) RESET_DATE();   /* N = 0: reset date */
            else SET_DATE(7 * adjust * num_value);
            break;
         }
         /* fall through */
      case 'u':   /* %u : week number (01-54) (NEW) */
      case 'U':   /* %U : week number (00-53)       */
      case 'w':   /* %w : week number (01-54) (NEW) */
         firstday = ((tolower(c) == 'w' ? 15 : 14) -
                     START_BOX(JAN, work_year)) % 7 + 1;
         prev_num = (DAY_OF_YEAR(work_month, work_day,
                                 work_year) - firstday + 7) / 7;
         if (islower((int)c) && firstday != 1) prev_num++;
         sprintf(buf, print_lz ? "%02d" : "%d", prev_num);
         break;
         
      case 'y':   /* %y : year w/o century (00-99) */
         prev_num = (work_year + adjust) % 100;
         sprintf(buf, "%02d", prev_num);
         break;
         
      case 'Y':   /* %Y : year w/century */
         /* %Y, if prefaced by [+-]N, adjusts the date by [+-]N years (resets
            if N == 0); check for this case first
          */
         if (num_present) {
            if (num_value == 0) { /* N = 0: reset date */
               RESET_DATE();
            }
            else {
               int len;
               
               work_year += adjust * num_value;
               
               /* make sure day is legal */
               len = LENGTH_OF(work_month, work_year);
               if (work_day > len) work_day = len;
            }
         } 
         else {
            prev_num = work_year + adjust;
            sprintf(buf, "%d", prev_num);
         }
         break;

         /* prefix flags [o0+-] : set flags for next pass */

      case 'o':   /* %o : ordinal suffix (NEW) */
         ordinal = TRUE;
         break;
         
      case '0':   /* %0 : add leading zeroes (NEW) */
         print_lz = TRUE;
         break;
         
      case '+':   /* %+ : increment next value (NEW) */
      case '-':   /* %- : decrement next value (NEW) */
         adjust = c == '-' ? -1 : 1;
         if (isdigit((int)*p)) {   /* get the number */
            num_present = TRUE;
            while (isdigit((int)*p)) {
               num_value = num_value * 10 + (*p++ - '0');
            }
         }
         break;
         
      case '\0':   /* accidental end-of-string */
      case ' ':
         return p - 1;
         
      default:   /* other - just copy it to output */
         sprintf(buf, "%c", c);
         break;
      };
      
   } while (strchr(prefixes, c) != NULL);
   
   /* append ordinal suffix if requested */
   if (ordinal && prev_num >= 0) strcat(buf, ordinal_suffix(prev_num));

   return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x18(%rbp)
movsbl (%rax), %eax
movb %al, %cl
movb %cl, -0x19(%rbp)
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x79, %eax
ja 0x192a6
movq -0x58(%rbp), %rax
leaq 0xc754(%rip), %rcx      # 0x250b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x1c6f9(%rip), %edi     # 0x3506c
movl 0x1c6f7(%rip), %esi     # 0x35070
movl 0x1c6f5(%rip), %edx     # 0x35074
callq 0xc110
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1aef2(%rip), %rax     # 0x33884
movslq (%rax), %rax
leaq 0x188a4(%rip), %rsi     # 0x31240
imulq $0x8c, %rax, %rax
addq %rax, %rsi
movslq -0x24(%rbp), %rax
imulq $0x14, %rax, %rax
addq %rax, %rsi
callq 0x5080
jmp 0x192bc
movl 0x1c6ab(%rip), %edi     # 0x3506c
movl 0x1c6a9(%rip), %esi     # 0x35070
movl 0x1c6a7(%rip), %edx     # 0x35074
callq 0xc110
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1aea4(%rip), %rax     # 0x33884
movslq (%rax), %rax
leaq 0x17b36(%rip), %rsi     # 0x30520
imulq $0x8c, %rax, %rax
addq %rax, %rsi
movslq -0x24(%rbp), %rax
imulq $0x14, %rax, %rax
addq %rax, %rsi
callq 0x5080
jmp 0x192bc
movq -0x10(%rbp), %rdi
leaq 0x1ae70(%rip), %rax     # 0x33884
movslq (%rax), %rcx
leaq 0x17202(%rip), %rax     # 0x2fc20
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl 0x1c63d(%rip), %eax     # 0x3506c
addl -0x28(%rbp), %eax
addl $0xb, %eax
movl $0xc, %ecx
cltd
idivl %ecx
movq -0x60(%rbp), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x5080
movsbl -0x19(%rbp), %eax
cmpl $0x62, %eax
jne 0x18a5e
movq -0x10(%rbp), %rax
movb $0x0, 0x3(%rax)
jmp 0x192bc
movl 0x1c607(%rip), %eax     # 0x35070
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %ecx
leaq 0xcae6(%rip), %rsi      # 0x25560
leaq 0x11dda(%rip), %rax     # 0x2a85b
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movl -0x34(%rbp), %edx
movb $0x0, %al
callq 0x52a0
jmp 0x192bc
cmpl $0x0, -0x38(%rbp)
je 0x18aa3
cmpl $0x0, -0x3c(%rbp)
jne 0x18ac9
movl 0x1c59b(%rip), %eax     # 0x35044
movl %eax, 0x1c5bd(%rip)     # 0x3506c
movl 0x1c5b3(%rip), %eax     # 0x35068
movl %eax, 0x1c5b5(%rip)     # 0x35070
movl 0x1c587(%rip), %eax     # 0x35048
movl %eax, 0x1c5ad(%rip)     # 0x35074
jmp 0x18b17
jmp 0x18acb
jmp 0x18acd
movl 0x1c599(%rip), %eax     # 0x3506c
movl %eax, -0x48(%rbp)
movl 0x1c594(%rip), %eax     # 0x35070
movl -0x28(%rbp), %ecx
imull -0x3c(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x44(%rbp)
movl 0x1c586(%rip), %eax     # 0x35074
movl %eax, -0x40(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xbb80
movl -0x48(%rbp), %eax
movl %eax, 0x1c569(%rip)     # 0x3506c
movl -0x44(%rbp), %eax
movl %eax, 0x1c564(%rip)     # 0x35070
movl -0x40(%rbp), %eax
movl %eax, 0x1c55f(%rip)     # 0x35074
jmp 0x18b17
jmp 0x192bc
movl 0x1c54a(%rip), %eax     # 0x3506c
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x15671(%rip), %rax     # 0x2e1a0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x68(%rbp)
xorl %eax, %eax
cmpl $0x2, 0x1c52d(%rip)     # 0x3506c
movb %al, -0x61(%rbp)
jle 0x18b97
movl 0x1c52a(%rip), %eax     # 0x35074
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x69(%rbp)
jne 0x18b91
movl 0x1c512(%rip), %eax     # 0x35074
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x6a(%rbp)
jne 0x18b8b
movl 0x1c4fa(%rip), %eax     # 0x35074
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x6a(%rbp)
movb -0x6a(%rbp), %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
movb %al, -0x61(%rbp)
movl -0x68(%rbp), %eax
movb -0x61(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
addl 0x1c4c5(%rip), %eax     # 0x35070
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %ecx
leaq 0xc9a4(%rip), %rsi      # 0x25560
leaq 0x11be3(%rip), %rax     # 0x2a7a6
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movl -0x34(%rbp), %edx
movb $0x0, %al
callq 0x52a0
jmp 0x192bc
movl 0x1c495(%rip), %eax     # 0x35074
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x6b(%rbp)
jne 0x18c26
movl 0x1c47d(%rip), %eax     # 0x35074
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x6c(%rbp)
jne 0x18c20
movl 0x1c465(%rip), %eax     # 0x35074
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x6c(%rbp)
movb -0x6c(%rbp), %al
movb %al, -0x6b(%rbp)
movb -0x6b(%rbp), %dl
movl $0x16d, %eax            # imm = 0x16D
movl $0x16e, %ecx            # imm = 0x16E
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x78(%rbp)
movl 0x1c42a(%rip), %eax     # 0x3506c
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x15551(%rip), %rax     # 0x2e1a0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x74(%rbp)
xorl %eax, %eax
cmpl $0x2, 0x1c40d(%rip)     # 0x3506c
movb %al, -0x6d(%rbp)
jle 0x18cb7
movl 0x1c40a(%rip), %eax     # 0x35074
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x79(%rbp)
jne 0x18cb1
movl 0x1c3f2(%rip), %eax     # 0x35074
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x7a(%rbp)
jne 0x18cab
movl 0x1c3da(%rip), %eax     # 0x35074
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x7a(%rbp)
movb -0x7a(%rbp), %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
movb %al, -0x6d(%rbp)
movl -0x78(%rbp), %eax
movl -0x74(%rbp), %ecx
movb -0x6d(%rbp), %dl
andb $0x1, %dl
movzbl %dl, %edx
addl %edx, %ecx
addl 0x1c3a2(%rip), %ecx     # 0x35070
subl %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %ecx
leaq 0xc87f(%rip), %rsi      # 0x25560
leaq 0x11abe(%rip), %rax     # 0x2a7a6
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movl -0x34(%rbp), %edx
movb $0x0, %al
callq 0x52a0
jmp 0x192bc
movl 0x1c368(%rip), %eax     # 0x3506c
addl -0x28(%rbp), %eax
addl $0xb, %eax
movl $0xc, %ecx
cltd
idivl %ecx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %ecx
leaq 0xc83a(%rip), %rsi      # 0x25560
leaq 0x11b2e(%rip), %rax     # 0x2a85b
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movl -0x34(%rbp), %edx
movb $0x0, %al
callq 0x52a0
jmp 0x192bc
cmpl $0x0, -0x38(%rbp)
je 0x18d4f
cmpl $0x0, -0x3c(%rbp)
jne 0x18d78
movl 0x1c2ef(%rip), %eax     # 0x35044
movl %eax, 0x1c311(%rip)     # 0x3506c
movl 0x1c307(%rip), %eax     # 0x35068
movl %eax, 0x1c309(%rip)     # 0x35070
movl 0x1c2db(%rip), %eax     # 0x35048
movl %eax, 0x1c301(%rip)     # 0x35074
jmp 0x18e93
movl -0x28(%rbp), %eax
imull -0x3c(%rbp), %eax
addl 0x1c2e7(%rip), %eax     # 0x3506c
movl %eax, 0x1c2e1(%rip)     # 0x3506c
cmpl $0xc, 0x1c2da(%rip)     # 0x3506c
jle 0x18db4
movl 0x1c2d2(%rip), %eax     # 0x3506c
subl $0xc, %eax
movl %eax, 0x1c2c9(%rip)     # 0x3506c
movl 0x1c2cb(%rip), %eax     # 0x35074
addl $0x1, %eax
movl %eax, 0x1c2c2(%rip)     # 0x35074
jmp 0x18d8b
jmp 0x18db6
cmpl $0x1, 0x1c2af(%rip)     # 0x3506c
jge 0x18ddf
movl 0x1c2a7(%rip), %eax     # 0x3506c
addl $0xc, %eax
movl %eax, 0x1c29e(%rip)     # 0x3506c
movl 0x1c2a0(%rip), %eax     # 0x35074
addl $-0x1, %eax
movl %eax, 0x1c297(%rip)     # 0x35074
jmp 0x18db6
movl 0x1c287(%rip), %eax     # 0x3506c
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1539e(%rip), %rax     # 0x2e190
movsbl (%rax,%rcx), %eax
movl %eax, -0x80(%rbp)
xorl %eax, %eax
cmpl $0x2, 0x1c26a(%rip)     # 0x3506c
movb %al, -0x7b(%rbp)
jne 0x18e6c
movl 0x1c267(%rip), %eax     # 0x35074
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x81(%rbp)
jne 0x18e63
movl 0x1c24c(%rip), %eax     # 0x35074
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x82(%rbp)
jne 0x18e57
movl 0x1c231(%rip), %eax     # 0x35074
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x82(%rbp)
movb -0x82(%rbp), %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
movb %al, -0x7b(%rbp)
movl -0x80(%rbp), %eax
movb -0x7b(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x4c(%rbp)
movl 0x1c1ed(%rip), %eax     # 0x35070
cmpl -0x4c(%rbp), %eax
jle 0x18e91
movl -0x4c(%rbp), %eax
movl %eax, 0x1c1df(%rip)     # 0x35070
jmp 0x18e93
jmp 0x192bc
cmpl $0x0, -0x38(%rbp)
je 0x18f22
cmpl $0x0, -0x3c(%rbp)
jne 0x18ece
movl 0x1c196(%rip), %eax     # 0x35044
movl %eax, 0x1c1b8(%rip)     # 0x3506c
movl 0x1c1ae(%rip), %eax     # 0x35068
movl %eax, 0x1c1b0(%rip)     # 0x35070
movl 0x1c182(%rip), %eax     # 0x35048
movl %eax, 0x1c1a8(%rip)     # 0x35074
jmp 0x18f1d
jmp 0x18ed0
jmp 0x18ed2
movl 0x1c194(%rip), %eax     # 0x3506c
movl %eax, -0x48(%rbp)
movl 0x1c18f(%rip), %eax     # 0x35070
imull $0x7, -0x28(%rbp), %ecx
imull -0x3c(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x44(%rbp)
movl 0x1c180(%rip), %eax     # 0x35074
movl %eax, -0x40(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xbb80
movl -0x48(%rbp), %eax
movl %eax, 0x1c163(%rip)     # 0x3506c
movl -0x44(%rbp), %eax
movl %eax, 0x1c15e(%rip)     # 0x35070
movl -0x40(%rbp), %eax
movl %eax, 0x1c159(%rip)     # 0x35074
jmp 0x18f1d
jmp 0x192bc
jmp 0x18f24
movsbl -0x19(%rbp), %edi
callq 0x51e0
movl %eax, %edx
movl $0xe, %eax
movl $0xf, %ecx
cmpl $0x77, %edx
cmovel %ecx, %eax
movl %eax, -0x8c(%rbp)
movl 0x1c129(%rip), %edx     # 0x35074
movl $0x1, %esi
movl %esi, %edi
callq 0xc110
leaq 0x1970a(%rip), %rcx     # 0x32668
subl (%rcx), %eax
addl $0x7, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl -0x8c(%rbp), %eax
subl %edx, %eax
movl $0x7, %ecx
cltd
idivl %ecx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movl 0x1c0e5(%rip), %eax     # 0x3506c
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1520c(%rip), %rax     # 0x2e1a0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x88(%rbp)
xorl %eax, %eax
cmpl $0x2, 0x1c0c5(%rip)     # 0x3506c
movb %al, -0x83(%rbp)
jle 0x19017
movl 0x1c0bf(%rip), %eax     # 0x35074
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x8d(%rbp)
jne 0x1900b
movl 0x1c0a4(%rip), %eax     # 0x35074
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x8e(%rbp)
jne 0x18fff
movl 0x1c089(%rip), %eax     # 0x35074
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x8e(%rbp)
movb -0x8e(%rbp), %al
movb %al, -0x8d(%rbp)
movb -0x8d(%rbp), %al
movb %al, -0x83(%rbp)
movl -0x88(%rbp), %eax
movb -0x83(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
addl 0x1c03f(%rip), %eax     # 0x35070
subl -0x20(%rbp), %eax
addl $0x7, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %eax, -0x34(%rbp)
callq 0x52e0
movq (%rax), %rax
movsbl -0x19(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x1906e
cmpl $0x1, -0x20(%rbp)
je 0x1906e
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %ecx
leaq 0xc4e4(%rip), %rsi      # 0x25560
leaq 0x117d8(%rip), %rax     # 0x2a85b
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movl -0x34(%rbp), %edx
movb $0x0, %al
callq 0x52a0
jmp 0x192bc
movl 0x1bfd5(%rip), %eax     # 0x35074
addl -0x28(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %edx, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
leaq 0x117a0(%rip), %rsi     # 0x2a85b
movb $0x0, %al
callq 0x52a0
jmp 0x192bc
cmpl $0x0, -0x38(%rbp)
je 0x191d8
cmpl $0x0, -0x3c(%rbp)
jne 0x19100
movl 0x1bf67(%rip), %eax     # 0x35044
movl %eax, 0x1bf89(%rip)     # 0x3506c
movl 0x1bf7f(%rip), %eax     # 0x35068
movl %eax, 0x1bf81(%rip)     # 0x35070
movl 0x1bf53(%rip), %eax     # 0x35048
movl %eax, 0x1bf79(%rip)     # 0x35074
jmp 0x191d6
movl -0x28(%rbp), %eax
imull -0x3c(%rbp), %eax
addl 0x1bf67(%rip), %eax     # 0x35074
movl %eax, 0x1bf61(%rip)     # 0x35074
movl 0x1bf53(%rip), %eax     # 0x3506c
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1506a(%rip), %rax     # 0x2e190
movsbl (%rax,%rcx), %eax
movl %eax, -0x94(%rbp)
xorl %eax, %eax
cmpl $0x2, 0x1bf33(%rip)     # 0x3506c
movb %al, -0x8f(%rbp)
jne 0x191a9
movl 0x1bf2d(%rip), %eax     # 0x35074
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x95(%rbp)
jne 0x1919d
movl 0x1bf12(%rip), %eax     # 0x35074
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x96(%rbp)
jne 0x19191
movl 0x1bef7(%rip), %eax     # 0x35074
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x96(%rbp)
movb -0x96(%rbp), %al
movb %al, -0x95(%rbp)
movb -0x95(%rbp), %al
movb %al, -0x8f(%rbp)
movl -0x94(%rbp), %eax
movb -0x8f(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x50(%rbp)
movl 0x1beaa(%rip), %eax     # 0x35070
cmpl -0x50(%rbp), %eax
jle 0x191d4
movl -0x50(%rbp), %eax
movl %eax, 0x1be9c(%rip)     # 0x35070
jmp 0x191d6
jmp 0x191f9
movl 0x1be96(%rip), %eax     # 0x35074
addl -0x28(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
leaq 0xc36e(%rip), %rsi      # 0x25560
movb $0x0, %al
callq 0x52a0
jmp 0x192bc
movl $0x1, -0x30(%rbp)
jmp 0x192bc
movl $0x1, -0x2c(%rbp)
jmp 0x192bc
movsbl -0x19(%rbp), %edx
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x2d, %edx
cmovel %ecx, %eax
movl %eax, -0x28(%rbp)
callq 0x52e0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x19296
movl $0x1, -0x38(%rbp)
callq 0x52e0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x19294
imull $0xa, -0x3c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movsbl (%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x19254
jmp 0x19296
jmp 0x192bc
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1930e
movq -0x10(%rbp), %rdi
movsbl -0x19(%rbp), %edx
leaq 0x11361(%rip), %rsi     # 0x2a616
movb $0x0, %al
callq 0x52a0
jmp 0x192be
movq 0x19023(%rip), %rdi     # 0x322e8
movsbl -0x19(%rbp), %esi
callq 0x5100
cmpq $0x0, %rax
jne 0x18934
cmpl $0x0, -0x30(%rbp)
je 0x19306
cmpl $0x0, -0x34(%rbp)
jl 0x19306
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x34(%rbp), %edi
callq 0x18870
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
callq 0x5290
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)