// File: kusumi[P]procstat/container.cc
// Function: Container::parse_event(int)
void Container::parse_event(int x)
{
	Window *p = *_it;
	switch (x) {
	case KBD_ERR:
		break;
	case KBD_RESIZE:
	case KBD_CTRL('l'):
		clear_terminal();
		_build_window();
		break;
	case 'h':
	case KBD_LEFT:
		_goto_prev_window();
		break;
	case 'l':
	case KBD_RIGHT:
		_goto_next_window();
		break;
	case '0':
		p->goto_head();
		goto _signal;
	case '$':
		p->goto_tail();
		goto _signal;
	case 'k':
	case KBD_UP:
		p->goto_current(-1);
		goto _signal;
	case 'j':
	case KBD_DOWN:
		p->goto_current(1);
		goto _signal;
	case KBD_CTRL('B'):
		p->goto_current(-get_terminal_lines());
		goto _signal;
	case KBD_CTRL('U'):
		p->goto_current(-get_terminal_lines() / 2);
		goto _signal;
	case KBD_CTRL('F'):
		p->goto_current(get_terminal_lines());
		goto _signal;
	case KBD_CTRL('D'):
		p->goto_current(get_terminal_lines() / 2);
		goto _signal;
	default:
		goto _signal;
	}
	return;
_signal:
	p->signal();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x18, %rdi
callq 0x7120
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $-0x1, %eax
je 0x6ac1
jmp 0x69e8
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x6b37
jmp 0x69f6
movl -0x1c(%rbp), %eax
subl $0x4, %eax
je 0x6b95
jmp 0x6a04
movl -0x1c(%rbp), %eax
subl $0x6, %eax
je 0x6b7b
jmp 0x6a12
movl -0x1c(%rbp), %eax
subl $0xc, %eax
je 0x6ac6
jmp 0x6a20
movl -0x1c(%rbp), %eax
subl $0x15, %eax
je 0x6b53
jmp 0x6a2e
movl -0x1c(%rbp), %eax
subl $0x24, %eax
je 0x6b03
jmp 0x6a3c
movl -0x1c(%rbp), %eax
subl $0x30, %eax
je 0x6af5
jmp 0x6a4a
movl -0x1c(%rbp), %eax
subl $0x68, %eax
je 0x6ad9
jmp 0x6a58
movl -0x1c(%rbp), %eax
subl $0x6a, %eax
je 0x6b24
jmp 0x6a66
movl -0x1c(%rbp), %eax
subl $0x6b, %eax
je 0x6b11
jmp 0x6a74
movl -0x1c(%rbp), %eax
subl $0x6c, %eax
je 0x6ae7
jmp 0x6a7e
movl -0x1c(%rbp), %eax
subl $0x102, %eax            # imm = 0x102
je 0x6b24
jmp 0x6a8e
movl -0x1c(%rbp), %eax
subl $0x103, %eax            # imm = 0x103
je 0x6b11
jmp 0x6a9a
movl -0x1c(%rbp), %eax
subl $0x104, %eax            # imm = 0x104
je 0x6ad9
jmp 0x6aa6
movl -0x1c(%rbp), %eax
subl $0x105, %eax            # imm = 0x105
je 0x6ae7
jmp 0x6ab2
movl -0x1c(%rbp), %eax
subl $0x19a, %eax            # imm = 0x19A
je 0x6ac6
jmp 0x6bb7
jmp 0x6bb9
callq 0xcd90
movq -0x28(%rbp), %rdi
callq 0x6310
jmp 0x6bb9
movq -0x28(%rbp), %rdi
callq 0x6520
jmp 0x6bb9
movq -0x28(%rbp), %rdi
callq 0x6430
jmp 0x6bb9
movq -0x18(%rbp), %rdi
callq 0xa470
jmp 0x6bbb
movq -0x18(%rbp), %rdi
callq 0xa4a0
jmp 0x6bbb
movq -0x18(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xa4e0
jmp 0x6bbb
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xa4e0
jmp 0x6bbb
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0xce30
movq -0x30(%rbp), %rdi
xorl %esi, %esi
subl %eax, %esi
callq 0xa4e0
jmp 0x6bbb
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0xce30
movq -0x38(%rbp), %rdi
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0xa4e0
jmp 0x6bbb
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0xce30
movq -0x40(%rbp), %rdi
movl %eax, %esi
callq 0xa4e0
jmp 0x6bbb
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
callq 0xce30
movq -0x48(%rbp), %rdi
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0xa4e0
jmp 0x6bbb
jmp 0x6bbb
jmp 0x6bc4
movq -0x18(%rbp), %rdi
callq 0xa810
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)