// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movl %edi, %r14d
movq 0xc721(%rip), %rax      # 0x11828
testq %rax, %rax
je 0x5114
movswl 0x4(%rax), %ecx
incl %ecx
jmp 0x5119
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x512b
movswl 0x6(%rax), %eax
addl $-0x7, %eax
movl %eax, 0x24(%rsp)
jmp 0x5133
movl $0xfffffff7, 0x24(%rsp) # imm = 0xFFFFFFF7
leal -0x4(%rcx), %eax
cmpl %r14d, %eax
movl %r14d, %edx
movl %eax, 0x28(%rsp)
cmovll %eax, %edx
addl $-0x2, %ecx
movq %rcx, 0x30(%rsp)
leal -0x1(%r14), %eax
movl %eax, 0x2c(%rsp)
movl %r14d, %eax
leaq 0x2e0(%rbx), %rcx
movq %rcx, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
imulq $0x590, %rdx, %rcx      # imm = 0x590
movq %rcx, 0x50(%rsp)
imulq $0x590, %rax, %r8       # imm = 0x590
movq $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq %r14, 0x48(%rsp)
movq %r8, 0x8(%rsp)
movq 0xc68c(%rip), %rdi      # 0x11828
callq 0x3050
movq 0xc668(%rip), %rdi      # 0x11810
callq 0x3050
movq 0xc65c(%rip), %rdi      # 0x11810
movq 0xc4a5(%rip), %rsi      # 0x11660
callq 0x4c4c
movq 0xc649(%rip), %rdi      # 0x11810
callq 0x31b0
callq 0x5877
cmpl $0x0, 0x40(%rsp)
jle 0x534f
movslq 0x18(%rsp), %rax
imulq $0x590, %rax, %rcx      # imm = 0x590
leaq (%rbx,%rcx), %r12
addq $0x368, %r12            # imm = 0x368
movslq 0x14(%rsp), %r14
imulq $0x590, %r14, %r15      # imm = 0x590
addq 0x38(%rsp), %r15
subl %eax, %r14d
movl $0x2, %r13d
xorl %ebp, %ebp
movq 0xc612(%rip), %rdi      # 0x11828
movl %r13d, %esi
movl $0x1, %edx
leaq 0x77c8(%rip), %rcx      # 0xc9ed
xorl %eax, %eax
callq 0x31c0
leal (%r14,%r13), %eax
cmpl $0x2, %eax
jne 0x5257
movl (%r12), %eax
orl $0x2, %eax
cmpl $0x3, %eax
jne 0x5265
movq 0xc5e0(%rip), %rdi      # 0x11828
movq 0xbd49(%rip), %rax      # 0x10f98
movl 0xac(%rax), %esi
jmp 0x5279
movq 0xc5ca(%rip), %rdi      # 0x11828
movl $0x20, %esi
jmp 0x5279
movq 0xc5bc(%rip), %rdi      # 0x11828
movq 0xbd25(%rip), %rax      # 0x10f98
movl 0x180(%rax), %esi
callq 0x33e0
movl 0x88(%r15,%rbp), %eax
decl %eax
cmpl $0x5, %eax
ja 0x533a
leaq 0x6d00(%rip), %rcx      # 0xbf98
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xc580(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
leaq 0x6ef6(%rip), %rsi      # 0xc1a9
jmp 0x5333
movq 0xc56c(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
testq %rdx, %rdx
leaq 0x6f2f(%rip), %rax      # 0xc1f9
cmoveq %rax, %rdx
leaq 0x6f14(%rip), %rsi      # 0xc1e9
jmp 0x5333
movq 0xc54a(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
leaq 0x6ed0(%rip), %rsi      # 0xc1b9
jmp 0x5333
movq 0xc536(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
leaq 0x6edc(%rip), %rsi      # 0xc1d9
jmp 0x5333
movq 0xc522(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
leaq 0x6eb8(%rip), %rsi      # 0xc1c9
jmp 0x5333
movq 0xc50e(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
testq %rdx, %rdx
leaq 0x6ed1(%rip), %rax      # 0xc1f9
cmoveq %rax, %rdx
leaq 0x6eda(%rip), %rsi      # 0xc20d
xorl %eax, %eax
callq 0x3430
addq $0x590, %rbp            # imm = 0x590
incl %r13d
cmpq %rbp, 0x50(%rsp)
jne 0x520f
cmpl $0x0, 0x14(%rsp)
jle 0x538d
movq 0xc4cb(%rip), %rdi      # 0x11828
movl $0x1, %esi
movl 0x24(%rsp), %edx
leaq 0x6eb0(%rip), %rcx      # 0xc21d
xorl %eax, %eax
callq 0x31c0
movq 0xc4ad(%rip), %rdi      # 0x11828
movq 0xbc16(%rip), %rax      # 0x10f98
movl 0xb4(%rax), %esi
callq 0x33e0
movq 0x48(%rsp), %r14
movl %r14d, %eax
subl 0x14(%rsp), %eax
cmpl 0x28(%rsp), %eax
jle 0x53d6
movq 0xc482(%rip), %rdi      # 0x11828
movq 0x30(%rsp), %rsi
movl 0x24(%rsp), %edx
leaq 0x6e67(%rip), %rcx      # 0xc21d
xorl %eax, %eax
callq 0x31c0
movq 0xc464(%rip), %rdi      # 0x11828
movq 0xbbcd(%rip), %rax      # 0x10f98
movl 0xb8(%rax), %esi
callq 0x33e0
movq 0xc44b(%rip), %rdi      # 0x11828
subq $0x8, %rsp
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
pushq %rax
pushq %rax
pushq %rax
callq 0x3100
addq $0x20, %rsp
movq 0xc426(%rip), %rdi      # 0x11828
leaq 0x6d89(%rip), %rsi      # 0xc192
callq 0x4c4c
movq 0xc413(%rip), %rdi      # 0x11828
callq 0x31b0
movq 0xbb7f(%rip), %rax      # 0x10fa0
movq (%rax), %rdi
callq 0x3120
movl %eax, %r13d
cmpl $0x69, %eax
jle 0x5457
cmpl $0x101, %r13d           # imm = 0x101
jg 0x547e
leal -0x6a(%r13), %eax
cmpl $0xc, %eax
ja 0x5668
leaq 0x6b96(%rip), %rcx      # 0xbfe4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal -0x4a(%r13), %eax
cmpl $0xc, %eax
ja 0x54fb
leaq 0x6b45(%rip), %rcx      # 0xbfb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x59ec
jmp 0x5668
cmpl $0x157, %r13d           # imm = 0x157
je 0x550b
cmpl $0x103, %r13d           # imm = 0x103
je 0x54d0
cmpl $0x102, %r13d           # imm = 0x102
jne 0x5668
movq 0x18(%rsp), %rax
incl %eax
cmpl %r14d, %eax
jge 0x5654
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %edx
subl %edx, %eax
xorl %ecx, %ecx
cmpl 0x28(%rsp), %eax
setge %cl
addl %ecx, %edx
movl %edx, 0x14(%rsp)
jmp 0x5668
movq 0x18(%rsp), %rax
testl %eax, %eax
jle 0x565f
movq %rax, %rcx
xorl %eax, %eax
movl 0x14(%rsp), %edx
cmpl %ecx, %edx
leal -0x1(%rcx), %ecx
setge %al
subl %eax, %edx
movl %edx, 0x14(%rsp)
movl %ecx, %eax
jmp 0x5658
cmpl $0xa, %r13d
je 0x550b
cmpl $0x20, %r13d
jne 0x5668
movslq 0x18(%rsp), %rax
imulq $0x590, %rax, %rcx      # imm = 0x590
leaq (%rbx,%rcx), %rax
movl 0x368(%rbx,%rcx), %ecx
cmpl $0x3, %ecx
je 0x56b3
cmpl $0x1, %ecx
movq 0x8(%rsp), %r8
jne 0x566d
movl $0x3, 0x368(%rax)
cmpl $0x0, 0x220(%rax)
je 0x5745
xorl %ecx, %ecx
testl %r14d, %r14d
jle 0x55c3
movl 0x2c8(%rax), %edx
xorl %esi, %esi
cmpl %edx, 0x2c8(%rbx,%rsi)
jne 0x55b2
movl 0xc(%rbx,%rsi), %edi
cmpl 0xc(%rax), %edi
jne 0x55b2
movl 0x4(%rbx,%rsi), %edi
cmpl 0x4(%rax), %edi
jne 0x55b2
movl 0x210(%rbx,%rsi), %edi
cmpl 0x210(%rax), %edi
jne 0x55b2
movl 0x214(%rbx,%rsi), %edi
cmpl 0x214(%rax), %edi
jne 0x55b2
cmpl $0x0, 0x220(%rbx,%rsi)
jle 0x55b2
xorl %edi, %edi
cmpl $0x1, 0x368(%rbx,%rsi)
sete %dil
addl %edi, %ecx
addq $0x590, %rsi            # imm = 0x590
cmpq %rsi, %r8
jne 0x555f
testl %ecx, %ecx
setne %cl
testl %r14d, %r14d
setle %dl
orb %cl, %dl
jne 0x566d
movl 0x2c8(%rax), %ecx
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rdx)
jne 0x5631
movl 0xc(%rbx,%rdx), %esi
cmpl 0xc(%rax), %esi
jne 0x5631
movl 0x4(%rbx,%rdx), %esi
cmpl 0x4(%rax), %esi
jne 0x5631
movl 0x210(%rbx,%rdx), %esi
cmpl 0x210(%rax), %esi
jne 0x5631
movl 0x214(%rbx,%rdx), %esi
cmpl 0x214(%rax), %esi
jne 0x5631
cmpl $0x0, 0x220(%rbx,%rdx)
jne 0x5631
cmpl $0x6, 0x368(%rbx,%rdx)
je 0x5631
movl $0x3, 0x368(%rbx,%rdx)
addq $0x590, %rdx            # imm = 0x590
cmpq %rdx, %r8
jne 0x55d9
jmp 0x566d
callq 0x60cc
jmp 0x5668
callq 0x644c
jmp 0x5668
callq 0x6618
jmp 0x5668
movl 0x2c(%rsp), %eax
movq %rax, 0x18(%rsp)
jmp 0x5668
movq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %r8
testl %r14d, %r14d
jle 0x5697
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x1, 0x368(%rbx,%rax)
sete %dl
addl %edx, %ecx
addq $0x590, %rax            # imm = 0x590
cmpq %rax, %r8
jne 0x5676
testl %ecx, %ecx
sete %al
jmp 0x5699
movb $0x1, %al
cmpl $0x112, %r13d           # imm = 0x112
jne 0x5195
testb %al, %al
jne 0x5195
jmp 0x5839
movl $0x1, 0x368(%rax)
cmpl $0x0, 0x220(%rax)
movq 0x8(%rsp), %r8
je 0x57bf
testl %r14d, %r14d
jle 0x566d
movl 0x2c8(%rax), %ecx
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rdx)
jne 0x5734
movl 0xc(%rbx,%rdx), %esi
cmpl 0xc(%rax), %esi
jne 0x5734
movl 0x4(%rbx,%rdx), %esi
cmpl 0x4(%rax), %esi
jne 0x5734
movl 0x210(%rbx,%rdx), %esi
cmpl 0x210(%rax), %esi
jne 0x5734
movl 0x214(%rbx,%rdx), %esi
cmpl 0x214(%rax), %esi
jne 0x5734
cmpl $0x0, 0x220(%rbx,%rdx)
jne 0x5734
cmpl $0x6, 0x368(%rbx,%rdx)
je 0x5734
movl $0x4, 0x368(%rbx,%rdx)
addq $0x590, %rdx            # imm = 0x590
cmpq %rdx, %r8
jne 0x56dc
jmp 0x566d
testl %r14d, %r14d
jle 0x566d
movl 0x2c8(%rax), %ecx
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rdx)
jne 0x57ae
movl 0xc(%rbx,%rdx), %esi
cmpl 0xc(%rax), %esi
jne 0x57ae
movl 0x4(%rbx,%rdx), %esi
cmpl 0x4(%rax), %esi
jne 0x57ae
movl 0x210(%rbx,%rdx), %esi
cmpl 0x210(%rax), %esi
jne 0x57ae
movl 0x214(%rbx,%rdx), %esi
cmpl 0x214(%rax), %esi
jne 0x57ae
cmpl $0x0, 0x220(%rbx,%rdx)
jle 0x57ae
cmpl $0x6, 0x368(%rbx,%rdx)
je 0x57ae
movl $0x3, 0x368(%rbx,%rdx)
addq $0x590, %rdx            # imm = 0x590
cmpq %rdx, %r8
jne 0x5756
jmp 0x566d
testl %r14d, %r14d
jle 0x566d
movl 0x2c8(%rax), %ecx
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rdx)
jne 0x5828
movl 0xc(%rbx,%rdx), %esi
cmpl 0xc(%rax), %esi
jne 0x5828
movl 0x4(%rbx,%rdx), %esi
cmpl 0x4(%rax), %esi
jne 0x5828
movl 0x210(%rbx,%rdx), %esi
cmpl 0x210(%rax), %esi
jne 0x5828
movl 0x214(%rbx,%rdx), %esi
cmpl 0x214(%rax), %esi
jne 0x5828
cmpl $0x0, 0x220(%rbx,%rdx)
jle 0x5828
cmpl $0x6, 0x368(%rbx,%rdx)
je 0x5828
movl $0x2, 0x368(%rbx,%rdx)
addq $0x590, %rdx            # imm = 0x590
cmpq %rdx, %r8
jne 0x57d0
jmp 0x566d
movq 0xbfe8(%rip), %rdi      # 0x11828
callq 0x3050
movq 0xbfdc(%rip), %rdi      # 0x11828
callq 0x31b0
movq 0xbfb8(%rip), %rdi      # 0x11810
callq 0x3050
movq 0xbfac(%rip), %rdi      # 0x11810
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31b0