// File: /workspace/github_cpp_makefile_star2_O2/Stygain[P]bandwidth-monitor/src/interface.cpp
// Function: Interface::Print()
void Interface::Print()
{
	unsigned long int printableRBytes = (this->r_bytes - this->r_bytesZeroed);
	char rBytesUnit[3];
	strcpy(rBytesUnit, "B");
	if (printableRBytes > 1000)
	{
		printableRBytes = printableRBytes / 1000;
		strcpy(rBytesUnit, "KB");
	}
	if (printableRBytes > 1000)
	{
		printableRBytes = printableRBytes / 1000;
		strcpy(rBytesUnit, "MB");
	}
	if (printableRBytes > 1000)
	{
		printableRBytes = printableRBytes / 1000;
		strcpy(rBytesUnit, "GB");
	}
	if (printableRBytes > 1000)
	{
		printableRBytes = printableRBytes / 1000;
		strcpy(rBytesUnit, "TB");
	}
	unsigned long int printableRPackets = (this->r_packets - this->r_packetsZeroed);
	unsigned long int printableTBytes = (this->t_bytes - this->t_bytesZeroed);
	char tBytesUnit[3];
	strcpy(tBytesUnit, "B");
	if (printableTBytes > 1000)
	{
		printableTBytes = printableTBytes / 1000;
		strcpy(tBytesUnit, "KB");
	}
	if (printableTBytes > 1000)
	{
		printableTBytes = printableTBytes / 1000;
		strcpy(tBytesUnit, "MB");
	}
	if (printableTBytes > 1000)
	{
		printableTBytes = printableTBytes / 1000;
		strcpy(tBytesUnit, "GB");
	}
	if (printableTBytes > 1000)
	{
		printableTBytes = printableTBytes / 1000;
		strcpy(tBytesUnit, "TB");
	}
	unsigned long int printableTPackets = (this->t_packets - this->t_packetsZeroed);

	if (!this->hidden)
	{
		werase(this->interfaceRow->win);
		wborder(this->interfaceRow->win, 0, 0, 0, 0, 0, 0, 0, 0);

		if (this->active) {
			wattron(this->interfaceRow->win, COLOR_PAIR(ACTIVE_COLOR));
		}

		mvwprintw(this->interfaceRow->win, 1, 1,
				"%*s | %10lu %2s | %9lu | %10lu %2s | %9lu",
				longest,
				this->name,
				printableRBytes,
				rBytesUnit,
				printableRPackets,
				printableTBytes,
				tBytesUnit,
				printableTPackets);

		if (this->active) {
			wattroff(this->interfaceRow->win, COLOR_PAIR(ACTIVE_COLOR));
		}

		wrefresh(this->interfaceRow->win);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r14
subq 0x20(%rdi), %r14
movw $0x42, 0xc(%rsp)
movabsq $0xe8d4a51000, %rcx     # imm = 0xE8D4A51000
cmpq $0x3e9, %r14            # imm = 0x3E9
jb 0x90d2
movl $0x3e8, %esi            # imm = 0x3E8
movl %r14d, %eax
xorl %edx, %edx
divl %esi
movb $0x0, 0xe(%rsp)
movw $0x424b, 0xc(%rsp)      # imm = 0x424B
cmpq $0xf4628, %r14          # imm = 0xF4628
jb 0x90cf
movl $0xf4240, %esi          # imm = 0xF4240
movl %r14d, %eax
xorl %edx, %edx
divl %esi
movb $0x0, 0xe(%rsp)
movw $0x424d, 0xc(%rsp)      # imm = 0x424D
cmpq $0x3baa0c40, %r14       # imm = 0x3BAA0C40
jb 0x90cf
movl $0x3b9aca00, %esi       # imm = 0x3B9ACA00
movq %r14, %rax
xorl %edx, %edx
divq %rsi
movb $0x0, 0xe(%rsp)
movw $0x4247, 0xc(%rsp)      # imm = 0x4247
movq %r14, %rdx
shrq $0x9, %rdx
cmpq $0x74881fed, %rdx       # imm = 0x74881FED
jb 0x90cf
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movb $0x0, 0xe(%rsp)
movw $0x4254, 0xc(%rsp)      # imm = 0x4254
movq %rax, %r14
movq 0x28(%rbx), %r15
movq 0x48(%rbx), %r12
subq 0x58(%rbx), %r12
subq 0x40(%rbx), %r15
movw $0x42, 0x8(%rsp)
cmpq $0x3e9, %r15            # imm = 0x3E9
jb 0x9178
movl $0x3e8, %esi            # imm = 0x3E8
movl %r15d, %eax
xorl %edx, %edx
divl %esi
movb $0x0, 0xa(%rsp)
movw $0x424b, 0x8(%rsp)      # imm = 0x424B
cmpq $0xf4628, %r15          # imm = 0xF4628
jb 0x9175
movl $0xf4240, %esi          # imm = 0xF4240
movl %r15d, %eax
xorl %edx, %edx
divl %esi
movb $0x0, 0xa(%rsp)
movw $0x424d, 0x8(%rsp)      # imm = 0x424D
cmpq $0x3baa0c40, %r15       # imm = 0x3BAA0C40
jb 0x9175
movl $0x3b9aca00, %esi       # imm = 0x3B9ACA00
movq %r15, %rax
xorl %edx, %edx
divq %rsi
movb $0x0, 0xa(%rsp)
movw $0x4247, 0x8(%rsp)      # imm = 0x4247
movq %r15, %rdx
shrq $0x9, %rdx
cmpq $0x74881fed, %rdx       # imm = 0x74881FED
jb 0x9175
movq %r15, %rax
xorl %edx, %edx
divq %rcx
movb $0x0, 0xa(%rsp)
movw $0x4254, 0x8(%rsp)      # imm = 0x4254
movq %rax, %r15
cmpb $0x0, 0xb1(%rbx)
jne 0x925b
movq 0x60(%rbx), %r13
subq 0x70(%rbx), %r13
movq 0xa8(%rbx), %rax
movq (%rax), %rdi
callq 0x3050
movq 0xa8(%rbx), %rax
movq (%rax), %rdi
subq $0x20, %rsp
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x31c0
addq $0x20, %rsp
cmpb $0x1, 0xb0(%rbx)
jne 0x91ec
movq 0xa8(%rbx), %rax
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x3180
movq (%rbx), %r9
movq 0xa8(%rbx), %rax
movq (%rax), %rdi
movl 0xb4(%rbx), %r8d
leaq 0x8(%rsp), %r10
leaq 0xc(%rsp), %r11
leaq 0x24dc(%rip), %rcx      # 0xb6ed
pushq $0x1
popq %rdx
movl %edx, %esi
xorl %eax, %eax
pushq %r13
pushq %r10
pushq %r15
pushq %r12
pushq %r11
pushq %r14
callq 0x30b0
addq $0x30, %rsp
cmpb $0x1, 0xb0(%rbx)
jne 0x924c
movq 0xa8(%rbx), %rax
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x33a0
movq 0xa8(%rbx), %rax
movq (%rax), %rdi
callq 0x3310
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop