// File: /workspace/github_c_makefile_star2_O0/sTeeLM[P]dwipe/gui.c
// Function: dwipe_gui_select
void dwipe_gui_select( int count, dwipe_context_t* c )
{
/**
 * The primary user interface.  Allows the user to
 * change options and specify the devices to be wiped.
 *
 * @parameter  count       The number of contexts in the array.
 * @parameter  c           An array of device contexts.
 *
 * @modifies   c[].select  Sets the select flag according to user input.
 * @modifies   options     Sets program options according to to user input.
 *
 */

	/* Widget labels. */
	const char* select_title = " Disks and Partitions ";

	/* The number of lines available in the window. */
	int wlines;

	/* The number of columns available in the window. */
	int wcols;

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

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

	/* The selection focus. */
	int focus = 0;

	/* A generic loop variable. */
	int i;

	/* User input buffer. */
	int keystroke;

	/* The current working line. */
	int yy;

	/* The number of currently selected elements. */
	int selected = 0;

	/* There is one slot per line. */
	getmaxyx( main_window, wlines, wcols );

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



	do
	{
		/* Clear the main window. */
		werase( main_window );

		/* Update the footer window. */
		werase( footer_window );
		dwipe_gui_title( footer_window, dwipe_buttons1 );
		wrefresh( footer_window );

		/* Update the options window. */
		dwipe_gui_options();

		/* Initialize the line offset. */
		yy = 2;

		for( i = 0; i < slots && i < count ; i++ )
		{
			/* Move to the next line. */
			mvwprintw( main_window, yy++, 1, " " );

			if( i + offset == focus )
			{
				if( c[focus].select == DWIPE_SELECT_TRUE || c[focus].select == DWIPE_SELECT_FALSE )
				{
					/* Print the 'enabled' cursor. */
					waddch( main_window, ACS_RARROW );
				}

				else
				{
					/* Print the 'disabled' cursor. */
					waddch( main_window, ACS_DIAMOND );
				}
			}

			else
			{
				/* Print whitespace. */
				waddch( main_window, ' '  );
			}


			switch( c[i+offset].select )
			{
				case DWIPE_SELECT_TRUE:

					/* Print a selected element. */
					wprintw( main_window, " [   WIPE  ] %s", c[i+offset].label );
					break;

				case DWIPE_SELECT_FALSE:

					/* Print an element that is not selected. */
					wprintw( main_window, " [         ] %s", c[i+offset].label );
					break;

				case DWIPE_SELECT_TRUE_PARENT:

					/* This element will be wiped when its parent is wiped. */
					wprintw( main_window, " [*********] %s", c[i+offset].label );
					break;

				case DWIPE_SELECT_FALSE_CHILD:

					/* We can't wipe this element because it has a child that is being wiped. */
					wprintw( main_window, " [---------] %s", c[i+offset].label );
					break;

				case DWIPE_SELECT_DISABLED:

					/* We don't know how to wipe this device. (Iomega Zip drives.) */
					wprintw( main_window, " [ DISABLE ] %s", c[i+offset].label == NULL ? "Unrecognized Device" : c[i+offset].label);
					break;
				case DWIPE_SELECT_SKIPPED:
                                        wprintw( main_window, " [ SKIPPED ] %s", c[i+offset].label == NULL ? "Unrecognized Device" : c[i+offset].label);
                                        break;
				default:
					
					/* TODO: Handle the sanity error. */
					break;


			} /* switch select */

		} /* 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 );
		}

		/* Draw a border around the menu window. */
		box( main_window, 0, 0 );

		/* Print a title. */
		dwipe_gui_title( main_window, select_title );

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

		/* Get user input. */
		keystroke = getch();

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

				/* Increment the focus. */
				focus += 1;

				if( focus >= count )
				{
					/* The focus is already at the last element. */
					focus = count -1;
					break;
				}

				if( focus - offset >= slots )
				{
					/* The next element is offscreen. Scroll down. */
					offset += 1;
					break;
				}

				break;

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

				/* Decrement the focus. */
				focus -= 1;

				if( focus < 0 )
				{
					/* The focus is already at the last element. */
					focus = 0;
					break;
				}

				if( focus < offset )
				{
					/* The next element is offscreen. Scroll up. */
					offset -= 1;
					break;
				}

				break;

			case KEY_ENTER:
			case 10:
			case ' ':

				/* TODO: This block should be made into a function. */

				if( c[focus].select == DWIPE_SELECT_TRUE )
				{
					/* Reverse the selection of this element. */
					c[focus].select = DWIPE_SELECT_FALSE;

					if( c[focus].device_part == 0 )
					{
						/* Sub-deselect all partitions and slices within this disk. */
						for( i = 0 ; i < count ; i++ )
						{
							if
							(
								   c[i].device_type   == c[focus].device_type
								&& c[i].device_host   == c[focus].device_host
								&& c[i].device_bus    == c[focus].device_bus
								&& c[i].device_target == c[focus].device_target
								&& c[i].device_lun    == c[focus].device_lun
								&& c[i].device_part   > 0
							)
							{
                                if(c[i].select != DWIPE_SELECT_SKIPPED)
								    c[i].select = DWIPE_SELECT_FALSE;
							}

						} /* for all contexts */

					} /* if sub-deselect */

					else
					{
						/* The number of selected partitions or slices within this disk. */
						int j = 0;

						for( i = 0 ; i < count ; i++ )
						{
							if
							(
								   c[i].device_type   == c[focus].device_type
								&& c[i].device_host   == c[focus].device_host
								&& c[i].device_bus    == c[focus].device_bus
								&& c[i].device_target == c[focus].device_target
								&& c[i].device_lun    == c[focus].device_lun
								&& c[i].device_part   > 0
								&& c[i].select        == DWIPE_SELECT_TRUE
							)
							{
								/* Increment the counter. */
								j += 1;
							}

						} /* for all contexts */

						if( j == 0 )
						{
							/* Find the parent disk of this partition or slice. */
							for( i = 0 ; i < count ; i++ )
							{
								if
								(
									   c[i].device_type   == c[focus].device_type
									&& c[i].device_host   == c[focus].device_host
									&& c[i].device_bus    == c[focus].device_bus
									&& c[i].device_target == c[focus].device_target
									&& c[i].device_lun    == c[focus].device_lun
									&& c[i].device_part   == 0
								)
								{
									/* Enable the disk element. */
                                    if(c[i].select != DWIPE_SELECT_SKIPPED)
									    c[i].select = DWIPE_SELECT_FALSE;
								}

							} /* for all contexts */

						} /* if */

					} /* else super-enable */

					break;

				} /* if DWIPE_SELECT_TRUE */

				if( c[focus].select == DWIPE_SELECT_FALSE )
				{
					/* Reverse the selection. */
					c[focus].select = DWIPE_SELECT_TRUE;

					if( c[focus].device_part == 0 )
					{
						/* Sub-select all partitions and slices within this disk. */
						for( i = 0 ; i < count ; i++ )
						{
							if
							(
								   c[i].device_type   == c[focus].device_type
								&& c[i].device_host   == c[focus].device_host
								&& c[i].device_bus    == c[focus].device_bus
								&& c[i].device_target == c[focus].device_target
								&& c[i].device_lun    == c[focus].device_lun
								&& c[i].device_part   > 0
							)
							{
                                if(c[i].select != DWIPE_SELECT_SKIPPED)
								    c[i].select = DWIPE_SELECT_TRUE_PARENT;
							}

						} /* for */

					} /* if sub-select */

					else
					{
						/* ASSERT: ( c[focus].device_part > 0 ) */

						/* Super-deselect the disk that contains this device. */
						for( i = 0 ; i < count ; i++ )
						{
							if
							(
								   c[i].device_type   == c[focus].device_type
								&& c[i].device_host   == c[focus].device_host
								&& c[i].device_bus    == c[focus].device_bus
								&& c[i].device_target == c[focus].device_target
								&& c[i].device_lun    == c[focus].device_lun
								&& c[i].device_part   == 0
							)
							{
                                if(c[i].select != DWIPE_SELECT_SKIPPED)
								    c[i].select = DWIPE_SELECT_FALSE_CHILD;
							}
						}

					} /* else super-deselect */

					break;

				} /* if DWIPE_SELECT_FALSE */

				/* TODO: Explain to the user why they can't change this. */
				break;

			case 'm':
			case 'M':
			
				/*  Run the method dialog. */
				dwipe_gui_method();
				break;

			case 'p':
			case 'P':

				/* Run the PRNG dialog. */
				dwipe_gui_prng();
				break;

			case 'r':
			case 'R':

				/* Run the rounds dialog. */
				dwipe_gui_rounds();
				break;

			case 'v':
			case 'V':

				/* Run the option dialog. */
				dwipe_gui_verify();
				break;

		} /* keystroke switch */

		selected = 0;
		for( i = 0 ; i < count ; i++ )
		{
			if( c[i].select == DWIPE_SELECT_TRUE )
			{
				selected += 1;
			};
		}

	} while( keystroke != KEY_F(10) || selected == 0 );

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

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

	/* Clear the footer. */
	werase( footer_window );

	/* Refresh the footer window. */
	wrefresh( footer_window );

}

// Assembly:
subq $0x98, %rsp
movl %edi, 0x94(%rsp)
movq %rsi, 0x88(%rsp)
leaq 0xa11d(%rip), %rax      # 0x1012a
movq %rax, 0x80(%rsp)
movl $0x0, 0x70(%rsp)
movl $0x0, 0x6c(%rsp)
movl $0x0, 0x5c(%rsp)
xorl %eax, %eax
cmpq 0xe7e2(%rip), %rax      # 0x14818
je 0x604c
movq 0xe7d9(%rip), %rax      # 0x14818
movswl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x6057
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x54(%rsp)
jmp 0x6057
movl 0x54(%rsp), %eax
movl %eax, 0x7c(%rsp)
xorl %eax, %eax
cmpq 0xe7b0(%rip), %rax      # 0x14818
je 0x607e
movq 0xe7a7(%rip), %rax      # 0x14818
movswl 0x6(%rax), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x6089
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x50(%rsp)
jmp 0x6089
movl 0x50(%rsp), %eax
movl %eax, 0x78(%rsp)
movl 0x7c(%rsp), %eax
subl $0x4, %eax
movl %eax, 0x74(%rsp)
movq 0xe775(%rip), %rdi      # 0x14818
callq 0x3050
movq 0xe751(%rip), %rdi      # 0x14800
callq 0x3050
movq 0xe745(%rip), %rdi      # 0x14800
movq 0xe58e(%rip), %rsi      # 0x14650
callq 0x5a80
movq 0xe732(%rip), %rdi      # 0x14800
callq 0x31b0
callq 0x7130
movl $0x2, 0x60(%rsp)
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %ecx
xorl %eax, %eax
cmpl 0x74(%rsp), %ecx
movb %al, 0x4f(%rsp)
jge 0x610a
movl 0x68(%rsp), %eax
cmpl 0x94(%rsp), %eax
setl %al
movb %al, 0x4f(%rsp)
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x6117
jmp 0x6434
movq 0xe6fa(%rip), %rdi      # 0x14818
movl 0x60(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
movl $0x1, %edx
leaq 0xa84e(%rip), %rcx      # 0x10985
movb $0x0, %al
callq 0x31c0
movl 0x68(%rsp), %eax
addl 0x70(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jne 0x61c2
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x1, 0x368(%rax)
je 0x618c
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x3, 0x368(%rax)
jne 0x61a7
movq 0xe685(%rip), %rdi      # 0x14818
movq 0xde1e(%rip), %rax      # 0x13fb8
movl 0xac(%rax), %esi
callq 0x33d0
jmp 0x61c0
movq 0xe66a(%rip), %rdi      # 0x14818
movq 0xde03(%rip), %rax      # 0x13fb8
movl 0x180(%rax), %esi
callq 0x33d0
jmp 0x61d3
movq 0xe64f(%rip), %rdi      # 0x14818
movl $0x20, %esi
callq 0x33d0
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
movl 0x70(%rsp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
movl 0x368(%rax,%rcx), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x40(%rsp)
subl $0x5, %eax
ja 0x6420
movq 0x40(%rsp), %rax
leaq 0x9dc4(%rip), %rcx      # 0xffd8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xe5f4(%rip), %rdi      # 0x14818
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
addl 0x70(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2e0(%rax), %rdx
leaq 0x9ef2(%rip), %rsi      # 0x10141
movb $0x0, %al
callq 0x3410
jmp 0x6422
movq 0xe5b6(%rip), %rdi      # 0x14818
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
addl 0x70(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2e0(%rax), %rdx
leaq 0x9ec4(%rip), %rsi      # 0x10151
movb $0x0, %al
callq 0x3410
jmp 0x6422
movq 0xe578(%rip), %rdi      # 0x14818
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
addl 0x70(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2e0(%rax), %rdx
leaq 0x9e96(%rip), %rsi      # 0x10161
movb $0x0, %al
callq 0x3410
jmp 0x6422
movq 0xe53a(%rip), %rdi      # 0x14818
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
addl 0x70(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2e0(%rax), %rdx
leaq 0x9e68(%rip), %rsi      # 0x10171
movb $0x0, %al
callq 0x3410
jmp 0x6422
movq 0xe4fc(%rip), %rax      # 0x14818
movq %rax, 0x38(%rsp)
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
addl 0x70(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpq $0x0, 0x2e0(%rax)
jne 0x6356
leaq 0x9e42(%rip), %rax      # 0x10191
movq %rax, 0x30(%rsp)
jmp 0x637f
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
addl 0x70(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2e0(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x9df1(%rip), %rsi      # 0x10181
movb $0x0, %al
callq 0x3410
jmp 0x6422
movq 0xe475(%rip), %rax      # 0x14818
movq %rax, 0x28(%rsp)
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
addl 0x70(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpq $0x0, 0x2e0(%rax)
jne 0x63dd
leaq 0x9dbb(%rip), %rax      # 0x10191
movq %rax, 0x20(%rsp)
jmp 0x6406
movq 0x88(%rsp), %rax
movl 0x68(%rsp), %ecx
addl 0x70(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movq 0x2e0(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x9d8e(%rip), %rsi      # 0x101a5
movb $0x0, %al
callq 0x3410
jmp 0x6422
jmp 0x6422
jmp 0x6424
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x60e8
cmpl $0x0, 0x70(%rsp)
jle 0x6475
movq 0xe3d6(%rip), %rdi      # 0x14818
movl 0x78(%rsp), %edx
subl $0x8, %edx
movl $0x1, %esi
leaq 0x9d60(%rip), %rcx      # 0x101b5
movb $0x0, %al
callq 0x31c0
movq 0xe3b5(%rip), %rdi      # 0x14818
movq 0xdb4e(%rip), %rax      # 0x13fb8
movl 0xb4(%rax), %esi
callq 0x33d0
movl 0x94(%rsp), %eax
subl 0x70(%rsp), %eax
cmpl 0x74(%rsp), %eax
jle 0x64c2
movq 0xe38b(%rip), %rdi      # 0x14818
movl 0x7c(%rsp), %esi
subl $0x2, %esi
movl 0x78(%rsp), %edx
subl $0x8, %edx
leaq 0x9d13(%rip), %rcx      # 0x101b5
movb $0x0, %al
callq 0x31c0
movq 0xe368(%rip), %rdi      # 0x14818
movq 0xdb01(%rip), %rax      # 0x13fb8
movl 0xb8(%rax), %esi
callq 0x33d0
movq 0xe34f(%rip), %rdi      # 0x14818
movq %rsp, %rax
movl $0x0, 0x10(%rax)
movl $0x0, 0x8(%rax)
movl $0x0, (%rax)
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x3100
movq 0xe31d(%rip), %rdi      # 0x14818
movq 0x80(%rsp), %rsi
callq 0x5a80
movq 0xe309(%rip), %rdi      # 0x14818
callq 0x31b0
movq 0xdaa5(%rip), %rax      # 0x13fc0
movq (%rax), %rdi
callq 0x3120
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0x1c(%rsp)
subl $0xa, %eax
je 0x66b3
jmp 0x653a
movl 0x1c(%rsp), %eax
subl $0x20, %eax
je 0x66b3
jmp 0x6549
movl 0x1c(%rsp), %eax
subl $0x4a, %eax
je 0x6627
jmp 0x6558
movl 0x1c(%rsp), %eax
subl $0x4b, %eax
je 0x6675
jmp 0x6567
movl 0x1c(%rsp), %eax
subl $0x4d, %eax
je 0x704f
jmp 0x6576
movl 0x1c(%rsp), %eax
subl $0x50, %eax
je 0x7056
jmp 0x6585
movl 0x1c(%rsp), %eax
subl $0x52, %eax
je 0x705d
jmp 0x6594
movl 0x1c(%rsp), %eax
subl $0x56, %eax
je 0x7064
jmp 0x65a3
movl 0x1c(%rsp), %eax
subl $0x6a, %eax
je 0x6627
jmp 0x65ae
movl 0x1c(%rsp), %eax
subl $0x6b, %eax
je 0x6675
jmp 0x65bd
movl 0x1c(%rsp), %eax
subl $0x6d, %eax
je 0x704f
jmp 0x65cc
movl 0x1c(%rsp), %eax
subl $0x70, %eax
je 0x7056
jmp 0x65db
movl 0x1c(%rsp), %eax
subl $0x72, %eax
je 0x705d
jmp 0x65ea
movl 0x1c(%rsp), %eax
subl $0x76, %eax
je 0x7064
jmp 0x65f9
movl 0x1c(%rsp), %eax
subl $0x102, %eax            # imm = 0x102
je 0x6627
jmp 0x6606
movl 0x1c(%rsp), %eax
subl $0x103, %eax            # imm = 0x103
je 0x6675
jmp 0x6613
movl 0x1c(%rsp), %eax
subl $0x157, %eax            # imm = 0x157
je 0x66b3
jmp 0x7069
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x94(%rsp), %eax
jl 0x6652
movl 0x94(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x7069
movl 0x6c(%rsp), %eax
subl 0x70(%rsp), %eax
cmpl 0x74(%rsp), %eax
jl 0x6670
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x7069
jmp 0x7069
movl 0x6c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x6c(%rsp)
cmpl $0x0, 0x6c(%rsp)
jge 0x6694
movl $0x0, 0x6c(%rsp)
jmp 0x7069
movl 0x6c(%rsp), %eax
cmpl 0x70(%rsp), %eax
jge 0x66ae
movl 0x70(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x7069
jmp 0x7069
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x1, 0x368(%rax)
jne 0x6c5f
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl $0x3, 0x368(%rax)
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x220(%rax)
jne 0x68df
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x94(%rsp), %eax
jge 0x68da
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x2c8(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x2c8(%rcx), %eax
jne 0x68c8
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0xc(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x68c8
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x68c8
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x210(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x210(%rcx), %eax
jne 0x68c8
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x214(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x214(%rcx), %eax
jne 0x68c8
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x220(%rax)
jle 0x68c8
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x6, 0x368(%rax)
je 0x68c6
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl $0x3, 0x368(%rax)
jmp 0x68c8
jmp 0x68ca
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x6724
jmp 0x6c5a
movl $0x0, 0x58(%rsp)
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x94(%rsp), %eax
jge 0x6a8d
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x2c8(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x2c8(%rcx), %eax
jne 0x6a7b
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0xc(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x6a7b
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x6a7b
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x210(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x210(%rcx), %eax
jne 0x6a7b
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x214(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x214(%rcx), %eax
jne 0x6a7b
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x220(%rax)
jle 0x6a7b
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x1, 0x368(%rax)
jne 0x6a7b
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x6a7d
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x68ef
cmpl $0x0, 0x58(%rsp)
jne 0x6c58
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x94(%rsp), %eax
jge 0x6c56
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x2c8(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x2c8(%rcx), %eax
jne 0x6c44
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0xc(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x6c44
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x6c44
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x210(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x210(%rcx), %eax
jne 0x6c44
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x214(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x214(%rcx), %eax
jne 0x6c44
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x220(%rax)
jne 0x6c44
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x6, 0x368(%rax)
je 0x6c42
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl $0x3, 0x368(%rax)
jmp 0x6c44
jmp 0x6c46
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x6aa0
jmp 0x6c58
jmp 0x6c5a
jmp 0x7069
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x3, 0x368(%rax)
jne 0x704d
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl $0x1, 0x368(%rax)
movq 0x88(%rsp), %rax
movslq 0x6c(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x220(%rax)
jne 0x6e8b
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x94(%rsp), %eax
jge 0x6e86
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x2c8(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x2c8(%rcx), %eax
jne 0x6e74
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0xc(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x6e74
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x6e74
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x210(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x210(%rcx), %eax
jne 0x6e74
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x214(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x214(%rcx), %eax
jne 0x6e74
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x220(%rax)
jle 0x6e74
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x6, 0x368(%rax)
je 0x6e72
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl $0x2, 0x368(%rax)
jmp 0x6e74
jmp 0x6e76
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x6cd0
jmp 0x704b
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x94(%rsp), %eax
jge 0x7049
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x2c8(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x2c8(%rcx), %eax
jne 0x7037
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0xc(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x7037
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x7037
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x210(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x210(%rcx), %eax
jne 0x7037
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl 0x214(%rax), %eax
movq 0x88(%rsp), %rcx
movslq 0x6c(%rsp), %rdx
imulq $0x590, %rdx, %rdx      # imm = 0x590
addq %rdx, %rcx
cmpl 0x214(%rcx), %eax
jne 0x7037
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x0, 0x220(%rax)
jne 0x7037
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x6, 0x368(%rax)
je 0x7035
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
movl $0x4, 0x368(%rax)
jmp 0x7037
jmp 0x7039
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x6e93
jmp 0x704b
jmp 0x7069
jmp 0x7069
callq 0x7320
jmp 0x7069
callq 0x7e20
jmp 0x7069
callq 0x8320
jmp 0x7069
callq 0x8560
movl $0x0, 0x5c(%rsp)
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x94(%rsp), %eax
jge 0x70c0
movq 0x88(%rsp), %rax
movslq 0x68(%rsp), %rcx
imulq $0x590, %rcx, %rcx      # imm = 0x590
addq %rcx, %rax
cmpl $0x1, 0x368(%rax)
jne 0x70b1
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x70b3
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x7079
jmp 0x70c2
movb $0x1, %al
cmpl $0x112, 0x64(%rsp)      # imm = 0x112
movb %al, 0x1b(%rsp)
jne 0x70de
cmpl $0x0, 0x5c(%rsp)
sete %al
movb %al, 0x1b(%rsp)
movb 0x1b(%rsp), %al
testb $0x1, %al
jne 0x609c
movq 0xd727(%rip), %rdi      # 0x14818
callq 0x3050
movq 0xd71b(%rip), %rdi      # 0x14818
callq 0x31b0
movq 0xd6f7(%rip), %rdi      # 0x14800
callq 0x3050
movq 0xd6eb(%rip), %rdi      # 0x14800
callq 0x31b0
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)