// File: /workspace/github_c_makefile_star2_O0/nkanaev[P]tipsy/src/tigr.c
// Function: tigrKeyFromX11
uint8_t tigrKeyFromX11(KeySym sym) {
    if (sym >= 'a' && sym <= 'z') {
        return (uint8_t)sym - ('a' - 'A');
    }

    if (sym >= '0' && sym <= '9') {
        return (uint8_t)sym;
    }

    switch (sym) {
        case XK_KP_0:
            return TK_PAD0;
        case XK_KP_1:
            return TK_PAD1;
        case XK_KP_2:
            return TK_PAD2;
        case XK_KP_3:
            return TK_PAD3;
        case XK_KP_4:
            return TK_PAD4;
        case XK_KP_5:
            return TK_PAD5;
        case XK_KP_6:
            return TK_PAD6;
        case XK_KP_7:
            return TK_PAD7;
        case XK_KP_8:
            return TK_PAD8;
        case XK_KP_9:
            return TK_PAD9;

        case XK_KP_Multiply:
            return TK_PADMUL;
        case XK_KP_Divide:
            return TK_PADDIV;
        case XK_KP_Add:
            return TK_PADADD;
        case XK_KP_Subtract:
            return TK_PADSUB;
        case XK_KP_Decimal:
            return TK_PADDOT;
        case XK_KP_Enter:
            return TK_PADENTER;

        case XK_F1:
            return TK_F1;
        case XK_F2:
            return TK_F2;
        case XK_F3:
            return TK_F3;
        case XK_F4:
            return TK_F4;
        case XK_F5:
            return TK_F5;
        case XK_F6:
            return TK_F6;
        case XK_F7:
            return TK_F7;
        case XK_F8:
            return TK_F8;
        case XK_F9:
            return TK_F9;
        case XK_F10:
            return TK_F10;
        case XK_F11:
            return TK_F11;
        case XK_F12:
            return TK_F12;

        case XK_BackSpace:
            return TK_BACKSPACE;
        case XK_Tab:
            return TK_TAB;
        case XK_Return:
            return TK_RETURN;
        case XK_Pause:
            return TK_PAUSE;
        case XK_Caps_Lock:
            return TK_CAPSLOCK;
        case XK_Escape:
            return TK_ESCAPE;
        case XK_space:
            return TK_SPACE;

        case XK_Page_Up:
            return TK_PAGEUP;
        case XK_Page_Down:
            return TK_PAGEDN;
        case XK_End:
            return TK_END;
        case XK_Home:
            return TK_HOME;
        case XK_Left:
            return TK_LEFT;
        case XK_Up:
            return TK_UP;
        case XK_Right:
            return TK_RIGHT;
        case XK_Down:
            return TK_DOWN;
        case XK_Insert:
            return TK_INSERT;
        case XK_Delete:
            return TK_DELETE;

        case XK_Meta_L:
            return TK_LWIN;
        case XK_Meta_R:
            return TK_RWIN;
        case XK_Num_Lock:
            return TK_NUMLOCK;
        case XK_Scroll_Lock:
            return TK_SCROLL;
        case XK_Shift_L:
            return TK_LSHIFT;
        case XK_Shift_R:
            return TK_RSHIFT;
        case XK_Control_L:
            return TK_LCONTROL;
        case XK_Control_R:
            return TK_RCONTROL;
        case XK_Alt_L:
            return TK_LALT;
        case XK_Alt_R:
            return TK_RALT;

        case XK_semicolon:
            return TK_SEMICOLON;
        case XK_equal:
            return TK_EQUALS;
        case XK_comma:
            return TK_COMMA;
        case XK_minus:
            return TK_MINUS;
        case XK_period:
            return TK_DOT;
        case XK_slash:
            return TK_SLASH;
        case XK_grave:
            return TK_BACKTICK;
        case XK_bracketleft:
            return TK_LSQUARE;
        case XK_backslash:
            return TK_BACKSLASH;
        case XK_bracketright:
            return TK_RSQUARE;
        case XK_apostrophe:
            return TK_TICK;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x61, -0x10(%rbp)
jb 0x7b48
cmpq $0x7a, -0x10(%rbp)
ja 0x7b48
movq -0x10(%rbp), %rax
movzbl %al, %eax
subl $0x20, %eax
movb %al, -0x1(%rbp)
jmp 0x820c
cmpq $0x30, -0x10(%rbp)
jb 0x7b62
cmpq $0x39, -0x10(%rbp)
ja 0x7b62
movq -0x10(%rbp), %rax
movb %al, -0x1(%rbp)
jmp 0x820c
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
subq $0x20, %rax
je 0x8127
jmp 0x7b76
movq -0x18(%rbp), %rax
subq $0x27, %rax
je 0x8202
jmp 0x7b86
movq -0x18(%rbp), %rax
subq $0x2c, %rax
je 0x81d2
jmp 0x7b96
movq -0x18(%rbp), %rax
subq $0x2d, %rax
je 0x81d8
jmp 0x7ba6
movq -0x18(%rbp), %rax
subq $0x2e, %rax
je 0x81de
jmp 0x7bb6
movq -0x18(%rbp), %rax
subq $0x2f, %rax
je 0x81e4
jmp 0x7bc6
movq -0x18(%rbp), %rax
subq $0x3b, %rax
je 0x81c6
jmp 0x7bd6
movq -0x18(%rbp), %rax
subq $0x3d, %rax
je 0x81cc
jmp 0x7be6
movq -0x18(%rbp), %rax
subq $0x5b, %rax
je 0x81f0
jmp 0x7bf6
movq -0x18(%rbp), %rax
subq $0x5c, %rax
je 0x81f6
jmp 0x7c06
movq -0x18(%rbp), %rax
subq $0x5d, %rax
je 0x81fc
jmp 0x7c16
movq -0x18(%rbp), %rax
subq $0x60, %rax
je 0x81ea
jmp 0x7c26
movq -0x18(%rbp), %rax
subq $0xff08, %rax           # imm = 0xFF08
je 0x80f1
jmp 0x7c38
movq -0x18(%rbp), %rax
subq $0xff09, %rax           # imm = 0xFF09
je 0x80fa
jmp 0x7c4a
movq -0x18(%rbp), %rax
subq $0xff0d, %rax           # imm = 0xFF0D
je 0x8103
jmp 0x7c5c
movq -0x18(%rbp), %rax
subq $0xff13, %rax           # imm = 0xFF13
je 0x810c
jmp 0x7c6e
movq -0x18(%rbp), %rax
subq $0xff14, %rax           # imm = 0xFF14
je 0x819c
jmp 0x7c80
movq -0x18(%rbp), %rax
subq $0xff1b, %rax           # imm = 0xFF1B
je 0x811e
jmp 0x7c92
movq -0x18(%rbp), %rax
subq $0xff50, %rax           # imm = 0xFF50
je 0x814b
jmp 0x7ca4
movq -0x18(%rbp), %rax
subq $0xff51, %rax           # imm = 0xFF51
je 0x8154
jmp 0x7cb6
movq -0x18(%rbp), %rax
subq $0xff52, %rax           # imm = 0xFF52
je 0x815d
jmp 0x7cc8
movq -0x18(%rbp), %rax
subq $0xff53, %rax           # imm = 0xFF53
je 0x8166
jmp 0x7cda
movq -0x18(%rbp), %rax
subq $0xff54, %rax           # imm = 0xFF54
je 0x816f
jmp 0x7cec
movq -0x18(%rbp), %rax
subq $0xff55, %rax           # imm = 0xFF55
je 0x8130
jmp 0x7cfe
movq -0x18(%rbp), %rax
subq $0xff56, %rax           # imm = 0xFF56
je 0x8139
jmp 0x7d10
movq -0x18(%rbp), %rax
subq $0xff57, %rax           # imm = 0xFF57
je 0x8142
jmp 0x7d22
movq -0x18(%rbp), %rax
subq $0xff63, %rax           # imm = 0xFF63
je 0x8178
jmp 0x7d34
movq -0x18(%rbp), %rax
subq $0xff7f, %rax           # imm = 0xFF7F
je 0x8196
jmp 0x7d46
movq -0x18(%rbp), %rax
subq $0xff8d, %rax           # imm = 0xFF8D
je 0x807c
jmp 0x7d58
movq -0x18(%rbp), %rax
subq $0xffaa, %rax           # imm = 0xFFAA
je 0x804f
jmp 0x7d6a
movq -0x18(%rbp), %rax
subq $0xffab, %rax           # imm = 0xFFAB
je 0x8061
jmp 0x7d7c
movq -0x18(%rbp), %rax
subq $0xffad, %rax           # imm = 0xFFAD
je 0x806a
jmp 0x7d8e
movq -0x18(%rbp), %rax
subq $0xffae, %rax           # imm = 0xFFAE
je 0x8073
jmp 0x7da0
movq -0x18(%rbp), %rax
subq $0xffaf, %rax           # imm = 0xFFAF
je 0x8058
jmp 0x7db2
movq -0x18(%rbp), %rax
subq $0xffb0, %rax           # imm = 0xFFB0
je 0x7ff5
jmp 0x7dc4
movq -0x18(%rbp), %rax
subq $0xffb1, %rax           # imm = 0xFFB1
je 0x7ffe
jmp 0x7dd6
movq -0x18(%rbp), %rax
subq $0xffb2, %rax           # imm = 0xFFB2
je 0x8007
jmp 0x7de8
movq -0x18(%rbp), %rax
subq $0xffb3, %rax           # imm = 0xFFB3
je 0x8010
jmp 0x7dfa
movq -0x18(%rbp), %rax
subq $0xffb4, %rax           # imm = 0xFFB4
je 0x8019
jmp 0x7e0c
movq -0x18(%rbp), %rax
subq $0xffb5, %rax           # imm = 0xFFB5
je 0x8022
jmp 0x7e1e
movq -0x18(%rbp), %rax
subq $0xffb6, %rax           # imm = 0xFFB6
je 0x802b
jmp 0x7e30
movq -0x18(%rbp), %rax
subq $0xffb7, %rax           # imm = 0xFFB7
je 0x8034
jmp 0x7e42
movq -0x18(%rbp), %rax
subq $0xffb8, %rax           # imm = 0xFFB8
je 0x803d
jmp 0x7e54
movq -0x18(%rbp), %rax
subq $0xffb9, %rax           # imm = 0xFFB9
je 0x8046
jmp 0x7e66
movq -0x18(%rbp), %rax
subq $0xffbe, %rax           # imm = 0xFFBE
je 0x8085
jmp 0x7e78
movq -0x18(%rbp), %rax
subq $0xffbf, %rax           # imm = 0xFFBF
je 0x808e
jmp 0x7e8a
movq -0x18(%rbp), %rax
subq $0xffc0, %rax           # imm = 0xFFC0
je 0x8097
jmp 0x7e9c
movq -0x18(%rbp), %rax
subq $0xffc1, %rax           # imm = 0xFFC1
je 0x80a0
jmp 0x7eae
movq -0x18(%rbp), %rax
subq $0xffc2, %rax           # imm = 0xFFC2
je 0x80a9
jmp 0x7ec0
movq -0x18(%rbp), %rax
subq $0xffc3, %rax           # imm = 0xFFC3
je 0x80b2
jmp 0x7ed2
movq -0x18(%rbp), %rax
subq $0xffc4, %rax           # imm = 0xFFC4
je 0x80bb
jmp 0x7ee4
movq -0x18(%rbp), %rax
subq $0xffc5, %rax           # imm = 0xFFC5
je 0x80c4
jmp 0x7ef6
movq -0x18(%rbp), %rax
subq $0xffc6, %rax           # imm = 0xFFC6
je 0x80cd
jmp 0x7f08
movq -0x18(%rbp), %rax
subq $0xffc7, %rax           # imm = 0xFFC7
je 0x80d6
jmp 0x7f1a
movq -0x18(%rbp), %rax
subq $0xffc8, %rax           # imm = 0xFFC8
je 0x80df
jmp 0x7f2c
movq -0x18(%rbp), %rax
subq $0xffc9, %rax           # imm = 0xFFC9
je 0x80e8
jmp 0x7f3e
movq -0x18(%rbp), %rax
subq $0xffe1, %rax           # imm = 0xFFE1
je 0x81a2
jmp 0x7f50
movq -0x18(%rbp), %rax
subq $0xffe2, %rax           # imm = 0xFFE2
je 0x81a8
jmp 0x7f62
movq -0x18(%rbp), %rax
subq $0xffe3, %rax           # imm = 0xFFE3
je 0x81ae
jmp 0x7f74
movq -0x18(%rbp), %rax
subq $0xffe4, %rax           # imm = 0xFFE4
je 0x81b4
jmp 0x7f86
movq -0x18(%rbp), %rax
subq $0xffe5, %rax           # imm = 0xFFE5
je 0x8115
jmp 0x7f98
movq -0x18(%rbp), %rax
subq $0xffe7, %rax           # imm = 0xFFE7
je 0x818a
jmp 0x7faa
movq -0x18(%rbp), %rax
subq $0xffe8, %rax           # imm = 0xFFE8
je 0x8190
jmp 0x7fbc
movq -0x18(%rbp), %rax
subq $0xffe9, %rax           # imm = 0xFFE9
je 0x81ba
jmp 0x7fce
movq -0x18(%rbp), %rax
subq $0xffea, %rax           # imm = 0xFFEA
je 0x81c0
jmp 0x7fe0
movq -0x18(%rbp), %rax
subq $0xffff, %rax           # imm = 0xFFFF
je 0x8181
jmp 0x8208
movb $-0x80, -0x1(%rbp)
jmp 0x820c
movb $-0x7f, -0x1(%rbp)
jmp 0x820c
movb $-0x7e, -0x1(%rbp)
jmp 0x820c
movb $-0x7d, -0x1(%rbp)
jmp 0x820c
movb $-0x7c, -0x1(%rbp)
jmp 0x820c
movb $-0x7b, -0x1(%rbp)
jmp 0x820c
movb $-0x7a, -0x1(%rbp)
jmp 0x820c
movb $-0x79, -0x1(%rbp)
jmp 0x820c
movb $-0x78, -0x1(%rbp)
jmp 0x820c
movb $-0x77, -0x1(%rbp)
jmp 0x820c
movb $-0x76, -0x1(%rbp)
jmp 0x820c
movb $-0x71, -0x1(%rbp)
jmp 0x820c
movb $-0x75, -0x1(%rbp)
jmp 0x820c
movb $-0x73, -0x1(%rbp)
jmp 0x820c
movb $-0x72, -0x1(%rbp)
jmp 0x820c
movb $-0x74, -0x1(%rbp)
jmp 0x820c
movb $-0x70, -0x1(%rbp)
jmp 0x820c
movb $-0x6f, -0x1(%rbp)
jmp 0x820c
movb $-0x6e, -0x1(%rbp)
jmp 0x820c
movb $-0x6d, -0x1(%rbp)
jmp 0x820c
movb $-0x6c, -0x1(%rbp)
jmp 0x820c
movb $-0x6b, -0x1(%rbp)
jmp 0x820c
movb $-0x6a, -0x1(%rbp)
jmp 0x820c
movb $-0x69, -0x1(%rbp)
jmp 0x820c
movb $-0x68, -0x1(%rbp)
jmp 0x820c
movb $-0x67, -0x1(%rbp)
jmp 0x820c
movb $-0x66, -0x1(%rbp)
jmp 0x820c
movb $-0x65, -0x1(%rbp)
jmp 0x820c
movb $-0x64, -0x1(%rbp)
jmp 0x820c
movb $-0x63, -0x1(%rbp)
jmp 0x820c
movb $-0x62, -0x1(%rbp)
jmp 0x820c
movb $-0x5e, -0x1(%rbp)
jmp 0x820c
movb $-0x5d, -0x1(%rbp)
jmp 0x820c
movb $-0x5c, -0x1(%rbp)
jmp 0x820c
movb $-0x5b, -0x1(%rbp)
jmp 0x820c
movb $-0x5a, -0x1(%rbp)
jmp 0x820c
movb $-0x59, -0x1(%rbp)
jmp 0x820c
movb $-0x58, -0x1(%rbp)
jmp 0x820c
movb $-0x57, -0x1(%rbp)
jmp 0x820c
movb $-0x56, -0x1(%rbp)
jmp 0x820c
movb $-0x55, -0x1(%rbp)
jmp 0x820c
movb $-0x54, -0x1(%rbp)
jmp 0x820c
movb $-0x53, -0x1(%rbp)
jmp 0x820c
movb $-0x52, -0x1(%rbp)
jmp 0x820c
movb $-0x51, -0x1(%rbp)
jmp 0x820c
movb $-0x50, -0x1(%rbp)
jmp 0x820c
movb $-0x4f, -0x1(%rbp)
jmp 0x820c
movb $-0x4e, -0x1(%rbp)
jmp 0x820c
movb $-0x4d, -0x1(%rbp)
jmp 0x820c
movb $-0x4c, -0x1(%rbp)
jmp 0x820c
movb $-0x4b, -0x1(%rbp)
jmp 0x820c
movb $-0x4a, -0x1(%rbp)
jmp 0x820c
movb $-0x49, -0x1(%rbp)
jmp 0x820c
movb $-0x48, -0x1(%rbp)
jmp 0x820c
movb $-0x47, -0x1(%rbp)
jmp 0x820c
movb $-0x46, -0x1(%rbp)
jmp 0x820c
movb $-0x45, -0x1(%rbp)
jmp 0x820c
movb $-0x44, -0x1(%rbp)
jmp 0x820c
movb $-0x43, -0x1(%rbp)
jmp 0x820c
movb $-0x42, -0x1(%rbp)
jmp 0x820c
movb $-0x41, -0x1(%rbp)
jmp 0x820c
movb $-0x40, -0x1(%rbp)
jmp 0x820c
movb $-0x3f, -0x1(%rbp)
jmp 0x820c
movb $-0x3e, -0x1(%rbp)
jmp 0x820c
movb $-0x3d, -0x1(%rbp)
jmp 0x820c
movb $-0x3c, -0x1(%rbp)
jmp 0x820c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)