// File: /workspace/github_cpp_makefile_star2_O3/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)
cmpq $0x3e9, %r14            # imm = 0x3E9
jb 0x9dce
movb $0x0, 0xe(%rsp)
movw $0x424b, 0xc(%rsp)      # imm = 0x424B
cmpq $0xf4628, %r14          # imm = 0xF4628
jb 0x9da7
movb $0x0, 0xe(%rsp)
movw $0x424d, 0xc(%rsp)      # imm = 0x424D
cmpq $0x3baa0c40, %r14       # imm = 0x3BAA0C40
jb 0x9db7
movq %r14, %rcx
shrq $0x9, %rcx
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
movq %rcx, %rax
mulq %rdx
movb $0x0, 0xe(%rsp)
movw $0x4247, 0xc(%rsp)      # imm = 0x4247
cmpq $0x74881fed, %rcx       # imm = 0x74881FED
jb 0x9dc7
movabsq $0x232f33025bd42233, %rcx # imm = 0x232F33025BD42233
movq %r14, %rax
mulq %rcx
movq %rdx, %r14
shrq $0x25, %r14
movb $0x0, 0xe(%rsp)
movw $0x4254, 0xc(%rsp)      # imm = 0x4254
jmp 0x9dce
movl %r14d, %eax
imulq $0x10624dd3, %rax, %r14 # imm = 0x10624DD3
shrq $0x26, %r14
jmp 0x9dce
movl %r14d, %eax
imulq $0x431bde83, %rax, %r14 # imm = 0x431BDE83
shrq $0x32, %r14
jmp 0x9dce
shrq $0xb, %rdx
movq %rdx, %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 0x9e94
movb $0x0, 0xa(%rsp)
movw $0x424b, 0x8(%rsp)      # imm = 0x424B
cmpq $0xf4628, %r15          # imm = 0xF4628
jb 0x9e6d
movb $0x0, 0xa(%rsp)
movw $0x424d, 0x8(%rsp)      # imm = 0x424D
cmpq $0x3baa0c40, %r15       # imm = 0x3BAA0C40
jb 0x9e7d
movq %r15, %rcx
shrq $0x9, %rcx
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
movq %rcx, %rax
mulq %rdx
movb $0x0, 0xa(%rsp)
movw $0x4247, 0x8(%rsp)      # imm = 0x4247
cmpq $0x74881fed, %rcx       # imm = 0x74881FED
jb 0x9e8d
movabsq $0x232f33025bd42233, %rcx # imm = 0x232F33025BD42233
movq %r15, %rax
mulq %rcx
movq %rdx, %r15
shrq $0x25, %r15
movb $0x0, 0xa(%rsp)
movw $0x4254, 0x8(%rsp)      # imm = 0x4254
jmp 0x9e94
movl %r15d, %eax
imulq $0x10624dd3, %rax, %r15 # imm = 0x10624DD3
shrq $0x26, %r15
jmp 0x9e94
movl %r15d, %eax
imulq $0x431bde83, %rax, %r15 # imm = 0x431BDE83
shrq $0x32, %r15
jmp 0x9e94
shrq $0xb, %rdx
movq %rdx, %r15
cmpb $0x0, 0xb1(%rbx)
jne 0x9f73
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 $0x8, %rsp
xorl %eax, %eax
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
pushq %rax
callq 0x31c0
addq $0x20, %rsp
cmpb $0x1, 0xb0(%rbx)
jne 0x9eff
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 0x27c9(%rip), %rcx      # 0xc6ed
movl $0x1, %esi
movl $0x1, %edx
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 0x9f64
movq 0xa8(%rbx), %rax
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x33b0
movq 0xa8(%rbx), %rax
movq (%rax), %rdi
callq 0x3310
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop