// File: /workspace/github_c_makefile_star2_O0/sTeeLM[P]dwipe/gui.c
// Function: dwipe_gui_rounds
void dwipe_gui_rounds( void )
{
/**
 * Allows the user to change the rounds option.
 *
 * @modifies  dwipe_options.rounds
 * @modifies  main_window
 *
 */

	/* Set the initial focus. */
	int focus = dwipe_options.rounds;

	/* The first tabstop. */
	const int tab1 = 2;

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

	/* Input buffer. */
	int keystroke;

	/* Erase the footer window. */
	werase( footer_window );
	wrefresh( footer_window );


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

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

		/* Add a title. */
		dwipe_gui_title( main_window, " Rounds " );

		/* Initialize the working row. */
		yy = 4;

		/*                               0         1         2         3         4         5         6         7   */
		mvwprintw( main_window, yy++, tab1, "This is the number of times to run the wipe method on each device."  );
		mvwprintw( main_window, yy++, tab1, ""  );

		if( focus > 0 )
		{	
			/* Print the syslinux configuration hint. */
			mvwprintw( main_window, yy++, tab1, "syslinux.cfg:  nuke=\"dwipe --rounds %i\"", focus );

			/* Print this line last so that the cursor is in the right place. */
			mvwprintw( main_window, 2, tab1, "> %i", focus );
		}

		else
		{
			mvwprintw( main_window, yy++, tab1, "The number of rounds must be a non-negative integer." );

			/* Print this line last so that the cursor is in the right place. */
			mvwprintw( main_window, 2, tab1, "> " );
		}

		/* Reveal the cursor. */
		curs_set( 1 );

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

		/* Get a keystroke. */
		keystroke = getch();

		switch( keystroke )
		{
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':

				if( focus < 100000000 )
				{
					/* Left shift, base ten. */
					focus *= 10;

					/* This assumes ASCII input, where the zero character is 0x30. */
					focus += keystroke - 48;
				}

				break;

			case KEY_BACKSPACE:
			case KEY_LEFT:
			case 127:

				/* Right shift, base ten. */
				focus /= 10;

				break;

		} /* switch keystroke */

		/* Hide the cursor. */
		curs_set( 0 );

	} while( keystroke != 10 );

	if( focus > 0 )
	{
		/* Set the number of rounds. */
		dwipe_options.rounds = focus;
	}

}

// Assembly:
subq $0x38, %rsp
leaq 0xc505(%rip), %rax      # 0x14830
movl 0x20(%rax), %eax
movl %eax, 0x34(%rsp)
movl $0x2, 0x30(%rsp)
movq 0xc4bf(%rip), %rdi      # 0x14800
callq 0x3050
movq 0xc4b3(%rip), %rdi      # 0x14800
callq 0x31b0
movq 0xc4bf(%rip), %rdi      # 0x14818
callq 0x3050
movq 0xc4b3(%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 0xc481(%rip), %rdi      # 0x14818
leaq 0x7e8e(%rip), %rsi      # 0x1022c
callq 0x5a80
movl $0x4, 0x2c(%rsp)
movq 0xc466(%rip), %rdi      # 0x14818
movl 0x2c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movl $0x2, %edx
leaq 0x7e6a(%rip), %rcx      # 0x10235
movb $0x0, %al
callq 0x31c0
movq 0xc43f(%rip), %rdi      # 0x14818
movl 0x2c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movl $0x2, %edx
leaq 0x9591(%rip), %rcx      # 0x11983
movb $0x0, %al
callq 0x31c0
cmpl $0x0, 0x34(%rsp)
jle 0x844f
movq 0xc411(%rip), %rdi      # 0x14818
movl 0x2c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movl 0x34(%rsp), %r8d
movl $0x2, %edx
leaq 0x7e53(%rip), %rcx      # 0x10278
movb $0x0, %al
callq 0x31c0
movq 0xc3e5(%rip), %rdi      # 0x14818
movl 0x34(%rsp), %r8d
movl $0x2, %edx
leaq 0x7e5c(%rip), %rcx      # 0x102a0
movl %edx, %esi
movb $0x0, %al
callq 0x31c0
jmp 0x8492
movq 0xc3c2(%rip), %rdi      # 0x14818
movl 0x2c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movl $0x2, %edx
leaq 0x7e36(%rip), %rcx      # 0x102a5
movb $0x0, %al
callq 0x31c0
movq 0xc39b(%rip), %rdi      # 0x14818
movl $0x2, %edx
leaq 0x7e51(%rip), %rcx      # 0x102da
movl %edx, %esi
movb $0x0, %al
callq 0x31c0
movl $0x1, %edi
callq 0x30f0
movq 0xc375(%rip), %rdi      # 0x14818
callq 0x31b0
movq 0xbb11(%rip), %rax      # 0x13fc0
movq (%rax), %rdi
callq 0x3120
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x24(%rsp)
addl $-0x30, %eax
subl $0xa, %eax
jb 0x84f2
jmp 0x84cd
movl 0x24(%rsp), %eax
subl $0x7f, %eax
je 0x8516
jmp 0x84d8
movl 0x24(%rsp), %eax
subl $0x104, %eax            # imm = 0x104
je 0x8516
jmp 0x84e5
movl 0x24(%rsp), %eax
subl $0x107, %eax            # imm = 0x107
je 0x8516
jmp 0x8526
cmpl $0x5f5e100, 0x34(%rsp)  # imm = 0x5F5E100
jge 0x8514
imull $0xa, 0x34(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x28(%rsp), %eax
subl $0x30, %eax
addl 0x34(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x8526
movl 0x34(%rsp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, 0x34(%rsp)
xorl %edi, %edi
callq 0x30f0
cmpl $0xa, 0x28(%rsp)
jne 0x8352
cmpl $0x0, 0x34(%rsp)
jle 0x854d
movl 0x34(%rsp), %ecx
leaq 0xc2e6(%rip), %rax      # 0x14830
movl %ecx, 0x20(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)