LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: string_inject
CELL string_inject(NgaState *vm, char *str, CELL buffer) {
  if (!str) {
    vm->memory[buffer] = 0;
    return 0;
  }

  CELL pos = 0;
  int i = 0;

  while (str[i] != '\0') {
    unsigned char *utf8_str = (unsigned char *)&str[i];
    int utf32_char = 0;
    int bytes_consumed = 0;

    // Convert UTF-8 to UTF-32
    if ((utf8_str[0] & 0x80) == 0x00) {
      // 1-byte UTF-8 sequence
      utf32_char = utf8_str[0];
      bytes_consumed = 1;
    } else if ((utf8_str[0] & 0xE0) == 0xC0) {
      // 2-byte UTF-8 sequence
      utf32_char = ((uint32_t)(utf8_str[0] & 0x1F) << 6) |
                              (utf8_str[1] & 0x3F);
      bytes_consumed = 2;
    } else if ((utf8_str[0] & 0xF0) == 0xE0) {
      // 3-byte UTF-8 sequence
      utf32_char = ((uint32_t)(utf8_str[0] & 0x0F) << 12) |
                   ((uint32_t)(utf8_str[1] & 0x3F) << 6) |
                              (utf8_str[2] & 0x3F);
      bytes_consumed = 3;
    } else if ((utf8_str[0] & 0xF8) == 0xF0) {
      // 4-byte UTF-8 sequence
      utf32_char = ((uint32_t)(utf8_str[0] & 0x07) << 18) |
                   ((uint32_t)(utf8_str[1] & 0x3F) << 12) |
                   ((uint32_t)(utf8_str[2] & 0x3F) << 6) |
                              (utf8_str[3] & 0x3F);
      bytes_consumed = 4;
    } else {
      // Invalid UTF-8, skip byte
      utf32_char = utf8_str[0];
      bytes_consumed = 1;
    }

    vm->memory[buffer + pos] = (CELL)utf32_char;
    vm->memory[buffer + pos + 1] = 0;
    pos++;
    i += bytes_consumed;
  }

  return buffer;
}

