{This file is automatically generated by "syscalls_gen"}

unit syscalls;

{$mode objfpc}{$H+}
{$CALLING SysV_ABI_CDecl}

interface

procedure sys_exit(rval:Integer);
function  _read(fd:Integer;buf:Pointer;nbyte:QWORD):Integer;
function  _write(fd:Integer;buf:Pointer;nbyte:QWORD):Integer;
function  _open(path:PChar;flags,mode:Integer):Integer;
function  _close(fd:Integer):Integer;
function  _wait4(pid:Integer;status:PInteger;options:Integer;rusage:Pointer):Integer;
function  link(name1,name2:PChar):Integer;
function  unlink(path:PChar):Integer;
function  chdir(path:PChar):Integer;
function  fchdir(fd:Integer):Integer;
function  mknod(path:PChar;mode,dev:Integer):Integer;
function  chmod(path:PChar;mode:Integer):Integer;
function  chown(path:PChar;uid,gid:Integer):Integer;
function  getpid():Integer;
function  mount(ftype,fpath:PChar;flags:QWORD;data:Pointer):Integer;
function  unmount(path:PChar;flags:Integer):Integer;
function  setuid(uid:Integer):Integer;
function  getuid():Integer;
function  geteuid():Integer;
function  _accept(s:Integer;aname,anamelen:Pointer):Integer;
function  access(path:PChar;flags:Integer):Integer;
function  chflags(path:PChar;flags:Integer):Integer;
function  fchflags(fd,flags:Integer):Integer;
function  sync():Integer;
function  kill(pid,signum:Integer):Integer;
function  getppid():Integer;
function  dup(u_fd:Integer):Integer;
function  pipe():Integer;
function  getegid():Integer;
function  getgid():Integer;
function  getlogin(namebuf:PChar;namelen:DWORD):Integer;
function  setlogin(namebuf:PChar):Integer;
Function  sigaltstack(ss,oss:Pointer):Integer;
function  _ioctl(fd:Integer;com:QWORD;data:Pointer):Integer;
function  revoke(path:PChar):Integer;
function  symlink(path,link:PChar):Integer;
function  readlink(path,buf:PChar;count:QWORD):Integer;
function  _execve(fname:pchar;argv,envv:ppchar):Integer;
function  umask(newmask:Integer):Integer;
function  chroot(path:PChar):Integer;
function  msync(addr:Pointer;len:QWORD;flags:Integer):Integer;
function  munmap(addr:Pointer;len:QWORD):Integer;
function  mprotect(addr:Pointer;len:QWORD;prot:Integer):Integer;
function  madvise(addr:Pointer;len:QWORD;behav:Integer):Integer;
function  getgroups(gidsetsize:DWORD;gidset:PInteger):Integer;
function  setgroups(gidsetsize:DWORD;gidset:PInteger):Integer;
function  getpgrp():Integer;
function  setpgid(pid,pgid:Integer):Integer;
function  getdtablesize():Integer;
function  _dup2(from,_to:Integer):Integer;
function  _fcntl(fd,cmd:Integer;arg:QWORD):Integer;
function  select(nd:Integer;uin,uou,uex,utv:Pointer):Integer;
function  fsync(fd:Integer):Integer;
function  setpriority(which,who,prio:Integer):Integer;
function  socket(domain,stype,protocol:Integer):Integer;
function  _connect(fd:Integer;name:Pointer;namelen:Integer):Integer;
function  __sys_netcontrol(fd,op:Integer;buf:Pointer;nbuf:DWORD):Integer;
function  getpriority(which,who:Integer):Integer;
function  __sys_netabort(fd,flags:Integer):Integer;
function  _bind(s:Integer;name:Pointer;namelen:Integer):Integer;
function  _setsockopt(s,level,name:Integer;val:Pointer;valsize:Integer):Integer;
function  _listen(s,backlog:Integer):Integer;
function  __sys_socketex(name:pchar;domain,stype,protocol:Integer):Integer;
function  __sys_socketclose(fd:Integer):Integer;
function  gettimeofday(tp,tzp:Pointer):Integer;
function  getrusage(who:Integer;rusage:Pointer):Integer;
function  _readv(fd:Integer;iovp:Pointer;iovcnt:DWORD):Integer;
function  _writev(fd:Integer;iovp:Pointer;iovcnt:DWORD):Integer;
function  settimeofday(tv,tzp:Pointer):Integer;
function  fchown(fd,uid,gid:Integer):Integer;
function  fchmod(fd,mode:Integer):Integer;
function  __sys_netgetiflist(param1:Pointer;param2,param3:Integer):Integer;
function  setreuid(ruid,euid:Integer):Integer;
function  setregid(rgid,egid:Integer):Integer;
function  rename(from,_to:PChar):Integer;
function  flock(fd,how:Integer):Integer;
function  mkfifo(path:PChar;mode:Integer):Integer;
function  mkdir(path:PChar;mode:Integer):Integer;
function  rmdir(path:PChar):Integer;
function  utimes(path:PChar;tptr:Pointer):Integer;
function  adjtime(delta,olddelta:Pointer):Integer;
function  __sys_kqueueex(name:PChar):Integer;
function  setsid():Integer;
function  sysarch(op:Integer;parms:Pointer):Integer;
function  rtprio(func,pid:Integer;rtp:Pointer):Integer;
function  setgid(gid:Integer):Integer;
function  setegid(egid:Integer):Integer;
function  seteuid(euid:Integer):Integer;
function  stat(path:PChar;ub:Pointer):Integer;
function  _fstat(fd:Integer;sb:Pointer):Integer;
function  lstat(path:PChar;ub:Pointer):Integer;
function  pathconf(path:PChar;name:Integer):Integer;
function  _fpathconf(fd,name:Integer):Integer;
function  getrlimit(which:Integer;rlp:Pointer):Integer;
function  setrlimit(which:Integer;rlp:Pointer):Integer;
function  _getdirentries(fd:Integer;buf:Pointer;count:DWORD;basep:PInt64):Integer;
function  __sysctl(name:PInteger;namelen:DWORD;old:Pointer;oldlenp:PQWORD;new:Pointer;newlen:QWORD):Integer;
function  mlock(addr:Pointer;len:QWORD):Integer;
function  futimes(fd:Integer;tptr:Pointer):Integer;
function  getpgid(pid:Integer):Integer;
function  poll(fds:Pointer;nfds:DWORD;timeout:Integer):Integer;
function  clock_gettime(clock_id:Integer;tp:Pointer):Integer;
function  clock_settime(clock_id:Integer;tp:Pointer):Integer;
function  clock_getres(clock_id:Integer;tp:Pointer):Integer;
function  _nanosleep(rqtp,rmtp:Pointer):Integer;
function  issetugid():Integer;
function  lchown(path:PChar;uid,gid:Integer):Integer;
function  getdents(fd:Integer;buf:Pointer;count:DWORD):Integer;
function  lchmod(path:PChar;mode:Integer):Integer;
function  lutimes(path:PChar;tptr:Pointer):Integer;
function  preadv(fd:Integer;iovp:Pointer;iovcnt:DWORD;offset:Int64):Integer;
function  pwritev(fd:Integer;iovp:Pointer;iovcnt:DWORD;offset:Int64):Integer;
function  getsid(pid:Integer):Integer;
function  setresuid(ruid,euid,suid:Integer):Integer;
function  setresgid(rgid,egid,sgid:Integer):Integer;
function  yield():Integer;
function  __getcwd(buf:PChar;buflen:DWORD):Integer;
function  sched_setparam(pid:Integer;param:Pointer):Integer;
function  sched_getparam(pid:Integer;param:Pointer):Integer;
function  sched_setscheduler(pid,policy:Integer;param:Pointer):Integer;
function  sched_getscheduler(pid:Integer):Integer;
function  sched_yield():Integer;
function  sched_get_priority_max(policy:Integer):Integer;
function  sched_get_priority_min(policy:Integer):Integer;
function  sched_rr_get_interval(pid:Integer;interval:Pointer):Integer;
Function  _sigprocmask(how:Integer;_set,oset:Pointer):Integer;
Function  _sigsuspend(sigmask:Pointer):Integer;
Function  sigpending(oset:Pointer):Integer;
Function  sigtimedwait(oset,info,timeout:Pointer):Integer;
Function  sigwaitinfo(oset,info:Pointer):Integer;
function  getresuid(ruid,euid,suid:PInteger):Integer;
function  getresgid(rgid,egid,sgid:PInteger):Integer;
function  kqueue():Integer;
function  kevent(fd:Integer;changelist:Pointer;nchanges:Integer;eventlist:Pointer;nevents:Integer;timeout:Pointer):Integer;
function  nmount(iovp:Pointer;iovcnt:DWORD;flags:QWORD):Integer;
function  mtypeprotect(addr:Pointer;len:QWORD;mtype,prot:Integer):Integer;
function  lchflags(path:PChar;flags:Integer):Integer;
function  uuidgen(store:Pointer;count:Integer):Integer;
function  getfsstat(buf:Pointer;bufsize:QWORD;flags:Integer):Integer;
function  statfs(path:PChar;buf:Pointer):Integer;
function  _fstatfs(fd:Integer;buf:Pointer):Integer;
Function  _sigaction(sig:Integer;act,oact:Pointer):Integer;
function  sigreturn(sigcntxp:Pointer):Integer;
function  getcontext(ucp:Pointer):Integer;
function  setcontext(ucp:Pointer):Integer;
function  swapcontext(oucp,ucp:Pointer):Integer;
Function  sigwait(oset:Pointer;sig:PInteger):Integer;
function  thr_create(ctx:Pointer;id:PDWORD;flags:Integer):Integer;
procedure thr_exit(state:PDWORD);
function  thr_self(id:PDWORD):Integer;
function  thr_kill(id,sig:Integer):Integer;
function  _umtx_lock(mtx:Pointer):Integer;
function  _umtx_unlock(mtx:Pointer):Integer;
function  thr_suspend(timeout:Pointer):Integer;
function  thr_wake(id:DWORD):Integer;
function  _umtx_op(obj:Pointer;op:Integer;val:QWORD;uaddr1,uaddr2:Pointer):Integer;
function  thr_new(_param:Pointer;_size:Integer):Integer;
function  sigqueue(pid,signum:Integer;value:Pointer):Integer;
function  thr_set_name(id:DWORD;pname:PChar):Integer;
function  rtprio_thread(func,tid:Integer;rtp:Pointer):Integer;
function  pread(fd:Integer;buf:Pointer;nbyte:QWORD;offset:Int64):Integer;
function  pwrite(fd:Integer;buf:Pointer;nbyte:QWORD;offset:Int64):Integer;
function  mmap(vaddr:Pointer;vlen:QWORD;prot:Integer;flags:Integer;fd:Integer;pos:QWORD):Pointer;
function  lseek(fd:Integer;offset:Int64;whence:Integer):Integer;
function  truncate(path:PChar;length:Int64):Integer;
function  ftruncate(fd:Integer;length:Int64):Integer;
function  thr_kill2(pid,id,sig:Integer):Integer;
function  cpuset(setid:PInteger):Integer;
function  cpuset_setid(which,id,setid:Integer):Integer;
function  cpuset_getid(level,which,id:Integer;setid:PInteger):Integer;
function  cpuset_getaffinity(level,which,id:Integer;cpusetsize:QWORD;mask:Pointer):Integer;
function  cpuset_setaffinity(level,which,id:Integer;cpusetsize:QWORD;mask:Pointer):Integer;
function  fchmodat(fd:Integer;path:PChar;mode,flag:Integer):Integer;
function  fchownat(fd:Integer;path:PChar;uid,gid,flag:Integer):Integer;
function  fstatat(fd:Integer;path:PChar;buf:Pointer;flag:Integer):Integer;
function  futimesat(fd:Integer;path:PChar;times:Pointer):Integer;
function  linkat(fd1:Integer;path1:PChar;fd2:Integer;path2:PChar;flag:Integer):Integer;
function  mkdirat(fd:Integer;path:PChar;mode:Integer):Integer;
function  mkfifoat(fd:Integer;path:PChar;mode:Integer):Integer;
function  mknodat(fd:Integer;path:PChar;mode,dev:Integer):Integer;
function  _openat(fd:Integer;path:PChar;flags,mode:Integer):Integer;
function  renameat(oldfd:Integer;old:PChar;newfd:Integer;new:PChar):Integer;
function  symlinkat(path1:PChar;fd:Integer;path2:PChar):Integer;
function  unlinkat(fd:Integer;path:PChar;flag:Integer):Integer;
function  pselect(nd:Integer;uin,uou,uex,uts,sm:Pointer):Integer;
function  __sys_regmgr_call(op,key:DWORD;presult,pvalue:Pointer;vlen:QWORD):Integer;
function  __sys_dl_get_list(pid:Integer;pArray:PInteger;numArray:Integer;pActualNum:PInteger):Integer;
function  __sys_dl_get_info(pid,handle:Integer;pout:PPointer):Integer;
function  evf_create(name:PChar;attr:DWORD;initPattern:QWORD):Integer;
function  evf_delete(key:Integer):Integer;
function  evf_open(name:PChar):Integer;
function  evf_close(key:Integer):Integer;
function  evf_wait(key:Integer;bitPattern:QWORD;waitMode:DWORD;pRes:PQWORD;pTimeout:PDWORD):Integer;
function  evf_trywait(key:Integer;bitPattern:QWORD;waitMode:DWORD;pRes:PQWORD):Integer;
function  evf_set(key:Integer;bitPattern:QWORD):Integer;
function  evf_clear(key:Integer;bitPattern:QWORD):Integer;
function  evf_cancel(key:Integer;setPattern:QWORD;pNumWait:PInteger):Integer;
function  query_memory_protection(addr:Pointer;info:Pointer):Integer;
function  batch_map(fd:Integer;flags:DWORD;entries:Pointer;numberOfEntries:Integer;numberOfEntriesOut:PInteger):Integer;
function  osem_create(name:PChar;attr:DWORD;initCount,maxCount:Integer):Integer;
function  osem_delete(key:Integer):Integer;
function  __sys_osem_open(name:PChar):Integer;
function  __sys_osem_close(key:Integer):Integer;
function  osem_wait(key,needCount:Integer;pTimeout:PDWORD):Integer;
function  osem_trywait(key,needCount:Integer):Integer;
function  osem_post(key,signalCount:Integer):Integer;
function  osem_cancel(key,setCount:Integer;pNumWait:PInteger):Integer;
function  __sys_namedobj_create(name:PChar;objp:Pointer;objt:Integer):Integer;
function  __sys_namedobj_delete(id,objt:Integer):Integer;
function  budget_create(name:pchar;ptype:DWORD;new:Pointer;count:DWORD;prev:Pointer):Integer;
function  budget_delete(key:Integer):Integer;
function  budget_get(key:Integer;ptr:Pointer;psize:PInteger):Integer;
function  budget_set(key:Integer):Integer;
function  virtual_query(addr:Pointer;flags:DWORD;info:Pointer;infoSize:QWORD):Integer;
function  is_in_sandbox():Integer;
function  dmem_container(d_pool_id:Integer):Integer;
function  get_authinfo(pid:Integer;info:Pointer):Integer;
function  mname(addr:Pointer;len:QWORD;name:PChar):Integer;
function  dynlib_dlsym(handle:Integer;symbol:pchar;addrp:ppointer):Integer;
function  dynlib_get_list(pArray:PInteger;numArray:QWORD;pActualNum:PQWORD):Integer;
function  dynlib_get_info(handle:Integer;info:Pointer):Integer;
function  __sys_dynlib_load_prx(moduleFileName:pchar;flags:DWORD;pRes:PInteger;unused:Pointer):Integer;
function  __sys_dynlib_unload_prx(handle:Integer;args:QWORD;argp:Pointer):Integer;
function  dynlib_do_copy_relocations():Integer;
function  dynlib_get_proc_param(pout:PPointer;psize:PQWORD):Integer;
function  dynlib_process_needed_and_relocate():Integer;
function  mdbg_service(op:Integer;arg1,arg2:Pointer):Integer;
function  __sys_randomized_path(src,dst:pchar;plen:PQWORD):Integer;
function  __sys_dl_get_metadata(pid,handle:Integer;pout:Pointer;size:Integer;pactual_size:PInteger):Integer;
function  __sys_workaround8849(key:DWORD):Integer;
function  dynlib_get_info_ex(handle,flags:Integer;info:Pointer):Integer;
function  budget_getid():Integer;
function  budget_get_ptype(pid:Integer):Integer;
function  __sys_get_proc_type_info(dst:Pointer):Integer;
function  thr_get_name(id:DWORD;pname:PChar):Integer;
function  set_gpo(uiBits:DWORD):Integer;
function  ipmimgr_call(op,kid:Integer;res:PInteger;params:Pointer;paramsSize:QWORD):Integer;
function  get_gpo(pbits:PByte):Integer;
function  mmap_dmem(vaddr:Pointer;length:QWORD;mtype:DWORD;prot:DWORD;flags:DWORD;phaddr:QWORD):Pointer;
function  thr_suspend_ucontext(tid:Integer):Integer;
function  thr_resume_ucontext(tid:Integer):Integer;
function  thr_get_ucontext(tid:Integer;ucp:Pointer):Integer;
function  set_timezone_info(data_ptr:Pointer;data_count_dw:Integer):Integer;
function  utc_to_localtime(time:QWORD;local_time,tsec:Pointer;dstsec:PInteger):Integer;
function  localtime_to_utc(time:QWORD;tz_type:Integer;utc_time,tsec:Pointer;dstsec:PInteger):Integer;
function  set_chicken_switches(flags:Integer):Integer;
function  app_state_change(state:Integer):Integer;
function  dynlib_get_obj_member(handle:Integer;num:Byte;pout:PPointer):Integer;
function  budget_get_ptype_of_budget(key:Integer):Integer;
function  blockpool_open(flags:Integer):Integer;
function  __sys_dynlib_get_info_for_libdbg(handle:Integer;info:Pointer):Integer;
function  fdatasync(fd:Integer):Integer;
function  __sys_dynlib_get_list2(pArray:PInteger;numArray:QWORD;pActualNum:PQWORD):Integer;
function  __sys_dynlib_get_info2(handle:Integer;info:Pointer):Integer;
function  get_page_table_stats(vm_container,cpu_gpu:Integer;p_total,p_available:PInteger):Integer;
function  __sys_dynlib_get_list_for_libdbg(pArray:PInteger;numArray:QWORD;pActualNum:PQWORD):Integer;
function  reserve_2mb_page(size:QWORD;mode:Integer):Integer;
function  cpumode_yield():Integer;

