// File: /workspace/github_cpp_makefile_star2_O1/Stygain[P]bandwidth-monitor/src/settingsWindow.cpp
// Function: SettingsWindow::Update()
void SettingsWindow::Update()
{
	werase(this->win);
	wborder(this->win, 0, 0, 0, 0, 0, 0, 0, 0);

	char settingsWindowOptionString[settingsWindowOptionStringSize];
	int placementYIndex = 0;
	for (int i = 0; i < SWO_END; i++)
	{
		placementYIndex++;
		getSettingsWindowOptionString((SettingsWindowOption)i, settingsWindowOptionString);
		if ((SettingsWindowOption)i == SWO_HIDDEN_INTERFACES)
		{
			mvwprintw(this->win, placementYIndex, 1, "%s", settingsWindowOptionString);
			for (int j = 0; j < settings->root["hiddenInterfaces"].size(); j++)
			{
				placementYIndex++;
				if (j == activeItem)
				{
					wattron(this->win, COLOR_PAIR(HEADER_ACTIVE_COLOR));
				}
				mvwprintw(this->win, placementYIndex, 5, "%s", settings->root["hiddenInterfaces"][j].asString().c_str());
				if (j == activeItem)
				{
					wattroff(this->win, COLOR_PAIR(HEADER_ACTIVE_COLOR));
				}
			}
		}
		else if ((SettingsWindowOption)i == SWO_ZERO_ON_START)
		{
			mvwprintw(this->win, placementYIndex, 1, "%s", settingsWindowOptionString);
			if (settings->root["hiddenInterfaces"].size() == activeItem)
			{
				wattron(this->win, COLOR_PAIR(HEADER_ACTIVE_COLOR));
			}
			placementYIndex++;
			mvwprintw(this->win, placementYIndex, 5, "%s", settings->root["zeroOnStart"].asString().c_str());
			if (settings->root["hiddenInterfaces"].size() == activeItem)
			{
				wattroff(this->win, COLOR_PAIR(HEADER_ACTIVE_COLOR));
			}
		}
	}

	wrefresh(this->win);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3050
movq (%rbx), %rdi
subq $0x8, %rsp
xorl %eax, %eax
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
pushq %rax
callq 0x31c0
addq $0x20, %rsp
xorl %eax, %eax
xorl %r14d, %r14d
movq %rax, 0x8(%rsp)
leal 0x1(%r14), %r12d
movq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %r15
movq %r15, %rsi
callq 0xa489
movq (%rbx), %rdi
movl %r12d, %esi
movl $0x1, %edx
leaq 0x171a(%rip), %rcx      # 0xc70e
movq %r15, %r8
xorl %eax, %eax
callq 0x30b0
leaq 0x538b(%rip), %rax      # 0x10390
movq (%rax), %rdi
leaq 0x115f(%rip), %rsi      # 0xc16e
callq 0x3130
movq %rax, %rdi
callq 0x34e0
movq 0x8(%rsp), %rcx
testl %ecx, %ecx
je 0xb0dc
cmpl 0x1c(%rbx), %eax
jne 0xb03d
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x3180
addl $0x2, %r14d
movq (%rbx), %r15
leaq 0x5345(%rip), %rax      # 0x10390
movq (%rax), %rdi
leaq 0x129b(%rip), %rsi      # 0xc2f0
callq 0x3130
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x3580
movq 0x10(%rsp), %r8
movq %r15, %rdi
movl %r14d, %esi
movl $0x5, %edx
leaq 0x1690(%rip), %rcx      # 0xc70e
xorl %eax, %eax
callq 0x30b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb0a1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x52e8(%rip), %rax      # 0x10390
movq (%rax), %rdi
leaq 0x10bc(%rip), %rsi      # 0xc16e
callq 0x3130
movq %rax, %rdi
callq 0x34e0
cmpl 0x1c(%rbx), %eax
jne 0xb1b4
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x33b0
jmp 0xb1b4
testl %eax, %eax
je 0xb1c6
addl $0x2, %r14d
xorl %r15d, %r15d
cmpl 0x1c(%rbx), %r15d
jne 0xb100
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x3180
leal (%r14,%r15), %r13d
movq (%rbx), %rbp
leaq 0x5282(%rip), %rax      # 0x10390
movq (%rax), %rdi
leaq 0x1056(%rip), %rsi      # 0xc16e
callq 0x3130
movq %rax, %rdi
movl %r15d, %esi
callq 0x3300
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x3580
movq 0x10(%rsp), %r8
movq %rbp, %rdi
movl %r13d, %esi
movl $0x5, %edx
leaq 0x15c2(%rip), %rcx      # 0xc70e
xorl %eax, %eax
callq 0x30b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb16f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
cmpl 0x1c(%rbx), %r15d
jne 0xb184
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x33b0
incl %r15d
leaq 0x5202(%rip), %rax      # 0x10390
movq (%rax), %rdi
leaq 0xfd6(%rip), %rsi       # 0xc16e
callq 0x3130
movq %rax, %rdi
callq 0x34e0
cmpl %eax, %r15d
jb 0xb0eb
addl %r15d, %r12d
movl %r12d, %r14d
movq 0x8(%rsp), %rcx
leal 0x1(%rcx), %eax
testl %ecx, %ecx
je 0xafc7
jmp 0xb1cb
movl %r12d, %r14d
jmp 0xb1b9
movq (%rbx), %rdi
callq 0x3310
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb1e4
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb203
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x3550
nop