// Assembly:
movl %edx, %eax
testq %rsi, %rsi
je 0x514c
movb (%rsi), %r8b
testb %r8b, %r8b
je 0x514b
movslq %eax, %rcx
leaq (%rdi,%rcx,4), %rcx
addq $0x4, %rcx
xorl %edx, %edx
movq %rsi, %rdi
movzbl %r8b, %r8d
movl $0x1, %r9d
testb %r8b, %r8b
jns 0x5124
movl %r8d, %r10d
andl $-0x20, %r10d
cmpl $0xc0, %r10d
jne 0x509e
andl $0x1f, %r8d
shll $0x6, %r8d
movl $0x2, %r9d
movl $0x1, %r11d
movl %r8d, %r10d
jmp 0x5118
movl %r8d, %r10d
andl $-0x10, %r10d
cmpl $0xe0, %r10d
jne 0x50d4
shll $0xc, %r8d
movzwl %r8w, %r8d
movzbl 0x1(%rdi), %r10d
andl $0x3f, %r10d
shll $0x6, %r10d
orl %r8d, %r10d
movl $0x3, %r9d
movl $0x2, %r11d
jmp 0x5118
movl %r8d, %r10d
andl $-0x8, %r10d
cmpl $0xf0, %r10d
jne 0x5124
andl $0x7, %r8d
shll $0x12, %r8d
movzbl 0x1(%rdi), %r9d
andl $0x3f, %r9d
shll $0xc, %r9d
orl %r8d, %r9d
movzbl 0x2(%rdi), %r10d
andl $0x3f, %r10d
shll $0x6, %r10d
orl %r9d, %r10d
movl $0x4, %r9d
movl $0x3, %r11d
movzbl (%rdi,%r11), %r8d
andl $0x3f, %r8d
orl %r10d, %r8d
movl %r8d, -0x4(%rcx)
movl $0x0, (%rcx)
movl %r9d, %edi
movl %edx, %edx
addq %rdi, %rdx
leaq (%rsi,%rdx), %rdi
movb (%rsi,%rdx), %r8b
addq $0x4, %rcx
testb %r8b, %r8b
jne 0x5062
retq
cltq
movl $0x0, (%rdi,%rax,4)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/./dev-float.c
// Function: float_to_number
void float_to_number(NgaState *vm) {
  double a = float_pop(vm);
  if (a > 2147483647)
    a = 2147483647;
  if (a < -2147483648)
    a = -2147483648;
  stack_push(vm, (CELL)round(a));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
decl 0x2075b8(%rdi)
callq 0x4d3a
movslq 0x2075b8(%rbx), %rax
movsd 0x4ee2(%rip), %xmm1     # 0xa058
minsd 0x2065c0(%rbx,%rax,8), %xmm1
movsd 0x4ed9(%rip), %xmm0     # 0xa060
maxsd %xmm1, %xmm0
callq 0x3090
cvttsd2si %xmm0, %eax
movslq 0x2043a4(%rbx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
leaq (%rbx,%rcx), %rdx
movslq 0x200004(%rbx,%rcx), %rsi
leaq 0x1(%rsi), %rdi
movl %edi, 0x200004(%rbx,%rcx)
movl %eax, 0x20001c(%rdx,%rsi,4)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/./dev-float.c
// Function: float_swap
void float_swap(NgaState *vm) {
  double a = float_pop(vm);
  double b = float_pop(vm);
  float_push(vm, a);
  float_push(vm, b);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
decl 0x2075b8(%rdi)
callq 0x4d3a
movslq 0x2075b8(%rbx), %rax
movsd 0x2065c0(%rbx,%rax,8), %xmm0
movsd %xmm0, 0x8(%rsp)
decl %eax
movl %eax, 0x2075b8(%rbx)
movq %rbx, %rdi
callq 0x4d3a
movslq 0x2075b8(%rbx), %rax
movsd 0x2065c0(%rbx,%rax,8), %xmm0
movsd %xmm0, (%rsp)
incq %rax
movl %eax, 0x2075b8(%rbx)
movq %rbx, %rdi
callq 0x4d3a
movslq 0x2075b8(%rbx), %rax
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x2065b8(%rbx,%rax,8)
incl %eax
movl %eax, 0x2075b8(%rbx)
movq %rbx, %rdi
callq 0x4d3a
movslq 0x2075b8(%rbx), %rax
movsd (%rsp), %xmm0
movsd %xmm0, 0x2065b8(%rbx,%rax,8)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/./dev-rng.c
// Function: io_rng
V io_rng(NgaState *vm) {
  int64_t r = 0;
  char buffer[8];
  int i;
  ssize_t ignore;
  int fd = open("/dev/urandom", O_RDONLY);
  ignore = read(fd, buffer, 8);
  close(fd);
  for(i = 0; i < 8; ++i) {
    r = r << 8;
    r += ((int64_t)buffer[i] & 0xFF);
  }
#ifndef BIT64
  stack_push(vm, (CELL)abs((CELL)r));
#else
  stack_push(vm, (CELL)llabs((CELL)r));
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x4099(%rip), %rdi      # 0xa0e0
xorl %r14d, %r14d
xorl %esi, %esi
xorl %eax, %eax
callq 0x3340
movl %eax, %ebp
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
movl %eax, %edi
callq 0x3220
movl %ebp, %edi
callq 0x31d0
xorl %eax, %eax
movl %eax, %ecx
shll $0x8, %ecx
movzbl 0x8(%rsp,%r14), %eax
orl %ecx, %eax
incq %r14
cmpq $0x8, %r14
jne 0x606f
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rbx,%rax), %rdx
movslq 0x200004(%rbx,%rax), %rsi
leaq 0x1(%rsi), %rdi
movl %edi, 0x200004(%rbx,%rax)
movl %ecx, 0x20001c(%rdx,%rsi,4)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/./dev-unix.c
// Function: unix_open_pipe
V unix_open_pipe(NgaState *vm) {
  CELL slot, mode, name;
  char *request;
  const char *modes[] = {"r", "w", "", "r+"};
  slot = files_get_handle(vm);
  mode = stack_pop(vm);
  name = stack_pop(vm);
  request = string_extract(vm, name);
  if (slot > 0) {
    vm->OpenFileHandles[slot] = popen(request, modes[mode]);
  }
  if (vm->OpenFileHandles[slot] == NULL) {
    vm->OpenFileHandles[slot] = 0;
    slot = 0;
  }
  stack_push(vm, slot);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq $0x0, 0x288ef8(%rbx,%r14,8)
je 0x6135
incq %r14
cmpq $0x1f, %r14
jne 0x611c
xorl %r14d, %r14d
jmp 0x6138
incl %r14d
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rbx,%rax), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movslq (%rcx), %rdx
leaq -0x1(%rdx), %rax
movl %eax, (%rcx)
movslq 0x14(%rcx,%rdx,4), %rax
leal -0x2(%rdx), %esi
movl %esi, (%rcx)
movslq 0x10(%rcx,%rdx,4), %rcx
movl (%rbx,%rcx,4), %edx
testl %edx, %edx
je 0x619a
leaq (%rbx,%rcx,4), %rcx
addq $0x4, %rcx
xorl %edi, %edi
leaq 0x1(%rdi), %rsi
movb %dl, 0x2045b8(%rbx,%rdi)
cmpq $0x1ffe, %rdi           # imm = 0x1FFE
ja 0x619c
movl (%rcx,%rdi,4), %edx
movq %rsi, %rdi
testl %edx, %edx
jne 0x617a
jmp 0x619c
xorl %esi, %esi
movb $0x0, 0x2045b8(%rbx,%rsi)
testl %r14d, %r14d
jle 0x61d0
leaq 0x2045b8(%rbx), %rdi
leaq 0x3e8d(%rip), %rcx      # 0xa044
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
callq 0x3350
movl %r14d, %ecx
movq %rax, 0x288ef0(%rbx,%rcx,8)
jmp 0x61db
movslq %r14d, %rcx
movq 0x288ef0(%rbx,%rcx,8), %rax
leaq 0x200004(%rbx), %rdx
testq %rax, %rax
jne 0x61f6
movq $0x0, 0x288ef0(%rbx,%rcx,8)
xorl %r14d, %r14d
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rdx,%rax), %rcx
movslq (%rdx,%rax), %rsi
leaq 0x1(%rsi), %rdi
movl %edi, (%rdx,%rax)
movl %r14d, 0x18(%rcx,%rsi,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/./dev-unix.c
// Function: unix_run_external
V unix_run_external(NgaState *vm) {
  char *line, *args[128];
  int i, status;
  pid_t pid;

  char **argv = args;
  line = string_extract(vm, stack_pop(vm));

  for(i = 0; i < 128; i++)
    args[i] = 0;

  while (*line != '\0') {
    while (*line == ' ' || *line == '\t' || *line == '\n')
      *line++ = '\0';
    *argv++ = line;
    while (*line != '\0' && *line != ' ' && *line != '\t' && *line != '\n')
      line++;
  }

  if ((pid = fork()) < 0) {
    printf("*** ERROR: forking child process failed\n");
    exit(1);
  }
  else if (pid == 0) {
    int e = execvp(*args, args);
    if (e < 0) {
      printf("*** ERROR: exec failed with %d\n", e);
      exit(1);
    }
  } else {
  while (wait(&status) != pid)
    ;
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
movslq 0x2043a4(%rdi), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rdi,%rax), %rcx
movslq 0x200004(%rdi,%rax), %rdx
leal -0x1(%rdx), %esi
movl %esi, 0x200004(%rdi,%rax)
movslq 0x200018(%rcx,%rdx,4), %rax
movl (%rdi,%rax,4), %ecx
testl %ecx, %ecx
je 0x6395
leaq (%rbx,%rax,4), %rax
addq $0x4, %rax
xorl %esi, %esi
leaq 0x1(%rsi), %rdx
movb %cl, 0x2045b8(%rbx,%rsi)
cmpq $0x1ffe, %rsi           # imm = 0x1FFE
ja 0x6397
movl (%rax,%rsi,4), %ecx
movq %rdx, %rsi
testl %ecx, %ecx
jne 0x6375
jmp 0x6397
xorl %edx, %edx
movb $0x0, 0x2045b8(%rbx,%rdx)
leaq 0x10(%rsp), %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x31a0
movb 0x2045b8(%rbx), %cl
testb %cl, %cl
je 0x6409
addq $0x2045b8, %rbx         # imm = 0x2045B8
movabsq $0x100000600, %rax      # imm = 0x100000600
cmpb $0x20, %cl
ja 0x63e7
movzbl %cl, %ecx
btq %rcx, %rax
jae 0x63e7
movb $0x0, (%rbx)
movb 0x1(%rbx), %cl
incq %rbx
jmp 0x63ce
movq %rbx, (%r14)
addq $0x8, %r14
movb (%rbx), %cl
movzbl %cl, %edx
leal -0x9(%rdx), %esi
cmpl $0x2, %esi
jb 0x63ce
testl %edx, %edx
je 0x6409
cmpl $0x20, %edx
je 0x63ce
incq %rbx
jmp 0x63ee
callq 0x3460
testl %eax, %eax
js 0x6445
je 0x6429
movl %eax, %ebx
leaq 0xc(%rsp), %r14
movq %r14, %rdi
callq 0x3440
cmpl %ebx, %eax
jne 0x641b
jmp 0x643a
leaq 0x10(%rsp), %rsi
movq (%rsi), %rdi
callq 0x33b0
testl %eax, %eax
js 0x6453
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r14
retq
leaq 0x405d(%rip), %rdi      # 0xa4a9
callq 0x30a0
jmp 0x6463
leaq 0x3c98(%rip), %rdi      # 0xa0f2
movl %eax, %esi
xorl %eax, %eax
callq 0x3150
movl $0x1, %edi
callq 0x33d0
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/./dev-unix.c
// Function: unix_exec0
V unix_exec0(NgaState *vm) {
  char path[1025];
  strlcpy(path, string_extract(vm, stack_pop(vm)), 1024);
  execl(path, path, (char *)0);
  stack_push(vm, errno);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %rbx
movslq 0x2043a4(%rdi), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rdi, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rcx
leal -0x1(%rcx), %edx
movl %edx, (%rax)
movslq 0x14(%rax,%rcx,4), %rax
movl (%rdi,%rax,4), %edx
testl %edx, %edx
je 0x64cf
leaq (%rbx,%rax,4), %rcx
addq $0x4, %rcx
xorl %esi, %esi
leaq 0x1(%rsi), %rax
movb %dl, 0x2045b8(%rbx,%rsi)
cmpq $0x1ffe, %rsi           # imm = 0x1FFE
ja 0x64d1
movl (%rcx,%rsi,4), %edx
movq %rax, %rsi
testl %edx, %edx
jne 0x64af
jmp 0x64d1
xorl %eax, %eax
leaq 0x200004(%rbx), %r14
movb $0x0, 0x2045b8(%rbx,%rax)
xorl %eax, %eax
cmpq $0x3ff, %rax            # imm = 0x3FF
je 0x64fd
movb 0x2045b8(%rbx,%rax), %cl
movb %cl, (%rsp,%rax)
incq %rax
testb %cl, %cl
jne 0x64e2
jmp 0x6501
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
movq %rdi, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3400
callq 0x3070
movl (%rax), %eax
movslq 0x2043a4(%rbx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
leaq (%r14,%rcx), %rdx
movslq (%r14,%rcx), %rsi
leaq 0x1(%rsi), %rdi
movl %edi, (%r14,%rcx)
movl %eax, 0x18(%rdx,%rsi,4)
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/./dev-unix.c
// Function: unix_exec1
V unix_exec1(NgaState *vm) {
  char path[1025];
  char arg0[1025];
  strlcpy(arg0, string_extract(vm, stack_pop(vm)), 1024);
  strlcpy(path, string_extract(vm, stack_pop(vm)), 1024);
  execl(path, path, arg0, (char *)0);
  stack_push(vm, errno);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq %rdi, %rbx
movslq 0x2043a4(%rdi), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rdi, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rcx
leal -0x1(%rcx), %edx
movl %edx, (%rax)
movslq 0x14(%rax,%rcx,4), %rax
movl (%rdi,%rax,4), %edx
testl %edx, %edx
je 0x65a6
leaq (%rbx,%rax,4), %rcx
addq $0x4, %rcx
xorl %esi, %esi
leaq 0x1(%rsi), %rax
movb %dl, 0x2045b8(%rbx,%rsi)
cmpq $0x1ffe, %rsi           # imm = 0x1FFE
ja 0x65a8
movl (%rcx,%rsi,4), %edx
movq %rax, %rsi
testl %edx, %edx
jne 0x6586
jmp 0x65a8
xorl %eax, %eax
leaq 0x200004(%rbx), %r14
movb $0x0, 0x2045b8(%rbx,%rax)
xorl %eax, %eax
cmpq $0x3ff, %rax            # imm = 0x3FF
je 0x65d4
movb 0x2045b8(%rbx,%rax), %cl
movb %cl, (%rsp,%rax)
incq %rax
testb %cl, %cl
jne 0x65b9
jmp 0x65d8
movb $0x0, (%rsp,%rax)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%r14,%rax), %rcx
movslq (%r14,%rax), %rdx
leal -0x1(%rdx), %esi
movl %esi, (%r14,%rax)
movslq 0x14(%rcx,%rdx,4), %rax
movl (%rbx,%rax,4), %ecx
testl %ecx, %ecx
je 0x662b
leaq (%rbx,%rax,4), %rax
addq $0x4, %rax
xorl %esi, %esi
leaq 0x1(%rsi), %rdx
movb %cl, 0x2045b8(%rbx,%rsi)
cmpq $0x1ffe, %rsi           # imm = 0x1FFE
ja 0x662d
movl (%rax,%rsi,4), %ecx
movq %rdx, %rsi
testl %ecx, %ecx
jne 0x660b
jmp 0x662d
xorl %edx, %edx
movb $0x0, 0x2045b8(%rbx,%rdx)
xorl %eax, %eax
cmpq $0x3ff, %rax            # imm = 0x3FF
je 0x6656
movb 0x2045b8(%rbx,%rax), %cl
movb %cl, 0x410(%rsp,%rax)
incq %rax
testb %cl, %cl
jne 0x6637
jmp 0x665e
movb $0x0, 0x410(%rsp,%rax)
leaq 0x410(%rsp), %rdi
movq %rsp, %rdx
movq %rdi, %rsi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x3400
callq 0x3070
movl (%rax), %eax
movslq 0x2043a4(%rbx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
leaq (%r14,%rcx), %rdx
movslq (%r14,%rcx), %rsi
leaq 0x1(%rsi), %rdi
movl %edi, (%r14,%rcx)
movl %eax, 0x18(%rdx,%rsi,4)
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: validate_opcode_bundle
V validate_opcode_bundle(NgaState *vm, CELL opcode) {
  CELL remainingOpcode = opcode;
  for (int i = 0; i < 4; i++) {
    CELL current = remainingOpcode & 0xFF;
    if (current < 0 || current > 29) {
      invalid_opcode(vm, opcode);
    }
    remainingOpcode >>= 8;
  }
}

// Assembly:
movl $0x4, %eax
movl %esi, %ecx
movl %ecx, %edx
andl $0xfe, %edx
cmpl $0x1e, %edx
jae 0x7ef9
sarl $0x8, %ecx
decl %eax
jne 0x7ee4
retq
pushq %rax
callq 0x7e5f
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: process_opcode_bundle
V process_opcode_bundle(NgaState *vm, CELL opcode) {
#ifndef BRANCH_PREDICTION
  if (INST(0))  instructions[opcode & 0xFF](vm);
  if (INST(8))  instructions[(opcode >> 8) & 0xFF](vm);
  if (INST(16)) instructions[(opcode >> 16) & 0xFF](vm);
  if (INST(24)) instructions[(opcode >> 24) & 0xFF](vm);
#else
  for (size_t i = 0; i < 4; ++i) {
    uint8_t current = ((uint8_t*)&opcode)[i];
    if (unlikely(current > 29)) {
      invalid_opcode(vm, opcode);
    }
    instructions[current](vm);
  }
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %eax
andl $0xff, %eax
movq %rsi, %r14
je 0x7f24
movl %eax, %eax
leaq 0x4d235(%rip), %rcx     # 0x55150
movq %rbx, %rdi
callq *(%rcx,%rax,8)
movq %r14, %rsi
movl %esi, %eax
shrl $0x8, %eax
andl $0xff, %eax
je 0x7f42
movl %eax, %eax
leaq 0x4d217(%rip), %rcx     # 0x55150
movq %rbx, %rdi
callq *(%rcx,%rax,8)
movq %r14, %rsi
movl %esi, %eax
shrl $0x10, %eax
andl $0xff, %eax
je 0x7f60
movl %eax, %eax
leaq 0x4d1f9(%rip), %rcx     # 0x55150
movq %rbx, %rdi
callq *(%rcx,%rax,8)
movq %r14, %rsi
cmpl $0x1000000, %esi        # imm = 0x1000000
jae 0x7f70
addq $0x8, %rsp
popq %rbx
popq %r14
retq
shrl $0x18, %esi
leaq 0x4d1d6(%rip), %rax     # 0x55150
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *(%rax,%rsi,8)
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: prepare_vm
V prepare_vm(NgaState *vm) {
  vm->active = 0;
  ACTIVE.ip = ACTIVE.sp = ACTIVE.rp = ACTIVE.u = 0;
  ACTIVE.active = -1;
  for (ACTIVE.ip = 0; ACTIVE.ip < IMAGE_SIZE; ACTIVE.ip++)
    vm->memory[ACTIVE.ip] = 0; /* NO - nop instruction */
  for (ACTIVE.ip = 0; ACTIVE.ip < STACK_DEPTH; ACTIVE.ip++)
    ACTIVE.data[ACTIVE.ip] = 0;
  for (ACTIVE.ip = 0; ACTIVE.ip < ADDRESSES; ACTIVE.ip++)
    ACTIVE.address[ACTIVE.ip] = 0;
}

// Assembly:
xorl %edx, %edx
movl %edx, 0x2043a4(%rdi)
leaq 0x200004(%rdi), %rax
movl %edx, 0x200014(%rdi)
movaps 0x1bcb(%rip), %xmm0     # 0xa070
movups %xmm0, 0x200004(%rdi)
movslq %edx, %rcx
movl $0x0, (%rdi,%rcx,4)
movslq 0x2043a4(%rdi), %rcx
imulq $0x874, %rcx, %rsi      # imm = 0x874
movl 0x8(%rax,%rsi), %r8d
leal 0x1(%r8), %edx
movl %edx, 0x8(%rax,%rsi)
cmpl $0x7ffff, %r8d          # imm = 0x7FFFF
jl 0x84ac
leaq (%rax,%rsi), %rdx
addq $0x8, %rdx
movl $0x0, (%rdx)
movl (%rdx), %edx
cmpl $0xff, %edx
jg 0x852b
movslq %edx, %rdx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rax, %rcx
movl $0x0, 0x14(%rcx,%rdx,4)
movslq 0x2043a4(%rdi), %rcx
imulq $0x874, %rcx, %rsi      # imm = 0x874
movl 0x8(%rax,%rsi), %r8d
leal 0x1(%r8), %edx
movl %edx, 0x8(%rax,%rsi)
cmpl $0xff, %r8d
jl 0x84f2
imulq $0x874, %rcx, %rdx      # imm = 0x874
movl $0x0, 0x8(%rax,%rdx)
xorl %edx, %edx
movslq %edx, %rdx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rax, %rcx
movl $0x0, 0x414(%rcx,%rdx,4)
movslq 0x2043a4(%rdi), %rcx
imulq $0x874, %rcx, %rsi      # imm = 0x874
movl 0x8(%rax,%rsi), %r8d
leal 0x1(%r8), %edx
movl %edx, 0x8(%rax,%rsi)
cmpl $0xff, %r8d
jl 0x853c
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: register_signal_handlers
V register_signal_handlers() {
#ifdef ENABLE_SIGNALS
  signal(SIGHUP, sig_handler);
  signal(SIGINT, sig_handler);
  signal(SIGILL, sig_handler);
  signal(SIGBUS, sig_handler);
  signal(SIGFPE, sig_handler);
#endif
}

// Assembly:
pushq %rbx
leaq 0x42(%rip), %rbx        # 0x88b6
movl $0x1, %edi
movq %rbx, %rsi
callq 0x3260
movl $0x2, %edi
movq %rbx, %rsi
callq 0x3260
movl $0x4, %edi
movq %rbx, %rsi
callq 0x3260
movl $0x7, %edi
movq %rbx, %rsi
callq 0x3260
movl $0x8, %edi
movq %rbx, %rsi
popq %rbx
jmp 0x3260
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: load_image
CELL load_image(NgaState *vm, char *imageFile) {
  FILE *fp;
  CELL imageSize = 0;
  long fileLen;
  if ((fp = fopen(imageFile, "rb")) != NULL) {
    /* Determine length (in cells) */
    fseek(fp, 0, SEEK_END);
    fileLen = ftell(fp) / sizeof(CELL);
    if (fileLen > IMAGE_SIZE) {
      fclose(fp);
      printf("\nERROR (nga/ngaLoadImage): Image is larger than alloted space!\n");
      exit(1);
    }
    rewind(fp);

    /* Erase old image in memory: 0 = nop instruction */
    for (int i = 0; i < IMAGE_SIZE; i++) { vm->memory[i] = 0; }

    /* Read the file into memory */
    imageSize = fread(vm->memory, sizeof(CELL), fileLen, fp);
    fclose(fp);
  }
  return imageSize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rax
movq %rdi, %r14
leaq 0x133d(%rip), %rsi      # 0xa0a7
movq %rax, %rdi
callq 0x3360
testq %rax, %rax
je 0x8dd7
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x3310
movq %rbx, %rdi
callq 0x3280
cmpq $0x200004, %rax         # imm = 0x200004
jae 0x8de3
movq %rax, %r15
shrq $0x2, %r15
movq %rbx, %rdi
callq 0x3160
movl $0x200000, %edx         # imm = 0x200000
movq %r14, %rdi
xorl %esi, %esi
callq 0x31a0
movl $0x4, %esi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x30b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x3110
jmp 0x8dda
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x3110
leaq 0x19c1(%rip), %rdi      # 0xa7b3
callq 0x30a0
movl $0x1, %edi
callq 0x33d0
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: i_li
V i_li(NgaState *vm) {
  guard(vm, 0, 1, 0);
  ACTIVE.sp++;
  ACTIVE.ip++;
  TOS = vm->memory[ACTIVE.ip];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rbx,%rax), %rcx
movslq 0x200004(%rbx,%rax), %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0x200004(%rbx,%rax)
movslq 0x20000c(%rbx,%rax), %rsi
leaq 0x1(%rsi), %rdi
movl %edi, 0x20000c(%rbx,%rax)
movl 0x4(%rbx,%rsi,4), %eax
movl %eax, 0x20001c(%rcx,%rdx,4)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: i_cc
V i_cc(NgaState *vm) {
  guard(vm, 2, 0, 1);
  CELL a, b;
  a = TOS; i_dr(vm);  /* Target */
  b = TOS; i_dr(vm);  /* Flag   */
  if (b != 0) {
    ACTIVE.rp++;
    TORS = ACTIVE.ip;
    ACTIVE.ip = a - 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x2, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rbx, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rcx
movl 0x14(%rax,%rcx,4), %ebp
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rbx, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rcx
movl %r14d, 0x14(%rax,%rcx,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rbx, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rcx
leaq -0x1(%rcx), %rdx
movl %edx, (%rax)
movl 0x10(%rax,%rcx,4), %r15d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rbx, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rcx
movl %r14d, 0x14(%rax,%rcx,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
decl 0x200004(%rbx,%rax)
cmpl %r14d, %r15d
je 0x9282
leaq 0x200004(%rbx), %rcx
leaq (%rbx,%rax), %rdx
addq $0x200004, %rdx         # imm = 0x200004
movslq 0x4(%rcx,%rax), %rsi
leaq 0x1(%rsi), %rdi
movl %edi, 0x4(%rcx,%rax)
movl 0x8(%rdx), %eax
movl %eax, 0x418(%rdx,%rsi,4)
decl %ebp
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
movl %ebp, 0x8(%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: i_fe
V i_fe(NgaState *vm) {
  guard(vm, 1, 1, 0);
  switch (TOS) {
    case -1: TOS = ACTIVE.sp - 1; break;
    case -2: TOS = ACTIVE.rp; break;
    case -3: TOS = IMAGE_SIZE; break;
    case -4: TOS = CELL_MIN; break;
    case -5: TOS = CELL_MAX; break;
    default: TOS = vm->memory[TOS]; break;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rbx,%rax), %rdx
addq %rbx, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rcx
movslq 0x200018(%rdx,%rcx,4), %rdx
leal 0x5(%rdx), %esi
cmpl $0x4, %esi
ja 0x9627
leaq 0xa21(%rip), %rdx       # 0xa020
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movl $0x7ffffffe, %edx       # imm = 0x7FFFFFFE
jmp 0x962a
leal -0x1(%rcx), %edx
jmp 0x962a
movl $0x80000, %edx          # imm = 0x80000
jmp 0x962a
movl 0x4(%rax), %edx
jmp 0x962a
movl $0x80000001, %edx       # imm = 0x80000001
jmp 0x962a
movl (%rbx,%rdx,4), %edx
movl %edx, 0x14(%rax,%rcx,4)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: i_ad
V i_ad(NgaState *vm) {
  guard(vm, 2, 1, 0);
  if (ACTIVE.u != 0) {
    NOS = (unsigned)NOS + (unsigned)TOS;
    ACTIVE.u = 0;
  } else {
    NOS += TOS;
  }
  i_dr(vm);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3700
leaq 0x200004(%rbx), %r14
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rbx, %rax
addq $0x200004, %rax         # imm = 0x200004
cmpl $0x0, 0x10(%rax)
movslq (%rax), %rcx
je 0x975b
movl 0x14(%rax,%rcx,4), %edx
addl %edx, 0x10(%rax,%rcx,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
movl $0x0, 0x10(%r14,%rax)
jmp 0x9763
movl 0x14(%rax,%rcx,4), %edx
addl %edx, 0x10(%rax,%rcx,4)
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%r14,%rax), %rcx
movslq (%r14,%rax), %rax
movl $0x0, 0x14(%rcx,%rax,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
decl (%r14,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: i_di
V i_di(NgaState *vm) {
  guard(vm, 2, 2, 0);
  CELL a, b;
  a = TOS;
  b = NOS;
  if (b == 0) {
#ifdef ENABLE_ERROR
    if (vm->ErrorHandlers[6] != 0) {
    }
#endif
  }
  if (ACTIVE.u != 0) {
    TOS = (unsigned)b / (unsigned)a;
    NOS = (unsigned)b % (unsigned)a;
    ACTIVE.u = 0;
  } else {
    TOS = b / a;
    NOS = b % a;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x2, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x3700
leaq 0x200004(%rbx), %rcx
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rbx,%rax), %rsi
addq $0x200004, %rsi         # imm = 0x200004
movslq (%rsi), %rdi
movl 0x10(%rsi,%rdi,4), %eax
movl 0x14(%rsi,%rdi,4), %r8d
cmpl $0x0, 0x10(%rsi)
je 0x999a
xorl %edx, %edx
divl %r8d
movl %eax, 0x14(%rsi,%rdi,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rcx,%rax), %rsi
movslq (%rcx,%rax), %rax
movl %edx, 0x10(%rsi,%rax,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
movl $0x0, 0x10(%rcx,%rax)
jmp 0x99bc
cltd
idivl %r8d
movl %eax, 0x14(%rsi,%rdi,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%rcx,%rax), %rsi
movslq (%rcx,%rax), %rax
movl %edx, 0x10(%rsi,%rax,4)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: i_sh
V i_sh(NgaState *vm) {
  guard(vm, 2, 1, 0);
  CELL y = TOS;
  CELL x = NOS;
  if (TOS < 0)
    NOS = NOS << (0 - TOS);
  else {
    if (ACTIVE.u != 0) {
      NOS = (unsigned)x >> (unsigned)y;
      ACTIVE.u = 0;
    } else {
      if (x < 0 && y > 0)
        NOS = x >> y | ~(~0U >> y);
      else
        NOS = x >> y;
    }
  }
  i_dr(vm);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3700
leaq 0x200004(%rbx), %r14
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rbx, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rdx
movl 0x10(%rax,%rdx,4), %esi
movl 0x14(%rax,%rdx,4), %ecx
testl %ecx, %ecx
js 0x9bab
cmpl $0x0, 0x10(%rax)
je 0x9bb5
shrl %cl, %esi
movl %esi, 0x10(%rax,%rdx,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
movl $0x0, 0x10(%r14,%rax)
jmp 0x9bd0
negb %cl
shll %cl, %esi
movl %esi, 0x10(%rax,%rdx,4)
jmp 0x9bd0
movl %esi, %edi
sarl %cl, %edi
testl %ecx, %ecx
je 0x9bcc
testl %esi, %esi
jns 0x9bcc
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shrl %cl, %esi
notl %esi
orl %esi, %edi
movl %edi, 0x10(%rax,%rdx,4)
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%r14,%rax), %rcx
movslq (%r14,%rax), %rax
movl $0x0, 0x14(%rcx,%rax,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
decl (%r14,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: i_zr
V i_zr(NgaState *vm) {
  guard(vm, 1, 0, 0);
  if (TOS == 0) {
    i_dr(vm);
    ACTIVE.ip = TORS;
    ACTIVE.rp--;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
addq %rbx, %rax
addq $0x200004, %rax         # imm = 0x200004
movslq (%rax), %rcx
cmpl $0x0, 0x14(%rax,%rcx,4)
jne 0x9cb4
leaq 0x200004(%rbx), %r14
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3700
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%r14,%rax), %rcx
movslq (%r14,%rax), %rax
movl $0x0, 0x14(%rcx,%rax,4)
movslq 0x2043a4(%rbx), %rax
imulq $0x874, %rax, %rax      # imm = 0x874
leaq (%r14,%rax), %rcx
decl (%r14,%rax)
movslq 0x4(%r14,%rax), %rdx
movl 0x414(%rcx,%rdx,4), %ecx
movl %ecx, 0x8(%r14,%rax)
leal -0x1(%rdx), %ecx
movl %ecx, 0x4(%r14,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/crcx[P]retroforth/vm/nga-c/retro.c
// Function: strlcat
size_t strlcat(char *dst, const char *src, size_t dsize) {
  const char *odst = dst;
  const char *osrc = src;
  size_t n = dsize;
  size_t dlen;

  /* Find the end of dst and adjust bytes left but don't go past end. */
  while (n-- != 0 && *dst != '\0')
    dst++;
  dlen = dst - odst;
  n = dsize - dlen;

  if (n-- == 0)
    return(dlen + strlen(src));
  while (*src != '\0') {
    if (n != 0) {
      *dst++ = *src;
      n--;
    }
    src++;
  }
  *dst = '\0';
  return(dlen + (src - osrc));  /* count does not include NUL */
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
testq %rdx, %rdx
je 0x9e05
leaq (%rdi,%rdx), %rax
movq %rdx, %r8
movq %rdi, %rcx
cmpb $0x0, (%rcx)
je 0x9e05
incq %rcx
decq %r8
jne 0x9df5
movq %rax, %rcx
movq %rcx, %rbx
subq %rdi, %rbx
cmpq %rdx, %rbx
jne 0x9e1a
movq %rsi, %rdi
callq 0x3120
jmp 0x9e57
movb (%rsi), %r8b
testb %r8b, %r8b
je 0x9e4e
movq %rbx, %rdi
notq %rdi
addq %rdx, %rdi
movq %rsi, %rax
testq %rdi, %rdi
je 0x9e3e
movb %r8b, (%rcx)
incq %rcx
decq %rdi
jmp 0x9e40
xorl %edi, %edi
movb 0x1(%rax), %r8b
incq %rax
testb %r8b, %r8b
jne 0x9e2e
jmp 0x9e51
movq %rsi, %rax
movb $0x0, (%rcx)
subq %rsi, %rax
addq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/tests/ADTPriorityQueue_test.c
// Function: test_insert
void test_insert(void) {
	PriorityQueue pqueue = pqueue_create(compare_ints, NULL, NULL);
	int N = 1000;
	int* array = malloc(N * sizeof(*array));					// Στο pqueue θα προσθέσουμε pointers προς τα στοιχεία αυτού του πίνακα

	// insert N στοιχεία
	for (int i = 0; i < N; i++) {
		array[i] = i;
		pqueue_insert(pqueue, &array[i]);
		TEST_ASSERT(pqueue_size(pqueue) == i+1);			// Το size ενημερώθηκε;
		TEST_ASSERT(pqueue_max(pqueue) == &array[i]);	// Εισαγωγή σε αύξουσα σειρά, το στοιχείο που μόλις βάλαμε πρέπει να είναι στην κορυφή
	}

	pqueue_destroy(pqueue);
	free(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq -0x238(%rip), %rdi      # 0x3d14
xorl %esi, %esi
xorl %edx, %edx
callq 0x471c
movq %rax, %rbx
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x21a0
movq %rax, %r14
movl $0x1, %r13d
leaq 0x13a6(%rip), %r15      # 0x5318
leaq 0x1549(%rip), %r12      # 0x54c2
leaq 0x144a(%rip), %rbp      # 0x53ca
movq %rax, (%rsp)
cmpq $0x3e9, %r13            # imm = 0x3E9
je 0x4005
leal -0x1(%r13), %eax
movl %eax, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47c4
movq %rbx, %rdi
callq 0x47b2
movl %eax, %eax
xorl %edi, %edi
cmpq %rax, %r13
sete %dil
movq %r15, %rsi
movl $0x46, %edx
movq %r12, %rcx
leaq 0x13eb(%rip), %r8       # 0x53af
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x4000
movq %rbx, %rdi
callq 0x47ba
xorl %edi, %edi
cmpq %rax, %r14
sete %dil
movq %r15, %rsi
movl $0x47, %edx
movq %r12, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x25dc
incq %r13
addq $0x4, %r14
testl %eax, %eax
jne 0x3f84
callq 0x2e3b
movq %rbx, %rdi
callq 0x49c5
movq (%rsp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/tests/ADTPriorityQueue_test.c
// Function: test_remove
void test_remove(void) {
	PriorityQueue pqueue = pqueue_create(compare_ints, free, NULL);

	// προσθήκη δεδομένων, τυχαία σειρά
	int N = 10;
	int** array = malloc(N * sizeof(*array));
	for (int i = 0; i < N; i++)
		array[i] = create_int(i);
	shuffle(array, N);

	for (int i = 0; i < N; i++)
		pqueue_insert(pqueue, array[i]);

	// Διαδοχικά remove ώστε να συμβούν και resizes
	for (int i = N-1; i >= 0; i--) {
		int* value = pqueue_max(pqueue);
		TEST_ASSERT(*value == i);
		pqueue_remove_max(pqueue);
		TEST_ASSERT(pqueue_size(pqueue) == i);
	}

	pqueue_destroy(pqueue);

	// remove από ουρά χωρίς συνάρτηση destroy
	pqueue = pqueue_create(compare_ints, NULL, NULL);
	pqueue_insert(pqueue, &N);
	TEST_ASSERT(pqueue_max(pqueue) == &N);
	pqueue_remove_max(pqueue);
	pqueue_destroy(pqueue);
	free(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq -0x322(%rip), %rdi      # 0x3d14
movq 0x3f83(%rip), %rsi      # 0x7fc0
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x471c
movq %rax, %r14
movl $0xa, 0x4(%rsp)
movl $0x50, %edi
callq 0x21a0
movq %rax, %rbx
movl $0x4, %edi
callq 0x21a0
movl %r15d, (%rax)
movq %rax, (%rbx,%r15,8)
incq %r15
cmpq $0xa, %r15
jne 0x405f
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3cb4
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x47c4
incq %r15
cmpq $0xa, %r15
jne 0x4089
movl $0xa, %r13d
leaq 0x126d(%rip), %r15      # 0x5318
leaq 0x1410(%rip), %r12      # 0x54c2
leaq 0x133d(%rip), %rbp      # 0x53f6
testl %r13d, %r13d
jle 0x4126
decl %r13d
movq %r14, %rdi
callq 0x47ba
xorl %edi, %edi
cmpl (%rax), %r13d
sete %dil
movq %r15, %rsi
movl $0x5e, %edx
movq %r12, %rcx
leaq 0x1306(%rip), %r8       # 0x53ea
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x4121
movq %r14, %rdi
callq 0x4846
movq %r14, %rdi
callq 0x47b2
xorl %edi, %edi
cmpl %eax, %r13d
sete %dil
movq %r15, %rsi
movl $0x60, %edx
movq %r12, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
jne 0x40b9
callq 0x2e3b
movq %r14, %rdi
callq 0x49c5
leaq -0x421(%rip), %rdi      # 0x3d14
xorl %esi, %esi
xorl %edx, %edx
callq 0x471c
movq %rax, %r14
leaq 0x4(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x47c4
movq %r14, %rdi
callq 0x47ba
xorl %edi, %edi
cmpq %r15, %rax
sete %dil
leaq 0x11af(%rip), %rsi      # 0x5318
leaq 0x1352(%rip), %rcx      # 0x54c2
leaq 0x1298(%rip), %r8       # 0x540f
movl $0x68, %edx
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x4121
movq %r14, %rdi
callq 0x4846
movq %r14, %rdi
callq 0x49c5
movq %rbx, %rdi
callq 0x22b0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/lib/../modules/UsingHeap/ADTPriorityQueue.c
// Function: pqueue_create
PriorityQueue pqueue_create(CompareFunc compare, DestroyFunc destroy_value, Vector values) {
	assert(compare != NULL);	// LCOV_EXCL_LINE

	PriorityQueue pqueue = malloc(sizeof(*pqueue));
	pqueue->compare = compare;
	pqueue->destroy_value = destroy_value;

	// Δημιουργία του vector που αποθηκεύει τα στοιχεία.
	// ΠΡΟΣΟΧΗ: ΔΕΝ περνάμε την destroy_value στο vector!
	// Αν την περάσουμε θα καλείται όταν κάνουμε swap 2 στοιχεία, το οποίο δεν το επιθυμούμε.
	pqueue->values = vector_create(0, NULL);

	// Αν values != NULL, αρχικοποιούμε το σωρό.
	if (values != NULL)
		naive_heapify(pqueue, values);

	return pqueue;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x4793
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movl $0x18, %edi
callq 0x21a0
movq %rax, %r14
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
xorl %edi, %edi
xorl %esi, %esi
callq 0x49e8
movq %rax, (%r14)
testq %rbx, %rbx
je 0x4787
movq %rbx, %rdi
callq 0x4a28
testl %eax, %eax
jle 0x4787
movl %eax, %ebp
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4a2c
movq %r14, %rdi
movq %rax, %rsi
callq 0x47c4
incl %r15d
cmpl %r15d, %ebp
jne 0x4769
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16b8(%rip), %rdi      # 0x5e52
leaq 0x16c1(%rip), %rsi      # 0x5e62
leaq 0x16e2(%rip), %rcx      # 0x5e8a
movl $0x6a, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/lib/../modules/UsingHeap/ADTPriorityQueue.c
// Function: pqueue_insert
void pqueue_insert(PriorityQueue pqueue, Pointer value) {
	// Προσθέτουμε την τιμή στο τέλος το σωρού
	vector_insert_last(pqueue->values, value);

 	// Ολοι οι κόμβοι ικανοποιούν την ιδιότητα του σωρού εκτός από τον τελευταίο, που μπορεί να είναι
	// μεγαλύτερος από τον πατέρα του. Αρα μπορούμε να επαναφέρουμε την ιδιότητα του σωρού καλώντας
	// τη bubble_up γα τον τελευταίο κόμβο (του οποίου το 1-based id ισούται με το νέο μέγεθος του σωρού).
	bubble_up(pqueue, pqueue_size(pqueue));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x4ab9
movq (%rbx), %rdi
callq 0x4a28
cmpl $0x1, %eax
je 0x483c
movl %eax, %r14d
movl %r14d, %r15d
shrl $0x1f, %r15d
addl %r14d, %r15d
sarl %r15d
movq (%rbx), %rdi
movq 0x8(%rbx), %r13
leal -0x1(%r15), %esi
callq 0x4a2c
movq %rax, %r12
movq (%rbx), %rdi
leal -0x1(%r14), %esi
callq 0x4a2c
movq %r12, %rdi
movq %rax, %rsi
callq *%r13
testl %eax, %eax
jns 0x483c
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x496f
andl $-0x2, %r14d
cmpl $0x2, %r14d
movl %r15d, %r14d
jne 0x47e8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/lib/../modules/UsingHeap/ADTPriorityQueue.c
// Function: pqueue_remove_max
void pqueue_remove_max(PriorityQueue pqueue) {
	int last_node = pqueue_size(pqueue);
	assert(last_node != 0);		// LCOV_EXCL_LINE

	// Destroy την τιμή που αφαιρείται
	if (pqueue->destroy_value != NULL)
		pqueue->destroy_value(pqueue_max(pqueue));

	// Αντικαθιστούμε τον πρώτο κόμβο με τον τελευταίο και αφαιρούμε τον τελευταίο
	node_swap(pqueue, 1, last_node);
	vector_remove_last(pqueue->values);

 	// Ολοι οι κόμβοι ικανοποιούν την ιδιότητα του σωρού εκτός από τη νέα ρίζα
 	// που μπορεί να είναι μικρότερη από κάποιο παιδί της. Αρα μπορούμε να
 	// επαναφέρουμε την ιδιότητα του σωρού καλώντας τη bubble_down για τη ρίζα.
	bubble_down(pqueue, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x4a28
testl %eax, %eax
je 0x4950
movl %eax, %ebp
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x487f
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x4a2c
movq %rax, %rdi
callq *%r14
movl $0x1, %r14d
movq %rbx, %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x496f
movq (%rbx), %rdi
callq 0x4afd
movq (%rbx), %rdi
callq 0x4a28
cmpl $0x2, %eax
jl 0x4941
movl $0x2, %r12d
cmpl %eax, %r12d
jge 0x48ec
movq (%rbx), %rdi
movq 0x8(%rbx), %r13
leal -0x1(%r12), %esi
callq 0x4a2c
movq %rax, %r15
movq (%rbx), %rdi
movl %r12d, %esi
callq 0x4a2c
movq %r15, %rdi
movq %rax, %rsi
callq *%r13
movl %eax, %r15d
shrl $0x1f, %r15d
orl %r12d, %r15d
jmp 0x48ef
movl %r12d, %r15d
movq (%rbx), %rdi
movq 0x8(%rbx), %r13
leal -0x1(%r14), %esi
callq 0x4a2c
movq %rax, %r12
movq (%rbx), %rdi
leal -0x1(%r15), %esi
callq 0x4a2c
movq %r12, %rdi
movq %rax, %rsi
callq *%r13
testl %eax, %eax
jns 0x4941
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x496f
leal (%r15,%r15), %r12d
movq (%rbx), %rdi
callq 0x4a28
movl %r15d, %r14d
cmpl %eax, %r12d
jle 0x48b3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1571(%rip), %rdi      # 0x5ec8
leaq 0x1504(%rip), %rsi      # 0x5e62
leaq 0x1572(%rip), %rcx      # 0x5ed7
movl $0x90, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/lib/../modules/UsingHeap/ADTPriorityQueue.c
// Function: node_swap
static void node_swap(PriorityQueue pqueue, int node_id1, int node_id2) {
	// τα node_ids είναι 1-based, το node_id αποθηκεύεται στη θέση node_id - 1
	Pointer value1 = node_value(pqueue, node_id1);
	Pointer value2 = node_value(pqueue, node_id2);

	vector_set_at(pqueue->values, node_id1 - 1, value2);
	vector_set_at(pqueue->values, node_id2 - 1, value1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rdi
decl %ebp
movl %ebp, %esi
callq 0x4a2c
movq %rax, %r15
movq (%r14), %rdi
decl %ebx
movl %ebx, %esi
callq 0x4a2c
movq (%r14), %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x4a5f
movq (%r14), %rdi
movl %ebx, %esi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4a5f
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/lib/../modules/UsingHeap/ADTPriorityQueue.c
// Function: pqueue_destroy
void pqueue_destroy(PriorityQueue pqueue) {
	// Αντί να κάνουμε εμείς destroy τα στοιχεία, είναι απλούστερο να
	// προσθέσουμε τη destroy_value στο vector ώστε να κληθεί κατά το vector_destroy.
	vector_set_destroy_value(pqueue->values, pqueue->destroy_value);
	vector_destroy(pqueue->values);

	free(pqueue);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x10(%rbx), %rsi
callq 0x4bcc
movq (%rbx), %rdi
callq 0x4bd5
movq %rbx, %rdi
popq %rbx
jmp 0x22b0
nop
// File: /workspace/github_c_makefile_star2_O3/umbrant[P]Non-blocking-Buffers/nameserver_main.c
// Function: main
int main() 
{
	if(init_nameserver()) {
		printf("Error initializing nameserver, failing!\n");
		return -1;
	}

  signal(SIGUSR1, data_available);

	while(1) {
    sleep(1);
	}
}

// Assembly:
pushq %rax
xorl %eax, %eax
callq 0x1933
testl %eax, %eax
je 0x135b
leaq 0x1cb5(%rip), %rdi      # 0x3004
callq 0x1070
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
leaq 0x130e(%rip), %rsi      # 0x2670
movl $0xa, %edi
callq 0x1150
movl $0x1, %edi
callq 0x1230
jmp 0x136c
// File: /workspace/github_c_makefile_star2_O3/umbrant[P]Non-blocking-Buffers/nameserver.c
// Function: data_available
void data_available(int signum)
{
	char* recv;
  size_t recv_len;
	int retval = -1;
  int request_type;

	retval = nbb_read_item(CHANNEL_ID, (void**)&recv, &recv_len);

	// This is kind of a hack
	// Do an extra resize and copy to null terminate
	char* recv_str = (char*)calloc(recv_len+1, sizeof(char));
	memcpy(recv_str, recv, recv_len);
	recv_str[recv_len] = '\0';
 
printf("nameserver recv: %s\n", recv_str);

  request_type = atoi(strtok(recv_str, " "));
  handle_connection[request_type](strtok(NULL, ""));

  signal(SIGUSR1, data_available);
  free(recv);
  free(recv_str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x10(%rsp), %rbx
leaq 0x8(%rsp), %r14
xorl %edi, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x182a
movq (%r14), %r15
leaq 0x1(%r15), %rdi
movl $0x1, %esi
callq 0x1100
movq %rax, %r14
movq (%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x1140
movb $0x0, (%r14,%r15)
leaq 0x12f1(%rip), %rdi      # 0x39b1
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
leaq 0xa74(%rip), %rsi       # 0x3145
movq %r14, %rdi
callq 0x11d0
movq %rax, %rdi
callq 0x1200
movslq %eax, %r15
leaq 0x36f5(%rip), %r12      # 0x5de0
leaq 0xcec(%rip), %rsi       # 0x33de
xorl %edi, %edi
callq 0x11d0
movq %rax, %rdi
callq *(%r12,%r15,8)
leaq -0x97(%rip), %rsi       # 0x2670
movl $0xa, %edi
callq 0x1150
movq (%rbx), %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/umbrant[P]Non-blocking-Buffers/nameserver.c
// Function: handle_client
void handle_client(char* arg)
{
  printf("\n** Handling client\n");

  char* msg = (char*)malloc(50*sizeof(char));
  int service_id;
  int channel_id; 

  service_id = find_service(arg);

  if(service_id == -1) {
    printf("** Unable to find service: %s\n", arg);
    strcpy(msg, UNKNOWN_SERVICE);

    nbb_insert_item(CHANNEL_ID, msg, strlen(msg));
    free(msg);
    return;
  }

  printf("** Able to find service: %s\n", arg);

  channel_id = bind_client_service(service_id);
  if(channel_id == -1) {
    printf("** Service has no channel free\n");
    strcpy(msg, SERVICE_BUSY);

    nbb_insert_item(CHANNEL_ID, msg, strlen(msg));
    free(msg);
    return;
  }

  printf("** Service could accept connection\n");

  char tmp[2]; 
  sprintf(tmp, "%d", service_lists[service_id].pid); 

  sprintf(msg, "%d", channel_id);
  strcat(msg, " "); 
  strcat(msg, tmp);

  nbb_insert_item(CHANNEL_ID, msg, strlen(msg));
  free(msg);
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x132c(%rip), %rdi      # 0x3a6a
callq 0x1070
movl $0x32, %edi
callq 0x1170
movq %rax, %rbx
movq %r14, %rdi
callq 0x2871
cmpl $-0x1, %eax
je 0x27a9
movl %eax, %ebp
leaq 0x127f(%rip), %rdi      # 0x39e5
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
movslq %ebp, %rax
leaq (%rax,%rax,4), %r14
leaq 0x4162(%rip), %r15      # 0x68e0
movslq 0x18(%r15,%r14,8), %rax
testq %rax, %rax
jle 0x2830
leaq (%r15,%r14,8), %rcx
movq 0x10(%rcx), %rsi
xorl %edx, %edx
cmpl $0x0, (%rsi,%rdx,4)
je 0x27c9
incq %rdx
cmpq %rdx, %rax
jne 0x2796
jmp 0x2830
leaq 0x1216(%rip), %rdi      # 0x39c6
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
movaps 0x131f(%rip), %xmm0     # 0x3ae0
movups %xmm0, (%rbx)
jmp 0x284a
movl $0x1, (%rsi,%rdx,4)
movq 0x8(%rcx), %rax
movl (%rax,%rdx,4), %ebp
cmpl $-0x1, %ebp
je 0x2830
leaq 0x129b(%rip), %rdi      # 0x3a7e
callq 0x1070
movl 0x1c(%r15,%r14,8), %edx
leaq 0x8ac(%rip), %r14       # 0x30a0
leaq 0x6(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1220
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1220
movq %rbx, %rdi
callq 0x10b0
movw $0x20, (%rbx,%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1210
jmp 0x284a
leaq 0x126a(%rip), %rdi      # 0x3aa1
callq 0x1070
movaps 0x12ad(%rip), %xmm0     # 0x3af0
movups %xmm0, (%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x10b0
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1667
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/umbrant[P]Non-blocking-Buffers/nameserver.c
// Function: bind_client_service
int bind_client_service(int service_id)
{
  int i;

  for(i = 0;i < service_lists[service_id].num_channels;i++) {
    if(!service_lists[service_id].is_channel_busy[i]) {
      service_lists[service_id].is_channel_busy[i] = 1;
      return service_lists[service_id].channel_ids[i];
    }
  }

  return -1;
}

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,4), %rdx
leaq 0x4020(%rip), %rsi      # 0x68e0
movslq 0x18(%rsi,%rdx,8), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
jle 0x28e7
leaq (%rsi,%rdx,8), %rdx
movq 0x10(%rdx), %rdi
xorl %esi, %esi
cmpl $0x0, (%rdi,%rsi,4)
je 0x28e8
incq %rsi
cmpq %rsi, %rcx
jne 0x28d9
retq
movl $0x1, (%rdi,%rsi,4)
movq 0x8(%rdx), %rax
movl (%rax,%rsi,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/umbrant[P]Non-blocking-Buffers/nameserver.c
// Function: reserve_channel
int reserve_channel(int slot)
{
  int i;
  int count = 0;

  for(i = 0;i < TOTAL_CHANNELS;i++) {
    if(free_lists[i] == 0) {
      free_lists[i] = 1;
      service_lists[slot].channel_ids[count] = i + 1; // Since nameserver is bind to id 0 
      count++;
    }

    if(count == service_lists[slot].num_channels) {
      break;
    }
  }
  
  // Couldn't reserve all of the channels requested
  if(count != service_lists[slot].num_channels) {
    dealloc_service(slot);
    return -1;
  }

  return 0;
}

// Assembly:
pushq %rax
movslq %edi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x3e0a(%rip), %rcx      # 0x68e0
leaq (%rcx,%rax,8), %rax
addq $0x8, %rax
xorl %ecx, %ecx
movl $0x1, %edx
leaq 0x3ec4(%rip), %rsi      # 0x69b0
xorl %r8d, %r8d
cmpl $0x0, (%rcx,%rsi)
jne 0x2b09
movl $0x1, (%rcx,%rsi)
movq (%rax), %r9
movslq %r8d, %r8
movl %edx, (%r9,%r8,4)
incl %r8d
cmpl 0x10(%rax), %r8d
je 0x2b2a
incl %edx
addq $0x4, %rcx
cmpq $0xc8, %rcx
jne 0x2aef
callq 0x2b2e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2b2c
xorl %eax, %eax
popq %rcx
retq