// File: /workspace/github_cpp_makefile_star2_O3/acherkaoui[P]HTOP/terminal/terminal.cpp
// Function: Curses::ProgressBar[abi:cxx11](_win_st*, int, int, float)
std::string Curses::ProgressBar(WINDOW *win, int y, int x, float val)
{
	std::string bar = "[                    ]";
	wattron(win, COLOR_PAIR(8));
	mvwaddch(win, y, x, ACS_CKBOARD);
	wattroff(win, COLOR_PAIR(8));
	int round = (int)floor(val / 5) *5;
	int nbBars = round / 5;
	int i;
	for (i = 1; i < nbBars - 1; i++)
	{
		if (i <= nbBars && i <= 6)
		{
			wattron(win, COLOR_PAIR(4));
			mvwaddch(win, y, x + i, ACS_CKBOARD);
			wattroff(win, COLOR_PAIR(4));
			bar[i] = '=';
		}
		else if (i <= nbBars && i <= 9)
		{
			wattron(win, COLOR_PAIR(7));
			mvwaddch(win, y, x + i, ACS_CKBOARD);
			wattroff(win, COLOR_PAIR(7));
			bar[i] = '=';
		}
		else if (i <= nbBars && i <= 23)
		{
			wattron(win, COLOR_PAIR(5));
			mvwaddch(win, y, x + i, ACS_CKBOARD);
			wattroff(win, COLOR_PAIR(5));
			bar[i] = '=';
		}
	}
	wattron(win, COLOR_PAIR(8));
	mvwaddch(win, y, x + 22, ACS_CKBOARD);
	wattroff(win, COLOR_PAIR(8));
	return bar;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movss %xmm0, 0x1c(%rsp)
movl %r8d, %ebx
movl %ecx, %r15d
movq %rdx, %r14
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movq %rax, (%rdi)
leaq 0x280a(%rip), %rsi      # 0xd8c8
leaq 0x2819(%rip), %rdx      # 0xd8de
movq %rdi, 0x10(%rsp)
callq 0x647a
movq %r14, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
callq 0x4210
movq %r14, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x4390
cmpl $-0x1, %eax
je 0xb105
movq 0x6ea1(%rip), %rax      # 0x11f98
movl 0x184(%rax), %esi
movq %r14, %rdi
callq 0x4130
movq %r14, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
callq 0x4450
movl %ebx, 0xc(%rsp)
movss 0x1c(%rsp), %xmm0
divss 0x229a(%rip), %xmm0     # 0xd3c0
callq 0x4190
cvttss2si %xmm0, %r13d
cmpl $0x3, %r13d
jl 0xb23f
decl %r13d
movl 0xc(%rsp), %ebp
movl $0x1, %ebx
cmpq $0x6, %rbx
ja 0xb192
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x4210
leal (%rbx,%rbp), %edx
movq %r14, %rdi
movl %r15d, %esi
callq 0x4390
movl $0x400, %r12d           # imm = 0x400
cmpl $-0x1, %eax
je 0xb21a
movq 0x6e19(%rip), %rax      # 0x11f98
movl 0x184(%rax), %esi
movq %r14, %rdi
callq 0x4130
jmp 0xb21a
cmpq $0x9, %rbx
ja 0xb1d7
movq %r14, %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x4210
leal (%rbx,%rbp), %edx
movq %r14, %rdi
movl %r15d, %esi
callq 0x4390
movl $0x700, %r12d           # imm = 0x700
cmpl $-0x1, %eax
je 0xb21a
movq 0x6dd1(%rip), %rax      # 0x11f98
movl 0x184(%rax), %esi
movq %r14, %rdi
callq 0x4130
jmp 0xb21a
cmpq $0x17, %rbx
ja 0xb233
movq %r14, %rdi
movl $0x500, %esi            # imm = 0x500
xorl %edx, %edx
callq 0x4210
leal (%rbx,%rbp), %edx
movq %r14, %rdi
movl %r15d, %esi
callq 0x4390
movl $0x500, %r12d           # imm = 0x500
cmpl $-0x1, %eax
je 0xb21a
movq 0x6d8c(%rip), %rax      # 0x11f98
movl 0x184(%rax), %esi
movq %r14, %rdi
callq 0x4130
movq %r14, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x4450
movq 0x10(%rsp), %rax
movq (%rax), %rax
movb $0x3d, (%rax,%rbx)
incq %rbx
cmpq %rbx, %r13
jne 0xb146
movq %r14, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
callq 0x4210
movl 0xc(%rsp), %edx
addl $0x16, %edx
movq %r14, %rdi
movl %r15d, %esi
callq 0x4390
cmpl $-0x1, %eax
je 0xb27a
movq 0x6d2c(%rip), %rax      # 0x11f98
movl 0x184(%rax), %esi
movq %r14, %rdi
callq 0x4130
movq %r14, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
callq 0x4450
movq 0x10(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb2a1
jmp 0xb2a1
movq %rax, %r14
movq 0x10(%rsp), %rax
movq (%rax), %rdi
cmpq 0x20(%rsp), %rdi
je 0xb2b8
callq 0x4320
movq %r14, %rdi
callq 0x45c0