// File: /workspace/github_cpp_makefile_star2_O3/Juve45[P]batstat/main.cpp
// Function: newPrint()
void newPrint()
{
	char buff[255];
	erase();
	sprintf(buff, "%-30s\n", "Status: ");
	mvaddstr(0, 0, buff);
	
	if(status[0] == 'C')
		attron(COLOR_PAIR(3));
	else
		attron(COLOR_PAIR(2));
	mvaddstr(0, strlen(buff) - 1, status.c_str());

	attron(COLOR_PAIR(1));
	sprintf(buff, "%-30s%.2lf %ch\n", "Max energy:", maxEnergy/1000000, powerUnit);
	mvaddstr(1, 0, buff);
	sprintf(buff, "%-30s%.2lf %ch\n", "Energy left:", currentEnergy/1000000, powerUnit);
	mvaddstr(2, 0, buff);
	sprintf(buff, "%-30s%.2lf %c\n", "Power Consumption:", currentPower/1000000, powerUnit);
	mvaddstr(3, 0, buff);
	sprintf(buff, "%-30s%.2lf%%\n", "Percentage left:", currentEnergy/maxEnergy*100);
	mvaddstr(4, 0, buff);
	sprintf(buff, "%-30s%.2lf %c\n", "Average power Consumption:", (initEnergy - currentEnergy) / 1000000 / (1. * timeElapsed / 3600.), powerUnit);
	
	mvaddstr(5, 0, buff);
	sprintf(buff, "%-30s%2d:%2d:%2d since %.2lf%%\n", "Time elapsed:", timeElapsed/3600, (timeElapsed/60)%60, timeElapsed%60, initEnergy/maxEnergy*100);
	mvaddstr(6, 0, buff);

	sprintf(buff, "= Time   ======== Percent ============================================\n");
	mvaddstr(7, 0, buff);

	for(int i = logIndex; i < logCache.size(); i++)
		mvaddstr(8 + i - logIndex, 0, logCache[i].c_str());

	refresh();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
callq 0x3360
leaq 0xbea1(%rip), %rsi      # 0x106be
leaq 0xbea1(%rip), %rdx      # 0x106c5
leaq -0x120(%rbp), %rdi
xorl %eax, %eax
callq 0x30a0
movq 0x1478f(%rip), %r14     # 0x18fc8
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x485e
movq (%r14), %rdi
leaq -0x120(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
movq 0x14b43(%rip), %rax     # 0x193a8
xorl %esi, %esi
cmpb $0x43, (%rax)
sete %sil
movq (%r14), %rdi
orl $0x2, %esi
shll $0x8, %esi
xorl %edx, %edx
callq 0x31c0
movq (%r14), %rbx
leaq -0x120(%rbp), %rdi
callq 0x3180
leal -0x1(%rax), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3340
cmpl $-0x1, %eax
je 0x48b3
movq (%r14), %rdi
movq 0x14aff(%rip), %rsi     # 0x193a8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
movq (%r14), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x31c0
movss 0x14a96(%rip), %xmm0    # 0x19360
divss 0xb732(%rip), %xmm0     # 0x10004
cvtss2sd %xmm0, %xmm0
movsbl 0x14b8b(%rip), %ecx     # 0x19468
leaq 0xbdea(%rip), %rsi      # 0x106ce
leaq 0xbdf3(%rip), %rdx      # 0x106de
leaq -0x120(%rbp), %rdi
movb $0x1, %al
callq 0x30a0
movq (%r14), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x4921
movq (%r14), %rdi
leaq -0x120(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
movss 0x14a3f(%rip), %xmm0    # 0x19368
divss 0xb6d3(%rip), %xmm0     # 0x10004
cvtss2sd %xmm0, %xmm0
movsbl 0x14b2c(%rip), %ecx     # 0x19468
leaq 0xbd8b(%rip), %rsi      # 0x106ce
leaq 0xbda0(%rip), %rdx      # 0x106ea
leaq -0x120(%rbp), %rdi
movb $0x1, %al
callq 0x30a0
movq (%r14), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x4980
movq (%r14), %rdi
leaq -0x120(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
movss 0x149dc(%rip), %xmm0    # 0x19364
divss 0xb674(%rip), %xmm0     # 0x10004
cvtss2sd %xmm0, %xmm0
movsbl 0x14acd(%rip), %ecx     # 0x19468
leaq 0xbd55(%rip), %rsi      # 0x106f7
leaq 0xbd5d(%rip), %rdx      # 0x10706
leaq -0x120(%rbp), %rdi
movb $0x1, %al
callq 0x30a0
movq (%r14), %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x49df
movq (%r14), %rdi
leaq -0x120(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
movss 0x14981(%rip), %xmm0    # 0x19368
divss 0x14971(%rip), %xmm0    # 0x19360
mulss 0xb611(%rip), %xmm0     # 0x10008
cvtss2sd %xmm0, %xmm0
leaq 0xbd17(%rip), %rsi      # 0x10719
leaq 0xbd1e(%rip), %rdx      # 0x10727
leaq -0x120(%rbp), %rdi
movb $0x1, %al
callq 0x30a0
movq (%r14), %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x4a3f
movq (%r14), %rdi
leaq -0x120(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
movss 0x14925(%rip), %xmm0    # 0x1936c
subss 0x14919(%rip), %xmm0    # 0x19368
divss 0xb5ad(%rip), %xmm0     # 0x10004
cvtss2sd %xmm0, %xmm0
cvtsi2sdl 0x14919(%rip), %xmm1 # 0x1937c
divsd 0xb5a5(%rip), %xmm1     # 0x10010
divsd %xmm1, %xmm0
movsbl 0x149f2(%rip), %ecx     # 0x19468
leaq 0xbc7a(%rip), %rsi      # 0x106f7
leaq 0xbcb4(%rip), %rdx      # 0x10738
leaq -0x120(%rbp), %rdi
movb $0x1, %al
callq 0x30a0
movq (%r14), %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x4aba
movq (%r14), %rdi
leaq -0x120(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
movslq 0x148bb(%rip), %r9      # 0x1937c
imulq $-0x6e5d4c3b, %r9, %rcx # imm = 0x91A2B3C5
shrq $0x20, %rcx
addl %r9d, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
sarl $0xb, %ecx
addl %eax, %ecx
imulq $-0x77777777, %r9, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %r9d, %eax
movl %eax, %edx
shrl $0x1f, %edx
sarl $0x5, %eax
addl %edx, %eax
movslq %eax, %r8
imulq $-0x77777777, %r8, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %r8d, %eax
movl %eax, %edx
shrl $0x1f, %edx
sarl $0x5, %eax
addl %edx, %eax
imull $0x3c, %eax, %eax
imull $0x3c, %r8d, %edx
subl %eax, %r8d
movss 0x1484e(%rip), %xmm0    # 0x1936c
divss 0x1483a(%rip), %xmm0    # 0x19360
subl %edx, %r9d
mulss 0xb4d7(%rip), %xmm0     # 0x10008
cvtss2sd %xmm0, %xmm0
leaq 0xbc17(%rip), %rsi      # 0x10753
leaq 0xbc30(%rip), %rdx      # 0x10773
leaq -0x120(%rbp), %rdi
movb $0x1, %al
callq 0x30a0
movq (%r14), %rdi
movl $0x6, %esi
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x4b79
movq (%r14), %rdi
leaq -0x120(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
leaq 0xbc01(%rip), %rsi      # 0x10781
leaq -0x120(%rbp), %rdi
movl $0x48, %edx
callq 0x3290
movq (%r14), %rdi
movl $0x7, %esi
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x4bb9
movq (%r14), %rdi
leaq -0x120(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
movslq 0x147c4(%rip), %rbx     # 0x19384
movq 0x148b9(%rip), %rax     # 0x19480
subq 0x148aa(%rip), %rax     # 0x19478
sarq $0x5, %rax
cmpq %rbx, %rax
jbe 0x4c33
leal 0x8(%rbx), %r15d
movq %rbx, %r12
shlq $0x5, %r12
movq (%r14), %rdi
movl %r15d, %esi
subl 0x14796(%rip), %esi     # 0x19384
xorl %edx, %edx
callq 0x3340
cmpl $-0x1, %eax
je 0x4c12
movq (%r14), %rdi
movq 0x14874(%rip), %rax     # 0x19478
movq (%rax,%r12), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30f0
incq %rbx
movq 0x14864(%rip), %rax     # 0x19480
subq 0x14855(%rip), %rax     # 0x19478
sarq $0x5, %rax
incl %r15d
addq $0x20, %r12
cmpq %rbx, %rax
ja 0x4be2
callq 0x34f0
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq