LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_output_buffer_putter
static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser)
{
  tdefl_output_buffer *p = (tdefl_output_buffer *)pUser;
  size_t new_size = p->m_size + len;
  if (new_size > p->m_capacity)
  {
    size_t new_capacity = p->m_capacity; mz_uint8 *pNew_buf; if (!p->m_expandable) return MZ_FALSE;
    do { new_capacity = MZ_MAX(128U, new_capacity << 1U); } while (new_size > new_capacity);
    pNew_buf = (mz_uint8*)MZ_REALLOC(p->m_pBuf, new_capacity); if (!pNew_buf) return MZ_FALSE;
    p->m_pBuf = pNew_buf; p->m_capacity = new_capacity;
  }
  memcpy((mz_uint8*)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size;
  return MZ_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r15
movslq %esi, %r14
movq (%rdx), %r13
addq %r14, %r13
movq 0x8(%rdx), %r12
cmpq %r12, %r13
jbe 0x5b59
xorl %ebp, %ebp
cmpl $0x0, 0x18(%rbx)
je 0x5b73
movl $0x80, %eax
addq %r12, %r12
cmpq $0x81, %r12
cmovbq %rax, %r12
cmpq %r12, %r13
ja 0x5b2d
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x1100
testq %rax, %rax
je 0x5b73
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq 0x10(%rbx), %rdi
addq (%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10e0
movq %r13, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_compress_mem_to_mem
size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
{
  tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
  if (!pOut_buf) return 0;
  out_buf.m_pBuf = (mz_uint8*)pOut_buf; out_buf.m_capacity = out_buf_len;
  if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return 0;
  return out_buf.m_size;
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x5bc6
movq %rsp, %rax
movq %rdi, 0x10(%rax)
movq %rsi, 0x8(%rax)
leaq -0xae(%rip), %r9        # 0x5afd
movq %rdx, %rdi
movq %rcx, %rsi
movq %r9, %rdx
movq %rax, %rcx
callq 0x5a18
testl %eax, %eax
je 0x5bc6
movq (%rsp), %rax
jmp 0x5bc8
xorl %eax, %eax
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_record_literal
static __forceinline void tdefl_record_literal(tdefl_compressor *d, mz_uint8 lit)
{
  d->m_total_lz_bytes++;
  *d->m_pLZ_code_buf++ = lit;
  *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }
  d->m_huff_count[0][lit]++;
}

// Assembly:
incl 0x5c(%rdi)
movq 0x38(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x38(%rdi)
movb %sil, (%rax)
movq 0x40(%rdi), %rax
shrb (%rax)
decl 0x58(%rdi)
jne 0x5e78
movl $0x8, 0x58(%rdi)
movq 0x38(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movzbl %sil, %eax
incw 0x81d2(%rdi,%rax,2)
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_record_match
static __forceinline void tdefl_record_match(tdefl_compressor *d, mz_uint match_len, mz_uint match_dist)
{
  mz_uint32 s0, s1;

  MZ_ASSERT((match_len >= TDEFL_MIN_MATCH_LEN) && (match_dist >= 1) && (match_dist <= TDEFL_LZ_DICT_SIZE));

  d->m_total_lz_bytes += match_len;

  d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN);

  match_dist -= 1;
  d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF);
  d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); d->m_pLZ_code_buf += 3;

  *d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }

  s0 = s_tdefl_small_dist_sym[match_dist & 511]; s1 = s_tdefl_large_dist_sym[match_dist >> 8];
  d->m_huff_count[1][(match_dist < 512) ? s0 : s1]++;

  d->m_huff_count[0][s_tdefl_len_sym[match_len - TDEFL_MIN_MATCH_LEN]]++;
}

// Assembly:
cmpl $0x3, %esi
jb 0x5f35
decl %edx
cmpl $0x8000, %edx           # imm = 0x8000
jae 0x5f35
addl %esi, 0x5c(%rdi)
addl $-0x3, %esi
movq 0x38(%rdi), %rax
movb %sil, (%rax)
movq 0x38(%rdi), %rax
movb %dl, 0x1(%rax)
movl %edx, %eax
shrl $0x8, %eax
movq 0x38(%rdi), %rcx
movb %al, 0x2(%rcx)
addq $0x3, 0x38(%rdi)
movq 0x40(%rdi), %rcx
movb (%rcx), %r8b
shrb %r8b
orb $-0x80, %r8b
movb %r8b, (%rcx)
decl 0x58(%rdi)
jne 0x5eee
movl $0x8, 0x58(%rdi)
movq 0x38(%rdi), %rcx
leaq 0x1(%rcx), %r8
movq %r8, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movl %edx, %ecx
andl $0x1ff, %ecx            # imm = 0x1FF
leaq 0x2663(%rip), %r8       # 0x8560
addq %rcx, %r8
leaq 0x2859(%rip), %rcx      # 0x8760
addq %rax, %rcx
cmpl $0x200, %edx            # imm = 0x200
cmovbq %r8, %rcx
movzbl (%rcx), %eax
incw 0x8412(%rdi,%rax,2)
movl %esi, %eax
leaq 0x28b8(%rip), %rcx      # 0x87e0
movzwl (%rcx,%rax,2), %eax
incw 0x81d2(%rdi,%rax,2)
retq
pushq %rax
leaq 0x315e(%rip), %rdi      # 0x909b
leaq 0x2f66(%rip), %rsi      # 0x8eaa
leaq 0x31ae(%rip), %rcx      # 0x90f9
movl $0x856, %edx            # imm = 0x856
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/KhuramAli[P]JAM-Benchmark/stack_lock-synchronized/code05.cpp
// Function: main
int main()
{
	std::thread t1{ produce };
	std::thread t2{ consume };
	std::thread t3{ consume };
	t1.join();
	t2.join();
	t3.join();
	consume();
	std::cout << sum << '\n';
}

// Assembly:
subq $0x28, %rsp
leaq -0x140(%rip), %rsi      # 0x130c
leaq 0x20(%rsp), %rdi
callq 0x1510
leaq -0xae(%rip), %rsi       # 0x13af
leaq 0x18(%rsp), %rdi
callq 0x1510
leaq -0xbf(%rip), %rsi       # 0x13af
leaq 0x10(%rsp), %rdi
callq 0x1510
leaq 0x20(%rsp), %rdi
callq 0x1150
leaq 0x18(%rsp), %rdi
callq 0x1150
leaq 0x10(%rsp), %rdi
callq 0x1150
callq 0x13af
movl 0x2c97(%rip), %esi      # 0x4138
movq 0x2b30(%rip), %rdi      # 0x3fd8
callq 0x1160
leaq 0xf(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x10f0
cmpq $0x0, 0x10(%rsp)
jne 0x1505
cmpq $0x0, 0x18(%rsp)
jne 0x1505
cmpq $0x0, 0x20(%rsp)
jne 0x1505
xorl %eax, %eax
addq $0x28, %rsp
retq
jmp 0x14ed
jmp 0x14f5
cmpq $0x0, 0x10(%rsp)
jne 0x1505
cmpq $0x0, 0x18(%rsp)
jne 0x1505
cmpq $0x0, 0x20(%rsp)
jne 0x1505
movq %rax, %rdi
callq 0x1170
callq 0x1030
// File: /workspace/github_c_makefile_star2_O1/vanhauser-thc[P]vulntest/strcpy.c
// Function: main
int main(int argc, char *argv[]) {
  char buf[16] = "";
  char *in = argv[1], *out = buf;

  if (argc > 1) {
    strcpy(out, in);
  }
  (void)printf(buf);

  return 0;
}

// Assembly:
subq $0x18, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpl $0x2, %edi
jl 0x1168
movq 0x8(%rsi), %rsi
movq %rsp, %rdi
callq 0x1030
movq %rsp, %rdi
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/pali[P]bmfdec/bmfparse.c
// Function: print_variable_type
static void print_variable_type(FILE *fout, struct mof_variable *variable) {
  char *variable_type = "unknown";
  char *type = NULL;
  switch (variable->variable_type) {
  case MOF_VARIABLE_BASIC:
  case MOF_VARIABLE_BASIC_ARRAY:
    variable_type = "Basic";
    switch (variable->type.basic) {
    case MOF_BASIC_TYPE_STRING: type = "String"; break;
    case MOF_BASIC_TYPE_REAL64: type = "Real64"; break;
    case MOF_BASIC_TYPE_REAL32: type = "Real32"; break;
    case MOF_BASIC_TYPE_SINT32: type = "SInt32"; break;
    case MOF_BASIC_TYPE_UINT32: type = "UInt32"; break;
    case MOF_BASIC_TYPE_SINT16: type = "SInt16"; break;
    case MOF_BASIC_TYPE_UINT16: type = "UInt16"; break;
    case MOF_BASIC_TYPE_SINT64: type = "SInt64"; break;
    case MOF_BASIC_TYPE_UINT64: type = "UInt64"; break;
    case MOF_BASIC_TYPE_SINT8: type = "SInt8"; break;
    case MOF_BASIC_TYPE_UINT8: type = "UInt8"; break;
    case MOF_BASIC_TYPE_DATETIME: type = "Datetime"; break;
    case MOF_BASIC_TYPE_CHAR16: type = "Char16"; break;
    case MOF_BASIC_TYPE_BOOLEAN: type = "Boolean"; break;
    default: type = "unknown"; break;
    }
    break;
  case MOF_VARIABLE_OBJECT:
  case MOF_VARIABLE_OBJECT_ARRAY:
    variable_type = "Object";
    type = variable->type.object;
    break;
  default:
    break;
  }
  fprintf(fout, "%s", variable_type);
  if (type)
    fprintf(fout, ":%s", type);
  if (variable->variable_type == MOF_VARIABLE_BASIC_ARRAY || variable->variable_type == MOF_VARIABLE_OBJECT_ARRAY) {
    fprintf(fout, "[");
    if (variable->has_array_max)
      fprintf(fout, "%d", variable->array_max);
    fprintf(fout, "]");
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x18(%rsi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x5eb2
leaq 0x1298(%rip), %rcx      # 0x7100
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x20(%r14), %eax
decl %eax
cmpl $0xe, %eax
jae 0x5ea2
movl %eax, %eax
leaq 0x4eeb(%rip), %rcx      # 0xad70
leaq (%rcx,%rax,8), %rax
leaq 0x1c0f(%rip), %rdi      # 0x7a9f
jmp 0x5e9d
leaq 0x20(%r14), %rax
leaq 0x1c08(%rip), %rdi      # 0x7aa5
movq (%rax), %r15
jmp 0x5ebc
leaq 0x152b(%rip), %r15      # 0x73d4
leaq 0x1bef(%rip), %rdi      # 0x7a9f
jmp 0x5ebc
leaq 0x151b(%rip), %rdi      # 0x73d4
xorl %r15d, %r15d
movq %rbx, %rsi
callq 0x10b0
testq %r15, %r15
je 0x5edd
leaq 0x1bdc(%rip), %rsi      # 0x7aac
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10f0
movl 0x18(%r14), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x5f24
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x10c0
cmpb $0x0, 0x2c(%r14)
je 0x5f12
movl 0x28(%r14), %edx
leaq 0x1ba8(%rip), %rsi      # 0x7ab0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10f0
movl $0x5d, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x10c0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pali[P]bmfdec/bmfparse.c
// Function: print_variable
static void print_variable(FILE *fout, struct mof_variable *variable, int indent) {
  fprintf(fout, "%*.s  Name=%s\n", indent, "", variable->name);
  fprintf(fout, "%*.s  Type=", indent, "");
  print_variable_type(fout, variable);
  fprintf(fout, "\n");
  print_qualifiers(fout, variable->qualifiers, variable->qualifiers_count, indent+2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rsi), %r8
leaq 0x1a47(%rip), %rsi      # 0x798c
leaq 0x15d1(%rip), %r12      # 0x751d
movq %r12, %rcx
xorl %eax, %eax
callq 0x10f0
leaq 0x1b36(%rip), %rsi      # 0x7a93
movq %r14, %rdi
movl %ebx, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x10f0
movq %r14, %rdi
movq %r15, %rsi
callq 0x5e4c
movl $0xa, %edi
movq %r14, %rsi
callq 0x10c0
movq 0x8(%r15), %rsi
movl (%r15), %edx
addl $0x2, %ebx
movq %r14, %rdi
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5c4e
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_murmur_hash
NK_API nk_hash
nk_murmur_hash(const void * key, int len, nk_hash seed)
{
    /* 32-Bit MurmurHash3: https://code.google.com/p/smhasher/wiki/MurmurHash3*/
    #define NK_ROTL(x,r) ((x) << (r) | ((x) >> (32 - r)))
    union {const nk_uint *i; const nk_byte *b;} conv = {0};
    const nk_byte *data = (const nk_byte*)key;
    const int nblocks = len/4;
    nk_uint h1 = seed;
    const nk_uint c1 = 0xcc9e2d51;
    const nk_uint c2 = 0x1b873593;
    const nk_byte *tail;
    const nk_uint *blocks;
    nk_uint k1;
    int i;

    /* body */
    if (!key) return 0;
    conv.b = (data + nblocks*4);
    blocks = (const nk_uint*)conv.i;
    for (i = -nblocks; i; ++i) {
        k1 = blocks[i];
        k1 *= c1;
        k1 = NK_ROTL(k1,15);
        k1 *= c2;

        h1 ^= k1;
        h1 = NK_ROTL(h1,13);
        h1 = h1*5+0xe6546b64;
    }

    /* tail */
    tail = (const nk_byte*)(data + nblocks*4);
    k1 = 0;
    switch (len & 3) {
    case 3: k1 ^= (nk_uint)(tail[2] << 16); /* fallthrough */
    case 2: k1 ^= (nk_uint)(tail[1] << 8u); /* fallthrough */
    case 1: k1 ^= tail[0];
            k1 *= c1;
            k1 = NK_ROTL(k1,15);
            k1 *= c2;
            h1 ^= k1;
            break;
    default: break;
    }

    /* finalization */
    h1 ^= (nk_uint)len;
    /* fmix32 */
    h1 ^= h1 >> 16;
    h1 *= 0x85ebca6b;
    h1 ^= h1 >> 13;
    h1 *= 0xc2b2ae35;
    h1 ^= h1 >> 16;

    #undef NK_ROTL
    return h1;
}

// Assembly:
testq %rdi, %rdi
je 0x3f7d
leal 0x3(%rsi), %ecx
testl %esi, %esi
movl %esi, %eax
cmovsl %ecx, %eax
movl %eax, %r8d
andl $-0x4, %r8d
movslq %r8d, %r8
addq %r8, %rdi
cmpl $0x7, %ecx
jb 0x3f14
sarl $0x2, %eax
negl %eax
cltq
movl (%rdi,%rax,4), %ecx
imull $0xcc9e2d51, %ecx, %r8d # imm = 0xCC9E2D51
imull $0x16a88000, %ecx, %ecx # imm = 0x16A88000
shrl $0x11, %r8d
orl %ecx, %r8d
imull $0x1b873593, %r8d, %ecx # imm = 0x1B873593
xorl %edx, %ecx
roll $0xd, %ecx
leal (%rcx,%rcx,4), %edx
addl $0xe6546b64, %edx       # imm = 0xE6546B64
incq %rax
jne 0x3ee3
movl %esi, %ecx
andl $0x3, %ecx
xorl %eax, %eax
leaq 0x2455e(%rip), %r8      # 0x28480
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
movzbl 0x2(%rdi), %eax
shll $0x10, %eax
movzbl 0x1(%rdi), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl (%rdi), %ecx
xorl %eax, %ecx
imull $0xcc9e2d51, %ecx, %eax # imm = 0xCC9E2D51
imull $0x16a88000, %ecx, %ecx # imm = 0x16A88000
shrl $0x11, %eax
orl %ecx, %eax
imull $0x1b873593, %eax, %eax # imm = 0x1B873593
xorl %eax, %edx
xorl %esi, %edx
movl %edx, %eax
shrl $0x10, %eax
xorl %edx, %eax
imull $0x85ebca6b, %eax, %eax # imm = 0x85EBCA6B
movl %eax, %ecx
shrl $0xd, %ecx
xorl %eax, %ecx
imull $0xc2b2ae35, %ecx, %ecx # imm = 0xC2B2AE35
movl %ecx, %eax
shrl $0x10, %eax
xorl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_color_hsva_bv
NK_API void
nk_color_hsva_bv(nk_byte *out, struct nk_color in)
{
    int tmp[4];
    nk_color_hsva_i(&tmp[0], &tmp[1], &tmp[2], &tmp[3], in);
    out[0] = (nk_byte)tmp[0];
    out[1] = (nk_byte)tmp[1];
    out[2] = (nk_byte)tmp[2];
    out[3] = (nk_byte)tmp[3];
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r8d
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %rsp, %r14
movq %r14, %rdi
callq 0x4cbc
movb (%r14), %al
movb %al, (%rbx)
movb 0x4(%r14), %al
movb %al, 0x1(%rbx)
movb 0x8(%r14), %al
movb %al, 0x2(%rbx)
movb 0xc(%r14), %al
movb %al, 0x3(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_str_append_str_utf8
NK_API int
nk_str_append_str_utf8(struct nk_str *str, const char *text)
{
    int runes = 0;
    int byte_len = 0;
    int num_runes = 0;
    int glyph_len = 0;
    nk_rune unicode;
    if (!str || !text) return 0;

    glyph_len = byte_len = nk_utf_decode(text+byte_len, &unicode, 4);
    while (unicode != '\0' && glyph_len) {
        glyph_len = nk_utf_decode(text+byte_len, &unicode, 4);
        byte_len += glyph_len;
        num_runes++;
    }
    nk_str_append_text_char(str, text, byte_len);
    return runes;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x5eb5
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4(%rsp), %r12
movq %rsi, %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x4edc
movl %eax, %r15d
cmpl $0x0, (%r12)
setne %al
testl %r15d, %r15d
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5e9c
leaq 0x4(%rsp), %r12
movslq %r15d, %r15
leaq (%rbx,%r15), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x4edc
addl %eax, %r15d
cmpl $0x0, 0x4(%rsp)
je 0x5e9c
testl %eax, %eax
jne 0x5e7a
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x5ceb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_str_insert_str_utf8
NK_API int
nk_str_insert_str_utf8(struct nk_str *str, int pos, const char *text)
{
    int runes = 0;
    int byte_len = 0;
    int num_runes = 0;
    int glyph_len = 0;
    nk_rune unicode;
    if (!str || !text) return 0;

    glyph_len = byte_len = nk_utf_decode(text+byte_len, &unicode, 4);
    while (unicode != '\0' && glyph_len) {
        glyph_len = nk_utf_decode(text+byte_len, &unicode, 4);
        byte_len += glyph_len;
        num_runes++;
    }
    nk_str_insert_at_rune(str, pos, text, byte_len);
    return runes;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x6516
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xc(%rsp), %r12
movq %rdx, %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x4edc
movl %eax, %r15d
cmpl $0x0, (%r12)
setne %al
testl %r15d, %r15d
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x64fa
leaq 0xc(%rsp), %r12
movslq %r15d, %r15
leaq (%rbx,%r15), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x4edc
addl %eax, %r15d
cmpl $0x0, 0xc(%rsp)
je 0x64fa
testl %eax, %eax
jne 0x64d8
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movl %r15d, %ecx
callq 0x6173
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_input_key
NK_API void
nk_input_key(struct nk_context *ctx, enum nk_keys key, int down)
{
    struct nk_input *in;
    NK_ASSERT(ctx);
    if (!ctx) return;
    in = &ctx->input;
    if (in->keyboard.keys[key].down != down)
        in->keyboard.keys[key].clicked++;
    in->keyboard.keys[key].down = down;
}

// Assembly:
testq %rdi, %rdi
je 0x8291
movl %esi, %eax
cmpl %edx, (%rdi,%rax,8)
je 0x828d
incl 0x4(%rdi,%rax,8)
movl %edx, (%rdi,%rax,8)
retq
pushq %rax
leaq 0x2427c(%rip), %rdi     # 0x2c515
leaq 0x213e3(%rip), %rsi     # 0x29683
leaq 0x2246f(%rip), %rcx     # 0x2a716
movl $0x365c, %edx           # imm = 0x365C
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_input_button
NK_API void
nk_input_button(struct nk_context *ctx, enum nk_buttons id, int x, int y, int down)
{
    struct nk_mouse_button *btn;
    struct nk_input *in;
    NK_ASSERT(ctx);
    if (!ctx) return;
    in = &ctx->input;
    if (in->mouse.buttons[id].down == down) return;

    btn = &in->mouse.buttons[id];
    btn->clicked_pos.x = (float)x;
    btn->clicked_pos.y = (float)y;
    btn->down = down;
    btn->clicked++;
}

// Assembly:
testq %rdi, %rdi
je 0x82eb
movl %esi, %eax
shlq $0x4, %rax
cmpl %r8d, 0x104(%rdi,%rax)
je 0x82ea
addq %rdi, %rax
addq $0x104, %rax            # imm = 0x104
cvtsi2ss %edx, %xmm0
movss %xmm0, 0x8(%rax)
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0xc(%rax)
movl %r8d, (%rax)
incl 0x4(%rax)
retq
pushq %rax
leaq 0x24222(%rip), %rdi     # 0x2c515
leaq 0x21389(%rip), %rsi     # 0x29683
leaq 0x2244f(%rip), %rcx     # 0x2a750
movl $0x3668, %edx           # imm = 0x3668
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_input_scroll
NK_API void
nk_input_scroll(struct nk_context *ctx, struct nk_vec2 val)
{
    NK_ASSERT(ctx);
    if (!ctx) return;
    ctx->input.mouse.scroll_delta.x += val.x;
    ctx->input.mouse.scroll_delta.y += val.y;
}

// Assembly:
testq %rdi, %rdi
je 0x8339
movss 0x15c(%rdi), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x15c(%rdi)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss 0x160(%rdi), %xmm0
movss %xmm0, 0x160(%rdi)
retq
pushq %rax
leaq 0x241d4(%rip), %rdi     # 0x2c515
leaq 0x2133b(%rip), %rsi     # 0x29683
leaq 0x2244b(%rip), %rcx     # 0x2a79a
movl $0x3676, %edx           # imm = 0x3676
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_input_has_mouse_click_down_in_rect
NK_API int
nk_input_has_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id,
    struct nk_rect b, int down)
{
    const struct nk_mouse_button *btn;
    if (!i) return nk_false;
    btn = &i->mouse.buttons[id];
    return nk_input_has_mouse_click_in_rect(i, id, b) && (btn->down == down);
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x8542
movl %esi, %ecx
movq %rcx, %rsi
shlq $0x4, %rsi
movss 0x10c(%rdi,%rsi), %xmm2
ucomiss %xmm0, %xmm2
jb 0x8542
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
ucomiss %xmm2, %xmm3
jbe 0x8542
addq %rdi, %rsi
addq $0x10c, %rsi            # imm = 0x10C
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
movss 0x4(%rsi), %xmm2
ucomiss %xmm3, %xmm2
jb 0x8542
addps %xmm1, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
ucomiss %xmm2, %xmm0
jbe 0x8542
shlq $0x4, %rcx
xorl %eax, %eax
cmpl %edx, 0x104(%rdi,%rcx)
sete %al
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_input_is_mouse_click_down_in_rect
NK_API int
nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id,
    struct nk_rect b, int down)
{
    const struct nk_mouse_button *btn;
    if (!i) return nk_false;
    btn = &i->mouse.buttons[id];
    return (nk_input_has_mouse_click_down_in_rect(i, id, b, down) &&
            btn->clicked) ? nk_true : nk_false;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x8626
movl %esi, %ecx
movq %rcx, %rsi
shlq $0x4, %rsi
movss 0x10c(%rdi,%rsi), %xmm2
ucomiss %xmm0, %xmm2
jb 0x8626
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
ucomiss %xmm2, %xmm3
jbe 0x8626
leaq (%rdi,%rsi), %r8
addq $0x10c, %r8             # imm = 0x10C
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
movss 0x4(%r8), %xmm2
ucomiss %xmm3, %xmm2
jb 0x8626
addps %xmm1, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
ucomiss %xmm2, %xmm0
jbe 0x8626
leaq 0x104(%rdi), %r8
cmpl %edx, (%r8,%rsi)
jne 0x8626
shlq $0x4, %rcx
xorl %eax, %eax
cmpl $0x0, 0x108(%rdi,%rcx)
setne %al
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_style_set_cursor
NK_API int
nk_style_set_cursor(struct nk_context *ctx, enum nk_style_cursor c)
{
    struct nk_style *style;
    NK_ASSERT(ctx);
    if (!ctx) return 0;
    style = &ctx->style;
    if (style->cursors[c]) {
        style->cursor_active = style->cursors[c];
        return 1;
    }
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0xa6a3
movl %esi, %eax
movq 0x170(%rdi,%rax,8), %rax
testq %rax, %rax
je 0xa6a0
movq %rax, 0x1a8(%rdi)
movl $0x1, %eax
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x21e6a(%rip), %rdi     # 0x2c515
leaq 0x1efd1(%rip), %rsi     # 0x29683
leaq 0x205ef(%rip), %rcx     # 0x2aca8
movl $0x39f2, %edx           # imm = 0x39F2
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_init_fixed
NK_API int
nk_init_fixed(struct nk_context *ctx, void *memory, nk_size size,
    const struct nk_user_font *font)
{
    NK_ASSERT(memory);
    if (!memory) return 0;
    nk_setup(ctx, font);
    nk_buffer_init_fixed(&ctx->memory, memory, size);
    ctx->use_pool = nk_false;
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0xa867
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rcx, %rsi
callq 0xa886
leaq 0x1ee0(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x54e1
movl $0x0, 0x3f84(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x20524(%rip), %rdi     # 0x2ad92
leaq 0x1ee0e(%rip), %rsi     # 0x29683
leaq 0x2051d(%rip), %rcx     # 0x2ad99
movl $0x3a41, %edx           # imm = 0x3A41
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_window_has_focus
NK_API int
nk_window_has_focus(const struct nk_context *ctx)
{
    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current) return 0;
    return ctx->current == ctx->active;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xd8f7
movq 0x3fe8(%rdi), %rcx
testq %rcx, %rcx
je 0xd916
cmpq $0x0, 0xa8(%rcx)
je 0xd935
xorl %eax, %eax
cmpq 0x3fe0(%rdi), %rcx
sete %al
popq %rcx
retq
leaq 0x1ec17(%rip), %rdi     # 0x2c515
leaq 0x1bd7e(%rip), %rsi     # 0x29683
leaq 0x1dad5(%rip), %rcx     # 0x2b3e1
movl $0x4045, %edx           # imm = 0x4045
callq 0x3100
leaq 0x1d82a(%rip), %rdi     # 0x2b147
leaq 0x1bd5f(%rip), %rsi     # 0x29683
leaq 0x1dab6(%rip), %rcx     # 0x2b3e1
movl $0x4046, %edx           # imm = 0x4046
callq 0x3100
leaq 0x1d987(%rip), %rdi     # 0x2b2c3
leaq 0x1bd40(%rip), %rsi     # 0x29683
leaq 0x1da97(%rip), %rcx     # 0x2b3e1
movl $0x4047, %edx           # imm = 0x4047
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_window_is_hovered
NK_API int
nk_window_is_hovered(struct nk_context *ctx)
{
    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    if (!ctx || !ctx->current) return 0;
    if(ctx->current->flags & NK_WINDOW_HIDDEN)
        return 0;
    return nk_input_is_mouse_hovering_rect(&ctx->input, ctx->current->bounds);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xd9b6
movq 0x3fe8(%rdi), %rcx
testq %rcx, %rcx
je 0xd9d5
xorl %eax, %eax
testb $0x20, 0x49(%rcx)
jne 0xd9b4
movsd 0x4c(%rcx), %xmm0
movss 0x144(%rdi), %xmm2
ucomiss %xmm0, %xmm2
jb 0xd9b4
movsd 0x54(%rcx), %xmm1
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
ucomiss %xmm2, %xmm3
jbe 0xd9b4
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
movss 0x148(%rdi), %xmm2
ucomiss %xmm3, %xmm2
jb 0xd9b4
addps %xmm1, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
xorl %eax, %eax
ucomiss %xmm2, %xmm0
seta %al
popq %rcx
retq
leaq 0x1eb58(%rip), %rdi     # 0x2c515
leaq 0x1bcbf(%rip), %rsi     # 0x29683
leaq 0x1da49(%rip), %rcx     # 0x2b414
movl $0x404e, %edx           # imm = 0x404E
callq 0x3100
leaq 0x1d76b(%rip), %rdi     # 0x2b147
leaq 0x1bca0(%rip), %rsi     # 0x29683
leaq 0x1da2a(%rip), %rcx     # 0x2b414
movl $0x404f, %edx           # imm = 0x404F
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_window_set_position
NK_API void
nk_window_set_position(struct nk_context *ctx,
    const char *name, struct nk_vec2 pos)
{
    struct nk_window *win = nk_window_find(ctx, name);
    if (!win) return;
    win->bounds.x = pos.x;
    win->bounds.y = pos.y;
}

// Assembly:
subq $0x18, %rsp
movaps %xmm0, (%rsp)
callq 0xdd18
testq %rax, %rax
je 0xde4c
movaps (%rsp), %xmm0
movss %xmm0, 0x4c(%rax)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x50(%rax)
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_window_set_size
NK_API void
nk_window_set_size(struct nk_context *ctx,
    const char *name, struct nk_vec2 size)
{
    struct nk_window *win = nk_window_find(ctx, name);
    if (!win) return;
    win->bounds.w = size.x;
    win->bounds.h = size.y;
}

// Assembly:
subq $0x18, %rsp
movaps %xmm0, (%rsp)
callq 0xdd18
testq %rax, %rax
je 0xde75
movaps (%rsp), %xmm0
movss %xmm0, 0x54(%rax)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x58(%rax)
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_popup_close
NK_API void
nk_popup_close(struct nk_context *ctx)
{
    struct nk_window *popup;
    NK_ASSERT(ctx);
    if (!ctx || !ctx->current) return;

    popup = ctx->current;
    NK_ASSERT(popup->parent);
    NK_ASSERT(popup->layout->type & NK_PANEL_SET_POPUP);
    popup->flags |= NK_WINDOW_HIDDEN;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xe416
movq 0x3fe8(%rdi), %rax
testq %rax, %rax
je 0xe414
cmpq $0x0, 0x1d0(%rax)
je 0xe435
movq 0xa8(%rax), %rcx
testb $-0xc, (%rcx)
je 0xe454
orb $0x20, 0x49(%rax)
popq %rax
retq
leaq 0x1e0f8(%rip), %rdi     # 0x2c515
leaq 0x1b25f(%rip), %rsi     # 0x29683
leaq 0x1d48a(%rip), %rcx     # 0x2b8b5
movl $0x41ea, %edx           # imm = 0x41EA
callq 0x3100
leaq 0x1d4a2(%rip), %rdi     # 0x2b8de
leaq 0x1b240(%rip), %rsi     # 0x29683
leaq 0x1d46b(%rip), %rcx     # 0x2b8b5
movl $0x41ee, %edx           # imm = 0x41EE
callq 0x3100
leaq 0x1d491(%rip), %rdi     # 0x2b8ec
leaq 0x1b221(%rip), %rsi     # 0x29683
leaq 0x1d44c(%rip), %rcx     # 0x2b8b5
movl $0x41ef, %edx           # imm = 0x41EF
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_widget_fitting
NK_API enum nk_widget_layout_states
nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx,
    struct nk_vec2 item_padding)
{
    /* update the bounds to stand without padding  */
    struct nk_window *win;
    struct nk_style *style;
    struct nk_panel *layout;
    enum nk_widget_layout_states state;
    struct nk_vec2 panel_padding;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout)
        return NK_WIDGET_INVALID;

    win = ctx->current;
    style = &ctx->style;
    layout = win->layout;
    state = nk_widget(bounds, ctx);

    panel_padding = nk_panel_get_padding(style, layout->type);
    if (layout->row.index == 1) {
        bounds->w += panel_padding.x;
        bounds->x -= panel_padding.x;
    } else bounds->x -= item_padding.x;

    if (layout->row.index == layout->row.columns)
        bounds->w += panel_padding.x;
    else bounds->w += item_padding.x;
    return state;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
je 0xed41
movq 0x3fe8(%rsi), %rax
testq %rax, %rax
je 0xed60
movaps %xmm0, (%rsp)
movq 0xa8(%rax), %r15
testq %r15, %r15
je 0xed7f
movq %rdi, %rbx
leaq 0x168(%rsi), %r14
callq 0xfda9
movl %eax, %ebp
movl (%r15), %esi
movq %r14, %rdi
callq 0xfa23
movl 0x74(%r15), %eax
cmpl $0x1, %eax
jne 0xed0b
movss 0x8(%rbx), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x8(%rbx)
movaps %xmm0, %xmm1
movaps (%rsp), %xmm3
jmp 0xed12
movaps (%rsp), %xmm3
movaps %xmm3, %xmm1
movss (%rbx), %xmm2
subss %xmm1, %xmm2
movss %xmm2, (%rbx)
cmpl 0x80(%r15), %eax
je 0xed2a
movaps %xmm3, %xmm0
addss 0x8(%rbx), %xmm0
movss %xmm0, 0x8(%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d7cd(%rip), %rdi     # 0x2c515
leaq 0x1a934(%rip), %rsi     # 0x29683
leaq 0x1da52(%rip), %rcx     # 0x2c7a8
movl $0x4a2b, %edx           # imm = 0x4A2B
callq 0x3100
leaq 0x1c3e0(%rip), %rdi     # 0x2b147
leaq 0x1a915(%rip), %rsi     # 0x29683
leaq 0x1da33(%rip), %rcx     # 0x2c7a8
movl $0x4a2c, %edx           # imm = 0x4A2C
callq 0x3100
leaq 0x1c53d(%rip), %rdi     # 0x2b2c3
leaq 0x1a8f6(%rip), %rsi     # 0x29683
leaq 0x1da14(%rip), %rcx     # 0x2c7a8
movl $0x4a2d, %edx           # imm = 0x4A2D
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_tree_state_pop
NK_API void
nk_tree_state_pop(struct nk_context *ctx)
{
    struct nk_window *win = 0;
    struct nk_panel *layout = 0;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout)
        return;

    win = ctx->current;
    layout = win->layout;
    layout->at_x -= ctx->style.tab.indent + ctx->style.window.padding.x;
    layout->bounds.w += ctx->style.tab.indent + ctx->style.window.padding.x;
    NK_ASSERT(layout->row.tree_depth);
    layout->row.tree_depth--;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x12243
movq 0x3fe8(%rdi), %rax
testq %rax, %rax
je 0x12262
movq 0xa8(%rax), %rax
testq %rax, %rax
je 0x12281
movss 0x1a98(%rdi), %xmm0
addss 0x1ea4(%rdi), %xmm0
movss 0x28(%rax), %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0x28(%rax)
addss 0x10(%rax), %xmm0
movss %xmm0, 0x10(%rax)
movl 0xb0(%rax), %ecx
testl %ecx, %ecx
je 0x122a0
decl %ecx
movl %ecx, 0xb0(%rax)
popq %rax
retq
leaq 0x1a2cb(%rip), %rdi     # 0x2c515
leaq 0x17432(%rip), %rsi     # 0x29683
leaq 0x1a156(%rip), %rcx     # 0x2c3ae
movl $0x47b4, %edx           # imm = 0x47B4
callq 0x3100
leaq 0x18ede(%rip), %rdi     # 0x2b147
leaq 0x17413(%rip), %rsi     # 0x29683
leaq 0x1a137(%rip), %rcx     # 0x2c3ae
movl $0x47b5, %edx           # imm = 0x47B5
callq 0x3100
leaq 0x1903b(%rip), %rdi     # 0x2b2c3
leaq 0x173f4(%rip), %rsi     # 0x29683
leaq 0x1a118(%rip), %rcx     # 0x2c3ae
movl $0x47b6, %edx           # imm = 0x47B6
callq 0x3100
leaq 0x1d9ad(%rip), %rdi     # 0x2fc54
leaq 0x173d5(%rip), %rsi     # 0x29683
leaq 0x1a0f9(%rip), %rcx     # 0x2c3ae
movl $0x47be, %edx           # imm = 0x47BE
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_subimage_ptr
NK_API struct nk_image
nk_subimage_ptr(void *ptr, unsigned short w, unsigned short h, struct nk_rect r)
{
    struct nk_image s;
    nk_zero(&s, sizeof(s));
    s.handle.ptr = ptr;
    s.w = w; s.h = h;
    s.region[0] = (unsigned short)r.x;
    s.region[1] = (unsigned short)r.y;
    s.region[2] = (unsigned short)r.w;
    s.region[3] = (unsigned short)r.h;
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %esi
callq 0x5431
movq %r14, (%r15)
movw %bp, 0x8(%r15)
movw %bx, 0xa(%r15)
movaps (%rsp), %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0xc(%r15)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %eax
movw %ax, 0xe(%r15)
movaps 0x10(%rsp), %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x10(%r15)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %eax
movw %ax, 0x12(%r15)
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_subimage_id
NK_API struct nk_image
nk_subimage_id(int id, unsigned short w, unsigned short h, struct nk_rect r)
{
    struct nk_image s;
    nk_zero(&s, sizeof(s));
    s.handle.id = id;
    s.w = w; s.h = h;
    s.region[0] = (unsigned short)r.x;
    s.region[1] = (unsigned short)r.y;
    s.region[2] = (unsigned short)r.w;
    s.region[3] = (unsigned short)r.h;
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x18, %esi
callq 0x5431
movl %r14d, (%r15)
movw %bp, 0x8(%r15)
movw %bx, 0xa(%r15)
movaps (%rsp), %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0xc(%r15)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %eax
movw %ax, 0xe(%r15)
movaps 0x10(%rsp), %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x10(%r15)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %eax
movw %ax, 0x12(%r15)
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_draw_button
NK_LIB const struct nk_style_item*
nk_draw_button(struct nk_command_buffer *out,
    const struct nk_rect *bounds, nk_flags state,
    const struct nk_style_button *style)
{
    const struct nk_style_item *background;
    if (state & NK_WIDGET_STATE_HOVER)
        background = &style->hover;
    else if (state & NK_WIDGET_STATE_ACTIVED)
        background = &style->active;
    else background = &style->normal;

    if (background->type == NK_STYLE_ITEM_IMAGE) {
        nk_draw_image(out, *bounds, &background->data.image, nk_white);
    } else {
        nk_fill_rect(out, *bounds, style->rounding, background->data.color);
        nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);
    }
    return background;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rsi, %r14
movl %edx, %eax
addl %edx, %eax
andl $0x40, %eax
testb $0x10, %dl
movl $0x20, %ecx
cmovel %eax, %ecx
movq %rdi, %r12
leaq (%r15,%rcx), %rbx
cmpl $0x1, (%r15,%rcx)
jne 0x153f8
leaq 0x8(%rbx), %rsi
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7b23
jmp 0x15437
movss 0x7c(%r15), %xmm2
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movl 0x8(%rbx), %esi
movq %r12, %rdi
callq 0x6fee
movss 0x7c(%r15), %xmm2
movss 0x78(%r15), %xmm3
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movl 0x60(%r15), %esi
movq %r12, %rdi
callq 0x6e96
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_check_text
NK_API int
nk_check_text(struct nk_context *ctx, const char *text, int len, int active)
{
    struct nk_window *win;
    struct nk_panel *layout;
    const struct nk_input *in;
    const struct nk_style *style;

    struct nk_rect bounds;
    enum nk_widget_layout_states state;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout)
        return active;

    win = ctx->current;
    style = &ctx->style;
    layout = win->layout;

    state = nk_widget(&bounds, ctx);
    if (!state) return active;
    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
    nk_do_toggle(&ctx->last_widget_state, &win->buffer, bounds, &active,
        text, len, NK_TOGGLE_CHECK, &style->checkbox, in, style->font);
    return active;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, 0xc(%rsp)
testq %rdi, %rdi
je 0x15af0
movq %rdi, %rbx
movq 0x3fe8(%rdi), %r15
testq %r15, %r15
je 0x15b0f
movq 0xa8(%r15), %r12
testq %r12, %r12
je 0x15b2e
movl %edx, %ebp
movq %rsi, %r14
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xfda9
testl %eax, %eax
je 0x15adf
cmpl $0x2, %eax
jne 0x15a8e
xorl %eax, %eax
jmp 0x15a9a
xorl %eax, %eax
testb $0x10, 0x5(%r12)
cmoveq %rbx, %rax
leaq 0x1f70(%rbx), %rdi
addq $0x68, %r15
leaq 0x4c8(%rbx), %r10
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
subq $0x8, %rsp
leaq 0x14(%rsp), %rdx
movq %r15, %rsi
movq %r14, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq 0x168(%rbx)
pushq %rax
pushq %r10
callq 0x15b4d
addq $0x20, %rsp
movl 0xc(%rsp), %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16a1e(%rip), %rdi     # 0x2c515
leaq 0x13b85(%rip), %rsi     # 0x29683
leaq 0x1744d(%rip), %rcx     # 0x2cf52
movl $0x4f68, %edx           # imm = 0x4F68
callq 0x3100
leaq 0x15631(%rip), %rdi     # 0x2b147
leaq 0x13b66(%rip), %rsi     # 0x29683
leaq 0x1742e(%rip), %rcx     # 0x2cf52
movl $0x4f69, %edx           # imm = 0x4F69
callq 0x3100
leaq 0x1578e(%rip), %rdi     # 0x2b2c3
leaq 0x13b47(%rip), %rsi     # 0x29683
leaq 0x1740f(%rip), %rcx     # 0x2cf52
movl $0x4f6a, %edx           # imm = 0x4F6A
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_checkbox_text
NK_API int
nk_checkbox_text(struct nk_context *ctx, const char *text, int len, int *active)
{
    int old_val;
    NK_ASSERT(ctx);
    NK_ASSERT(text);
    NK_ASSERT(active);
    if (!ctx || !text || !active) return 0;
    old_val = *active;
    *active = nk_check_text(ctx, text, len, *active);
    return old_val != *active;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x16287
testq %rsi, %rsi
je 0x162a6
movq %rcx, %rbx
testq %rcx, %rcx
je 0x162c5
movl (%rbx), %ebp
movl %ebp, %ecx
callq 0x15a33
movl %eax, (%rbx)
xorl %ecx, %ecx
cmpl %eax, %ebp
setne %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x16287(%rip), %rdi     # 0x2c515
leaq 0x133ee(%rip), %rsi     # 0x29683
leaq 0x16d5a(%rip), %rcx     # 0x2cff6
movl $0x4f8b, %edx           # imm = 0x4F8B
callq 0x3100
leaq 0x13a1a(%rip), %rdi     # 0x29cc7
leaq 0x133cf(%rip), %rsi     # 0x29683
leaq 0x16d3b(%rip), %rcx     # 0x2cff6
movl $0x4f8c, %edx           # imm = 0x4F8C
callq 0x3100
leaq 0x191db(%rip), %rdi     # 0x2f4a7
leaq 0x133b0(%rip), %rsi     # 0x29683
leaq 0x16d1c(%rip), %rcx     # 0x2cff6
movl $0x4f8d, %edx           # imm = 0x4F8D
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_option_text
NK_API int
nk_option_text(struct nk_context *ctx, const char *text, int len, int is_active)
{
    struct nk_window *win;
    struct nk_panel *layout;
    const struct nk_input *in;
    const struct nk_style *style;

    struct nk_rect bounds;
    enum nk_widget_layout_states state;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout)
        return is_active;

    win = ctx->current;
    style = &ctx->style;
    layout = win->layout;

    state = nk_widget(&bounds, ctx);
    if (!state) return (int)state;
    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
    nk_do_toggle(&ctx->last_widget_state, &win->buffer, bounds, &is_active,
        text, len, NK_TOGGLE_OPTION, &style->option, in, style->font);
    return is_active;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, 0xc(%rsp)
testq %rdi, %rdi
je 0x1650f
movq %rdi, %rbx
movq 0x3fe8(%rdi), %r15
testq %r15, %r15
je 0x1652e
movq 0xa8(%r15), %r12
testq %r12, %r12
je 0x1654d
movl %edx, %ebp
movq %rsi, %r14
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xfda9
testl %eax, %eax
je 0x16502
cmpl $0x2, %eax
jne 0x164a7
xorl %eax, %eax
jmp 0x164b3
xorl %eax, %eax
testb $0x10, 0x5(%r12)
cmoveq %rbx, %rax
leaq 0x1f70(%rbx), %rdi
addq $0x68, %r15
leaq 0x3d8(%rbx), %r10
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
subq $0x8, %rsp
leaq 0x14(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movl %ebp, %r8d
movl $0x1, %r9d
pushq 0x168(%rbx)
pushq %rax
pushq %r10
callq 0x15b4d
addq $0x20, %rsp
movl (%r12), %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15fff(%rip), %rdi     # 0x2c515
leaq 0x13166(%rip), %rsi     # 0x29683
leaq 0x16b7d(%rip), %rcx     # 0x2d0a1
movl $0x4fc7, %edx           # imm = 0x4FC7
callq 0x3100
leaq 0x14c12(%rip), %rdi     # 0x2b147
leaq 0x13147(%rip), %rsi     # 0x29683
leaq 0x16b5e(%rip), %rcx     # 0x2d0a1
movl $0x4fc8, %edx           # imm = 0x4FC8
callq 0x3100
leaq 0x14d6f(%rip), %rdi     # 0x2b2c3
leaq 0x13128(%rip), %rsi     # 0x29683
leaq 0x16b3f(%rip), %rcx     # 0x2d0a1
movl $0x4fc9, %edx           # imm = 0x4FC9
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_selectable_text
NK_API int
nk_selectable_text(struct nk_context *ctx, const char *str, int len,
    nk_flags align, int *value)
{
    struct nk_window *win;
    struct nk_panel *layout;
    const struct nk_input *in;
    const struct nk_style *style;

    enum nk_widget_layout_states state;
    struct nk_rect bounds;

    NK_ASSERT(ctx);
    NK_ASSERT(value);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout || !value)
        return 0;

    win = ctx->current;
    layout = win->layout;
    style = &ctx->style;

    state = nk_widget(&bounds, ctx);
    if (!state) return 0;
    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
    return nk_do_selectable(&ctx->last_widget_state, &win->buffer, bounds,
                str, len, align, value, &style->selectable, in, style->font);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x16715
testq %r8, %r8
je 0x16734
movq %rdi, %r14
movq 0x3fe8(%rdi), %r13
testq %r13, %r13
je 0x16753
movq %r8, (%rsp)
movq 0xa8(%r13), %rbp
testq %rbp, %rbp
je 0x16772
movq %rsi, %rbx
movl %edx, %r12d
movl %ecx, %r15d
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xfda9
testl %eax, %eax
je 0x16706
cmpl $0x2, %eax
jne 0x166b7
xorl %eax, %eax
jmp 0x166c1
xorl %eax, %eax
testb $0x10, 0x5(%rbp)
cmoveq %r14, %rax
movl %r15d, %r8d
movl %r12d, %ecx
movq %rbx, %rdx
movq (%rsp), %r9
leaq 0x1f70(%r14), %rdi
addq $0x68, %r13
leaq 0x5b8(%r14), %r10
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
subq $0x8, %rsp
movq %r13, %rsi
pushq 0x168(%r14)
pushq %rax
pushq %r10
callq 0x16791
addq $0x20, %rsp
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15df9(%rip), %rdi     # 0x2c515
leaq 0x12f60(%rip), %rsi     # 0x29683
leaq 0x169f8(%rip), %rcx     # 0x2d122
movl $0x50b8, %edx           # imm = 0x50B8
callq 0x3100
leaq 0x16a37(%rip), %rdi     # 0x2d172
leaq 0x12f41(%rip), %rsi     # 0x29683
leaq 0x169d9(%rip), %rcx     # 0x2d122
movl $0x50b9, %edx           # imm = 0x50B9
callq 0x3100
leaq 0x149ed(%rip), %rdi     # 0x2b147
leaq 0x12f22(%rip), %rsi     # 0x29683
leaq 0x169ba(%rip), %rcx     # 0x2d122
movl $0x50ba, %edx           # imm = 0x50BA
callq 0x3100
leaq 0x14b4a(%rip), %rdi     # 0x2b2c3
leaq 0x12f03(%rip), %rsi     # 0x29683
leaq 0x1699b(%rip), %rcx     # 0x2d122
movl $0x50bb, %edx           # imm = 0x50BB
callq 0x3100
// File: /workspace/github_c_makefile_star2_O1/0x0203[P]schack_poc/./nuklear.h
// Function: nk_chart_add_slot_colored
NK_API void
nk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type type,
    struct nk_color color, struct nk_color highlight,
    int count, float min_value, float max_value)
{
    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    NK_ASSERT(ctx->current->layout->chart.slot < NK_CHART_MAX_SLOT);
    if (!ctx || !ctx->current || !ctx->current->layout) return;
    if (ctx->current->layout->chart.slot >= NK_CHART_MAX_SLOT) return;

    /* add another slot into the graph */
    {struct nk_chart *chart = &ctx->current->layout->chart;
    struct nk_chart_slot *slot = &chart->slots[chart->slot++];
    slot->type = type;
    slot->count = count;
    slot->color = color;
    slot->highlight = highlight;
    slot->min = NK_MIN(min_value, max_value);
    slot->max = NK_MAX(min_value, max_value);
    slot->range = slot->max - slot->min;}
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1c6f3
movq 0x3fe8(%rdi), %rax
testq %rax, %rax
je 0x1c712
movq 0xa8(%rax), %rax
testq %rax, %rax
je 0x1c731
movslq 0xf8(%rax), %rdi
cmpq $0x4, %rdi
jge 0x1c750
leal 0x1(%rdi), %r9d
movl %r9d, 0xf8(%rax)
leaq (%rdi,%rdi,4), %rdi
movl %esi, 0x10c(%rax,%rdi,8)
movl %r8d, 0x124(%rax,%rdi,8)
movl %edx, 0x110(%rax,%rdi,8)
movl %ecx, 0x114(%rax,%rdi,8)
movaps %xmm0, %xmm2
minss %xmm1, %xmm2
movss %xmm2, 0x118(%rax,%rdi,8)
maxss %xmm0, %xmm1
movss %xmm1, 0x11c(%rax,%rdi,8)
subss %xmm2, %xmm1
movss %xmm1, 0x120(%rax,%rdi,8)
popq %rax
retq
leaq 0xfe1b(%rip), %rdi      # 0x2c515
leaq 0xcf82(%rip), %rsi      # 0x29683
leaq 0x110f1(%rip), %rcx     # 0x2d7f9
movl $0x5d56, %edx           # imm = 0x5D56
callq 0x3100
leaq 0xea2e(%rip), %rdi      # 0x2b147
leaq 0xcf63(%rip), %rsi      # 0x29683
leaq 0x110d2(%rip), %rcx     # 0x2d7f9
movl $0x5d57, %edx           # imm = 0x5D57
callq 0x3100
leaq 0xeb8b(%rip), %rdi      # 0x2b2c3
leaq 0xcf44(%rip), %rsi      # 0x29683
leaq 0x110b3(%rip), %rcx     # 0x2d7f9
movl $0x5d58, %edx           # imm = 0x5D58
callq 0x3100
leaq 0x11125(%rip), %rdi     # 0x2d87c
leaq 0xcf25(%rip), %rsi      # 0x29683
leaq 0x11094(%rip), %rcx     # 0x2d7f9
movl $0x5d59, %edx           # imm = 0x5D59
callq 0x3100