// File: acherkaoui[P]HTOP/terminal/terminal.cpp
// Function: Curses::printRam()
void Curses::printRam()
{
	int i = 0;
	print(_ram , i++, 2, "                                  ", 2);
	print(_ram , i++, 2, ("                " +
		data.ram.getModuleName()).c_str(), 8);
	print(_ram , i++, 2, "                                  ", 2);
	i++;

	print(_ram, i++, 15, (std::to_string(data.ram.getPercentRam()).substr(0, 5) + "%%").c_str(), 5);
	print(_ram, i, 2, (" RAM:  "), 5);
	ProgressBar(_ram,i++,  9,data.ram.getPercentRam());

	wattron(_ram, COLOR_PAIR(5));
	mvwprintw(_ram, i++, 2, " Total RAM: %s        ", std::to_string(data.ram.getTotalRam()).c_str());
	mvwprintw(_ram, i++, 2, " Available RAM: %s      ", std::to_string(data.ram.getFreeRam()).c_str());
	wattroff(_ram, COLOR_PAIR(5));

	i++;
	print(_ram, i++, 15, (std::to_string(data.ram.getPercentSwap()).substr(0, 4) + "%%").c_str(), 4);
	print(_ram, i, 2, (" SWAP: "), 4);
	ProgressBar(_ram,i++, 9,data.ram.getPercentSwap());
	wattron(_ram, COLOR_PAIR(4));
	mvwprintw(_ram, i++, 2, " Total SWAP : %s    ", std::to_string(data.ram.getTotalSwap()).c_str());
	mvwprintw(_ram, i++, 2, " Available SWAP : %s     ", std::to_string(data.ram.getFreeSwap()).c_str());
	wattroff(_ram, COLOR_PAIR(4));

	i++;
	print(_ram , i++, 2, (" Tasks: " + std::to_string(data.ram.getProcesses()) + "         ").c_str(), 7);
	print(_ram , i++, 2, (" UpTime: " + data.ram.getUpTime()).c_str(), 7);
	i++;
	print(_ram , i++, 2, "                                  ", 2);
	mvwin(_ram  , 1, COLS - 38);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3d0, %rsp            # imm = 0x3D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
movl $0x0, -0xc(%rbp)
movq 0x6b0(%rdi), %rsi
movl -0xc(%rbp), %edx
movl %edx, %eax
incl %eax
movl %eax, -0xc(%rbp)
leaq 0x4762(%rip), %r8       # 0x1480b
movl $0x2, %r9d
movl %r9d, %ecx
callq 0xfad0
movq -0x2a0(%rbp), %rsi
movq 0x6b0(%rsi), %rax
movq %rax, -0x298(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x28c(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rsi            # imm = 0x1E8
leaq -0x50(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0xbcf0
movq -0x288(%rbp), %rdx
leaq 0x471e(%rip), %rsi      # 0x1481d
leaq -0x30(%rbp), %rdi
callq 0x12990
jmp 0x1010a
leaq -0x30(%rbp), %rdi
callq 0x41f0
movq -0x2a0(%rbp), %rdi
movq -0x298(%rbp), %rsi
movl -0x28c(%rbp), %edx
movq %rax, %r8
movl $0x2, %ecx
movl $0x8, %r9d
callq 0xfad0
jmp 0x1013c
leaq -0x30(%rbp), %rdi
callq 0x42a0
leaq -0x50(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rdi
movq 0x6b0(%rdi), %rsi
movl -0xc(%rbp), %edx
movl %edx, %eax
incl %eax
movl %eax, -0xc(%rbp)
leaq 0x469e(%rip), %r8       # 0x1480b
movl $0x2, %r9d
movl %r9d, %ecx
callq 0xfad0
movq -0x2a0(%rbp), %rdi
movl -0xc(%rbp), %eax
incl %eax
movl %eax, -0xc(%rbp)
movq 0x6b0(%rdi), %rax
movq %rax, -0x2b8(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x2ac(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0xed70
movq %rax, %rsi
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x129e0
movq -0x2a8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0xa0(%rbp), %rdi
movl $0x5, %ecx
callq 0x4440
jmp 0x101e6
leaq 0x4583(%rip), %rdx      # 0x14770
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xef20
jmp 0x101ff
leaq -0x80(%rbp), %rdi
callq 0x41f0
movq -0x2a0(%rbp), %rdi
movq -0x2b8(%rbp), %rsi
movl -0x2ac(%rbp), %edx
movq %rax, %r8
movl $0xf, %ecx
movl $0x5, %r9d
callq 0xfad0
jmp 0x10231
leaq -0x80(%rbp), %rdi
callq 0x42a0
leaq -0xa0(%rbp), %rdi
callq 0x42a0
leaq -0xc0(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rdi
movq 0x6b0(%rdi), %rsi
movl -0xc(%rbp), %edx
leaq 0x4509(%rip), %r8       # 0x14773
movl $0x2, %ecx
movl %ecx, -0x2dc(%rbp)
movl $0x5, %r9d
callq 0xfad0
movq -0x2a0(%rbp), %rdi
movq 0x6b0(%rdi), %rax
movq %rax, -0x2d8(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x2cc(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movq %rdi, -0x2c8(%rbp)
callq 0xed70
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x2c0(%rbp)
testq %rax, %rax
movss %xmm0, -0x2bc(%rbp)
js 0x102f7
movss -0x2c0(%rbp), %xmm0
movss %xmm0, -0x2bc(%rbp)
movq -0x2a0(%rbp), %rsi
movl -0x2cc(%rbp), %ecx
movq -0x2d8(%rbp), %rdx
movss -0x2bc(%rbp), %xmm0
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x300(%rbp)
movl $0x9, %r8d
callq 0x10b50
movq -0x300(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rax
movq 0x6b0(%rax), %rdi
xorl %eax, %eax
movl %eax, -0x2e0(%rbp)
movl %eax, %edx
movl $0x500, %esi            # imm = 0x500
callq 0x4250
movq -0x2c8(%rbp), %rdi
movq -0x2a0(%rbp), %rax
movq 0x6b0(%rax), %rax
movq %rax, -0x2f0(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x2e4(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
callq 0xe920
movq %rax, %rsi
leaq -0x100(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x129e0
movq -0x2f8(%rbp), %rdi
callq 0x41f0
movq -0x2f0(%rbp), %rdi
movl -0x2e4(%rbp), %esi
movl -0x2dc(%rbp), %edx
movq %rax, %r8
movl -0x2e0(%rbp), %eax
leaq 0x43ad(%rip), %rcx      # 0x1477b
callq 0x4110
jmp 0x103d5
leaq -0x100(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rdi
movq 0x6b0(%rdi), %rax
movq %rax, -0x310(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x304(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0xec90
movq %rax, %rsi
leaq -0x120(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x129e0
movq -0x318(%rbp), %rdi
callq 0x41f0
movq -0x310(%rbp), %rdi
movl -0x304(%rbp), %esi
movq %rax, %r8
leaq 0x4349(%rip), %rcx      # 0x14792
xorl %eax, %eax
movl $0x2, %edx
callq 0x4110
jmp 0x10457
leaq -0x120(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rax
movq 0x6b0(%rax), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x320(%rbp)
movl $0x500, %esi            # imm = 0x500
callq 0x4550
movq -0x2a0(%rbp), %rdi
movl -0xc(%rbp), %eax
incl %eax
movl %eax, -0xc(%rbp)
movq 0x6b0(%rdi), %rax
movq %rax, -0x338(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x32c(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0xeda0
movq %rax, %rsi
leaq -0x180(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x129e0
movq -0x328(%rbp), %rsi
movq -0x320(%rbp), %rdx
leaq -0x160(%rbp), %rdi
movl $0x4, %ecx
callq 0x4440
jmp 0x104f4
leaq 0x4275(%rip), %rdx      # 0x14770
leaq -0x140(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0xef20
jmp 0x10510
leaq -0x140(%rbp), %rdi
callq 0x41f0
movq -0x2a0(%rbp), %rdi
movq -0x338(%rbp), %rsi
movl -0x32c(%rbp), %edx
movq %rax, %r8
movl $0xf, %ecx
movl $0x4, %r9d
callq 0xfad0
jmp 0x10545
leaq -0x140(%rbp), %rdi
callq 0x42a0
leaq -0x160(%rbp), %rdi
callq 0x42a0
leaq -0x180(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rdi
movq 0x6b0(%rdi), %rsi
movl -0xc(%rbp), %edx
leaq 0x422a(%rip), %r8       # 0x147ab
movl $0x2, %ecx
movl %ecx, -0x35c(%rbp)
movl $0x4, %r9d
callq 0xfad0
movq -0x2a0(%rbp), %rdi
movq 0x6b0(%rdi), %rax
movq %rax, -0x358(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x34c(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movq %rdi, -0x348(%rbp)
callq 0xeda0
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x340(%rbp)
testq %rax, %rax
movss %xmm0, -0x33c(%rbp)
js 0x1060e
movss -0x340(%rbp), %xmm0
movss %xmm0, -0x33c(%rbp)
movq -0x2a0(%rbp), %rsi
movl -0x34c(%rbp), %ecx
movq -0x358(%rbp), %rdx
movss -0x33c(%rbp), %xmm0
leaq -0x1a0(%rbp), %rdi
movq %rdi, -0x380(%rbp)
movl $0x9, %r8d
callq 0x10b50
movq -0x380(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rax
movq 0x6b0(%rax), %rdi
xorl %eax, %eax
movl %eax, -0x360(%rbp)
movl %eax, %edx
movl $0x400, %esi            # imm = 0x400
callq 0x4250
movq -0x348(%rbp), %rdi
movq -0x2a0(%rbp), %rax
movq 0x6b0(%rax), %rax
movq %rax, -0x370(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x364(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
callq 0xec60
movq %rax, %rsi
leaq -0x1c0(%rbp), %rdi
movq %rdi, -0x378(%rbp)
callq 0x129e0
movq -0x378(%rbp), %rdi
callq 0x41f0
movq -0x370(%rbp), %rdi
movl -0x364(%rbp), %esi
movl -0x35c(%rbp), %edx
movq %rax, %r8
movl -0x360(%rbp), %eax
leaq 0x40ce(%rip), %rcx      # 0x147b3
callq 0x4110
jmp 0x106ec
leaq -0x1c0(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rdi
movq 0x6b0(%rdi), %rax
movq %rax, -0x390(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x384(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0xecc0
movq %rax, %rsi
leaq -0x1e0(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x129e0
movq -0x398(%rbp), %rdi
callq 0x41f0
movq -0x390(%rbp), %rdi
movl -0x384(%rbp), %esi
movq %rax, %r8
leaq 0x4068(%rip), %rcx      # 0x147c8
xorl %eax, %eax
movl $0x2, %edx
callq 0x4110
jmp 0x1076e
leaq -0x1e0(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rax
movq 0x6b0(%rax), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x400, %esi            # imm = 0x400
callq 0x4550
movq -0x2a0(%rbp), %rdi
movl -0xc(%rbp), %eax
incl %eax
movl %eax, -0xc(%rbp)
movq 0x6b0(%rdi), %rax
movq %rax, -0x3b0(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x3a4(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0xecf0
movq %rax, %rsi
leaq -0x240(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x129e0
movq -0x3a0(%rbp), %rdx
leaq 0x3ff1(%rip), %rsi      # 0x147e2
leaq -0x220(%rbp), %rdi
callq 0x12990
jmp 0x107ff
leaq 0x401e(%rip), %rdx      # 0x14824
leaq -0x200(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0xef20
jmp 0x1081b
leaq -0x200(%rbp), %rdi
callq 0x41f0
movq -0x2a0(%rbp), %rdi
movq -0x3b0(%rbp), %rsi
movl -0x3a4(%rbp), %edx
movq %rax, %r8
movl $0x2, %ecx
movl $0x7, %r9d
callq 0xfad0
jmp 0x10850
leaq -0x200(%rbp), %rdi
callq 0x42a0
leaq -0x220(%rbp), %rdi
callq 0x42a0
leaq -0x240(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rsi
movq 0x6b0(%rsi), %rax
movq %rax, -0x3c8(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x3bc(%rbp)
incl %eax
movl %eax, -0xc(%rbp)
addq $0x1e8, %rsi            # imm = 0x1E8
leaq -0x280(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0xed20
movq -0x3b8(%rbp), %rdx
leaq 0x3f2c(%rip), %rsi      # 0x147eb
leaq -0x260(%rbp), %rdi
callq 0x12990
jmp 0x108cd
leaq -0x260(%rbp), %rdi
callq 0x41f0
movq -0x2a0(%rbp), %rdi
movq -0x3c8(%rbp), %rsi
movl -0x3bc(%rbp), %edx
movq %rax, %r8
movl $0x2, %ecx
movl $0x7, %r9d
callq 0xfad0
jmp 0x10902
leaq -0x260(%rbp), %rdi
callq 0x42a0
leaq -0x280(%rbp), %rdi
callq 0x42a0
movq -0x2a0(%rbp), %rdi
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq 0x6b0(%rdi), %rsi
movl -0xc(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl $0x2, %r9d
leaq 0x3ec2(%rip), %r8       # 0x1480b
movl %r9d, %ecx
callq 0xfad0
movq -0x2a0(%rbp), %rax
movq 0x6b0(%rax), %rdi
movq 0xa63a(%rip), %rax      # 0x1afa0
movl (%rax), %edx
subl $0x26, %edx
movl $0x1, %esi
callq 0x4200
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x109a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x42a0
leaq -0x50(%rbp), %rdi
callq 0x42a0
jmp 0x10b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x109ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x109e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x42a0
leaq -0xa0(%rbp), %rdi
callq 0x42a0
leaq -0xc0(%rbp), %rdi
callq 0x42a0
jmp 0x10b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x42a0
jmp 0x10b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x42a0
jmp 0x10b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10a77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10a6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x42a0
leaq -0x160(%rbp), %rdi
callq 0x42a0
leaq -0x180(%rbp), %rdi
callq 0x42a0
jmp 0x10b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x42a0
jmp 0x10b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x42a0
jmp 0x10b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10b02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10af6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x42a0
leaq -0x220(%rbp), %rdi
callq 0x42a0
leaq -0x240(%rbp), %rdi
callq 0x42a0
jmp 0x10b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10b36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x42a0
leaq -0x280(%rbp), %rdi
callq 0x42a0
movq -0x58(%rbp), %rdi
callq 0x46f0
nopl (%rax,%rax)