// File: /workspace/github_c_makefile_star2_O2/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xlib_handle_event
NK_API int
nk_xlib_handle_event(Display *dpy, int screen, Window win, XEvent *evt)
{
    struct nk_context *ctx = &xlib.ctx;

    /* optional grabbing behavior */
    if (ctx->input.mouse.grab) {
        XDefineCursor(xlib.dpy, xlib.root, xlib.cursor);
        ctx->input.mouse.grab = 0;
    } else if (ctx->input.mouse.ungrab) {
        XWarpPointer(xlib.dpy, None, xlib.root, 0, 0, 0, 0,
            (int)ctx->input.mouse.prev.x, (int)ctx->input.mouse.prev.y);
        XUndefineCursor(xlib.dpy, xlib.root);
        ctx->input.mouse.ungrab = 0;
    }

    if (evt->type == KeyPress || evt->type == KeyRelease)
    {
        /* Key handler */
        int ret, down = (evt->type == KeyPress);
        KeySym *code = XGetKeyboardMapping(xlib.surf->dpy, (KeyCode)evt->xkey.keycode, 1, &ret);
        if (*code == XK_Shift_L || *code == XK_Shift_R) nk_input_key(ctx, NK_KEY_SHIFT, down);
        else if (*code == XK_Delete)    nk_input_key(ctx, NK_KEY_DEL, down);
        else if (*code == XK_Return)    nk_input_key(ctx, NK_KEY_ENTER, down);
        else if (*code == XK_Tab)       nk_input_key(ctx, NK_KEY_TAB, down);
        else if (*code == XK_Left)      nk_input_key(ctx, NK_KEY_LEFT, down);
        else if (*code == XK_Right)     nk_input_key(ctx, NK_KEY_RIGHT, down);
        else if (*code == XK_Up)        nk_input_key(ctx, NK_KEY_UP, down);
        else if (*code == XK_Down)      nk_input_key(ctx, NK_KEY_DOWN, down);
        else if (*code == XK_BackSpace) nk_input_key(ctx, NK_KEY_BACKSPACE, down);
        else if (*code == XK_Escape)    nk_input_key(ctx, NK_KEY_TEXT_RESET_MODE, down);
        else if (*code == XK_Page_Up)   nk_input_key(ctx, NK_KEY_SCROLL_UP, down);
        else if (*code == XK_Page_Down) nk_input_key(ctx, NK_KEY_SCROLL_DOWN, down);
        else if (*code == XK_Home) {
            nk_input_key(ctx, NK_KEY_TEXT_START, down);
            nk_input_key(ctx, NK_KEY_SCROLL_START, down);
        } else if (*code == XK_End) {
            nk_input_key(ctx, NK_KEY_TEXT_END, down);
            nk_input_key(ctx, NK_KEY_SCROLL_END, down);
        } else {
            if (*code == 'c' && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_COPY, down);
            else if (*code == 'v' && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_PASTE, down);
            else if (*code == 'x' && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_CUT, down);
            else if (*code == 'z' && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_TEXT_UNDO, down);
            else if (*code == 'r' && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_TEXT_REDO, down);
            else if (*code == XK_Left && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_TEXT_WORD_LEFT, down);
            else if (*code == XK_Right && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_TEXT_WORD_RIGHT, down);
            else if (*code == 'b' && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_TEXT_LINE_START, down);
            else if (*code == 'e' && (evt->xkey.state & ControlMask))
                nk_input_key(ctx, NK_KEY_TEXT_LINE_END, down);
            else {
                if (*code == 'i')
                    nk_input_key(ctx, NK_KEY_TEXT_INSERT_MODE, down);
                else if (*code == 'r')
                    nk_input_key(ctx, NK_KEY_TEXT_REPLACE_MODE, down);
                if (down) {
                    char buf[32];
                    KeySym keysym = 0;
                    if (XLookupString((XKeyEvent*)evt, buf, 32, &keysym, NULL) != NoSymbol)
                        nk_input_glyph(ctx, buf);
                }
            }
        }
        XFree(code);
        return 1;
    } else if (evt->type == ButtonPress || evt->type == ButtonRelease) {
        /* Button handler */
        int down = (evt->type == ButtonPress);
        const int x = evt->xbutton.x, y = evt->xbutton.y;
        if (evt->xbutton.button == Button1) {
            if (down) { /* Double-Click Button handler */
                long dt = nk_timestamp() - xlib.last_button_click;
                if (dt > NK_X11_DOUBLE_CLICK_LO && dt < NK_X11_DOUBLE_CLICK_HI)
                    nk_input_button(ctx, NK_BUTTON_DOUBLE, x, y, nk_true);
                xlib.last_button_click = nk_timestamp();
            } else nk_input_button(ctx, NK_BUTTON_DOUBLE, x, y, nk_false);
            nk_input_button(ctx, NK_BUTTON_LEFT, x, y, down);
        } else if (evt->xbutton.button == Button2)
            nk_input_button(ctx, NK_BUTTON_MIDDLE, x, y, down);
        else if (evt->xbutton.button == Button3)
            nk_input_button(ctx, NK_BUTTON_RIGHT, x, y, down);
        else if (evt->xbutton.button == Button4)
            nk_input_scroll(ctx, nk_vec2(0, 1.0f));
        else if (evt->xbutton.button == Button5)
            nk_input_scroll(ctx, nk_vec2(0, -1.0f));
        else return 0;
        return 1;
    } else if (evt->type == MotionNotify) {
        /* Mouse motion handler */
        const int x = evt->xmotion.x, y = evt->xmotion.y;
        nk_input_motion(ctx, x, y);
        if (ctx->input.mouse.grabbed) {
            ctx->input.mouse.pos.x = ctx->input.mouse.prev.x;
            ctx->input.mouse.pos.y = ctx->input.mouse.prev.y;
            XWarpPointer(xlib.dpy, None, xlib.surf->root, 0, 0, 0, 0, (int)ctx->input.mouse.pos.x, (int)ctx->input.mouse.pos.y);
        }
        return 1;
    } else if (evt->type == Expose || evt->type == ConfigureNotify) {
        /* Window resize handler */
        unsigned int width, height;
        XWindowAttributes attr;
        XGetWindowAttributes(dpy, win, &attr);
        width = (unsigned int)attr.width;
        height = (unsigned int)attr.height;
        nk_xsurf_resize(xlib.surf, width, height);
        return 1;
    } else if (evt->type == KeymapNotify) {
        XRefreshKeyboardMapping(&evt->xmapping);
        return 1;
    } else if (evt->type == SelectionClear) {
        free(xlib.clipboard_data);
        xlib.clipboard_data = NULL;
        xlib.clipboard_len = 0;
        return 1;
    } else if (evt->type == SelectionRequest) {
        XEvent reply;
        reply.xselection.type = SelectionNotify;
        reply.xselection.requestor = evt->xselectionrequest.requestor;
        reply.xselection.selection = evt->xselectionrequest.selection;
        reply.xselection.target = evt->xselectionrequest.target;
        reply.xselection.property = None; /* Default refuse */
        reply.xselection.time = evt->xselectionrequest.time;

        if (reply.xselection.target == xlib.xa_targets) {
            Atom target_list[4];
            target_list[0] = xlib.xa_targets;
            target_list[1] = xlib.xa_text;
            target_list[2] = xlib.xa_utf8_string;
            target_list[3] = XA_STRING;

            reply.xselection.property = evt->xselectionrequest.property;
            XChangeProperty(evt->xselection.display,evt->xselectionrequest.requestor,
                reply.xselection.property, XA_ATOM, 32, PropModeReplace,
                (unsigned char*)&target_list, 4);
        } else if (xlib.clipboard_data && (reply.xselection.target == xlib.xa_text ||
            reply.xselection.target == xlib.xa_utf8_string || reply.xselection.target == XA_STRING)) {
            reply.xselection.property = evt->xselectionrequest.property;
            XChangeProperty(evt->xselection.display,evt->xselectionrequest.requestor,
                reply.xselection.property, reply.xselection.target, 8, PropModeReplace,
                (unsigned char*)xlib.clipboard_data, xlib.clipboard_len);
        }
        XSendEvent(evt->xselection.display, evt->xselectionrequest.requestor, True, 0, &reply);
        XFlush(evt->xselection.display);
        return 1;
    } else if (evt->type == SelectionNotify && xlib.clipboard_target) {
        if ((evt->xselection.target != XA_STRING) &&
            (evt->xselection.target != xlib.xa_utf8_string) &&
            (evt->xselection.target != xlib.xa_text))
            return 1;

        {Atom actual_type;
        int actual_format;
        unsigned long pos = 0, len, remain;
        unsigned char* data = 0;
        do {
            XGetWindowProperty(dpy, win, XA_PRIMARY, (int)pos, 1024, False,
                AnyPropertyType, &actual_type, &actual_format, &len, &remain, &data);
            if (len && data)
                nk_textedit_text(xlib.clipboard_target, (char*)data, (int)len);
            if (data != 0) XFree(data);
            pos += (len * (unsigned long)actual_format) / 32;
        } while (remain != 0);}
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %r12
cmpb $0x0, 0x1a63b(%rip)     # 0x37774
je 0x1d15e
movq 0x1e4de(%rip), %rdi     # 0x3b620
movq 0x1e4df(%rip), %rsi     # 0x3b628
movq 0x1e4c8(%rip), %rdx     # 0x3b618
callq 0x3460
movb $0x0, 0x1a618(%rip)     # 0x37774
jmp 0x1d1c2
cmpb $0x0, 0x1a611(%rip)     # 0x37776
je 0x1d1c2
movq 0x1e4b2(%rip), %rdi     # 0x3b620
cvttss2si 0x1a5e6(%rip), %eax # 0x3775c
movq 0x1e4ab(%rip), %rdx     # 0x3b628
cvttss2si 0x1a5db(%rip), %ecx # 0x37760
subq $0x20, %rsp
andl $0x0, (%rsp)
movl %ecx, 0x10(%rsp)
movl %eax, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x33d0
addq $0x20, %rsp
movq 0x1e471(%rip), %rdi     # 0x3b620
movq 0x1e472(%rip), %rsi     # 0x3b628
callq 0x34b0
movb $0x0, 0x1a5b4(%rip)     # 0x37776
movl (%r15), %r13d
leal -0x2(%r13), %eax
cmpl $0xa, %eax
ja 0x1d2a4
leaq 0x74ab(%rip), %rcx      # 0x24684
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %ebp, %ebp
cmpl $0x2, %r13d
sete %bpl
movq 0x1e41d(%rip), %rax     # 0x3b610
movq 0x8(%rax), %rdi
movzbl 0x54(%r15), %esi
pushq $0x1
popq %rbx
leaq 0x18(%rsp), %rcx
movl %ebx, %edx
callq 0x3520
movq %rax, %r14
movq (%rax), %rax
leaq -0xff50(%rax), %rcx
cmpq $0x7, %rcx
jbe 0x1d5ef
leaq -0x62(%rax), %rcx
cmpq $0x7, %rcx
jbe 0x1d699
leaq -0x72(%rax), %rcx
cmpq $0x8, %rcx
jbe 0x1d6cd
leaq -0xffe1(%rax), %rcx
cmpq $0x2, %rcx
jb 0x1d7d2
cmpq $0xff08, %rax           # imm = 0xFF08
je 0x1d9fe
cmpq $0xff09, %rax           # imm = 0xFF09
je 0x1d9bc
cmpq $0xff0d, %rax           # imm = 0xFF0D
je 0x1d9e8
cmpq $0xff1b, %rax           # imm = 0xFF1B
je 0x1d9d2
cmpq $0xffff, %rax           # imm = 0xFFFF
jne 0x1d8b5
cmpl %ebp, 0x1a397(%rip)     # 0x37628
je 0x1d299
incl 0x1a393(%rip)           # 0x3762c
movl %ebp, 0x1a389(%rip)     # 0x37628
jmp 0x1da3e
cmpl $0x16, %r13d
je 0x1d3df
cmpl $0x1d, %r13d
je 0x1d5cf
cmpl $0x1e, %r13d
jne 0x1d45f
movl $0x1f, 0x50(%rsp)
movdqu 0x28(%r15), %xmm0
movdqu %xmm0, 0x70(%rsp)
movq 0x38(%r15), %rcx
movq %rcx, 0x80(%rsp)
andq $0x0, 0x88(%rsp)
movq 0x48(%r15), %rax
movq %rax, 0x90(%rsp)
cmpq 0x1a2fa(%rip), %rcx     # 0x375f8
jne 0x1d62c
leaq 0x30(%rsp), %rax
movq %rcx, (%rax)
movups 0x1a2ed(%rip), %xmm1    # 0x37600
movups %xmm1, 0x8(%rax)
movq $0x1f, 0x18(%rax)
movq 0x40(%r15), %rdx
movq %rdx, 0x88(%rsp)
movq 0x18(%r15), %rdi
movq %xmm0, %rsi
pushq $0x4
popq %rcx
pushq $0x20
popq %r8
xorl %r9d, %r9d
pushq $0x4
jmp 0x1d66a
xorl %ebx, %ebx
cmpl $0x4, %r13d
sete %cl
movl 0x54(%r15), %eax
decl %eax
cmpl $0x4, %eax
ja 0x1d783
movb %cl, %bl
movsd 0x40(%r15), %xmm1
leaq 0x7344(%rip), %rcx      # 0x246b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x4, %r13d
jne 0x1d78a
movaps %xmm1, 0x20(%rsp)
callq 0x1da5a
movq 0x1e2a0(%rip), %rcx     # 0x3b630
negq %rcx
addq %rcx, %rax
addq $-0xc8, %rax
cmpq $-0xb3, %rax
jb 0x1d3c9
cmpl $0x1, 0x1a399(%rip)     # 0x37744
je 0x1d3c9
cvtdq2ps 0x20(%rsp), %xmm0
movlps %xmm0, 0x1a393(%rip)    # 0x3774c
movl $0x1, 0x1a381(%rip)     # 0x37744
incl 0x1a37f(%rip)           # 0x37748
callq 0x1da5a
movq %rax, 0x1e25b(%rip)     # 0x3b630
movaps 0x20(%rsp), %xmm1
jmp 0x1d7aa
leaq 0x50(%rsp), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x34d0
movq 0x1e21a(%rip), %r14     # 0x3b610
testq %r14, %r14
je 0x1d758
movl 0x58(%rsp), %ebx
movl 0x5c(%rsp), %ebp
cmpl %ebx, 0x28(%r14)
jne 0x1d417
cmpl %ebp, 0x2c(%r14)
je 0x1d758
movl %ebx, 0x28(%r14)
movl %ebp, 0x2c(%r14)
movq 0x20(%r14), %rsi
testq %rsi, %rsi
je 0x1d431
movq 0x8(%r14), %rdi
callq 0x3510
movq 0x8(%r14), %rdi
movq 0x18(%r14), %rsi
movq 0xe8(%rdi), %rax
movslq 0x10(%r14), %rcx
shlq $0x7, %rcx
movl 0x38(%rax,%rcx), %r8d
movl %ebx, %edx
movl %ebp, %ecx
callq 0x3550
movq %rax, 0x20(%r14)
jmp 0x1d758
xorl %ebx, %ebx
cmpl $0x1f, %r13d
jne 0x1da46
cmpq $0x0, 0x1a175(%rip)     # 0x375e8
je 0x1da46
movq 0x30(%r15), %rax
pushq $0x1
popq %rbx
cmpq $0x1f, %rax
je 0x1d49c
cmpq 0x1a17b(%rip), %rax     # 0x37608
je 0x1d49c
cmpq 0x1a16a(%rip), %rax     # 0x37600
jne 0x1da46
leaq 0x8(%rsp), %rax
andq $0x0, (%rax)
xorl %ebp, %ebp
leaq 0x14(%rsp), %rbx
leaq 0x50(%rsp), %r13
pushq $0x1
popq %r15
movslq %ebp, %rcx
movl $0x400, %r8d            # imm = 0x400
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %r9d, %r9d
leaq 0x8(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
pushq %rbx
pushq %r13
pushq $0x0
callq 0x3160
addq $0x30, %rsp
movq 0x30(%rsp), %rdx
testq %rdx, %rdx
setne %al
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1d518
movq 0x1a0da(%rip), %rdi     # 0x375e8
callq 0x16163
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x1d525
movq %rsi, %rdi
callq 0x3040
movslq 0x14(%rsp), %rax
imulq 0x30(%rsp), %rax
shrq $0x5, %rax
addq %rax, %rbp
cmpq $0x0, 0x18(%rsp)
jne 0x1d4b5
jmp 0x1d758
movq %r15, %rdi
callq 0x30b0
jmp 0x1d758
movl 0x40(%r15), %esi
movl 0x44(%r15), %edx
leaq 0x1a0ac(%rip), %rdi     # 0x37610
callq 0x7981
pushq $0x1
popq %rbx
cmpb $0x0, 0x1a202(%rip)     # 0x37775
je 0x1da46
movsd 0x1a1db(%rip), %xmm0    # 0x3775c
movsd %xmm0, 0x1a1cb(%rip)    # 0x37754
movq 0x1e090(%rip), %rdi     # 0x3b620
movq 0x1e079(%rip), %rax     # 0x3b610
cvttss2si %xmm0, %ecx
movq 0x18(%rax), %rdx
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %eax
subq $0x20, %rsp
andl $0x0, (%rsp)
movl %eax, 0x10(%rsp)
movl %ecx, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x33d0
addq $0x20, %rsp
jmp 0x1da46
movq 0x1a002(%rip), %rdi     # 0x375d8
callq 0x3200
andq $0x0, 0x19ff5(%rip)     # 0x375d8
andl $0x0, 0x19ff6(%rip)     # 0x375e0
jmp 0x1d758
leaq 0x7112(%rip), %rax      # 0x24708
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl %ebp, 0x1a0a3(%rip)     # 0x376a8
je 0x1d60d
incl 0x1a09f(%rip)           # 0x376ac
movl %ebp, 0x1a095(%rip)     # 0x376a8
cmpl %ebp, 0x1a0c7(%rip)     # 0x376e0
je 0x1d621
incl 0x1a0c3(%rip)           # 0x376e4
movl %ebp, 0x1a0b9(%rip)     # 0x376e0
jmp 0x1da3e
movq 0x19fa5(%rip), %rax     # 0x375d8
testq %rax, %rax
je 0x1d672
cmpq 0x19fc1(%rip), %rcx     # 0x37600
jne 0x1d7eb
movq 0x40(%r15), %rdx
movq %rdx, 0x88(%rsp)
movq 0x18(%r15), %rdi
movl 0x19f84(%rip), %r10d    # 0x375e0
movq %xmm0, %rsi
pushq $0x8
popq %r8
xorl %r9d, %r9d
pushq %r10
pushq %rax
callq 0x3500
popq %rcx
popq %rdx
movq 0x18(%r15), %rdi
movq 0x28(%r15), %rsi
pushq $0x1
popq %rbx
leaq 0x50(%rsp), %r8
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x33c0
movq 0x18(%r15), %rdi
callq 0x3390
jmp 0x1da46
leaq 0x7024(%rip), %rax      # 0x246c4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testb $0x4, 0x50(%r15)
je 0x1d8b5
cmpl %ebp, 0x19fde(%rip)     # 0x37698
je 0x1d6c2
incl 0x19fda(%rip)           # 0x3769c
movl %ebp, 0x19fd0(%rip)     # 0x37698
jmp 0x1da3e
leaq 0x7010(%rip), %rax      # 0x246e4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testb $0x4, 0x50(%r15)
jne 0x1da14
leaq 0x19f99(%rip), %rax     # 0x37688
cmpl %ebp, 0x19f93(%rip)     # 0x37688
je 0x1d81f
leaq 0x19f8a(%rip), %rcx     # 0x3768c
jmp 0x1d81d
movsd 0x1a05d(%rip), %xmm0    # 0x3776c
addps 0x6b9a(%rip), %xmm0     # 0x242b0
jmp 0x1d751
pushq $0x1
popq %rax
cmpl %ebx, 0x1a013(%rip)     # 0x37734
je 0x1d7cb
cvtdq2ps %xmm1, %xmm0
movlps %xmm0, 0x1a00b(%rip)    # 0x3773c
movl %ebx, 0x19ffd(%rip)     # 0x37734
incl 0x19ffb(%rip)           # 0x37738
jmp 0x1d7cb
movsd 0x1a022(%rip), %xmm0    # 0x3776c
addps 0x6b6f(%rip), %xmm0     # 0x242c0
movlps %xmm0, 0x1a014(%rip)    # 0x3776c
pushq $0x1
popq %rbx
jmp 0x1da46
pushq $0x1
popq %rax
cmpl %ebx, 0x19fbb(%rip)     # 0x37724
je 0x1d7cb
cvtdq2ps %xmm1, %xmm0
movlps %xmm0, 0x19fb7(%rip)    # 0x3772c
movl %ebx, 0x19fa9(%rip)     # 0x37724
incl 0x19fa7(%rip)           # 0x37728
jmp 0x1d7cb
xorl %ebx, %ebx
jmp 0x1da46
cmpl $0x0, 0x19fb3(%rip)     # 0x37744
je 0x1d7aa
cvtdq2ps %xmm1, %xmm0
movlps %xmm0, 0x19faf(%rip)    # 0x3774c
andl $0x0, 0x19fa0(%rip)     # 0x37744
incl 0x19f9e(%rip)           # 0x37748
pushq $0x1
popq %rax
cmpl %ebx, 0x19f61(%rip)     # 0x37714
je 0x1d7cb
cvtdq2ps %xmm1, %xmm0
movlps %xmm0, 0x19f5d(%rip)    # 0x3771c
movl %ebx, 0x19f4f(%rip)     # 0x37714
incl 0x19f4d(%rip)           # 0x37718
movl %eax, %ebx
jmp 0x1da46
cmpl %ebp, 0x19e40(%rip)     # 0x37618
je 0x1d7e0
incl 0x19e3c(%rip)           # 0x3761c
movl %ebp, 0x19e32(%rip)     # 0x37618
jmp 0x1da3e
cmpq $0x1f, %rcx
je 0x1d645
cmpq 0x19e0c(%rip), %rcx     # 0x37608
jne 0x1d672
jmp 0x1d645
leaq 0x19e72(%rip), %rax     # 0x37680
cmpl %ebp, 0x19e6c(%rip)     # 0x37680
je 0x1d81f
leaq 0x19e67(%rip), %rcx     # 0x37684
incl (%rcx)
movl %ebp, (%rax)
jmp 0x1d8b5
testb $0x4, 0x50(%r15)
je 0x1d8b5
cmpl %ebp, 0x19e11(%rip)     # 0x37648
je 0x1d83f
incl 0x19e0d(%rip)           # 0x3764c
movl %ebp, 0x19e03(%rip)     # 0x37648
jmp 0x1da3e
testb $0x4, 0x50(%r15)
je 0x1d8b5
cmpl %ebp, 0x19e49(%rip)     # 0x376a0
je 0x1d85f
incl 0x19e45(%rip)           # 0x376a4
movl %ebp, 0x19e3b(%rip)     # 0x376a0
jmp 0x1da3e
testb $0x4, 0x50(%r15)
je 0x1d8b5
cmpl %ebp, 0x19e41(%rip)     # 0x376b8
je 0x1d87f
incl 0x19e3d(%rip)           # 0x376bc
movl %ebp, 0x19e33(%rip)     # 0x376b8
jmp 0x1da3e
testb $0x4, 0x50(%r15)
je 0x1d8b5
cmpl %ebp, 0x19dc1(%rip)     # 0x37658
je 0x1d89f
incl 0x19dbd(%rip)           # 0x3765c
movl %ebp, 0x19db3(%rip)     # 0x37658
jmp 0x1da3e
testb $0x4, 0x50(%r15)
jne 0x1da2a
cmpl $0x2, %r13d
jne 0x1da3e
leaq 0x30(%rsp), %rcx
andq $0x0, (%rcx)
leaq 0x50(%rsp), %rsi
pushq $0x20
popq %rdx
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x30d0
testl %eax, %eax
je 0x1da3e
leaq 0x19d26(%rip), %rdi     # 0x37610
leaq 0x50(%rsp), %rsi
callq 0x7a93
jmp 0x1da3e
cmpl %ebp, 0x19d69(%rip)     # 0x37668
je 0x1d907
incl 0x19d65(%rip)           # 0x3766c
movl %ebp, 0x19d5b(%rip)     # 0x37668
jmp 0x1da3e
cmpl %ebp, 0x19d48(%rip)     # 0x37660
je 0x1d920
incl 0x19d44(%rip)           # 0x37664
movl %ebp, 0x19d3a(%rip)     # 0x37660
jmp 0x1da3e
cmpl %ebp, 0x19d47(%rip)     # 0x37678
je 0x1d939
incl 0x19d43(%rip)           # 0x3767c
movl %ebp, 0x19d39(%rip)     # 0x37678
jmp 0x1da3e
cmpl %ebp, 0x19d66(%rip)     # 0x376b0
je 0x1d952
incl 0x19d62(%rip)           # 0x376b4
movl %ebp, 0x19d58(%rip)     # 0x376b0
cmpl %ebp, 0x19d8a(%rip)     # 0x376e8
je 0x1d966
incl 0x19d86(%rip)           # 0x376ec
movl %ebp, 0x19d7c(%rip)     # 0x376e8
jmp 0x1da3e
cmpl %ebp, 0x19cf9(%rip)     # 0x37670
je 0x1d97f
incl 0x19cf5(%rip)           # 0x37674
movl %ebp, 0x19ceb(%rip)     # 0x37670
jmp 0x1da3e
cmpl %ebp, 0x19d68(%rip)     # 0x376f8
je 0x1d998
incl 0x19d64(%rip)           # 0x376fc
movl %ebp, 0x19d5a(%rip)     # 0x376f8
jmp 0x1da3e
cmpl %ebp, 0x19d47(%rip)     # 0x376f0
je 0x1d9b1
incl 0x19d43(%rip)           # 0x376f4
movl %ebp, 0x19d39(%rip)     # 0x376f0
jmp 0x1da3e
cmpl %ebp, 0x19c76(%rip)     # 0x37638
je 0x1d9ca
incl 0x19c72(%rip)           # 0x3763c
movl %ebp, 0x19c68(%rip)     # 0x37638
jmp 0x1da3e
cmpl %ebp, 0x19cb8(%rip)     # 0x37690
je 0x1d9e0
incl 0x19cb4(%rip)           # 0x37694
movl %ebp, 0x19caa(%rip)     # 0x37690
jmp 0x1da3e
cmpl %ebp, 0x19c42(%rip)     # 0x37630
je 0x1d9f6
incl 0x19c3e(%rip)           # 0x37634
movl %ebp, 0x19c34(%rip)     # 0x37630
jmp 0x1da3e
cmpl %ebp, 0x19c3c(%rip)     # 0x37640
je 0x1da0c
incl 0x19c38(%rip)           # 0x37644
movl %ebp, 0x19c2e(%rip)     # 0x37640
jmp 0x1da3e
cmpl %ebp, 0x19ca6(%rip)     # 0x376c0
je 0x1da22
incl 0x19ca2(%rip)           # 0x376c4
movl %ebp, 0x19c98(%rip)     # 0x376c0
jmp 0x1da3e
cmpl %ebp, 0x19c20(%rip)     # 0x37650
je 0x1da38
incl 0x19c1c(%rip)           # 0x37654
movl %ebp, 0x19c12(%rip)     # 0x37650
movq %r14, %rdi
callq 0x3040
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq