// File: 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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq (%rax), %rdi
callq 0x3060
movq -0x88(%rbp), %rax
movq (%rax), %rdi
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x31e0
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x2, -0x28(%rbp)
jge 0x14df4
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %edi
leaq -0x20(%rbp), %rsi
callq 0x13720
cmpl $0x0, -0x28(%rbp)
jne 0x14c90
movq -0x88(%rbp), %rax
movq (%rax), %rdi
movl -0x24(%rbp), %esi
leaq -0x20(%rbp), %r8
movl $0x1, %edx
leaq 0x1b66(%rip), %rcx      # 0x166a1
movb $0x0, %al
callq 0x30d0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x8c(%rbp)
leaq 0x987f(%rip), %rax      # 0x1e3d8
movq (%rax), %rdi
leaq 0x15bb(%rip), %rsi      # 0x1611e
callq 0x3140
movq %rax, %rdi
callq 0x3550
movl %eax, %ecx
movl -0x8c(%rbp), %eax
cmpl %ecx, %eax
jae 0x14c8b
movq -0x88(%rbp), %rcx
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jne 0x14bb0
movq -0x88(%rbp), %rax
movq (%rax), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %eax, %eax
movl %eax, %edx
callq 0x31a0
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x90(%rbp)
leaq 0x9807(%rip), %rax      # 0x1e3d8
movq (%rax), %rdi
leaq 0x1543(%rip), %rsi      # 0x1611e
callq 0x3140
movq %rax, %rdi
movl -0x2c(%rbp), %esi
callq 0x3380
movq %rax, %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x3600
movq -0xa0(%rbp), %rdi
callq 0x3160
movq -0x98(%rbp), %rdi
movl -0x90(%rbp), %esi
movq %rax, %r8
leaq 0x1a80(%rip), %rcx      # 0x166a1
xorl %eax, %eax
movl $0x5, %edx
callq 0x30d0
jmp 0x14c2f
leaq -0x50(%rbp), %rdi
callq 0x3250
movq -0x88(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jne 0x14c7b
movq -0x88(%rbp), %rax
movq (%rax), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %eax, %eax
movl %eax, %edx
callq 0x3420
jmp 0x14c7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3250
jmp 0x14e0c
jmp 0x14c7d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x14b49
jmp 0x14de4
cmpl $0x1, -0x28(%rbp)
jne 0x14de2
movq -0x88(%rbp), %rax
movq (%rax), %rdi
movl -0x24(%rbp), %esi
leaq -0x20(%rbp), %r8
movl $0x1, %edx
leaq 0x19ea(%rip), %rcx      # 0x166a1
movb $0x0, %al
callq 0x30d0
leaq 0x9713(%rip), %rax      # 0x1e3d8
movq (%rax), %rdi
leaq 0x144f(%rip), %rsi      # 0x1611e
callq 0x3140
movq %rax, %rdi
callq 0x3550
movq -0x88(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x14d00
movq -0x88(%rbp), %rax
movq (%rax), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %eax, %eax
movl %eax, %edx
callq 0x31a0
movq -0x88(%rbp), %rax
movl -0x24(%rbp), %ecx
incl %ecx
movl %ecx, -0x24(%rbp)
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0xa4(%rbp)
leaq 0x96af(%rip), %rax      # 0x1e3d8
movq (%rax), %rdi
leaq 0x1593(%rip), %rsi      # 0x162c6
callq 0x3140
movq %rax, %rsi
leaq -0x80(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x3600
movq -0xb8(%rbp), %rdi
callq 0x3160
movq -0xb0(%rbp), %rdi
movl -0xa4(%rbp), %esi
movq %rax, %r8
leaq 0x1933(%rip), %rcx      # 0x166a1
xorl %eax, %eax
movl $0x5, %edx
callq 0x30d0
jmp 0x14d7c
leaq -0x80(%rbp), %rdi
callq 0x3250
leaq 0x964c(%rip), %rax      # 0x1e3d8
movq (%rax), %rdi
leaq 0x1388(%rip), %rsi      # 0x1611e
callq 0x3140
movq %rax, %rdi
callq 0x3550
movq -0x88(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x14de0
movq -0x88(%rbp), %rax
movq (%rax), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %eax, %eax
movl %eax, %edx
callq 0x3420
jmp 0x14de0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x3250
jmp 0x14e0c
jmp 0x14de2
jmp 0x14de4
jmp 0x14de6
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x14af5
movq -0x88(%rbp), %rax
movq (%rax), %rdi
callq 0x3390
addq $0xd0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x35c0
nopw %cs:(%rax,%rax)