// File: /workspace/github_c_makefile_star2_O0/sTeeLM[P]dwipe/gui.c
// Function: dwipe_gui_init
void dwipe_gui_init( void )
{
/**
 * Initializes the ncurses gui.
 *
 */

	/* Initialize the screen. */
	initscr();

	/* Disable TTY line buffering. */
	cbreak();

	/* Disable TTY echo. */
	noecho();

	/* Enable most special keys. */
	keypad( stdscr, TRUE );

	if( has_colors() )
	{
		/* Initialize color capabilities. */
		start_color();

		if( can_change_color() )
		{
			/* Redefine cyan to gray. */
			init_color( COLOR_CYAN, 128, 128, 128 );
		}

		/* Set white on blue as the emphasis color. */
		init_pair( 1, COLOR_WHITE, COLOR_BLUE );

		/* Set gray (or cyan) on blue as the normal color. */
		init_pair( 2, COLOR_CYAN, COLOR_BLUE );

		/* Set red on blue as the hilite color. */
		init_pair( 3, COLOR_RED, COLOR_BLUE );

		/* Set blue on white as the color for the header and footer windows. */
		init_pair( 4, COLOR_BLUE, COLOR_WHITE );

		/* Set white on green for success messages. */
		init_pair( 5, COLOR_WHITE, COLOR_GREEN );

		/* Set white on green for failure messages. */
		init_pair( 6, COLOR_WHITE, COLOR_RED );

		/* Set the background style. */
		wbkgdset( stdscr, COLOR_PAIR(1) | ' ' );

	}

	/* Clear the screen. */
	wclear( stdscr );


	/* Create the header window. */
	header_window = newwin( DWIPE_GUI_HEADER_H, DWIPE_GUI_HEADER_W, DWIPE_GUI_HEADER_Y, DWIPE_GUI_HEADER_X );

	if( has_colors() )
	{
		/* Set the background style of the header window. */
		wbkgdset( header_window, COLOR_PAIR(4) | ' ' );
	}

	/* Clear the header window. */
	wclear( header_window );

	/* Print the product banner. */
	dwipe_gui_title( header_window, dwipe_options.banner );

	/* Create the footer window. */
	footer_window = newwin( DWIPE_GUI_FOOTER_H, DWIPE_GUI_FOOTER_W, DWIPE_GUI_FOOTER_Y, DWIPE_GUI_FOOTER_X );

	if( has_colors() )
	{
		/* Set the background style of the footer window. */
		wbkgdset( footer_window, COLOR_PAIR(4) | ' ' );
	}

	/* Clear the footer window. */
	wclear( footer_window );

	/* Create the options window. */
	options_window = newwin( DWIPE_GUI_OPTIONS_H, DWIPE_GUI_OPTIONS_W, DWIPE_GUI_OPTIONS_Y, DWIPE_GUI_OPTIONS_X );

	if( has_colors() )
	{
		/* Set the background style of the options window. */
		wbkgdset( options_window, COLOR_PAIR(1) | ' ' );

		/* Apply the color change to the options window. */
		wattron( options_window, COLOR_PAIR(1) );
	}

	/* Clear the options window. */
	wclear( options_window );

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

	/* Create the stats window. */
	stats_window = newwin( DWIPE_GUI_STATS_H, DWIPE_GUI_STATS_W, DWIPE_GUI_STATS_Y, DWIPE_GUI_STATS_X );

	if( has_colors() )
	{
		/* Set the background style of the stats window. */
		wbkgdset( stats_window, COLOR_PAIR(1) | ' ' );

		/* Apply the color change to the stats window. */
		wattron( stats_window, COLOR_PAIR(1) );
	}

	/* Clear the new window. */
	wclear( stats_window );

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

	/* Add a title. */
	dwipe_gui_title( stats_window, stats_title );

	/* Print field labels. */
	mvwprintw( stats_window, DWIPE_GUI_STATS_RUNTIME_Y,    DWIPE_GUI_STATS_RUNTIME_X,    "Runtime:       " );
	mvwprintw( stats_window, DWIPE_GUI_STATS_ETA_Y,        DWIPE_GUI_STATS_ETA_X,        "Remaining:     " );
	mvwprintw( stats_window, DWIPE_GUI_STATS_LOAD_Y,       DWIPE_GUI_STATS_LOAD_X,       "Load Averages: " );
	mvwprintw( stats_window, DWIPE_GUI_STATS_THROUGHPUT_Y, DWIPE_GUI_STATS_THROUGHPUT_X, "Throughput:    " );
	mvwprintw( stats_window, DWIPE_GUI_STATS_ERRORS_Y,     DWIPE_GUI_STATS_ERRORS_X,     "Errors:        " );


	/* Create the main window. */
	main_window = newwin( DWIPE_GUI_MAIN_H, DWIPE_GUI_MAIN_W, DWIPE_GUI_MAIN_Y, DWIPE_GUI_MAIN_X );

	if( has_colors() )
	{
		/* Set the background style. */
		wbkgdset( main_window, COLOR_PAIR(1) | ' ' );

      /* Apply the color change. */
      wattron( main_window, COLOR_PAIR(1) );
	}

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

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

	/* Refresh the screen. */
	wrefresh( stdscr );
	wrefresh( header_window );
	wrefresh( footer_window );
	wrefresh( options_window );
	wrefresh( stats_window );
	wrefresh( main_window );

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

}

