LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/prim.c
// Function: af_prim_do_does
void af_prim_do_does(af_task_t* task) {
  af_global_t* global = task->global;
  if(task->data_stack_current > task->data_stack_top) {
    if(task->return_stack_current > task->return_stack_top) {
      *(--task->data_stack_current) =
	(af_cell_t)AF_WORD_DATA(task->current_word);
      *(--task->return_stack_current) =
	task->interpreter_pointer ? task->interpreter_pointer + 1 : NULL;
      task->interpreter_pointer = task->current_word->secondary;
    } else {
      af_handle_return_stack_overflow(global, task);
    }
  } else {
    af_handle_data_stack_overflow(global, task);
  }
}

// Assembly:
movq %rdi, %rsi
movq (%rdi), %rdi
movq 0x60(%rsi), %rcx
cmpq 0x78(%rsi), %rcx
jbe 0x32de
movq 0x70(%rsi), %rax
cmpq 0x88(%rsi), %rax
jbe 0x332e
movq 0xf8(%rsi), %rdx
addq $0x28, %rdx
leaq -0x8(%rcx), %rdi
movq %rdi, 0x60(%rsi)
movq %rdx, -0x8(%rcx)
movq 0x58(%rsi), %rcx
leaq 0x8(%rcx), %rdx
testq %rcx, %rcx
cmovneq %rdx, %rcx
leaq -0x8(%rax), %rdx
movq %rdx, 0x70(%rsi)
movq %rcx, -0x8(%rax)
movq 0xf8(%rsi), %rax
movq 0x20(%rax), %rax
movq %rax, 0x58(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/prim.c
// Function: af_prim_literal
void af_prim_literal(af_task_t* task) {
  af_global_t* global = task->global;
  af_compiled_t* slot;
  AF_VERIFY_COMPILING(task);
  AF_VERIFY_DATA_STACK_READ(task, 1);
  slot = af_allot(global, task, sizeof(af_compiled_t) * 2);
  if(slot) {
    slot->compiled_call = global->builtin_literal_runtime;
    (slot + 1)->compiled_cell = *task->data_stack_current++;
    AF_ADVANCE_IP(task, 1);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3621
testq %rax, %rax
je 0xb93e
movq 0x180(%r14), %rcx
movq %rcx, (%rax)
movq 0x60(%rbx), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x60(%rbx)
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x58(%rbx), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmovneq %rcx, %rax
movq %rax, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/cond.c
// Function: af_cond_init
af_bool_t af_cond_init(af_cond_t* cond) {
  if(pthread_cond_init(&cond->cond, NULL)) {
    return FALSE;
  }
  if(pthread_mutex_init(&cond->mutex, NULL)) {
    pthread_cond_destroy(&cond->cond);
    return FALSE;
  }
  cond->count = 0;
  return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x28(%rdi), %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2200
testl %eax, %eax
jne 0xb9b9
movq %r14, %rdi
xorl %esi, %esi
callq 0x2300
testl %eax, %eax
je 0xb9b0
movq %rbx, %rdi
callq 0x2290
xorl %r15d, %r15d
jmp 0xb9b9
andq $0x0, 0x58(%r14)
pushq $-0x1
popq %r15
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/cond.c
// Function: af_cond_wait
void af_cond_wait(af_cond_t* cond) {
  pthread_mutex_lock(&cond->mutex);
  if(!cond->count) {
    pthread_cond_wait(&cond->cond, &cond->mutex);
  }
  cond->count = 0;
  pthread_mutex_unlock(&cond->mutex);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2310
cmpq $0x0, 0x58(%rbx)
jne 0xb9f4
leaq 0x28(%rbx), %rdi
movq %rbx, %rsi
callq 0x2100
andq $0x0, 0x58(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/cond.c
// Function: af_cond_signal
void af_cond_signal(af_cond_t* cond) {
  pthread_mutex_lock(&cond->mutex);
  cond->count++;
  pthread_cond_signal(&cond->cond);
  pthread_mutex_unlock(&cond->mutex);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2310
incq 0x58(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x21d0
movq %rbx, %rdi
popq %rbx
jmp 0x2210
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_init
af_bool_t af_io_init(af_io_t* io, af_global_t* global) {
  af_io_fd_t pipefd[2];
  if(pthread_mutex_init(&io->mutex, NULL)) {
    return FALSE;
  }
  if(pipe(pipefd)) {
    pthread_mutex_destroy(&io->mutex);
    return FALSE;
  }
  io->global = global;
  io->break_fd_out = pipefd[0];
  io->break_fd_in = pipefd[1];
  if(!af_fd_set_blocking(io->break_fd_in, TRUE)) {
    close(io->break_fd_out);
    close(io->break_fd_in);
    pthread_mutex_destroy(&io->mutex);
    return FALSE;
  }
  io->active_action_count = 0;
  io->first_active_action = NULL;
  io->first_waiting_action = NULL;
  io->last_waiting_action = NULL;
  io->first_done_action = NULL;
  io->to_be_destroyed = FALSE;
  io->handler_task = NULL;
  if(!af_io_prepare_stdin()) {
    close(io->break_fd_out);
    close(io->break_fd_in);
    pthread_mutex_destroy(&io->mutex);
    return FALSE;
  }
  if(pthread_create(&io->pthread, NULL, af_io_main, io)) {
    close(io->break_fd_out);
    close(io->break_fd_in);
    pthread_mutex_destroy(&io->mutex);
    return FALSE;
  }
  return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2300
testl %eax, %eax
jne 0xbad1
movq %rsp, %rdi
callq 0x2190
testl %eax, %eax
jne 0xbac6
movq %r12, 0x30(%r14)
movl (%rsp), %eax
movl %eax, 0x3c(%r14)
movl 0x4(%rsp), %edi
movl %edi, 0x38(%r14)
pushq $-0x1
popq %r15
movq %r15, %rsi
callq 0xbae0
testq %rax, %rax
je 0xbab4
andq $0x0, 0x40(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x70(%r14)
callq 0xbb32
testq %rax, %rax
je 0xbab4
leaq 0xe1(%rip), %rdx        # 0xbb84
movq %r14, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x2250
testl %eax, %eax
je 0xbad1
movl 0x3c(%r14), %edi
callq 0x2180
movl 0x38(%r14), %edi
callq 0x2180
movq %rbx, %rdi
callq 0x2140
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_fd_set_blocking
af_bool_t af_fd_set_blocking(int fd, af_bool_t blocking) {
  int flags = fcntl(fd, F_GETFL, 0);
  if (flags == -1) {
    return TRUE;
  }
  if (blocking) {
    flags &= ~O_NONBLOCK;
  } else {
    flags |= O_NONBLOCK;
  }
  return fcntl(fd, F_SETFL, flags) != -1 ? TRUE : FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x20c0
cmpl $-0x1, %eax
je 0xbb27
xorl %edx, %edx
testq %r14, %r14
sete %dl
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
shll $0xb, %edx
orl %eax, %edx
pushq $0x4
popq %rsi
movl %ebx, %edi
xorl %eax, %eax
callq 0x20c0
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
setne %al
negq %rax
jmp 0xbb2a
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_prepare_stdin
af_bool_t af_io_prepare_stdin(void) {
  struct termios tp;
  if(isatty(STDIN_FILENO)) {
    if(tcgetattr(STDIN_FILENO, &tp) == -1) {
      return FALSE;      
    }
    if(tp.c_lflag & ECHO || tp.c_lflag & ICANON) {
      tp.c_lflag &= ~ECHO & ~ICANON;
      if(tcsetattr(STDIN_FILENO, TCSANOW, &tp) == -1) {
	return FALSE;
      }
    }
  }
  return TRUE;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
xorl %edi, %edi
callq 0x20a0
testl %eax, %eax
je 0xbb78
xorl %ebx, %ebx
leaq 0x4(%rsp), %rsi
xorl %edi, %edi
callq 0x2270
cmpl $-0x1, %eax
je 0xbb7b
movl 0x10(%rsp), %eax
testb $0xa, %al
je 0xbb78
andl $-0xb, %eax
leaq 0x4(%rsp), %rdx
movl %eax, 0xc(%rdx)
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x2280
cmpl $-0x1, %eax
je 0xbb7b
pushq $-0x1
popq %rbx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_cleanup_stdin
af_bool_t af_io_cleanup_stdin(void) {
  struct termios tp;
  af_fd_set_blocking(STDIN_FILENO, TRUE);
  if(isatty(STDIN_FILENO)) {
    if(tcgetattr(STDIN_FILENO, &tp) == -1) {
      return FALSE;      
    }
    if(!(tp.c_lflag & ECHO) || !(tp.c_lflag & ICANON)) {
      tp.c_lflag |= ECHO | ICANON;
      if(tcsetattr(STDIN_FILENO, TCSANOW, &tp) == -1) {
	return FALSE;
      }
    }
  }
  return TRUE;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
pushq $-0x1
popq %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0xbae0
xorl %edi, %edi
callq 0x20a0
testl %eax, %eax
je 0xc06a
leaq 0x4(%rsp), %rsi
xorl %edi, %edi
callq 0x2270
cmpl $-0x1, %eax
je 0xc068
movl 0x10(%rsp), %eax
movl %eax, %ecx
notl %ecx
testb $0xa, %cl
je 0xc06a
orl $0xa, %eax
leaq 0x4(%rsp), %rdx
movl %eax, 0xc(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x2280
cmpl $-0x1, %eax
jne 0xc06a
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_action_destroy
void af_io_action_destroy(af_io_action_t* action) {
  af_io_t* io = action->io;
  pthread_mutex_lock(&io->mutex);
  if(action->is_done) {
    if(action->prev_action) {
      action->prev_action->next_action = action->next_action;
    } else {
      io->first_done_action = action->next_action;
    }
    if(action->next_action) {
      action->next_action->prev_action = action->prev_action;
    }
    free(action);
  } else {
    action->to_be_destroyed = TRUE;
  }
  pthread_mutex_unlock(&io->mutex);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x10(%rdi), %r15
leaq 0x8(%r15), %rbx
movq %rbx, %rdi
callq 0x2310
cmpq $0x0, 0x78(%r14)
je 0xc104
movq (%r14), %rax
movq 0x8(%r14), %rcx
addq $0x68, %r15
leaq 0x8(%rax), %rdx
testq %rax, %rax
cmoveq %r15, %rdx
movq %rcx, (%rdx)
testq %rcx, %rcx
je 0xc0fa
movq %rax, (%rcx)
movq %r14, %rdi
callq 0x2050
jmp 0xc109
orq $-0x1, 0x20(%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_action_get_state
void af_io_action_get_state(af_io_action_t* action, af_io_state_t* state) {
  pthread_mutex_lock(&action->io->mutex);
  state->buffer = action->buffer;
  state->count = action->count;
  state->index = action->index;
  state->offset = action->offset;
  state->is_done = action->is_done;
  state->is_closed = action->is_closed;
  state->has_hangup = action->has_hangup;
  state->has_error = action->has_error;
  pthread_mutex_unlock(&action->io->mutex);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
addq $0x8, %rdi
callq 0x2310
movq 0x30(%r14), %rax
movq %rax, (%rbx)
movups 0x38(%r14), %xmm0
movups %xmm0, 0x8(%rbx)
movq 0x48(%r14), %rax
movq %rax, 0x18(%rbx)
movups 0x78(%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movups 0x88(%r14), %xmm0
movups %xmm0, 0x30(%rbx)
movq 0x10(%r14), %rdi
addq $0x8, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_open
af_io_fd_t af_io_open(af_byte_t* path, af_io_size_t count, af_io_flags_t flags,
		      af_io_mode_t mode, af_io_error_t* error) {
  af_byte_t* path_buffer = malloc(sizeof(af_byte_t) * (count + 1));
  af_io_fd_t fd;
  memcpy(path_buffer, path, count);
  path_buffer[count] = 0;
  if((fd = open(path_buffer, flags, mode)) >= 0) {
    *error = 0;
    free(path_buffer);
    return fd;
  } else {
    *error = errno;
    free(path_buffer);
    return -1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
leaq 0x1(%rsi), %rdi
callq 0x2220
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x21f0
movb $0x0, (%r14,%r12)
xorl %r12d, %r12d
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x22a0
movl %eax, %ebp
testl %eax, %eax
jns 0xc247
callq 0x2070
movl (%rax), %r12d
pushq $-0x1
popq %rbp
movq %r14, %rdi
callq 0x2050
movl %r12d, (%rbx)
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_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_pipe
af_bool_t af_io_pipe(af_io_fd_t* in, af_io_fd_t* out, af_io_error_t* error) {
  af_io_fd_t fds[2];
  if(!pipe(fds)) {
    *out = fds[0];
    *in = fds[1];
    *error = 0;
    return TRUE;
  } else {
    *error = errno;
    return FALSE;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
callq 0x2190
testl %eax, %eax
je 0xc28e
callq 0x2070
movl (%rax), %ecx
xorl %eax, %eax
jmp 0xc2a1
movl 0x8(%rsp), %eax
movl %eax, (%r15)
movl 0xc(%rsp), %eax
movl %eax, (%r14)
pushq $-0x1
popq %rax
xorl %ecx, %ecx
movl %ecx, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_delete
af_bool_t af_io_delete(af_byte_t* path, af_io_size_t count,
		       af_io_error_t* error) {
  af_byte_t* path_buffer = malloc(sizeof(af_byte_t) * (count + 1));
  memcpy(path_buffer, path, count);
  path_buffer[count] = 0;
  if(!unlink(path_buffer)) {
    *error = 0;
    free(path_buffer);
    return TRUE;
  } else {
    *error = errno;
    free(path_buffer);
    return FALSE;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x1(%rsi), %rdi
callq 0x2220
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x21f0
movb $0x0, (%r14,%r15)
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0xc2f5
callq 0x2070
movl (%rax), %ebp
xorl %r15d, %r15d
jmp 0xc2fb
pushq $-0x1
popq %r15
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x2050
movl %ebp, (%rbx)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_rename
af_bool_t af_io_rename(af_byte_t* path1, af_io_size_t count1,
		       af_byte_t* path2, af_io_size_t count2,
		       af_io_error_t* error) {
  af_byte_t* path_buffer1 = malloc(sizeof(af_byte_t) * (count1 + 1));
  af_byte_t* path_buffer2 = malloc(sizeof(af_byte_t) * (count2 + 1));
  memcpy(path_buffer1, path1, count1);
  path_buffer1[count1] = 0;
  memcpy(path_buffer2, path2, count2);
  path_buffer2[count2] = 0;
  if(!rename(path_buffer1, path_buffer2)) {
    *error = 0;
    free(path_buffer1);
    free(path_buffer2);
    return TRUE;
  } else {
    *error = errno;
    free(path_buffer1);
    free(path_buffer2);
    return TRUE;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x1(%rsi), %rdi
callq 0x2220
movq %rax, %r14
leaq 0x1(%r12), %rdi
callq 0x2220
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x21f0
xorl %ebx, %ebx
movb %bl, (%r14,%rbp)
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x21f0
movb %bl, (%r15,%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x22b0
testl %eax, %eax
je 0xc3e5
callq 0x2070
movl (%rax), %ebx
movq %r14, %rdi
callq 0x2050
movq %r15, %rdi
callq 0x2050
movq (%rsp), %rax
movl %ebx, (%rax)
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_isatty
af_bool_t af_io_isatty(af_io_fd_t fd, af_io_error_t* error) {
  if(isatty(fd)) {
    *error = 0;
    return TRUE;
  } else if(errno == EINVAL || errno == ENOTTY) {
    *error = 0;
    return FALSE;
  } else {
    *error = errno;
    return FALSE;
  }
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x20a0
testl %eax, %eax
je 0xc423
pushq $-0x1
popq %rax
xorl %ecx, %ecx
movl %ecx, (%rbx)
popq %rbx
retq
callq 0x2070
movl (%rax), %edx
xorl %ecx, %ecx
cmpl $0x16, %edx
je 0xc441
movl $0x0, %eax
cmpl $0x19, %edx
je 0xc41f
xorl %eax, %eax
movl %edx, %ecx
jmp 0xc41f
xorl %eax, %eax
jmp 0xc41f
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_sleep
af_io_action_t* af_io_sleep(af_io_t* io, af_time_t* sleep_until,
			    af_task_t* task_to_wake) {
  af_io_action_t* action;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  action->type = AF_IO_TYPE_SLEEP;
  action->to_be_destroyed = FALSE;
  action->fd = 0;
  action->buffer = NULL;
  action->count = 0;
  action->index = 0;
  action->offset = 0;
  action->whence = AF_IO_SEEK_CUR;
  action->sleep_until.tv_sec = sleep_until->sec;
  action->sleep_until.tv_nsec = sleep_until->nsec;
  action->is_buffer_freeable = FALSE;
  action->task_to_wake = task_to_wake;
  action->is_done = FALSE;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
je 0xc501
movq $0x4, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
andl $0x0, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movq $0x1, 0x50(%rbx)
movups (%r12), %xmm1
movups %xmm1, 0x58(%rbx)
andq $0x0, 0x68(%rbx)
movq %r15, 0x70(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_add
void af_io_add(af_io_t* io, af_io_action_t* action) {
  af_bool_t wake = FALSE;
  pthread_mutex_lock(&io->mutex);
  action->io = io;
  if(action->type == AF_IO_TYPE_WRITE) {
    io->pending_write_count++;
  }
  if(action->type != AF_IO_TYPE_SLEEP && af_io_is_active(io, action->fd)) {
    action->prev_action = io->last_waiting_action;
    action->next_action = NULL;
    if(action->prev_action) {
      action->prev_action->next_action = action;
    } else {
      io->first_waiting_action = action;
    }
    io->last_waiting_action = action;
  } else {
    action->prev_action = NULL;
    action->next_action = io->first_active_action;
    if(action->next_action) {
      action->next_action->prev_action = action;
    }
    io->first_active_action = action;
    io->active_action_count++;
      wake = TRUE;
  }
  pthread_mutex_unlock(&io->mutex);
  if(wake) {
    af_io_wake(io);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x2310
movq %rbx, 0x10(%r15)
movq 0x18(%r15), %rax
cmpq $0x4, %rax
je 0xc57f
cmpq $0x1, %rax
jne 0xc53f
incq 0x48(%rbx)
movl 0x28(%r15), %esi
movq %rbx, %rdi
callq 0xcb7a
testq %rax, %rax
je 0xc57f
movq 0x60(%rbx), %rax
movq %rax, (%r15)
andq $0x0, 0x8(%r15)
leaq 0x58(%rbx), %rcx
leaq 0x8(%rax), %rdx
testq %rax, %rax
cmoveq %rcx, %rdx
movq %r15, (%rdx)
movq %r15, 0x60(%rbx)
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2210
andq $0x0, (%r15)
movq 0x50(%rbx), %rax
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0xc593
movq %r15, (%rax)
movq %r15, 0x50(%rbx)
incq 0x40(%rbx)
movq %r14, %rdi
callq 0x2210
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xc07d
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_tell
af_io_action_t* af_io_tell(af_io_t* io, af_io_fd_t fd,
			   af_task_t* task_to_wake) {
  af_io_action_t* action;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  action->type = AF_IO_TYPE_TELL;
  action->to_be_destroyed = FALSE;
  action->fd = fd;
  action->buffer = NULL;
  action->count = 0;
  action->index = 0;
  action->offset = 0;
  action->whence = AF_IO_SEEK_CUR;
  action->sleep_until.tv_sec = 0;
  action->sleep_until.tv_nsec = 0;
  action->is_buffer_freeable = FALSE;
  action->task_to_wake = task_to_wake;
  action->is_done = FALSE;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
je 0xc617
movq $0x5, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movl %ebp, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movq $0x1, 0x50(%rbx)
andq $0x0, 0x68(%rbx)
movups %xmm0, 0x58(%rbx)
movq %r15, 0x70(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_close_async
af_io_action_t* af_io_close_async(af_io_t* io, af_io_fd_t fd) {
  af_io_action_t* action;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  action->type = AF_IO_TYPE_CLOSE;
  action->to_be_destroyed = FALSE;
  action->fd = fd;
  action->buffer = NULL;
  action->count = 0;
  action->index = 0;
  action->offset = 0;
  action->whence = AF_IO_SEEK_CUR;
  action->sleep_until.tv_sec = 0;
  action->sleep_until.tv_nsec = 0;
  action->is_buffer_freeable = FALSE;
  action->task_to_wake = NULL;
  action->is_done = FALSE;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
je 0xc6f6
movq $0x2, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movl %ebp, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movq $0x1, 0x50(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_seek_block
af_io_action_t* af_io_seek_block(af_io_t* io, af_io_fd_t fd, af_io_off_t offset,
				 af_io_whence_t whence,
				 af_task_t* task_to_wake) {
  af_io_action_t* action;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  action->type = AF_IO_TYPE_SEEK;
  action->to_be_destroyed = FALSE;
  action->fd = fd;
  action->buffer = NULL;
  action->count = 0;
  action->index = 0;
  action->offset = offset;
  action->whence = whence;
  action->sleep_until.tv_sec = 0;
  action->sleep_until.tv_nsec = 0;
  action->is_buffer_freeable = FALSE;
  action->task_to_wake = task_to_wake;
  action->is_done = FALSE;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
je 0xc774
movq $0x3, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movl %r13d, 0x28(%rbx)
andq $0x0, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movq %r12, 0x48(%rbx)
movslq %ebp, %rax
movq %rax, 0x50(%rbx)
andq $0x0, 0x68(%rbx)
movups %xmm0, 0x58(%rbx)
movq %r15, 0x70(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_seek_async
af_io_action_t* af_io_seek_async(af_io_t* io, af_io_fd_t fd, af_io_off_t offset,
				 af_io_whence_t whence) {
  af_io_action_t* action;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  action->type = AF_IO_TYPE_SEEK;
  action->to_be_destroyed = FALSE;
  action->fd = fd;
  action->buffer = NULL;
  action->count = 0;
  action->index = 0;
  action->offset = offset;
  action->whence = whence;
  action->sleep_until.tv_sec = 0;
  action->sleep_until.tv_nsec = 0;
  action->is_buffer_freeable = FALSE;
  action->task_to_wake = NULL;
  action->is_done = FALSE;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
je 0xc7f1
movq $0x3, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movl %r12d, 0x28(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movq %r15, 0x48(%rbx)
movslq %ebp, %rax
movq %rax, 0x50(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_read_block
af_io_action_t* af_io_read_block(af_io_t* io, af_io_fd_t fd, af_byte_t* buffer,
				 af_io_size_t count, af_task_t* task_to_wake) {
  af_io_action_t* action;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  action->type = AF_IO_TYPE_READ;
  action->to_be_destroyed = FALSE;
  action->fd = fd;
  action->buffer = buffer;
  action->count = count;
  action->index = 0;
  action->offset = 0;
  action->whence = AF_IO_SEEK_CUR;
  action->sleep_until.tv_sec = 0;
  action->sleep_until.tv_nsec = 0;
  action->is_buffer_freeable = FALSE;
  action->task_to_wake = task_to_wake;
  action->is_done = count == 0;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_fd_set_blocking(fd, FALSE);
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
je 0xc882
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movl %ebp, 0x28(%rbx)
movq %r13, 0x30(%rbx)
movq %r15, 0x38(%rbx)
movups %xmm0, 0x40(%rbx)
movq $0x1, 0x50(%rbx)
movups %xmm0, 0x58(%rbx)
andq $0x0, 0x68(%rbx)
movq %r12, 0x70(%rbx)
xorl %eax, %eax
testq %r15, %r15
sete %al
movq %rax, 0x78(%rbx)
movups %xmm0, 0x80(%rbx)
andq $0x0, 0x90(%rbx)
movl %ebp, %edi
xorl %esi, %esi
callq 0xbae0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_write_block
af_io_action_t* af_io_write_block(af_io_t* io, af_io_fd_t fd, af_byte_t* buffer,
				  af_io_size_t count, af_task_t* task_to_wake) {
  af_io_action_t* action;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  action->type = AF_IO_TYPE_WRITE;
  action->to_be_destroyed = FALSE;
  action->fd = fd;
  action->buffer = buffer;
  action->count = count;
  action->index = 0;
  action->offset = 0;
  action->whence = AF_IO_SEEK_CUR;
  action->sleep_until.tv_sec = 0;
  action->sleep_until.tv_nsec = 0;
  action->is_buffer_freeable = FALSE;
  action->task_to_wake = task_to_wake;
  action->is_done = count == 0;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_fd_set_blocking(fd, FALSE);
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
je 0xc91d
pushq $0x1
popq %rax
movq %rax, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movl %ebp, 0x28(%rbx)
movq %r13, 0x30(%rbx)
movq %r15, 0x38(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movq %rax, 0x50(%rbx)
movups %xmm0, 0x58(%rbx)
andq $0x0, 0x68(%rbx)
movq %r12, 0x70(%rbx)
xorl %eax, %eax
testq %r15, %r15
sete %al
movq %rax, 0x78(%rbx)
movups %xmm0, 0x80(%rbx)
andq $0x0, 0x90(%rbx)
movl %ebp, %edi
xorl %esi, %esi
callq 0xbae0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_read_async
af_io_action_t* af_io_read_async(af_io_t* io, af_io_fd_t fd, af_byte_t* buffer,
				 af_io_size_t count) {
  af_io_action_t* action;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  action->type = AF_IO_TYPE_READ;
  action->to_be_destroyed = FALSE;
  action->fd = fd;
  action->buffer = buffer;
  action->count = count;
  action->index = 0;
  action->offset = 0;
  action->whence = AF_IO_SEEK_CUR;
  action->sleep_until.tv_sec = 0;
  action->sleep_until.tv_nsec = 0;
  action->is_buffer_freeable = FALSE;
  action->task_to_wake = NULL;
  action->is_done = count == 0;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_fd_set_blocking(fd, FALSE);
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
je 0xc9a9
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movl %ebp, 0x28(%rbx)
movq %r12, 0x30(%rbx)
movq %r15, 0x38(%rbx)
movups %xmm0, 0x40(%rbx)
movq $0x1, 0x50(%rbx)
xorl %eax, %eax
testq %r15, %r15
sete %al
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movq %rax, 0x78(%rbx)
movups %xmm0, 0x80(%rbx)
andq $0x0, 0x90(%rbx)
movl %ebp, %edi
xorl %esi, %esi
callq 0xbae0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_write_async
af_io_action_t* af_io_write_async(af_io_t* io, af_io_fd_t fd, af_byte_t* buffer,
				  af_io_size_t count) {
  af_io_action_t* action;
  af_byte_t* buffer_copy;
  if(!(action = malloc(sizeof(af_io_action_t)))) {
    return NULL;
  }
  if(!(buffer_copy = malloc(sizeof(af_byte_t) * count))) {
    free(action);
    return NULL;
  }
  memcpy(buffer_copy, buffer, sizeof(af_byte_t) * count);
  action->type = AF_IO_TYPE_WRITE;
  action->to_be_destroyed = FALSE;
  action->fd = fd;
  action->buffer = buffer_copy;
  action->count = count;
  action->index = 0;
  action->offset = 0;
  action->whence = AF_IO_SEEK_CUR;
  action->sleep_until.tv_sec = 0;
  action->sleep_until.tv_nsec = 0;
  action->is_buffer_freeable = TRUE;
  action->task_to_wake = NULL;
  action->is_done = count == 0;
  action->is_closed = FALSE;
  action->has_hangup = FALSE;
  action->has_error = FALSE;
  af_fd_set_blocking(fd, FALSE);
  af_io_add(io, action);
  return action;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r14
movl $0x98, %edi
callq 0x2220
testq %rax, %rax
je 0xca68
movq %rax, %rbx
movq %r15, %rdi
callq 0x2220
testq %rax, %rax
je 0xca60
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x21f0
pushq $0x1
popq %rax
movq %rax, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movl %ebp, 0x28(%rbx)
movq %r13, 0x30(%rbx)
movq %r15, 0x38(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movq %rax, 0x50(%rbx)
movups %xmm0, 0x58(%rbx)
orq $-0x1, 0x68(%rbx)
andq $0x0, 0x70(%rbx)
xorl %eax, %eax
testq %r15, %r15
sete %al
movq %rax, 0x78(%rbx)
movups %xmm0, 0x80(%rbx)
andq $0x0, 0x90(%rbx)
movl %ebp, %edi
xorl %esi, %esi
callq 0xbae0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc510
jmp 0xca6a
movq %rbx, %rdi
callq 0x2050
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_read_nonblock
ssize_t af_io_read_nonblock(int fd, af_byte_t* buffer, af_io_size_t count,
			    af_bool_t* again, af_io_error_t* error) {
  ssize_t size;
  af_fd_set_blocking(fd, FALSE);
  size = read(fd, buffer, sizeof(af_byte_t) * count);
  *again = size == -1 && (errno == EAGAIN || errno == EWOULDBLOCK ||
			  errno == EINTR) ? TRUE : FALSE;
  *error = size != -1 || (size == -1 && (errno == EAGAIN ||
					 errno == EWOULDBLOCK ||
					 errno == EINTR)) ? 0 : errno;
  return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %ebp
xorl %r13d, %r13d
xorl %esi, %esi
callq 0xbae0
movl %ebp, %edi
movq %r12, %rsi
movq %r14, %rdx
callq 0x21c0
movq %rax, %r14
cmpq $-0x1, %rax
je 0xcace
andq $0x0, (%r15)
movl %r13d, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2070
movl (%rax), %eax
cmpl $0xb, %eax
sete %cl
cmpl $0x4, %eax
sete %dl
orb %cl, %dl
movzbl %dl, %ecx
negq %rcx
movq %rcx, (%r15)
cmpl $0x4, %eax
je 0xcab9
cmpl $0xb, %eax
je 0xcab9
movl %eax, %r13d
jmp 0xcab9
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_write_nonblock
ssize_t af_io_write_nonblock(int fd, af_byte_t* buffer, af_io_size_t count,
			     af_bool_t* again, af_io_error_t* error) {
  ssize_t size;
  af_fd_set_blocking(fd, FALSE);
  size = write(fd, buffer, sizeof(af_byte_t) * count);
  *again = size == -1 && (errno == EAGAIN || errno == EWOULDBLOCK ||
			  errno == EINTR) ? TRUE : FALSE;
  *error = size != -1 || (size == -1 && (errno == EAGAIN ||
					 errno == EWOULDBLOCK ||
					 errno == EINTR)) ? 0 : errno;
  return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %ebp
xorl %r13d, %r13d
xorl %esi, %esi
callq 0xbae0
movl %ebp, %edi
movq %r12, %rsi
movq %r14, %rdx
callq 0x20f0
movq %rax, %r14
cmpq $-0x1, %rax
je 0xcb4d
andq $0x0, (%r15)
movl %r13d, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2070
movl (%rax), %eax
cmpl $0xb, %eax
sete %cl
cmpl $0x4, %eax
sete %dl
orb %cl, %dl
movzbl %dl, %ecx
negq %rcx
movq %rcx, (%r15)
cmpl $0x4, %eax
je 0xcb38
cmpl $0xb, %eax
je 0xcb38
movl %eax, %r13d
jmp 0xcb38
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_is_active
af_bool_t af_io_is_active(af_io_t* io, af_io_fd_t fd) {
  af_io_action_t* current_action = io->first_active_action;
  while(current_action) {
    if(current_action->fd == fd && current_action->type != AF_IO_TYPE_SLEEP) {
      return TRUE;
    }
    current_action = current_action->next_action;
  }
  return FALSE;
}

// Assembly:
addq $0x50, %rdi
pushq $-0x1
popq %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xcb9b
cmpl %esi, 0x28(%rdi)
jne 0xcb95
cmpq $0x4, 0x18(%rdi)
jne 0xcb9d
addq $0x8, %rdi
jmp 0xcb81
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_new
static file_node_t *file_node_new(file_node_t *parent, char *name, file_node_type_t type)
{
  int len;
  file_node_t *new;

  new = (file_node_t *)malloc(sizeof(file_node_t));
  if (new == NULL)
    return NULL;

  if (name == NULL) {
    new->name = NULL;
  } else {
    len = strlen(name) + 1;
    new->name = (char *)malloc(len);
    strncpy(new->name, name, len);
  }
  new->type = type;
  new->parent = parent;
  new->no_of_subnodes = 0;
  new->subnode = NULL;
  new->marked = 0;
  
  return new;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r14
pushq $0x30
popq %rdi
callq 0x1190
movq %rax, %r15
testq %rax, %rax
je 0x16b8
testq %r12, %r12
je 0x169b
movq %r12, %rdi
callq 0x10d0
incl %eax
movslq %eax, %rbp
movq %rbp, %rdi
callq 0x1190
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1070
jmp 0x169e
xorl %r13d, %r13d
movq %r13, 0x8(%r15)
movl %ebx, 0x10(%r15)
movq %r14, 0x18(%r15)
andl $0x0, 0x20(%r15)
andq $0x0, 0x28(%r15)
andl $0x0, (%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_scan
static int file_node_scan(file_node_t *current, char *path)
{
  DIR *dh;
  struct dirent *entry;
  struct stat st;
  char fullpath[PATH_MAX];
  file_node_t *subnode;

  dh = opendir(path);
  if (dh == NULL) {
    fprintf(stderr, "Error: Unable to open directory: %s\n", path);
    return -1;
  }

  while ((entry = readdir(dh))) {
    if (entry->d_name[0] == '.')
      continue; /* Ignore files with leading dot. */

    snprintf(fullpath, PATH_MAX, "%s/%s", path, entry->d_name);
    if (stat(fullpath, &st) == -1) {
      fprintf(stderr, "Warning: Unable to stat() path: %s\n", fullpath);
      continue;
    }

    if (S_ISDIR(st.st_mode)) {
      subnode = file_node_add(current, entry->d_name, FILE_NODE_TYPE_DIR);
      file_node_scan(subnode, fullpath);

    } else if (S_ISREG(st.st_mode)) {
      file_node_add(current, entry->d_name, FILE_NODE_TYPE_FILE);
    }
  }

  closedir(dh);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1098, %rsp           # imm = 0x1098
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x10c0
testq %rax, %rax
je 0x17cd
movq %rax, %r15
leaq 0x90(%rsp), %r13
movq %rsp, %rbp
movq %r15, %rdi
callq 0x1180
testq %rax, %rax
je 0x17b1
movq %rax, %r12
cmpb $0x2e, 0x13(%rax)
je 0x1700
addq $0x13, %r12
movl $0x1000, %esi           # imm = 0x1000
movq %r13, %rdi
leaq 0x959(%rip), %rdx       # 0x2086
movq %rbx, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x1100
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1170
cmpl $-0x1, %eax
je 0x1791
movl 0x18(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
movl %eax, %ecx
negw %cx
jo 0x177e
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x1700
movq %r14, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
callq 0x195c
movq %rax, %rdi
movq %r13, %rsi
callq 0x16ca
jmp 0x1700
movq %r14, %rdi
movq %r12, %rsi
pushq $0x2
popq %rdx
callq 0x195c
jmp 0x1700
movq 0x2860(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x8ea(%rip), %rsi       # 0x208c
movq %r13, %rdx
xorl %eax, %eax
callq 0x1160
jmp 0x1700
movq %r15, %rdi
callq 0x1120
xorl %eax, %eax
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2824(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x883(%rip), %rsi       # 0x2061
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1160
pushq $-0x1
popq %rax
jmp 0x17bb
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_remove
static void file_node_remove(file_node_t *node)
{
  int i;
  free(node->name);
  for (i = 0; i < node->no_of_subnodes; i++) {
    file_node_remove(node->subnode[i]);
  }
  if (node->subnode != NULL) {
    free(node->subnode);
  }
  free(node);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x1040
xorl %r14d, %r14d
movl 0x20(%rbx), %eax
movq 0x28(%rbx), %rdi
cmpq %rax, %r14
jae 0x181a
movq (%rdi,%r14,8), %rdi
callq 0x17ed
incq %r14
jmp 0x1800
callq 0x1040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_sort
static void file_node_sort(file_node_t *node)
{
  int i;
  qsort(node->subnode, node->no_of_subnodes, sizeof(file_node_t *), file_node_compare);
  for (i = 0; i < node->no_of_subnodes; i++) {
    file_node_sort(node->subnode[i]);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movl 0x20(%rbx), %esi
leaq 0x16a(%rip), %rcx       # 0x19ad
pushq $0x8
popq %rdx
callq 0x1080
xorl %r14d, %r14d
movl 0x20(%rbx), %eax
cmpq %rax, %r14
jae 0x1868
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x182e
incq %r14
jmp 0x184e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_print_marked
static void file_node_print_marked(file_node_t *node, char *root_dir, FILE *fh)
{
  int i;
  char path[PATH_MAX];

  if (node->marked) {
    fprintf(fh, "%s/%s\n", root_dir, file_node_path(node, path, PATH_MAX));
  }

  for (i = 0; i < node->no_of_subnodes; i++) {
    file_node_print_marked(node->subnode[i], root_dir, fh);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, (%rdi)
je 0x18b1
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1de5
leaq 0x80f(%rip), %rsi       # 0x20b0
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x1160
xorl %r12d, %r12d
movl 0x20(%r15), %eax
cmpq %rax, %r12
jae 0x18d5
movq 0x28(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1870
incq %r12
jmp 0x18b4
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_dump
static void file_node_dump(file_node_t *node)
{
  int i, depth;

  depth = file_node_depth(node);
  while (depth-- > 1)
    printf("  ");

  if (node->type == FILE_NODE_TYPE_ROOT)
    printf("/");
  else {
    printf("%s", node->name);
    if (node->type == FILE_NODE_TYPE_DIR)
      printf("/");
  }

  printf("\n");

  for (i = 0; i < node->no_of_subnodes; i++) {
    file_node_dump(node->subnode[i]);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1dd1
movl %eax, %ebp
leaq 0x7be(%rip), %r14       # 0x20b7
cmpl $0x2, %ebp
jl 0x190c
decl %ebp
movq %r14, %rdi
xorl %eax, %eax
callq 0x10f0
jmp 0x18f9
cmpl $0x0, 0x10(%rbx)
je 0x192a
movq 0x8(%rbx), %rsi
leaq 0x76c(%rip), %rdi       # 0x2089
xorl %eax, %eax
callq 0x10f0
cmpl $0x1, 0x10(%rbx)
jne 0x1932
pushq $0x2f
popq %rdi
callq 0x1050
pushq $0xa
popq %rdi
callq 0x1050
xorl %r14d, %r14d
movl 0x20(%rbx), %eax
cmpq %rax, %r14
jae 0x1957
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x18e4
incq %r14
jmp 0x193d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_add
static file_node_t *file_node_add(file_node_t *current, char *name, file_node_type_t type)
{
  file_node_t *new;

  new = file_node_new(current, name, type);
  if (new == NULL)
    return NULL;

  if (current->subnode == NULL) {
    current->subnode = malloc(sizeof(file_node_t *));
  } else {
    current->subnode = realloc(current->subnode, sizeof(file_node_t *) * (current->no_of_subnodes + 1));
  }

  current->subnode[current->no_of_subnodes] = new;
  current->no_of_subnodes++;

  return new;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x164b
movq %rax, %r14
testq %rax, %rax
je 0x19a2
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x1989
movl 0x20(%rbx), %esi
incl %esi
shlq $0x3, %rsi
callq 0x11a0
jmp 0x1991
pushq $0x8
popq %rdi
callq 0x1190
movq %rax, 0x28(%rbx)
movl 0x20(%rbx), %ecx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x20(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_list_size
static int file_node_list_size(file_node_t *node)
{
  int i, size;

  if (node->type == FILE_NODE_TYPE_ROOT) {
    size = 0;
  } else {
    size = 1;
  }

  for (i = 0; i < node->no_of_subnodes; i++) {
    size += file_node_list_size(node->subnode[i]);
  }

  return size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
cmpl $0x0, 0x10(%rdi)
setne %bl
movl 0x20(%rdi), %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x19f9
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x19c5
addl %eax, %ebx
incq %r12
jmp 0x19e0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: curses_update_screen
static void curses_update_screen(file_node_t *node)
{
  int n, i, maxy, maxx;
  int scrollbar_size, scrollbar_pos;
  int list_size;
  
  list_size = file_node_list_size(node);
  
  getmaxyx(stdscr, maxy, maxx);
  erase();
  
  /* Draw text lines. */
  for (n = 0; n < maxy; n++) { 
    if ((n + curses_scroll_offset) >= list_size)
      break;
    
    if (n == (curses_selected_entry - curses_scroll_offset)) {
      curses_list_draw(node, n, n + curses_scroll_offset + 1, 1);
    } else {
      curses_list_draw(node, n, n + curses_scroll_offset + 1, 0);
    }
  }
  
  /* Draw scrollbar. */
  if (list_size <= maxy)
    scrollbar_size = maxy;
  else
    scrollbar_size = maxy / (list_size / (double)maxy);
  
  scrollbar_pos = curses_selected_entry / (double)list_size * (maxy - scrollbar_size);
  attron(A_REVERSE);
  for (i = 0; i <= scrollbar_size; i++)
    mvaddch(i + scrollbar_pos, maxx - 1, ' ');
  attroff(A_REVERSE);
  
  mvvline(0, maxx - 2, 0, maxy);
  
  /* Place cursor at end of selected line. */ 
  move(curses_selected_entry - curses_scroll_offset, maxx - 3);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
callq 0x19c5
movl %eax, %r14d
movq 0x25b1(%rip), %r13      # 0x3fd8
movq (%r13), %rdi
testq %rdi, %rdi
je 0x1a3e
movswl 0x4(%rdi), %ebp
incl %ebp
movswl 0x6(%rdi), %eax
incl %eax
jmp 0x1a43
pushq $-0x1
popq %rbp
movl %ebp, %eax
movq %rax, 0x8(%rsp)
callq 0x1030
xorl %r12d, %r12d
testl %ebp, %ebp
movl $0x0, %ebx
cmovgl %ebp, %ebx
cmpl %r12d, %ebx
je 0x1a94
movl 0x26cb(%rip), %eax      # 0x4130
leal (%r12,%rax), %ecx
cmpl %r14d, %ecx
jge 0x1a94
movl 0x26b8(%rip), %edx      # 0x412c
subl %eax, %edx
xorl %ecx, %ecx
cmpl %edx, %r12d
sete %cl
leal (%r12,%rax), %edx
incl %edx
movq %r15, %rdi
movl %r12d, %esi
callq 0x1b84
incl %r12d
jmp 0x1a5a
cmpl %ebp, %r14d
jle 0x1ab5
cvtsi2sd %ebp, %xmm1
cvtsi2sd %r14d, %xmm0
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
divsd %xmm2, %xmm1
cvttsd2si %xmm1, %r12d
jmp 0x1abd
cvtsi2sd %r14d, %xmm0
movl %ebp, %r12d
cvtsi2sdl 0x2667(%rip), %xmm1 # 0x412c
divsd %xmm0, %xmm1
movl %ebp, 0x14(%rsp)
movl %ebp, %eax
subl %r12d, %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ebx
movq (%r13), %rdi
xorl %ebp, %ebp
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x1140
movq 0x8(%rsp), %rax
leal -0x1(%rax), %r14d
pushq $0x20
popq %r15
movq (%r13), %rdi
cmpl %r12d, %ebp
jg 0x1b26
leal (%rbx,%rbp), %esi
movl %r14d, %edx
callq 0x11d0
cmpl $-0x1, %eax
je 0x1b22
movq (%r13), %rdi
movl %r15d, %esi
callq 0x11f0
incl %ebp
jmp 0x1afd
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x1220
movq (%r13), %rdi
movq 0x8(%rsp), %rax
leal -0x2(%rax), %edx
xorl %esi, %esi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1b59
movq (%r13), %rdi
xorl %esi, %esi
movl 0x14(%rsp), %edx
callq 0x11c0
movq (%r13), %rdi
movl 0x25c9(%rip), %esi      # 0x412c
subl 0x25c7(%rip), %esi      # 0x4130
movq 0x8(%rsp), %rdx
addl $-0x3, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11d0
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_get_by_node_no
static file_node_t *file_node_get_by_node_no(file_node_t *node, int node_no, int *node_count)
{
  file_node_t *found;
  int i;

  if (node->type != FILE_NODE_TYPE_ROOT) {
    *node_count = *node_count + 1;
  }
  
  if (*node_count == node_no) {
    return node; /* Match found, return self. */
  }

  for (i = 0; i < node->no_of_subnodes; i++) {
    found = file_node_get_by_node_no(node->subnode[i], node_no, node_count);
    if (found != NULL) {
      return found;
    }
  }

  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x0, 0x10(%rdi)
movl (%rdx), %eax
je 0x1d93
incl %eax
movl %eax, (%r14)
cmpl %ebp, %eax
je 0x1dc3
xorl %r15d, %r15d
movl 0x20(%rbx), %eax
cmpq %rax, %r15
jae 0x1dc1
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x1d77
incq %r15
testq %rax, %rax
je 0x1d9a
movq %rax, %rbx
jmp 0x1dc3
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq