// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/graph.cpp
// Function: GraphDataColumn::Update()
void GraphDataColumn::Update()
{
	if (next == NULL)
	{
		if (graphType == GT_PKTS_RECV)
		{
			int pktsRecvDiff = 0;
			if (this->interface != NULL)
			{
				if (this->interface->r_packetsLast != 0)
				{
					pktsRecvDiff += this->interface->r_packets - this->interface->r_packetsLast;
				}
			}
			else
			{
				for (size_t i = 0; i < this->interfaces->size(); i++)
				{
					if (!this->interfaces->at(i)->IsHidden())
					{
						if (this->interfaces->at(i)->r_packetsLast != 0)
						{
							pktsRecvDiff += this->interfaces->at(i)->r_packets - this->interfaces->at(i)->r_packetsLast;
						}
					}
				}
			}
			this->value = pktsRecvDiff;
		}
		else if (graphType == GT_BYTES_RECV)
		{
			int bytesRecvDiff = 0;
			if (this->interface != NULL)
			{
				if (this->interface->r_bytesLast != 0)
				{
					bytesRecvDiff += this->interface->r_bytes - this->interface->r_bytesLast;
				}
			}
			else
			{
				for (size_t i = 0; i < this->interfaces->size(); i++)
				{
					if (!this->interfaces->at(i)->IsHidden())
					{
						if (this->interfaces->at(i)->r_bytesLast != 0)
						{
							bytesRecvDiff += this->interfaces->at(i)->r_bytes - this->interfaces->at(i)->r_bytesLast;
						}
					}
				}
			}
			this->value = bytesRecvDiff;
		}
		else if (graphType == GT_PKTS_SEND)
		{
			int pktsSendDiff = 0;
			if (this->interface != NULL)
			{
				if (this->interface->t_packetsLast != 0)
				{
					pktsSendDiff += this->interface->t_packets - this->interface->t_packetsLast;
				}
			}
			else
			{
				for (size_t i = 0; i < this->interfaces->size(); i++)
				{
					if (!this->interfaces->at(i)->IsHidden())
					{
						if (this->interfaces->at(i)->t_packetsLast != 0)
						{
							pktsSendDiff += this->interfaces->at(i)->t_packets - this->interfaces->at(i)->t_packetsLast;
						}
					}
				}
			}
			this->value = pktsSendDiff;
		}
		else if (graphType == GT_BYTES_SEND)
		{
			int bytesSendDiff = 0;
			if (this->interface != NULL)
			{
				if (this->interface->t_bytesLast != 0)
				{
					bytesSendDiff += this->interface->t_bytes - this->interface->t_bytesLast;
				}
			}
			else
			{
				for (size_t i = 0; i < this->interfaces->size(); i++)
				{
					if (!this->interfaces->at(i)->IsHidden())
					{
						if (this->interfaces->at(i)->t_bytesLast != 0)
						{
							bytesSendDiff += this->interfaces->at(i)->t_bytes - this->interfaces->at(i)->t_bytesLast;
						}
					}
				}
			}
			this->value = bytesSendDiff;
		}
	}
	else
	{
		this->value = this->next->GetValue();
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x81a1
movl (%rax), %ebp
movl %ebp, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movl 0x4(%rbx), %eax
cmpq $0x3, %rax
ja 0x819c
leaq 0x435b(%rip), %rcx      # 0xc50c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x82f5
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x83a7
movl 0x8(%rax), %ebp
jmp 0x8230
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x8237
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x83a7
movl 0x28(%rax), %ebp
jmp 0x8230
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x8296
movq 0x68(%rax), %rcx
testq %rcx, %rcx
je 0x83a7
movl 0x60(%rax), %ebp
jmp 0x8230
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x8350
movq 0x50(%rax), %rcx
testq %rcx, %rcx
je 0x83a7
movl 0x48(%rax), %ebp
subl %ecx, %ebp
jmp 0x819a
movq 0x8(%rbx), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x83a7
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rcx,%r14,8), %rdi
callq 0x9fe0
movq 0x8(%rbx), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
testb %al, %al
jne 0x8289
cmpq %r14, %rdx
jbe 0x83ae
movq (%rcx,%r14,8), %rsi
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x8289
movl 0x28(%rsi), %esi
subl %eax, %esi
addl %esi, %ebp
incq %r14
cmpq %rdx, %r14
jb 0x824d
jmp 0x819a
movq 0x8(%rbx), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x83a7
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rcx,%r14,8), %rdi
callq 0x9fe0
movq 0x8(%rbx), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
testb %al, %al
jne 0x82e8
cmpq %r14, %rdx
jbe 0x83ae
movq (%rcx,%r14,8), %rsi
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x82e8
movl 0x60(%rsi), %esi
subl %eax, %esi
addl %esi, %ebp
incq %r14
cmpq %rdx, %r14
jb 0x82ac
jmp 0x819a
movq 0x8(%rbx), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x83a7
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rcx,%r14,8), %rdi
callq 0x9fe0
movq 0x8(%rbx), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
testb %al, %al
jne 0x8343
cmpq %r14, %rdx
jbe 0x83ae
movq (%rcx,%r14,8), %rsi
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x8343
movl 0x8(%rsi), %esi
subl %eax, %esi
addl %esi, %ebp
incq %r14
cmpq %rdx, %r14
jb 0x830b
jmp 0x819a
movq 0x8(%rbx), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x83a7
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rcx,%r14,8), %rdi
callq 0x9fe0
movq 0x8(%rbx), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
testb %al, %al
jne 0x839a
cmpq %r14, %rdx
jbe 0x83ae
movq (%rcx,%r14,8), %rsi
movq 0x50(%rsi), %rax
testq %rax, %rax
je 0x839a
movl 0x48(%rsi), %esi
subl %eax, %esi
addl %esi, %ebp
incq %r14
cmpq %rdx, %r14
jb 0x8362
jmp 0x819a
xorl %ebp, %ebp
jmp 0x819a
leaq 0x4183(%rip), %rdi      # 0xc538
movq %r14, %rsi
xorl %eax, %eax
callq 0x3470
nop