// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x76e2
movl (%rax), %r15d
movl %r15d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%rbx), %eax
cmpq $0x3, %rax
ja 0x76d7
leaq 0x3e1a(%rip), %rcx      # 0xb50c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x785d
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x776d
movl 0x8(%rax), %r15d
jmp 0x7765
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x7775
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x776d
movl 0x28(%rax), %r15d
jmp 0x7765
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x77e9
movq 0x68(%rax), %rcx
testq %rcx, %rcx
je 0x776d
movl 0x60(%rax), %r15d
jmp 0x7765
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x78d1
movq 0x50(%rax), %rcx
testq %rcx, %rcx
je 0x776d
movl 0x48(%rax), %r15d
subl %ecx, %r15d
jmp 0x76d4
xorl %r15d, %r15d
jmp 0x76d4
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x3, %rax
cmpq %rax, %r14
jae 0x76d4
movq %r14, %rsi
callq 0x8302
movq (%rax), %rdi
callq 0x92ca
testb %al, %al
jne 0x77e4
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
cmpq $0x0, 0x30(%rax)
je 0x77e4
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
movl 0x28(%rax), %ebp
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
subl 0x30(%rax), %ebp
addl %ebp, %r15d
incq %r14
jmp 0x777b
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x3, %rax
cmpq %rax, %r14
jae 0x76d4
movq %r14, %rsi
callq 0x8302
movq (%rax), %rdi
callq 0x92ca
testb %al, %al
jne 0x7858
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
cmpq $0x0, 0x68(%rax)
je 0x7858
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
movl 0x60(%rax), %ebp
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
subl 0x68(%rax), %ebp
addl %ebp, %r15d
incq %r14
jmp 0x77ef
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x3, %rax
cmpq %rax, %r14
jae 0x76d4
movq %r14, %rsi
callq 0x8302
movq (%rax), %rdi
callq 0x92ca
testb %al, %al
jne 0x78cc
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x78cc
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
movl 0x8(%rax), %ebp
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
subl 0x10(%rax), %ebp
addl %ebp, %r15d
incq %r14
jmp 0x7863
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x3, %rax
cmpq %rax, %r14
jae 0x76d4
movq %r14, %rsi
callq 0x8302
movq (%rax), %rdi
callq 0x92ca
testb %al, %al
jne 0x7940
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
cmpq $0x0, 0x50(%rax)
je 0x7940
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
movl 0x48(%rax), %ebp
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8302
movq (%rax), %rax
subl 0x50(%rax), %ebp
addl %ebp, %r15d
incq %r14
jmp 0x78d7
nop