implementation

uses
 trap,
 thr_error;

procedure sys_exit(rval:Integer); assembler; nostackframe;
asm
 movq  $1,%rax
 call  fast_syscall
 jmp   cerror
end;

function _read(fd:Integer;buf:Pointer;nbyte:QWORD):Integer; assembler; nostackframe;
asm
 movq  $3,%rax
 call  fast_syscall
 jmp   cerror
end;

function _write(fd:Integer;buf:Pointer;nbyte:QWORD):Integer; assembler; nostackframe;
asm
 movq  $4,%rax
 call  fast_syscall
 jmp   cerror
end;

function _open(path:PChar;flags,mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $5,%rax
 call  fast_syscall
 jmp   cerror
end;

function _close(fd:Integer):Integer; assembler; nostackframe;
asm
 movq  $6,%rax
 call  fast_syscall
 jmp   cerror
end;

function _wait4(pid:Integer;status:PInteger;options:Integer;rusage:Pointer):Integer; assembler; nostackframe;
asm
 movq  $7,%rax
 call  fast_syscall
 jmp   cerror
end;

function link(name1,name2:PChar):Integer; assembler; nostackframe;
asm
 movq  $9,%rax
 call  fast_syscall
 jmp   cerror
end;

function unlink(path:PChar):Integer; assembler; nostackframe;
asm
 movq  $10,%rax
 call  fast_syscall
 jmp   cerror
end;

function chdir(path:PChar):Integer; assembler; nostackframe;
asm
 movq  $12,%rax
 call  fast_syscall
 jmp   cerror
end;

function fchdir(fd:Integer):Integer; assembler; nostackframe;
asm
 movq  $13,%rax
 call  fast_syscall
 jmp   cerror
end;

function mknod(path:PChar;mode,dev:Integer):Integer; assembler; nostackframe;
asm
 movq  $14,%rax
 call  fast_syscall
 jmp   cerror
end;

function chmod(path:PChar;mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $15,%rax
 call  fast_syscall
 jmp   cerror
end;

function chown(path:PChar;uid,gid:Integer):Integer; assembler; nostackframe;
asm
 movq  $16,%rax
 call  fast_syscall
 jmp   cerror
end;

function getpid():Integer; assembler; nostackframe;
asm
 movq  $20,%rax
 call  fast_syscall
 jmp   cerror
end;

function mount(ftype,fpath:PChar;flags:QWORD;data:Pointer):Integer; assembler; nostackframe;
asm
 movq  $21,%rax
 call  fast_syscall
 jmp   cerror
end;

function unmount(path:PChar;flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $22,%rax
 call  fast_syscall
 jmp   cerror
end;

function setuid(uid:Integer):Integer; assembler; nostackframe;
asm
 movq  $23,%rax
 call  fast_syscall
 jmp   cerror
end;

function getuid():Integer; assembler; nostackframe;
asm
 movq  $24,%rax
 call  fast_syscall
 jmp   cerror
end;

function geteuid():Integer; assembler; nostackframe;
asm
 movq  $25,%rax
 call  fast_syscall
 jmp   cerror
end;

function _accept(s:Integer;aname,anamelen:Pointer):Integer; assembler; nostackframe;
asm
 movq  $30,%rax
 call  fast_syscall
 jmp   cerror
end;

function access(path:PChar;flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $33,%rax
 call  fast_syscall
 jmp   cerror
end;

function chflags(path:PChar;flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $34,%rax
 call  fast_syscall
 jmp   cerror
end;

function fchflags(fd,flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $35,%rax
 call  fast_syscall
 jmp   cerror
end;

function sync():Integer; assembler; nostackframe;
asm
 movq  $36,%rax
 call  fast_syscall
 jmp   cerror
end;

function kill(pid,signum:Integer):Integer; assembler; nostackframe;
asm
 movq  $37,%rax
 call  fast_syscall
 jmp   cerror
end;

function getppid():Integer; assembler; nostackframe;
asm
 movq  $39,%rax
 call  fast_syscall
 jmp   cerror
end;

function dup(u_fd:Integer):Integer; assembler; nostackframe;
asm
 movq  $41,%rax
 call  fast_syscall
 jmp   cerror
end;

function pipe():Integer; assembler; nostackframe;
asm
 movq  $42,%rax
 call  fast_syscall
 jmp   cerror
end;

function getegid():Integer; assembler; nostackframe;
asm
 movq  $43,%rax
 call  fast_syscall
 jmp   cerror
end;

function getgid():Integer; assembler; nostackframe;
asm
 movq  $47,%rax
 call  fast_syscall
 jmp   cerror
end;

function getlogin(namebuf:PChar;namelen:DWORD):Integer; assembler; nostackframe;
asm
 movq  $49,%rax
 call  fast_syscall
 jmp   cerror
end;

function setlogin(namebuf:PChar):Integer; assembler; nostackframe;
asm
 movq  $50,%rax
 call  fast_syscall
 jmp   cerror
end;

Function sigaltstack(ss,oss:Pointer):Integer; assembler; nostackframe;
asm
 movq  $53,%rax
 call  fast_syscall
 jmp   cerror
end;

function _ioctl(fd:Integer;com:QWORD;data:Pointer):Integer; assembler; nostackframe;
asm
 movq  $54,%rax
 call  fast_syscall
 jmp   cerror
end;

function revoke(path:PChar):Integer; assembler; nostackframe;
asm
 movq  $56,%rax
 call  fast_syscall
 jmp   cerror
end;

function symlink(path,link:PChar):Integer; assembler; nostackframe;
asm
 movq  $57,%rax
 call  fast_syscall
 jmp   cerror
end;

function readlink(path,buf:PChar;count:QWORD):Integer; assembler; nostackframe;
asm
 movq  $58,%rax
 call  fast_syscall
 jmp   cerror
end;

function _execve(fname:pchar;argv,envv:ppchar):Integer; assembler; nostackframe;
asm
 movq  $59,%rax
 call  fast_syscall
 jmp   cerror
end;

function umask(newmask:Integer):Integer; assembler; nostackframe;
asm
 movq  $60,%rax
 call  fast_syscall
 jmp   cerror
end;

function chroot(path:PChar):Integer; assembler; nostackframe;
asm
 movq  $61,%rax
 call  fast_syscall
 jmp   cerror
end;

function msync(addr:Pointer;len:QWORD;flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $65,%rax
 call  fast_syscall
 jmp   cerror
end;

function munmap(addr:Pointer;len:QWORD):Integer; assembler; nostackframe;
asm
 movq  $73,%rax
 call  fast_syscall
 jmp   cerror
end;

function mprotect(addr:Pointer;len:QWORD;prot:Integer):Integer; assembler; nostackframe;
asm
 movq  $74,%rax
 call  fast_syscall
 jmp   cerror
end;

function madvise(addr:Pointer;len:QWORD;behav:Integer):Integer; assembler; nostackframe;
asm
 movq  $75,%rax
 call  fast_syscall
 jmp   cerror
end;

function getgroups(gidsetsize:DWORD;gidset:PInteger):Integer; assembler; nostackframe;
asm
 movq  $79,%rax
 call  fast_syscall
 jmp   cerror
end;

function setgroups(gidsetsize:DWORD;gidset:PInteger):Integer; assembler; nostackframe;
asm
 movq  $80,%rax
 call  fast_syscall
 jmp   cerror
end;

function getpgrp():Integer; assembler; nostackframe;
asm
 movq  $81,%rax
 call  fast_syscall
 jmp   cerror
end;

function setpgid(pid,pgid:Integer):Integer; assembler; nostackframe;
asm
 movq  $82,%rax
 call  fast_syscall
 jmp   cerror
end;

function getdtablesize():Integer; assembler; nostackframe;
asm
 movq  $89,%rax
 call  fast_syscall
 jmp   cerror
end;

function _dup2(from,_to:Integer):Integer; assembler; nostackframe;
asm
 movq  $90,%rax
 call  fast_syscall
 jmp   cerror
end;

function _fcntl(fd,cmd:Integer;arg:QWORD):Integer; assembler; nostackframe;
asm
 movq  $92,%rax
 call  fast_syscall
 jmp   cerror
end;

function select(nd:Integer;uin,uou,uex,utv:Pointer):Integer; assembler; nostackframe;
asm
 movq  $93,%rax
 call  fast_syscall
 jmp   cerror
end;

function fsync(fd:Integer):Integer; assembler; nostackframe;
asm
 movq  $95,%rax
 call  fast_syscall
 jmp   cerror
end;

function setpriority(which,who,prio:Integer):Integer; assembler; nostackframe;
asm
 movq  $96,%rax
 call  fast_syscall
 jmp   cerror
end;

function socket(domain,stype,protocol:Integer):Integer; assembler; nostackframe;
asm
 movq  $97,%rax
 call  fast_syscall
 jmp   cerror
end;

function _connect(fd:Integer;name:Pointer;namelen:Integer):Integer; assembler; nostackframe;
asm
 movq  $98,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_netcontrol(fd,op:Integer;buf:Pointer;nbuf:DWORD):Integer; assembler; nostackframe;
asm
 movq  $99,%rax
 call  fast_syscall
 jmp   cerror
end;

function getpriority(which,who:Integer):Integer; assembler; nostackframe;
asm
 movq  $100,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_netabort(fd,flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $101,%rax
 call  fast_syscall
 jmp   cerror
end;

function _bind(s:Integer;name:Pointer;namelen:Integer):Integer; assembler; nostackframe;
asm
 movq  $104,%rax
 call  fast_syscall
 jmp   cerror
end;

function _setsockopt(s,level,name:Integer;val:Pointer;valsize:Integer):Integer; assembler; nostackframe;
asm
 movq  $105,%rax
 call  fast_syscall
 jmp   cerror
end;

function _listen(s,backlog:Integer):Integer; assembler; nostackframe;
asm
 movq  $106,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_socketex(name:pchar;domain,stype,protocol:Integer):Integer; assembler; nostackframe;
asm
 movq  $113,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_socketclose(fd:Integer):Integer; assembler; nostackframe;
asm
 movq  $114,%rax
 call  fast_syscall
 jmp   cerror
end;

function gettimeofday(tp,tzp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $116,%rax
 call  fast_syscall
 jmp   cerror
end;

function getrusage(who:Integer;rusage:Pointer):Integer; assembler; nostackframe;
asm
 movq  $117,%rax
 call  fast_syscall
 jmp   cerror
end;

function _readv(fd:Integer;iovp:Pointer;iovcnt:DWORD):Integer; assembler; nostackframe;
asm
 movq  $120,%rax
 call  fast_syscall
 jmp   cerror
end;

function _writev(fd:Integer;iovp:Pointer;iovcnt:DWORD):Integer; assembler; nostackframe;
asm
 movq  $121,%rax
 call  fast_syscall
 jmp   cerror
end;

function settimeofday(tv,tzp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $122,%rax
 call  fast_syscall
 jmp   cerror
end;

function fchown(fd,uid,gid:Integer):Integer; assembler; nostackframe;
asm
 movq  $123,%rax
 call  fast_syscall
 jmp   cerror
end;

function fchmod(fd,mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $124,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_netgetiflist(param1:Pointer;param2,param3:Integer):Integer; assembler; nostackframe;
asm
 movq  $125,%rax
 call  fast_syscall
 jmp   cerror
end;

function setreuid(ruid,euid:Integer):Integer; assembler; nostackframe;
asm
 movq  $126,%rax
 call  fast_syscall
 jmp   cerror
end;

function setregid(rgid,egid:Integer):Integer; assembler; nostackframe;
asm
 movq  $127,%rax
 call  fast_syscall
 jmp   cerror
end;

function rename(from,_to:PChar):Integer; assembler; nostackframe;
asm
 movq  $128,%rax
 call  fast_syscall
 jmp   cerror
end;

function flock(fd,how:Integer):Integer; assembler; nostackframe;
asm
 movq  $131,%rax
 call  fast_syscall
 jmp   cerror
end;

function mkfifo(path:PChar;mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $132,%rax
 call  fast_syscall
 jmp   cerror
end;

function mkdir(path:PChar;mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $136,%rax
 call  fast_syscall
 jmp   cerror
end;

function rmdir(path:PChar):Integer; assembler; nostackframe;
asm
 movq  $137,%rax
 call  fast_syscall
 jmp   cerror
end;

function utimes(path:PChar;tptr:Pointer):Integer; assembler; nostackframe;
asm
 movq  $138,%rax
 call  fast_syscall
 jmp   cerror
end;

function adjtime(delta,olddelta:Pointer):Integer; assembler; nostackframe;
asm
 movq  $140,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_kqueueex(name:PChar):Integer; assembler; nostackframe;
asm
 movq  $141,%rax
 call  fast_syscall
 jmp   cerror
end;

function setsid():Integer; assembler; nostackframe;
asm
 movq  $147,%rax
 call  fast_syscall
 jmp   cerror
end;

function sysarch(op:Integer;parms:Pointer):Integer; assembler; nostackframe;
asm
 movq  $165,%rax
 call  fast_syscall
 jmp   cerror
end;

function rtprio(func,pid:Integer;rtp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $166,%rax
 call  fast_syscall
 jmp   cerror
end;

function setgid(gid:Integer):Integer; assembler; nostackframe;
asm
 movq  $181,%rax
 call  fast_syscall
 jmp   cerror
end;

function setegid(egid:Integer):Integer; assembler; nostackframe;
asm
 movq  $182,%rax
 call  fast_syscall
 jmp   cerror
end;

function seteuid(euid:Integer):Integer; assembler; nostackframe;
asm
 movq  $183,%rax
 call  fast_syscall
 jmp   cerror
end;

function stat(path:PChar;ub:Pointer):Integer; assembler; nostackframe;
asm
 movq  $188,%rax
 call  fast_syscall
 jmp   cerror
end;

function _fstat(fd:Integer;sb:Pointer):Integer; assembler; nostackframe;
asm
 movq  $189,%rax
 call  fast_syscall
 jmp   cerror
end;

function lstat(path:PChar;ub:Pointer):Integer; assembler; nostackframe;
asm
 movq  $190,%rax
 call  fast_syscall
 jmp   cerror
end;

function pathconf(path:PChar;name:Integer):Integer; assembler; nostackframe;
asm
 movq  $191,%rax
 call  fast_syscall
 jmp   cerror
end;

function _fpathconf(fd,name:Integer):Integer; assembler; nostackframe;
asm
 movq  $192,%rax
 call  fast_syscall
 jmp   cerror
end;

function getrlimit(which:Integer;rlp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $194,%rax
 call  fast_syscall
 jmp   cerror
end;

function setrlimit(which:Integer;rlp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $195,%rax
 call  fast_syscall
 jmp   cerror
end;

function _getdirentries(fd:Integer;buf:Pointer;count:DWORD;basep:PInt64):Integer; assembler; nostackframe;
asm
 movq  $196,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sysctl(name:PInteger;namelen:DWORD;old:Pointer;oldlenp:PQWORD;new:Pointer;newlen:QWORD):Integer; assembler; nostackframe;
asm
 movq  $202,%rax
 call  fast_syscall
 jmp   cerror
end;

function mlock(addr:Pointer;len:QWORD):Integer; assembler; nostackframe;
asm
 movq  $203,%rax
 call  fast_syscall
 jmp   cerror
end;

function futimes(fd:Integer;tptr:Pointer):Integer; assembler; nostackframe;
asm
 movq  $206,%rax
 call  fast_syscall
 jmp   cerror
end;

function getpgid(pid:Integer):Integer; assembler; nostackframe;
asm
 movq  $207,%rax
 call  fast_syscall
 jmp   cerror
end;

function poll(fds:Pointer;nfds:DWORD;timeout:Integer):Integer; assembler; nostackframe;
asm
 movq  $209,%rax
 call  fast_syscall
 jmp   cerror
end;

function clock_gettime(clock_id:Integer;tp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $232,%rax
 call  fast_syscall
 jmp   cerror
end;

function clock_settime(clock_id:Integer;tp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $233,%rax
 call  fast_syscall
 jmp   cerror
end;

function clock_getres(clock_id:Integer;tp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $234,%rax
 call  fast_syscall
 jmp   cerror
end;

function _nanosleep(rqtp,rmtp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $240,%rax
 call  fast_syscall
 jmp   cerror
end;

function issetugid():Integer; assembler; nostackframe;
asm
 movq  $253,%rax
 call  fast_syscall
 jmp   cerror
end;

function lchown(path:PChar;uid,gid:Integer):Integer; assembler; nostackframe;
asm
 movq  $254,%rax
 call  fast_syscall
 jmp   cerror
end;

function getdents(fd:Integer;buf:Pointer;count:DWORD):Integer; assembler; nostackframe;
asm
 movq  $272,%rax
 call  fast_syscall
 jmp   cerror
end;

function lchmod(path:PChar;mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $274,%rax
 call  fast_syscall
 jmp   cerror
end;

function lutimes(path:PChar;tptr:Pointer):Integer; assembler; nostackframe;
asm
 movq  $276,%rax
 call  fast_syscall
 jmp   cerror
end;

function preadv(fd:Integer;iovp:Pointer;iovcnt:DWORD;offset:Int64):Integer; assembler; nostackframe;
asm
 movq  $289,%rax
 call  fast_syscall
 jmp   cerror
end;

function pwritev(fd:Integer;iovp:Pointer;iovcnt:DWORD;offset:Int64):Integer; assembler; nostackframe;
asm
 movq  $290,%rax
 call  fast_syscall
 jmp   cerror
end;

function getsid(pid:Integer):Integer; assembler; nostackframe;
asm
 movq  $310,%rax
 call  fast_syscall
 jmp   cerror
end;

function setresuid(ruid,euid,suid:Integer):Integer; assembler; nostackframe;
asm
 movq  $311,%rax
 call  fast_syscall
 jmp   cerror
end;

function setresgid(rgid,egid,sgid:Integer):Integer; assembler; nostackframe;
asm
 movq  $312,%rax
 call  fast_syscall
 jmp   cerror
end;

function yield():Integer; assembler; nostackframe;
asm
 movq  $321,%rax
 call  fast_syscall
 jmp   cerror
end;

function __getcwd(buf:PChar;buflen:DWORD):Integer; assembler; nostackframe;
asm
 movq  $326,%rax
 call  fast_syscall
 jmp   cerror
end;

function sched_setparam(pid:Integer;param:Pointer):Integer; assembler; nostackframe;
asm
 movq  $327,%rax
 call  fast_syscall
 jmp   cerror
end;

function sched_getparam(pid:Integer;param:Pointer):Integer; assembler; nostackframe;
asm
 movq  $328,%rax
 call  fast_syscall
 jmp   cerror
end;

function sched_setscheduler(pid,policy:Integer;param:Pointer):Integer; assembler; nostackframe;
asm
 movq  $329,%rax
 call  fast_syscall
 jmp   cerror
end;

function sched_getscheduler(pid:Integer):Integer; assembler; nostackframe;
asm
 movq  $330,%rax
 call  fast_syscall
 jmp   cerror
end;

function sched_yield():Integer; assembler; nostackframe;
asm
 movq  $331,%rax
 call  fast_syscall
 jmp   cerror
end;

function sched_get_priority_max(policy:Integer):Integer; assembler; nostackframe;
asm
 movq  $332,%rax
 call  fast_syscall
 jmp   cerror
end;

function sched_get_priority_min(policy:Integer):Integer; assembler; nostackframe;
asm
 movq  $333,%rax
 call  fast_syscall
 jmp   cerror
end;

function sched_rr_get_interval(pid:Integer;interval:Pointer):Integer; assembler; nostackframe;
asm
 movq  $334,%rax
 call  fast_syscall
 jmp   cerror
end;

Function _sigprocmask(how:Integer;_set,oset:Pointer):Integer; assembler; nostackframe;
asm
 movq  $340,%rax
 call  fast_syscall
 jmp   cerror
end;

Function _sigsuspend(sigmask:Pointer):Integer; assembler; nostackframe;
asm
 movq  $341,%rax
 call  fast_syscall
 jmp   cerror
end;

Function sigpending(oset:Pointer):Integer; assembler; nostackframe;
asm
 movq  $343,%rax
 call  fast_syscall
 jmp   cerror
end;

Function sigtimedwait(oset,info,timeout:Pointer):Integer; assembler; nostackframe;
asm
 movq  $345,%rax
 call  fast_syscall
 jmp   cerror
end;

Function sigwaitinfo(oset,info:Pointer):Integer; assembler; nostackframe;
asm
 movq  $346,%rax
 call  fast_syscall
 jmp   cerror
end;

function getresuid(ruid,euid,suid:PInteger):Integer; assembler; nostackframe;
asm
 movq  $360,%rax
 call  fast_syscall
 jmp   cerror
end;

function getresgid(rgid,egid,sgid:PInteger):Integer; assembler; nostackframe;
asm
 movq  $361,%rax
 call  fast_syscall
 jmp   cerror
end;

function kqueue():Integer; assembler; nostackframe;
asm
 movq  $362,%rax
 call  fast_syscall
 jmp   cerror
end;

function kevent(fd:Integer;changelist:Pointer;nchanges:Integer;eventlist:Pointer;nevents:Integer;timeout:Pointer):Integer; assembler; nostackframe;
asm
 movq  $363,%rax
 call  fast_syscall
 jmp   cerror
end;

function nmount(iovp:Pointer;iovcnt:DWORD;flags:QWORD):Integer; assembler; nostackframe;
asm
 movq  $378,%rax
 call  fast_syscall
 jmp   cerror
end;

function mtypeprotect(addr:Pointer;len:QWORD;mtype,prot:Integer):Integer; assembler; nostackframe;
asm
 movq  $379,%rax
 call  fast_syscall
 jmp   cerror
end;

function lchflags(path:PChar;flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $391,%rax
 call  fast_syscall
 jmp   cerror
end;

function uuidgen(store:Pointer;count:Integer):Integer; assembler; nostackframe;
asm
 movq  $392,%rax
 call  fast_syscall
 jmp   cerror
end;

function getfsstat(buf:Pointer;bufsize:QWORD;flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $395,%rax
 call  fast_syscall
 jmp   cerror
end;

function statfs(path:PChar;buf:Pointer):Integer; assembler; nostackframe;
asm
 movq  $396,%rax
 call  fast_syscall
 jmp   cerror
end;

function _fstatfs(fd:Integer;buf:Pointer):Integer; assembler; nostackframe;
asm
 movq  $397,%rax
 call  fast_syscall
 jmp   cerror
end;

Function _sigaction(sig:Integer;act,oact:Pointer):Integer; assembler; nostackframe;
asm
 movq  $416,%rax
 call  fast_syscall
 jmp   cerror
end;

function sigreturn(sigcntxp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $417,%rax
 call  fast_syscall
 jmp   cerror
end;

function getcontext(ucp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $421,%rax
 call  fast_syscall
 jmp   cerror
end;

function setcontext(ucp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $422,%rax
 call  fast_syscall
 jmp   cerror
end;

function swapcontext(oucp,ucp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $423,%rax
 call  fast_syscall
 jmp   cerror
end;

Function sigwait(oset:Pointer;sig:PInteger):Integer; assembler; nostackframe;
asm
 movq  $429,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_create(ctx:Pointer;id:PDWORD;flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $430,%rax
 call  fast_syscall
 jmp   cerror
end;

procedure thr_exit(state:PDWORD); assembler; nostackframe;
asm
 movq  $431,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_self(id:PDWORD):Integer; assembler; nostackframe;
asm
 movq  $432,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_kill(id,sig:Integer):Integer; assembler; nostackframe;
asm
 movq  $433,%rax
 call  fast_syscall
 jmp   cerror
end;

function _umtx_lock(mtx:Pointer):Integer; assembler; nostackframe;
asm
 movq  $434,%rax
 call  fast_syscall
 jmp   cerror
end;

function _umtx_unlock(mtx:Pointer):Integer; assembler; nostackframe;
asm
 movq  $435,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_suspend(timeout:Pointer):Integer; assembler; nostackframe;
asm
 movq  $442,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_wake(id:DWORD):Integer; assembler; nostackframe;
asm
 movq  $443,%rax
 call  fast_syscall
 jmp   cerror
end;

function _umtx_op(obj:Pointer;op:Integer;val:QWORD;uaddr1,uaddr2:Pointer):Integer; assembler; nostackframe;
asm
 movq  $454,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_new(_param:Pointer;_size:Integer):Integer; assembler; nostackframe;
asm
 movq  $455,%rax
 call  fast_syscall
 jmp   cerror
end;

function sigqueue(pid,signum:Integer;value:Pointer):Integer; assembler; nostackframe;
asm
 movq  $456,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_set_name(id:DWORD;pname:PChar):Integer; assembler; nostackframe;
asm
 movq  $464,%rax
 call  fast_syscall
 jmp   cerror
end;

function rtprio_thread(func,tid:Integer;rtp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $466,%rax
 call  fast_syscall
 jmp   cerror
end;

function pread(fd:Integer;buf:Pointer;nbyte:QWORD;offset:Int64):Integer; assembler; nostackframe;
asm
 movq  $475,%rax
 call  fast_syscall
 jmp   cerror
end;

function pwrite(fd:Integer;buf:Pointer;nbyte:QWORD;offset:Int64):Integer; assembler; nostackframe;
asm
 movq  $476,%rax
 call  fast_syscall
 jmp   cerror
end;

function mmap(vaddr:Pointer;vlen:QWORD;prot:Integer;flags:Integer;fd:Integer;pos:QWORD):Pointer; assembler; nostackframe;
asm
 movq  $477,%rax
 call  fast_syscall
 jmp   cerror
end;

function lseek(fd:Integer;offset:Int64;whence:Integer):Integer; assembler; nostackframe;
asm
 movq  $478,%rax
 call  fast_syscall
 jmp   cerror
end;

function truncate(path:PChar;length:Int64):Integer; assembler; nostackframe;
asm
 movq  $479,%rax
 call  fast_syscall
 jmp   cerror
end;

function ftruncate(fd:Integer;length:Int64):Integer; assembler; nostackframe;
asm
 movq  $480,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_kill2(pid,id,sig:Integer):Integer; assembler; nostackframe;
asm
 movq  $481,%rax
 call  fast_syscall
 jmp   cerror
end;

function cpuset(setid:PInteger):Integer; assembler; nostackframe;
asm
 movq  $484,%rax
 call  fast_syscall
 jmp   cerror
end;

function cpuset_setid(which,id,setid:Integer):Integer; assembler; nostackframe;
asm
 movq  $485,%rax
 call  fast_syscall
 jmp   cerror
end;

function cpuset_getid(level,which,id:Integer;setid:PInteger):Integer; assembler; nostackframe;
asm
 movq  $486,%rax
 call  fast_syscall
 jmp   cerror
end;

function cpuset_getaffinity(level,which,id:Integer;cpusetsize:QWORD;mask:Pointer):Integer; assembler; nostackframe;
asm
 movq  $487,%rax
 call  fast_syscall
 jmp   cerror
end;

function cpuset_setaffinity(level,which,id:Integer;cpusetsize:QWORD;mask:Pointer):Integer; assembler; nostackframe;
asm
 movq  $488,%rax
 call  fast_syscall
 jmp   cerror
end;

function fchmodat(fd:Integer;path:PChar;mode,flag:Integer):Integer; assembler; nostackframe;
asm
 movq  $490,%rax
 call  fast_syscall
 jmp   cerror
end;

function fchownat(fd:Integer;path:PChar;uid,gid,flag:Integer):Integer; assembler; nostackframe;
asm
 movq  $491,%rax
 call  fast_syscall
 jmp   cerror
end;

function fstatat(fd:Integer;path:PChar;buf:Pointer;flag:Integer):Integer; assembler; nostackframe;
asm
 movq  $493,%rax
 call  fast_syscall
 jmp   cerror
end;

function futimesat(fd:Integer;path:PChar;times:Pointer):Integer; assembler; nostackframe;
asm
 movq  $494,%rax
 call  fast_syscall
 jmp   cerror
end;

function linkat(fd1:Integer;path1:PChar;fd2:Integer;path2:PChar;flag:Integer):Integer; assembler; nostackframe;
asm
 movq  $495,%rax
 call  fast_syscall
 jmp   cerror
end;

function mkdirat(fd:Integer;path:PChar;mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $496,%rax
 call  fast_syscall
 jmp   cerror
end;

function mkfifoat(fd:Integer;path:PChar;mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $497,%rax
 call  fast_syscall
 jmp   cerror
end;

function mknodat(fd:Integer;path:PChar;mode,dev:Integer):Integer; assembler; nostackframe;
asm
 movq  $498,%rax
 call  fast_syscall
 jmp   cerror
end;

function _openat(fd:Integer;path:PChar;flags,mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $499,%rax
 call  fast_syscall
 jmp   cerror
end;

function renameat(oldfd:Integer;old:PChar;newfd:Integer;new:PChar):Integer; assembler; nostackframe;
asm
 movq  $501,%rax
 call  fast_syscall
 jmp   cerror
end;

function symlinkat(path1:PChar;fd:Integer;path2:PChar):Integer; assembler; nostackframe;
asm
 movq  $502,%rax
 call  fast_syscall
 jmp   cerror
end;

function unlinkat(fd:Integer;path:PChar;flag:Integer):Integer; assembler; nostackframe;
asm
 movq  $503,%rax
 call  fast_syscall
 jmp   cerror
end;

function pselect(nd:Integer;uin,uou,uex,uts,sm:Pointer):Integer; assembler; nostackframe;
asm
 movq  $522,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_regmgr_call(op,key:DWORD;presult,pvalue:Pointer;vlen:QWORD):Integer; assembler; nostackframe;
asm
 movq  $532,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dl_get_list(pid:Integer;pArray:PInteger;numArray:Integer;pActualNum:PInteger):Integer; assembler; nostackframe;
asm
 movq  $535,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dl_get_info(pid,handle:Integer;pout:PPointer):Integer; assembler; nostackframe;
asm
 movq  $536,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_create(name:PChar;attr:DWORD;initPattern:QWORD):Integer; assembler; nostackframe;
asm
 movq  $538,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_delete(key:Integer):Integer; assembler; nostackframe;
asm
 movq  $539,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_open(name:PChar):Integer; assembler; nostackframe;
asm
 movq  $540,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_close(key:Integer):Integer; assembler; nostackframe;
asm
 movq  $541,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_wait(key:Integer;bitPattern:QWORD;waitMode:DWORD;pRes:PQWORD;pTimeout:PDWORD):Integer; assembler; nostackframe;
asm
 movq  $542,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_trywait(key:Integer;bitPattern:QWORD;waitMode:DWORD;pRes:PQWORD):Integer; assembler; nostackframe;
asm
 movq  $543,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_set(key:Integer;bitPattern:QWORD):Integer; assembler; nostackframe;
asm
 movq  $544,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_clear(key:Integer;bitPattern:QWORD):Integer; assembler; nostackframe;
asm
 movq  $545,%rax
 call  fast_syscall
 jmp   cerror
end;

function evf_cancel(key:Integer;setPattern:QWORD;pNumWait:PInteger):Integer; assembler; nostackframe;
asm
 movq  $546,%rax
 call  fast_syscall
 jmp   cerror
end;

function query_memory_protection(addr:Pointer;info:Pointer):Integer; assembler; nostackframe;
asm
 movq  $547,%rax
 call  fast_syscall
 jmp   cerror
end;

function batch_map(fd:Integer;flags:DWORD;entries:Pointer;numberOfEntries:Integer;numberOfEntriesOut:PInteger):Integer; assembler; nostackframe;
asm
 movq  $548,%rax
 call  fast_syscall
 jmp   cerror
end;

function osem_create(name:PChar;attr:DWORD;initCount,maxCount:Integer):Integer; assembler; nostackframe;
asm
 movq  $549,%rax
 call  fast_syscall
 jmp   cerror
end;

function osem_delete(key:Integer):Integer; assembler; nostackframe;
asm
 movq  $550,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_osem_open(name:PChar):Integer; assembler; nostackframe;
asm
 movq  $551,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_osem_close(key:Integer):Integer; assembler; nostackframe;
asm
 movq  $552,%rax
 call  fast_syscall
 jmp   cerror
end;

function osem_wait(key,needCount:Integer;pTimeout:PDWORD):Integer; assembler; nostackframe;
asm
 movq  $553,%rax
 call  fast_syscall
 jmp   cerror
end;

function osem_trywait(key,needCount:Integer):Integer; assembler; nostackframe;
asm
 movq  $554,%rax
 call  fast_syscall
 jmp   cerror
end;

function osem_post(key,signalCount:Integer):Integer; assembler; nostackframe;
asm
 movq  $555,%rax
 call  fast_syscall
 jmp   cerror
end;

function osem_cancel(key,setCount:Integer;pNumWait:PInteger):Integer; assembler; nostackframe;
asm
 movq  $556,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_namedobj_create(name:PChar;objp:Pointer;objt:Integer):Integer; assembler; nostackframe;
asm
 movq  $557,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_namedobj_delete(id,objt:Integer):Integer; assembler; nostackframe;
asm
 movq  $558,%rax
 call  fast_syscall
 jmp   cerror
end;

function budget_create(name:pchar;ptype:DWORD;new:Pointer;count:DWORD;prev:Pointer):Integer; assembler; nostackframe;
asm
 movq  $568,%rax
 call  fast_syscall
 jmp   cerror
end;

function budget_delete(key:Integer):Integer; assembler; nostackframe;
asm
 movq  $569,%rax
 call  fast_syscall
 jmp   cerror
end;

function budget_get(key:Integer;ptr:Pointer;psize:PInteger):Integer; assembler; nostackframe;
asm
 movq  $570,%rax
 call  fast_syscall
 jmp   cerror
end;

function budget_set(key:Integer):Integer; assembler; nostackframe;
asm
 movq  $571,%rax
 call  fast_syscall
 jmp   cerror
end;

function virtual_query(addr:Pointer;flags:DWORD;info:Pointer;infoSize:QWORD):Integer; assembler; nostackframe;
asm
 movq  $572,%rax
 call  fast_syscall
 jmp   cerror
end;

function is_in_sandbox():Integer; assembler; nostackframe;
asm
 movq  $585,%rax
 call  fast_syscall
 jmp   cerror
end;

function dmem_container(d_pool_id:Integer):Integer; assembler; nostackframe;
asm
 movq  $586,%rax
 call  fast_syscall
 jmp   cerror
end;

function get_authinfo(pid:Integer;info:Pointer):Integer; assembler; nostackframe;
asm
 movq  $587,%rax
 call  fast_syscall
 jmp   cerror
end;

function mname(addr:Pointer;len:QWORD;name:PChar):Integer; assembler; nostackframe;
asm
 movq  $588,%rax
 call  fast_syscall
 jmp   cerror
end;

function dynlib_dlsym(handle:Integer;symbol:pchar;addrp:ppointer):Integer; assembler; nostackframe;
asm
 movq  $591,%rax
 call  fast_syscall
 jmp   cerror
end;

function dynlib_get_list(pArray:PInteger;numArray:QWORD;pActualNum:PQWORD):Integer; assembler; nostackframe;
asm
 movq  $592,%rax
 call  fast_syscall
 jmp   cerror
end;

function dynlib_get_info(handle:Integer;info:Pointer):Integer; assembler; nostackframe;
asm
 movq  $593,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dynlib_load_prx(moduleFileName:pchar;flags:DWORD;pRes:PInteger;unused:Pointer):Integer; assembler; nostackframe;
asm
 movq  $594,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dynlib_unload_prx(handle:Integer;args:QWORD;argp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $595,%rax
 call  fast_syscall
 jmp   cerror
end;

function dynlib_do_copy_relocations():Integer; assembler; nostackframe;
asm
 movq  $596,%rax
 call  fast_syscall
 jmp   cerror
end;

function dynlib_get_proc_param(pout:PPointer;psize:PQWORD):Integer; assembler; nostackframe;
asm
 movq  $598,%rax
 call  fast_syscall
 jmp   cerror
end;

function dynlib_process_needed_and_relocate():Integer; assembler; nostackframe;
asm
 movq  $599,%rax
 call  fast_syscall
 jmp   cerror
end;

function mdbg_service(op:Integer;arg1,arg2:Pointer):Integer; assembler; nostackframe;
asm
 movq  $601,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_randomized_path(src,dst:pchar;plen:PQWORD):Integer; assembler; nostackframe;
asm
 movq  $602,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dl_get_metadata(pid,handle:Integer;pout:Pointer;size:Integer;pactual_size:PInteger):Integer; assembler; nostackframe;
asm
 movq  $604,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_workaround8849(key:DWORD):Integer; assembler; nostackframe;
asm
 movq  $605,%rax
 call  fast_syscall
 jmp   cerror
end;

function dynlib_get_info_ex(handle,flags:Integer;info:Pointer):Integer; assembler; nostackframe;
asm
 movq  $608,%rax
 call  fast_syscall
 jmp   cerror
end;

function budget_getid():Integer; assembler; nostackframe;
asm
 movq  $609,%rax
 call  fast_syscall
 jmp   cerror
end;

function budget_get_ptype(pid:Integer):Integer; assembler; nostackframe;
asm
 movq  $610,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_get_proc_type_info(dst:Pointer):Integer; assembler; nostackframe;
asm
 movq  $612,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_get_name(id:DWORD;pname:PChar):Integer; assembler; nostackframe;
asm
 movq  $616,%rax
 call  fast_syscall
 jmp   cerror
end;

function set_gpo(uiBits:DWORD):Integer; assembler; nostackframe;
asm
 movq  $617,%rax
 call  fast_syscall
 jmp   cerror
end;

function ipmimgr_call(op,kid:Integer;res:PInteger;params:Pointer;paramsSize:QWORD):Integer; assembler; nostackframe;
asm
 movq  $622,%rax
 call  fast_syscall
 jmp   cerror
end;

function get_gpo(pbits:PByte):Integer; assembler; nostackframe;
asm
 movq  $623,%rax
 call  fast_syscall
 jmp   cerror
end;

function mmap_dmem(vaddr:Pointer;length:QWORD;mtype:DWORD;prot:DWORD;flags:DWORD;phaddr:QWORD):Pointer; assembler; nostackframe;
asm
 movq  $628,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_suspend_ucontext(tid:Integer):Integer; assembler; nostackframe;
asm
 movq  $632,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_resume_ucontext(tid:Integer):Integer; assembler; nostackframe;
asm
 movq  $633,%rax
 call  fast_syscall
 jmp   cerror
end;

function thr_get_ucontext(tid:Integer;ucp:Pointer):Integer; assembler; nostackframe;
asm
 movq  $634,%rax
 call  fast_syscall
 jmp   cerror
end;

function set_timezone_info(data_ptr:Pointer;data_count_dw:Integer):Integer; assembler; nostackframe;
asm
 movq  $636,%rax
 call  fast_syscall
 jmp   cerror
end;

function utc_to_localtime(time:QWORD;local_time,tsec:Pointer;dstsec:PInteger):Integer; assembler; nostackframe;
asm
 movq  $638,%rax
 call  fast_syscall
 jmp   cerror
end;

function localtime_to_utc(time:QWORD;tz_type:Integer;utc_time,tsec:Pointer;dstsec:PInteger):Integer; assembler; nostackframe;
asm
 movq  $639,%rax
 call  fast_syscall
 jmp   cerror
end;

function set_chicken_switches(flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $643,%rax
 call  fast_syscall
 jmp   cerror
end;

function app_state_change(state:Integer):Integer; assembler; nostackframe;
asm
 movq  $648,%rax
 call  fast_syscall
 jmp   cerror
end;

function dynlib_get_obj_member(handle:Integer;num:Byte;pout:PPointer):Integer; assembler; nostackframe;
asm
 movq  $649,%rax
 call  fast_syscall
 jmp   cerror
end;

function budget_get_ptype_of_budget(key:Integer):Integer; assembler; nostackframe;
asm
 movq  $650,%rax
 call  fast_syscall
 jmp   cerror
end;

function blockpool_open(flags:Integer):Integer; assembler; nostackframe;
asm
 movq  $653,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dynlib_get_info_for_libdbg(handle:Integer;info:Pointer):Integer; assembler; nostackframe;
asm
 movq  $656,%rax
 call  fast_syscall
 jmp   cerror
end;

function fdatasync(fd:Integer):Integer; assembler; nostackframe;
asm
 movq  $658,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dynlib_get_list2(pArray:PInteger;numArray:QWORD;pActualNum:PQWORD):Integer; assembler; nostackframe;
asm
 movq  $659,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dynlib_get_info2(handle:Integer;info:Pointer):Integer; assembler; nostackframe;
asm
 movq  $660,%rax
 call  fast_syscall
 jmp   cerror
end;

function get_page_table_stats(vm_container,cpu_gpu:Integer;p_total,p_available:PInteger):Integer; assembler; nostackframe;
asm
 movq  $671,%rax
 call  fast_syscall
 jmp   cerror
end;

function __sys_dynlib_get_list_for_libdbg(pArray:PInteger;numArray:QWORD;pActualNum:PQWORD):Integer; assembler; nostackframe;
asm
 movq  $672,%rax
 call  fast_syscall
 jmp   cerror
end;

function reserve_2mb_page(size:QWORD;mode:Integer):Integer; assembler; nostackframe;
asm
 movq  $675,%rax
 call  fast_syscall
 jmp   cerror
end;

function cpumode_yield():Integer; assembler; nostackframe;
asm
 movq  $676,%rax
 call  fast_syscall
 jmp   cerror
end;


end.

