// File: tomfunkhouser[P]gaps/pkgs/jpeg/jdcoefct.c
// Function: decompress_smooth_data
METHODDEF(int)
decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
{
  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
  JDIMENSION block_num, last_block_column;
  int ci, block_row, block_rows, access_rows;
  JBLOCKARRAY buffer;
  JBLOCKROW buffer_ptr, prev_block_row, next_block_row;
  JSAMPARRAY output_ptr;
  JDIMENSION output_col;
  jpeg_component_info *compptr;
  inverse_DCT_method_ptr inverse_DCT;
  jboolean first_row, last_row;
  JBLOCK workspace;
  int *coef_bits;
  JQUANT_TBL *quanttbl;
  INT32 Q00,Q01,Q02,Q10,Q11,Q20, num;
  int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9;
  int Al, pred;

  /* Force some input to be done if we are getting ahead of the input. */
  while (cinfo->input_scan_number <= cinfo->output_scan_number &&
	 ! cinfo->inputctl->eoi_reached) {
    if (cinfo->input_scan_number == cinfo->output_scan_number) {
      /* If input is working on current scan, we ordinarily want it to
       * have completed the current row.  But if input scan is DC,
       * we want it to keep one row ahead so that next block row's DC
       * values are up to date.
       */
      JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0;
      if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta)
	break;
    }
    if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED)
      return JPEG_SUSPENDED;
  }

  /* OK, output from the virtual arrays. */
  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    /* Don't bother to IDCT an uninteresting component. */
    if (! compptr->component_needed)
      continue;
    /* Count non-dummy DCT block rows in this iMCU row. */
    if (cinfo->output_iMCU_row < last_iMCU_row) {
      block_rows = compptr->v_samp_factor;
      access_rows = block_rows * 2; /* this and next iMCU row */
      last_row = FALSE;
    } else {
      /* NB: can't use last_row_height here; it is input-side-dependent! */
      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
      if (block_rows == 0) block_rows = compptr->v_samp_factor;
      access_rows = block_rows; /* this iMCU row only */
      last_row = TRUE;
    }
    /* Align the virtual buffer for this component. */
    if (cinfo->output_iMCU_row > 0) {
      access_rows += compptr->v_samp_factor; /* prior iMCU row too */
      buffer = (*cinfo->mem->access_virt_barray)
	((j_common_ptr) cinfo, coef->whole_image[ci],
	 (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor,
	 (JDIMENSION) access_rows, FALSE);
      buffer += compptr->v_samp_factor;	/* point to current iMCU row */
      first_row = FALSE;
    } else {
      buffer = (*cinfo->mem->access_virt_barray)
	((j_common_ptr) cinfo, coef->whole_image[ci],
	 (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE);
      first_row = TRUE;
    }
    /* Fetch component-dependent info */
    coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS);
    quanttbl = compptr->quant_table;
    Q00 = quanttbl->quantval[0];
    Q01 = quanttbl->quantval[Q01_POS];
    Q10 = quanttbl->quantval[Q10_POS];
    Q20 = quanttbl->quantval[Q20_POS];
    Q11 = quanttbl->quantval[Q11_POS];
    Q02 = quanttbl->quantval[Q02_POS];
    inverse_DCT = cinfo->idct->inverse_DCT[ci];
    output_ptr = output_buf[ci];
    /* Loop over all DCT blocks to be processed. */
    for (block_row = 0; block_row < block_rows; block_row++) {
      buffer_ptr = buffer[block_row];
      if (first_row && block_row == 0)
	prev_block_row = buffer_ptr;
      else
	prev_block_row = buffer[block_row-1];
      if (last_row && block_row == block_rows-1)
	next_block_row = buffer_ptr;
      else
	next_block_row = buffer[block_row+1];
      /* We fetch the surrounding DC values using a sliding-register approach.
       * Initialize all nine here so as to do the right thing on narrow pics.
       */
      DC1 = DC2 = DC3 = (int) prev_block_row[0][0];
      DC4 = DC5 = DC6 = (int) buffer_ptr[0][0];
      DC7 = DC8 = DC9 = (int) next_block_row[0][0];
      output_col = 0;
      last_block_column = compptr->width_in_blocks - 1;
      for (block_num = 0; block_num <= last_block_column; block_num++) {
	/* Fetch current DCT block into workspace so we can modify it. */
	jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1);
	/* Update DC values */
	if (block_num < last_block_column) {
	  DC3 = (int) prev_block_row[1][0];
	  DC6 = (int) buffer_ptr[1][0];
	  DC9 = (int) next_block_row[1][0];
	}
	/* Compute coefficient estimates per K.8.
	 * An estimate is applied only if coefficient is still zero,
	 * and is not known to be fully accurate.
	 */
	/* AC01 */
	if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) {
	  num = 36 * Q00 * (DC4 - DC6);
	  if (num >= 0) {
	    pred = (int) (((Q01<<7) + num) / (Q01<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	  } else {
	    pred = (int) (((Q01<<7) - num) / (Q01<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	    pred = -pred;
	  }
	  workspace[1] = (JCOEF) pred;
	}
	/* AC10 */
	if ((Al=coef_bits[2]) != 0 && workspace[8] == 0) {
	  num = 36 * Q00 * (DC2 - DC8);
	  if (num >= 0) {
	    pred = (int) (((Q10<<7) + num) / (Q10<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	  } else {
	    pred = (int) (((Q10<<7) - num) / (Q10<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	    pred = -pred;
	  }
	  workspace[8] = (JCOEF) pred;
	}
	/* AC20 */
	if ((Al=coef_bits[3]) != 0 && workspace[16] == 0) {
	  num = 9 * Q00 * (DC2 + DC8 - 2*DC5);
	  if (num >= 0) {
	    pred = (int) (((Q20<<7) + num) / (Q20<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	  } else {
	    pred = (int) (((Q20<<7) - num) / (Q20<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	    pred = -pred;
	  }
	  workspace[16] = (JCOEF) pred;
	}
	/* AC11 */
	if ((Al=coef_bits[4]) != 0 && workspace[9] == 0) {
	  num = 5 * Q00 * (DC1 - DC3 - DC7 + DC9);
	  if (num >= 0) {
	    pred = (int) (((Q11<<7) + num) / (Q11<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	  } else {
	    pred = (int) (((Q11<<7) - num) / (Q11<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	    pred = -pred;
	  }
	  workspace[9] = (JCOEF) pred;
	}
	/* AC02 */
	if ((Al=coef_bits[5]) != 0 && workspace[2] == 0) {
	  num = 9 * Q00 * (DC4 + DC6 - 2*DC5);
	  if (num >= 0) {
	    pred = (int) (((Q02<<7) + num) / (Q02<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	  } else {
	    pred = (int) (((Q02<<7) - num) / (Q02<<8));
	    if (Al > 0 && pred >= (1<<Al))
	      pred = (1<<Al)-1;
	    pred = -pred;
	  }
	  workspace[2] = (JCOEF) pred;
	}
	/* OK, do the IDCT */
	(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) workspace,
			output_ptr, output_col);
	/* Advance for next column */
	DC1 = DC2; DC2 = DC3;
	DC4 = DC5; DC5 = DC6;
	DC7 = DC8; DC8 = DC9;
	buffer_ptr++, prev_block_row++, next_block_row++;
	output_col += compptr->DCT_scaled_size;
      }
      output_ptr += compptr->DCT_scaled_size;
    }
  }

  if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)
    return JPEG_ROW_COMPLETED;
  return JPEG_SCAN_COMPLETED;
}

// Assembly:
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x178(%rsp)
movq %rsi, 0x170(%rsp)
movq 0x178(%rsp), %rax
movq 0x230(%rax), %rax
movq %rax, 0x168(%rsp)
movq 0x178(%rsp), %rax
movl 0x1a4(%rax), %eax
subl $0x1, %eax
movl %eax, 0x164(%rsp)
movq 0x178(%rsp), %rax
movl 0xac(%rax), %ecx
movq 0x178(%rsp), %rdx
xorl %eax, %eax
cmpl 0xb4(%rdx), %ecx
movb %al, 0x7(%rsp)
jg 0xee046
movq 0x178(%rsp), %rax
movq 0x240(%rax), %rax
cmpl $0x0, 0x24(%rax)
setne %al
xorb $-0x1, %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xee053
jmp 0xee0ee
movq 0x178(%rsp), %rax
movl 0xac(%rax), %eax
movq 0x178(%rsp), %rcx
cmpl 0xb4(%rcx), %eax
jne 0xee0b8
movq 0x178(%rsp), %rax
movl 0x20c(%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, 0x8(%rsp)
movq 0x178(%rsp), %rax
movl 0xb0(%rax), %eax
movq 0x178(%rsp), %rcx
movl 0xb8(%rcx), %ecx
addl 0x8(%rsp), %ecx
cmpl %ecx, %eax
jbe 0xee0b6
jmp 0xee0ee
jmp 0xee0b8
movq 0x178(%rsp), %rax
movq 0x240(%rax), %rax
movq (%rax), %rax
movq 0x178(%rsp), %rdi
callq *%rax
cmpl $0x0, %eax
jne 0xee0e9
movl $0x0, 0x184(%rsp)
jmp 0xeebea
jmp 0xee006
movl $0x0, 0x158(%rsp)
movq 0x178(%rsp), %rax
movq 0x130(%rax), %rax
movq %rax, 0x110(%rsp)
movl 0x158(%rsp), %eax
movq 0x178(%rsp), %rcx
cmpl 0x38(%rcx), %eax
jge 0xeebab
movq 0x110(%rsp), %rax
cmpl $0x0, 0x30(%rax)
jne 0xee13b
jmp 0xeeb81
movq 0x178(%rsp), %rax
movl 0xb8(%rax), %eax
cmpl 0x164(%rsp), %eax
jae 0xee181
movq 0x110(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x150(%rsp)
movl 0x150(%rsp), %eax
shll %eax
movl %eax, 0x14c(%rsp)
movl $0x0, 0x100(%rsp)
jmp 0xee1d5
movq 0x110(%rsp), %rax
movl 0x20(%rax), %eax
movq 0x110(%rsp), %rcx
xorl %edx, %edx
divl 0xc(%rcx)
movl %edx, 0x150(%rsp)
cmpl $0x0, 0x150(%rsp)
jne 0xee1bc
movq 0x110(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x150(%rsp)
movl 0x150(%rsp), %eax
movl %eax, 0x14c(%rsp)
movl $0x1, 0x100(%rsp)
movq 0x178(%rsp), %rax
cmpl $0x0, 0xb8(%rax)
jbe 0xee296
movq 0x110(%rsp), %rax
movl 0xc(%rax), %eax
addl 0x14c(%rsp), %eax
movl %eax, 0x14c(%rsp)
movq 0x178(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x40(%rax), %rax
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rcx
movslq 0x158(%rsp), %rdx
movq 0x88(%rcx,%rdx,8), %rsi
movq 0x178(%rsp), %rcx
movl 0xb8(%rcx), %edx
subl $0x1, %edx
movq 0x110(%rsp), %rcx
imull 0xc(%rcx), %edx
movl 0x14c(%rsp), %ecx
xorl %r8d, %r8d
callq *%rax
movq %rax, 0x140(%rsp)
movq 0x110(%rsp), %rax
movl 0xc(%rax), %ecx
movq 0x140(%rsp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x140(%rsp)
movl $0x0, 0x104(%rsp)
jmp 0xee2e8
movq 0x178(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x40(%rax), %rax
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rcx
movslq 0x158(%rsp), %rdx
movq 0x88(%rcx,%rdx,8), %rsi
movl 0x14c(%rsp), %ecx
xorl %r8d, %r8d
movl %r8d, %edx
callq *%rax
movq %rax, 0x140(%rsp)
movl $0x1, 0x104(%rsp)
movq 0x168(%rsp), %rax
movq 0xd8(%rax), %rax
imull $0x6, 0x158(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x78(%rsp)
movq 0x110(%rsp), %rax
movq 0x50(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movzwl (%rax), %eax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
movzwl 0x2(%rax), %eax
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rax
movzwl 0x10(%rax), %eax
movq %rax, 0x50(%rsp)
movq 0x70(%rsp), %rax
movzwl 0x20(%rax), %eax
movq %rax, 0x40(%rsp)
movq 0x70(%rsp), %rax
movzwl 0x12(%rax), %eax
movq %rax, 0x48(%rsp)
movq 0x70(%rsp), %rax
movzwl 0x4(%rax), %eax
movq %rax, 0x58(%rsp)
movq 0x178(%rsp), %rax
movq 0x258(%rax), %rax
movslq 0x158(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, 0x108(%rsp)
movq 0x170(%rsp), %rax
movslq 0x158(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x120(%rsp)
movl $0x0, 0x154(%rsp)
movl 0x154(%rsp), %eax
cmpl 0x150(%rsp), %eax
jge 0xeeb7f
movq 0x140(%rsp), %rax
movslq 0x154(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x138(%rsp)
cmpl $0x0, 0x104(%rsp)
je 0xee413
cmpl $0x0, 0x154(%rsp)
jne 0xee413
movq 0x138(%rsp), %rax
movq %rax, 0x130(%rsp)
jmp 0xee434
movq 0x140(%rsp), %rax
movl 0x154(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x130(%rsp)
cmpl $0x0, 0x100(%rsp)
je 0xee465
movl 0x154(%rsp), %eax
movl 0x150(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0xee465
movq 0x138(%rsp), %rax
movq %rax, 0x128(%rsp)
jmp 0xee486
movq 0x140(%rsp), %rax
movl 0x154(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x128(%rsp)
movq 0x130(%rsp), %rax
movswl (%rax), %eax
movl %eax, 0x2c(%rsp)
movl %eax, 0x30(%rsp)
movl %eax, 0x34(%rsp)
movq 0x138(%rsp), %rax
movswl (%rax), %eax
movl %eax, 0x20(%rsp)
movl %eax, 0x24(%rsp)
movl %eax, 0x28(%rsp)
movq 0x128(%rsp), %rax
movswl (%rax), %eax
movl %eax, 0x14(%rsp)
movl %eax, 0x18(%rsp)
movl %eax, 0x1c(%rsp)
movl $0x0, 0x11c(%rsp)
movq 0x110(%rsp), %rax
movl 0x1c(%rax), %eax
subl $0x1, %eax
movl %eax, 0x15c(%rsp)
movl $0x0, 0x160(%rsp)
movl 0x160(%rsp), %eax
cmpl 0x15c(%rsp), %eax
ja 0xeeb44
movq 0x138(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x1, %edx
callq 0xf9440
movl 0x160(%rsp), %eax
cmpl 0x15c(%rsp), %eax
jae 0xee56d
movq 0x130(%rsp), %rax
movswl 0x80(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x138(%rsp), %rax
movswl 0x80(%rax), %eax
movl %eax, 0x20(%rsp)
movq 0x128(%rsp), %rax
movswl 0x80(%rax), %eax
movl %eax, 0x14(%rsp)
movq 0x78(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, %eax
je 0xee669
movswl 0x82(%rsp), %eax
cmpl $0x0, %eax
jne 0xee669
imulq $0x24, 0x68(%rsp), %rax
movl 0x28(%rsp), %ecx
subl 0x20(%rsp), %ecx
movslq %ecx, %rcx
imulq %rcx, %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jl 0xee605
movq 0x60(%rsp), %rax
shlq $0x7, %rax
addq 0x38(%rsp), %rax
movq 0x60(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xee603
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xee603
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xee65d
movq 0x60(%rsp), %rax
shlq $0x7, %rax
subq 0x38(%rsp), %rax
movq 0x60(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xee653
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xee653
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
subl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movw %ax, 0x82(%rsp)
movq 0x78(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, %eax
je 0xee765
movswl 0x90(%rsp), %eax
cmpl $0x0, %eax
jne 0xee765
imulq $0x24, 0x68(%rsp), %rax
movl 0x30(%rsp), %ecx
subl 0x18(%rsp), %ecx
movslq %ecx, %rcx
imulq %rcx, %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jl 0xee701
movq 0x50(%rsp), %rax
shlq $0x7, %rax
addq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xee6ff
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xee6ff
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xee759
movq 0x50(%rsp), %rax
shlq $0x7, %rax
subq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xee74f
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xee74f
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
subl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movw %ax, 0x90(%rsp)
movq 0x78(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, %eax
je 0xee869
movswl 0xa0(%rsp), %eax
cmpl $0x0, %eax
jne 0xee869
imulq $0x9, 0x68(%rsp), %rax
movl 0x30(%rsp), %ecx
addl 0x18(%rsp), %ecx
movl 0x24(%rsp), %edx
shll %edx
subl %edx, %ecx
movslq %ecx, %rcx
imulq %rcx, %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jl 0xee805
movq 0x40(%rsp), %rax
shlq $0x7, %rax
addq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xee803
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xee803
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xee85d
movq 0x40(%rsp), %rax
shlq $0x7, %rax
subq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xee853
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xee853
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
subl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movw %ax, 0xa0(%rsp)
movq 0x78(%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, %eax
je 0xee96d
movswl 0x92(%rsp), %eax
cmpl $0x0, %eax
jne 0xee96d
imulq $0x5, 0x68(%rsp), %rax
movl 0x34(%rsp), %ecx
subl 0x2c(%rsp), %ecx
subl 0x1c(%rsp), %ecx
addl 0x14(%rsp), %ecx
movslq %ecx, %rcx
imulq %rcx, %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jl 0xee909
movq 0x48(%rsp), %rax
shlq $0x7, %rax
addq 0x38(%rsp), %rax
movq 0x48(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xee907
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xee907
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xee961
movq 0x48(%rsp), %rax
shlq $0x7, %rax
subq 0x38(%rsp), %rax
movq 0x48(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xee957
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xee957
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
subl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movw %ax, 0x92(%rsp)
movq 0x78(%rsp), %rax
movl 0x14(%rax), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, %eax
je 0xeea71
movswl 0x84(%rsp), %eax
cmpl $0x0, %eax
jne 0xeea71
imulq $0x9, 0x68(%rsp), %rax
movl 0x28(%rsp), %ecx
addl 0x20(%rsp), %ecx
movl 0x24(%rsp), %edx
shll %edx
subl %edx, %ecx
movslq %ecx, %rcx
imulq %rcx, %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jl 0xeea0d
movq 0x58(%rsp), %rax
shlq $0x7, %rax
addq 0x38(%rsp), %rax
movq 0x58(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xeea0b
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xeea0b
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xeea65
movq 0x58(%rsp), %rax
shlq $0x7, %rax
subq 0x38(%rsp), %rax
movq 0x58(%rsp), %rcx
shlq $0x8, %rcx
cqto
idivq %rcx
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xeea5b
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0xeea5b
movl 0x10(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
subl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movw %ax, 0x84(%rsp)
movq 0x108(%rsp), %rax
movq 0x178(%rsp), %rdi
movq 0x110(%rsp), %rsi
leaq 0x80(%rsp), %rdx
movq 0x120(%rsp), %rcx
movl 0x11c(%rsp), %r8d
callq *%rax
movl 0x30(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x30(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x138(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x138(%rsp)
movq 0x130(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x130(%rsp)
movq 0x128(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x128(%rsp)
movq 0x110(%rsp), %rax
movl 0x24(%rax), %eax
addl 0x11c(%rsp), %eax
movl %eax, 0x11c(%rsp)
movl 0x160(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x160(%rsp)
jmp 0xee4f6
movq 0x110(%rsp), %rax
movl 0x24(%rax), %ecx
movq 0x120(%rsp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x120(%rsp)
movl 0x154(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x154(%rsp)
jmp 0xee3bd
jmp 0xeeb81
movl 0x158(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x158(%rsp)
movq 0x110(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x110(%rsp)
jmp 0xee110
movq 0x178(%rsp), %rcx
movl 0xb8(%rcx), %eax
addl $0x1, %eax
movl %eax, 0xb8(%rcx)
movq 0x178(%rsp), %rcx
cmpl 0x1a4(%rcx), %eax
jae 0xeebdf
movl $0x3, 0x184(%rsp)
jmp 0xeebea
movl $0x4, 0x184(%rsp)
movl 0x184(%rsp), %eax
addq $0x188, %rsp            # imm = 0x188
retq
nopl (%rax)