// File: acherkaoui[P]HTOP/terminal/terminal.cpp
// Function: Curses::Curses(Data&)
Curses::Curses(Data &newData)
{
	_status = true;
	_xlogo = 70;
	_side = false;
	data = newData;
	initscr();
	noecho();
	curs_set(FALSE);
	keypad(stdscr,TRUE);

	_time = newwin(10, 26, LINES - 10, COLS - 27);
	_ram = newwin(20, 36, 1, COLS - 38);
	_user = newwin(15, 65, LINES - 15, 1);
	_cpu = newwin(20, 58, 1, 1);
	_net = newwin(15, 65, LINES - 15 - 18,1);

	assume_default_colors(COLOR_RED, COLOR_BLACK);
	start_color();
	init_pair(0, COLOR_GREEN, COLOR_GREEN);
	init_pair(1, COLOR_YELLOW, COLOR_YELLOW);
	init_pair(2, COLOR_RED, COLOR_RED);
	init_pair(4, COLOR_GREEN, COLOR_BLACK);
	init_pair(5, COLOR_RED, COLOR_BLACK);
	init_pair(6, COLOR_WHITE, COLOR_WHITE);
	init_pair(7, COLOR_YELLOW, COLOR_BLACK);
	init_pair(8, COLOR_WHITE, COLOR_BLACK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x18, %rdi
movq %rdi, -0x28(%rbp)
callq 0x6cf0
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rdi
movb $0x1, 0x14(%rax)
movl $0x46, 0xc(%rax)
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rsi
callq 0x128c0
jmp 0xf5ba
callq 0x45f0
jmp 0xf5c1
callq 0x44d0
jmp 0xf5c8
xorl %edi, %edi
callq 0x4360
jmp 0xf5d1
movq 0xb9f0(%rip), %rax      # 0x1afc8
movq (%rax), %rdi
movl $0x1, %esi
callq 0x41c0
jmp 0xf5e7
movq 0xb9a2(%rip), %rax      # 0x1af90
movl (%rax), %edx
addl $-0xa, %edx
movq 0xb9a6(%rip), %rax      # 0x1afa0
movl (%rax), %ecx
addl $-0x1b, %ecx
movl $0xa, %edi
movl $0x1a, %esi
callq 0x4450
movq %rax, -0x38(%rbp)
jmp 0xf614
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x6c0(%rax)
movq 0xb976(%rip), %rax      # 0x1afa0
movl (%rax), %ecx
addl $-0x26, %ecx
movl $0x14, %edi
movl $0x24, %esi
movl $0x1, %edx
callq 0x4450
movq %rax, -0x40(%rbp)
jmp 0xf649
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x6b0(%rax)
movq 0xb931(%rip), %rax      # 0x1af90
movl (%rax), %edx
addl $-0xf, %edx
movl $0xf, %edi
movl $0x41, %esi
movl $0x1, %ecx
callq 0x4450
movq %rax, -0x48(%rbp)
jmp 0xf67e
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x6c8(%rax)
movl $0x14, %edi
movl $0x3a, %esi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x4450
movq %rax, -0x50(%rbp)
jmp 0xf6a9
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x6b8(%rax)
movq 0xb8d1(%rip), %rax      # 0x1af90
movl (%rax), %edx
addl $-0x21, %edx
movl $0xf, %edi
movl $0x41, %esi
movl $0x1, %ecx
callq 0x4450
movq %rax, -0x58(%rbp)
jmp 0xf6de
movq -0x30(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, 0x6d0(%rax)
movl $0x1, %edi
xorl %esi, %esi
callq 0x4230
jmp 0xf6fb
callq 0x40f0
jmp 0xf702
xorl %edi, %edi
movl $0x2, %edx
movl %edx, %esi
callq 0x40b0
jmp 0xf712
movl $0x1, %edi
movl $0x3, %edx
movl %edx, %esi
callq 0x40b0
jmp 0xf725
movl $0x2, %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x40b0
jmp 0xf738
movl $0x4, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x40b0
jmp 0xf74b
movl $0x5, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x40b0
jmp 0xf75e
movl $0x6, %edi
movl $0x7, %edx
movl %edx, %esi
callq 0x40b0
jmp 0xf771
movl $0x7, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x40b0
jmp 0xf784
movl $0x8, %edi
movl $0x7, %esi
xorl %edx, %edx
callq 0x40b0
jmp 0xf797
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x6e70
movq -0x18(%rbp), %rdi
callq 0x46f0
nopl (%rax,%rax)