// File: /workspace/github_cpp_makefile_star2_O2/Stygain[P]bandwidth-monitor/src/main.cpp
// Function: initializeInterfaceUI()
int initializeInterfaceUI()
{
	int placement = 1;

	for (size_t i = 0; i < interfaces.size(); ++i)
	{
		bool skip = false;
		if (!settings->root["hiddenInterfaces"].isNull() && settings->root["hiddenInterfaces"].isArray())
		{
			for (size_t j = 0; j < settings->root["hiddenInterfaces"].size(); ++j)
			{
				if (strcmp(settings->root["hiddenInterfaces"][(int)j].asString().c_str(), interfaces[i]->name) == 0)
				{
					logger->Log("Skipping hidden interface: ");
					logger->Log(interfaces[i]->name);
					logger->Log("\n");
					interfaces[i]->RemoveFromUI();
					skip = true;
				}
			}
		}

		if (!skip)
		{
			InterfaceRow *interfaceRow = new InterfaceRow(0, placement, COLS, 3);
			interfaceRows.push_back(interfaceRow);
			interfaces[i]->setInterfaceRow(interfaceRow);

			placement += 3;
		}
	}

	for (size_t i = 0; i < interfaces.size(); ++i)
	{
		interfaces[i]->Refresh();
	}

	refresh();

	return placement;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
pushq $0x1
popq %rax
movl %eax, 0xc(%rsp)
xorl %ebp, %ebp
leaq 0xc7e7(%rip), %rbx      # 0x10388
leaq 0x75d6(%rip), %r14      # 0xb17e
leaq 0x18(%rsp), %r13
movq 0xc774(%rip), %rcx      # 0x10328
movq 0xc765(%rip), %rax      # 0x10320
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rdx, %rbp
jae 0x3d3c
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3120
movq %rax, %rdi
callq 0x3460
testb %al, %al
jne 0x3cd8
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3120
movq %rax, %rdi
callq 0x34f0
testb %al, %al
je 0x3cd8
movq $0x0, 0x10(%rsp)
xorl %r12d, %r12d
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3120
movq %rax, %rdi
callq 0x34e0
movl %eax, %eax
cmpq %rax, %r12
jae 0x3cd1
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3120
movq %rax, %rdi
movl %r12d, %esi
callq 0x3300
movq %r13, %rdi
movq %rax, %rsi
callq 0x3570
movq 0x18(%rsp), %rdi
movq 0xc6c5(%rip), %rax      # 0x10320
movq (%rax,%rbp,8), %rax
movq (%rax), %rsi
callq 0x33f0
movl %eax, %r15d
movq %r13, %rdi
callq 0x3170
testl %r15d, %r15d
jne 0x3cc9
leaq 0xc6fa(%rip), %r15      # 0x10378
movq (%r15), %rdi
leaq 0x7507(%rip), %rsi      # 0xb18f
callq 0x97a6
movq (%r15), %rdi
movq 0xc689(%rip), %rax      # 0x10320
movq (%rax,%rbp,8), %rax
movq (%rax), %rsi
callq 0x9794
movq (%r15), %rdi
leaq 0x7616(%rip), %rsi      # 0xb2c3
callq 0x97a6
movq 0xc667(%rip), %rax      # 0x10320
movq (%rax,%rbp,8), %rdi
callq 0x92ba
movb $0x1, %al
movq %rax, 0x10(%rsp)
incq %r12
jmp 0x3c10
testb $0x1, 0x10(%rsp)
jne 0x3d34
pushq $0x18
popq %rdi
callq 0x32c0
movq %rax, %r12
movq 0xc2d6(%rip), %rax      # 0xffc0
movl (%rax), %ecx
movq %r12, %rdi
xorl %esi, %esi
movl 0xc(%rsp), %r15d
movl %r15d, %edx
pushq $0x3
popq %r8
callq 0x8b06
movq %r12, 0x18(%rsp)
leaq 0xc5fa(%rip), %rdi      # 0x10308
movq %r13, %rsi
callq 0x6ccc
movq 0xc603(%rip), %rax      # 0x10320
movq (%rax,%rbp,8), %rdi
movq 0x18(%rsp), %rsi
callq 0x92aa
addl $0x3, %r15d
movl %r15d, 0xc(%rsp)
incq %rbp
jmp 0x3bad
xorl %ebx, %ebx
movl 0xc(%rsp), %ebp
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbx
jae 0x3d6a
movq (%rax,%rbx,8), %rdi
callq 0x8bba
incq %rbx
movq 0xc5c7(%rip), %rcx      # 0x10328
movq 0xc5b8(%rip), %rax      # 0x10320
jmp 0x3d42
callq 0x3520
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0x3540