// File: marxn[P]pupp/3rdparty/gmp/printf/doprntf.c
// Function: _gmp_doprnt_mpf2
int
__gmp_doprnt_mpf (const struct doprnt_funs_t *funs,
		  void *data,
		  const struct doprnt_params_t *p,
		  const char *point,
		  mpf_srcptr f)
{
  int         prec, ndigits, free_size, len, newlen, justify, justlen, explen;
  int         showbaselen, sign, signlen, intlen, intzeros, pointlen;
  int         fraczeros, fraclen, preczeros;
  char        *s, *free_ptr;
  mp_exp_t    exp;
  char        exponent[GMP_LIMB_BITS + 10];
  const char  *showbase;
  int         retval = 0;

  TRACE (printf ("__gmp_doprnt_float\n");
	 printf ("  conv=%d prec=%d\n", p->conv, p->prec));

  prec = p->prec;
  if (prec <= -1)
    {
      /* all digits */
      ndigits = 0;

      /* arrange the fixed/scientific decision on a "prec" implied by how
	 many significant digits there are */
      if (p->conv == DOPRNT_CONV_GENERAL)
	MPF_SIGNIFICANT_DIGITS (prec, PREC(f), ABS(p->base));
    }
  else
    {
      switch (p->conv) {
      case DOPRNT_CONV_FIXED:
	/* Precision is digits after the radix point.  Try not to generate
	   too many more than will actually be required.  If f>=1 then
	   overestimate the integer part, and add prec.  If f<1 then
	   underestimate the zeros between the radix point and the first
	   digit and subtract that from prec.  In either case add 2 so the
	   round to nearest can be applied accurately.  Finally, we add 1 to
	   handle the case of 1-eps where EXP(f) = 0 but mpf_get_str returns
	   exp as 1.  */
	ndigits = prec + 2 + 1
	  + EXP(f) * (mp_bases[ABS(p->base)].chars_per_limb + (EXP(f)>=0));
	ndigits = MAX (ndigits, 1);
	break;

      case DOPRNT_CONV_SCIENTIFIC:
	/* precision is digits after the radix point, and there's one digit
	   before */
	ndigits = prec + 1;
	break;

      default:
	ASSERT (0);
	/*FALLTHRU*/

      case DOPRNT_CONV_GENERAL:
	/* precision is total digits, but be sure to ask mpf_get_str for at
	   least 1, not 0 */
	ndigits = MAX (prec, 1);
	break;
      }
    }
  TRACE (printf ("  ndigits %d\n", ndigits));

  s = mpf_get_str (NULL, &exp, p->base, ndigits, f);
  len = strlen (s);
  free_ptr = s;
  free_size = len + 1;
  TRACE (printf ("  s   %s\n", s);
	 printf ("  exp %ld\n", exp);
	 printf ("  len %d\n", len));

  /* For fixed mode check the ndigits formed above was in fact enough for
     the integer part plus p->prec after the radix point. */
  ASSERT ((p->conv == DOPRNT_CONV_FIXED && p->prec > -1)
	  ? ndigits >= MAX (1, exp + p->prec + 2) : 1);

  sign = p->sign;
  if (s[0] == '-')
    {
      sign = s[0];
      s++, len--;
    }
  signlen = (sign != '\0');
  TRACE (printf ("  sign %c  signlen %d\n", sign, signlen));

  switch (p->conv) {
  case DOPRNT_CONV_FIXED:
    if (prec <= -1)
      prec = MAX (0, len-exp);   /* retain all digits */

    /* Truncate if necessary so fraction will be at most prec digits. */
    ASSERT (prec >= 0);
    newlen = exp + prec;
    if (newlen < 0)
      {
	/* first non-zero digit is below target prec, and at least one zero
	   digit in between, so print zero */
	len = 0;
	exp = 0;
      }
    else if (len <= newlen)
      {
	/* already got few enough digits */
      }
    else
      {
	/* discard excess digits and round to nearest */

	const char  *num_to_text = (p->base >= 0
				    ? "0123456789abcdefghijklmnopqrstuvwxyz"
				    : "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
	int  base = ABS(p->base);
	int  n;

	ASSERT (base <= 36);

	len = newlen;
	n = DIGIT_VALUE (s[len]);
	TRACE (printf ("  rounding with %d\n", n));
	if (n >= (base + 1) / 2)
	  {
	    /* propagate a carry */
	    for (;;)
	      {
		if (len == 0)
		  {
		    s[0] = '1';
		    len = 1;
		    exp++;
		    break;
		  }
		n = DIGIT_VALUE (s[len-1]);
		ASSERT (n >= 0 && n < base);
		n++;
		if (n != base)
		  {
		    TRACE (printf ("  storing now %d\n", n));
		    s[len-1] = num_to_text[n];
		    break;
		  }
		len--;
	      }
	  }
	else
	  {
	    /* truncate only, strip any trailing zeros now exposed */
	    while (len > 0 && s[len-1] == '0')
	      len--;
	  }

	/* Can have newlen==0, in which case the truncate was just to check
	   for a carry turning it into "1".  If we're left with len==0 then
	   adjust exp to match.  */
	if (len == 0)
	  exp = 0;
      }

  fixed:
    ASSERT (len == 0 ? exp == 0 : 1);
    if (exp <= 0)
      {
	TRACE (printf ("  fixed 0.000sss\n"));
	intlen = 0;
	intzeros = 1;
	fraczeros = -exp;
	fraclen = len;
      }
    else
      {
	TRACE (printf ("  fixed sss.sss or sss000\n"));
	intlen = MIN (len, exp);
	intzeros = exp - intlen;
	fraczeros = 0;
	fraclen = len - intlen;
      }
    explen = 0;
    break;

  case DOPRNT_CONV_SCIENTIFIC:
    {
      long int expval;
      char  expsign;

      if (prec <= -1)
	prec = MAX (0, len-1);   /* retain all digits */

    scientific:
      TRACE (printf ("  scientific s.sss\n"));

      intlen = MIN (1, len);
      intzeros = (intlen == 0 ? 1 : 0);
      fraczeros = 0;
      fraclen = len - intlen;

      expval = (exp-intlen);
      if (p->exptimes4)
	expval <<= 2;

      /* Split out the sign since %o or %x in expfmt give negatives as twos
	 complement, not with a sign. */
      expsign = (expval >= 0 ? '+' : '-');
      expval = ABS (expval);

#if HAVE_VSNPRINTF
      explen = snprintf (exponent, sizeof(exponent),
			 p->expfmt, expsign, expval);
      /* test for < sizeof-1 since a glibc 2.0.x return of sizeof-1 might
	 mean truncation */
      ASSERT (explen >= 0 && explen < sizeof(exponent)-1);
#else
      sprintf (exponent, p->expfmt, expsign, expval);
      explen = strlen (exponent);
      ASSERT (explen < sizeof(exponent));
#endif
      TRACE (printf ("  expfmt %s gives %s\n", p->expfmt, exponent));
    }
    break;

  default:
    ASSERT (0);
    /*FALLTHRU*/  /* to stop variables looking uninitialized */

  case DOPRNT_CONV_GENERAL:
    /* The exponent for "scientific" will be exp-1, choose scientific if
       this is < -4 or >= prec (and minimum 1 for prec).  For f==0 will have
       exp==0 and get the desired "fixed".  This rule follows glibc.  For
       fixed there's no need to truncate, the desired ndigits will already
       be as required.  */
    if (exp-1 < -4 || exp-1 >= MAX (1, prec))
      goto scientific;
    else
      goto fixed;
  }

  TRACE (printf ("  intlen %d intzeros %d fraczeros %d fraclen %d\n",
		 intlen, intzeros, fraczeros, fraclen));
  ASSERT (p->prec <= -1
	  ? intlen + fraclen == strlen (s)
	  : intlen + fraclen <= strlen (s));

  if (p->showtrailing)
    {
      /* Pad to requested precision with trailing zeros, for general this is
	 all digits, for fixed and scientific just the fraction.  */
      preczeros = prec - (fraczeros + fraclen
			  + (p->conv == DOPRNT_CONV_GENERAL
			     ? intlen + intzeros : 0));
      preczeros = MAX (0, preczeros);
    }
  else
    preczeros = 0;
  TRACE (printf ("  prec=%d showtrailing=%d, pad with preczeros %d\n",
		 prec, p->showtrailing, preczeros));

  /* radix point if needed, or if forced */
  pointlen = ((fraczeros + fraclen + preczeros) != 0 || p->showpoint != 0)
    ? strlen (point) : 0;
  TRACE (printf ("  point |%s|  pointlen %d\n", point, pointlen));

  /* Notice the test for a non-zero value is done after any truncation for
     DOPRNT_CONV_FIXED. */
  showbase = NULL;
  showbaselen = 0;
  switch (p->showbase) {
  default:
    ASSERT (0);
    /*FALLTHRU*/
  case DOPRNT_SHOWBASE_NO:
    break;
  case DOPRNT_SHOWBASE_NONZERO:
    if (intlen == 0 && fraclen == 0)
      break;
    /*FALLTHRU*/
  case DOPRNT_SHOWBASE_YES:
    switch (p->base) {
    case 16:  showbase = "0x"; showbaselen = 2; break;
    case -16: showbase = "0X"; showbaselen = 2; break;
    case 8:   showbase = "0";  showbaselen = 1; break;
    }
    break;
  }
  TRACE (printf ("  showbase %s showbaselen %d\n",
		 showbase == NULL ? "" : showbase, showbaselen));

  /* left over field width */
  justlen = p->width - (signlen + showbaselen + intlen + intzeros + pointlen
			+ fraczeros + fraclen + preczeros + explen);
  TRACE (printf ("  justlen %d fill 0x%X\n", justlen, p->fill));

  justify = p->justify;
  if (justlen <= 0) /* no justifying if exceed width */
    justify = DOPRNT_JUSTIFY_NONE;

  TRACE (printf ("  justify type %d  intlen %d pointlen %d fraclen %d\n",
		 justify, intlen, pointlen, fraclen));

  if (justify == DOPRNT_JUSTIFY_RIGHT)         /* pad for right */
    DOPRNT_REPS (p->fill, justlen);

  if (signlen)                                 /* sign */
    DOPRNT_REPS (sign, 1);

  DOPRNT_MEMORY_MAYBE (showbase, showbaselen); /* base */

  if (justify == DOPRNT_JUSTIFY_INTERNAL)      /* pad for internal */
    DOPRNT_REPS (p->fill, justlen);

  DOPRNT_MEMORY (s, intlen);                   /* integer */
  DOPRNT_REPS_MAYBE ('0', intzeros);

  DOPRNT_MEMORY_MAYBE (point, pointlen);       /* point */

  DOPRNT_REPS_MAYBE ('0', fraczeros);          /* frac */
  DOPRNT_MEMORY_MAYBE (s+intlen, fraclen);

  DOPRNT_REPS_MAYBE ('0', preczeros);          /* prec */

  DOPRNT_MEMORY_MAYBE (exponent, explen);      /* exp */

  if (justify == DOPRNT_JUSTIFY_LEFT)          /* pad for left */
    DOPRNT_REPS (p->fill, justlen);

 done:
  (*__gmp_free_func) (free_ptr, free_size);
  return retval;

 error:
  retval = -1;
  goto done;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0xec(%rbp)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $-0x1, -0x2c(%rbp)
jg 0x5b2c5
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0x5b2c0
jmp 0x5b224
jmp 0x5b226
jmp 0x5b228
jmp 0x5b22a
movq -0x28(%rbp), %rax
movslq (%rax), %rcx
leaq 0x6028(%rip), %rax      # 0x61260
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x168(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x5b261
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x16c(%rbp)
jmp 0x5b26f
movq -0x18(%rbp), %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x16c(%rbp)
movq -0x168(%rbp), %rax
movl -0x16c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x6, %rcx
movq %rcx, -0x160(%rbp)
mulq -0x160(%rbp)
movq %rax, -0x108(%rbp)
movq %rdx, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
addq $0x2, %rax
movl %eax, -0x2c(%rbp)
jmp 0x5b2c0
jmp 0x5b3f2
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x170(%rbp)
subl $0x1, %eax
je 0x5b2fe
jmp 0x5b2d9
movl -0x170(%rbp), %eax
subl $0x2, %eax
je 0x5b3b8
jmp 0x5b2ea
movl -0x170(%rbp), %eax
subl $0x3, %eax
je 0x5b3c9
jmp 0x5b3c3
movl -0x2c(%rbp), %eax
addl $0x2, %eax
addl $0x1, %eax
cltq
movq %rax, -0x180(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x178(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x5b336
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x184(%rbp)
jmp 0x5b344
movq -0x18(%rbp), %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x184(%rbp)
movq -0x180(%rbp), %rax
movq -0x178(%rbp), %rcx
movl -0x184(%rbp), %edx
movslq %edx, %rsi
leaq 0x5efe(%rip), %rdx      # 0x61260
imulq $0x28, %rsi, %rsi
addq %rsi, %rdx
movl (%rdx), %edx
movq -0x28(%rbp), %rsi
cmpq $0x0, 0x8(%rsi)
setge %sil
andb $0x1, %sil
movzbl %sil, %esi
addl %esi, %edx
movslq %edx, %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movl %eax, -0x30(%rbp)
cmpl $0x1, -0x30(%rbp)
jle 0x5b3a0
movl -0x30(%rbp), %eax
movl %eax, -0x188(%rbp)
jmp 0x5b3ad
movl $0x1, %eax
movl %eax, -0x188(%rbp)
jmp 0x5b3ad
movl -0x188(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x5b3f0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x5b3f0
jmp 0x5b3c5
jmp 0x5b3c7
jmp 0x5b3c9
cmpl $0x1, -0x2c(%rbp)
jle 0x5b3da
movl -0x2c(%rbp), %eax
movl %eax, -0x18c(%rbp)
jmp 0x5b3e7
movl $0x1, %eax
movl %eax, -0x18c(%rbp)
jmp 0x5b3e7
movl -0x18c(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x5b3f2
movq -0x18(%rbp), %rax
movl (%rax), %edx
movslq -0x30(%rbp), %rcx
movq -0x28(%rbp), %r8
xorl %eax, %eax
movl %eax, %edi
leaq -0x88(%rbp), %rsi
callq 0x5c520
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x6170
movl %eax, -0x38(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5b433
movq -0x18(%rbp), %rax
movsbl 0x2c(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x5b469
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x50(%rbp), %eax
testl %eax, %eax
setne %al
movzbl %al, %eax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x190(%rbp)
subl $0x1, %eax
je 0x5b4b0
jmp 0x5b48b
movl -0x190(%rbp), %eax
subl $0x2, %eax
je 0x5b890
jmp 0x5b49c
movl -0x190(%rbp), %eax
subl $0x3, %eax
je 0x5b9cc
jmp 0x5b9c6
cmpl $-0x1, -0x2c(%rbp)
jg 0x5b4ef
movslq -0x38(%rbp), %rcx
subq -0x88(%rbp), %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jle 0x5b4d3
xorl %eax, %eax
movq %rax, -0x198(%rbp)
jmp 0x5b4e5
movslq -0x38(%rbp), %rax
subq -0x88(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movl %eax, -0x2c(%rbp)
jmp 0x5b4f1
jmp 0x5b4f3
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jge 0x5b521
movl $0x0, -0x38(%rbp)
movq $0x0, -0x88(%rbp)
jmp 0x5b7ff
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jg 0x5b52e
jmp 0x5b7fd
movq -0x18(%rbp), %rax
movl (%rax), %edx
leaq 0x968e(%rip), %rax      # 0x64bc9
leaq 0x9662(%rip), %rcx      # 0x64ba4
cmpl $0x0, %edx
cmovgeq %rcx, %rax
movq %rax, -0x110(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x5b567
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x19c(%rbp)
jmp 0x5b575
movq -0x18(%rbp), %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x19c(%rbp)
movl -0x19c(%rbp), %eax
movl %eax, -0x114(%rbp)
jmp 0x5b583
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
callq 0x6370
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movslq -0x38(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x5b5c5
movq -0x78(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
movl %eax, -0x1a0(%rbp)
jmp 0x5b628
callq 0x6370
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movslq -0x38(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x5b604
movq -0x78(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, -0x1a4(%rbp)
jmp 0x5b61c
movq -0x78(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x41, %eax
addl $0xa, %eax
movl %eax, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
movl %eax, -0x1a0(%rbp)
movl -0x1a0(%rbp), %eax
movl %eax, -0x118(%rbp)
movl -0x118(%rbp), %eax
movl %eax, -0x1a8(%rbp)
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1a8(%rbp), %eax
cmpl %ecx, %eax
jl 0x5b7a4
jmp 0x5b663
cmpl $0x0, -0x38(%rbp)
jne 0x5b68e
movq -0x78(%rbp), %rax
movb $0x31, (%rax)
movl $0x1, -0x38(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x5b7a2
callq 0x6370
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movl -0x38(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x5b6d4
movq -0x78(%rbp), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
movl %eax, -0x1ac(%rbp)
jmp 0x5b746
callq 0x6370
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movl -0x38(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x5b71d
movq -0x78(%rbp), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, -0x1b0(%rbp)
jmp 0x5b73a
movq -0x78(%rbp), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
subl $0x41, %eax
addl $0xa, %eax
movl %eax, -0x1b0(%rbp)
movl -0x1b0(%rbp), %eax
movl %eax, -0x1ac(%rbp)
movl -0x1ac(%rbp), %eax
movl %eax, -0x118(%rbp)
jmp 0x5b754
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
movl -0x118(%rbp), %eax
cmpl -0x114(%rbp), %eax
je 0x5b794
movq -0x110(%rbp), %rax
movslq -0x118(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x78(%rbp), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x5b7a2
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x5b663
jmp 0x5b7ea
jmp 0x5b7a6
xorl %eax, %eax
cmpl $0x0, -0x38(%rbp)
movb %al, -0x1b1(%rbp)
jle 0x5b7d1
movq -0x78(%rbp), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
sete %al
movb %al, -0x1b1(%rbp)
movb -0x1b1(%rbp), %al
testb $0x1, %al
jne 0x5b7dd
jmp 0x5b7e8
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x5b7a6
jmp 0x5b7ea
cmpl $0x0, -0x38(%rbp)
jne 0x5b7fb
movq $0x0, -0x88(%rbp)
jmp 0x5b7fd
jmp 0x5b7ff
jmp 0x5b801
jmp 0x5b803
jmp 0x5b805
cmpq $0x0, -0x88(%rbp)
jg 0x5b831
movl $0x0, -0x58(%rbp)
movl $0x1, -0x5c(%rbp)
xorl %eax, %eax
subq -0x88(%rbp), %rax
movl %eax, -0x64(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x68(%rbp)
jmp 0x5b884
movslq -0x38(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x5b84b
movslq -0x38(%rbp), %rax
movq %rax, -0x1c0(%rbp)
jmp 0x5b859
movq -0x88(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rax
movl %eax, -0x58(%rbp)
movq -0x88(%rbp), %rax
movslq -0x58(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x38(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x68(%rbp)
movl $0x0, -0x48(%rbp)
jmp 0x5ba2e
cmpl $-0x1, -0x2c(%rbp)
jg 0x5b8c1
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x5b8ac
xorl %eax, %eax
movl %eax, -0x1c4(%rbp)
jmp 0x5b8b8
movl -0x38(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c4(%rbp)
movl -0x1c4(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x5b8c3
movl $0x1, %eax
cmpl -0x38(%rbp), %eax
jge 0x5b8da
movl $0x1, %eax
movl %eax, -0x1c8(%rbp)
jmp 0x5b8e3
movl -0x38(%rbp), %eax
movl %eax, -0x1c8(%rbp)
movl -0x1c8(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x38(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x88(%rbp), %rax
movslq -0x58(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x5b940
movq -0x120(%rbp), %rax
shlq $0x2, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdx
movl $0x2d, %eax
movl $0x2b, %ecx
cmpq $0x0, %rdx
cmovgel %ecx, %eax
movb %al, -0x121(%rbp)
cmpq $0x0, -0x120(%rbp)
jl 0x5b978
movq -0x120(%rbp), %rax
movq %rax, -0x1d0(%rbp)
jmp 0x5b988
xorl %eax, %eax
subq -0x120(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0xe0(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movsbl -0x121(%rbp), %ecx
movq -0x120(%rbp), %r8
movl $0x4a, %esi
movb $0x0, %al
callq 0x6500
movl %eax, -0x48(%rbp)
jmp 0x5b9c4
jmp 0x5ba2e
jmp 0x5b9c8
jmp 0x5b9ca
jmp 0x5b9cc
movq -0x88(%rbp), %rax
subq $0x1, %rax
cmpq $-0x4, %rax
jl 0x5ba24
movq -0x88(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x1d8(%rbp)
movl $0x1, %eax
cmpl -0x2c(%rbp), %eax
jle 0x5ba06
movl $0x1, %eax
movl %eax, -0x1dc(%rbp)
jmp 0x5ba0f
movl -0x2c(%rbp), %eax
movl %eax, -0x1dc(%rbp)
movq -0x1d8(%rbp), %rax
movl -0x1dc(%rbp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x5ba29
jmp 0x5b8c3
jmp 0x5b801
jmp 0x5ba30
jmp 0x5ba32
movq -0x18(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0x5bab1
movl -0x2c(%rbp), %eax
movl %eax, -0x1e4(%rbp)
movl -0x64(%rbp), %eax
addl -0x68(%rbp), %eax
movl %eax, -0x1e0(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0x5ba69
movl -0x58(%rbp), %eax
addl -0x5c(%rbp), %eax
movl %eax, -0x1e8(%rbp)
jmp 0x5ba73
xorl %eax, %eax
movl %eax, -0x1e8(%rbp)
jmp 0x5ba73
movl -0x1e4(%rbp), %eax
movl -0x1e0(%rbp), %ecx
movl -0x1e8(%rbp), %edx
addl %edx, %ecx
subl %ecx, %eax
movl %eax, -0x6c(%rbp)
xorl %eax, %eax
cmpl -0x6c(%rbp), %eax
jle 0x5ba9d
xorl %eax, %eax
movl %eax, -0x1ec(%rbp)
jmp 0x5baa6
movl -0x6c(%rbp), %eax
movl %eax, -0x1ec(%rbp)
movl -0x1ec(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x5bab8
movl $0x0, -0x6c(%rbp)
movl -0x64(%rbp), %eax
addl -0x68(%rbp), %eax
addl -0x6c(%rbp), %eax
cmpl $0x0, %eax
jne 0x5bad0
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x5bae2
movq -0x20(%rbp), %rdi
callq 0x6170
movq %rax, -0x1f8(%rbp)
jmp 0x5baed
xorl %eax, %eax
movq %rax, -0x1f8(%rbp)
jmp 0x5baed
movq -0x1f8(%rbp), %rax
movl %eax, -0x60(%rbp)
movq $0x0, -0xe8(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x1fc(%rbp)
subl $0x1, %eax
je 0x5bb52
jmp 0x5bb1d
movl -0x1fc(%rbp), %eax
subl $0x2, %eax
je 0x5bb3d
jmp 0x5bb2a
movl -0x1fc(%rbp), %eax
subl $0x3, %eax
je 0x5bb42
jmp 0x5bb37
jmp 0x5bb39
jmp 0x5bb3b
jmp 0x5bb3d
jmp 0x5bbc4
cmpl $0x0, -0x58(%rbp)
jne 0x5bb50
cmpl $0x0, -0x68(%rbp)
jne 0x5bb50
jmp 0x5bbc4
jmp 0x5bb52
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x200(%rbp)
subl $-0x10, %eax
je 0x5bb96
jmp 0x5bb65
movl -0x200(%rbp), %eax
subl $0x8, %eax
je 0x5bbad
jmp 0x5bb72
movl -0x200(%rbp), %eax
subl $0x10, %eax
jne 0x5bbc2
jmp 0x5bb7f
leaq 0x9068(%rip), %rax      # 0x64bee
movq %rax, -0xe8(%rbp)
movl $0x2, -0x4c(%rbp)
jmp 0x5bbc2
leaq 0x9054(%rip), %rax      # 0x64bf1
movq %rax, -0xe8(%rbp)
movl $0x2, -0x4c(%rbp)
jmp 0x5bbc2
leaq 0x84ef(%rip), %rax      # 0x640a3
movq %rax, -0xe8(%rbp)
movl $0x1, -0x4c(%rbp)
jmp 0x5bbc4
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
movl -0x54(%rbp), %ecx
addl -0x4c(%rbp), %ecx
addl -0x58(%rbp), %ecx
addl -0x5c(%rbp), %ecx
addl -0x60(%rbp), %ecx
addl -0x64(%rbp), %ecx
addl -0x68(%rbp), %ecx
addl -0x6c(%rbp), %ecx
addl -0x48(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x44(%rbp)
jg 0x5bc02
movl $0x0, -0x40(%rbp)
cmpl $0x2, -0x40(%rbp)
jne 0x5bc53
jmp 0x5bc0a
jmp 0x5bc0c
jmp 0x5bc0e
jmp 0x5bc10
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movsbl 0x14(%rcx), %esi
movl -0x44(%rbp), %edx
callq *%rax
movl %eax, -0x128(%rbp)
cmpl $-0x1, -0x128(%rbp)
jne 0x5bc3d
jmp 0x5bff6
movl -0x128(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bc51
jmp 0x5bc53
cmpl $0x0, -0x54(%rbp)
je 0x5bca1
jmp 0x5bc5b
jmp 0x5bc5d
jmp 0x5bc5f
jmp 0x5bc61
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x50(%rbp), %esi
movl $0x1, %edx
callq *%rax
movl %eax, -0x12c(%rbp)
cmpl $-0x1, -0x12c(%rbp)
jne 0x5bc8b
jmp 0x5bff6
movl -0x12c(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bc9f
jmp 0x5bca1
jmp 0x5bca3
cmpl $0x0, -0x4c(%rbp)
je 0x5bcf4
jmp 0x5bcab
jmp 0x5bcad
jmp 0x5bcaf
jmp 0x5bcb1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movslq -0x4c(%rbp), %rdx
callq *%rax
movl %eax, -0x130(%rbp)
cmpl $-0x1, -0x130(%rbp)
jne 0x5bcde
jmp 0x5bff6
movl -0x130(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bcf2
jmp 0x5bcf4
jmp 0x5bcf6
cmpl $0x3, -0x40(%rbp)
jne 0x5bd47
jmp 0x5bcfe
jmp 0x5bd00
jmp 0x5bd02
jmp 0x5bd04
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movsbl 0x14(%rcx), %esi
movl -0x44(%rbp), %edx
callq *%rax
movl %eax, -0x134(%rbp)
cmpl $-0x1, -0x134(%rbp)
jne 0x5bd31
jmp 0x5bff6
movl -0x134(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bd45
jmp 0x5bd47
jmp 0x5bd49
jmp 0x5bd4b
jmp 0x5bd4d
jmp 0x5bd4f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rsi
movslq -0x58(%rbp), %rdx
callq *%rax
movl %eax, -0x138(%rbp)
cmpl $-0x1, -0x138(%rbp)
jne 0x5bd79
jmp 0x5bff6
movl -0x138(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bd8d
jmp 0x5bd8f
cmpl $0x0, -0x5c(%rbp)
je 0x5bddd
jmp 0x5bd97
jmp 0x5bd99
jmp 0x5bd9b
jmp 0x5bd9d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl $0x30, %esi
callq *%rax
movl %eax, -0x13c(%rbp)
cmpl $-0x1, -0x13c(%rbp)
jne 0x5bdc7
jmp 0x5bff6
movl -0x13c(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bddb
jmp 0x5bddd
jmp 0x5bddf
jmp 0x5bde1
cmpl $0x0, -0x60(%rbp)
je 0x5be2f
jmp 0x5bde9
jmp 0x5bdeb
jmp 0x5bded
jmp 0x5bdef
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq -0x60(%rbp), %rdx
callq *%rax
movl %eax, -0x140(%rbp)
cmpl $-0x1, -0x140(%rbp)
jne 0x5be19
jmp 0x5bff6
movl -0x140(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5be2d
jmp 0x5be2f
jmp 0x5be31
jmp 0x5be33
cmpl $0x0, -0x64(%rbp)
je 0x5be81
jmp 0x5be3b
jmp 0x5be3d
jmp 0x5be3f
jmp 0x5be41
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x64(%rbp), %edx
movl $0x30, %esi
callq *%rax
movl %eax, -0x144(%rbp)
cmpl $-0x1, -0x144(%rbp)
jne 0x5be6b
jmp 0x5bff6
movl -0x144(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5be7f
jmp 0x5be81
jmp 0x5be83
jmp 0x5be85
cmpl $0x0, -0x68(%rbp)
je 0x5beda
jmp 0x5be8d
jmp 0x5be8f
jmp 0x5be91
jmp 0x5be93
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rsi
movslq -0x58(%rbp), %rcx
addq %rcx, %rsi
movslq -0x68(%rbp), %rdx
callq *%rax
movl %eax, -0x148(%rbp)
cmpl $-0x1, -0x148(%rbp)
jne 0x5bec4
jmp 0x5bff6
movl -0x148(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bed8
jmp 0x5beda
jmp 0x5bedc
jmp 0x5bede
cmpl $0x0, -0x6c(%rbp)
je 0x5bf2c
jmp 0x5bee6
jmp 0x5bee8
jmp 0x5beea
jmp 0x5beec
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x6c(%rbp), %edx
movl $0x30, %esi
callq *%rax
movl %eax, -0x14c(%rbp)
cmpl $-0x1, -0x14c(%rbp)
jne 0x5bf16
jmp 0x5bff6
movl -0x14c(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bf2a
jmp 0x5bf2c
jmp 0x5bf2e
jmp 0x5bf30
cmpl $0x0, -0x48(%rbp)
je 0x5bf81
jmp 0x5bf38
jmp 0x5bf3a
jmp 0x5bf3c
jmp 0x5bf3e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movslq -0x48(%rbp), %rdx
callq *%rax
movl %eax, -0x150(%rbp)
cmpl $-0x1, -0x150(%rbp)
jne 0x5bf6b
jmp 0x5bff6
movl -0x150(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bf7f
jmp 0x5bf81
jmp 0x5bf83
cmpl $0x1, -0x40(%rbp)
jne 0x5bfd1
jmp 0x5bf8b
jmp 0x5bf8d
jmp 0x5bf8f
jmp 0x5bf91
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movsbl 0x14(%rcx), %esi
movl -0x44(%rbp), %edx
callq *%rax
movl %eax, -0x154(%rbp)
cmpl $-0x1, -0x154(%rbp)
jne 0x5bfbb
jmp 0x5bff6
movl -0x154(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x5bfcf
jmp 0x5bfd1
jmp 0x5bfd3
leaq 0x1a356(%rip), %rax     # 0x76330
movq (%rax), %rax
movq -0x80(%rbp), %rdi
movslq -0x34(%rbp), %rsi
callq *%rax
movl -0xec(%rbp), %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movl $0xffffffff, -0xec(%rbp) # imm = 0xFFFFFFFF
jmp 0x5bfd3
nopw %cs:(%rax,%rax)
nopl (%rax)