LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_json.c
// Function: ce_json_obj_find
CeJsonFindResult_t ce_json_obj_find(CeJsonObj_t* obj, const char* name){
     CeJsonFindResult_t result = {};
     for(int64_t i = 0; i < obj->count; i++){
          if(strcmp(obj->fields[i].name, name) == 0){
               result.type = obj->fields[i].value.type;
               result.index = i;
               return result;
          }
     }
     return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r15
testq %r15, %r15
jle 0x1c57d
movq %rsi, %r14
movq (%rdi), %r12
addq $0x8, %r12
xorl %ebx, %ebx
movq -0x8(%r12), %rdi
movq %r14, %rsi
callq 0xd390
testl %eax, %eax
je 0x1c583
incq %rbx
addq $0x20, %r12
cmpq %rbx, %r15
jne 0x1c560
xorl %ebx, %ebx
xorl %eax, %eax
jmp 0x1c587
movl (%r12), %eax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_json.c
// Function: ce_json_parse
bool ce_json_parse(const char* string, CeJsonObj_t* json, bool verbose){
     ParsePos_t parse_pos = {};
     parse_pos.x = 1;
     parse_pos.y = 1;
     parse_pos.str = string;
     bool result = _obj_parse(&parse_pos, json, verbose);
     if(!result){
          ce_json_obj_free(json);
     }
     return result;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movl $0x1, %ecx
movq %rcx, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq %rdi, (%rax)
movq %rax, %rdi
callq 0x1c65c
movl %eax, %ebp
testb %al, %al
jne 0x1c653
movq %rbx, %rdi
callq 0x1c2ea
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_json.c
// Function: value_free
static void _value_free(CeJsonValue_t* value){
     switch(value->type){
     case CE_JSON_TYPE_OBJECT:
          _obj_free(&value->obj);
          break;
     case CE_JSON_TYPE_ARRAY:
          _array_free(&value->array);
          break;
     case CE_JSON_TYPE_STRING:
          free(value->string);
          break;
     default:
          break;
     }
     value->type = CE_JSON_TYPE_NONE;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x3, %eax
je 0x1d361
cmpl $0x2, %eax
je 0x1d356
cmpl $0x1, %eax
jne 0x1d36a
leaq 0x8(%rbx), %rdi
callq 0x1c2ea
jmp 0x1d36a
leaq 0x8(%rbx), %rdi
callq 0x1bdc5
jmp 0x1d36a
movq 0x8(%rbx), %rdi
callq 0xd090
movl $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_json.c
// Function: eat_whitespace
static void _eat_whitespace(ParsePos_t* pos){
     while(true){
          if(_is_whitespace(*pos->str)){
               advance_parse_pos(pos);
          }else if(_is_newline(*pos->str)){
               advance_newline_parse_pos(pos);
          }else{
               break;
          }
     }
}

// Assembly:
movq (%rdi), %rax
incq %rax
movzbl -0x1(%rax), %ecx
cmpl $0xc, %ecx
jg 0x1d602
cmpl $0x9, %ecx
je 0x1d60c
cmpl $0xa, %ecx
je 0x1d612
jmp 0x1d623
cmpl $0xd, %ecx
je 0x1d612
cmpl $0x20, %ecx
jne 0x1d623
incq 0x8(%rdi)
jmp 0x1d61e
incq 0x10(%rdi)
movq $0x1, 0x8(%rdi)
movq %rax, (%rdi)
jmp 0x1d5ea
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_json.c
// Function: parse_string
static bool _parse_string(ParsePos_t* pos, char** result){
     const char* begin = pos->str;
     bool escaped = false;
     while(true){
          char ch = *pos->str;
          if(_is_newline(ch)){
               return false;
          }else if(escaped){
               if(ch != TOKEN_QUOTE &&
                  ch != TOKEN_BACKSLASH &&
                  ch != TOKEN_FORWARDSLASH &&
                  ch != 'b' &&
                  ch != 'f' &&
                  ch != 'n' &&
                  ch != 'r' &&
                  ch != 't' &&
                  ch != 'u'){
                    // TODO: Handle unicode numbers after the \u
                    return pos->str;
               }
               escaped = false;
          }else if(ch == TOKEN_BACKSLASH){
               escaped = true;
          }else if(ch == TOKEN_QUOTE){
               if(*result){
                    free(*result);
               }
               uint64_t string_length = (pos->str - begin);
               *result = malloc(string_length + 1);
               strncpy(*result, begin, string_length);
               (*result)[string_length] = 0;
               break;
          }
          advance_parse_pos(pos);
     }
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movq (%rdi), %rax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
movabsq $0x400000000002001, %r8 # imm = 0x400000000002001
movl $0xd1011, %r9d          # imm = 0xD1011
movq 0x10(%rsp), %r15
movl %eax, %ebx
movq (%r14), %rdx
movzbl (%rdx), %edi
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0xa, %edi
je 0x1d725
cmpl $0xd, %edi
je 0x1d725
testb $0x1, %bpl
je 0x1d6aa
xorl %esi, %esi
leal -0x62(%rdi), %eax
cmpl $0x13, %eax
ja 0x1d694
btl %eax, %r9d
jb 0x1d715
movb $0x1, %al
addl $-0x22, %edi
cmpl $0x3a, %edi
ja 0x1d725
btq %rdi, %r8
jb 0x1d715
jmp 0x1d725
cmpl $0x5c, %edi
je 0x1d70e
cmpl $0x22, %edi
jne 0x1d713
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1d6c6
callq 0xd090
movq (%r14), %r12
subq %r15, %r12
leaq 0x1(%r12), %rdi
callq 0xd4c0
movq %rax, %r13
movq 0x8(%rsp), %rax
movq %r13, (%rax)
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xd0b0
movb $0x0, (%r13,%r12)
movl $0x3, %ecx
movl %ebx, %eax
movabsq $0x400000000002001, %r8 # imm = 0x400000000002001
movl $0xd1011, %r9d          # imm = 0xD1011
jmp 0x1d725
movb $0x1, %sil
jmp 0x1d715
movl %ebp, %esi
incq 0x8(%r14)
incq %rdx
movq %rdx, (%r14)
xorl %ecx, %ecx
movl %esi, %ebp
movl %ebx, %eax
testl %ecx, %ecx
je 0x1d659
cmpl $0x3, %ecx
jne 0x1d734
movb $0x1, %al
andb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_json.c
// Function: parse_number
static bool _parse_number(ParsePos_t* pos, double* result){
     char* end = NULL;
     *result = strtod(pos->str, &end);
     if(pos->str >= end){
          return false;
     }
     uint64_t string_len = (end - pos->str);
     // Go to the last number in the string, so that when we advance in the state machine, we can
     // consume the next token.
     advance_parse_pos_len(pos, string_len - 1);
     return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq $0x0, (%r15)
movq (%rdi), %rdi
movq %r15, %rsi
callq 0xd170
movsd %xmm0, (%r14)
movq (%rbx), %rax
movq (%r15), %rcx
cmpq %rcx, %rax
jae 0x1d78e
movq %rax, %rdx
notq %rdx
addq %rcx, %rdx
addq %rdx, 0x8(%rbx)
addq %rax, %rdx
movq %rdx, (%rbx)
cmpq %rcx, %rax
setb %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_json.c
// Function: parse_boolean
static bool _parse_boolean(ParsePos_t* pos, bool* value){
     if(strncmp(pos->str, "true", 4) == 0){
          *value = true;
          advance_parse_pos_len(pos, 3);
          return true;
     }
     if(strncmp(pos->str, "false", 5) == 0){
          *value = false;
          advance_parse_pos_len(pos, 4);
          return true;
     }
     return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r14
leaq 0x12faf(%rip), %rsi     # 0x30765
movl $0x4, %r12d
movl $0x4, %edx
movq %r14, %rdi
callq 0xd0d0
movb $0x1, %bpl
testl %eax, %eax
je 0x1d7ee
leaq 0x12f93(%rip), %rsi     # 0x3076a
movl $0x5, %edx
movq %r14, %rdi
callq 0xd0d0
xorl %ecx, %ecx
testl %eax, %eax
je 0x1d7f6
xorl %ebp, %ebp
jmp 0x1d803
movl $0x3, %r12d
movb $0x1, %cl
movb %cl, (%r15)
addq %r12, 0x8(%rbx)
addq %r12, %r14
movq %r14, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_tab_list_init
CeLayout_t* ce_layout_tab_list_init(CeLayout_t* tab_layout){
     CeLayout_t* tab_list_layout = calloc(1, sizeof(*tab_list_layout));
     if(!tab_list_layout) return NULL;
     tab_list_layout->type = CE_LAYOUT_TYPE_TAB_LIST;
     tab_list_layout->tab_list.tabs = malloc(sizeof(*tab_list_layout->tab_list.tabs));
     tab_list_layout->tab_list.tabs[0] = tab_layout;
     tab_list_layout->tab_list.tab_count = 1;
     tab_list_layout->tab_list.current = tab_layout;
     return tab_list_layout;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x60, %esi
callq 0xd380
testq %rax, %rax
je 0x1d853
movq %rax, %rbx
movl $0x3, (%rax)
movl $0x8, %edi
callq 0xd4c0
movq %rax, 0x8(%rbx)
movq %r14, (%rax)
movq $0x1, 0x18(%rbx)
movq %r14, 0x10(%rbx)
jmp 0x1d855
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_tab_list_add
CeLayout_t* ce_layout_tab_list_add(CeLayout_t* tab_list_layout){
     assert(tab_list_layout->type == CE_LAYOUT_TYPE_TAB_LIST);
     CeRect_t rect = tab_list_layout->tab_list.rect;
     int64_t new_tab_count = tab_list_layout->tab_list.tab_count + 1;
     CeLayout_t** new_tabs = realloc(tab_list_layout->tab_list.tabs, new_tab_count * sizeof(*tab_list_layout->tab_list.tabs));
     if(!new_tabs) return false;
     tab_list_layout->tab_list.tabs = new_tabs;
     new_tabs[tab_list_layout->tab_list.tab_count] = ce_layout_tab_init(tab_list_layout->tab_list.current->tab.current->view.buffer, rect);
     tab_list_layout->tab_list.tab_count = new_tab_count;
     for(int64_t i = 0; i < new_tab_count; i++){
         ce_layout_resize_for_tabline(new_tabs[i]);
     }
     return new_tabs[tab_list_layout->tab_list.tab_count - 1];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpl $0x3, (%rdi)
jne 0x1d911
movq %rdi, %rbx
movups 0x20(%rdi), %xmm0
movups 0x30(%rdi), %xmm1
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0x8(%rdi), %rdi
movq 0x18(%rbx), %r12
leaq 0x8(,%r12,8), %rsi
callq 0xd520
testq %rax, %rax
je 0x1d903
movq %rax, %r14
leaq 0x1(%r12), %r15
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x48(%rax), %rdi
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1d930
movq 0x18(%rbx), %rcx
movq %rax, (%r14,%rcx,8)
movq %r15, 0x18(%rbx)
testq %r12, %r12
js 0x1d8f8
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
callq 0x1d97b
incq %r12
cmpq %r12, %r15
jne 0x1d8e7
movq 0x18(%rbx), %rax
movq -0x8(%r14,%rax,8), %rax
jmp 0x1d905
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x132cc(%rip), %rdi     # 0x30be4
leaq 0x132f6(%rip), %rsi     # 0x30c15
leaq 0x132fb(%rip), %rcx     # 0x30c21
movl $0x37, %edx
callq 0xd280
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_tab_init
CeLayout_t* ce_layout_tab_init(CeBuffer_t* buffer, CeRect_t rect){
     CeLayout_t* view_layout = ce_layout_view_init(buffer);
     view_layout->view.rect = rect;

     CeLayout_t* tab_layout = calloc(1, sizeof(*tab_layout));
     if(!tab_layout){
         free(view_layout);
         return NULL;
     }
     tab_layout->type = CE_LAYOUT_TYPE_TAB;
     tab_layout->tab.root = view_layout;
     tab_layout->tab.current = view_layout;
     return tab_layout;
}

// Assembly:
pushq %rbx
callq 0x1da25
movq %rax, %rbx
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movups %xmm0, 0x8(%rax)
movups %xmm1, 0x18(%rax)
movl $0x1, %edi
movl $0x60, %esi
callq 0xd380
testq %rax, %rax
je 0x1d96f
movl $0x2, (%rax)
movq %rbx, 0x8(%rax)
movq %rbx, 0x10(%rax)
jmp 0x1d979
movq %rbx, %rdi
callq 0xd090
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_resize_for_tabline
static void ce_layout_resize_for_tabline(CeLayout_t* layout){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(layout->view.rect.top == 0){
               layout->view.rect.top = 1;
          }
          break;
     case CE_LAYOUT_TYPE_LIST:
     {
          if(layout->list.rect.top == 0){
               layout->list.rect.top = 1;
          }

          for(int64_t i = 0; i < layout->list.layout_count; i++){
              ce_layout_resize_for_tabline(layout->list.layouts[i]);
          }
     } break;
     case CE_LAYOUT_TYPE_TAB:
          if(layout->tab.rect.top == 0){
               layout->tab.rect.top = 1;
          }
          ce_layout_resize_for_tabline(layout->tab.root);
          break;
     case CE_LAYOUT_TYPE_TAB_LIST:
          if(layout->tab_list.rect.top == 0){
               layout->tab_list.rect.top = 1;
          }
          for(int64_t i = 0; i < layout->tab_list.tab_count; i++){
               ce_layout_resize_for_tabline(layout->tab_list.tabs[i]);
          }
          break;
     }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rbx), %eax
cmpl $0x2, %eax
jne 0x1d99e
cmpq $0x0, 0x28(%rbx)
jne 0x1d998
movq $0x1, 0x28(%rbx)
movq 0x8(%rbx), %rbx
jmp 0x1d982
cmpl $0x3, %eax
je 0x1d9bd
cmpl $0x1, %eax
je 0x1d9ee
testl %eax, %eax
jne 0x1da1d
cmpq $0x0, 0x18(%rbx)
jne 0x1da1d
movq $0x1, 0x18(%rbx)
jmp 0x1da1d
cmpq $0x0, 0x30(%rbx)
jne 0x1d9cc
movq $0x1, 0x30(%rbx)
cmpq $0x0, 0x18(%rbx)
jle 0x1da1d
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1d97b
incq %r14
cmpq 0x18(%rbx), %r14
jl 0x1d9d6
jmp 0x1da1d
cmpq $0x0, 0x30(%rbx)
jne 0x1d9fd
movq $0x1, 0x30(%rbx)
cmpq $0x0, 0x10(%rbx)
jle 0x1da1d
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1d97b
incq %r14
cmpq 0x10(%rbx), %r14
jl 0x1da07
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_view_init
CeLayout_t* ce_layout_view_init(CeBuffer_t* buffer){
     CeLayout_t* view_layout = calloc(1, sizeof(*view_layout));
     if(!view_layout) return NULL;
     view_layout->type = CE_LAYOUT_TYPE_VIEW;
     view_layout->view.buffer = buffer;
     view_layout->view.user_data = calloc(1, sizeof(CeAppViewData_t));
     return view_layout;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x60, %esi
callq 0xd380
testq %rax, %rax
je 0x1da62
movq %rax, %rbx
movl $0x0, (%rax)
movq %r14, 0x48(%rax)
movl $0x1, %edi
movl $0x4120, %esi           # imm = 0x4120
callq 0xd380
movq %rax, 0x50(%rbx)
jmp 0x1da64
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_free
void ce_layout_free(CeLayout_t** root){
     CeLayout_t* layout = *root;
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          free(layout->view.user_data);
          layout->view.user_data = NULL;
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               if(layout->list.layouts[i] != NULL){
                    ce_layout_free(&layout->list.layouts[i]);
               }
          }
          free(layout->list.layouts);
          layout->list.layout_count = 0;
          break;
     case CE_LAYOUT_TYPE_TAB:
          ce_layout_free(&layout->tab.root);
          break;
     case CE_LAYOUT_TYPE_TAB_LIST:
          for(int64_t i = 0; i < layout->tab_list.tab_count; i++){
               ce_layout_free(&layout->tab_list.tabs[i]);
          }
          free(layout->tab_list.tabs);
          layout->tab_list.tab_count = 0;
          break;
     }

     free(*root);
     *root = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movl (%r14), %eax
cmpq $0x3, %rax
ja 0x1db35
leaq 0x130c3(%rip), %rcx     # 0x30b54
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x50(%r14), %rdi
callq 0xd090
movq $0x0, 0x50(%r14)
jmp 0x1db35
addq $0x8, %r14
movq %r14, %rdi
callq 0x1da6f
jmp 0x1db35
cmpq $0x0, 0x18(%r14)
jle 0x1dae4
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%r14), %rdi
addq %r15, %rdi
callq 0x1da6f
incq %r12
addq $0x8, %r15
cmpq 0x18(%r14), %r12
jl 0x1dacb
movq 0x8(%r14), %rdi
callq 0xd090
movq $0x0, 0x18(%r14)
jmp 0x1db35
cmpq $0x0, 0x10(%r14)
jle 0x1db24
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%r14), %rdi
cmpq $0x0, (%rdi,%r15)
je 0x1db17
addq %r15, %rdi
callq 0x1da6f
incq %r12
addq $0x8, %r15
cmpq 0x10(%r14), %r12
jl 0x1db04
movq 0x8(%r14), %rdi
callq 0xd090
movq $0x0, 0x10(%r14)
movq (%rbx), %rdi
callq 0xd090
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_find_parent
CeLayout_t* ce_layout_find_parent(CeLayout_t* root, CeLayout_t* node){
     switch(root->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < root->list.layout_count; i++){
               if(root->list.layouts[i] == node) return root;
               CeLayout_t* found = ce_layout_find_parent(root->list.layouts[i], node);
               if(found) return found;
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          if(root->tab.root == node) return root;
          else return ce_layout_find_parent(root->tab.root, node);
          break;
     case CE_LAYOUT_TYPE_TAB_LIST:
          for(int64_t i = 0; i < root->tab_list.tab_count; i++){
               if(root->tab_list.tabs[i] == node) return root;
               CeLayout_t* found = ce_layout_find_parent(root->tab_list.tabs[i], node);
               if(found) return found;
          }
          break;
     }

     return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x2, %eax
jne 0x1de07
movq 0x8(%rbx), %rdi
cmpq %r14, %rdi
jne 0x1ddef
jmp 0x1dec8
cmpl $0x3, %eax
je 0x1de6c
cmpl $0x1, %eax
jne 0x1dec6
movq 0x10(%rbx), %r15
testq %r15, %r15
setg %bpl
jle 0x1debb
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
movq (%rax), %rdi
cmpq %r14, %rdi
je 0x1dec0
movl $0x1, %r12d
movq %r14, %rsi
callq 0x1dde1
testq %rax, %rax
cmovneq %rax, %r13
jne 0x1debd
cmpq %r15, %r12
setl %bpl
je 0x1debd
movq (%rsp), %rax
movq (%rax,%r12,8), %rdi
incq %r12
cmpq %r14, %rdi
jne 0x1de40
jmp 0x1dec0
movq 0x18(%rbx), %r15
testq %r15, %r15
setg %bpl
jle 0x1debb
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
movq (%rax), %rdi
cmpq %r14, %rdi
je 0x1dec0
movl $0x1, %r12d
movq %r14, %rsi
callq 0x1dde1
testq %rax, %rax
cmovneq %rax, %r13
jne 0x1debd
cmpq %r15, %r12
setl %bpl
je 0x1debd
movq (%rsp), %rax
movq (%rax,%r12,8), %rdi
incq %r12
cmpq %r14, %rdi
jne 0x1de8f
jmp 0x1dec0
jmp 0x1dec0
movq %r13, %rbx
testb $0x1, %bpl
jne 0x1dec8
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_find_buffer
static CeBuffer_t* ce_layout_find_buffer(CeLayout_t* layout){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(layout->view.buffer) return layout->view.buffer;
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               CeBuffer_t* found = ce_layout_find_buffer(layout->list.layouts[i]);
               if(found) return found;
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return ce_layout_find_buffer(layout->tab.root);
     case CE_LAYOUT_TYPE_TAB_LIST:
          for(int64_t i = 0; i < layout->tab_list.tab_count; i++){
               CeBuffer_t* buffer = ce_layout_find_buffer(layout->tab_list.tabs[i]);
               if(buffer) return buffer;
          }
          break;
     }

     return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl (%rdi), %eax
cmpl $0x2, %eax
jne 0x1deef
movq 0x8(%rdi), %rdi
jmp 0x1dee2
testl %eax, %eax
je 0x1df4c
cmpl $0x1, %eax
je 0x1df57
cmpl $0x3, %eax
jne 0x1dfaa
movq 0x18(%rdi), %r14
testq %r14, %r14
setg %bpl
jle 0x1dfa5
movq 0x8(%rdi), %r15
movq (%r15), %rdi
callq 0x1deda
movq %rax, %rbx
testq %rax, %rax
jne 0x1dfa5
movl $0x1, %ecx
movq %rcx, %r12
cmpq %rcx, %r14
je 0x1df9c
movq (%r15,%r12,8), %rdi
callq 0x1deda
leaq 0x1(%r12), %rcx
testq %rax, %rax
cmovneq %rax, %rbx
je 0x1df2b
jmp 0x1df9c
movq 0x48(%rdi), %rbx
testq %rbx, %rbx
jne 0x1dfac
jmp 0x1dfaa
movq 0x10(%rdi), %r14
testq %r14, %r14
setg %bpl
jle 0x1dfa5
movq 0x8(%rdi), %r15
movq (%r15), %rdi
callq 0x1deda
movq %rax, %rbx
testq %rax, %rax
jne 0x1dfa5
movl $0x1, %ecx
movq %rcx, %r12
cmpq %rcx, %r14
je 0x1df9c
movq (%r15,%r12,8), %rdi
callq 0x1deda
leaq 0x1(%r12), %rcx
testq %rax, %rax
cmovneq %rax, %rbx
je 0x1df7d
cmpq %r14, %r12
setl %bpl
jmp 0x1dfa5
testb %bpl, %bpl
jne 0x1dfac
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_rect
static CeRect_t ce_layout_rect(CeLayout_t* layout){
     if(layout->type == CE_LAYOUT_TYPE_VIEW) return layout->view.rect;

     CeRect_t result = {};

     if(layout->type == CE_LAYOUT_TYPE_LIST){
          if(layout->list.layout_count <= 0) return result;
          result = ce_layout_rect(layout->list.layouts[0]);

          for(int64_t i = 1; i < layout->list.layout_count; i++){
               CeRect_t rect = ce_layout_rect(layout->list.layouts[i]);
               if(rect.left < result.left) result.left = rect.left;
               if(rect.right > result.right) result.right = rect.right;
               if(rect.top < result.top) result.top = rect.top;
               if(rect.bottom > result.bottom) result.bottom = rect.bottom;
          }

          return result;
     }

     return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
testl %eax, %eax
je 0x1e082
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
cmpl $0x1, %eax
jne 0x1e093
cmpq $0x0, 0x10(%r14)
jle 0x1e093
movq 0x8(%r14), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x1dfb8
movq (%rbx), %r12
cmpq $0x2, 0x10(%r14)
jl 0x1e07d
movq 0x8(%rbx), %r15
movq 0x10(%rbx), %rbp
movq %rbx, (%rsp)
movq 0x18(%rbx), %r13
movl $0x1, %ebx
movq 0x8(%r14), %rax
movq (%rax,%rbx,8), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1dfb8
movq 0x8(%rsp), %rax
cmpq %r12, %rax
cmovlq %rax, %r12
movq 0x10(%rsp), %rax
cmpq %r15, %rax
cmovgq %rax, %r15
movq 0x18(%rsp), %rax
cmpq %rbp, %rax
cmovlq %rax, %rbp
movq 0x20(%rsp), %rax
cmpq %r13, %rax
cmovgq %rax, %r13
incq %rbx
cmpq 0x10(%r14), %rbx
jl 0x1e022
movq (%rsp), %rbx
movq %r15, 0x8(%rbx)
movq %rbp, 0x10(%rbx)
movq %r13, 0x18(%rbx)
movq %r12, (%rbx)
jmp 0x1e093
movups 0x8(%r14), %xmm0
movups 0x18(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: resize_opposites_left
static void resize_opposites_left(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    int64_t bottom_start = layout->view.rect.top;

    for(int64_t i = layout->view.rect.top - 1; i >= rect.top; i--){
         CePoint_t point = {result->adjacent_old_value, i};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.right == result->adjacent_old_value){
              adjacent_layout->view.rect.right = result->adjacent_new_value;
              i = adjacent_layout->view.rect.top;
              if((adjacent_layout->view.rect.bottom + 1) > bottom_start) bottom_start = adjacent_layout->view.rect.bottom + 1;
         }else{
              break;
         }
    }

    for(int64_t i = bottom_start; i <= rect.bottom; i++){
         CePoint_t point = {result->adjacent_old_value, i};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.right == result->adjacent_old_value){
              adjacent_layout->view.rect.right = result->adjacent_new_value;
              i = adjacent_layout->view.rect.bottom;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r13
movq 0x18(%rsi), %r12
movq 0x10(%r13), %rbp
movq %r12, %r15
cmpq %rbp, %r12
jle 0x1e832
decq %r12
movq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x1ed8e
testq %rax, %rax
je 0x1e82c
movq 0x10(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1e82c
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rax), %r12
movq 0x20(%rax), %rax
leaq 0x1(%rax), %rcx
cmpq %r15, %rax
cmovgeq %rcx, %r15
movb $0x1, %al
jmp 0x1e82e
xorl %eax, %eax
testb %al, %al
jne 0x1e7e7
movq 0x18(%r13), %r12
cmpq %r12, %r15
jg 0x1e87b
movq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x1ed8e
testq %rax, %rax
je 0x1e869
movq 0x10(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1e869
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x20(%rax), %r15
movb $0x1, %al
jmp 0x1e86b
xorl %eax, %eax
testb %al, %al
je 0x1e87b
leaq 0x1(%r15), %rax
cmpq %r12, %r15
movq %rax, %r15
jl 0x1e83b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: resize_shareds_left
static void resize_shareds_left(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    for(int64_t i = layout->view.rect.top - 1; i >= rect.top; i--){
         CePoint_t point = {layout->view.rect.left, i};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.left == layout->view.rect.left){
              adjacent_layout->view.rect.left = result->new_value;
              i = adjacent_layout->view.rect.top;
         }else{
              break;
         }
    }

    for(int64_t i = layout->view.rect.bottom + 1; i <= rect.bottom; i++){
         CePoint_t point = {layout->view.rect.left, i};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.left == layout->view.rect.left){
              adjacent_layout->view.rect.left = result->new_value;
              i = adjacent_layout->view.rect.bottom;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x40(%rsp), %r13
movq 0x18(%rsi), %r12
movq 0x10(%r13), %rbp
cmpq %rbp, %r12
jle 0x1e8e6
decq %r12
movq 0x8(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x1ed8e
testq %rax, %rax
je 0x1e8e0
movq 0x8(%rax), %rcx
cmpq 0x8(%r14), %rcx
jne 0x1e8e0
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rax), %r12
movb $0x1, %al
jmp 0x1e8e2
xorl %eax, %eax
testb %al, %al
jne 0x1e8ab
movq 0x20(%r14), %r12
movq 0x18(%r13), %r13
cmpq %r13, %r12
jge 0x1e929
incq %r12
movq 0x8(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x1ed8e
testq %rax, %rax
je 0x1e923
movq 0x8(%rax), %rcx
cmpq 0x8(%r14), %rcx
jne 0x1e923
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq 0x20(%rax), %r12
movb $0x1, %al
jmp 0x1e925
xorl %eax, %eax
testb %al, %al
jne 0x1e8ee
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: resize_opposites_right
static void resize_opposites_right(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    int64_t bottom_start = layout->view.rect.top;
    for(int64_t i = layout->view.rect.top - 1; i >= rect.top; i--){
         CePoint_t point = {result->adjacent_old_value, i};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.left == result->adjacent_old_value){
              adjacent_layout->view.rect.left = result->adjacent_new_value;
              i = adjacent_layout->view.rect.top;
              if((adjacent_layout->view.rect.bottom + 1) > bottom_start) bottom_start = adjacent_layout->view.rect.bottom + 1;
         }else{
              break;
         }
    }

    for(int64_t i = bottom_start; i <= rect.bottom; i++){
         CePoint_t point = {result->adjacent_old_value, i};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.left == result->adjacent_old_value){
              adjacent_layout->view.rect.left = result->adjacent_new_value;
              i = adjacent_layout->view.rect.bottom;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r13
movq 0x18(%rsi), %r12
movq 0x10(%r13), %rbp
movq %r12, %r15
cmpq %rbp, %r12
jle 0x1e9a4
decq %r12
movq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x1ed8e
testq %rax, %rax
je 0x1e99e
movq 0x8(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1e99e
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rax), %r12
movq 0x20(%rax), %rax
leaq 0x1(%rax), %rcx
cmpq %r15, %rax
cmovgeq %rcx, %r15
movb $0x1, %al
jmp 0x1e9a0
xorl %eax, %eax
testb %al, %al
jne 0x1e959
movq 0x18(%r13), %r12
cmpq %r12, %r15
jg 0x1e9ed
movq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x1ed8e
testq %rax, %rax
je 0x1e9db
movq 0x8(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1e9db
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq 0x20(%rax), %r15
movb $0x1, %al
jmp 0x1e9dd
xorl %eax, %eax
testb %al, %al
je 0x1e9ed
leaq 0x1(%r15), %rax
cmpq %r12, %r15
movq %rax, %r15
jl 0x1e9ad
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: resize_shareds_right
static void resize_shareds_right(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    for(int64_t i = layout->view.rect.top - 1; i >= rect.top; i--){
         CePoint_t point = {layout->view.rect.right, i};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.right == layout->view.rect.right){
              adjacent_layout->view.rect.right = result->new_value;
              i = adjacent_layout->view.rect.top;
         }else{
              break;
         }
    }

    for(int64_t i = layout->view.rect.bottom + 1; i <= rect.bottom; i++){
         CePoint_t point = {layout->view.rect.right, i};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.right == layout->view.rect.right){
              adjacent_layout->view.rect.right = result->new_value;
              i = adjacent_layout->view.rect.bottom;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x40(%rsp), %r13
movq 0x18(%rsi), %r12
movq 0x10(%r13), %rbp
cmpq %rbp, %r12
jle 0x1ea58
decq %r12
movq 0x10(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x1ed8e
testq %rax, %rax
je 0x1ea52
movq 0x10(%rax), %rcx
cmpq 0x10(%r14), %rcx
jne 0x1ea52
movq (%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rax), %r12
movb $0x1, %al
jmp 0x1ea54
xorl %eax, %eax
testb %al, %al
jne 0x1ea1d
movq 0x20(%r14), %r12
movq 0x18(%r13), %r13
cmpq %r13, %r12
jge 0x1ea9b
incq %r12
movq 0x10(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x1ed8e
testq %rax, %rax
je 0x1ea95
movq 0x10(%rax), %rcx
cmpq 0x10(%r14), %rcx
jne 0x1ea95
movq (%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x20(%rax), %r12
movb $0x1, %al
jmp 0x1ea97
xorl %eax, %eax
testb %al, %al
jne 0x1ea60
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: resize_opposites_up
static void resize_opposites_up(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    int64_t right_start = layout->view.rect.left;

    for(int64_t i = layout->view.rect.left - 1; i >= rect.left; i--){
         CePoint_t point = {i, result->adjacent_old_value};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.bottom == result->adjacent_old_value){
              adjacent_layout->view.rect.bottom = result->adjacent_new_value;
              i = adjacent_layout->view.rect.left;
              if((adjacent_layout->view.rect.right + 1) > right_start) right_start = adjacent_layout->view.rect.right + 1;
         }else{
              break;
         }
    }

    for(int64_t i = right_start; i <= rect.right; i++){
         CePoint_t point = {i, result->adjacent_old_value};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.bottom == result->adjacent_old_value){
              adjacent_layout->view.rect.bottom = result->adjacent_new_value;
              i = adjacent_layout->view.rect.right;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r13
movq 0x8(%rsi), %r12
movq (%r13), %rbp
movq %r12, %r15
cmpq %rbp, %r12
jle 0x1eb16
decq %r12
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1ed8e
testq %rax, %rax
je 0x1eb10
movq 0x20(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1eb10
movq 0x10(%rbx), %rcx
movq %rcx, 0x20(%rax)
movq 0x8(%rax), %r12
movq 0x10(%rax), %rax
leaq 0x1(%rax), %rcx
cmpq %r15, %rax
cmovgeq %rcx, %r15
movb $0x1, %al
jmp 0x1eb12
xorl %eax, %eax
testb %al, %al
jne 0x1eacb
movq 0x8(%r13), %r12
cmpq %r12, %r15
jg 0x1eb5f
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1ed8e
testq %rax, %rax
je 0x1eb4d
movq 0x20(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1eb4d
movq 0x10(%rbx), %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rax), %r15
movb $0x1, %al
jmp 0x1eb4f
xorl %eax, %eax
testb %al, %al
je 0x1eb5f
leaq 0x1(%r15), %rax
cmpq %r12, %r15
movq %rax, %r15
jl 0x1eb1f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: resize_shareds_up
static void resize_shareds_up(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    for(int64_t i = layout->view.rect.left - 1; i >= rect.left; i--){
         CePoint_t point = {i, layout->view.rect.top};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.top == layout->view.rect.top){
              adjacent_layout->view.rect.top = result->new_value;
              i = adjacent_layout->view.rect.left;
         }else{
              break;
         }
    }

    for(int64_t i = layout->view.rect.right + 1; i <= rect.right; i++){
         CePoint_t point = {i, layout->view.rect.top};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.top == layout->view.rect.top){
              adjacent_layout->view.rect.top = result->new_value;
              i = adjacent_layout->view.rect.right;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x40(%rsp), %r13
movq 0x8(%rsi), %r12
movq (%r13), %rbp
cmpq %rbp, %r12
jle 0x1ebca
decq %r12
movq 0x18(%r14), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1ed8e
testq %rax, %rax
je 0x1ebc4
movq 0x18(%rax), %rcx
cmpq 0x18(%r14), %rcx
jne 0x1ebc4
movq (%rbx), %rcx
movq %rcx, 0x18(%rax)
movq 0x8(%rax), %r12
movb $0x1, %al
jmp 0x1ebc6
xorl %eax, %eax
testb %al, %al
jne 0x1eb8f
movq 0x10(%r14), %r12
movq 0x8(%r13), %r13
cmpq %r13, %r12
jge 0x1ec0d
incq %r12
movq 0x18(%r14), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1ed8e
testq %rax, %rax
je 0x1ec07
movq 0x18(%rax), %rcx
cmpq 0x18(%r14), %rcx
jne 0x1ec07
movq (%rbx), %rcx
movq %rcx, 0x18(%rax)
movq 0x10(%rax), %r12
movb $0x1, %al
jmp 0x1ec09
xorl %eax, %eax
testb %al, %al
jne 0x1ebd2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: resize_opposites_down
static void resize_opposites_down(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    int64_t right_start = layout->view.rect.left;

    for(int64_t i = layout->view.rect.left - 1; i >= rect.left; i--){
         CePoint_t point = {i, result->adjacent_old_value};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.top == result->adjacent_old_value){
              adjacent_layout->view.rect.top = result->adjacent_new_value;
              i = adjacent_layout->view.rect.left;
              if((adjacent_layout->view.rect.right + 1) > right_start) right_start = adjacent_layout->view.rect.right + 1;
         }else{
              break;
         }
    }

    for(int64_t i = right_start; i <= rect.right; i++){
         CePoint_t point = {i, result->adjacent_old_value};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.top == result->adjacent_old_value){
              adjacent_layout->view.rect.top = result->adjacent_new_value;
              i = adjacent_layout->view.rect.right;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r13
movq 0x8(%rsi), %r12
movq (%r13), %rbp
movq %r12, %r15
cmpq %rbp, %r12
jle 0x1ec88
decq %r12
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1ed8e
testq %rax, %rax
je 0x1ec82
movq 0x18(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1ec82
movq 0x10(%rbx), %rcx
movq %rcx, 0x18(%rax)
movq 0x8(%rax), %r12
movq 0x10(%rax), %rax
leaq 0x1(%rax), %rcx
cmpq %r15, %rax
cmovgeq %rcx, %r15
movb $0x1, %al
jmp 0x1ec84
xorl %eax, %eax
testb %al, %al
jne 0x1ec3d
movq 0x8(%r13), %r12
cmpq %r12, %r15
jg 0x1ecd1
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1ed8e
testq %rax, %rax
je 0x1ecbf
movq 0x18(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1ecbf
movq 0x10(%rbx), %rcx
movq %rcx, 0x18(%rax)
movq 0x10(%rax), %r15
movb $0x1, %al
jmp 0x1ecc1
xorl %eax, %eax
testb %al, %al
je 0x1ecd1
leaq 0x1(%r15), %rax
cmpq %r12, %r15
movq %rax, %r15
jl 0x1ec91
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: resize_shareds_down
static void resize_shareds_down(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    for(int64_t i = layout->view.rect.left - 1; i >= rect.left; i--){
         CePoint_t point = {i, layout->view.rect.bottom};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.bottom == layout->view.rect.bottom){
              adjacent_layout->view.rect.bottom = result->new_value;
              i = adjacent_layout->view.rect.left;
         }else{
              break;
         }
    }

    for(int64_t i = layout->view.rect.right + 1; i <= rect.right; i++){
         CePoint_t point = {i, layout->view.rect.bottom};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.bottom == layout->view.rect.bottom){
              adjacent_layout->view.rect.bottom = result->new_value;
              i = adjacent_layout->view.rect.right;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x40(%rsp), %r13
movq 0x8(%rsi), %r12
movq (%r13), %rbp
cmpq %rbp, %r12
jle 0x1ed3c
decq %r12
movq 0x20(%r14), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1ed8e
testq %rax, %rax
je 0x1ed36
movq 0x20(%rax), %rcx
cmpq 0x20(%r14), %rcx
jne 0x1ed36
movq (%rbx), %rcx
movq %rcx, 0x20(%rax)
movq 0x8(%rax), %r12
movb $0x1, %al
jmp 0x1ed38
xorl %eax, %eax
testb %al, %al
jne 0x1ed01
movq 0x10(%r14), %r12
movq 0x8(%r13), %r13
cmpq %r13, %r12
jge 0x1ed7f
incq %r12
movq 0x20(%r14), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1ed8e
testq %rax, %rax
je 0x1ed79
movq 0x20(%rax), %rcx
cmpq 0x20(%r14), %rcx
jne 0x1ed79
movq (%rbx), %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rax), %r12
movb $0x1, %al
jmp 0x1ed7b
xorl %eax, %eax
testb %al, %al
jne 0x1ed44
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_find_at
CeLayout_t* ce_layout_find_at(CeLayout_t* layout, CePoint_t point){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(ce_point_in_rect(point, layout->view.rect)) return layout;
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               CeLayout_t* found = ce_layout_find_at(layout->list.layouts[i], point);
               if(found) return found;
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return ce_layout_find_at(layout->tab.root, point);
     case CE_LAYOUT_TYPE_TAB_LIST:
          return ce_layout_find_at(layout->tab_list.current, point);
     }

     return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x11df8(%rip), %rax     # 0x30ba4
movl (%rbx), %ecx
cmpq $0x3, %rcx
ja 0x1ede9
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%rbx), %rbx
jmp 0x1edac
movq 0x10(%rbx), %rbx
jmp 0x1edac
movups 0x8(%rbx), %xmm0
movups 0x18(%rbx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x102c3
testb %al, %al
jne 0x1edeb
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x10(%rbx)
setg %bpl
jle 0x1ee53
movq 0x8(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ed8e
movq %rax, %r12
testq %rax, %rax
jne 0x1ee53
movl $0x1, %r13d
cmpq 0x10(%rbx), %r13
setl %bpl
jge 0x1ee53
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ed8e
incq %r13
testq %rax, %rax
cmovneq %rax, %r12
je 0x1ee28
jmp 0x1ee53
movq %r12, %rbx
testb %bpl, %bpl
je 0x1ede9
jmp 0x1edeb
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_find_popup
CeLayout_t* ce_layout_find_popup(CeLayout_t* layout){
     if(layout->popup){
         return layout;
     }
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               CeLayout_t* found = ce_layout_find_popup(layout->list.layouts[i]);
               if(found) return found;
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return ce_layout_find_popup(layout->tab.root);
     case CE_LAYOUT_TYPE_TAB_LIST:
          return ce_layout_find_popup(layout->tab_list.current);
     }

     return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x58(%rbx)
jne 0x1eee0
movl (%rbx), %eax
cmpl $0x2, %eax
je 0x1ee80
cmpl $0x3, %eax
jne 0x1ee86
movq 0x10(%rbx), %rbx
jmp 0x1ee68
movq 0x8(%rbx), %rbx
jmp 0x1ee68
cmpl $0x1, %eax
jne 0x1eede
movq 0x10(%rbx), %r14
testq %r14, %r14
setg %bpl
jle 0x1eed9
movq 0x8(%rbx), %r15
movq (%r15), %rdi
callq 0x1ee5d
movq %rax, %rbx
testq %rax, %rax
jne 0x1eed9
movl $0x1, %ecx
movq %rcx, %r12
cmpq %rcx, %r14
je 0x1eed0
movq (%r15,%r12,8), %rdi
callq 0x1ee5d
leaq 0x1(%r12), %rcx
testq %rax, %rax
cmovneq %rax, %rbx
je 0x1eeb1
cmpq %r14, %r12
setl %bpl
jmp 0x1eed9
testb %bpl, %bpl
jne 0x1eee0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: ce_layout_buffer_in_view
CeLayout_t* ce_layout_buffer_in_view(CeLayout_t* layout, CeBuffer_t* buffer){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(layout->view.buffer == buffer) return layout;
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               CeLayout_t* found = ce_layout_buffer_in_view(layout->list.layouts[i], buffer);
               if(found) return found;
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return ce_layout_buffer_in_view(layout->tab.root, buffer);
     case CE_LAYOUT_TYPE_TAB_LIST:
          return ce_layout_buffer_in_view(layout->tab_list.current, buffer);
     }

     return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x11a7e(%rip), %rax     # 0x30bb4
movl (%rbx), %ecx
cmpq $0x3, %rcx
ja 0x1f159
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%rbx), %rbx
jmp 0x1f136
movq 0x10(%rbx), %rbx
jmp 0x1f136
cmpq %r14, 0x48(%rbx)
je 0x1f15b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %r15
testq %r15, %r15
setg %bpl
jle 0x1f1c1
movq 0x8(%rbx), %r12
movq (%r12), %rdi
movq %r14, %rsi
callq 0x1f11e
movq %rax, %rbx
testq %rax, %rax
jne 0x1f1c1
movl $0x1, %ecx
movq %rcx, %r13
cmpq %rcx, %r15
je 0x1f1b8
movq (%r12,%r13,8), %rdi
movq %r14, %rsi
callq 0x1f11e
leaq 0x1(%r13), %rcx
testq %rax, %rax
cmovneq %rax, %rbx
je 0x1f197
cmpq %r15, %r13
setl %bpl
jmp 0x1f1c1
testb %bpl, %bpl
je 0x1f159
jmp 0x1f15b
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_layout.c
// Function: count_buffer_in_views
int64_t count_buffer_in_views(CeLayout_t* layout, CeBuffer_t* buffer, int64_t count){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(layout->view.buffer == buffer) return 1;
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               count = count_buffer_in_views(layout->list.layouts[i], buffer, count);
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return count_buffer_in_views(layout->tab.root, buffer, count);
     case CE_LAYOUT_TYPE_TAB_LIST:
          return count_buffer_in_views(layout->tab_list.current, buffer, count);
     }

     return count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rsi, %rbx
leaq 0x119e7(%rip), %rcx     # 0x30bc4
movl (%rdi), %edx
cmpq $0x3, %rdx
ja 0x1f230
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movq 0x8(%rdi), %rdi
jmp 0x1f1dd
movq 0x10(%rdi), %rdi
jmp 0x1f1dd
cmpq %rbx, 0x48(%rdi)
movl $0x1, %ecx
cmoveq %rcx, %rax
jmp 0x1f230
movq 0x10(%rdi), %r14
testq %r14, %r14
jle 0x1f230
movq 0x8(%rdi), %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1f1c8
incq %r12
cmpq %r12, %r14
jne 0x1f219
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq