LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22c0
cmpl $0x0, %eax
je 0x16d43
movq $0x0, -0x8(%rbp)
jmp 0x16eb8
leaq -0x20(%rbp), %rdi
callq 0x2170
cmpl $0x0, %eax
je 0x16d6b
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x2130
movq $0x0, -0x8(%rbp)
jmp 0x16eb8
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x3c(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
movq $-0x1, %rsi
callq 0x16ed0
cmpq $0x0, %rax
jne 0x16dd6
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %edi
callq 0x2160
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x2160
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x2130
movq $0x0, -0x8(%rbp)
jmp 0x16eb8
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x78(%rax)
callq 0x16f60
cmpq $0x0, %rax
jne 0x16e64
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %edi
callq 0x2160
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x2160
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x2130
movq $0x0, -0x8(%rbp)
jmp 0x16eb8
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0x169(%rip), %rdx       # 0x16fe0
callq 0x2220
cmpl $0x0, %eax
je 0x16eb0
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %edi
callq 0x2160
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x2160
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x2130
movq $0x0, -0x8(%rbp)
jmp 0x16eb8
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %edi
movl $0x3, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x20b0
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x16f03
movq $-0x1, -0x8(%rbp)
jmp 0x16f49
cmpq $0x0, -0x18(%rbp)
je 0x16f17
movl -0x1c(%rbp), %eax
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
movl %eax, -0x1c(%rbp)
jmp 0x16f22
movl -0x1c(%rbp), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %edi
movl -0x1c(%rbp), %edx
movl $0x4, %esi
movb $0x0, %al
callq 0x20b0
movl %eax, %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $-0x1, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
xorl %edi, %edi
callq 0x2090
cmpl $0x0, %eax
je 0x16fcd
xorl %edi, %edi
leaq -0x44(%rbp), %rsi
callq 0x2240
cmpl $-0x1, %eax
jne 0x16f8e
movq $0x0, -0x8(%rbp)
jmp 0x16fd5
movl -0x38(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x16fa4
movl -0x38(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x16fcb
movl -0x38(%rbp), %eax
andl $-0xb, %eax
movl %eax, -0x38(%rbp)
xorl %esi, %esi
leaq -0x44(%rbp), %rdx
movl %esi, %edi
callq 0x2250
cmpl $-0x1, %eax
jne 0x16fc9
movq $0x0, -0x8(%rbp)
jmp 0x16fd5
jmp 0x16fcb
jmp 0x16fcd
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
xorl %edi, %edi
movq $-0x1, %rsi
callq 0x16ed0
xorl %edi, %edi
callq 0x2090
cmpl $0x0, %eax
je 0x17b8b
xorl %edi, %edi
leaq -0x44(%rbp), %rsi
callq 0x2240
cmpl $-0x1, %eax
jne 0x17b4c
movq $0x0, -0x8(%rbp)
jmp 0x17b93
movl -0x38(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x17b62
movl -0x38(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x17b89
movl -0x38(%rbp), %eax
orl $0xa, %eax
movl %eax, -0x38(%rbp)
xorl %esi, %esi
leaq -0x44(%rbp), %rdx
movl %esi, %edi
callq 0x2250
cmpl $-0x1, %eax
jne 0x17b87
movq $0x0, -0x8(%rbp)
jmp 0x17b93
jmp 0x17b89
jmp 0x17b8b
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x22d0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x17ca7
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x17c6f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x17c7f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x17c9c
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x2040
jmp 0x17cb3
movq -0x8(%rbp), %rax
movq $-0x1, 0x20(%rax)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x21e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_get_pending_write_count
af_cell_t af_io_get_pending_write_count(af_io_t* io) {
  af_cell_t pending_write_count;
  pthread_mutex_lock(&io->mutex);
  pending_write_count = io->pending_write_count;
  pthread_mutex_unlock(&io->mutex);
  return pending_write_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x22d0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x21e0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x8, %rdi
callq 0x22d0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x8, %rdi
callq 0x21e0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x21f0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x21c0
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movb $0x0, %al
callq 0x2270
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jl 0x17fb0
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x30(%rbp), %rdi
callq 0x2040
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x17fcd
callq 0x2060
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2170
cmpl $0x0, %eax
jne 0x18028
movl -0x28(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x1803d
callq 0x2060
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x21f0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x21c0
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rdi
callq 0x2070
cmpl $0x0, %eax
jne 0x180c1
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rdi
callq 0x2040
movq $-0x1, -0x8(%rbp)
jmp 0x180df
callq 0x2060
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x21f0
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x21f0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x21c0
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x21c0
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x2280
cmpl $0x0, %eax
jne 0x18248
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rdi
callq 0x2040
movq -0x40(%rbp), %rdi
callq 0x2040
movq $-0x1, -0x8(%rbp)
jmp 0x1826f
callq 0x2060
movl (%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rdi
callq 0x2040
movq -0x40(%rbp), %rdi
callq 0x2040
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %edi
callq 0x2090
cmpl $0x0, %eax
je 0x182b0
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x182ed
callq 0x2060
cmpl $0x16, (%rax)
je 0x182c4
callq 0x2060
cmpl $0x19, (%rax)
jne 0x182d8
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x182ed
callq 0x2060
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_get_monotonic_time
void af_io_get_monotonic_time(af_time_t* monotonic_time) {
  struct timespec time;
  clock_gettime(CLOCK_MONOTONIC, &time);
  monotonic_time->sec = time.tv_sec;
  monotonic_time->nsec = time.tv_nsec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
leaq -0x18(%rbp), %rsi
callq 0x20c0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tabemann[P]attoforth/src/runtime/io.c
// Function: af_io_get_real_time
void af_io_get_real_time(af_time_t* monotonic_time) {
  struct timespec time;
  clock_gettime(CLOCK_REALTIME, &time);
  monotonic_time->sec = time.tv_sec;
  monotonic_time->nsec = time.tv_nsec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
xorl %edi, %edi
leaq -0x18(%rbp), %rsi
callq 0x20c0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x98, %edi
callq 0x21f0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x183b5
movq $0x0, -0x8(%rbp)
jmp 0x18499
movq -0x28(%rbp), %rax
movq $0x4, 0x18(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x28(%rbp), %rax
movq $0x1, 0x50(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x184b0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x22d0
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x18(%rax)
jne 0x184fc
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
cmpq $0x4, 0x18(%rax)
je 0x1856d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x28(%rax), %esi
callq 0x192c0
cmpq $0x0, %rax
je 0x1856d
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x18553
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x1855f
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
jmp 0x185c6
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x185a2
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movq $-0x1, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x21e0
cmpq $0x0, -0x18(%rbp)
je 0x185e3
movq -0x8(%rbp), %rdi
callq 0x17bd0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x98, %edi
callq 0x21f0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x18624
movq $0x0, -0x8(%rbp)
jmp 0x18700
movq -0x28(%rbp), %rax
movq $0x5, 0x18(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x28(%rbp), %rax
movq $0x1, 0x50(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x184b0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x98, %edi
callq 0x21f0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x18860
movq $0x0, -0x8(%rbp)
jmp 0x1893c
movq -0x20(%rbp), %rax
movq $0x2, 0x18(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rax
movq $0x1, 0x50(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x184b0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl $0x98, %edi
callq 0x21f0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x1898b
movq $0x0, -0x8(%rbp)
jmp 0x18a67
movq -0x38(%rbp), %rax
movq $0x3, 0x18(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x48(%rax)
movslq -0x24(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x184b0
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x98, %edi
callq 0x21f0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x18ab7
movq $0x0, -0x8(%rbp)
jmp 0x18b93
movq -0x30(%rbp), %rax
movq $0x3, 0x18(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x48(%rax)
movslq -0x24(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x184b0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl $0x98, %edi
callq 0x21f0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x18bdc
movq $0x0, -0x8(%rbp)
jmp 0x18cd0
movq -0x38(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x38(%rbp), %rax
movq $0x1, 0x50(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x70(%rax)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x90(%rax)
movl -0x14(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ed0
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x184b0
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x98, %edi
callq 0x21f0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x18e58
movq $0x0, -0x8(%rbp)
jmp 0x18f4c
movq -0x30(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x30(%rbp), %rax
movq $0x1, 0x50(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x70(%rax)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x90(%rax)
movl -0x14(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ed0
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x184b0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x98, %edi
callq 0x21f0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x18f98
movq $0x0, -0x8(%rbp)
jmp 0x190ce
movq -0x28(%rbp), %rdi
shlq $0x0, %rdi
callq 0x21f0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x18fc5
movq -0x30(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
jmp 0x190ce
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
shlq $0x0, %rdx
callq 0x21c0
movq -0x30(%rbp), %rax
movq $0x1, 0x18(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x30(%rbp), %rax
movq $0x1, 0x50(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x30(%rbp), %rax
movq $-0x1, 0x68(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x70(%rax)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x90(%rax)
movl -0x14(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ed0
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x184b0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl -0x4(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ed0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
shlq $0x0, %rdx
callq 0x2190
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $-0x1, -0x30(%rbp)
movb %al, -0x31(%rbp)
jne 0x19163
callq 0x2060
movq %rax, %rcx
movb $0x1, %al
cmpl $0xb, (%rcx)
movb %al, -0x32(%rbp)
je 0x1915d
callq 0x2060
movq %rax, %rcx
movb $0x1, %al
cmpl $0xb, (%rcx)
movb %al, -0x32(%rbp)
je 0x1915d
callq 0x2060
cmpl $0x4, (%rax)
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
movslq %eax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $-0x1, -0x30(%rbp)
jne 0x191a9
cmpq $-0x1, -0x30(%rbp)
jne 0x191b0
callq 0x2060
cmpl $0xb, (%rax)
je 0x191a9
callq 0x2060
cmpl $0xb, (%rax)
je 0x191a9
callq 0x2060
cmpl $0x4, (%rax)
jne 0x191b0
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x191ba
callq 0x2060
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl -0x4(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ed0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
shlq $0x0, %rdx
callq 0x20e0
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $-0x1, -0x30(%rbp)
movb %al, -0x31(%rbp)
jne 0x19253
callq 0x2060
movq %rax, %rcx
movb $0x1, %al
cmpl $0xb, (%rcx)
movb %al, -0x32(%rbp)
je 0x1924d
callq 0x2060
movq %rax, %rcx
movb $0x1, %al
cmpl $0xb, (%rcx)
movb %al, -0x32(%rbp)
je 0x1924d
callq 0x2060
cmpl $0x4, (%rax)
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
movslq %eax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $-0x1, -0x30(%rbp)
jne 0x19299
cmpq $-0x1, -0x30(%rbp)
jne 0x192a0
callq 0x2060
cmpl $0xb, (%rax)
je 0x19299
callq 0x2060
cmpl $0xb, (%rax)
je 0x19299
callq 0x2060
cmpl $0x4, (%rax)
jne 0x192a0
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x192aa
callq 0x2060
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1930d
movq -0x20(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x192ff
movq -0x20(%rbp), %rax
cmpq $0x4, 0x18(%rax)
je 0x192ff
movq $-0x1, -0x8(%rbp)
jmp 0x19315
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x192d7
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tabemann[P]attoforth/src/runtime/io.c
// Function: timespec_diff
void timespec_diff(struct timespec *start, struct timespec *stop,
                   struct timespec *result) {
  if ((stop->tv_nsec - start->tv_nsec) < 0) {
    result->tv_sec = stop->tv_sec - start->tv_sec - 1;
    result->tv_nsec = stop->tv_nsec - start->tv_nsec + 1000000000;
  } else {
    result->tv_sec = stop->tv_sec - start->tv_sec;
    result->tv_nsec = stop->tv_nsec - start->tv_nsec;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x8(%rcx), %rax
cmpq $0x0, %rax
jge 0x19380
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
subq (%rax), %rcx
subq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
subq 0x8(%rax), %rcx
addq $0x3b9aca00, %rcx       # imm = 0x3B9ACA00
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x193ad
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
subq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
subq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Openvario[P]sensord/sensorcal.c
// Function: calibrate_ams5915
static int calibrate_ams5915(t_eeprom_data* data)
{
	t_ams5915 dynamic_sensor;
	float offset=0.0;
	int i;

	// open sensor for differential pressure
	/// @todo remove hardcoded i2c address for differential pressure
	printf("Open sensor ...");
	if (ams5915_open(&dynamic_sensor, 0x28) != 0)
	{
		printf(" failed !!\n");
		return 1;
	}
	else
	{
		printf(" success!\n");
	}

	dynamic_sensor.offset = 0.0;
	dynamic_sensor.linearity = 1.0;

	//initialize differential pressure sensor
	ams5915_init(&dynamic_sensor);
	usleep(112500);
	sensor_wait_mark();

	for (i=0;i<800;i++)
	{
		// read AMS5915
		sensor_wait(12500);
		ams5915_measure(&dynamic_sensor);
		sensor_wait_mark();
		ams5915_calculate(&dynamic_sensor);

		// wait some time ...
		printf("Measured: %f\n",dynamic_sensor.p);

		// calc offset
		offset += dynamic_sensor.p;
	}

	data->zero_offset = -1*(offset/800);

	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
leaq 0x14cd(%rip), %rdi      # 0x3608
movb $0x0, %al
callq 0x1090
leaq -0x38(%rbp), %rdi
movl $0x28, %esi
callq 0x1820
cmpl $0x0, %eax
je 0x216f
leaq 0x14bc(%rip), %rdi      # 0x3618
movb $0x0, %al
callq 0x1090
movl $0x1, -0x4(%rbp)
jmp 0x223c
leaq 0x14ae(%rip), %rdi      # 0x3624
movb $0x0, %al
callq 0x1090
xorps %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
movss 0x1123(%rip), %xmm0     # 0x32b0
movss %xmm0, -0x1c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1930
movl $0x1b774, %edi          # imm = 0x1B774
callq 0x1130
callq 0x1240
movl $0x0, -0x40(%rbp)
cmpl $0x320, -0x40(%rbp)     # imm = 0x320
jge 0x220f
movss 0x10fa(%rip), %xmm0     # 0x32bc
callq 0x1260
leaq -0x38(%rbp), %rdi
callq 0x19f0
callq 0x1240
leaq -0x38(%rbp), %rdi
callq 0x1b20
movss -0x20(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1441(%rip), %rdi      # 0x362f
movb $0x1, %al
callq 0x1090
movss -0x20(%rbp), %xmm0
addss -0x3c(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x21b1
movss -0x3c(%rbp), %xmm1
movss 0x109c(%rip), %xmm0     # 0x32b8
divss %xmm0, %xmm1
movss 0x108c(%rip), %xmm0     # 0x32b4
mulss %xmm1, %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0xc(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)