// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
leaq 0x23f94(%rip), %rax     # 0x546c8
addq $0x38, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpb $0x0, 0x164(%rax)
je 0x30770
movq 0x27fc0(%rip), %rdi     # 0x58710
movq 0x27fc1(%rip), %rsi     # 0x58718
movq 0x27faa(%rip), %rdx     # 0x58708
callq 0x3450
movq -0x40(%rbp), %rax
movb $0x0, 0x164(%rax)
jmp 0x307e6
movq -0x40(%rbp), %rax
cmpb $0x0, 0x166(%rax)
je 0x307e4
movq 0x27f8c(%rip), %rdi     # 0x58710
movq 0x27f8d(%rip), %rdx     # 0x58718
movq -0x40(%rbp), %rax
cvttss2si 0x14c(%rax), %r10d
movq -0x40(%rbp), %rax
cvttss2si 0x150(%rax), %eax
xorl %ecx, %ecx
movl %ecx, %esi
xorl %r9d, %r9d
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x33c0
movq 0x27f43(%rip), %rdi     # 0x58710
movq 0x27f44(%rip), %rsi     # 0x58718
callq 0x34a0
movq -0x40(%rbp), %rax
movb $0x0, 0x166(%rax)
jmp 0x307e6
movq -0x38(%rbp), %rax
cmpl $0x2, (%rax)
je 0x307fc
movq -0x38(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x30cb5
movq -0x38(%rbp), %rax
cmpl $0x2, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x48(%rbp)
movq 0x27eeb(%rip), %rax     # 0x58700
movq 0x8(%rax), %rdi
movq -0x38(%rbp), %rax
movl 0x54(%rax), %eax
movl $0x1, %edx
leaq -0x44(%rbp), %rcx
movzbl %al, %esi
callq 0x3510
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq $0xffe1, (%rax)         # imm = 0xFFE1
je 0x3084f
movq -0x50(%rbp), %rax
cmpq $0xffe2, (%rax)         # imm = 0xFFE2
jne 0x30865
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x1, %esi
callq 0xba40
jmp 0x30ca0
movq -0x50(%rbp), %rax
cmpq $0xffff, (%rax)         # imm = 0xFFFF
jne 0x30888
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x3, %esi
callq 0xba40
jmp 0x30c9e
movq -0x50(%rbp), %rax
cmpq $0xff0d, (%rax)         # imm = 0xFF0D
jne 0x308ab
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x4, %esi
callq 0xba40
jmp 0x30c9c
movq -0x50(%rbp), %rax
cmpq $0xff09, (%rax)         # imm = 0xFF09
jne 0x308ce
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x5, %esi
callq 0xba40
jmp 0x30c9a
movq -0x50(%rbp), %rax
cmpq $0xff51, (%rax)         # imm = 0xFF51
jne 0x308f1
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0xc, %esi
callq 0xba40
jmp 0x30c98
movq -0x50(%rbp), %rax
cmpq $0xff53, (%rax)         # imm = 0xFF53
jne 0x30914
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0xd, %esi
callq 0xba40
jmp 0x30c96
movq -0x50(%rbp), %rax
cmpq $0xff52, (%rax)         # imm = 0xFF52
jne 0x30937
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0xa, %esi
callq 0xba40
jmp 0x30c94
movq -0x50(%rbp), %rax
cmpq $0xff54, (%rax)         # imm = 0xFF54
jne 0x3095a
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0xb, %esi
callq 0xba40
jmp 0x30c92
movq -0x50(%rbp), %rax
cmpq $0xff08, (%rax)         # imm = 0xFF08
jne 0x3097d
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x6, %esi
callq 0xba40
jmp 0x30c90
movq -0x50(%rbp), %rax
cmpq $0xff1b, (%rax)         # imm = 0xFF1B
jne 0x309a0
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x10, %esi
callq 0xba40
jmp 0x30c8e
movq -0x50(%rbp), %rax
cmpq $0xff55, (%rax)         # imm = 0xFF55
jne 0x309c3
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x1d, %esi
callq 0xba40
jmp 0x30c8c
movq -0x50(%rbp), %rax
cmpq $0xff56, (%rax)         # imm = 0xFF56
jne 0x309e6
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x1c, %esi
callq 0xba40
jmp 0x30c8a
movq -0x50(%rbp), %rax
cmpq $0xff50, (%rax)         # imm = 0xFF50
jne 0x30a1a
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x13, %esi
callq 0xba40
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x1a, %esi
callq 0xba40
jmp 0x30c88
movq -0x50(%rbp), %rax
cmpq $0xff57, (%rax)         # imm = 0xFF57
jne 0x30a4e
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x14, %esi
callq 0xba40
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x1b, %esi
callq 0xba40
jmp 0x30c86
movq -0x50(%rbp), %rax
cmpq $0x63, (%rax)
jne 0x30a7d
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30a7d
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x7, %esi
callq 0xba40
jmp 0x30c84
movq -0x50(%rbp), %rax
cmpq $0x76, (%rax)
jne 0x30aac
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30aac
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x9, %esi
callq 0xba40
jmp 0x30c82
movq -0x50(%rbp), %rax
cmpq $0x78, (%rax)
jne 0x30adb
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30adb
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x8, %esi
callq 0xba40
jmp 0x30c80
movq -0x50(%rbp), %rax
cmpq $0x7a, (%rax)
jne 0x30b0a
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30b0a
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x15, %esi
callq 0xba40
jmp 0x30c7e
movq -0x50(%rbp), %rax
cmpq $0x72, (%rax)
jne 0x30b39
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30b39
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x16, %esi
callq 0xba40
jmp 0x30c7c
movq -0x50(%rbp), %rax
cmpq $0xff51, (%rax)         # imm = 0xFF51
jne 0x30b6b
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30b6b
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x18, %esi
callq 0xba40
jmp 0x30c7a
movq -0x50(%rbp), %rax
cmpq $0xff53, (%rax)         # imm = 0xFF53
jne 0x30b9d
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30b9d
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x19, %esi
callq 0xba40
jmp 0x30c78
movq -0x50(%rbp), %rax
cmpq $0x62, (%rax)
jne 0x30bcc
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30bcc
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x11, %esi
callq 0xba40
jmp 0x30c76
movq -0x50(%rbp), %rax
cmpq $0x65, (%rax)
jne 0x30bf8
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x30bf8
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0x12, %esi
callq 0xba40
jmp 0x30c74
movq -0x50(%rbp), %rax
cmpq $0x69, (%rax)
jne 0x30c15
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0xe, %esi
callq 0xba40
jmp 0x30c32
movq -0x50(%rbp), %rax
cmpq $0x72, (%rax)
jne 0x30c30
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %edx
movl $0xf, %esi
callq 0xba40
jmp 0x30c32
cmpl $0x0, -0x48(%rbp)
je 0x30c72
movq $0x0, -0x78(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0x20, %edx
leaq -0x78(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x30d0
cltq
cmpq $0x0, %rax
je 0x30c70
movq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xbc00
jmp 0x30c72
jmp 0x30c74
jmp 0x30c76
jmp 0x30c78
jmp 0x30c7a
jmp 0x30c7c
jmp 0x30c7e
jmp 0x30c80
jmp 0x30c82
jmp 0x30c84
jmp 0x30c86
jmp 0x30c88
jmp 0x30c8a
jmp 0x30c8c
jmp 0x30c8e
jmp 0x30c90
jmp 0x30c92
jmp 0x30c94
jmp 0x30c96
jmp 0x30c98
jmp 0x30c9a
jmp 0x30c9c
jmp 0x30c9e
jmp 0x30ca0
movq -0x50(%rbp), %rdi
callq 0x3040
movl $0x1, -0x14(%rbp)
jmp 0x3133d
movq -0x38(%rbp), %rax
cmpl $0x4, (%rax)
je 0x30ccb
movq -0x38(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x30e8e
movq -0x38(%rbp), %rax
cmpl $0x4, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x7c(%rbp)
movq -0x38(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x80(%rbp)
movq -0x38(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, -0x84(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x1, 0x54(%rax)
jne 0x30d94
cmpl $0x0, -0x7c(%rbp)
je 0x30d5d
callq 0x31350
subq 0x27a0c(%rip), %rax     # 0x58720
movq %rax, -0x90(%rbp)
cmpq $0x14, -0x90(%rbp)
jle 0x30d4f
cmpq $0xc8, -0x90(%rbp)
jge 0x30d4f
movq -0x40(%rbp), %rdi
movl -0x80(%rbp), %edx
movl -0x84(%rbp), %ecx
movl $0x3, %esi
movl $0x1, %r8d
callq 0xbac0
callq 0x31350
movq %rax, 0x279c5(%rip)     # 0x58720
jmp 0x30d77
movq -0x40(%rbp), %rdi
movl -0x80(%rbp), %edx
movl -0x84(%rbp), %ecx
movl $0x3, %esi
xorl %r8d, %r8d
callq 0xbac0
movq -0x40(%rbp), %rdi
movl -0x80(%rbp), %edx
movl -0x84(%rbp), %ecx
movl -0x7c(%rbp), %r8d
xorl %esi, %esi
callq 0xbac0
jmp 0x30e82
movq -0x38(%rbp), %rax
cmpl $0x2, 0x54(%rax)
jne 0x30dbe
movq -0x40(%rbp), %rdi
movl -0x80(%rbp), %edx
movl -0x84(%rbp), %ecx
movl -0x7c(%rbp), %r8d
movl $0x1, %esi
callq 0xbac0
jmp 0x30e80
movq -0x38(%rbp), %rax
cmpl $0x3, 0x54(%rax)
jne 0x30de8
movq -0x40(%rbp), %rdi
movl -0x80(%rbp), %edx
movl -0x84(%rbp), %ecx
movl -0x7c(%rbp), %r8d
movl $0x2, %esi
callq 0xbac0
jmp 0x30e7e
movq -0x38(%rbp), %rax
cmpl $0x4, 0x54(%rax)
jne 0x30e2b
movq -0x40(%rbp), %rax
movq %rax, -0x258(%rbp)
xorps %xmm0, %xmm0
movss 0x11200(%rip), %xmm1    # 0x42008
callq 0x38a0
movq -0x258(%rbp), %rdi
movlpd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
callq 0xbb80
jmp 0x30e7c
movq -0x38(%rbp), %rax
cmpl $0x5, 0x54(%rax)
jne 0x30e6e
movq -0x40(%rbp), %rax
movq %rax, -0x260(%rbp)
xorps %xmm0, %xmm0
movss 0x111cd(%rip), %xmm1    # 0x42018
callq 0x38a0
movq -0x260(%rbp), %rdi
movlpd %xmm0, -0xa0(%rbp)
movsd -0xa0(%rbp), %xmm0
callq 0xbb80
jmp 0x30e7a
movl $0x0, -0x14(%rbp)
jmp 0x3133d
jmp 0x30e7c
jmp 0x30e7e
jmp 0x30e80
jmp 0x30e82
movl $0x1, -0x14(%rbp)
jmp 0x3133d
movq -0x38(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x30f60
movq -0x38(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0xa4(%rbp)
movq -0x38(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, -0xa8(%rbp)
movq -0x40(%rbp), %rdi
movl -0xa4(%rbp), %esi
movl -0xa8(%rbp), %edx
callq 0xb980
movq -0x40(%rbp), %rax
cmpb $0x0, 0x165(%rax)
je 0x30f54
movq -0x40(%rbp), %rax
movss 0x14c(%rax), %xmm0
movq -0x40(%rbp), %rax
movss %xmm0, 0x144(%rax)
movq -0x40(%rbp), %rax
movss 0x150(%rax), %xmm0
movq -0x40(%rbp), %rax
movss %xmm0, 0x148(%rax)
movq 0x27802(%rip), %rdi     # 0x58710
movq 0x277eb(%rip), %rax     # 0x58700
movq 0x18(%rax), %rdx
movq -0x40(%rbp), %rax
cvttss2si 0x144(%rax), %r10d
movq -0x40(%rbp), %rax
cvttss2si 0x148(%rax), %eax
xorl %ecx, %ecx
movl %ecx, %esi
xorl %r9d, %r9d
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x33c0
movl $0x1, -0x14(%rbp)
jmp 0x3133d
movq -0x38(%rbp), %rax
cmpl $0xc, (%rax)
je 0x30f72
movq -0x38(%rbp), %rax
cmpl $0x16, (%rax)
jne 0x30fc2
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x138(%rbp), %rdx
callq 0x34c0
movl -0x130(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0x12c(%rbp), %eax
movl %eax, -0xb0(%rbp)
movq 0x2775b(%rip), %rdi     # 0x58700
movl -0xac(%rbp), %esi
movl -0xb0(%rbp), %edx
callq 0x313b0
movl $0x1, -0x14(%rbp)
jmp 0x3133d
movq -0x38(%rbp), %rax
cmpl $0xb, (%rax)
jne 0x30fe0
movq -0x38(%rbp), %rdi
callq 0x30b0
movl $0x1, -0x14(%rbp)
jmp 0x3133d
movq -0x38(%rbp), %rax
cmpl $0x1d, (%rax)
jne 0x31016
movq 0x236d8(%rip), %rdi     # 0x546c8
callq 0x31f0
movq $0x0, 0x236c8(%rip) # 0x546c8
movl $0x0, 0x236c6(%rip)     # 0x546d0
movl $0x1, -0x14(%rbp)
jmp 0x3133d
movq -0x38(%rbp), %rax
cmpl $0x1e, (%rax)
jne 0x311d2
movl $0x1f, -0x1f8(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x1d8(%rbp)
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x1d0(%rbp)
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x1c8(%rbp)
movq $0x0, -0x1c0(%rbp)
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1c8(%rbp), %rax
cmpq 0x23666(%rip), %rax     # 0x546e8
jne 0x3110e
movq 0x23659(%rip), %rax     # 0x546e8
movq %rax, -0x220(%rbp)
movq 0x23653(%rip), %rax     # 0x546f0
movq %rax, -0x218(%rbp)
movq 0x2364d(%rip), %rax     # 0x546f8
movq %rax, -0x210(%rbp)
movq $0x1f, -0x208(%rbp)
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x1c0(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x1c0(%rbp), %rdx
movl $0x4, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
leaq -0x220(%rbp), %rax
movq %rax, (%rsp)
movl $0x4, 0x8(%rsp)
callq 0x34f0
jmp 0x31194
cmpq $0x0, 0x235b2(%rip)     # 0x546c8
je 0x31192
movq -0x1c8(%rbp), %rax
cmpq 0x235ca(%rip), %rax     # 0x546f0
je 0x31142
movq -0x1c8(%rbp), %rax
cmpq 0x235c2(%rip), %rax     # 0x546f8
je 0x31142
cmpq $0x1f, -0x1c8(%rbp)
jne 0x31192
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x1c0(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x1c0(%rbp), %rdx
movq -0x1c8(%rbp), %rcx
movq 0x23552(%rip), %r10     # 0x546c8
movl 0x23554(%rip), %eax     # 0x546d0
movl $0x8, %r8d
xorl %r9d, %r9d
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x34f0
jmp 0x31194
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rsi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
leaq -0x1f8(%rbp), %r8
callq 0x33b0
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3380
movl $0x1, -0x14(%rbp)
jmp 0x3133d
movq -0x38(%rbp), %rax
cmpl $0x1f, (%rax)
jne 0x31328
cmpq $0x0, 0x234f1(%rip)     # 0x546d8
je 0x31328
movq -0x38(%rbp), %rax
cmpq $0x1f, 0x30(%rax)
je 0x31226
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
cmpq 0x234f1(%rip), %rax     # 0x546f8
je 0x31226
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
cmpq 0x234d8(%rip), %rax     # 0x546f0
je 0x31226
movl $0x1, -0x14(%rbp)
jmp 0x3133d
movq $0x0, -0x238(%rbp)
movq $0x0, -0x250(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x238(%rbp), %rax
movslq %eax, %rcx
movl $0x1, %edx
movl $0x400, %r8d            # imm = 0x400
xorl %r9d, %r9d
xorl %eax, %eax
leaq -0x228(%rbp), %r14
leaq -0x22c(%rbp), %rbx
leaq -0x240(%rbp), %r11
leaq -0x248(%rbp), %r10
leaq -0x250(%rbp), %rax
movq $0x0, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x3150
cmpq $0x0, -0x240(%rbp)
je 0x312d7
cmpq $0x0, -0x250(%rbp)
je 0x312d7
movq 0x23416(%rip), %rdi     # 0x546d8
movq -0x250(%rbp), %rsi
movq -0x240(%rbp), %rax
movl %eax, %edx
callq 0x26260
cmpq $0x0, -0x250(%rbp)
je 0x312ed
movq -0x250(%rbp), %rdi
callq 0x3040
movq -0x240(%rbp), %rax
movslq -0x22c(%rbp), %rcx
imulq %rcx, %rax
shrq $0x5, %rax
addq -0x238(%rbp), %rax
movq %rax, -0x238(%rbp)
cmpq $0x0, -0x248(%rbp)
jne 0x3123c
movl $0x1, -0x14(%rbp)
jmp 0x3133d
jmp 0x3132a
jmp 0x3132c
jmp 0x3132e
jmp 0x31330
jmp 0x31332
jmp 0x31334
jmp 0x31336
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)