// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_draw_term.c
// Function: ce_draw_term
void ce_draw_term(CeApp_t* app){
     CeColorDefs_t color_defs = {};

     CeLayout_t* tab_list_layout = app->tab_list_layout;
     CeLayout_t* tab_layout = tab_list_layout->tab_list.current;

     CeView_t* view = &tab_layout->tab.current->view;

     // draw a tab bar if there is more than 1 tab
     if(tab_list_layout->tab_list.tab_count > 1){
          move(0, 0);
          int color_pair = ce_color_def_get(&color_defs, app->config_options.ui_fg_color, app->config_options.ui_bg_color);
          attron(COLOR_PAIR(color_pair));
          for(int64_t i = tab_list_layout->tab_list.rect.left; i <= tab_list_layout->tab_list.rect.right; i++){
               addch(' ');
          }

          move(0, 0);

          for(int64_t i = 0; i < tab_list_layout->tab_list.tab_count; i++){
               if(tab_list_layout->tab_list.tabs[i] == tab_list_layout->tab_list.current){
                    color_pair = ce_color_def_get(&color_defs, CE_COLOR_DEFAULT, CE_COLOR_DEFAULT);
                    attron(COLOR_PAIR(color_pair));
               }else{
                    color_pair = ce_color_def_get(&color_defs, app->config_options.ui_fg_color, app->config_options.ui_bg_color);
                    attron(COLOR_PAIR(color_pair));
               }

               if(tab_list_layout->tab_list.tabs[i]->tab.current->type == CE_LAYOUT_TYPE_VIEW){
                    const char* buffer_name = tab_list_layout->tab_list.tabs[i]->tab.current->view.buffer->name;

                    printw(" %s ", buffer_name);
               }else{
                    printw(" selection ");
               }
          }
     }

     standend();
     _draw_layout(tab_layout, &app->vim, &app->visual, &app->macros, app->input_view.buffer, &color_defs,
                 app->config_options.tab_width, app->config_options.line_number, app->config_options.visual_line_display_type,
                 tab_layout->tab.current, app->syntax_defs, tab_list_layout->tab_list.rect.right,
                 app->highlight_search, app->config_options.ui_fg_color, app->config_options.ui_bg_color,
                 app->config_options.show_line_extends_passed_view_as);

     if(app->input_complete_func){
          CeDrawColorList_t draw_color_list = {};
          _draw_view(&app->input_view, app->config_options.tab_width, app->config_options.line_number,
                    app->config_options.visual_line_display_type, &draw_color_list, &color_defs, app->syntax_defs,
                    app->terminal_rect.right, app->config_options.show_line_extends_passed_view_as);
          ce_draw_color_list_free(&draw_color_list);
          int64_t new_status_bar_offset = (app->input_view.rect.bottom - app->input_view.rect.top) + 1;
          _draw_view_status(&app->input_view, &app->vim, &app->macros, &color_defs, 0,
                           app->config_options.ui_fg_color, app->config_options.ui_bg_color);
          _draw_view_status(&tab_layout->tab.current->view, NULL, &app->macros, &color_defs,
                           -new_status_bar_offset, app->config_options.ui_fg_color, app->config_options.ui_bg_color);
     }

     CeComplete_t* complete = ce_app_is_completing(app);
     if(complete && tab_layout->tab.current->type == CE_LAYOUT_TYPE_VIEW && app->complete_list_buffer->line_count &&
        strlen(app->complete_list_buffer->lines[0])){
          CeLayout_t* view_layout = tab_layout->tab.current;
          app->complete_view.rect.left = view_layout->view.rect.left;
          app->complete_view.rect.right = view_layout->view.rect.right - 1;
          if(app->input_complete_func){
               app->complete_view.rect.bottom = app->input_view.rect.top;
          }else{
               app->complete_view.rect.bottom = view_layout->view.rect.bottom - 1;
          }
          int64_t lines_to_show = app->complete_list_buffer->line_count;
          if(lines_to_show > app->config_options.completion_line_limit){
               lines_to_show = app->config_options.completion_line_limit;
          }
          app->complete_view.rect.top = app->complete_view.rect.bottom - lines_to_show;
          if(app->complete_view.rect.top <= view_layout->view.rect.top){
               app->complete_view.rect.top = view_layout->view.rect.top + 1; // account for current view's status bar
          }
          app->complete_view.buffer = app->complete_list_buffer;
          app->complete_view.cursor.y = app->complete_list_buffer->cursor_save.y;
          app->complete_view.cursor.x = 0;
          app->complete_view.scroll.y = 0;
          app->complete_view.scroll.x = 0;
          ce_view_follow_cursor(&app->complete_view, 0, 0, 0); // NOTE: I don't think anyone wants their settings applied here
          CeDrawColorList_t draw_color_list = {};
          CeRangeList_t range_list = {};
          CeAppBufferData_t* buffer_data = app->complete_view.buffer->app_data;
          buffer_data->syntax_function(&app->complete_view, &range_list, &draw_color_list, app->syntax_defs,
                                       app->complete_view.buffer->syntax_data);
          ce_range_list_free(&range_list);
          _draw_view(&app->complete_view, app->config_options.tab_width, app->config_options.line_number,
                    app->config_options.visual_line_display_type, &draw_color_list, &color_defs, app->syntax_defs,
                    app->terminal_rect.right, app->config_options.show_line_extends_passed_view_as);
          ce_draw_color_list_free(&draw_color_list);
          if(app->input_complete_func){
               int64_t new_status_bar_offset = (app->complete_view.rect.bottom - app->complete_view.rect.top) + 1 + app->input_view.buffer->line_count;
               _draw_view_status(&tab_layout->tab.current->view, NULL, &app->macros,
                                &color_defs, -new_status_bar_offset, app->config_options.ui_fg_color,
                                app->config_options.ui_bg_color);
          }
     }

     if(app->clangd_completion.start.x >= 0 &&
        app->clangd_completion.start.y >= 0){
          app->clangd_completion.view.cursor.x = 0;
          app->clangd_completion.view.cursor.y = ce_complete_current_match(app->clangd_completion.complete);
          app->clangd_completion.view.scroll.y = 0;
          app->clangd_completion.view.scroll.x = 0;
          ce_view_follow_cursor(&app->clangd_completion.view, 0, 0, 0);

          CeDrawColorList_t draw_color_list = {};
          CeRangeList_t highlight_ranges = {};
          CeAppBufferData_t* buffer_data = app->clangd_completion.buffer->app_data;
          if (buffer_data->syntax_function) {
               buffer_data->syntax_function(&app->clangd_completion.view, &highlight_ranges, &draw_color_list, app->syntax_defs,
                                            app->clangd_completion.buffer->syntax_data);
               ce_range_list_free(&highlight_ranges);
          }

          _draw_view(&app->clangd_completion.view, app->config_options.tab_width, app->config_options.line_number,
                    app->config_options.visual_line_display_type, &draw_color_list, &color_defs, app->syntax_defs,
                    app->terminal_rect.right, app->config_options.show_line_extends_passed_view_as);
     }

     if(app->message_mode){
          CeDrawColorList_t draw_color_list = {};
          CeRangeList_t range_list = {};
          CeAppBufferData_t* buffer_data = app->message_view.buffer->app_data;
          buffer_data->syntax_function(&app->message_view, &range_list, &draw_color_list, app->syntax_defs,
                                       app->message_view.buffer->syntax_data);
          ce_range_list_free(&range_list);

          _draw_view(&app->message_view, app->config_options.tab_width, app->config_options.line_number,
                    app->config_options.visual_line_display_type, &draw_color_list, &color_defs, app->syntax_defs,
                    app->terminal_rect.right, app->config_options.show_line_extends_passed_view_as);
          ce_draw_color_list_free(&draw_color_list);

          // set the specified background
          int message_len = ce_utf8_strlen(app->message_view.buffer->lines[0]);
          int color_pair = ce_color_def_get(&color_defs, app->config_options.message_fg_color, app->config_options.message_bg_color);
          attron(COLOR_PAIR(color_pair));
          int64_t view_width = ce_view_width(&app->message_view);
          move(app->message_view.rect.top, app->message_view.rect.left + message_len);
          for(int i = message_len; i < view_width; i++){
               addch(' ');
          }
     }

     // show border when non view is selected
     if(tab_layout->tab.current->type != CE_LAYOUT_TYPE_VIEW){
          int64_t rect_height = 0;
          int64_t rect_width = 0;
          CeRect_t* rect = NULL;
          switch(tab_layout->tab.current->type){
          default:
               break;
          case CE_LAYOUT_TYPE_LIST:
               rect = &tab_layout->tab.current->list.rect;
               rect_width = rect->right - rect->left;
               rect_height = rect->bottom - rect->top;
               break;
          case CE_LAYOUT_TYPE_TAB:
               rect = &tab_layout->tab.current->tab.rect;
               rect_width = rect->right - rect->left;
               rect_height = rect->bottom - rect->top;
               break;
          }

          int color_pair = ce_color_def_get(&color_defs, CE_COLOR_BRIGHT_WHITE, CE_COLOR_BRIGHT_WHITE);
          attron(COLOR_PAIR(color_pair));
          for(int i = 0; i < rect_height; i++){
               mvaddch(rect->top + i, rect->right, ' ');
               mvaddch(rect->top + i, rect->left, ' ');
          }

          for(int i = 0; i < rect_width; i++){
               mvaddch(rect->top, rect->left + i, ' ');
               mvaddch(rect->bottom, rect->left + i, ' ');
          }

          mvaddch(rect->bottom, rect->right, ' ');

          move(0, 0);
     }else if(app->input_complete_func){
          CePoint_t screen_cursor = view_cursor_on_screen(&app->input_view, app->config_options.tab_width,
                                                          app->config_options.line_number);
          move(screen_cursor.y, screen_cursor.x);
     }else{
          CePoint_t screen_cursor = view_cursor_on_screen(view, app->config_options.tab_width,
                                                          app->config_options.line_number);
          move(screen_cursor.y, screen_cursor.x);
     }

     refresh();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x868, %rsp            # imm = 0x868
movq %rdi, %rbx
leaq 0x60(%rsp), %rdi
movl $0x808, %edx            # imm = 0x808
xorl %esi, %esi
callq 0xd2a0
movq 0x2818(%rbx), %r14
movq 0x10(%r14), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x2, 0x18(%r14)
jl 0x1aaaa
movq 0x1f5de(%rip), %r15     # 0x39f90
movq (%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd070
movl 0x1a78(%rbx), %esi
movl 0x1a7c(%rbx), %edx
leaq 0x60(%rsp), %rdi
callq 0x1fb52
movq (%r15), %rdi
shll $0x8, %eax
movzwl %ax, %esi
xorl %edx, %edx
callq 0xd0f0
movq 0x20(%r14), %r12
cmpq 0x28(%r14), %r12
jg 0x1aa07
decq %r12
movq (%r15), %rdi
movl $0x20, %esi
callq 0xd620
incq %r12
cmpq 0x28(%r14), %r12
jl 0x1a9f1
movq (%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd070
cmpq $0x0, 0x18(%r14)
jle 0x1aaaa
leaq 0x60(%rsp), %r12
leaq 0x14cc0(%rip), %rbp     # 0x2f6ea
xorl %r13d, %r13d
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rax
cmpq 0x10(%r14), %rax
je 0x1aa4c
movl 0x1a78(%rbx), %esi
movl 0x1a7c(%rbx), %edx
movq %r12, %rdi
jmp 0x1aa59
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1fb52
movq (%r15), %rdi
shll $0x8, %eax
movzwl %ax, %esi
xorl %edx, %edx
callq 0xd0f0
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rax
movq 0x10(%rax), %rax
cmpl $0x0, (%rax)
je 0x1aa8b
movq %rbp, %rdi
xorl %eax, %eax
callq 0xd4d0
jmp 0x1aaa1
movq 0x48(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x14c4b(%rip), %rdi     # 0x2f6e5
xorl %eax, %eax
callq 0xd4d0
incq %r13
cmpq 0x18(%r14), %r13
jl 0x1aa2d
movq 0x1f4df(%rip), %r15     # 0x39f90
movq (%r15), %rdi
xorl %esi, %esi
callq 0xd730
leaq 0x20(%rbx), %rsi
leaq 0x1a20(%rbx), %rdx
leaq 0x2940(%rbx), %rcx
leaq 0x2708(%rbx), %rax
movq 0x2748(%rbx), %r8
movl 0x1a50(%rbx), %edi
movq %rdi, 0x58(%rsp)
movl 0x1a74(%rbx), %r10d
movzbl 0x2c79(%rbx), %r11d
movl 0x1a78(%rbx), %r12d
movl 0x1a7c(%rbx), %r13d
movl 0x1aa8(%rbx), %ebp
leaq 0x60(%rsp), %r9
movq 0x28(%rsp), %rdi
movq %rsi, 0x50(%rsp)
movq %rcx, 0x8(%rsp)
pushq %rbp
movq %rdi, %rbp
pushq %r13
movq %rax, %r13
pushq %r12
pushq %r11
pushq 0x28(%r14)
pushq 0x2820(%rbx)
pushq 0x10(%rdi)
pushq %r10
pushq 0x98(%rsp)
pushq 0x1a58(%rbx)
callq 0x1b1b4
addq $0x50, %rsp
cmpq $0x0, 0x27f8(%rbx)
je 0x1ac2d
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
movq 0x1a58(%rbx), %rsi
movl 0x1a50(%rbx), %edx
movl 0x1a74(%rbx), %ecx
movl 0x1aa8(%rbx), %eax
subq $0x8, %rsp
leaq 0x68(%rsp), %r9
movq %r13, %rdi
movq %r12, %r8
pushq %rax
pushq 0x8(%rbx)
pushq 0x2820(%rbx)
callq 0x1b848
addq $0x20, %rsp
movq %r12, %rdi
callq 0x1f971
movq 0x2720(%rbx), %r12
movl 0x1a78(%rbx), %r9d
movl 0x1a7c(%rbx), %eax
notq %r12
addq 0x2718(%rbx), %r12
subq $0x8, %rsp
movq %r13, %rdi
movq 0x58(%rsp), %rsi
movq %r13, %r14
movq %rbp, %r13
movq 0x10(%rsp), %rbp
movq %rbp, %rdx
leaq 0x68(%rsp), %rcx
xorl %r8d, %r8d
pushq %rax
callq 0x1a718
addq $0x10, %rsp
movq 0x10(%r13), %rdi
addq $0x8, %rdi
movl 0x1a78(%rbx), %r9d
movl 0x1a7c(%rbx), %eax
subq $0x8, %rsp
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rbp
movq %r14, %r13
leaq 0x68(%rsp), %rcx
movq %r12, %r8
pushq %rax
callq 0x1a718
addq $0x10, %rsp
movq 0x8(%rsp), %r14
movq %rbx, %rdi
callq 0x10c58
testq %rax, %rax
je 0x1ac4c
movq 0x10(%rbp), %rcx
cmpl $0x0, (%rcx)
je 0x1afd1
cmpq $0x0, 0x2d50(%rbx)
js 0x1ad31
cmpq $0x0, 0x2d58(%rbx)
js 0x1ad31
movq %r13, %r12
leaq 0x2d80(%rbx), %r13
movq $0x0, 0x2db0(%rbx)
movq 0x2d70(%rbx), %rdi
callq 0x1a648
movq %rax, 0x2db8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x2da0(%rbx)
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xfdb4
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x30(%rsp)
movq 0x2d78(%rbx), %rdx
movq 0x58(%rdx), %rax
movq 0x600(%rax), %rax
testq %rax, %rax
je 0x1acf1
movq 0x2820(%rbx), %rcx
movq 0x60(%rdx), %r8
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %rdx
movq %r13, %rdi
movq %r14, %rsi
callq *%rax
movq %r14, %rdi
callq 0x1fada
movq 0x1a58(%rbx), %rsi
movl 0x1a50(%rbx), %edx
movl 0x1a74(%rbx), %ecx
movl 0x1aa8(%rbx), %eax
subq $0x8, %rsp
leaq 0x18(%rsp), %r8
leaq 0x68(%rsp), %r9
movq %r13, %rdi
pushq %rax
pushq 0x8(%rbx)
pushq 0x2820(%rbx)
callq 0x1b848
addq $0x20, %rsp
movq %r12, %r13
cmpb $0x1, 0x2800(%rbx)
jne 0x1ae4e
movq %r13, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
leaq 0x30(%rsp), %r12
movaps %xmm0, (%r12)
leaq 0x2758(%rbx), %r13
movq 0x2798(%rbx), %rax
movq 0x2820(%rbx), %rcx
movq 0x58(%rax), %r9
movq 0x60(%rax), %r8
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x600(%r9)
movq %r12, %rdi
callq 0x1fada
movq 0x1a58(%rbx), %rsi
movl 0x1a50(%rbx), %edx
movl 0x1a74(%rbx), %ecx
movl 0x1aa8(%rbx), %eax
subq $0x8, %rsp
leaq 0x68(%rsp), %r12
movq %r13, %rdi
movq %r14, %r8
movq %r12, %r9
pushq %rax
pushq 0x8(%rbx)
pushq 0x2820(%rbx)
callq 0x1b848
addq $0x20, %rsp
movq %r14, %rdi
callq 0x1f971
movq 0x2798(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0xe445
movq %rax, %r14
movl 0x1a90(%rbx), %esi
movl 0x1a94(%rbx), %edx
movq %r12, %rdi
callq 0x1fb52
movq (%r15), %rdi
shll $0x8, %eax
movzwl %ax, %esi
xorl %edx, %edx
callq 0xd0f0
movq %r13, %rdi
callq 0xff6e
movq %rax, %r13
movq (%r15), %rdi
movl 0x2768(%rbx), %esi
movl 0x2758(%rbx), %edx
addl %r14d, %edx
callq 0xd070
movslq %r14d, %r14
cmpq %r14, %r13
jle 0x1ae49
movq (%r15), %rdi
movl $0x20, %esi
callq 0xd620
incq %r14
jmp 0x1ae32
movq 0x8(%rsp), %r13
movq 0x10(%rbp), %rax
movl (%rax), %ecx
testl %ecx, %ecx
je 0x1afb5
cmpl $0x1, %ecx
je 0x1ae8a
xorl %r12d, %r12d
movl $0x0, %ebx
movl $0x0, %r14d
cmpl $0x2, %ecx
jne 0x1aeb2
movl $0x28, %ecx
movl $0x30, %edx
movl $0x20, %edi
movl $0x18, %esi
jmp 0x1ae9e
movl $0x30, %ecx
movl $0x38, %edx
movl $0x28, %edi
movl $0x20, %esi
movq (%rax,%rdi), %rbx
subq (%rax,%rsi), %rbx
leaq (%rax,%rsi), %r14
movq (%rax,%rdx), %r12
subq (%rax,%rcx), %r12
leaq 0x60(%rsp), %rdi
movl $0xf, %esi
movl $0xf, %edx
callq 0x1fb52
movq (%r15), %rdi
shll $0x8, %eax
movzwl %ax, %esi
xorl %edx, %edx
callq 0xd0f0
testq %r12, %r12
jle 0x1af2f
xorl %r13d, %r13d
movq (%r15), %rdi
movl 0x10(%r14), %esi
addl %r13d, %esi
movl 0x8(%r14), %edx
callq 0xd070
cmpl $-0x1, %eax
je 0x1af03
movq (%r15), %rdi
movl $0x20, %esi
callq 0xd620
movq (%r15), %rdi
movl 0x10(%r14), %esi
addl %r13d, %esi
movl (%r14), %edx
callq 0xd070
cmpl $-0x1, %eax
je 0x1af27
movq (%r15), %rdi
movl $0x20, %esi
callq 0xd620
incq %r13
cmpq %r13, %r12
jne 0x1aede
testq %rbx, %rbx
jle 0x1af87
xorl %r12d, %r12d
movq (%r15), %rdi
movl 0x10(%r14), %esi
movl (%r14), %edx
addl %r12d, %edx
callq 0xd070
cmpl $-0x1, %eax
je 0x1af5b
movq (%r15), %rdi
movl $0x20, %esi
callq 0xd620
movq (%r15), %rdi
movl 0x18(%r14), %esi
movl (%r14), %edx
addl %r12d, %edx
callq 0xd070
cmpl $-0x1, %eax
je 0x1af7f
movq (%r15), %rdi
movl $0x20, %esi
callq 0xd620
incq %r12
cmpq %r12, %rbx
jne 0x1af37
movq (%r15), %rdi
movl 0x8(%r14), %edx
movl 0x18(%r14), %esi
callq 0xd070
cmpl $-0x1, %eax
je 0x1afa9
movq (%r15), %rdi
movl $0x20, %esi
callq 0xd620
movq (%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
jmp 0x1b035
cmpq $0x0, 0x27f8(%rbx)
movq 0x1a58(%rbx), %rsi
movl 0x1a50(%rbx), %edx
je 0x1b020
movq %r13, %rdi
jmp 0x1b029
movq 0x2860(%rbx), %rax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x1ac4c
movq (%rax), %rsi
movq (%rsi), %rsi
cmpb $0x0, (%rsi)
je 0x1ac4c
movq 0x8(%rcx), %rsi
movq %rsi, 0x27a8(%rbx)
movq 0x10(%rcx), %rsi
decq %rsi
movq %rsi, 0x27b0(%rbx)
cmpq $0x0, 0x27f8(%rbx)
je 0x1b054
movq 0x2718(%rbx), %rsi
jmp 0x1b05b
movq 0x48(%rsp), %rdi
addq $0x8, %rdi
callq 0x1159f
movq (%r15), %rdi
movl %edx, %esi
movl %eax, %edx
callq 0xd070
movq (%r15), %rdi
callq 0xd340
addq $0x868, %rsp            # imm = 0x868
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rcx), %rsi
decq %rsi
leaq 0x27a8(%rbx), %rbp
movq %rsi, 0x27c0(%rbx)
movq 0x1a80(%rbx), %rdi
cmpq %rdi, %rdx
cmovlq %rdx, %rdi
subq %rdi, %rsi
movq %rsi, 0x27b8(%rbx)
movq 0x18(%rcx), %rcx
cmpq %rcx, %rsi
jg 0x1b094
incq %rcx
movq %rcx, 0x27b8(%rbx)
movq %rax, 0x27e8(%rbx)
movq 0x28(%rax), %rax
movq %rax, 0x27e0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x27c8(%rbx)
movq $0x0, 0x27d8(%rbx)
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xfdb4
leaq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rax, %rdx
leaq 0x30(%rsp), %r12
movaps %xmm0, (%r12)
movq 0x27e8(%rbx), %rax
movq 0x2820(%rbx), %rcx
movq 0x58(%rax), %r9
movq 0x60(%rax), %r8
movq %rbp, %rdi
movq %r12, %rsi
callq *0x600(%r9)
movq %r12, %rdi
callq 0x1fada
movq 0x1a58(%rbx), %rsi
movl 0x1a50(%rbx), %edx
movl 0x1a74(%rbx), %ecx
movl 0x1aa8(%rbx), %eax
subq $0x8, %rsp
leaq 0x68(%rsp), %r9
movq %rbp, %rdi
leaq 0x18(%rsp), %r8
pushq %rax
pushq 0x8(%rbx)
pushq 0x2820(%rbx)
callq 0x1b848
addq $0x20, %rsp
leaq 0x10(%rsp), %rdi
callq 0x1f971
cmpq $0x0, 0x27f8(%rbx)
movq 0x28(%rsp), %rbp
je 0x1ac4c
movq 0x27c0(%rbx), %r8
notq %r8
addq 0x27b8(%rbx), %r8
movq 0x2748(%rbx), %rax
subq 0x8(%rax), %r8
movq 0x10(%rbp), %rdi
addq $0x8, %rdi
movl 0x1a78(%rbx), %r9d
movl 0x1a7c(%rbx), %eax
subq $0x8, %rsp
leaq 0x68(%rsp), %rcx
xorl %esi, %esi
movq %r14, %rdx
pushq %rax
callq 0x1a718
addq $0x10, %rsp
jmp 0x1ac4c