// File: /workspace/github_cpp_makefile_star2_O2/lotuskip[P]yuxtapa/client/view.cpp
// Function: redraw_view()
void redraw_view()
{
	if(clientstate == CS_LIMBO)
		Base::print_view(limboview);
	else if(clientstate == CS_HELP)
	{
		if(!helpshown) // first time to show help
		{
			// replace keys in the view with actual values
			char *kmv;
			short idx;
			for(e_Key_binding kb = KB_8; kb < MAX_KEY_BINDING; kb = e_Key_binding(kb+1))
			{
				kmv = Config::key_map_value(kb);
				idx = kmv_idx[kb];
				while(*kmv)
				{
					helpview[idx] = *kmv;
					idx += 2;
					++kmv;
				}
			}
			helpshown = true;
		}
		Base::print_view(helpview);
	}
	else if(clientstate != CS_TEAM_INFO)
	{
		Base::print_view(viewbuffer);
		if(clientstate == CS_AIMING)
			draw_aimer();
		if(showtitles)
			draw_titles();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0xa883(%rip), %rbx      # 0x16e80
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xc8c9
cmpl $0x4, %eax
je 0xc61e
cmpl $0x3, %eax
jne 0xc66c
leaq 0x25b7(%rip), %rdi      # 0xebd0
jmp 0xc6eb
cmpb $0x0, 0xd09c(%rip)      # 0x196c1
jne 0xc6e4
xorl %ebx, %ebx
leaq 0x29cc(%rip), %r14      # 0xf000
leaq 0x9d95(%rip), %r15      # 0x163d0
cmpq $0x1b, %rbx
je 0xc6dd
movl %ebx, %edi
callq 0xba15
movzwl (%r14,%rbx,2), %ecx
movb (%rax), %dl
testb %dl, %dl
je 0xc667
movswq %cx, %rsi
movb %dl, (%rsi,%r15)
addl $0x2, %ecx
incq %rax
jmp 0xc651
incq %rbx
jmp 0xc63b
leaq 0xc04d(%rip), %r12      # 0x186c0
movq %r12, %rdi
callq 0x648e
cmpl $0x6, (%rbx)
jne 0xc8ad
leaq 0xa6b5(%rip), %r8       # 0x16d40
movzwl (%r8), %edx
movzwl 0x2(%r8), %esi
movl %edx, %eax
orw %si, %ax
je 0xc863
movl %edx, %eax
negw %ax
cmovsw %dx, %ax
movl %esi, %r9d
negw %r9w
cmovsw %si, %r9w
cmpw %r9w, %ax
cmoval %eax, %r9d
movzwl %r9w, %eax
movsbl %al, %ecx
cmpl $0x2, %ecx
jl 0xc863
movswl %si, %esi
shll $0x18, %r9d
movl %esi, %edi
addl %ecx, %edi
jne 0xc6fe
addl %edx, %eax
jmp 0xc71c
movb $0x1, 0xcfdd(%rip)      # 0x196c1
leaq 0x9ce5(%rip), %rdi      # 0x163d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x648e
movswl %dx, %edx
cmpl %edx, %ecx
jne 0xc70c
leal (%rax,%rax,2), %eax
addl %esi, %eax
jmp 0xc71c
cmpl %esi, %ecx
jne 0xc717
leal (%rax,%rax,4), %eax
subl %edx, %eax
jmp 0xc71c
imull $0x7, %eax, %eax
subl %esi, %eax
shrl $0x17, %r9d
addl $-0x2, %r9d
leal -0x2(%rcx), %edx
shlq $0x2, %rdx
movq %rdx, -0x48(%rbp)
movsbl %al, %eax
imull %ecx, %eax
addl %eax, %eax
movq %rax, -0x40(%rbp)
xorl %r15d, %r15d
movl %r9d, -0x34(%rbp)
movsbl %r15b, %r15d
cmpl %r9d, %r15d
jge 0xc863
movq -0x48(%rbp), %rax
leaq 0x2976(%rip), %rcx      # 0xf0d0
movslq (%rax,%rcx), %rax
addq %rcx, %rax
movq -0x40(%rbp), %rcx
addl %r15d, %ecx
movslq %ecx, %rcx
movb (%rcx,%rax), %r13b
movb 0x1(%rcx,%rax), %r14b
addb $0xb, %r13b
addb $0xb, %r14b
movsbl %r14b, %eax
movl %eax, -0x30(%rbp)
imull $0x17, %eax, %eax
movsbl %r13b, %ecx
movl %ecx, -0x2c(%rbp)
addl %ecx, %eax
addl %eax, %eax
cltq
movq %rax, -0x50(%rbp)
movzbl 0x1(%rax,%r12), %eax
cmpl $0x21, %eax
je 0xc806
cmpl $0x40, %eax
je 0xc839
movq -0x50(%rbp), %rbx
incq %rbx
leaq 0x293f(%rip), %rdi      # 0xf0f8
pushq $0x2a
popq %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
pushq $0x3
popq %r8
xorl %r9d, %r9d
callq 0x61ca
leaq 0xbeeb(%rip), %r12      # 0x186c0
movzbl (%rbx,%r12), %eax
addl $-0x23, %eax
cmpl $0x2c, %eax
leaq 0xa559(%rip), %r8       # 0x16d40
movl -0x34(%rbp), %r9d
ja 0xc7fd
movabsq $0x100000000101, %rcx   # imm = 0x100000000101
btq %rax, %rcx
jb 0xc863
addl $0x2, %r15d
jmp 0xc742
movb 0xc2d5(%rip), %r12b     # 0x18ae2
leaq 0xc2cf(%rip), %rbx      # 0x18ae3
testb %r12b, %r12b
jle 0xc7ab
cmpb %r13b, (%rbx)
jne 0xc824
cmpb %r14b, 0x1(%rbx)
je 0xc839
leaq 0x2(%rbx), %rdi
callq 0x41c0
addq %rax, %rbx
addq $0x3, %rbx
decb %r12b
jmp 0xc814
leaq 0x28b8(%rip), %rdi      # 0xf0f8
pushq $0x25
popq %rsi
pushq $0x3
popq %r8
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
xorl %r9d, %r9d
callq 0x61ca
leaq 0xbe64(%rip), %r12      # 0x186c0
leaq 0xa4dd(%rip), %r8       # 0x16d40
movb (%r8), %cl
leal 0xb(%rcx), %edx
movzwl 0x2(%r8), %esi
leal 0xb(%rsi), %edi
movb $0x3e, %al
orb %sil, %cl
movsbl %dl, %edx
movsbl %dil, %ecx
je 0xc897
imull $0x17, %ecx, %eax
addl %edx, %eax
addl %eax, %eax
cltq
cmpb $0x40, 0x1(%rax,%r12)
pushq $0x25
popq %rsi
pushq $0x3e
popq %rax
cmovel %esi, %eax
movzbl %al, %esi
leaq 0x2859(%rip), %rdi      # 0xf0fa
pushq $0x3
popq %r8
xorl %r9d, %r9d
callq 0x61ca
cmpb $0x1, 0xce0c(%rip)      # 0x196c0
jne 0xc8c9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc4f2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq