// File: /workspace/github_cpp_makefile_star2_O1/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 0x81d5
movl (%rax), %ebp
movl %ebp, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movl 0x4(%rbx), %eax
cmpq $0x3, %rax
ja 0x81d0
leaq 0x4317(%rip), %rcx      # 0xc4fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x834d
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x8427
movl 0x8(%rax), %ebp
jmp 0x8264
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x826b
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x8427
movl 0x28(%rax), %ebp
jmp 0x8264
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x82dc
movq 0x68(%rax), %rcx
testq %rcx, %rcx
je 0x8427
movl 0x60(%rax), %ebp
jmp 0x8264
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x83be
movq 0x50(%rax), %rcx
testq %rcx, %rcx
je 0x8427
movl 0x48(%rax), %ebp
subl %ecx, %ebp
jmp 0x81ce
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8427
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rax,%r14,8), %rdi
callq 0xa04a
testb %al, %al
jne 0x82bd
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x842e
movq (%rax,%r14,8), %rcx
movq 0x30(%rcx), %rax
testq %rax, %rax
je 0x82bd
movl 0x28(%rcx), %ecx
subl %eax, %ecx
addl %ecx, %ebp
incq %r14
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r14
jb 0x8281
jmp 0x81ce
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8427
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rax,%r14,8), %rdi
callq 0xa04a
testb %al, %al
jne 0x832e
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x842e
movq (%rax,%r14,8), %rcx
movq 0x68(%rcx), %rax
testq %rax, %rax
je 0x832e
movl 0x60(%rcx), %ecx
subl %eax, %ecx
addl %ecx, %ebp
incq %r14
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r14
jb 0x82f2
jmp 0x81ce
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8427
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rax,%r14,8), %rdi
callq 0xa04a
testb %al, %al
jne 0x839f
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x842e
movq (%rax,%r14,8), %rcx
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x839f
movl 0x8(%rcx), %ecx
subl %eax, %ecx
addl %ecx, %ebp
incq %r14
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r14
jb 0x8363
jmp 0x81ce
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8427
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rax,%r14,8), %rdi
callq 0xa04a
testb %al, %al
jne 0x8408
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x842e
movq (%rax,%r14,8), %rcx
movq 0x50(%rcx), %rax
testq %rax, %rax
je 0x8408
movl 0x48(%rcx), %ecx
subl %eax, %ecx
addl %ecx, %ebp
incq %r14
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r14
jb 0x83d0
jmp 0x81ce
xorl %ebp, %ebp
jmp 0x81ce
leaq 0x40f3(%rip), %rdi      # 0xc528
movq %r14, %rsi
xorl %eax, %eax
callq 0x3470
nop