// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::ConvertKey(int)
S::Input::Keyboard::Key S::GUI::WindowXLib::ConvertKey(Int keySym)
{
	Input::Keyboard::Key	 key = Input::Keyboard::KeyOther;

	switch (keySym)
	{
		case XK_Left:	   key = Input::Keyboard::KeyLeft;    break;
		case XK_Up:	   key = Input::Keyboard::KeyUp;      break;
		case XK_Right:	   key = Input::Keyboard::KeyRight;   break;
		case XK_Down:	   key = Input::Keyboard::KeyDown;    break;

		case XK_Home:	   key = Input::Keyboard::KeyHome;    break;
		case XK_End:	   key = Input::Keyboard::KeyEnd;     break;
		case XK_Insert:	   key = Input::Keyboard::KeyInsert;  break;
		case XK_Delete:	   key = Input::Keyboard::KeyDelete;  break;
		case XK_Prior:	   key = Input::Keyboard::KeyPrior;   break;
		case XK_Next:	   key = Input::Keyboard::KeyNext;    break;

		case XK_Return:	   key = Input::Keyboard::KeyReturn;  break;
		case XK_BackSpace: key = Input::Keyboard::KeyBack;    break;
		case XK_Tab:	   key = Input::Keyboard::KeyTab;     break;

		case XK_space:	   key = Input::Keyboard::KeySpace;   break;

		case XK_Shift_L:
		case XK_Shift_R:   key = Input::Keyboard::KeyShift;   break;

		case XK_Control_L:
		case XK_Control_R: key = Input::Keyboard::KeyControl; break;

		case XK_Alt_L:
		case XK_Alt_R:	   key = Input::Keyboard::KeyAlt;     break;

		case XK_Escape:	   key = Input::Keyboard::KeyEscape;  break;

		case XK_F1:	   key = Input::Keyboard::KeyF1;      break;
		case XK_F2:	   key = Input::Keyboard::KeyF2;      break;
		case XK_F3:	   key = Input::Keyboard::KeyF3;      break;
		case XK_F4:	   key = Input::Keyboard::KeyF4;      break;
		case XK_F5:	   key = Input::Keyboard::KeyF5;      break;
		case XK_F6:	   key = Input::Keyboard::KeyF6;      break;
		case XK_F7:	   key = Input::Keyboard::KeyF7;      break;
		case XK_F8:	   key = Input::Keyboard::KeyF8;      break;
		case XK_F9:	   key = Input::Keyboard::KeyF9;      break;
		case XK_F10:	   key = Input::Keyboard::KeyF10;     break;
		case XK_F11:	   key = Input::Keyboard::KeyF11;     break;
		case XK_F12:	   key = Input::Keyboard::KeyF12;     break;
		case XK_F13:	   key = Input::Keyboard::KeyF13;     break;
		case XK_F14:	   key = Input::Keyboard::KeyF14;     break;
		case XK_F15:	   key = Input::Keyboard::KeyF15;     break;
		case XK_F16:	   key = Input::Keyboard::KeyF16;     break;
		case XK_F17:	   key = Input::Keyboard::KeyF17;     break;
		case XK_F18:	   key = Input::Keyboard::KeyF18;     break;
		case XK_F19:	   key = Input::Keyboard::KeyF19;     break;
		case XK_F20:	   key = Input::Keyboard::KeyF20;     break;
		case XK_F21:	   key = Input::Keyboard::KeyF21;     break;
		case XK_F22:	   key = Input::Keyboard::KeyF22;     break;
		case XK_F23:	   key = Input::Keyboard::KeyF23;     break;
		case XK_F24:	   key = Input::Keyboard::KeyF24;     break;
	}

	if	(keySym >= '0' && keySym <= '9') key = (Input::Keyboard::Key)  keySym;
	else if	(keySym >= 'A' && keySym <= 'Z') key = (Input::Keyboard::Key)  keySym;
	else if	(keySym >= 'a' && keySym <= 'z') key = (Input::Keyboard::Key) (keySym + ('A' - 'a'));

	return key;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
subl $0x20, %eax
je 0x122247
jmp 0x121f13
movl -0x14(%rbp), %eax
subl $0xff08, %eax           # imm = 0xFF08
je 0x12222f
jmp 0x121f23
movl -0x14(%rbp), %eax
subl $0xff09, %eax           # imm = 0xFF09
je 0x12223b
jmp 0x121f33
movl -0x14(%rbp), %eax
subl $0xff0d, %eax           # imm = 0xFF0D
je 0x122223
jmp 0x121f43
movl -0x14(%rbp), %eax
subl $0xff1b, %eax           # imm = 0xFF1B
je 0x122277
jmp 0x121f53
movl -0x14(%rbp), %eax
subl $0xff50, %eax           # imm = 0xFF50
je 0x1221db
jmp 0x121f63
movl -0x14(%rbp), %eax
subl $0xff51, %eax           # imm = 0xFF51
je 0x1221ab
jmp 0x121f73
movl -0x14(%rbp), %eax
subl $0xff52, %eax           # imm = 0xFF52
je 0x1221b7
jmp 0x121f83
movl -0x14(%rbp), %eax
subl $0xff53, %eax           # imm = 0xFF53
je 0x1221c3
jmp 0x121f93
movl -0x14(%rbp), %eax
subl $0xff54, %eax           # imm = 0xFF54
je 0x1221cf
jmp 0x121fa3
movl -0x14(%rbp), %eax
subl $0xff55, %eax           # imm = 0xFF55
je 0x12220b
jmp 0x121fb3
movl -0x14(%rbp), %eax
subl $0xff56, %eax           # imm = 0xFF56
je 0x122217
jmp 0x121fc3
movl -0x14(%rbp), %eax
subl $0xff57, %eax           # imm = 0xFF57
je 0x1221e7
jmp 0x121fd3
movl -0x14(%rbp), %eax
subl $0xff63, %eax           # imm = 0xFF63
je 0x1221f3
jmp 0x121fe3
movl -0x14(%rbp), %eax
subl $0xffbe, %eax           # imm = 0xFFBE
je 0x122283
jmp 0x121ff3
movl -0x14(%rbp), %eax
subl $0xffbf, %eax           # imm = 0xFFBF
je 0x12228f
jmp 0x122003
movl -0x14(%rbp), %eax
subl $0xffc0, %eax           # imm = 0xFFC0
je 0x12229b
jmp 0x122013
movl -0x14(%rbp), %eax
subl $0xffc1, %eax           # imm = 0xFFC1
je 0x1222a7
jmp 0x122023
movl -0x14(%rbp), %eax
subl $0xffc2, %eax           # imm = 0xFFC2
je 0x1222b3
jmp 0x122033
movl -0x14(%rbp), %eax
subl $0xffc3, %eax           # imm = 0xFFC3
je 0x1222bf
jmp 0x122043
movl -0x14(%rbp), %eax
subl $0xffc4, %eax           # imm = 0xFFC4
je 0x1222cb
jmp 0x122053
movl -0x14(%rbp), %eax
subl $0xffc5, %eax           # imm = 0xFFC5
je 0x1222d7
jmp 0x122063
movl -0x14(%rbp), %eax
subl $0xffc6, %eax           # imm = 0xFFC6
je 0x1222e3
jmp 0x122073
movl -0x14(%rbp), %eax
subl $0xffc7, %eax           # imm = 0xFFC7
je 0x1222ef
jmp 0x122083
movl -0x14(%rbp), %eax
subl $0xffc8, %eax           # imm = 0xFFC8
je 0x1222f8
jmp 0x122093
movl -0x14(%rbp), %eax
subl $0xffc9, %eax           # imm = 0xFFC9
je 0x122301
jmp 0x1220a3
movl -0x14(%rbp), %eax
subl $0xffca, %eax           # imm = 0xFFCA
je 0x12230a
jmp 0x1220b3
movl -0x14(%rbp), %eax
subl $0xffcb, %eax           # imm = 0xFFCB
je 0x122313
jmp 0x1220c3
movl -0x14(%rbp), %eax
subl $0xffcc, %eax           # imm = 0xFFCC
je 0x12231c
jmp 0x1220d3
movl -0x14(%rbp), %eax
subl $0xffcd, %eax           # imm = 0xFFCD
je 0x122325
jmp 0x1220e3
movl -0x14(%rbp), %eax
subl $0xffce, %eax           # imm = 0xFFCE
je 0x12232e
jmp 0x1220f3
movl -0x14(%rbp), %eax
subl $0xffcf, %eax           # imm = 0xFFCF
je 0x122337
jmp 0x122103
movl -0x14(%rbp), %eax
subl $0xffd0, %eax           # imm = 0xFFD0
je 0x122340
jmp 0x122113
movl -0x14(%rbp), %eax
subl $0xffd1, %eax           # imm = 0xFFD1
je 0x122349
jmp 0x122123
movl -0x14(%rbp), %eax
subl $0xffd2, %eax           # imm = 0xFFD2
je 0x122352
jmp 0x122133
movl -0x14(%rbp), %eax
subl $0xffd3, %eax           # imm = 0xFFD3
je 0x12235b
jmp 0x122143
movl -0x14(%rbp), %eax
subl $0xffd4, %eax           # imm = 0xFFD4
je 0x122364
jmp 0x122153
movl -0x14(%rbp), %eax
subl $0xffd5, %eax           # imm = 0xFFD5
je 0x12236d
jmp 0x122163
movl -0x14(%rbp), %eax
addl $0xffff001f, %eax       # imm = 0xFFFF001F
subl $0x2, %eax
jb 0x122253
jmp 0x122176
movl -0x14(%rbp), %eax
addl $0xffff001d, %eax       # imm = 0xFFFF001D
subl $0x2, %eax
jb 0x12225f
jmp 0x122189
movl -0x14(%rbp), %eax
addl $0xffff0017, %eax       # imm = 0xFFFF0017
subl $0x2, %eax
jb 0x12226b
jmp 0x12219c
movl -0x14(%rbp), %eax
subl $0xffff, %eax           # imm = 0xFFFF
je 0x1221ff
jmp 0x122374
movl $0x25, -0x10(%rbp)
jmp 0x122374
movl $0x26, -0x10(%rbp)
jmp 0x122374
movl $0x27, -0x10(%rbp)
jmp 0x122374
movl $0x28, -0x10(%rbp)
jmp 0x122374
movl $0x24, -0x10(%rbp)
jmp 0x122374
movl $0x23, -0x10(%rbp)
jmp 0x122374
movl $0x2d, -0x10(%rbp)
jmp 0x122374
movl $0x2e, -0x10(%rbp)
jmp 0x122374
movl $0x21, -0x10(%rbp)
jmp 0x122374
movl $0x22, -0x10(%rbp)
jmp 0x122374
movl $0xd, -0x10(%rbp)
jmp 0x122374
movl $0x8, -0x10(%rbp)
jmp 0x122374
movl $0x9, -0x10(%rbp)
jmp 0x122374
movl $0x20, -0x10(%rbp)
jmp 0x122374
movl $0x10, -0x10(%rbp)
jmp 0x122374
movl $0x11, -0x10(%rbp)
jmp 0x122374
movl $0x12, -0x10(%rbp)
jmp 0x122374
movl $0x1b, -0x10(%rbp)
jmp 0x122374
movl $0x70, -0x10(%rbp)
jmp 0x122374
movl $0x71, -0x10(%rbp)
jmp 0x122374
movl $0x72, -0x10(%rbp)
jmp 0x122374
movl $0x73, -0x10(%rbp)
jmp 0x122374
movl $0x74, -0x10(%rbp)
jmp 0x122374
movl $0x75, -0x10(%rbp)
jmp 0x122374
movl $0x76, -0x10(%rbp)
jmp 0x122374
movl $0x77, -0x10(%rbp)
jmp 0x122374
movl $0x78, -0x10(%rbp)
jmp 0x122374
movl $0x79, -0x10(%rbp)
jmp 0x122374
movl $0x7a, -0x10(%rbp)
jmp 0x122374
movl $0x7b, -0x10(%rbp)
jmp 0x122374
movl $0x7c, -0x10(%rbp)
jmp 0x122374
movl $0x7d, -0x10(%rbp)
jmp 0x122374
movl $0x7e, -0x10(%rbp)
jmp 0x122374
movl $0x7f, -0x10(%rbp)
jmp 0x122374
movl $0x80, -0x10(%rbp)
jmp 0x122374
movl $0x81, -0x10(%rbp)
jmp 0x122374
movl $0x82, -0x10(%rbp)
jmp 0x122374
movl $0x83, -0x10(%rbp)
jmp 0x122374
movl $0x84, -0x10(%rbp)
jmp 0x122374
movl $0x85, -0x10(%rbp)
jmp 0x122374
movl $0x86, -0x10(%rbp)
jmp 0x122374
movl $0x87, -0x10(%rbp)
cmpl $0x30, -0xc(%rbp)
jl 0x122388
cmpl $0x39, -0xc(%rbp)
jg 0x122388
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x1223b5
cmpl $0x41, -0xc(%rbp)
jl 0x12239c
cmpl $0x5a, -0xc(%rbp)
jg 0x12239c
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x1223b3
cmpl $0x61, -0xc(%rbp)
jl 0x1223b1
cmpl $0x7a, -0xc(%rbp)
jg 0x1223b1
movl -0xc(%rbp), %eax
addl $-0x20, %eax
movl %eax, -0x10(%rbp)
jmp 0x1223b3
jmp 0x1223b5
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)