// File: /workspace/github_cpp_makefile_star2_O3/Stygain[P]bandwidth-monitor/src/graph.cpp
// Function: Graph::Create(int, int, int, int)
void Graph::Create(int placementX, int placementY, int width, int height)
{
	this->placementX = placementX;
	this->placementY = placementY;
	this->width = width;
	this->height = height;

	this->graphTitle->Create(this->placementX + 1, this->placementY, this->width, 1);
	this->graphMaxItem->Create(this->placementX + 2, this->placementY + 1, 5, 1);

	this->win = newwin(this->height, this->width, this->placementY + 1, this->placementX);
	wborder(this->win, 0, 0, 0, 0, 0, 0, 0, 0);

	this->numCols = (this->width - 3);
	for (int i = 0; i < this->numCols; i++)
	{
		this->gDataCols.push_back(new GraphDataColumn(this->graphType, this->interfaces, this->interface));
	}

	for (size_t i = 0; i < (this->gDataCols.size() - 1); i++)
	{
		gDataCols[i]->SetNext(gDataCols[i+1]);
	}

	this->numRows = (this->height - 2);
	for (int i = 0; i < this->numRows; i++)
	{
		this->gRows.push_back(
			new GraphRow(
				1,
				(this->width - 3),
				(this->placementX + 1),
				(this->placementY + 1 + ((i * 1) + 1)),
				(this->numRows - i - 1),
				(this->numRows - 1)
			)
		);
	}

	wrefresh(this->win);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, 0x8(%rdi)
movl %edx, 0xc(%rdi)
movl %ecx, 0x10(%rdi)
movl %r8d, 0x14(%rdi)
movq 0x38(%rdi), %r14
leal 0x1(%rsi), %eax
movl %eax, 0x8(%r14)
movl %edx, 0xc(%r14)
movl %ecx, 0x10(%r14)
movl $0x1, 0x14(%r14)
movl $0x1, %edi
movl %ecx, %esi
movl %eax, %ecx
callq 0x32e0
movq %rax, (%r14)
movq %r14, %rdi
callq 0x8548
movq 0x40(%rbx), %r14
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %edx
addl $0x2, %ecx
leal 0x1(%rdx), %eax
movl %ecx, 0x8(%r14)
movl %eax, 0xc(%r14)
movabsq $0x100000005, %rax      # imm = 0x100000005
movq %rax, 0x10(%r14)
addl $0x2, %edx
movl $0x1, %edi
movl $0x5, %esi
callq 0x32e0
movq %rax, (%r14)
movq %rax, %rdi
callq 0x3310
movl 0x14(%rbx), %edi
movl 0x10(%rbx), %esi
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %edx
incl %edx
callq 0x32e0
movq %rax, (%rbx)
subq $0x8, %rsp
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r12
pushq %r12
callq 0x31c0
addq $0x20, %rsp
movl 0x10(%rbx), %eax
leal -0x3(%rax), %ecx
movl %ecx, 0x1c(%rbx)
cmpl $0x4, %eax
jl 0x88a4
leaq 0x60(%rbx), %r14
movq %rsp, %r15
movl $0x20, %edi
callq 0x32c0
movl 0x30(%rbx), %ecx
movl $0x0, (%rax)
movq $0x0, 0x18(%rax)
movl %ecx, 0x4(%rax)
movups 0x20(%rbx), %xmm0
movups %xmm0, 0x8(%rax)
movq %rax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x907a
incl %r12d
cmpl 0x1c(%rbx), %r12d
jl 0x8866
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq $0x1, %rcx
je 0x88d4
movq (%rax), %rsi
movl $0x1, %edx
movq (%rax,%rdx,8), %rdi
movq %rdi, 0x18(%rsi)
incq %rdx
movq %rdi, %rsi
cmpq %rdx, %rcx
jne 0x88c1
movl 0x14(%rbx), %eax
leal -0x2(%rax), %r15d
movl %r15d, 0x18(%rbx)
cmpl $0x3, %eax
jl 0x8975
leaq 0x48(%rbx), %r14
movl $0x2, %ebp
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl $0x20, %edi
callq 0x32c0
movq %rax, %r12
movl 0x8(%rbx), %ecx
movl 0x10(%rbx), %esi
addl $-0x3, %esi
incl %ecx
movl 0xc(%rbx), %edx
addl %ebp, %edx
leal (%r15,%r13), %eax
decl %r15d
movl %r15d, 0xc(%r12)
movl %eax, 0x8(%r12)
movl %edx, 0x10(%r12)
movl %ecx, 0x14(%r12)
movl $0x1, 0x18(%r12)
movl %esi, 0x1c(%r12)
movl $0x1, %edi
callq 0x32e0
movq %rax, (%r12)
movq %rax, %rdi
callq 0x3310
movq %r12, (%rsp)
movq %r14, %rdi
movq %rsp, %rsi
callq 0x91ee
movl 0x18(%rbx), %r15d
leal 0x1(%rbp), %eax
decl %ebp
decl %r13d
cmpl %r15d, %ebp
movl %eax, %ebp
jl 0x88f7
movq (%rbx), %rdi
callq 0x3310
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x20, %esi
movq %r12, %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0x3550