// File: marxn[P]pupp/3rdparty/gmp/mpf/set_str.c
// Function: _gmpf_set_str
int
mpf_set_str (mpf_ptr x, const char *str, int base)
{
  size_t str_size;
  char *s, *begs;
  size_t i, j;
  int c;
  int negative;
  char *dotpos = 0;
  const char *expptr;
  int exp_base;
  const char  *point = GMP_DECIMAL_POINT;
  size_t      pointlen = strlen (point);
  const unsigned char *digit_value;
  TMP_DECL;

  c = (unsigned char) *str;

  /* Skip whitespace.  */
  while (isspace (c))
    c = (unsigned char) *++str;

  negative = 0;
  if (c == '-')
    {
      negative = 1;
      c = (unsigned char) *++str;
    }

  /* Default base to decimal.  */
  if (base == 0)
    base = 10;

  exp_base = base;

  if (base < 0)
    {
      exp_base = 10;
      base = -base;
    }

  digit_value = digit_value_tab;
  if (base > 36)
    {
      /* For bases > 36, use the collating sequence
	 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.  */
      digit_value += 208;
      if (base > 62)
	return -1;		/* too large base */
    }

  /* Require at least one digit, possibly after an initial decimal point.  */
  if (digit_value[c] >= base)
    {
      /* not a digit, must be a decimal point */
      for (i = 0; i < pointlen; i++)
	if (str[i] != point[i])
	  return -1;
      if (digit_value[(unsigned char) str[pointlen]] >= base)
	return -1;
    }

  /* Locate exponent part of the input.  Look from the right of the string,
     since the exponent is usually a lot shorter than the mantissa.  */
  expptr = NULL;
  str_size = strlen (str);
  for (i = str_size - 1; i > 0; i--)
    {
      c = (unsigned char) str[i];
      if (c == '@' || (base <= 10 && (c == 'e' || c == 'E')))
	{
	  expptr = str + i + 1;
	  str_size = i;
	  break;
	}
    }

  TMP_MARK;
  s = begs = (char *) TMP_ALLOC (str_size + 1);

  /* Loop through mantissa, converting it from ASCII to raw byte values.  */
  for (i = 0; i < str_size; i++)
    {
      c = (unsigned char) *str;
      if (!isspace (c))
	{
	  int dig;

	  for (j = 0; j < pointlen; j++)
	    if (str[j] != point[j])
	      goto not_point;
	  if (1)
	    {
	      if (dotpos != 0)
		{
		  /* already saw a decimal point, another is invalid */
		  TMP_FREE;
		  return -1;
		}
	      dotpos = s;
	      str += pointlen - 1;
	      i += pointlen - 1;
	    }
	  else
	    {
	    not_point:
	      dig = digit_value[c];
	      if (dig >= base)
		{
		  TMP_FREE;
		  return -1;
		}
	      *s++ = dig;
	    }
	}
      c = (unsigned char) *++str;
    }

  str_size = s - begs;

  {
    long exp_in_base;
    mp_size_t ra, ma, rn, mn;
    int cnt;
    mp_ptr mp, tp, rp;
    mp_exp_t exp_in_limbs;
    mp_size_t prec = PREC(x) + 1;
    int divflag;
    mp_size_t madj, radj;

#if 0
    size_t n_chars_needed;

    /* This breaks things like 0.000...0001.  To safely ignore superfluous
       digits, we need to skip over leading zeros.  */
    /* Just consider the relevant leading digits of the mantissa.  */
    LIMBS_PER_DIGIT_IN_BASE (n_chars_needed, prec, base);
    if (str_size > n_chars_needed)
      str_size = n_chars_needed;
#endif

    LIMBS_PER_DIGIT_IN_BASE (ma, str_size, base);
    mp = TMP_ALLOC_LIMBS (ma);
    mn = mpn_set_str (mp, (unsigned char *) begs, str_size, base);

    if (mn == 0)
      {
	SIZ(x) = 0;
	EXP(x) = 0;
	TMP_FREE;
	return 0;
      }

    madj = 0;
    /* Ignore excess limbs in MP,MSIZE.  */
    if (mn > prec)
      {
	madj = mn - prec;
	mp += mn - prec;
	mn = prec;
      }

    if (expptr != 0)
      {
	/* Scan and convert the exponent, in base exp_base.  */
	long dig, minus, plusminus;
	c = (unsigned char) *expptr;
	minus = -(long) (c == '-');
	plusminus = minus | -(long) (c == '+');
	expptr -= plusminus;			/* conditional increment */
	c = (unsigned char) *expptr++;
	dig = digit_value[c];
	if (dig >= exp_base)
	  {
	    TMP_FREE;
	    return -1;
	  }
	exp_in_base = dig;
	c = (unsigned char) *expptr++;
	dig = digit_value[c];
	while (dig < exp_base)
	  {
	    exp_in_base = exp_in_base * exp_base;
	    exp_in_base += dig;
	    c = (unsigned char) *expptr++;
	    dig = digit_value[c];
	  }
	exp_in_base = (exp_in_base ^ minus) - minus; /* conditional negation */
      }
    else
      exp_in_base = 0;
    if (dotpos != 0)
      exp_in_base -= s - dotpos;
    divflag = exp_in_base < 0;
    exp_in_base = ABS (exp_in_base);

    if (exp_in_base == 0)
      {
	MPN_COPY (PTR(x), mp, mn);
	SIZ(x) = negative ? -mn : mn;
	EXP(x) = mn + madj;
	TMP_FREE;
	return 0;
      }

    ra = 2 * (prec + 1);
    rp = TMP_ALLOC_LIMBS (ra);
    tp = TMP_ALLOC_LIMBS (ra);
    rn = mpn_pow_1_highpart (rp, &radj, (mp_limb_t) base, exp_in_base, prec, tp);

    if (divflag)
      {
#if 0
	/* FIXME: Should use mpn_div_q here.  */
	...
	mpn_div_q (tp, mp, mn, rp, rn, scratch);
	...
#else
	mp_ptr qp;
	mp_limb_t qlimb;
	if (mn < rn)
	  {
	    /* Pad out MP,MSIZE for current divrem semantics.  */
	    mp_ptr tmp = TMP_ALLOC_LIMBS (rn + 1);
	    MPN_ZERO (tmp, rn - mn);
	    MPN_COPY (tmp + rn - mn, mp, mn);
	    mp = tmp;
	    madj -= rn - mn;
	    mn = rn;
	  }
	if ((rp[rn - 1] & GMP_NUMB_HIGHBIT) == 0)
	  {
	    mp_limb_t cy;
	    count_leading_zeros (cnt, rp[rn - 1]);
	    cnt -= GMP_NAIL_BITS;
	    mpn_lshift (rp, rp, rn, cnt);
	    cy = mpn_lshift (mp, mp, mn, cnt);
	    if (cy)
	      mp[mn++] = cy;
	  }

	qp = TMP_ALLOC_LIMBS (prec + 1);
	qlimb = mpn_divrem (qp, prec - (mn - rn), mp, mn, rp, rn);
	tp = qp;
	exp_in_limbs = qlimb + (mn - rn) + (madj - radj);
	rn = prec;
	if (qlimb != 0)
	  {
	    tp[prec] = qlimb;
	    /* Skip the least significant limb not to overrun the destination
	       variable.  */
	    tp++;
	  }
#endif
      }
    else
      {
	tp = TMP_ALLOC_LIMBS (rn + mn);
	if (rn > mn)
	  mpn_mul (tp, rp, rn, mp, mn);
	else
	  mpn_mul (tp, mp, mn, rp, rn);
	rn += mn;
	rn -= tp[rn - 1] == 0;
	exp_in_limbs = rn + madj + radj;

	if (rn > prec)
	  {
	    tp += rn - prec;
	    rn = prec;
	    exp_in_limbs += 0;
	  }
      }

    MPN_COPY (PTR(x), tp, rn);
    SIZ(x) = negative ? -rn : rn;
    EXP(x) = exp_in_limbs;
    TMP_FREE;
    return 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x58(%rbp)
movl $0x10000, %edi          # imm = 0x10000
callq 0x62b0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x6170
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
callq 0x6370
movq (%rax), %rax
movslq -0x4c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x33825
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl 0x1(%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x337f3
movl $0x0, -0x50(%rbp)
cmpl $0x2d, -0x4c(%rbp)
jne 0x3384f
movl $0x1, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl 0x1(%rax), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x3385c
movl $0xa, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x33877
movl $0xa, -0x64(%rbp)
xorl %eax, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
leaq 0x30382(%rip), %rax     # 0x63c00
movq %rax, -0x80(%rbp)
cmpl $0x24, -0x1c(%rbp)
jle 0x338aa
movq -0x80(%rbp), %rax
addq $0xd0, %rax
movq %rax, -0x80(%rbp)
cmpl $0x3e, -0x1c(%rbp)
jle 0x338a8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x347e6
jmp 0x338aa
movq -0x80(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl -0x1c(%rbp), %eax
jl 0x3392c
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0x33905
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x70(%rbp), %rcx
movq -0x40(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x338f5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x347e6
jmp 0x338f7
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x338c3
movq -0x80(%rbp), %rax
movq -0x18(%rbp), %rcx
movq -0x78(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movzbl (%rax,%rcx), %eax
cmpl -0x1c(%rbp), %eax
jl 0x3392a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x347e6
jmp 0x3392c
movq $0x0, -0x60(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6170
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jbe 0x339a5
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x40, -0x4c(%rbp)
je 0x3397b
cmpl $0xa, -0x1c(%rbp)
jg 0x33995
cmpl $0x65, -0x4c(%rbp)
je 0x3397b
cmpl $0x45, -0x4c(%rbp)
jne 0x33995
movq -0x18(%rbp), %rax
addq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x339a5
jmp 0x33997
movq -0x40(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3394d
movq $0x0, -0x88(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x339f7
movq -0x28(%rbp), %rcx
addq $0x10, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x178(%rbp)
jmp 0x33a12
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
leaq -0x88(%rbp), %rdi
callq 0x56430
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %rax, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x33bba
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
callq 0x6370
movq (%rax), %rax
movslq -0x4c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x33b93
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0x33aa2
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x70(%rbp), %rcx
movq -0x48(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x33a92
jmp 0x33b1c
jmp 0x33a94
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x33a67
movb $0x1, %al
testb $0x1, %al
jne 0x33aaa
jmp 0x33b1a
cmpq $0x0, -0x58(%rbp)
je 0x33af0
jmp 0x33ab3
cmpq $0x0, -0x88(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x33ae2
movq -0x88(%rbp), %rdi
callq 0x564a0
jmp 0x33ae4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x347e6
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x78(%rbp), %rax
subq $0x1, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x78(%rbp), %rax
subq $0x1, %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x33b91
jmp 0x33b1c
movq -0x80(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x33b78
jmp 0x33b3b
cmpq $0x0, -0x88(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x33b6a
movq -0x88(%rbp), %rdi
callq 0x564a0
jmp 0x33b6c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x347e6
movl -0x8c(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0x33b93
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl 0x1(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x33a29
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
cltq
movq %rax, -0xe8(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x2d67a(%rip), %rax     # 0x61260
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq %rcx, -0x168(%rbp)
mulq -0x168(%rbp)
movq %rax, -0x110(%rbp)
movq %rdx, -0x108(%rbp)
movq -0x108(%rbp), %rax
shlq $0x3, %rax
shrq $0x6, %rax
addq $0x2, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x33c7c
movq -0xa8(%rbp), %rax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x180(%rbp)
jmp 0x33c9a
movq -0xa8(%rbp), %rsi
shlq $0x3, %rsi
leaq -0x88(%rbp), %rdi
callq 0x56430
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x3a4a0
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
jne 0x33d24
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpq $0x0, -0x88(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x33d16
movq -0x88(%rbp), %rdi
callq 0x564a0
jmp 0x33d18
movl $0x0, -0x4(%rbp)
jmp 0x347e6
movq $0x0, -0xf8(%rbp)
movq -0xb8(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jle 0x33d82
movq -0xb8(%rbp), %rax
subq -0xe8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xb8(%rbp), %rax
subq -0xe8(%rbp), %rax
shlq $0x3, %rax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x33f1f
movq -0x60(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x2d, -0x4c(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
cmpl $0x2b, -0x4c(%rbp)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdx
movq -0x60(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x80(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpq %rcx, %rax
jl 0x33e66
jmp 0x33e29
cmpq $0x0, -0x88(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x33e58
movq -0x88(%rbp), %rdi
callq 0x564a0
jmp 0x33e5a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x347e6
movq -0x118(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x80(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpq %rcx, %rax
jge 0x33f01
movq -0x98(%rbp), %rax
movslq -0x64(%rbp), %rcx
imulq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x118(%rbp), %rax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x80(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x118(%rbp)
jmp 0x33e9c
movq -0x98(%rbp), %rax
xorq -0x120(%rbp), %rax
subq -0x120(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x33f2a
movq $0x0, -0x98(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x33f4d
movq -0x30(%rbp), %rcx
movq -0x58(%rbp), %rax
subq %rax, %rcx
movq -0x98(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xec(%rbp)
cmpq $0x0, -0x98(%rbp)
jl 0x33f7d
movq -0x98(%rbp), %rax
movq %rax, -0x188(%rbp)
jmp 0x33f8d
xorl %eax, %eax
subq -0x98(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
jne 0x3405f
jmp 0x33fab
jmp 0x33fad
jmp 0x33faf
jmp 0x33fb1
jmp 0x33fb3
jmp 0x33fb5
jmp 0x33fb7
jmp 0x33fb9
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0xc8(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0x554c6
jmp 0x33fd6
cmpl $0x0, -0x50(%rbp)
je 0x33fee
xorl %eax, %eax
subq -0xb8(%rbp), %rax
movq %rax, -0x190(%rbp)
jmp 0x33ffc
movq -0xb8(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xb8(%rbp), %rcx
addq -0xf8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x88(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x34051
movq -0x88(%rbp), %rdi
callq 0x564a0
jmp 0x34053
movl $0x0, -0x4(%rbp)
jmp 0x347e6
movq -0xe8(%rbp), %rax
addq $0x1, %rax
shlq %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x340c5
movq -0xa0(%rbp), %rax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x198(%rbp)
jmp 0x340e3
movq -0xa0(%rbp), %rsi
shlq $0x3, %rsi
leaq -0x88(%rbp), %rdi
callq 0x56430
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xa0(%rbp), %rax
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x34142
movq -0xa0(%rbp), %rax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x1a0(%rbp)
jmp 0x34160
movq -0xa0(%rbp), %rsi
shlq $0x3, %rsi
leaq -0x88(%rbp), %rdi
callq 0x56430
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd8(%rbp), %rdi
movslq -0x1c(%rbp), %rdx
movq -0x98(%rbp), %rcx
movq -0xe8(%rbp), %r8
movq -0xd0(%rbp), %r9
leaq -0x100(%rbp), %rsi
callq 0x347f0
movq %rax, -0xb0(%rbp)
cmpl $0x0, -0xec(%rbp)
je 0x3458f
movq -0xb8(%rbp), %rax
cmpq -0xb0(%rbp), %rax
jge 0x34347
movq -0xb0(%rbp), %rax
addq $0x1, %rax
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x34217
movq -0xb0(%rbp), %rax
leaq 0x17(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x1a8(%rbp)
jmp 0x34239
movq -0xb0(%rbp), %rsi
addq $0x1, %rsi
shlq $0x3, %rsi
leaq -0x88(%rbp), %rdi
callq 0x56430
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x140(%rbp)
jmp 0x34249
jmp 0x3424b
movq -0xb0(%rbp), %rax
subq -0xb8(%rbp), %rax
cmpq $0x0, %rax
je 0x342c0
jmp 0x34261
movq -0x140(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0xb0(%rbp), %rax
subq -0xb8(%rbp), %rax
movq %rax, -0x150(%rbp)
jmp 0x34286
jmp 0x34288
movq -0x148(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x148(%rbp)
movq $0x0, (%rax)
movq -0x150(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x150(%rbp)
cmpq $0x0, %rax
jne 0x34288
jmp 0x342be
jmp 0x342c0
jmp 0x342c2
jmp 0x342c4
jmp 0x342c6
jmp 0x342c8
jmp 0x342ca
jmp 0x342cc
jmp 0x342ce
jmp 0x342d0
jmp 0x342d2
movq -0x140(%rbp), %rdi
movq -0xb0(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
xorl %eax, %eax
subq -0xb8(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0xc8(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0x554c6
jmp 0x3430c
movq -0x140(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xb0(%rbp), %rcx
subq -0xb8(%rbp), %rcx
movq -0xf8(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xd8(%rbp), %rcx
movq -0xb0(%rbp), %rdx
subq $0x1, %rdx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
jne 0x3443d
jmp 0x34373
jmp 0x34375
jmp 0x34377
movq -0xd8(%rbp), %rax
movq -0xb0(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x170(%rbp)
bsrq -0x170(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
xorq $0x3f, %rax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
subl $0x0, %eax
movl %eax, -0xbc(%rbp)
movq -0xd8(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movl -0xbc(%rbp), %ecx
callq 0x37320
movq -0xc8(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movl -0xbc(%rbp), %ecx
callq 0x37320
movq %rax, -0x158(%rbp)
cmpq $0x0, -0x158(%rbp)
je 0x3443b
movq -0x158(%rbp), %rdx
movq -0xc8(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xb8(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x3443d
movq -0xe8(%rbp), %rax
addq $0x1, %rax
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x34492
movq -0xe8(%rbp), %rax
leaq 0x17(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x1b0(%rbp)
jmp 0x344b4
movq -0xe8(%rbp), %rsi
addq $0x1, %rsi
shlq $0x3, %rsi
leaq -0x88(%rbp), %rdi
callq 0x56430
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0xb8(%rbp), %rax
subq -0xb0(%rbp), %rax
subq %rax, %rsi
movq -0xc8(%rbp), %rdx
movq -0xb8(%rbp), %rcx
movq -0xd8(%rbp), %r8
movq -0xb0(%rbp), %r9
callq 0x37530
movq %rax, -0x138(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x138(%rbp), %rax
movq -0xb8(%rbp), %rcx
subq -0xb0(%rbp), %rcx
addq %rcx, %rax
movq -0xf8(%rbp), %rcx
subq -0x100(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0x138(%rbp)
je 0x3458a
movq -0x138(%rbp), %rdx
movq -0xd0(%rbp), %rax
movq -0xe8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0xd0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xd0(%rbp)
jmp 0x3473c
movq -0xb0(%rbp), %rax
addq -0xb8(%rbp), %rax
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x345f1
movq -0xb0(%rbp), %rax
movq -0xb8(%rbp), %rcx
addq %rcx, %rax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x1b8(%rbp)
jmp 0x34616
movq -0xb0(%rbp), %rsi
addq -0xb8(%rbp), %rsi
shlq $0x3, %rsi
leaq -0x88(%rbp), %rdi
callq 0x56430
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jle 0x3465e
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movq -0xc8(%rbp), %rcx
movq -0xb8(%rbp), %r8
callq 0x37f00
jmp 0x34686
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movq -0xb0(%rbp), %r8
callq 0x37f00
movq -0xb8(%rbp), %rax
addq -0xb0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xd0(%rbp), %rax
movq -0xb0(%rbp), %rcx
subq $0x1, %rcx
cmpq $0x0, (%rax,%rcx,8)
sete %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
movq -0xb0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
addq -0xf8(%rbp), %rax
addq -0x100(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jle 0x3473a
movq -0xb0(%rbp), %rax
subq -0xe8(%rbp), %rax
shlq $0x3, %rax
addq -0xd0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xe0(%rbp), %rax
addq $0x0, %rax
movq %rax, -0xe0(%rbp)
jmp 0x3473c
jmp 0x3473e
jmp 0x34740
jmp 0x34742
jmp 0x34744
jmp 0x34746
jmp 0x34748
jmp 0x3474a
jmp 0x3474c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0xd0(%rbp), %rsi
movq -0xb0(%rbp), %rdx
callq 0x554c6
jmp 0x34769
cmpl $0x0, -0x50(%rbp)
je 0x34781
xorl %eax, %eax
subq -0xb0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
jmp 0x3478f
movq -0xb0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xe0(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x88(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x347dd
movq -0x88(%rbp), %rdi
callq 0x564a0
jmp 0x347df
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nop