// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: buildkeytranslationtable
static int buildkeytranslationtable(void)
{
	memset(keytranslation,0,sizeof(keytranslation));

#define MAP(x,y) keytranslation[x].normal = y
#define MAPC(x,y,c) keytranslation[x].normal = y, keytranslation[x].controlchar = c

	MAPC(SDL_SCANCODE_BACKSPACE, 0xe, 0x8);
	MAPC(SDL_SCANCODE_TAB,       0xf, 0x9);
	MAPC(SDL_SCANCODE_RETURN,    0x1c, 0xd);
	MAP(SDL_SCANCODE_PAUSE,     0x59);  // 0x1d + 0x45 + 0x9d + 0xc5
	MAPC(SDL_SCANCODE_ESCAPE,    0x1, 0x1b);
	MAP(SDL_SCANCODE_SPACE,     0x39);
	MAP(SDL_SCANCODE_APOSTROPHE,     0x28);
	MAP(SDL_SCANCODE_COMMA,     0x33);
	MAP(SDL_SCANCODE_MINUS,     0xc);
	MAP(SDL_SCANCODE_PERIOD,    0x34);
	MAP(SDL_SCANCODE_SLASH,     0x35);
	MAP(SDL_SCANCODE_0,     0xb);
	MAP(SDL_SCANCODE_1,     0x2);
	MAP(SDL_SCANCODE_2,     0x3);
	MAP(SDL_SCANCODE_3,     0x4);
	MAP(SDL_SCANCODE_4,     0x5);
	MAP(SDL_SCANCODE_5,     0x6);
	MAP(SDL_SCANCODE_6,     0x7);
	MAP(SDL_SCANCODE_7,     0x8);
	MAP(SDL_SCANCODE_8,     0x9);
	MAP(SDL_SCANCODE_9,     0xa);
	MAP(SDL_SCANCODE_SEMICOLON, 0x27);
	MAP(SDL_SCANCODE_EQUALS,    0xd);
	MAPC(SDL_SCANCODE_LEFTBRACKET,   0x1a, 0x1b | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_BACKSLASH, 0x2b, 0x1c | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_RIGHTBRACKET,  0x1b, 0x1d | WITH_CONTROL_KEY);
	MAP(SDL_SCANCODE_GRAVE, 0x29);
	MAPC(SDL_SCANCODE_A,     0x1e, 0x1 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_B,     0x30, 0x2 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_C,     0x2e, 0x3 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_D,     0x20, 0x4 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_E,     0x12, 0x5 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_F,     0x21, 0x6 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_G,     0x22, 0x7 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_H,     0x23, 0x8 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_I,     0x17, 0x9 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_J,     0x24, 0xa | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_K,     0x25, 0xb | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_L,     0x26, 0xc | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_M,     0x32, 0xd | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_N,     0x31, 0xe | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_O,     0x18, 0xf | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_P,     0x19, 0x10 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_Q,     0x10, 0x11 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_R,     0x13, 0x12 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_S,     0x1f, 0x13 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_T,     0x14, 0x14 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_U,     0x16, 0x15 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_V,     0x2f, 0x16 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_W,     0x11, 0x17 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_X,     0x2d, 0x18 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_Y,     0x15, 0x19 | WITH_CONTROL_KEY);
	MAPC(SDL_SCANCODE_Z,     0x2c, 0x1a | WITH_CONTROL_KEY);
	MAP(SDL_SCANCODE_DELETE,    0xd3);
	MAP(SDL_SCANCODE_KP_0,       0x52);
	MAP(SDL_SCANCODE_KP_1,       0x4f);
	MAP(SDL_SCANCODE_KP_2,       0x50);
	MAP(SDL_SCANCODE_KP_3,       0x51);
	MAP(SDL_SCANCODE_KP_4,       0x4b);
	MAP(SDL_SCANCODE_KP_5,       0x4c);
	MAP(SDL_SCANCODE_KP_6,       0x4d);
	MAP(SDL_SCANCODE_KP_7,       0x47);
	MAP(SDL_SCANCODE_KP_8,       0x48);
	MAP(SDL_SCANCODE_KP_9,       0x49);
	MAP(SDL_SCANCODE_KP_PERIOD, 0x53);
	MAP(SDL_SCANCODE_KP_DIVIDE, 0xb5);
	MAP(SDL_SCANCODE_KP_MULTIPLY,   0x37);
	MAP(SDL_SCANCODE_KP_MINUS,  0x4a);
	MAP(SDL_SCANCODE_KP_PLUS,   0x4e);
	MAPC(SDL_SCANCODE_KP_ENTER,  0x9c, 0xd);
	MAP(SDL_SCANCODE_UP,        0xc8);
	MAP(SDL_SCANCODE_DOWN,      0xd0);
	MAP(SDL_SCANCODE_RIGHT,     0xcd);
	MAP(SDL_SCANCODE_LEFT,      0xcb);
	MAP(SDL_SCANCODE_INSERT,    0xd2);
	MAP(SDL_SCANCODE_HOME,      0xc7);
	MAP(SDL_SCANCODE_END,       0xcf);
	MAP(SDL_SCANCODE_PAGEUP,    0xc9);
	MAP(SDL_SCANCODE_PAGEDOWN,  0xd1);
	MAP(SDL_SCANCODE_F1,        0x3b);
	MAP(SDL_SCANCODE_F2,        0x3c);
	MAP(SDL_SCANCODE_F3,        0x3d);
	MAP(SDL_SCANCODE_F4,        0x3e);
	MAP(SDL_SCANCODE_F5,        0x3f);
	MAP(SDL_SCANCODE_F6,        0x40);
	MAP(SDL_SCANCODE_F7,        0x41);
	MAP(SDL_SCANCODE_F8,        0x42);
	MAP(SDL_SCANCODE_F9,        0x43);
	MAP(SDL_SCANCODE_F10,       0x44);
	MAP(SDL_SCANCODE_F11,       0x57);
	MAP(SDL_SCANCODE_F12,       0x58);
	MAP(SDL_SCANCODE_NUMLOCKCLEAR,   0x45);
	MAP(SDL_SCANCODE_CAPSLOCK,  0x3a);
	MAP(SDL_SCANCODE_SCROLLLOCK, 0x46);
	MAP(SDL_SCANCODE_RSHIFT,    0x36);
	MAP(SDL_SCANCODE_LSHIFT,    0x2a);
	MAP(SDL_SCANCODE_RCTRL,     0x9d);
	MAP(SDL_SCANCODE_LCTRL,     0x1d);
	MAP(SDL_SCANCODE_RALT,      0xb8);
	MAP(SDL_SCANCODE_LALT,      0x38);
	MAP(SDL_SCANCODE_LGUI,    0xdb);  // win l
	MAP(SDL_SCANCODE_RGUI,    0xdc);  // win r
	MAP(SDL_SCANCODE_PRINTSCREEN,     -2);    // 0xaa + 0xb7
	MAP(SDL_SCANCODE_SYSREQ,    0x54);  // alt+printscr
	MAP(SDL_SCANCODE_APPLICATION,      0xdd);  // win menu?

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x61d235(%rip), %rdi    # 0x6c1bb0
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x62d0
movb $0xe, 0x61d276(%rip)    # 0x6c1c04
movb $0x8, 0x61d270(%rip)    # 0x6c1c05
movb $0xf, 0x61d26a(%rip)    # 0x6c1c06
movb $0x9, 0x61d264(%rip)    # 0x6c1c07
movb $0x1c, 0x61d256(%rip)   # 0x6c1c00
movb $0xd, 0x61d250(%rip)    # 0x6c1c01
movb $0x59, 0x61d288(%rip)   # 0x6c1c40
movb $0x1, 0x61d243(%rip)    # 0x6c1c02
movb $0x1b, 0x61d23d(%rip)   # 0x6c1c03
movb $0x39, 0x61d23b(%rip)   # 0x6c1c08
movb $0x28, 0x61d244(%rip)   # 0x6c1c18
movb $0x33, 0x61d241(%rip)   # 0x6c1c1c
movb $0xc, 0x61d228(%rip)    # 0x6c1c0a
movb $0x34, 0x61d235(%rip)   # 0x6c1c1e
movb $0x35, 0x61d230(%rip)   # 0x6c1c20
movb $0xb, 0x61d207(%rip)    # 0x6c1bfe
movb $0x2, 0x61d1ee(%rip)    # 0x6c1bec
movb $0x3, 0x61d1e9(%rip)    # 0x6c1bee
movb $0x4, 0x61d1e4(%rip)    # 0x6c1bf0
movb $0x5, 0x61d1df(%rip)    # 0x6c1bf2
movb $0x6, 0x61d1da(%rip)    # 0x6c1bf4
movb $0x7, 0x61d1d5(%rip)    # 0x6c1bf6
movb $0x8, 0x61d1d0(%rip)    # 0x6c1bf8
movb $0x9, 0x61d1cb(%rip)    # 0x6c1bfa
movb $0xa, 0x61d1c6(%rip)    # 0x6c1bfc
movb $0x27, 0x61d1d9(%rip)   # 0x6c1c16
movb $0xd, 0x61d1c8(%rip)    # 0x6c1c0c
movb $0x1a, 0x61d1c3(%rip)   # 0x6c1c0e
movb $-0x65, 0x61d1bd(%rip)  # 0x6c1c0f
movb $0x2b, 0x61d1b9(%rip)   # 0x6c1c12
movb $-0x64, 0x61d1b3(%rip)  # 0x6c1c13
movb $0x1b, 0x61d1a9(%rip)   # 0x6c1c10
movb $-0x63, 0x61d1a3(%rip)  # 0x6c1c11
movb $0x29, 0x61d1a5(%rip)   # 0x6c1c1a
movb $0x1e, 0x61d13c(%rip)   # 0x6c1bb8
movb $-0x7f, 0x61d136(%rip)  # 0x6c1bb9
movb $0x30, 0x61d130(%rip)   # 0x6c1bba
movb $-0x7e, 0x61d12a(%rip)  # 0x6c1bbb
movb $0x2e, 0x61d124(%rip)   # 0x6c1bbc
movb $-0x7d, 0x61d11e(%rip)  # 0x6c1bbd
movb $0x20, 0x61d118(%rip)   # 0x6c1bbe
movb $-0x7c, 0x61d112(%rip)  # 0x6c1bbf
movb $0x12, 0x61d10c(%rip)   # 0x6c1bc0
movb $-0x7b, 0x61d106(%rip)  # 0x6c1bc1
movb $0x21, 0x61d100(%rip)   # 0x6c1bc2
movb $-0x7a, 0x61d0fa(%rip)  # 0x6c1bc3
movb $0x22, 0x61d0f4(%rip)   # 0x6c1bc4
movb $-0x79, 0x61d0ee(%rip)  # 0x6c1bc5
movb $0x23, 0x61d0e8(%rip)   # 0x6c1bc6
movb $-0x78, 0x61d0e2(%rip)  # 0x6c1bc7
movb $0x17, 0x61d0dc(%rip)   # 0x6c1bc8
movb $-0x77, 0x61d0d6(%rip)  # 0x6c1bc9
movb $0x24, 0x61d0d0(%rip)   # 0x6c1bca
movb $-0x76, 0x61d0ca(%rip)  # 0x6c1bcb
movb $0x25, 0x61d0c4(%rip)   # 0x6c1bcc
movb $-0x75, 0x61d0be(%rip)  # 0x6c1bcd
movb $0x26, 0x61d0b8(%rip)   # 0x6c1bce
movb $-0x74, 0x61d0b2(%rip)  # 0x6c1bcf
movb $0x32, 0x61d0ac(%rip)   # 0x6c1bd0
movb $-0x73, 0x61d0a6(%rip)  # 0x6c1bd1
movb $0x31, 0x61d0a0(%rip)   # 0x6c1bd2
movb $-0x72, 0x61d09a(%rip)  # 0x6c1bd3
movb $0x18, 0x61d094(%rip)   # 0x6c1bd4
movb $-0x71, 0x61d08e(%rip)  # 0x6c1bd5
movb $0x19, 0x61d088(%rip)   # 0x6c1bd6
movb $-0x70, 0x61d082(%rip)  # 0x6c1bd7
movb $0x10, 0x61d07c(%rip)   # 0x6c1bd8
movb $-0x6f, 0x61d076(%rip)  # 0x6c1bd9
movb $0x13, 0x61d070(%rip)   # 0x6c1bda
movb $-0x6e, 0x61d06a(%rip)  # 0x6c1bdb
movb $0x1f, 0x61d064(%rip)   # 0x6c1bdc
movb $-0x6d, 0x61d05e(%rip)  # 0x6c1bdd
movb $0x14, 0x61d058(%rip)   # 0x6c1bde
movb $-0x6c, 0x61d052(%rip)  # 0x6c1bdf
movb $0x16, 0x61d04c(%rip)   # 0x6c1be0
movb $-0x6b, 0x61d046(%rip)  # 0x6c1be1
movb $0x2f, 0x61d040(%rip)   # 0x6c1be2
movb $-0x6a, 0x61d03a(%rip)  # 0x6c1be3
movb $0x11, 0x61d034(%rip)   # 0x6c1be4
movb $-0x69, 0x61d02e(%rip)  # 0x6c1be5
movb $0x2d, 0x61d028(%rip)   # 0x6c1be6
movb $-0x68, 0x61d022(%rip)  # 0x6c1be7
movb $0x15, 0x61d01c(%rip)   # 0x6c1be8
movb $-0x67, 0x61d016(%rip)  # 0x6c1be9
movb $0x2c, 0x61d010(%rip)   # 0x6c1bea
movb $-0x66, 0x61d00a(%rip)  # 0x6c1beb
movb $-0x2d, 0x61d060(%rip)  # 0x6c1c48
movb $0x52, 0x61d085(%rip)   # 0x6c1c74
movb $0x4f, 0x61d06c(%rip)   # 0x6c1c62
movb $0x50, 0x61d067(%rip)   # 0x6c1c64
movb $0x51, 0x61d062(%rip)   # 0x6c1c66
movb $0x4b, 0x61d05d(%rip)   # 0x6c1c68
movb $0x4c, 0x61d058(%rip)   # 0x6c1c6a
movb $0x4d, 0x61d053(%rip)   # 0x6c1c6c
movb $0x47, 0x61d04e(%rip)   # 0x6c1c6e
movb $0x48, 0x61d049(%rip)   # 0x6c1c70
movb $0x49, 0x61d044(%rip)   # 0x6c1c72
movb $0x53, 0x61d041(%rip)   # 0x6c1c76
movb $-0x4b, 0x61d01c(%rip)  # 0x6c1c58
movb $0x37, 0x61d017(%rip)   # 0x6c1c5a
movb $0x4a, 0x61d012(%rip)   # 0x6c1c5c
movb $0x4e, 0x61d00d(%rip)   # 0x6c1c5e
movb $-0x64, 0x61d008(%rip)  # 0x6c1c60
movb $0xd, 0x61d002(%rip)    # 0x6c1c61
movb $-0x38, 0x61cfee(%rip)  # 0x6c1c54
movb $-0x30, 0x61cfe5(%rip)  # 0x6c1c52
movb $-0x33, 0x61cfda(%rip)  # 0x6c1c4e
movb $-0x35, 0x61cfd5(%rip)  # 0x6c1c50
movb $-0x2e, 0x61cfc0(%rip)  # 0x6c1c42
movb $-0x39, 0x61cfbb(%rip)  # 0x6c1c44
movb $-0x31, 0x61cfba(%rip)  # 0x6c1c4a
movb $-0x37, 0x61cfaf(%rip)  # 0x6c1c46
movb $-0x2f, 0x61cfae(%rip)  # 0x6c1c4c
movb $0x3b, 0x61cf7f(%rip)   # 0x6c1c24
movb $0x3c, 0x61cf7a(%rip)   # 0x6c1c26
movb $0x3d, 0x61cf75(%rip)   # 0x6c1c28
movb $0x3e, 0x61cf70(%rip)   # 0x6c1c2a
movb $0x3f, 0x61cf6b(%rip)   # 0x6c1c2c
movb $0x40, 0x61cf66(%rip)   # 0x6c1c2e
movb $0x41, 0x61cf61(%rip)   # 0x6c1c30
movb $0x42, 0x61cf5c(%rip)   # 0x6c1c32
movb $0x43, 0x61cf57(%rip)   # 0x6c1c34
movb $0x44, 0x61cf52(%rip)   # 0x6c1c36
movb $0x57, 0x61cf4d(%rip)   # 0x6c1c38
movb $0x58, 0x61cf48(%rip)   # 0x6c1c3a
movb $0x45, 0x61cf5d(%rip)   # 0x6c1c56
movb $0x3a, 0x61cf22(%rip)   # 0x6c1c22
movb $0x46, 0x61cf37(%rip)   # 0x6c1c3e
movb $0x36, 0x61d06c(%rip)   # 0x6c1d7a
movb $0x2a, 0x61d05d(%rip)   # 0x6c1d72
movb $-0x63, 0x61d05c(%rip)  # 0x6c1d78
movb $0x1d, 0x61d04d(%rip)   # 0x6c1d70
movb $-0x48, 0x61d052(%rip)  # 0x6c1d7c
movb $0x38, 0x61d043(%rip)   # 0x6c1d74
movb $-0x25, 0x61d03e(%rip)  # 0x6c1d76
movb $-0x24, 0x61d03f(%rip)  # 0x6c1d7e
movb $-0x2, 0x61cef6(%rip)   # 0x6c1c3c
movb $0x54, 0x61cf97(%rip)   # 0x6c1ce4
movb $-0x23, 0x61cf26(%rip)  # 0x6c1c7a
xorl %eax, %eax
popq %rbp
retq
nopl (%rax,%rax)