// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_btnm.c
// Function: lv_btnm_signal
static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param)
{
    lv_res_t res;

    /* Include the ancient signal function */
    res = ancestor_signal(btnm, sign, param);
    if(res != LV_RES_OK) return res;
    if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);

    lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
    lv_point_t p;
    if(sign == LV_SIGNAL_CLEANUP) {
        lv_mem_free(ext->button_areas);
        lv_mem_free(ext->ctrl_bits);
    } else if(sign == LV_SIGNAL_STYLE_CHG || sign == LV_SIGNAL_CORD_CHG) {
        lv_btnm_set_map(btnm, ext->map_p);
    } else if(sign == LV_SIGNAL_PRESSED) {
        lv_indev_t * indev = lv_indev_get_act();
        if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) {
            uint16_t btn_pr;
            /*Search the pressed area*/
            lv_indev_get_point(param, &p);
            btn_pr = get_button_from_point(btnm, &p);

            invalidate_button_area(btnm, ext->btn_id_pr) /*Invalidate the old area*/;
            ext->btn_id_pr  = btn_pr;
            ext->btn_id_act = btn_pr;
            invalidate_button_area(btnm, ext->btn_id_pr); /*Invalidate the new area*/
        }
        if(ext->btn_id_act != LV_BTNM_BTN_NONE) {
            if(button_is_click_trig(ext->ctrl_bits[ext->btn_id_act]) == false &&
               button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false &&
               button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) {
                uint32_t b = ext->btn_id_act;
                res        = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b);
            }
        }
    } else if(sign == LV_SIGNAL_PRESSING) {
        uint16_t btn_pr;
        /*Search the pressed area*/
        lv_indev_get_point(param, &p);
        btn_pr = get_button_from_point(btnm, &p);
        /*Invalidate to old and the new areas*/;
        if(btn_pr != ext->btn_id_pr) {
            lv_indev_reset_long_press(param); /*Start the log press time again on the new button*/
            if(ext->btn_id_pr != LV_BTNM_BTN_NONE) {
                invalidate_button_area(btnm, ext->btn_id_pr);
            }
            if(btn_pr != LV_BTNM_BTN_NONE) {
                uint32_t b = ext->btn_id_act;
                res        = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b);
                if(res == LV_RES_OK) {
                    invalidate_button_area(btnm, btn_pr);
                }
            }
        }

        ext->btn_id_pr  = btn_pr;
        ext->btn_id_act = btn_pr;
    } else if(sign == LV_SIGNAL_RELEASED) {
        if(ext->btn_id_pr != LV_BTNM_BTN_NONE) {
            /*Toggle the button if enabled*/
            if(button_is_tgl_enabled(ext->ctrl_bits[ext->btn_id_pr])) {
                if(button_get_tgl_state(ext->ctrl_bits[ext->btn_id_pr])) {
                    ext->ctrl_bits[ext->btn_id_pr] &= (~LV_BTNM_CTRL_TGL_STATE);
                } else {
                    ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_CTRL_TGL_STATE;
                }
                if(ext->one_toggle) make_one_button_toggled(btnm, ext->btn_id_pr);
            }

            /*Invalidate to old pressed area*/;
            invalidate_button_area(btnm, ext->btn_id_pr);

#if LV_USE_GROUP
            /*Leave the clicked button when releases if this not the focused object in a group*/
            lv_group_t * g = lv_obj_get_group(btnm);
            if(lv_group_get_focused(g) != btnm) {
                ext->btn_id_pr = LV_BTNM_BTN_NONE;
            }
#else
            ext->btn_id_pr = LV_BTNM_BTN_NONE;
#endif

            if(button_is_click_trig(ext->ctrl_bits[ext->btn_id_act]) == true &&
               button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false &&
               button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) {
                uint32_t b = ext->btn_id_act;
                res        = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b);
            }
        }
    } else if(sign == LV_SIGNAL_LONG_PRESS_REP) {
        if(ext->btn_id_act != LV_BTNM_BTN_NONE) {
            if(button_is_repeat_disabled(ext->ctrl_bits[ext->btn_id_act]) == false &&
               button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false &&
               button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) {
                uint32_t b = ext->btn_id_act;
                res        = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b);
            }
        }
    } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) {
        ext->btn_id_pr  = LV_BTNM_BTN_NONE;
        ext->btn_id_act = LV_BTNM_BTN_NONE;
        lv_obj_invalidate(btnm);
    } else if(sign == LV_SIGNAL_FOCUS) {
#if LV_USE_GROUP
        lv_indev_t * indev         = lv_indev_get_act();
        lv_indev_type_t indev_type = lv_indev_get_type(indev);

        /*If not focused by an input device assume the last input device*/
       if(indev_type == LV_INDEV_TYPE_NONE) {
           indev_type = lv_indev_get_type(lv_indev_get_next(NULL));
       }

        if(indev_type == LV_INDEV_TYPE_POINTER) {
            /*Select the clicked button*/
            lv_point_t p1;
            lv_indev_get_point(indev, &p1);
            uint16_t btn_i = get_button_from_point(btnm, &p1);
            ext->btn_id_pr = btn_i;

        } else if(indev_type == LV_INDEV_TYPE_ENCODER) {
            /*In navigation mode don't select any button but in edit mode select the fist*/
            if(lv_group_get_editing(lv_obj_get_group(btnm)))
                ext->btn_id_pr = 0;
            else
                ext->btn_id_pr = LV_BTNM_BTN_NONE;
        } else {
            ext->btn_id_pr = 0;
        }
#else
        ext->btn_id_pr = 0;
#endif

        ext->btn_id_act = ext->btn_id_pr;
        lv_obj_invalidate(btnm);
    } else if(sign == LV_SIGNAL_CONTROL) {
        char c = *((char *)param);
        if(c == LV_KEY_RIGHT) {
            if(ext->btn_id_pr == LV_BTNM_BTN_NONE)
                ext->btn_id_pr = 0;
            else
                ext->btn_id_pr++;
            if(ext->btn_id_pr >= ext->btn_cnt - 1) ext->btn_id_pr = ext->btn_cnt - 1;
            ext->btn_id_act = ext->btn_id_pr;
            lv_obj_invalidate(btnm);
        } else if(c == LV_KEY_LEFT) {
            if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0;
            if(ext->btn_id_pr > 0) ext->btn_id_pr--;
            ext->btn_id_act = ext->btn_id_pr;
            lv_obj_invalidate(btnm);
        } else if(c == LV_KEY_DOWN) {
            const lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG);
            /*Find the area below the the current*/
            if(ext->btn_id_pr == LV_BTNM_BTN_NONE) {
                ext->btn_id_pr = 0;
            } else {
                uint16_t area_below;
                lv_coord_t pr_center =
                    ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1);

                for(area_below = ext->btn_id_pr; area_below < ext->btn_cnt; area_below++) {
                    if(ext->button_areas[area_below].y1 > ext->button_areas[ext->btn_id_pr].y1 &&
                       pr_center >= ext->button_areas[area_below].x1 &&
                       pr_center <= ext->button_areas[area_below].x2 + style->body.padding.inner) {
                        break;
                    }
                }

                if(area_below < ext->btn_cnt) ext->btn_id_pr = area_below;
            }
            ext->btn_id_act = ext->btn_id_pr;
            lv_obj_invalidate(btnm);
        } else if(c == LV_KEY_UP) {
            const lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG);
            /*Find the area below the the current*/
            if(ext->btn_id_pr == LV_BTNM_BTN_NONE) {
                ext->btn_id_pr = 0;
            } else {
                int16_t area_above;
                lv_coord_t pr_center =
                    ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1);

                for(area_above = ext->btn_id_pr; area_above >= 0; area_above--) {
                    if(ext->button_areas[area_above].y1 < ext->button_areas[ext->btn_id_pr].y1 &&
                       pr_center >= ext->button_areas[area_above].x1 - style->body.padding.inner &&
                       pr_center <= ext->button_areas[area_above].x2) {
                        break;
                    }
                }
                if(area_above >= 0) ext->btn_id_pr = area_above;
            }
            ext->btn_id_act = ext->btn_id_pr;
            lv_obj_invalidate(btnm);
        }
    } else if(sign == LV_SIGNAL_GET_EDITABLE) {
        bool * editable = (bool *)param;
        *editable       = true;
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq 0x53870(%rip), %rax     # 0x894f0
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rdx
movzbl %cl, %esi
callq *%rax
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x1, %eax
je 0x35ca7
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x3667e
movzbl -0x11(%rbp), %eax
cmpl $0x7, %eax
jne 0x35cc8
movq -0x20(%rbp), %rdi
leaq 0x32a2a(%rip), %rsi     # 0x686e5
callq 0xaa80
movb %al, -0x1(%rbp)
jmp 0x3667e
movq -0x10(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x30(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x35cfd
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x44ec0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x44ec0
jmp 0x36678
movzbl -0x11(%rbp), %eax
cmpl $0x4, %eax
je 0x35d0f
movzbl -0x11(%rbp), %eax
cmpl $0x2, %eax
jne 0x35d24
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0x36c80
jmp 0x36676
movzbl -0x11(%rbp), %eax
cmpl $0x8, %eax
jne 0x35e57
callq 0x4b70
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x4b80
movzbl %al, %eax
cmpl $0x1, %eax
je 0x35d5c
movq -0x40(%rbp), %rdi
callq 0x4b80
movzbl %al, %eax
cmpl $0x3, %eax
jne 0x35db4
movq -0x20(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x4d30
movq -0x10(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x38030
movw %ax, -0x42(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %esi
callq 0x37840
movw -0x42(%rbp), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x42(%rax)
movw -0x42(%rbp), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x44(%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %esi
callq 0x37840
movq -0x30(%rbp), %rax
movzwl 0x44(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x35e52
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x38120
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x35e50
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x38000
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x35e50
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x37f40
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x35e50
movq -0x30(%rbp), %rax
movzwl 0x44(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movl $0xe, %esi
leaq -0x48(%rbp), %rdx
callq 0x7990
movb %al, -0x21(%rbp)
jmp 0x35e52
jmp 0x36674
movzbl -0x11(%rbp), %eax
cmpl $0x9, %eax
jne 0x35f1d
movq -0x20(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x4d30
movq -0x10(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x38030
movw %ax, -0x4a(%rbp)
movzwl -0x4a(%rbp), %eax
movq -0x30(%rbp), %rcx
movzwl 0x42(%rcx), %ecx
cmpl %ecx, %eax
je 0x35f00
movq -0x20(%rbp), %rdi
callq 0x4bb0
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x35ebb
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %esi
callq 0x37840
movzwl -0x4a(%rbp), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x35efe
movq -0x30(%rbp), %rax
movzwl 0x44(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movl $0xe, %esi
leaq -0x50(%rbp), %rdx
callq 0x7990
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x1, %eax
jne 0x35efc
movq -0x10(%rbp), %rdi
movzwl -0x4a(%rbp), %esi
callq 0x37840
jmp 0x35efe
jmp 0x35f00
movw -0x4a(%rbp), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x42(%rax)
movw -0x4a(%rbp), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x44(%rax)
jmp 0x36672
movzbl -0x11(%rbp), %eax
cmpl $0xb, %eax
jne 0x360a2
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x3609d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x42(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x38150
testb $0x1, %al
jne 0x35f5c
jmp 0x35fdb
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x42(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x37fd0
testb $0x1, %al
jne 0x35f7b
jmp 0x35f9b
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x42(%rcx), %ecx
movzwl (%rax,%rcx,2), %edx
andl $0xffffff7f, %edx       # imm = 0xFFFFFF7F
movw %dx, (%rax,%rcx,2)
jmp 0x35fb9
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x42(%rcx), %ecx
movzwl (%rax,%rcx,2), %edx
orl $0x80, %edx
movw %dx, (%rax,%rcx,2)
movq -0x30(%rbp), %rax
movb 0x46(%rax), %al
shrb %al
andb $0x1, %al
cmpb $0x0, %al
je 0x35fd9
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %esi
callq 0x37b90
jmp 0x35fdb
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %esi
callq 0x37840
movq -0x10(%rbp), %rdi
callq 0x77c0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x3010
cmpq -0x10(%rbp), %rax
je 0x36012
movq -0x30(%rbp), %rax
movw $0xffff, 0x42(%rax)     # imm = 0xFFFF
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x38120
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x3609b
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x38000
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3609b
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x37f40
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3609b
movq -0x30(%rbp), %rax
movzwl 0x44(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rdi
movl $0xe, %esi
leaq -0x5c(%rbp), %rdx
callq 0x7990
movb %al, -0x21(%rbp)
jmp 0x3609d
jmp 0x36670
movzbl -0x11(%rbp), %eax
cmpl $0xd, %eax
jne 0x36152
movq -0x30(%rbp), %rax
movzwl 0x44(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x3614d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x38180
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3614b
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x38000
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3614b
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x44(%rcx), %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x37f40
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3614b
movq -0x30(%rbp), %rax
movzwl 0x44(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movl $0xe, %esi
leaq -0x60(%rbp), %rdx
callq 0x7990
movb %al, -0x21(%rbp)
jmp 0x3614d
jmp 0x3666e
movzbl -0x11(%rbp), %eax
cmpl $0xa, %eax
je 0x36164
movzbl -0x11(%rbp), %eax
cmpl $0x11, %eax
jne 0x36186
movq -0x30(%rbp), %rax
movw $0xffff, 0x42(%rax)     # imm = 0xFFFF
movq -0x30(%rbp), %rax
movw $0xffff, 0x44(%rax)     # imm = 0xFFFF
movq -0x10(%rbp), %rdi
callq 0x7430
jmp 0x3666c
movzbl -0x11(%rbp), %eax
cmpl $0x10, %eax
jne 0x3625c
callq 0x4b70
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x4b80
movb %al, -0x69(%rbp)
movzbl -0x69(%rbp), %eax
cmpl $0x0, %eax
jne 0x361c5
xorl %eax, %eax
movl %eax, %edi
callq 0xded0
movq %rax, %rdi
callq 0x4b80
movb %al, -0x69(%rbp)
movzbl -0x69(%rbp), %eax
cmpl $0x1, %eax
jne 0x361fa
movq -0x68(%rbp), %rdi
leaq -0x6e(%rbp), %rsi
callq 0x4d30
movq -0x10(%rbp), %rdi
leaq -0x6e(%rbp), %rsi
callq 0x38030
movw %ax, -0x70(%rbp)
movw -0x70(%rbp), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x42(%rax)
jmp 0x3623e
movzbl -0x69(%rbp), %eax
cmpl $0x4, %eax
jne 0x36232
movq -0x10(%rbp), %rdi
callq 0x77c0
movq %rax, %rdi
callq 0x32e0
testb $0x1, %al
jne 0x3621a
jmp 0x36226
movq -0x30(%rbp), %rax
movw $0x0, 0x42(%rax)
jmp 0x36230
movq -0x30(%rbp), %rax
movw $0xffff, 0x42(%rax)     # imm = 0xFFFF
jmp 0x3623c
movq -0x30(%rbp), %rax
movw $0x0, 0x42(%rax)
jmp 0x3623e
movq -0x30(%rbp), %rax
movw 0x42(%rax), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x44(%rax)
movq -0x10(%rbp), %rdi
callq 0x7430
jmp 0x3666a
movzbl -0x11(%rbp), %eax
cmpl $0x12, %eax
jne 0x36648
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x71(%rbp)
movsbl -0x71(%rbp), %eax
cmpl $0x13, %eax
jne 0x362f1
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x36296
movq -0x30(%rbp), %rax
movw $0x0, 0x42(%rax)
jmp 0x362a6
movq -0x30(%rbp), %rax
movw 0x42(%rax), %cx
addw $0x1, %cx
movw %cx, 0x42(%rax)
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
movq -0x30(%rbp), %rcx
movzwl 0x40(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x362d3
movq -0x30(%rbp), %rax
movzwl 0x40(%rax), %eax
subl $0x1, %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, 0x42(%rax)
movq -0x30(%rbp), %rax
movw 0x42(%rax), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x44(%rax)
movq -0x10(%rbp), %rdi
callq 0x7430
jmp 0x36646
movsbl -0x71(%rbp), %eax
cmpl $0x14, %eax
jne 0x3634e
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x36313
movq -0x30(%rbp), %rax
movw $0x0, 0x42(%rax)
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
cmpl $0x0, %eax
jle 0x36330
movq -0x30(%rbp), %rax
movw 0x42(%rax), %cx
addw $-0x1, %cx
movw %cx, 0x42(%rax)
movq -0x30(%rbp), %rax
movw 0x42(%rax), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x44(%rax)
movq -0x10(%rbp), %rdi
callq 0x7430
jmp 0x36644
movsbl -0x71(%rbp), %eax
cmpl $0x12, %eax
jne 0x364cc
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x37530
movq %rax, -0x80(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x36388
movq -0x30(%rbp), %rax
movw $0x0, 0x42(%rax)
jmp 0x364ae
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x42(%rcx), %ecx
movswl (%rax,%rcx,8), %eax
movl %eax, -0xa4(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x37f90
movw %ax, %cx
movl -0xa4(%rbp), %eax
movswl %cx, %ecx
sarl %ecx
addl %ecx, %eax
movw %ax, -0x84(%rbp)
movq -0x30(%rbp), %rax
movw 0x42(%rax), %ax
movw %ax, -0x82(%rbp)
movzwl -0x82(%rbp), %eax
movq -0x30(%rbp), %rcx
movzwl 0x40(%rcx), %ecx
cmpl %ecx, %eax
jge 0x3648a
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movzwl -0x82(%rbp), %ecx
movswl 0x2(%rax,%rcx,8), %eax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x30(%rbp), %rdx
movzwl 0x42(%rdx), %edx
movswl 0x2(%rcx,%rdx,8), %ecx
cmpl %ecx, %eax
jle 0x36471
movswl -0x84(%rbp), %eax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzwl -0x82(%rbp), %edx
movswl (%rcx,%rdx,8), %ecx
cmpl %ecx, %eax
jl 0x36471
movswl -0x84(%rbp), %eax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzwl -0x82(%rbp), %edx
movswl 0x4(%rcx,%rdx,8), %ecx
movq -0x80(%rbp), %rdx
movswl 0x1e(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jg 0x36471
jmp 0x3648a
jmp 0x36473
movw -0x82(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x82(%rbp)
jmp 0x363e4
movzwl -0x82(%rbp), %eax
movq -0x30(%rbp), %rcx
movzwl 0x40(%rcx), %ecx
cmpl %ecx, %eax
jge 0x364ac
movw -0x82(%rbp), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x42(%rax)
jmp 0x364ae
movq -0x30(%rbp), %rax
movw 0x42(%rax), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x44(%rax)
movq -0x10(%rbp), %rdi
callq 0x7430
jmp 0x36642
movsbl -0x71(%rbp), %eax
cmpl $0x11, %eax
jne 0x36640
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x37530
movq %rax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x36509
movq -0x30(%rbp), %rax
movw $0x0, 0x42(%rax)
jmp 0x36627
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movzwl 0x42(%rcx), %ecx
movswl (%rax,%rcx,8), %eax
movl %eax, -0xa8(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rax
movzwl 0x42(%rax), %eax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x37f90
movw %ax, %cx
movl -0xa8(%rbp), %eax
movswl %cx, %ecx
sarl %ecx
addl %ecx, %eax
movw %ax, -0x94(%rbp)
movq -0x30(%rbp), %rax
movw 0x42(%rax), %ax
movw %ax, -0x92(%rbp)
movswl -0x92(%rbp), %eax
cmpl $0x0, %eax
jl 0x3660a
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movswq -0x92(%rbp), %rcx
movswl 0x2(%rax,%rcx,8), %eax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x30(%rbp), %rdx
movzwl 0x42(%rdx), %edx
movswl 0x2(%rcx,%rdx,8), %ecx
cmpl %ecx, %eax
jge 0x365f1
movswl -0x94(%rbp), %eax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movswq -0x92(%rbp), %rdx
movswl (%rcx,%rdx,8), %ecx
movq -0x90(%rbp), %rdx
movswl 0x1e(%rdx), %edx
subl %edx, %ecx
cmpl %ecx, %eax
jl 0x365f1
movswl -0x94(%rbp), %eax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movswq -0x92(%rbp), %rdx
movswl 0x4(%rcx,%rdx,8), %ecx
cmpl %ecx, %eax
jg 0x365f1
jmp 0x3660a
jmp 0x365f3
movw -0x92(%rbp), %ax
addw $-0x1, %ax
movw %ax, -0x92(%rbp)
jmp 0x36565
movswl -0x92(%rbp), %eax
cmpl $0x0, %eax
jl 0x36625
movw -0x92(%rbp), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x42(%rax)
jmp 0x36627
movq -0x30(%rbp), %rax
movw 0x42(%rax), %cx
movq -0x30(%rbp), %rax
movw %cx, 0x44(%rax)
movq -0x10(%rbp), %rdi
callq 0x7430
jmp 0x36642
jmp 0x36644
jmp 0x36646
jmp 0x36668
movzbl -0x11(%rbp), %eax
cmpl $0x13, %eax
jne 0x36666
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movb $0x1, (%rax)
jmp 0x36668
jmp 0x3666a
jmp 0x3666c
jmp 0x3666e
jmp 0x36670
jmp 0x36672
jmp 0x36674
jmp 0x36676
jmp 0x36678
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)