// File: daklqw[P]beepmania/cui.cpp
// Function: UI::update(long)
void UI::update(clock_t now) {
	clear();
	for (auto tr : trs) {
		int fg = tr->getdisplaych();
		int bg = 3 + tr->islight();
		attron(COLOR_PAIR(bg));
		matrix(halfdown(tr, tr->getarea()), ' ');
		attroff(COLOR_PAIR(bg));
		for (auto box : tr->gettrack(now)) {
			attron(COLOR_PAIR(fg));
			matrix(box, ' ');
			attroff(COLOR_PAIR(fg));
		}
		attron(COLOR_PAIR(bg));
		matrix(tr->getdown(), '=');
		attroff(COLOR_PAIR(bg));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
callq 0x22e0
movq -0xd0(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa210
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa240
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xa270
testb $0x1, %al
jne 0x9ace
jmp 0x9ce9
leaq -0x20(%rbp), %rdi
callq 0xa2b0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xed40
movsbl %al, %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0xee50
andb $0x1, %al
movzbl %al, %eax
addl $0x3, %eax
movl %eax, -0x38(%rbp)
movq 0x114c0(%rip), %rax     # 0x1afc8
movq (%rax), %rdi
movl -0x38(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x20c0
movq -0x30(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0xeb00
movq -0xd8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x9a10
leaq -0x48(%rbp), %rdi
movl $0x20, %esi
callq 0x9980
movq 0x11467(%rip), %rax     # 0x1afc8
movq (%rax), %rdi
movl -0x38(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2200
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0xec10
leaq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0xa2d0
movq %rax, -0x80(%rbp)
movq -0x60(%rbp), %rdi
callq 0xa300
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xa330
testb $0x1, %al
jne 0x9bd1
leaq -0x78(%rbp), %rdi
callq 0xa3b0
jmp 0x9c7c
leaq -0x80(%rbp), %rdi
callq 0xa370
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
callq 0x10450
jmp 0x9beb
movq 0x113d6(%rip), %rax     # 0x1afc8
movq (%rax), %rdi
movl -0x34(%rbp), %eax
shll $0x8, %eax
movzwl %ax, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x20c0
jmp 0x9c09
leaq -0xb4(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x10450
jmp 0x9c1e
leaq -0xb4(%rbp), %rdi
movl $0x20, %esi
callq 0x9980
jmp 0x9c31
movq 0x11390(%rip), %rax     # 0x1afc8
movq (%rax), %rdi
movl -0x34(%rbp), %eax
shll $0x8, %eax
movzwl %ax, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2200
jmp 0x9c4f
jmp 0x9c51
leaq -0x80(%rbp), %rdi
callq 0xa390
jmp 0x9baf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xa3b0
jmp 0x9cf2
movq 0x11345(%rip), %rax     # 0x1afc8
movq (%rax), %rdi
movl -0x38(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x20c0
movq -0x30(%rbp), %rsi
leaq -0xc4(%rbp), %rdi
callq 0xf070
leaq -0xc4(%rbp), %rdi
movl $0x3d, %esi
callq 0x9980
movq 0x11305(%rip), %rax     # 0x1afc8
movq (%rax), %rdi
movl -0x38(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2200
leaq -0x20(%rbp), %rdi
callq 0xa410
jmp 0x9ab8
addq $0xe0, %rsp
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x2300
nop