// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_app.c
// Function: ce_convert_bind_defs
void ce_convert_bind_defs(CeKeyBinds_t* binds, CeKeyBindDef_t* bind_defs, int64_t bind_def_count){
     if(binds->count){
          for(int64_t i = 0; i < binds->count; ++i){
               free(binds->binds[i].keys);
          }
          free(binds->binds);
     }

     binds->count = bind_def_count;
     binds->binds = malloc(binds->count * sizeof(*binds->binds));

     for(int64_t i = 0; i < binds->count; ++i){
          ce_command_parse(&binds->binds[i].command, bind_defs[i].command);
          binds->binds[i].key_count = 0;

          for(int k = 0; k < 4; ++k){
               if(bind_defs[i].keys[k] == 0) break;
               binds->binds[i].key_count++;
          }

          if(!binds->binds[i].key_count) continue;

          binds->binds[i].keys = malloc(binds->binds[i].key_count * sizeof(binds->binds[i].keys[0]));

          for(int k = 0; k < binds->binds[i].key_count; ++k){
               binds->binds[i].keys[k] = bind_defs[i].keys[k];
          }
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x13189
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x1317d
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x228, -0x20(%rbp), %rcx # imm = 0x228
addq %rcx, %rax
movq (%rax), %rdi
callq 0xd090
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x13147
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xd090
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
imulq $0x228, 0x8(%rax), %rdi # imm = 0x228
callq 0xd4a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x13322
movq -0x8(%rbp), %rax
movq (%rax), %rdi
imulq $0x228, -0x28(%rbp), %rax # imm = 0x228
addq %rax, %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
callq 0x1bcd0
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x228, -0x28(%rbp), %rcx # imm = 0x228
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl $0x0, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jge 0x1325d
movq -0x10(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x13234
jmp 0x1325d
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x228, -0x28(%rbp), %rcx # imm = 0x228
addq %rcx, %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x13216
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x228, -0x28(%rbp), %rcx # imm = 0x228
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x1327b
jmp 0x13311
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x228, -0x28(%rbp), %rcx # imm = 0x228
addq %rcx, %rax
movq 0x8(%rax), %rdi
shlq $0x2, %rdi
callq 0xd4a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x228, -0x28(%rbp), %rdx # imm = 0x228
addq %rdx, %rax
movq %rcx, (%rax)
movl $0x0, -0x30(%rbp)
movslq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x228, -0x28(%rbp), %rdx # imm = 0x228
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jge 0x1330f
movq -0x10(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x228, -0x28(%rbp), %rcx # imm = 0x228
addq %rcx, %rax
movq (%rax), %rax
movslq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x132b9
jmp 0x13311
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x131b8
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)