// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/main.c
// Function: build_bind_list
static void build_bind_list(CeBuffer_t* buffer, CeKeyBinds_t* key_binds){
     char line[256];
     ce_buffer_empty(buffer);
     for(int64_t i = 0; i < key_binds->count; i++){
          CeKeyBind_t* bind = key_binds->binds + i;
          int32_t printed = 0;

          // print keys
          for(int64_t k = 0; k < bind->key_count; k++){
               int key = bind->keys[k];
               printed += snprintf(line + printed, 256 - printed, "%s", keyname_str(key));
          }

          // print command with arguments
          printed += snprintf(line + printed, 256 - printed, " -> %s", bind->command.name);

          for(int64_t c = 0; c < bind->command.arg_count; c++){
               switch(bind->command.args[c].type){
               default:
                    break;
               case CE_COMMAND_ARG_INTEGER:
                    printed += snprintf(line + printed, 256 - printed, " %" PRId64, bind->command.args[c].integer);
                    break;
               case CE_COMMAND_ARG_DECIMAL:
                    printed += snprintf(line + printed, 256 - printed, " %f", bind->command.args[c].decimal);
                    break;
               case CE_COMMAND_ARG_STRING:
                    printed += snprintf(line + printed, 256 - printed, " %s", bind->command.args[c].string);
                    break;
               }
          }

          buffer_append_on_new_line(buffer, line);
     }

     buffer->status = CE_BUFFER_STATUS_READONLY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe920
movq $0x0, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x416b0
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x228, -0x118(%rbp), %rcx # imm = 0x228
addq %rcx, %rax
movq %rax, -0x120(%rbp)
movl $0x0, -0x124(%rbp)
movq $0x0, -0x130(%rbp)
movq -0x130(%rbp), %rax
movq -0x120(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x414a8
movq -0x120(%rbp), %rax
movq (%rax), %rax
movq -0x130(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x134(%rbp)
leaq -0x110(%rbp), %rax
movslq -0x124(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
movl $0x100, %eax            # imm = 0x100
subl -0x124(%rbp), %eax
cltq
movq %rax, -0x148(%rbp)
movl -0x134(%rbp), %edi
callq 0x41170
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rsi
movq %rax, %rcx
leaq 0x475c(%rip), %rdx      # 0x45bda
movb $0x0, %al
callq 0xd250
addl -0x124(%rbp), %eax
movl %eax, -0x124(%rbp)
movq -0x130(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x130(%rbp)
jmp 0x413fd
leaq -0x110(%rbp), %rdi
movslq -0x124(%rbp), %rax
addq %rax, %rdi
movl $0x100, %eax            # imm = 0x100
subl -0x124(%rbp), %eax
movslq %eax, %rsi
movq -0x120(%rbp), %rcx
addq $0x10, %rcx
leaq 0x46a4(%rip), %rdx      # 0x45b7d
movb $0x0, %al
callq 0xd250
addl -0x124(%rbp), %eax
movl %eax, -0x124(%rbp)
movq $0x0, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq -0x120(%rbp), %rcx
cmpq 0x218(%rcx), %rax
jge 0x41689
movq -0x120(%rbp), %rax
movq 0x210(%rax), %rax
movq -0x140(%rbp), %rcx
shlq $0x4, %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x154(%rbp)
testl %eax, %eax
je 0x4155d
jmp 0x4153a
movl -0x154(%rbp), %eax
subl $0x1, %eax
je 0x415bb
jmp 0x41547
movl -0x154(%rbp), %eax
subl $0x2, %eax
je 0x41617
jmp 0x41558
jmp 0x41670
leaq -0x110(%rbp), %rdi
movslq -0x124(%rbp), %rax
addq %rax, %rdi
movl $0x100, %eax            # imm = 0x100
subl -0x124(%rbp), %eax
movslq %eax, %rsi
movq -0x120(%rbp), %rax
movq 0x210(%rax), %rax
movq -0x140(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
leaq 0x3031(%rip), %rdx      # 0x445d4
movb $0x0, %al
callq 0xd250
addl -0x124(%rbp), %eax
movl %eax, -0x124(%rbp)
jmp 0x41670
leaq -0x110(%rbp), %rdi
movslq -0x124(%rbp), %rax
addq %rax, %rdi
movl $0x100, %eax            # imm = 0x100
subl -0x124(%rbp), %eax
movslq %eax, %rsi
movq -0x120(%rbp), %rax
movq 0x210(%rax), %rax
movq -0x140(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
leaq 0x4582(%rip), %rdx      # 0x45b84
movb $0x1, %al
callq 0xd250
addl -0x124(%rbp), %eax
movl %eax, -0x124(%rbp)
jmp 0x41670
leaq -0x110(%rbp), %rdi
movslq -0x124(%rbp), %rax
addq %rax, %rdi
movl $0x100, %eax            # imm = 0x100
subl -0x124(%rbp), %eax
movslq %eax, %rsi
movq -0x120(%rbp), %rax
movq 0x210(%rax), %rax
movq -0x140(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
leaq 0x26ae(%rip), %rdx      # 0x43d0b
movb $0x0, %al
callq 0xd250
addl -0x124(%rbp), %eax
movl %eax, -0x124(%rbp)
jmp 0x41672
movq -0x140(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
jmp 0x414f7
movq -0x8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x14fd0
movq -0x118(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x118(%rbp)
jmp 0x413b7
movq -0x8(%rbp), %rax
movl $0x2, 0x18(%rax)
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)