// File: /workspace/github_cpp_makefile_star2_O3/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
movb $0x1, %bpl
leaq 0x11fe(%rip), %r13      # 0xc17e
xorl %edi, %edi
xorl %r14d, %r14d
leal 0x1(%r14), %r12d
leaq 0x30(%rsp), %r15
movq %r15, %rsi
callq 0xa439
movq (%rbx), %rdi
movl %r12d, 0x8(%rsp)
movl %r12d, %esi
movl $0x1, %edx
leaq 0x1771(%rip), %rcx      # 0xc71e
movq %r15, %r8
xorl %eax, %eax
callq 0x30b0
leaq 0x53d2(%rip), %rax      # 0x10390
movq (%rax), %rdi
movq %r13, %rsi
callq 0x3130
movq %rax, %rdi
callq 0x34e0
testb $0x1, %bpl
je 0xb0d5
testl %eax, %eax
je 0xb0b5
movl %ebp, 0xc(%rsp)
addl $0x2, %r14d
xorl %r15d, %r15d
cmpl 0x1c(%rbx), %r15d
jne 0xb003
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x3180
leal (%r14,%r15), %ebp
movq (%rbx), %r12
leaq 0x537f(%rip), %rax      # 0x10390
movq (%rax), %rdi
movq %r13, %rsi
callq 0x3130
movq %rax, %rdi
movl %r15d, %esi
callq 0x3300
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x3580
movq 0x10(%rsp), %r8
movq %r12, %rdi
movl %ebp, %esi
movl $0x5, %edx
leaq 0x16d4(%rip), %rcx      # 0xc71e
xorl %eax, %eax
callq 0x30b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb06d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
cmpl 0x1c(%rbx), %r15d
jne 0xb082
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x33b0
incl %r15d
leaq 0x5304(%rip), %rax      # 0x10390
movq (%rax), %rdi
movq %r13, %rsi
callq 0x3130
movq %rax, %rdi
callq 0x34e0
cmpl %eax, %r15d
jb 0xafee
movl 0x8(%rsp), %eax
addl %r15d, %eax
movl 0xc(%rsp), %ebp
jmp 0xb0b9
movl 0x8(%rsp), %eax
movl $0x1, %edi
movl %eax, %r14d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0xaf85
jmp 0xb181
cmpl 0x1c(%rbx), %eax
jne 0xb0e9
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x3180
addl $0x2, %r14d
movq (%rbx), %r15
leaq 0x5299(%rip), %rax      # 0x10390
movq (%rax), %rdi
leaq 0x11ff(%rip), %rsi      # 0xc300
callq 0x3130
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x3580
movq (%r12), %r8
leaq 0x15fd(%rip), %rcx      # 0xc71e
movq %r15, %rdi
movl %r14d, %esi
movl $0x5, %edx
xorl %eax, %eax
callq 0x30b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb14f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x523a(%rip), %rax      # 0x10390
movq (%rax), %rdi
leaq 0x101e(%rip), %rsi      # 0xc17e
callq 0x3130
movq %rax, %rdi
callq 0x34e0
cmpl 0x1c(%rbx), %eax
jne 0xb181
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x33b0
movq (%rbx), %rdi
callq 0x3310
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb19a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb1b9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x3550
nop