// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_draw_term.c
// Function: draw_view_status
void _draw_view_status(CeView_t* view, CeVim_t* vim, CeMacros_t* macros,
                       CeColorDefs_t* color_defs, int64_t height_offset, int ui_fg_color, int ui_bg_color){
     // create bottom bar bg
     int64_t bottom = view->rect.bottom + height_offset;
     int color_pair = ce_color_def_get(color_defs, ui_fg_color, ui_bg_color);
     attron(COLOR_PAIR(color_pair));
     int64_t width = (view->rect.right - view->rect.left) + 1;
     move(bottom, view->rect.left);
     for(int64_t i = 0; i < width; ++i){
          addch(' ');
     }

     // set the mode line
     int vim_mode_fg = ui_fg_color;
     const char* vim_mode_string = NULL;

     if(vim){
          switch(vim->mode){
          default:
               break;
          case CE_VIM_MODE_NORMAL:
               vim_mode_string = "NORMAL";
               vim_mode_fg = CE_COLOR_BLUE;
               break;
          case CE_VIM_MODE_INSERT:
               vim_mode_string = "INSERT";
               vim_mode_fg = CE_COLOR_GREEN;
               break;
          case CE_VIM_MODE_VISUAL:
               vim_mode_string = "VISUAL";
               vim_mode_fg = CE_COLOR_YELLOW;
               break;
          case CE_VIM_MODE_VISUAL_LINE:
               vim_mode_string = "VISUAL LINE";
               vim_mode_fg = CE_COLOR_BRIGHT_YELLOW;
               break;
          case CE_VIM_MODE_VISUAL_BLOCK:
               vim_mode_string = "VISUAL BLOCK";
               vim_mode_fg = CE_COLOR_BRIGHT_YELLOW;
               break;
          case CE_VIM_MODE_REPLACE:
               vim_mode_string = "REPLACE";
               vim_mode_fg = CE_COLOR_RED;
               break;
          }
     }

     if(vim_mode_string){
          color_pair = ce_color_def_get(color_defs, vim_mode_fg, ui_bg_color);
          attron(COLOR_PAIR(color_pair));
          mvprintw(bottom, view->rect.left + 1, "%s", vim_mode_string);

          color_pair = ce_color_def_get(color_defs, ui_fg_color, ui_bg_color);
          attron(COLOR_PAIR(color_pair));
          printw(" %s", view->buffer->name);
     }else{
          color_pair = ce_color_def_get(color_defs, ui_fg_color, ui_bg_color);
          attron(COLOR_PAIR(color_pair));
          mvprintw(bottom, view->rect.left + 1, "%s", view->buffer->name);
     }

     const char* status_str = ce_buffer_status_get_str(view->buffer->status);
     if(status_str) printw("%s", status_str);

     if(vim_mode_string && ce_macros_is_recording(macros)){
          printw(" RECORDING %c", macros->recording);
     }

#ifdef ENABLE_DEBUG_KEY_PRESS_INFO
     if(vim_mode_string) printw(" %s %d ", keyname(g_last_key), g_last_key);
#endif

     char cursor_pos_string[32];
     int64_t cursor_pos_string_len = snprintf(cursor_pos_string, 32, "%"PRId64", %"PRId64"", view->cursor.x + 1, view->cursor.y + 1);
     mvprintw(bottom, view->rect.right - (cursor_pos_string_len + 1), "%s", cursor_pos_string);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl 0x10(%rbp), %edx
callq 0x2b6d0
movl %eax, -0x3c(%rbp)
movq 0x2b859(%rip), %rax     # 0x4dfd8
movq (%rax), %rdi
movl -0x3c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0xd0f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
subq (%rcx), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq 0x2b823(%rip), %rax     # 0x4dfd8
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movl %eax, %esi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
callq 0xd070
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jge 0x22800
movq 0x2b7f3(%rip), %rax     # 0x4dfd8
movq (%rax), %rdi
movl $0x20, %esi
callq 0xd600
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x227d4
movl -0x2c(%rbp), %eax
movl %eax, -0x54(%rbp)
movq $0x0, -0x60(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x228bd
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xa0(%rbp)
subq $0x5, %rax
ja 0x22843
movq -0xa0(%rbp), %rax
leaq 0x21d32(%rip), %rcx     # 0x4456c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x228bb
leaq 0x21d38(%rip), %rax     # 0x44584
movq %rax, -0x60(%rbp)
movl $0x4, -0x54(%rbp)
jmp 0x228bb
leaq 0x21d2b(%rip), %rax     # 0x4458b
movq %rax, -0x60(%rbp)
movl $0x2, -0x54(%rbp)
jmp 0x228bb
leaq 0x21d1e(%rip), %rax     # 0x44592
movq %rax, -0x60(%rbp)
movl $0x3, -0x54(%rbp)
jmp 0x228bb
leaq 0x21d11(%rip), %rax     # 0x44599
movq %rax, -0x60(%rbp)
movl $0xb, -0x54(%rbp)
jmp 0x228bb
leaq 0x21d09(%rip), %rax     # 0x445a5
movq %rax, -0x60(%rbp)
movl $0xb, -0x54(%rbp)
jmp 0x228bb
leaq 0x21d02(%rip), %rax     # 0x445b2
movq %rax, -0x60(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0x228bd
cmpq $0x0, -0x60(%rbp)
je 0x2296b
movq -0x20(%rbp), %rdi
movl -0x54(%rbp), %esi
movl 0x10(%rbp), %edx
callq 0x2b6d0
movl %eax, -0x3c(%rbp)
movq 0x2b6f7(%rip), %rax     # 0x4dfd8
movq (%rax), %rdi
movl -0x3c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0xd0f0
movq -0x38(%rbp), %rax
movl %eax, %edi
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movl %eax, %esi
movq -0x60(%rbp), %rcx
leaq 0x232c3(%rip), %rdx     # 0x45bda
movb $0x0, %al
callq 0xd5e0
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl 0x10(%rbp), %edx
callq 0x2b6d0
movl %eax, -0x3c(%rbp)
movq 0x2b6a1(%rip), %rax     # 0x4dfd8
movq (%rax), %rdi
movl -0x3c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0xd0f0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x213a9(%rip), %rdi     # 0x43d0b
movb $0x0, %al
callq 0xd4b0
jmp 0x229c9
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl 0x10(%rbp), %edx
callq 0x2b6d0
movl %eax, -0x3c(%rbp)
movq 0x2b654(%rip), %rax     # 0x4dfd8
movq (%rax), %rdi
movl -0x3c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0xd0f0
movq -0x38(%rbp), %rax
movl %eax, %edi
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movl %eax, %esi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rcx
leaq 0x23218(%rip), %rdx     # 0x45bda
movb $0x0, %al
callq 0xd5e0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x18(%rax), %edi
callq 0x11650
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x229f6
movq -0x68(%rbp), %rsi
leaq 0x231eb(%rip), %rdi     # 0x45bda
movb $0x0, %al
callq 0xd4b0
cmpq $0x0, -0x60(%rbp)
je 0x22a25
movq -0x18(%rbp), %rdi
callq 0x2a8b0
testb $0x1, %al
jne 0x22a0c
jmp 0x22a25
movq -0x18(%rbp), %rax
movzbl 0x2f8(%rax), %esi
leaq 0x21b9c(%rip), %rdi     # 0x445ba
movb $0x0, %al
callq 0xd4b0
cmpq $0x0, -0x60(%rbp)
je 0x22a54
leaq 0x2e189(%rip), %rax     # 0x50bbc
movl (%rax), %edi
callq 0xd690
movq %rax, %rsi
leaq 0x2e178(%rip), %rax     # 0x50bbc
movl (%rax), %edx
leaq 0x21b7b(%rip), %rdi     # 0x445c8
movb $0x0, %al
callq 0xd4b0
leaq -0x90(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %r8
addq $0x1, %r8
movl $0x20, %esi
leaq 0x21b51(%rip), %rdx     # 0x445d0
movb $0x0, %al
callq 0xd250
cltq
movq %rax, -0x98(%rbp)
movq -0x38(%rbp), %rax
movl %eax, %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x98(%rbp), %rcx
addq $0x1, %rcx
subq %rcx, %rax
movl %eax, %esi
leaq -0x90(%rbp), %rcx
leaq 0x2311f(%rip), %rdx     # 0x45bda
movb $0x0, %al
callq 0xd5e0
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)