// File: /workspace/github_c_makefile_star2_O0/sTeeLM[P]dwipe/gui.c
// Function: dwipe_gui_status
void dwipe_gui_status( int count, dwipe_context_t* c )
{
/**
 * Shows runtime statistics and overall progress.
 *
 * @parameter count           The number of contexts in the array.
 * @parameter c               An array of device contexts.
 *
 * @modifies  main_window     Prints information into the main window.
 * @modifies  c[].throughput  Updates the i/o throughput value. 
 *
 */

	/* Throughput print formats. */
	char* dwipe_tera = "%llu TB/s";
	char* dwipe_giga = "%llu GB/s";
	char* dwipe_mega = "%llu MB/s";
	char* dwipe_kilo = "%llu KB/s";
	char* dwipe_unit = "%llu B/s";

	/* The throughput format pointer. */
	char* dwipe_format;

	/* We count time from when this function is first called. */
	static time_t dwipe_time_start = 0;

	/* The current time. */
	time_t dwipe_time_now;

	/* The index of the element that is visible in the first slot. */
	static int offset;

	/* The number of elements that we can show in the window. */
	int slots;

	/* Window dimensions. */
	int wlines;
	int wcols;

	/* Generic loop variable. */
	int i;

	/* The current working line in the main window. */
	int yy;

	/* User input buffer. */
	int keystroke;

	/* The combined througput of all processes. */
	u64 dwipe_throughput = 0;

	/* The estimated runtime of the slowest device. */
	time_t dwipe_maxeta = 0;

	/* The combined number of errors of all processes. */
	u64 dwipe_errors = 0;

	/* Time values. */
	int dwipe_hh;
	int dwipe_mm;
	int dwipe_ss;

	/* The number of active wipe processes. */
	int dwipe_active = 0;


	if( dwipe_time_start == 0 )
	{
		/* This is the first time that we have been called. */
		dwipe_time_start = time( NULL ) -1;
	}

	/* Get the window dimensions. */
	getmaxyx( main_window, wlines, wcols );

	/* Less four lines for the box and padding. */
	slots = wlines - 4;

	/* Each element prints three lines. */
	slots /= 3;

	/* Get the current time. */
	dwipe_time_now = time( NULL );

	/* Erase the main window. */
	werase( main_window );

	/* Erase the stats window. */
	werase( stats_window );

	/* Initialize our working offset to the third line. */
	yy = 2;


	/* Try to get a keystroke. */
	keystroke = getch();

	switch( keystroke )
	{
			case KEY_DOWN:
			case 'j':
			case 'J':

				/* Scroll down. */
				offset += 1;

				if( count < slots )
				{
					offset = 0;
				}

				else if( offset + slots > count )
				{
					offset = count - slots;
				}

				break;

			case KEY_UP:
			case 'k':
			case 'K':

				/* Scroll up. */
				offset -= 1;

				if( offset < 0 )
				{
					offset = 0;
				}

				break;

			default:

				/* Do nothing. */
				break;

	} /* keystroke */


	/* Enumerate all contexts to compute statistics. */
	for( i = 0 ; i < count ; i++ )
	{
		/* Check whether the child process is still running the wipe. */
		if( c[i].pid > 0 )
		{
			/* Increment the child counter. */
			dwipe_active += 1;

			/* Maintain a rolling average of throughput. */
			dwipe_update_speedring( &c[i].speedring, c[i].round_done, dwipe_time_now );

			if( c[i].speedring.timestotal > 0 )
			{
				/* Update the current average throughput in bytes-per-second. */
				c[i].throughput = c[i].speedring.bytestotal / c[i].speedring.timestotal;

				/* Update the estimated remaining runtime. */
				c[i].eta = ( c[i].round_size - c[i].round_done ) / c[i].throughput;

				if( c[i].eta > dwipe_maxeta )
				{
					dwipe_maxeta = c[i].eta;
				}
			}

			/* Update the percentage value. */
			c[i].round_percent = (double) c[i].round_done / (double) c[i].round_size * 100;

			/* Accumulate combined throughput. */
			dwipe_throughput += c[i].throughput;

		} /* child running */

		/* Accumulate the error count. */
		dwipe_errors += c[i].pass_errors;
		dwipe_errors += c[i].verify_errors;

	} /* for statistics */


	/* Print information for the user. */
	for( i = offset ; i < offset + slots && i < count ; i++ )
	{
		/* Print the context label. */
		mvwprintw( main_window, yy++, 2, "%s", c[i].label );

		/* Check whether the child process is still running the wipe. */
		if( c[i].pid > 0 )
		{
			/* Print percentage and pass information. */
			mvwprintw( main_window, yy++, 4, "[%05.2f%%, round %i of %i, pass %i of %i] ", \
			  c[i].round_percent, c[i].round_working, c[i].round_count, c[i].pass_working, c[i].pass_count );

		} /* child running */

		else
		{
			if( c[i].result == 0 ) { mvwprintw( main_window, yy++, 4, "(success) " );                         }
			else if( c[i].signal ) { mvwprintw( main_window, yy++, 4, "(failure, signal %i) ", c[i].signal ); }
			else                   { mvwprintw( main_window, yy++, 4, "(failure, code %i) ", c[i].result );   }

		} /* child returned */

		if( c[i].verify_errors ) { wprintw( main_window, "[verify errors: %llu] ", c[i].verify_errors ); }
 		if( c[i].pass_errors   ) { wprintw( main_window, "[pass errors: %llu] ",   c[i].pass_errors   ); }


		switch( c[i].pass_type )
		{
			case DWIPE_PASS_FINAL_BLANK:
  				wprintw( main_window, "[blanking] " );
				break;

			case DWIPE_PASS_FINAL_OPS2:
  				wprintw( main_window, "[OPS-II final] " );
				break;

			case DWIPE_PASS_WRITE:
				wprintw( main_window, "[writing] " );
				break;

			case DWIPE_PASS_VERIFY:
				wprintw( main_window, "[verifying] " );
				break;

			case DWIPE_PASS_NONE:
				break;
		}

  		if( c[i].sync_status   ) { wprintw( main_window, "[syncing] "   ); }

		     if( c[i].throughput >= INT64_C( 1000000000000000 ) )
			    { wprintw( main_window, "[%llu TB/s] ", c[i].throughput / INT64_C( 1000000000000 ) ); }
		else if( c[i].throughput >= INT64_C( 1000000000000    ) )
		       { wprintw( main_window, "[%llu GB/s] ", c[i].throughput / INT64_C( 1000000000    ) ); }
		else if( c[i].throughput >= INT64_C( 1000000000       ) )
		       { wprintw( main_window, "[%llu MB/s] ", c[i].throughput / INT64_C( 1000000       ) ); }
		else if( c[i].throughput >= INT64_C( 1000000          ) )
		       { wprintw( main_window, "[%llu KB/s] ", c[i].throughput / INT64_C( 1000          ) ); }
		else
		       { wprintw( main_window, "[%llu B/s] ",  c[i].throughput / INT64_C( 1             ) ); }

		/* Insert whitespace. */
		yy += 1;

	} /* for */

	if( offset > 0 )
	{
		mvwprintw( main_window, 1, wcols -8, " More " );
		waddch( main_window, ACS_UARROW );
	}

	if( count - offset > slots )
	{
		mvwprintw( main_window, wlines -2, wcols -8, " More " );
		waddch( main_window, ACS_DARROW );
	}


	/* Box the main window. */
	box( main_window, 0, 0 );

	/* Refresh the main window. */
	wrefresh( main_window );

	/* Update the load average field. */
	dwipe_gui_load();


	     if( dwipe_throughput >= INT64_C( 1000000000000000 ) )
		    { dwipe_throughput /= INT64_C( 1000000000000    ); dwipe_format = dwipe_tera; }
	else if( dwipe_throughput >= INT64_C( 1000000000000    ) )
	       { dwipe_throughput /= INT64_C( 1000000000       ); dwipe_format = dwipe_giga; }
	else if( dwipe_throughput >= INT64_C( 1000000000       ) )
	       { dwipe_throughput /= INT64_C( 1000000          ); dwipe_format = dwipe_mega; }
	else if( dwipe_throughput >= INT64_C( 1000000          ) )
	       { dwipe_throughput /= INT64_C( 1000             ); dwipe_format = dwipe_kilo; }
	else
	       { dwipe_throughput /= INT64_C( 1                ); dwipe_format = dwipe_unit; }

	/* Print the combined throughput. */
	mvwprintw( stats_window, DWIPE_GUI_STATS_THROUGHPUT_Y, DWIPE_GUI_STATS_THROUGHPUT_X, "Throughput:" );

	if( dwipe_throughput > 0 )
	{
		mvwprintw( stats_window, DWIPE_GUI_STATS_THROUGHPUT_Y, DWIPE_GUI_STATS_TAB, dwipe_format, dwipe_throughput );
	}

	/* Change the current time into a delta. */
	dwipe_time_now -= dwipe_time_start;

	/* Put the delta into HH:mm:ss form. */
	dwipe_hh = dwipe_time_now / 3600;
	dwipe_time_now %= 3600;
	dwipe_mm = dwipe_time_now / 60;
	dwipe_time_now %= 60;
	dwipe_ss = dwipe_time_now;

	/* Print the runtime. */
	mvwprintw( stats_window, DWIPE_GUI_STATS_RUNTIME_Y, 1, "Runtime:" );
	mvwprintw( stats_window, DWIPE_GUI_STATS_RUNTIME_Y, DWIPE_GUI_STATS_TAB, "%02i:%02i:%02i", dwipe_hh, dwipe_mm, dwipe_ss );

	mvwprintw( stats_window, DWIPE_GUI_STATS_ETA_Y, 1, "Remaining:" );

	if( dwipe_maxeta > 0 )
	{
		/* Do it again for the estimated runtime remaining. */
		dwipe_hh = dwipe_maxeta / 3600;
		dwipe_maxeta %= 3600;
		dwipe_mm = dwipe_maxeta / 60;
		dwipe_maxeta %= 60;
		dwipe_ss = dwipe_maxeta;
	
		/* Print the estimated runtime remaining. */
		mvwprintw( stats_window, DWIPE_GUI_STATS_ETA_Y, DWIPE_GUI_STATS_TAB, "%02i:%02i:%02i", dwipe_hh, dwipe_mm, dwipe_ss );
	}

	/* Print the error count. */
	mvwprintw( stats_window, DWIPE_GUI_STATS_ERRORS_Y, DWIPE_GUI_STATS_ERRORS_X, "Errors:" );
	mvwprintw( stats_window, DWIPE_GUI_STATS_ERRORS_Y, DWIPE_GUI_STATS_TAB, "%llu", dwipe_errors );

	/* Add a border. */
	box( stats_window, 0, 0 );

	/* Add a title. */
	mvwprintw( stats_window, 0, ( DWIPE_GUI_STATS_W - strlen( stats_title ) ) /2, "%s", stats_title );

	/* Refresh the stats window. */
	wrefresh( stats_window );

}

