// File: /workspace/github_c_makefile_star2_O3/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 0xc6b1(%rip), %rax      # 0x11828
testq %rax, %rax
je 0x518f
movswl 0x4(%rax), %ecx
incl %ecx
movswl 0x6(%rax), %eax
addl $-0x7, %eax
movl %eax, 0x24(%rsp)
jmp 0x519c
movl $0xfffffff7, 0x24(%rsp) # imm = 0xFFFFFFF7
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
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 0xc623(%rip), %rdi      # 0x11828
callq 0x3050
movq 0xc5ff(%rip), %rdi      # 0x11810
callq 0x3050
movq 0xc5f3(%rip), %rdi      # 0x11810
movq 0xc43c(%rip), %rsi      # 0x11660
callq 0x4cbc
movq 0xc5e0(%rip), %rdi      # 0x11810
callq 0x31b0
callq 0x58e6
cmpl $0x0, 0x40(%rsp)
jle 0x53b8
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 0xc5a9(%rip), %rdi      # 0x11828
movl %r13d, %esi
movl $0x1, %edx
leaq 0x775f(%rip), %rcx      # 0xc9ed
xorl %eax, %eax
callq 0x31c0
leal (%r14,%r13), %eax
cmpl $0x2, %eax
jne 0x52c0
movl (%r12), %eax
orl $0x2, %eax
cmpl $0x3, %eax
jne 0x52ce
movq 0xc577(%rip), %rdi      # 0x11828
movq 0xbce0(%rip), %rax      # 0x10f98
movl 0xac(%rax), %esi
jmp 0x52e2
movq 0xc561(%rip), %rdi      # 0x11828
movl $0x20, %esi
jmp 0x52e2
movq 0xc553(%rip), %rdi      # 0x11828
movq 0xbcbc(%rip), %rax      # 0x10f98
movl 0x180(%rax), %esi
callq 0x33f0
movl 0x88(%r15,%rbp), %eax
decl %eax
cmpl $0x5, %eax
ja 0x53a3
leaq 0x6c97(%rip), %rcx      # 0xbf98
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xc517(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
leaq 0x6e8d(%rip), %rsi      # 0xc1a9
jmp 0x539c
movq 0xc503(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
testq %rdx, %rdx
leaq 0x6ec6(%rip), %rax      # 0xc1f9
cmoveq %rax, %rdx
leaq 0x6eab(%rip), %rsi      # 0xc1e9
jmp 0x539c
movq 0xc4e1(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
leaq 0x6e67(%rip), %rsi      # 0xc1b9
jmp 0x539c
movq 0xc4cd(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
leaq 0x6e73(%rip), %rsi      # 0xc1d9
jmp 0x539c
movq 0xc4b9(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
leaq 0x6e4f(%rip), %rsi      # 0xc1c9
jmp 0x539c
movq 0xc4a5(%rip), %rdi      # 0x11828
movq (%r15,%rbp), %rdx
testq %rdx, %rdx
leaq 0x6e68(%rip), %rax      # 0xc1f9
cmoveq %rax, %rdx
leaq 0x6e71(%rip), %rsi      # 0xc20d
xorl %eax, %eax
callq 0x3440
addq $0x590, %rbp            # imm = 0x590
incl %r13d
cmpq %rbp, 0x50(%rsp)
jne 0x5278
cmpl $0x0, 0x14(%rsp)
jle 0x53f6
movq 0xc462(%rip), %rdi      # 0x11828
movl $0x1, %esi
movl 0x24(%rsp), %edx
leaq 0x6e47(%rip), %rcx      # 0xc21d
xorl %eax, %eax
callq 0x31c0
movq 0xc444(%rip), %rdi      # 0x11828
movq 0xbbad(%rip), %rax      # 0x10f98
movl 0xb4(%rax), %esi
callq 0x33f0
movq 0x48(%rsp), %r14
movl %r14d, %eax
subl 0x14(%rsp), %eax
cmpl 0x28(%rsp), %eax
jle 0x543f
movq 0xc419(%rip), %rdi      # 0x11828
movq 0x30(%rsp), %rsi
movl 0x24(%rsp), %edx
leaq 0x6dfe(%rip), %rcx      # 0xc21d
xorl %eax, %eax
callq 0x31c0
movq 0xc3fb(%rip), %rdi      # 0x11828
movq 0xbb64(%rip), %rax      # 0x10f98
movl 0xb8(%rax), %esi
callq 0x33f0
movq 0xc3e2(%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 0xc3bd(%rip), %rdi      # 0x11828
leaq 0x6d20(%rip), %rsi      # 0xc192
callq 0x4cbc
movq 0xc3aa(%rip), %rdi      # 0x11828
callq 0x31b0
movq 0xbb16(%rip), %rax      # 0x10fa0
movq (%rax), %rdi
callq 0x3120
movl %eax, %r13d
cmpl $0x69, %eax
jle 0x54c0
cmpl $0x101, %r13d           # imm = 0x101
jg 0x54e7
leal -0x6a(%r13), %eax
cmpl $0xc, %eax
ja 0x56d5
leaq 0x6b2d(%rip), %rcx      # 0xbfe4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal -0x4a(%r13), %eax
cmpl $0xc, %eax
ja 0x5564
leaq 0x6adc(%rip), %rcx      # 0xbfb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x5a5b
jmp 0x56d5
cmpl $0x157, %r13d           # imm = 0x157
je 0x5574
cmpl $0x103, %r13d           # imm = 0x103
je 0x5539
cmpl $0x102, %r13d           # imm = 0x102
jne 0x56d5
movq 0x18(%rsp), %rax
incl %eax
cmpl %r14d, %eax
jge 0x56c1
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 0x56d5
movq 0x18(%rsp), %rax
testl %eax, %eax
jle 0x56cc
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 0x56c5
cmpl $0xa, %r13d
je 0x5574
cmpl $0x20, %r13d
jne 0x56d5
movslq 0x18(%rsp), %rax
imulq $0x590, %rax, %rcx      # imm = 0x590
leaq (%rbx,%rcx), %rax
movl 0x368(%rbx,%rcx), %ecx
cmpl $0x3, %ecx
je 0x570b
cmpl $0x1, %ecx
movq 0x8(%rsp), %r8
jne 0x56da
movl $0x3, 0x368(%rax)
cmpl $0x0, 0x220(%rax)
je 0x57a1
testl %r14d, %r14d
jle 0x5891
movl 0x2c8(%rax), %ecx
xorl %esi, %esi
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rsi)
jne 0x561f
movl 0xc(%rbx,%rsi), %edi
cmpl 0xc(%rax), %edi
jne 0x561f
movl 0x4(%rbx,%rsi), %edi
cmpl 0x4(%rax), %edi
jne 0x561f
movl 0x210(%rbx,%rsi), %edi
cmpl 0x210(%rax), %edi
jne 0x561f
movl 0x214(%rbx,%rsi), %edi
cmpl 0x214(%rax), %edi
jne 0x561f
cmpl $0x0, 0x220(%rbx,%rsi)
jle 0x561f
xorl %edi, %edi
cmpl $0x1, 0x368(%rbx,%rsi)
sete %dil
addl %edi, %edx
addq $0x590, %rsi            # imm = 0x590
cmpq %rsi, %r8
jne 0x55cc
testl %r14d, %r14d
setle %cl
testl %edx, %edx
setne %dl
orb %cl, %dl
jne 0x56da
movl 0x2c8(%rax), %ecx
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rdx)
jne 0x569e
movl 0xc(%rbx,%rdx), %esi
cmpl 0xc(%rax), %esi
jne 0x569e
movl 0x4(%rbx,%rdx), %esi
cmpl 0x4(%rax), %esi
jne 0x569e
movl 0x210(%rbx,%rdx), %esi
cmpl 0x210(%rax), %esi
jne 0x569e
movl 0x214(%rbx,%rdx), %esi
cmpl 0x214(%rax), %esi
jne 0x569e
cmpl $0x0, 0x220(%rbx,%rdx)
jne 0x569e
cmpl $0x6, 0x368(%rbx,%rdx)
je 0x569e
movl $0x3, 0x368(%rbx,%rdx)
addq $0x590, %rdx            # imm = 0x590
cmpq %rdx, %r8
jne 0x5646
jmp 0x56da
callq 0x6139
jmp 0x56d5
callq 0x64b9
jmp 0x56d5
callq 0x6685
jmp 0x56d5
movl 0x2c(%rsp), %eax
movq %rax, 0x18(%rsp)
jmp 0x56d5
movq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %r8
testl %r14d, %r14d
jle 0x5891
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 0x56e7
testl %ecx, %ecx
sete %al
jmp 0x5893
movl $0x1, 0x368(%rax)
cmpl $0x0, 0x220(%rax)
movq 0x8(%rsp), %r8
je 0x581b
testl %r14d, %r14d
jle 0x5891
movl 0x2c8(%rax), %ecx
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rdx)
jne 0x5790
movl 0xc(%rbx,%rdx), %esi
cmpl 0xc(%rax), %esi
jne 0x5790
movl 0x4(%rbx,%rdx), %esi
cmpl 0x4(%rax), %esi
jne 0x5790
movl 0x210(%rbx,%rdx), %esi
cmpl 0x210(%rax), %esi
jne 0x5790
movl 0x214(%rbx,%rdx), %esi
cmpl 0x214(%rax), %esi
jne 0x5790
cmpl $0x0, 0x220(%rbx,%rdx)
jne 0x5790
cmpl $0x6, 0x368(%rbx,%rdx)
je 0x5790
movl $0x4, 0x368(%rbx,%rdx)
addq $0x590, %rdx            # imm = 0x590
cmpq %rdx, %r8
jne 0x5738
jmp 0x56da
testl %r14d, %r14d
jle 0x5891
movl 0x2c8(%rax), %ecx
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rdx)
jne 0x580a
movl 0xc(%rbx,%rdx), %esi
cmpl 0xc(%rax), %esi
jne 0x580a
movl 0x4(%rbx,%rdx), %esi
cmpl 0x4(%rax), %esi
jne 0x580a
movl 0x210(%rbx,%rdx), %esi
cmpl 0x210(%rax), %esi
jne 0x580a
movl 0x214(%rbx,%rdx), %esi
cmpl 0x214(%rax), %esi
jne 0x580a
cmpl $0x0, 0x220(%rbx,%rdx)
jle 0x580a
cmpl $0x6, 0x368(%rbx,%rdx)
je 0x580a
movl $0x3, 0x368(%rbx,%rdx)
addq $0x590, %rdx            # imm = 0x590
cmpq %rdx, %r8
jne 0x57b2
jmp 0x56da
testl %r14d, %r14d
jle 0x5891
movl 0x2c8(%rax), %ecx
xorl %edx, %edx
cmpl %ecx, 0x2c8(%rbx,%rdx)
jne 0x5880
movl 0xc(%rbx,%rdx), %esi
cmpl 0xc(%rax), %esi
jne 0x5880
movl 0x4(%rbx,%rdx), %esi
cmpl 0x4(%rax), %esi
jne 0x5880
movl 0x210(%rbx,%rdx), %esi
cmpl 0x210(%rax), %esi
jne 0x5880
movl 0x214(%rbx,%rdx), %esi
cmpl 0x214(%rax), %esi
jne 0x5880
cmpl $0x0, 0x220(%rbx,%rdx)
jle 0x5880
cmpl $0x6, 0x368(%rbx,%rdx)
je 0x5880
movl $0x2, 0x368(%rbx,%rdx)
addq $0x590, %rdx            # imm = 0x590
cmpq %rdx, %r8
jne 0x5828
jmp 0x56da
movb $0x1, %al
cmpl $0x112, %r13d           # imm = 0x112
jne 0x51fe
testb %al, %al
jne 0x51fe
movq 0xbf79(%rip), %rdi      # 0x11828
callq 0x3050
movq 0xbf6d(%rip), %rdi      # 0x11828
callq 0x31b0
movq 0xbf49(%rip), %rdi      # 0x11810
callq 0x3050
movq 0xbf3d(%rip), %rdi      # 0x11810
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31b0