// Assembly:
subq $0x18, %rsp
callq 0x31a0
callq 0x32d0
callq 0x3160
movq 0xe466(%rip), %rax      # 0x13fc0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x3210
callq 0x3030
testb $0x1, %al
jne 0x5b75
jmp 0x5c21
callq 0x31f0
callq 0x3190
testb $0x1, %al
jne 0x5b85
jmp 0x5b98
movl $0x6, %edi
movl $0x80, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x3330
movl $0x1, %edi
movl $0x7, %esi
movl $0x4, %edx
callq 0x32e0
movl $0x2, %edi
movl $0x6, %esi
movl $0x4, %edx
callq 0x32e0
movl $0x3, %edi
movl $0x1, %esi
movl $0x4, %edx
callq 0x32e0
movl $0x4, %esi
movl $0x7, %edx
movl %esi, %edi
callq 0x32e0
movl $0x5, %edi
movl $0x7, %esi
movl $0x2, %edx
callq 0x32e0
movl $0x6, %edi
movl $0x7, %esi
movl $0x1, %edx
callq 0x32e0
movq 0xe3ac(%rip), %rax      # 0x13fc0
movq (%rax), %rdi
movl $0x120, %esi            # imm = 0x120
callq 0x30a0
movq 0xe398(%rip), %rax      # 0x13fc0
movq (%rax), %rdi
callq 0x3130
movq 0xe3a1(%rip), %rax      # 0x13fd8
movl (%rax), %esi
movl $0x1, %edi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x30b0
movq %rax, 0xebaa(%rip)      # 0x147f8
callq 0x3030
testb $0x1, %al
jne 0x5c59
jmp 0x5c6a
movq 0xeb98(%rip), %rdi      # 0x147f8
movl $0x420, %esi            # imm = 0x420
callq 0x30a0
movq 0xeb87(%rip), %rdi      # 0x147f8
callq 0x3130
movq 0xeb7b(%rip), %rdi      # 0x147f8
leaq 0xebac(%rip), %rax      # 0x14830
movq 0x8(%rax), %rsi
callq 0x5a80
movq 0xe344(%rip), %rax      # 0x13fd8
movl (%rax), %esi
movq 0xe343(%rip), %rax      # 0x13fe0
movl (%rax), %edx
subl $0x1, %edx
movl $0x1, %edi
xorl %ecx, %ecx
callq 0x30b0
movq %rax, 0xeb4b(%rip)      # 0x14800
callq 0x3030
testb $0x1, %al
jne 0x5cc0
jmp 0x5cd1
movq 0xeb39(%rip), %rdi      # 0x14800
movl $0x420, %esi            # imm = 0x420
callq 0x30a0
movq 0xeb28(%rip), %rdi      # 0x14800
callq 0x3130
movl $0x7, %edi
movl $0x2c, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x30b0
movq %rax, 0xeb0e(%rip)      # 0x14808
callq 0x3030
testb $0x1, %al
jne 0x5d05
jmp 0x5d2b
movq 0xeafc(%rip), %rdi      # 0x14808
movl $0x120, %esi            # imm = 0x120
callq 0x30a0
movq 0xeaeb(%rip), %rdi      # 0x14808
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
movl %eax, %edx
callq 0x3220
movq 0xead6(%rip), %rdi      # 0x14808
callq 0x3130
movq 0xeaca(%rip), %rdi      # 0x14808
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
movl $0x7, %edi
movl $0x24, %esi
movl $0x1, %edx
movl $0x2c, %ecx
callq 0x30b0
movq %rax, 0xea87(%rip)      # 0x14810
callq 0x3030
testb $0x1, %al
jne 0x5d94
jmp 0x5dba
movq 0xea75(%rip), %rdi      # 0x14810
movl $0x120, %esi            # imm = 0x120
callq 0x30a0
movq 0xea64(%rip), %rdi      # 0x14810
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
movl %eax, %edx
callq 0x3220
movq 0xea4f(%rip), %rdi      # 0x14810
callq 0x3130
movq 0xea43(%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 0xea11(%rip), %rdi      # 0x14810
movq 0xe842(%rip), %rsi      # 0x14648
callq 0x5a80
movq 0xe9fe(%rip), %rdi      # 0x14810
movl $0x1, %edx
leaq 0xa2bc(%rip), %rcx      # 0x100da
movl %edx, %esi
movb $0x0, %al
callq 0x31c0
movq 0xe9e2(%rip), %rdi      # 0x14810
movl $0x2, %esi
movl $0x1, %edx
leaq 0xa2ab(%rip), %rcx      # 0x100ea
movb $0x0, %al
callq 0x31c0
movq 0xe9c3(%rip), %rdi      # 0x14810
movl $0x3, %esi
movl $0x1, %edx
leaq 0xa29c(%rip), %rcx      # 0x100fa
movb $0x0, %al
callq 0x31c0
movq 0xe9a4(%rip), %rdi      # 0x14810
movl $0x4, %esi
movl $0x1, %edx
leaq 0xa28d(%rip), %rcx      # 0x1010a
movb $0x0, %al
callq 0x31c0
movq 0xe985(%rip), %rdi      # 0x14810
movl $0x5, %esi
movl $0x1, %edx
leaq 0xa27e(%rip), %rcx      # 0x1011a
movb $0x0, %al
callq 0x31c0
movq 0xe136(%rip), %rax      # 0x13fe0
movl (%rax), %edi
subl $0x8, %edi
subl $0x1, %edi
movq 0xe11f(%rip), %rax      # 0x13fd8
movl (%rax), %esi
movl $0x8, %edx
xorl %ecx, %ecx
callq 0x30b0
movq %rax, 0xe94a(%rip)      # 0x14818
callq 0x3030
testb $0x1, %al
jne 0x5ed9
jmp 0x5eff
movq 0xe938(%rip), %rdi      # 0x14818
movl $0x120, %esi            # imm = 0x120
callq 0x30a0
movq 0xe927(%rip), %rdi      # 0x14818
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
movl %eax, %edx
callq 0x3220
movq 0xe912(%rip), %rdi      # 0x14818
callq 0x3050
movq 0xe906(%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 0xe07c(%rip), %rax      # 0x13fc0
movq (%rax), %rdi
callq 0x31b0
movq 0xe8a5(%rip), %rdi      # 0x147f8
callq 0x31b0
movq 0xe8a1(%rip), %rdi      # 0x14800
callq 0x31b0
movq 0xe89d(%rip), %rdi      # 0x14808
callq 0x31b0
movq 0xe899(%rip), %rdi      # 0x14810
callq 0x31b0
movq 0xe895(%rip), %rdi      # 0x14818
callq 0x31b0
xorl %edi, %edi
callq 0x30f0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)