// Assembly:
subq $0xc8, %rsp
movl %edi, 0xc4(%rsp)
movq %rsi, 0xb8(%rsp)
leaq 0x8570(%rip), %rax      # 0x1109d
movq %rax, 0xb0(%rsp)
leaq 0x856b(%rip), %rax      # 0x110a7
movq %rax, 0xa8(%rsp)
leaq 0x8566(%rip), %rax      # 0x110b1
movq %rax, 0xa0(%rsp)
leaq 0x8561(%rip), %rax      # 0x110bb
movq %rax, 0x98(%rsp)
leaq 0x855c(%rip), %rax      # 0x110c5
movq %rax, 0x90(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movl $0x0, 0x40(%rsp)
cmpq $0x0, 0xbc84(%rip)      # 0x14820
jne 0x8bb2
xorl %eax, %eax
movl %eax, %edi
callq 0x32a0
subq $0x1, %rax
movq %rax, 0xbc6e(%rip)      # 0x14820
xorl %eax, %eax
cmpq 0xbc5d(%rip), %rax      # 0x14818
je 0x8bd1
movq 0xbc54(%rip), %rax      # 0x14818
movswl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x8bdc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x3c(%rsp)
jmp 0x8bdc
movl 0x3c(%rsp), %eax
movl %eax, 0x78(%rsp)
xorl %eax, %eax
cmpq 0xbc2b(%rip), %rax      # 0x14818
je 0x8c03
movq 0xbc22(%rip), %rax      # 0x14818
movswl 0x6(%rax), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x8c0e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x38(%rsp)
jmp 0x8c0e
movl 0x38(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x78(%rsp), %eax
addl $-0x4, %eax
movl %eax, 0x7c(%rsp)
movslq 0x7c(%rsp), %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, 0x7c(%rsp)
xorl %eax, %eax
movl %eax, %edi
callq 0x32a0
movq %rax, 0x80(%rsp)
movq 0xbbc2(%rip), %rdi      # 0x14818
callq 0x3050
movq 0xbbae(%rip), %rdi      # 0x14810
callq 0x3050
movl $0x2, 0x6c(%rsp)
movq 0xb34a(%rip), %rax      # 0x13fc0
movq (%rax), %rdi
callq 0x3120
movl %eax, 0x68(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x34(%rsp)
subl $0x4a, %eax
je 0x8cd0
jmp 0x8c91
movl 0x34(%rsp), %eax
subl $0x4b, %eax
je 0x8d20
jmp 0x8ca0
movl 0x34(%rsp), %eax
subl $0x6a, %eax
je 0x8cd0
jmp 0x8cab
movl 0x34(%rsp), %eax
subl $0x6b, %eax
je 0x8d20
jmp 0x8cb6
movl 0x34(%rsp), %eax
subl $0x102, %eax            # imm = 0x102
je 0x8cd0
jmp 0x8cc3
movl 0x34(%rsp), %eax
subl $0x103, %eax            # imm = 0x103
je 0x8d20
jmp 0x8d44
movl 0xbb52(%rip), %eax      # 0x14828
addl $0x1, %eax
movl %eax, 0xbb49(%rip)      # 0x14828
movl 0xc4(%rsp), %eax
cmpl 0x7c(%rsp), %eax
jge 0x8cf8
movl $0x0, 0xbb32(%rip)      # 0x14828
jmp 0x8d1e
movl 0xbb2a(%rip), %eax      # 0x14828
addl 0x7c(%rsp), %eax
cmpl 0xc4(%rsp), %eax
jle 0x8d1c
movl 0xc4(%rsp), %eax
subl 0x7c(%rsp), %eax
movl %eax, 0xbb0c(%rip)      # 0x14828
jmp 0x8d1e
jmp 0x8d46
movl 0xbb02(%rip), %eax      # 0x14828
subl $0x1, %eax
movl %eax, 0xbaf9(%rip)      # 0x14828
cmpl $0x0, 0xbaf2(%rip)      # 0x14828
jge 0x8d42
movl $0x0, 0xbae6(%rip)      # 0x14828
jmp 0x8d46
jmp 0x8d46
movl $0x0, 0x70(%rsp)
movl 0x70(%rsp), %eax
cmpl 0xc4(%rsp), %eax
jge 0x9034
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x310(%rax)
jle 0x8fd4
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
movq 0xb8(%rsp), %rdi
movslq 0x70(%rsp), %rax
imulq $0x590, %rax, %rax      # imm = 0x590
addq %rax, %rdi
addq $0x370, %rdi            # imm = 0x370
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x340(%rax), %rsi
movq 0x80(%rsp), %rdx
callq 0x9aa0
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpq $0x0, 0x560(%rax)
jle 0x8f22
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x460(%rax), %rax
movq 0xb8(%rsp), %rcx
movslq 0x70(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
xorl %edx, %edx
divq 0x560(%rcx)
movq %rax, %rcx
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rax
movq %rcx, 0x580(%rax)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x350(%rax), %rax
movq 0xb8(%rsp), %rcx
movslq 0x70(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
subq 0x340(%rcx), %rax
movq 0xb8(%rsp), %rcx
movslq 0x70(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
xorl %edx, %edx
divq 0x580(%rcx)
movq %rax, %rcx
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rax
movq %rcx, 0x2d0(%rax)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2d0(%rax), %rax
cmpq 0x58(%rsp), %rax
jbe 0x8f20
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2d0(%rax), %rax
movq %rax, 0x58(%rsp)
jmp 0x8f22
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
movq 0x340(%rax,%rcx), %xmm0
movaps 0x70fa(%rip), %xmm3     # 0x10040
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x70fe(%rip), %xmm2     # 0x10050
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x350(%rax,%rcx), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x70af(%rip), %xmm1     # 0x10038
mulsd %xmm1, %xmm0
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movsd %xmm0, 0x358(%rax)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x580(%rax), %rax
addq 0x60(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2f8(%rax), %rax
addq 0x50(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x588(%rax), %rax
addq 0x50(%rsp), %rax
movq %rax, 0x50(%rsp)
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x8d4e
movl 0xb7ee(%rip), %eax      # 0x14828
movl %eax, 0x70(%rsp)
movl 0x70(%rsp), %ecx
movl 0xb7e0(%rip), %edx      # 0x14828
addl 0x7c(%rsp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, 0x33(%rsp)
jge 0x9068
movl 0x70(%rsp), %eax
cmpl 0xc4(%rsp), %eax
setl %al
movb %al, 0x33(%rsp)
movb 0x33(%rsp), %al
testb $0x1, %al
jne 0x9075
jmp 0x9625
movq 0xb79c(%rip), %rdi      # 0x14818
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2e0(%rax), %r8
movl $0x2, %edx
leaq 0x7132(%rip), %rcx      # 0x101e5
movb $0x0, %al
callq 0x31c0
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x310(%rax)
jle 0x91a8
movq 0xb733(%rip), %rdi      # 0x14818
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movsd 0x358(%rax), %xmm0
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x360(%rax), %r8d
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x33c(%rax), %r9d
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x30c(%rax), %r10d
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x2e8(%rax), %eax
movl $0x4, %edx
leaq 0x7f3a(%rip), %rcx      # 0x110ce
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x1, %al
callq 0x31c0
jmp 0x92a4
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x338(%rax)
jne 0x91f4
movq 0xb649(%rip), %rdi      # 0x14818
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movl $0x4, %edx
leaq 0x7f11(%rip), %rcx      # 0x110f9
movb $0x0, %al
callq 0x31c0
jmp 0x92a2
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x36c(%rax)
je 0x925b
movq 0xb5fd(%rip), %rdi      # 0x14818
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x36c(%rax), %r8d
movl $0x4, %edx
leaq 0x7eb2(%rip), %rcx      # 0x11104
movb $0x0, %al
callq 0x31c0
jmp 0x92a0
movq 0xb5b6(%rip), %rdi      # 0x14818
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x338(%rax), %r8d
movl $0x4, %edx
leaq 0x7e81(%rip), %rcx      # 0x1111a
movb $0x0, %al
callq 0x31c0
jmp 0x92a2
jmp 0x92a4
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpq $0x0, 0x588(%rax)
je 0x92f8
movq 0xb54c(%rip), %rdi      # 0x14818
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x588(%rax), %rdx
leaq 0x7e3d(%rip), %rsi      # 0x1112e
movb $0x0, %al
callq 0x3410
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpq $0x0, 0x2f8(%rax)
je 0x934c
movq 0xb4f8(%rip), %rdi      # 0x14818
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2f8(%rax), %rdx
leaq 0x7e00(%rip), %rsi      # 0x11145
movb $0x0, %al
callq 0x3410
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
movl 0x308(%rax,%rcx), %eax
movq %rax, 0x28(%rsp)
subq $0x4, %rax
ja 0x93e5
movq 0x28(%rsp), %rax
leaq 0x6ca2(%rip), %rcx      # 0x10020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xb48a(%rip), %rdi      # 0x14818
leaq 0x7dc5(%rip), %rsi      # 0x1115a
movb $0x0, %al
callq 0x3410
jmp 0x93e5
movq 0xb473(%rip), %rdi      # 0x14818
leaq 0x7dba(%rip), %rsi      # 0x11166
movb $0x0, %al
callq 0x3410
jmp 0x93e5
movq 0xb45c(%rip), %rdi      # 0x14818
leaq 0x7db3(%rip), %rsi      # 0x11176
movb $0x0, %al
callq 0x3410
jmp 0x93e5
movq 0xb445(%rip), %rdi      # 0x14818
leaq 0x7da7(%rip), %rsi      # 0x11181
movb $0x0, %al
callq 0x3410
jmp 0x93e5
jmp 0x93e5
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpw $0x0, 0x57c(%rax)
je 0x941b
movq 0xb40b(%rip), %rdi      # 0x14818
leaq 0x7d7a(%rip), %rsi      # 0x1118e
movb $0x0, %al
callq 0x3410
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movabsq $0x38d7ea4c68000, %rcx  # imm = 0x38D7EA4C68000
cmpq %rcx, 0x580(%rax)
jb 0x948f
movq 0xb3cc(%rip), %rdi      # 0x14818
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x580(%rax), %rax
movabsq $0xe8d4a51000, %rcx     # imm = 0xE8D4A51000
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
leaq 0x7d16(%rip), %rsi      # 0x11199
movb $0x0, %al
callq 0x3410
jmp 0x960a
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movabsq $0xe8d4a51000, %rcx     # imm = 0xE8D4A51000
cmpq %rcx, 0x580(%rax)
jb 0x94fe
movq 0xb358(%rip), %rdi      # 0x14818
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x580(%rax), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
leaq 0x7cb4(%rip), %rsi      # 0x111a6
movb $0x0, %al
callq 0x3410
jmp 0x9608
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpq $0x3b9aca00, 0x580(%rax) # imm = 0x3B9ACA00
jb 0x9567
movq 0xb2ef(%rip), %rdi      # 0x14818
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x580(%rax), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
leaq 0x7c58(%rip), %rsi      # 0x111b3
movb $0x0, %al
callq 0x3410
jmp 0x9606
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpq $0xf4240, 0x580(%rax) # imm = 0xF4240
jb 0x95cd
movq 0xb286(%rip), %rdi      # 0x14818
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x580(%rax), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
leaq 0x7bfc(%rip), %rsi      # 0x111c0
movb $0x0, %al
callq 0x3410
jmp 0x9604
movq 0xb244(%rip), %rdi      # 0x14818
movq 0xb8(%rsp), %rax
movslq 0x70(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x580(%rax), %rdx
shrq $0x0, %rdx
leaq 0x7bd0(%rip), %rsi      # 0x111cd
movb $0x0, %al
callq 0x3410
jmp 0x9606
jmp 0x9608
jmp 0x960a
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x903e
cmpl $0x0, 0xb1fc(%rip)      # 0x14828
jle 0x9668
movq 0xb1e3(%rip), %rdi      # 0x14818
movl 0x74(%rsp), %edx
subl $0x8, %edx
movl $0x1, %esi
leaq 0x6b6d(%rip), %rcx      # 0x101b5
movb $0x0, %al
callq 0x31c0
movq 0xb1c2(%rip), %rdi      # 0x14818
movq 0xa95b(%rip), %rax      # 0x13fb8
movl 0xb4(%rax), %esi
callq 0x33d0
movl 0xc4(%rsp), %eax
subl 0xb1b3(%rip), %eax      # 0x14828
cmpl 0x7c(%rsp), %eax
jle 0x96b7
movq 0xb196(%rip), %rdi      # 0x14818
movl 0x78(%rsp), %esi
subl $0x2, %esi
movl 0x74(%rsp), %edx
subl $0x8, %edx
leaq 0x6b1e(%rip), %rcx      # 0x101b5
movb $0x0, %al
callq 0x31c0
movq 0xb173(%rip), %rdi      # 0x14818
movq 0xa90c(%rip), %rax      # 0x13fb8
movl 0xb8(%rax), %esi
callq 0x33d0
movq 0xb15a(%rip), %rdi      # 0x14818
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x3100
movq 0xb128(%rip), %rdi      # 0x14818
callq 0x31b0
callq 0x89e0
movabsq $0x38d7ea4c68000, %rax  # imm = 0x38D7EA4C68000
cmpq %rax, 0x60(%rsp)
jb 0x9739
movq 0x60(%rsp), %rax
movabsq $0xe8d4a51000, %rcx     # imm = 0xE8D4A51000
xorl %edx, %edx
divq %rcx
movq %rax, 0x60(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x97f9
movabsq $0xe8d4a51000, %rax     # imm = 0xE8D4A51000
cmpq %rax, 0x60(%rsp)
jb 0x9773
movq 0x60(%rsp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, 0x60(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x97f7
cmpq $0x3b9aca00, 0x60(%rsp) # imm = 0x3B9ACA00
jb 0x97a4
movq 0x60(%rsp), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
movq %rax, 0x60(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x97f5
cmpq $0xf4240, 0x60(%rsp)    # imm = 0xF4240
jb 0x97d5
movq 0x60(%rsp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x97f3
movq 0x60(%rsp), %rax
shrq $0x0, %rax
movq %rax, 0x60(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x97f5
jmp 0x97f7
jmp 0x97f9
movq 0xb010(%rip), %rdi      # 0x14810
movl $0x4, %esi
movl $0x1, %edx
leaq 0x79c8(%rip), %rcx      # 0x111d9
movb $0x0, %al
callq 0x31c0
cmpq $0x0, 0x60(%rsp)
jbe 0x9845
movq 0xafe9(%rip), %rdi      # 0x14810
movq 0x88(%rsp), %rcx
movq 0x60(%rsp), %r8
movl $0x4, %esi
movl $0x10, %edx
movb $0x0, %al
callq 0x31c0
movq 0xafd4(%rip), %rcx      # 0x14820
movq 0x80(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movl $0xe10, %ecx            # imm = 0xE10
cqto
idivq %rcx
movl %eax, 0x4c(%rsp)
movq 0x80(%rsp), %rax
movl $0xe10, %ecx            # imm = 0xE10
cqto
idivq %rcx
movq %rdx, 0x80(%rsp)
movq 0x80(%rsp), %rax
movl $0x3c, %ecx
cqto
idivq %rcx
movl %eax, 0x48(%rsp)
movq 0x80(%rsp), %rax
movl $0x3c, %ecx
cqto
idivq %rcx
movq %rdx, 0x80(%rsp)
movq 0x80(%rsp), %rax
movl %eax, 0x44(%rsp)
movq 0xaf3e(%rip), %rdi      # 0x14810
movl $0x1, %edx
leaq 0x7907(%rip), %rcx      # 0x111e5
movl %edx, %esi
movb $0x0, %al
callq 0x31c0
movq 0xaf22(%rip), %rdi      # 0x14810
movl 0x4c(%rsp), %r8d
movl 0x48(%rsp), %r9d
movl 0x44(%rsp), %eax
movl $0x1, %esi
movl $0x10, %edx
leaq 0x78e1(%rip), %rcx      # 0x111ee
movl %eax, (%rsp)
movb $0x0, %al
callq 0x31c0
movq 0xaef2(%rip), %rdi      # 0x14810
movl $0x2, %esi
movl $0x1, %edx
leaq 0x78ce(%rip), %rcx      # 0x111fd
movb $0x0, %al
callq 0x31c0
cmpq $0x0, 0x58(%rsp)
jle 0x99c9
movq 0x58(%rsp), %rax
movl $0xe10, %ecx            # imm = 0xE10
cqto
idivq %rcx
movl %eax, 0x4c(%rsp)
movq 0x58(%rsp), %rax
movl $0xe10, %ecx            # imm = 0xE10
cqto
idivq %rcx
movq %rdx, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl $0x3c, %ecx
cqto
idivq %rcx
movl %eax, 0x48(%rsp)
movq 0x58(%rsp), %rax
movl $0x3c, %ecx
cqto
idivq %rcx
movq %rdx, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl %eax, 0x44(%rsp)
movq 0xae70(%rip), %rdi      # 0x14810
movl 0x4c(%rsp), %r8d
movl 0x48(%rsp), %r9d
movl 0x44(%rsp), %eax
movl $0x2, %esi
movl $0x10, %edx
leaq 0x782f(%rip), %rcx      # 0x111ee
movl %eax, (%rsp)
movb $0x0, %al
callq 0x31c0
movq 0xae40(%rip), %rdi      # 0x14810
movl $0x5, %esi
movl $0x1, %edx
leaq 0x7827(%rip), %rcx      # 0x11208
movb $0x0, %al
callq 0x31c0
movq 0xae21(%rip), %rdi      # 0x14810
movq 0x50(%rsp), %r8
movl $0x5, %esi
movl $0x10, %edx
leaq 0x780b(%rip), %rcx      # 0x11210
movb $0x0, %al
callq 0x31c0
movq 0xadfd(%rip), %rdi      # 0x14810
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x3100
movq 0xadcb(%rip), %rax      # 0x14810
movq %rax, 0x20(%rsp)
movq 0xabf7(%rip), %rdi      # 0x14648
callq 0x3150
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl $0x24, %eax
subq %rcx, %rax
shrq %rax
movl %eax, %edx
movq 0xabd6(%rip), %r8       # 0x14648
xorl %esi, %esi
leaq 0x676a(%rip), %rcx      # 0x101e5
movb $0x0, %al
callq 0x31c0
movq 0xad87(%rip), %rdi      # 0x14810
callq 0x31b0
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)