/* Generated from scheduler.scm by the CHICKEN compiler
   http://www.call-cc.org
   Version 6.0.0 (rev eeeb4bfb)
   openbsd-unix-clang-x86-64 [ 64bit dload ptables ]
   command line: scheduler.scm -optimize-level 2 -include-path . -include-path ./ -inline -ignore-repository -feature chicken-bootstrap -feature debugbuild -verbose -specialize -consult-types-file ./types.db -explicit-use -no-trace -output-file scheduler.c
   unit: scheduler
   uses: extras library
*/
#include "chicken.h"

#ifdef HAVE_ERRNO_H
# include <errno.h>
# define C_signal_interrupted_p     C_mk_bool(errno == EINTR)
#else
# define C_signal_interrupted_p     C_SCHEME_FALSE
#endif

#ifdef _WIN32
/* TODO: Winsock select() only works for sockets */
# include <winsock2.h>
/* Beware: winsock2.h must come BEFORE windows.h */
# define C_msleep(n)   (Sleep((DWORD)C_num_to_uint64(n)), C_SCHEME_TRUE)
#else
# include <sys/time.h>
static C_word C_msleep(C_word ms);
C_word C_msleep(C_word ms) {
#ifdef __CYGWIN__
  if(usleep((useconds_t)C_num_to_uint64(ms) * 1000) == -1) return C_SCHEME_FALSE;
#else
  struct timespec ts;
  C_word ab[C_SIZEOF_FIX_BIGNUM], *a = ab,
         sec = C_s_a_u_i_integer_quotient(&a, 2, ms, C_fix(1000)),
         msec = C_s_a_u_i_integer_remainder(&a, 2, ms, C_fix(1000));
  ts.tv_sec = (time_t)C_num_to_uint64(sec);
  ts.tv_nsec = (long)C_unfix(msec) * 1000000;
  
  if(nanosleep(&ts, NULL) == -1) return C_SCHEME_FALSE;
#endif
  return C_SCHEME_TRUE;
}
#endif

#ifdef NO_POSIX_POLL

/* Shouldn't we include <sys/select.h> here? */
static fd_set C_fdset_input, C_fdset_output;

#define C_fd_input_ready(fd,pos)  C_mk_bool(FD_ISSET(C_unfix(fd), &C_fdset_input))
#define C_fd_output_ready(fd,pos)  C_mk_bool(FD_ISSET(C_unfix(fd), &C_fdset_output))

inline static int C_ready_fds_timeout(int to, unsigned int tm) {
  struct timeval timeout;
  timeout.tv_sec = tm / 1000;
  timeout.tv_usec = fmod(tm, 1000) * 1000;
  /* we use FD_SETSIZE, but really should use max fd */
  return select(FD_SETSIZE, &C_fdset_input, &C_fdset_output, NULL, to ? &timeout : NULL);
}

inline static void C_prepare_fdset(int length) {
  FD_ZERO(&C_fdset_input);
  FD_ZERO(&C_fdset_output);
}

inline static void C_fdset_add(int fd, int input, int output) {
  if (input) FD_SET(fd, &C_fdset_input);
  if (output) FD_SET(fd, &C_fdset_output);
}

#else
#  include <poll.h>
#  include <assert.h>

static int C_fdset_nfds;
static struct pollfd *C_fdset_set = NULL;

inline static int C_fd_ready(int fd, int pos, int what) {
  assert(fd == C_fdset_set[pos].fd); /* Must match position in fd-list! */
  return(C_fdset_set[pos].revents & what);
}

#define C_fd_input_ready(fd,pos)  C_mk_bool(C_fd_ready(C_unfix(fd), C_unfix(pos),POLLIN|POLLERR|POLLHUP|POLLNVAL))
#define C_fd_output_ready(fd,pos)  C_mk_bool(C_fd_ready(C_unfix(fd), C_unfix(pos),POLLOUT|POLLERR|POLLHUP|POLLNVAL))

inline static int C_ready_fds_timeout(int to, unsigned int tm) {
  return poll(C_fdset_set, C_fdset_nfds, to ? tm : -1);
}

inline static void C_prepare_fdset(int length) {
  /* TODO: Only realloc when needed? */
  C_fdset_set = realloc(C_fdset_set, sizeof(struct pollfd) * length);
  if (C_fdset_set == NULL)
    C_halt(C_SCHEME_FALSE); /* Ugly: no message */
  C_fdset_nfds = 0;
}

/* This *must* be called in order, so position will match fd-list */
inline static void C_fdset_add(int fd, int input, int output) {
  C_fdset_set[C_fdset_nfds].events = ((input ? POLLIN : 0) | (output ? POLLOUT : 0));
  C_fdset_set[C_fdset_nfds++].fd = fd;
}
#endif

static C_PTABLE_ENTRY *create_ptable(void);
C_noret_decl(C_extras_toplevel)
C_extern void C_ccall C_extras_toplevel(C_word c,C_word *av) C_noret;
C_noret_decl(C_library_toplevel)
C_extern void C_ccall C_library_toplevel(C_word c,C_word *av) C_noret;

static C_word lf[74];
static double C_possibly_force_alignment;
static C_char li0[] C_aligned={C_lihdr(0,0,10),40,108,111,111,112,32,108,115,116,41,0,0,0,0,0,0};
static C_char li1[] C_aligned={C_lihdr(0,0,12),40,100,101,108,113,32,120,32,108,115,116,41,0,0,0,0};
static C_char li2[] C_aligned={C_lihdr(0,0,7),40,108,111,111,112,50,41,0};
static C_char li3[] C_aligned={C_lihdr(0,0,20),40,108,111,111,112,50,32,116,104,114,101,97,100,115,32,107,101,101,112,41,0,0,0,0};
static C_char li4[] C_aligned={C_lihdr(0,0,16),40,108,111,111,112,32,110,32,112,111,115,32,108,115,116,41};
static C_char li5[] C_aligned={C_lihdr(0,0,8),40,103,52,49,50,32,116,41};
static C_char li6[] C_aligned={C_lihdr(0,0,23),40,102,111,114,45,101,97,99,104,45,108,111,111,112,52,49,49,32,103,52,49,56,41,0};
static C_char li7[] C_aligned={C_lihdr(0,0,10),40,108,111,111,112,32,108,115,116,41,0,0,0,0,0,0};
static C_char li8[] C_aligned={C_lihdr(0,0,10),40,108,111,111,112,32,108,115,116,41,0,0,0,0,0,0};
static C_char li9[] C_aligned={C_lihdr(0,0,7),40,108,111,111,112,49,41,0};
static C_char li10[] C_aligned={C_lihdr(0,0,16),40,35,35,115,121,115,35,115,99,104,101,100,117,108,101,41};
static C_char li11[] C_aligned={C_lihdr(0,0,24),40,35,35,115,121,115,35,102,111,114,99,101,45,112,114,105,109,111,114,100,105,97,108,41};
static C_char li12[] C_aligned={C_lihdr(0,0,19),40,35,35,115,121,115,35,114,101,97,100,121,45,113,117,101,117,101,41,0,0,0,0,0};
static C_char li13[] C_aligned={C_lihdr(0,0,33),40,35,35,115,121,115,35,97,100,100,45,116,111,45,114,101,97,100,121,45,113,117,101,117,101,32,116,104,114,101,97,100,41,0,0,0,0,0,0,0};
static C_char li14[] C_aligned={C_lihdr(0,0,34),40,35,35,115,121,115,35,117,112,100,97,116,101,45,116,104,114,101,97,100,45,115,116,97,116,101,45,98,117,102,102,101,114,41,0,0,0,0,0,0};
static C_char li15[] C_aligned={C_lihdr(0,0,7),40,97,49,51,50,57,41,0};
static C_char li16[] C_aligned={C_lihdr(0,0,35),40,35,35,115,121,115,35,105,110,116,101,114,114,117,112,116,45,104,111,111,107,32,114,101,97,115,111,110,32,115,116,97,116,101,41,0,0,0,0,0};
static C_char li17[] C_aligned={C_lihdr(0,0,21),40,35,35,115,121,115,35,116,105,109,101,111,117,116,45,113,117,101,117,101,41,0,0,0};
static C_char li18[] C_aligned={C_lihdr(0,0,11),40,108,111,111,112,32,112,114,101,118,41,0,0,0,0,0};
static C_char li19[] C_aligned={C_lihdr(0,0,34),40,35,35,115,121,115,35,114,101,109,111,118,101,45,102,114,111,109,45,116,105,109,101,111,117,116,45,108,105,115,116,32,116,41,0,0,0,0,0,0};
static C_char li20[] C_aligned={C_lihdr(0,0,14),40,108,111,111,112,32,116,108,32,112,114,101,118,41,0,0};
static C_char li21[] C_aligned={C_lihdr(0,0,38),40,35,35,115,121,115,35,116,104,114,101,97,100,45,98,108,111,99,107,45,102,111,114,45,116,105,109,101,111,117,116,33,32,116,32,116,109,41,0,0};
static C_char li22[] C_aligned={C_lihdr(0,0,42),40,35,35,115,121,115,35,116,104,114,101,97,100,45,98,108,111,99,107,45,102,111,114,45,116,101,114,109,105,110,97,116,105,111,110,33,32,116,32,116,50,41,0,0,0,0,0,0};
static C_char li23[] C_aligned={C_lihdr(0,0,9),40,103,51,53,51,32,116,50,41,0,0,0,0,0,0,0};
static C_char li24[] C_aligned={C_lihdr(0,0,23),40,102,111,114,45,101,97,99,104,45,108,111,111,112,51,53,50,32,103,51,53,57,41,0};
static C_char li25[] C_aligned={C_lihdr(0,0,23),40,102,111,114,45,101,97,99,104,45,108,111,111,112,51,49,56,32,103,51,50,53,41,0};
static C_char li26[] C_aligned={C_lihdr(0,0,23),40,102,111,114,45,101,97,99,104,45,108,111,111,112,51,48,52,32,103,51,49,49,41,0};
static C_char li27[] C_aligned={C_lihdr(0,0,24),40,35,35,115,121,115,35,116,104,114,101,97,100,45,107,105,108,108,33,32,116,32,115,41};
static C_char li28[] C_aligned={C_lihdr(0,0,31),40,35,35,115,121,115,35,116,104,114,101,97,100,45,98,97,115,105,99,45,117,110,98,108,111,99,107,33,32,116,41,0};
static C_char li29[] C_aligned={C_lihdr(0,0,7),40,97,49,55,50,57,41,0};
static C_char li30[] C_aligned={C_lihdr(0,0,37),40,35,35,115,121,115,35,100,101,102,97,117,108,116,45,101,120,99,101,112,116,105,111,110,45,104,97,110,100,108,101,114,32,97,114,103,41,0,0,0};
static C_char li31[] C_aligned={C_lihdr(0,0,16),40,35,35,115,121,115,35,102,100,45,113,117,101,117,101,41};
static C_char li32[] C_aligned={C_lihdr(0,0,10),40,108,111,111,112,32,108,115,116,41,0,0,0,0,0,0};
static C_char li33[] C_aligned={C_lihdr(0,0,38),40,35,35,115,121,115,35,116,104,114,101,97,100,45,98,108,111,99,107,45,102,111,114,45,105,47,111,33,32,116,32,102,100,32,105,47,111,41,0,0};
static C_char li34[] C_aligned={C_lihdr(0,0,10),40,108,111,111,112,32,108,115,116,41,0,0,0,0,0,0};
static C_char li35[] C_aligned={C_lihdr(0,0,37),40,35,35,115,121,115,35,99,108,101,97,114,45,105,47,111,45,115,116,97,116,101,45,102,111,114,45,116,104,114,101,97,100,33,32,116,41,0,0,0};
static C_char li36[] C_aligned={C_lihdr(0,0,27),40,102,95,50,53,48,55,32,113,117,101,117,101,32,97,114,103,32,118,97,108,32,105,110,105,116,41,0,0,0,0,0};
static C_char li37[] C_aligned={C_lihdr(0,0,8),40,108,111,111,112,32,108,41};
static C_char li38[] C_aligned={C_lihdr(0,0,10),40,108,111,111,112,32,108,32,105,41,0,0,0,0,0,0};
static C_char li39[] C_aligned={C_lihdr(0,0,10),40,108,111,111,112,32,108,32,105,41,0,0,0,0,0,0};
static C_char li40[] C_aligned={C_lihdr(0,0,10),40,108,111,111,112,32,108,32,105,41,0,0,0,0,0,0};
static C_char li41[] C_aligned={C_lihdr(0,0,26),40,35,35,115,121,115,35,97,108,108,45,116,104,114,101,97,100,115,32,46,32,114,101,115,116,41,0,0,0,0,0,0};
static C_char li42[] C_aligned={C_lihdr(0,0,31),40,35,35,115,121,115,35,102,101,116,99,104,45,97,110,100,45,99,108,101,97,114,45,116,104,114,101,97,100,115,41,0};
static C_char li43[] C_aligned={C_lihdr(0,0,27),40,35,35,115,121,115,35,114,101,115,116,111,114,101,45,116,104,114,101,97,100,115,32,118,101,99,41,0,0,0,0,0};
static C_char li44[] C_aligned={C_lihdr(0,0,25),40,35,35,115,121,115,35,116,104,114,101,97,100,45,117,110,98,108,111,99,107,33,32,116,41,0,0,0,0,0,0,0};
static C_char li45[] C_aligned={C_lihdr(0,0,7),40,97,50,53,57,52,41,0};
static C_char li46[] C_aligned={C_lihdr(0,0,14),40,97,50,53,56,50,32,114,101,116,117,114,110,41,0,0};
static C_char li47[] C_aligned={C_lihdr(0,0,24),40,35,35,115,121,115,35,116,104,114,101,97,100,45,115,108,101,101,112,33,32,116,109,41};
static C_char li48[] C_aligned={C_lihdr(0,0,27),40,99,104,105,99,107,101,110,46,98,97,115,101,35,115,108,101,101,112,45,104,111,111,107,32,110,41,0,0,0,0,0};
static C_char li49[] C_aligned={C_lihdr(0,0,9),40,115,117,115,112,101,110,100,41,0,0,0,0,0,0,0};
static C_char li50[] C_aligned={C_lihdr(0,0,6),40,103,54,54,53,41,0,0};
static C_char li51[] C_aligned={C_lihdr(0,0,18),40,102,111,114,45,101,97,99,104,45,108,111,111,112,54,54,52,41,0,0,0,0,0,0};
static C_char li52[] C_aligned={C_lihdr(0,0,18),40,102,111,114,45,101,97,99,104,45,108,111,111,112,54,57,55,41,0,0,0,0,0,0};
static C_char li53[] C_aligned={C_lihdr(0,0,6),40,103,54,55,53,41,0,0};
static C_char li54[] C_aligned={C_lihdr(0,0,18),40,102,111,114,45,101,97,99,104,45,108,111,111,112,54,55,52,41,0,0,0,0,0,0};
static C_char li55[] C_aligned={C_lihdr(0,0,32),40,35,35,115,121,115,35,107,105,108,108,45,111,116,104,101,114,45,116,104,114,101,97,100,115,32,116,104,117,110,107,41};
static C_char li56[] C_aligned={C_lihdr(0,0,10),40,116,111,112,108,101,118,101,108,41,0,0,0,0,0,0};


/* from g524 */
C_regparm static C_word stub528(C_word C_buf,C_word C_a0,C_word C_a1){
C_word C_r=C_SCHEME_UNDEFINED,*C_a=(C_word*)C_buf;
int t0=(int )C_truep(C_a0);
unsigned int t1=(unsigned int )C_num_to_unsigned_int(C_a1);
C_r=C_fix((C_word)C_ready_fds_timeout(t0,t1));
return C_r;}

/* from g455 */
C_regparm static C_word stub460(C_word C_buf,C_word C_a0,C_word C_a1,C_word C_a2){
C_word C_r=C_SCHEME_UNDEFINED,*C_a=(C_word*)C_buf;
int t0=(int )C_unfix(C_a0);
int t1=(int )C_truep(C_a1);
int t2=(int )C_truep(C_a2);
C_fdset_add(t0,t1,t2);
return C_r;}

/* from g398 */
C_regparm static C_word stub401(C_word C_buf,C_word C_a0){
C_word C_r=C_SCHEME_UNDEFINED,*C_a=(C_word*)C_buf;
int t0=(int )C_unfix(C_a0);
C_prepare_fdset(t0);
return C_r;}

C_noret_decl(f_1009)
static void C_ccall f_1009(C_word c,C_word *av) C_noret;
C_noret_decl(f_1014)
static void f_1014(C_word t0,C_word t1) C_noret;
C_noret_decl(f_1018)
static void C_ccall f_1018(C_word c,C_word *av) C_noret;
C_noret_decl(f_1021)
static void C_ccall f_1021(C_word c,C_word *av) C_noret;
C_noret_decl(f_1026)
static void f_1026(C_word t0,C_word t1) C_noret;
C_noret_decl(f_1030)
static void f_1030(C_word t0,C_word t1) C_noret;
C_noret_decl(f_1090)
static void f_1090(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_1124)
static void C_ccall f_1124(C_word c,C_word *av) C_noret;
C_noret_decl(f_1127)
static void C_ccall f_1127(C_word c,C_word *av) C_noret;
C_noret_decl(f_1139)
static void f_1139(C_word t0,C_word t1) C_noret;
C_noret_decl(f_1145)
static void C_ccall f_1145(C_word c,C_word *av) C_noret;
C_noret_decl(f_1157)
static void C_ccall f_1157(C_word c,C_word *av) C_noret;
C_noret_decl(f_1165)
static void C_ccall f_1165(C_word c,C_word *av) C_noret;
C_noret_decl(f_1199)
static void C_ccall f_1199(C_word c,C_word *av) C_noret;
C_noret_decl(f_1210)
static void C_ccall f_1210(C_word c,C_word *av) C_noret;
C_noret_decl(f_1213)
static void C_ccall f_1213(C_word c,C_word *av) C_noret;
C_noret_decl(f_1258)
static C_word f_1258(C_word t0);
C_noret_decl(f_1312)
static void C_ccall f_1312(C_word c,C_word *av) C_noret;
C_noret_decl(f_1316)
static void C_ccall f_1316(C_word c,C_word *av) C_noret;
C_noret_decl(f_1330)
static void C_ccall f_1330(C_word c,C_word *av) C_noret;
C_noret_decl(f_1337)
static void C_ccall f_1337(C_word c,C_word *av) C_noret;
C_noret_decl(f_1340)
static void C_ccall f_1340(C_word c,C_word *av) C_noret;
C_noret_decl(f_1346)
static C_word f_1346(C_word t0,C_word t1,C_word t2);
C_noret_decl(f_1381)
static void C_ccall f_1381(C_word c,C_word *av) C_noret;
C_noret_decl(f_1391)
static void C_ccall f_1391(C_word c,C_word *av) C_noret;
C_noret_decl(f_1402)
static void f_1402(C_word t0,C_word t1,C_word t2,C_word t3) C_noret;
C_noret_decl(f_1450)
static void C_ccall f_1450(C_word c,C_word *av) C_noret;
C_noret_decl(f_1515)
static void C_ccall f_1515(C_word c,C_word *av) C_noret;
C_noret_decl(f_1531)
static void f_1531(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_1541)
static void C_ccall f_1541(C_word c,C_word *av) C_noret;
C_noret_decl(f_1557)
static void f_1557(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_1580)
static void C_ccall f_1580(C_word c,C_word *av) C_noret;
C_noret_decl(f_1584)
static void C_ccall f_1584(C_word c,C_word *av) C_noret;
C_noret_decl(f_1590)
static void f_1590(C_word t0,C_word t1) C_noret;
C_noret_decl(f_1593)
static void C_ccall f_1593(C_word c,C_word *av) C_noret;
C_noret_decl(f_1596)
static void C_ccall f_1596(C_word c,C_word *av) C_noret;
C_noret_decl(f_1614)
static void C_ccall f_1614(C_word c,C_word *av) C_noret;
C_noret_decl(f_1621)
static void f_1621(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_1640)
static void f_1640(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_1650)
static void C_ccall f_1650(C_word c,C_word *av) C_noret;
C_noret_decl(f_1671)
static void C_ccall f_1671(C_word c,C_word *av) C_noret;
C_noret_decl(f_1688)
static void C_ccall f_1688(C_word c,C_word *av) C_noret;
C_noret_decl(f_1694)
static void C_ccall f_1694(C_word c,C_word *av) C_noret;
C_noret_decl(f_1706)
static void C_ccall f_1706(C_word c,C_word *av) C_noret;
C_noret_decl(f_1710)
static void C_ccall f_1710(C_word c,C_word *av) C_noret;
C_noret_decl(f_1716)
static void C_ccall f_1716(C_word c,C_word *av) C_noret;
C_noret_decl(f_1730)
static void C_ccall f_1730(C_word c,C_word *av) C_noret;
C_noret_decl(f_1734)
static void C_ccall f_1734(C_word c,C_word *av) C_noret;
C_noret_decl(f_1743)
static void C_ccall f_1743(C_word c,C_word *av) C_noret;
C_noret_decl(f_1757)
static void f_1757(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_1768)
static void f_1768(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_1811)
static void C_ccall f_1811(C_word c,C_word *av) C_noret;
C_noret_decl(f_1817)
static void C_ccall f_1817(C_word c,C_word *av) C_noret;
C_noret_decl(f_1820)
static void C_ccall f_1820(C_word c,C_word *av) C_noret;
C_noret_decl(f_1823)
static void C_ccall f_1823(C_word c,C_word *av) C_noret;
C_noret_decl(f_1826)
static void C_ccall f_1826(C_word c,C_word *av) C_noret;
C_noret_decl(f_1829)
static void C_ccall f_1829(C_word c,C_word *av) C_noret;
C_noret_decl(f_1832)
static void C_ccall f_1832(C_word c,C_word *av) C_noret;
C_noret_decl(f_1853)
static void C_ccall f_1853(C_word c,C_word *av) C_noret;
C_noret_decl(f_1865)
static void f_1865(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_1875)
static void C_ccall f_1875(C_word c,C_word *av) C_noret;
C_noret_decl(f_1890)
static void C_ccall f_1890(C_word c,C_word *av) C_noret;
C_noret_decl(f_1924)
static void C_ccall f_1924(C_word c,C_word *av) C_noret;
C_noret_decl(f_1930)
static void C_ccall f_1930(C_word c,C_word *av) C_noret;
C_noret_decl(f_1933)
static void C_ccall f_1933(C_word c,C_word *av) C_noret;
C_noret_decl(f_1936)
static void C_ccall f_1936(C_word c,C_word *av) C_noret;
C_noret_decl(f_1939)
static void C_ccall f_1939(C_word c,C_word *av) C_noret;
C_noret_decl(f_1942)
static void C_ccall f_1942(C_word c,C_word *av) C_noret;
C_noret_decl(f_1945)
static void C_ccall f_1945(C_word c,C_word *av) C_noret;
C_noret_decl(f_1948)
static void C_ccall f_1948(C_word c,C_word *av) C_noret;
C_noret_decl(f_1951)
static void C_ccall f_1951(C_word c,C_word *av) C_noret;
C_noret_decl(f_1969)
static void C_ccall f_1969(C_word c,C_word *av) C_noret;
C_noret_decl(f_1973)
static void C_ccall f_1973(C_word c,C_word *av) C_noret;
C_noret_decl(f_1988)
static void f_1988(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_2036)
static void C_ccall f_2036(C_word c,C_word *av) C_noret;
C_noret_decl(f_2045)
static void C_ccall f_2045(C_word c,C_word *av) C_noret;
C_noret_decl(f_2069)
static void C_ccall f_2069(C_word c,C_word *av) C_noret;
C_noret_decl(f_2071)
static void f_2071(C_word t0,C_word t1,C_word t2,C_word t3,C_word t4) C_noret;
C_noret_decl(f_2098)
static void f_2098(C_word t0,C_word t1,C_word t2,C_word t3) C_noret;
C_noret_decl(f_2133)
static void C_ccall f_2133(C_word c,C_word *av) C_noret;
C_noret_decl(f_2167)
static void C_ccall f_2167(C_word c,C_word *av) C_noret;
C_noret_decl(f_2170)
static void C_ccall f_2170(C_word c,C_word *av) C_noret;
C_noret_decl(f_2191)
static void C_ccall f_2191(C_word c,C_word *av) C_noret;
C_noret_decl(f_2197)
static void C_ccall f_2197(C_word c,C_word *av) C_noret;
C_noret_decl(f_2200)
static void C_ccall f_2200(C_word c,C_word *av) C_noret;
C_noret_decl(f_2203)
static void C_ccall f_2203(C_word c,C_word *av) C_noret;
C_noret_decl(f_2206)
static void C_ccall f_2206(C_word c,C_word *av) C_noret;
C_noret_decl(f_2209)
static void C_ccall f_2209(C_word c,C_word *av) C_noret;
C_noret_decl(f_2212)
static void C_ccall f_2212(C_word c,C_word *av) C_noret;
C_noret_decl(f_2220)
static void f_2220(C_word t0,C_word t1) C_noret;
C_noret_decl(f_2223)
static void C_ccall f_2223(C_word c,C_word *av) C_noret;
C_noret_decl(f_2226)
static void C_ccall f_2226(C_word c,C_word *av) C_noret;
C_noret_decl(f_2267)
static void C_ccall f_2267(C_word c,C_word *av) C_noret;
C_noret_decl(f_2287)
static void C_ccall f_2287(C_word c,C_word *av) C_noret;
C_noret_decl(f_2298)
static void C_ccall f_2298(C_word c,C_word *av) C_noret;
C_noret_decl(f_2303)
static void f_2303(C_word t0,C_word t1) C_noret;
C_noret_decl(f_2317)
static void C_ccall f_2317(C_word c,C_word *av) C_noret;
C_noret_decl(f_2319)
static void f_2319(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_2341)
static void C_ccall f_2341(C_word c,C_word *av) C_noret;
C_noret_decl(f_2360)
static void C_ccall f_2360(C_word c,C_word *av) C_noret;
C_noret_decl(f_2372)
static void C_ccall f_2372(C_word c,C_word *av) C_noret;
C_noret_decl(f_2390)
static void f_2390(C_word t0,C_word t1,C_word t2,C_word t3) C_noret;
C_noret_decl(f_2406)
static void C_ccall f_2406(C_word c,C_word *av) C_noret;
C_noret_decl(f_2413)
static void f_2413(C_word t0,C_word t1,C_word t2,C_word t3) C_noret;
C_noret_decl(f_2432)
static void C_ccall f_2432(C_word c,C_word *av) C_noret;
C_noret_decl(f_2437)
static void f_2437(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_2455)
static void C_ccall f_2455(C_word c,C_word *av) C_noret;
C_noret_decl(f_2462)
static void f_2462(C_word t0,C_word t1,C_word t2,C_word t3) C_noret;
C_noret_decl(f_2478)
static void C_ccall f_2478(C_word c,C_word *av) C_noret;
C_noret_decl(f_2507)
static void C_ccall f_2507(C_word c,C_word *av) C_noret;
C_noret_decl(f_2516)
static void C_ccall f_2516(C_word c,C_word *av) C_noret;
C_noret_decl(f_2526)
static void C_ccall f_2526(C_word c,C_word *av) C_noret;
C_noret_decl(f_2545)
static void C_ccall f_2545(C_word c,C_word *av) C_noret;
C_noret_decl(f_2558)
static void C_ccall f_2558(C_word c,C_word *av) C_noret;
C_noret_decl(f_2561)
static void C_ccall f_2561(C_word c,C_word *av) C_noret;
C_noret_decl(f_2577)
static void C_ccall f_2577(C_word c,C_word *av) C_noret;
C_noret_decl(f_2583)
static void C_ccall f_2583(C_word c,C_word *av) C_noret;
C_noret_decl(f_2590)
static void C_ccall f_2590(C_word c,C_word *av) C_noret;
C_noret_decl(f_2595)
static void C_ccall f_2595(C_word c,C_word *av) C_noret;
C_noret_decl(f_2601)
static void C_ccall f_2601(C_word c,C_word *av) C_noret;
C_noret_decl(f_2615)
static void C_ccall f_2615(C_word c,C_word *av) C_noret;
C_noret_decl(f_2618)
static C_word f_2618(C_word t0,C_word t1);
C_noret_decl(f_2644)
static C_word f_2644(C_word t0,C_word t1);
C_noret_decl(f_2656)
static C_word f_2656(C_word t0,C_word t1);
C_noret_decl(f_2665)
static C_word f_2665(C_word t0,C_word t1);
C_noret_decl(f_2694)
static void C_ccall f_2694(C_word c,C_word *av) C_noret;
C_noret_decl(f_2699)
static C_word f_2699(C_word t0,C_word t1);
C_noret_decl(f_2722)
static C_word f_2722(C_word t0,C_word t1);
C_noret_decl(f_930)
static void C_ccall f_930(C_word c,C_word *av) C_noret;
C_noret_decl(f_933)
static void C_ccall f_933(C_word c,C_word *av) C_noret;
C_noret_decl(f_935)
static void f_935(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_941)
static void f_941(C_word t0,C_word t1,C_word t2) C_noret;
C_noret_decl(f_968)
static void C_ccall f_968(C_word c,C_word *av) C_noret;
C_noret_decl(f_978)
static void C_ccall f_978(C_word c,C_word *av) C_noret;
C_noret_decl(C_scheduler_toplevel)
C_extern void C_ccall C_scheduler_toplevel(C_word c,C_word *av) C_noret;

C_noret_decl(trf_1014)
static void C_ccall trf_1014(C_word c,C_word *av) C_noret;
static void C_ccall trf_1014(C_word c,C_word *av){
C_word t0=av[1];
C_word t1=av[0];
f_1014(t0,t1);}

C_noret_decl(trf_1026)
static void C_ccall trf_1026(C_word c,C_word *av) C_noret;
static void C_ccall trf_1026(C_word c,C_word *av){
C_word t0=av[1];
C_word t1=av[0];
f_1026(t0,t1);}

C_noret_decl(trf_1030)
static void C_ccall trf_1030(C_word c,C_word *av) C_noret;
static void C_ccall trf_1030(C_word c,C_word *av){
C_word t0=av[1];
C_word t1=av[0];
f_1030(t0,t1);}

C_noret_decl(trf_1090)
static void C_ccall trf_1090(C_word c,C_word *av) C_noret;
static void C_ccall trf_1090(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1090(t0,t1,t2);}

C_noret_decl(trf_1139)
static void C_ccall trf_1139(C_word c,C_word *av) C_noret;
static void C_ccall trf_1139(C_word c,C_word *av){
C_word t0=av[1];
C_word t1=av[0];
f_1139(t0,t1);}

C_noret_decl(trf_1402)
static void C_ccall trf_1402(C_word c,C_word *av) C_noret;
static void C_ccall trf_1402(C_word c,C_word *av){
C_word t0=av[3];
C_word t1=av[2];
C_word t2=av[1];
C_word t3=av[0];
f_1402(t0,t1,t2,t3);}

C_noret_decl(trf_1531)
static void C_ccall trf_1531(C_word c,C_word *av) C_noret;
static void C_ccall trf_1531(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1531(t0,t1,t2);}

C_noret_decl(trf_1557)
static void C_ccall trf_1557(C_word c,C_word *av) C_noret;
static void C_ccall trf_1557(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1557(t0,t1,t2);}

C_noret_decl(trf_1590)
static void C_ccall trf_1590(C_word c,C_word *av) C_noret;
static void C_ccall trf_1590(C_word c,C_word *av){
C_word t0=av[1];
C_word t1=av[0];
f_1590(t0,t1);}

C_noret_decl(trf_1621)
static void C_ccall trf_1621(C_word c,C_word *av) C_noret;
static void C_ccall trf_1621(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1621(t0,t1,t2);}

C_noret_decl(trf_1640)
static void C_ccall trf_1640(C_word c,C_word *av) C_noret;
static void C_ccall trf_1640(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1640(t0,t1,t2);}

C_noret_decl(trf_1757)
static void C_ccall trf_1757(C_word c,C_word *av) C_noret;
static void C_ccall trf_1757(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1757(t0,t1,t2);}

C_noret_decl(trf_1768)
static void C_ccall trf_1768(C_word c,C_word *av) C_noret;
static void C_ccall trf_1768(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1768(t0,t1,t2);}

C_noret_decl(trf_1865)
static void C_ccall trf_1865(C_word c,C_word *av) C_noret;
static void C_ccall trf_1865(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1865(t0,t1,t2);}

C_noret_decl(trf_1988)
static void C_ccall trf_1988(C_word c,C_word *av) C_noret;
static void C_ccall trf_1988(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_1988(t0,t1,t2);}

C_noret_decl(trf_2071)
static void C_ccall trf_2071(C_word c,C_word *av) C_noret;
static void C_ccall trf_2071(C_word c,C_word *av){
C_word t0=av[4];
C_word t1=av[3];
C_word t2=av[2];
C_word t3=av[1];
C_word t4=av[0];
f_2071(t0,t1,t2,t3,t4);}

C_noret_decl(trf_2098)
static void C_ccall trf_2098(C_word c,C_word *av) C_noret;
static void C_ccall trf_2098(C_word c,C_word *av){
C_word t0=av[3];
C_word t1=av[2];
C_word t2=av[1];
C_word t3=av[0];
f_2098(t0,t1,t2,t3);}

C_noret_decl(trf_2220)
static void C_ccall trf_2220(C_word c,C_word *av) C_noret;
static void C_ccall trf_2220(C_word c,C_word *av){
C_word t0=av[1];
C_word t1=av[0];
f_2220(t0,t1);}

C_noret_decl(trf_2303)
static void C_ccall trf_2303(C_word c,C_word *av) C_noret;
static void C_ccall trf_2303(C_word c,C_word *av){
C_word t0=av[1];
C_word t1=av[0];
f_2303(t0,t1);}

C_noret_decl(trf_2319)
static void C_ccall trf_2319(C_word c,C_word *av) C_noret;
static void C_ccall trf_2319(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_2319(t0,t1,t2);}

C_noret_decl(trf_2390)
static void C_ccall trf_2390(C_word c,C_word *av) C_noret;
static void C_ccall trf_2390(C_word c,C_word *av){
C_word t0=av[3];
C_word t1=av[2];
C_word t2=av[1];
C_word t3=av[0];
f_2390(t0,t1,t2,t3);}

C_noret_decl(trf_2413)
static void C_ccall trf_2413(C_word c,C_word *av) C_noret;
static void C_ccall trf_2413(C_word c,C_word *av){
C_word t0=av[3];
C_word t1=av[2];
C_word t2=av[1];
C_word t3=av[0];
f_2413(t0,t1,t2,t3);}

C_noret_decl(trf_2437)
static void C_ccall trf_2437(C_word c,C_word *av) C_noret;
static void C_ccall trf_2437(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_2437(t0,t1,t2);}

C_noret_decl(trf_2462)
static void C_ccall trf_2462(C_word c,C_word *av) C_noret;
static void C_ccall trf_2462(C_word c,C_word *av){
C_word t0=av[3];
C_word t1=av[2];
C_word t2=av[1];
C_word t3=av[0];
f_2462(t0,t1,t2,t3);}

C_noret_decl(trf_935)
static void C_ccall trf_935(C_word c,C_word *av) C_noret;
static void C_ccall trf_935(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_935(t0,t1,t2);}

C_noret_decl(trf_941)
static void C_ccall trf_941(C_word c,C_word *av) C_noret;
static void C_ccall trf_941(C_word c,C_word *av){
C_word t0=av[2];
C_word t1=av[1];
C_word t2=av[0];
f_941(t0,t1,t2);}

/* k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1009(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(8,c,2)))){
C_save_and_reclaim((void *)f_1009,c,av);}
a=C_alloc(8);
t2=C_SCHEME_UNDEFINED;
t3=(*a=C_VECTOR_TYPE|1,a[1]=t2,tmp=(C_word)a,a+=2,tmp);
t4=C_set_block_item(t3,0,(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1014,a[2]=t3,a[3]=((C_word*)t0)[2],a[4]=((C_word*)t0)[3],a[5]=((C_word)li9),tmp=(C_word)a,a+=6,tmp));
t5=((C_word*)t3)[1];
f_1014(t5,((C_word*)t0)[4]);}

/* loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_1014(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(21,0,3)))){
C_save_and_reclaim_args((void *)trf_1014,2,t0,t1);}
a=C_alloc(21);
t2=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1018,a[2]=((C_word*)t0)[2],a[3]=t1,a[4]=((C_word*)t0)[3],a[5]=((C_word*)t0)[4],tmp=(C_word)a,a+=6,tmp);
if(C_truep(C_i_nullp(lf[5]))){
t3=t2;{
C_word av2[2];
av2[0]=t3;
av2[1]=C_SCHEME_UNDEFINED;
f_1018(2,av2);}}
else{
t3=C_a_i_current_process_milliseconds(&a,1,C_SCHEME_FALSE);
t4=C_SCHEME_UNDEFINED;
t5=(*a=C_VECTOR_TYPE|1,a[1]=t4,tmp=(C_word)a,a+=2,tmp);
t6=C_set_block_item(t5,0,(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1090,a[2]=t3,a[3]=t5,a[4]=((C_word*)t0)[3],a[5]=((C_word)li8),tmp=(C_word)a,a+=6,tmp));
t7=((C_word*)t5)[1];
f_1090(t7,t2,lf[5]);}}

/* k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1018(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(10,c,2)))){
C_save_and_reclaim((void *)f_1018,c,av);}
a=C_alloc(10);
t2=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1021,a[2]=((C_word*)t0)[2],a[3]=((C_word*)t0)[3],tmp=(C_word)a,a+=4,tmp);
if(C_truep(((C_word*)((C_word*)t0)[4])[1])){
t3=(
/* scheduler.scm:223: ##sys#update-thread-state-buffer */
  f_1258(((C_word*)t0)[5])
);
/* scheduler.scm:224: ##sys#force-primordial */
t4=*((C_word*)lf[19]+1);{
C_word *av2=av;
av2[0]=t4;
av2[1]=t2;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}
else{
if(C_truep(C_i_nullp(lf[6]))){
t3=C_SCHEME_UNDEFINED;
t4=t2;{
C_word *av2=av;
av2[0]=t4;
av2[1]=t3;
f_1021(2,av2);}}
else{
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2036,a[2]=t2,tmp=(C_word)a,a+=3,tmp);
t4=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1890,a[2]=t3,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:405: ##sys#length */
t5=*((C_word*)lf[40]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t5;
av2[1]=t4;
av2[2]=lf[6];
((C_proc)(void*)(*((C_word*)t5+1)))(3,av2);}}}}

/* k1019 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1021(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(7,c,2)))){
C_save_and_reclaim((void *)f_1021,c,av);}
a=C_alloc(7);
t2=C_SCHEME_UNDEFINED;
t3=(*a=C_VECTOR_TYPE|1,a[1]=t2,tmp=(C_word)a,a+=2,tmp);
t4=C_set_block_item(t3,0,(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1026,a[2]=((C_word*)t0)[2],a[3]=t3,a[4]=((C_word)li2),tmp=(C_word)a,a+=5,tmp));
t5=((C_word*)t3)[1];
f_1026(t5,((C_word*)t0)[3]);}

/* loop2 in k1019 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_1026(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,0,2)))){
C_save_and_reclaim_args((void *)trf_1026,2,t0,t1);}
a=C_alloc(5);
t2=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1030,a[2]=t1,a[3]=((C_word*)t0)[2],a[4]=((C_word*)t0)[3],tmp=(C_word)a,a+=5,tmp);
t3=lf[17];
t4=C_i_nullp(lf[17]);
if(C_truep(C_i_not(t4))){
t5=C_u_i_cdr(lf[17]);
t6=C_mutate(&lf[17] /* (set! ready-queue-head ...) */,t5);
t7=C_eqp(C_SCHEME_END_OF_LIST,t5);
if(C_truep(t7)){
t8=lf[18] /* ready-queue-tail */ =C_SCHEME_END_OF_LIST;;
t9=t2;
f_1030(t9,C_u_i_car(t3));}
else{
t8=t2;
f_1030(t8,C_u_i_car(t3));}}
else{
t5=t2;
f_1030(t5,C_SCHEME_FALSE);}}

/* k1028 in loop2 in k1019 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_1030(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word t13;
C_word t14;
C_word t15;
C_word t16;
C_word t17;
C_word t18;
C_word t19;
C_word t20;
C_word t21;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,0,2)))){
C_save_and_reclaim_args((void *)trf_1030,2,t0,t1);}
if(C_truep(C_i_not(t1))){
if(C_truep(C_i_nullp(lf[5]))){
if(C_truep(C_i_nullp(lf[6]))){
t2=((C_word*)t0)[2];{
C_word av2[2];
av2[0]=t2;
av2[1]=C_halt(lf[7]);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}
else{
/* scheduler.scm:233: loop1 */
t2=((C_word*)((C_word*)t0)[3])[1];
f_1014(t2,((C_word*)t0)[2]);}}
else{
/* scheduler.scm:233: loop1 */
t2=((C_word*)((C_word*)t0)[3])[1];
f_1014(t2,((C_word*)t0)[2]);}}
else{
t2=C_slot(t1,C_fix(3));
t3=C_eqp(t2,lf[8]);
if(C_truep(t3)){
t4=C_mutate((C_word*)lf[3]+1 /* (set! ##sys#current-thread ...) */,t1);
t5=C_i_setslot(t1,C_fix(3),lf[9]);
t6=C_slot(t1,C_fix(5));
t7=C_slot(t6,C_fix(0));
t8=C_mutate((C_word*)lf[10]+1 /* (set! ##sys#dynamic-winds ...) */,t7);
t9=C_slot(t6,C_fix(1));
t10=C_mutate((C_word*)lf[11]+1 /* (set! ##sys#standard-input ...) */,t9);
t11=C_slot(t6,C_fix(2));
t12=C_mutate((C_word*)lf[12]+1 /* (set! ##sys#standard-output ...) */,t11);
t13=C_slot(t6,C_fix(3));
t14=C_mutate((C_word*)lf[13]+1 /* (set! ##sys#standard-error ...) */,t13);
t15=C_slot(t6,C_fix(4));
t16=C_mutate((C_word*)lf[14]+1 /* (set! ##sys#current-exception-handler ...) */,t15);
t17=C_slot(t6,C_fix(5));
t18=C_mutate((C_word*)lf[15]+1 /* (set! ##sys#current-parameter-vector ...) */,t17);
t19=C_slot(t1,C_fix(9));
t20=C_set_initial_timer_interrupt_period(t19);
/* scheduler.scm:175: ##sys#call-with-cthulhu */
t21=*((C_word*)lf[16]+1);{
C_word av2[3];
av2[0]=t21;
av2[1]=((C_word*)t0)[2];
av2[2]=C_slot(t1,C_fix(1));
((C_proc)(void*)(*((C_word*)t21+1)))(3,av2);}}
else{
/* scheduler.scm:235: loop2 */
t4=((C_word*)((C_word*)t0)[4])[1];
f_1026(t4,((C_word*)t0)[2]);}}}

/* loop in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_1090(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(6,0,2)))){
C_save_and_reclaim_args((void *)trf_1090,3,t0,t1,t2);}
a=C_alloc(6);
if(C_truep(C_i_nullp(t2))){
t3=lf[5] /* timeout-list */ =C_SCHEME_END_OF_LIST;;
t4=t1;{
C_word av2[2];
av2[0]=t4;
av2[1]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}
else{
t3=C_u_i_caar(t2);
t4=C_u_i_car(t2);
t5=C_u_i_cdr(t4);
t6=C_slot(t5,C_fix(4));
if(C_truep(C_i_equalp(t3,t6))){
if(C_truep(C_i_greater_or_equalp(((C_word*)t0)[2],t3))){
t7=C_i_set_i_slot(t5,C_fix(13),C_SCHEME_TRUE);
t8=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1124,a[2]=((C_word*)t0)[3],a[3]=t1,a[4]=t2,a[5]=t5,tmp=(C_word)a,a+=6,tmp);
/* scheduler.scm:200: ##sys#clear-i/o-state-for-thread! */
f_2303(t8,t5);}
else{
t7=C_mutate(&lf[5] /* (set! timeout-list ...) */,t2);
t8=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1139,a[2]=((C_word*)t0)[4],a[3]=t1,a[4]=((C_word*)t0)[2],tmp=(C_word)a,a+=5,tmp);
if(C_truep(C_i_nullp(lf[17]))){
t9=C_i_nullp(lf[6]);
t10=t8;
f_1139(t10,(C_truep(t9)?C_i_pairp(lf[5]):C_SCHEME_FALSE));}
else{
t9=t8;
f_1139(t9,C_SCHEME_FALSE);}}}
else{
/* scheduler.scm:219: loop */
t11=t1;
t12=C_u_i_cdr(t2);
t1=t11;
t2=t12;
goto loop;}}}

/* k1122 in loop in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1124(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,c,2)))){
C_save_and_reclaim((void *)f_1124,c,av);}
a=C_alloc(5);
t2=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1127,a[2]=((C_word*)t0)[2],a[3]=((C_word*)t0)[3],a[4]=((C_word*)t0)[4],tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:201: ##sys#thread-basic-unblock! */
t3=*((C_word*)lf[20]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=((C_word*)t0)[5];
((C_proc)(void*)(*((C_word*)t3+1)))(3,av2);}}

/* k1125 in k1122 in loop in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1127(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1127,c,av);}
/* scheduler.scm:202: loop */
t2=((C_word*)((C_word*)t0)[2])[1];
f_1090(t2,((C_word*)t0)[3],C_u_i_cdr(((C_word*)t0)[4]));}

/* k1137 in loop in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_1139(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(6,0,2)))){
C_save_and_reclaim_args((void *)trf_1139,2,t0,t1);}
a=C_alloc(6);
if(C_truep(t1)){
t2=C_u_i_caar(lf[5]);
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1145,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
t4=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1165,a[2]=t3,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:212: scheme#round */
t5=*((C_word*)lf[37]+1);{
C_word av2[3];
av2[0]=t5;
av2[1]=t4;
av2[2]=t2;
((C_proc)(void*)(*((C_word*)t5+1)))(3,av2);}}
else{
t2=((C_word*)t0)[3];{
C_word av2[2];
av2[0]=t2;
av2[1]=C_SCHEME_UNDEFINED;
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}}

/* k1143 in k1137 in loop in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1145(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(33,c,3)))){
C_save_and_reclaim((void *)f_1145,c,av);}
a=C_alloc(33);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1157,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],tmp=(C_word)a,a+=4,tmp);
t4=C_s_a_i_minus(&a,2,t1,((C_word*)t2)[4]);
/* scheduler.scm:216: scheme#max */
t5=*((C_word*)lf[35]+1);{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t5;
av2[1]=t3;
av2[2]=C_fix(0);
av2[3]=t4;
((C_proc)(void*)(*((C_word*)t5+1)))(4,av2);}}

/* k1155 in k1143 in k1137 in loop in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1157(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1157,c,av);}
if(C_truep(C_i_not(C_msleep(t1)))){
t2=C_mk_bool(C_signal_interrupted_p);
t3=C_mutate(((C_word *)((C_word*)t0)[2])+1,t2);
t4=((C_word*)t0)[3];{
C_word *av2=av;
av2[0]=t4;
av2[1]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}
else{
t2=C_set_block_item(((C_word*)t0)[2],0,C_SCHEME_FALSE);
t3=((C_word*)t0)[3];{
C_word *av2=av;
av2[0]=t3;
av2[1]=t2;
((C_proc)(void*)(*((C_word*)t3+1)))(2,av2);}}}

/* k1163 in k1137 in loop in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1165(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1165,c,av);}
/* scheduler.scm:212: scheme#inexact->exact */
t2=*((C_word*)lf[36]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t2;
av2[1]=((C_word*)t0)[2];
av2[2]=t1;
((C_proc)(void*)(*((C_word*)t2+1)))(3,av2);}}

/* ##sys#force-primordial in k931 in k928 */
static void C_ccall f_1199(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1199,c,av);}
t2=C_i_set_i_slot(*((C_word*)lf[43]+1),C_fix(13),C_SCHEME_FALSE);
/* scheduler.scm:240: ##sys#thread-unblock! */
t3=*((C_word*)lf[44]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t3;
av2[1]=t1;
av2[2]=*((C_word*)lf[43]+1);
((C_proc)(void*)(*((C_word*)t3+1)))(3,av2);}}

/* ##sys#ready-queue in k931 in k928 */
static void C_ccall f_1210(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1210,c,av);}
t2=t1;{
C_word *av2=av;
av2[0]=t2;
av2[1]=lf[17];
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* ##sys#add-to-ready-queue in k931 in k928 */
static void C_ccall f_1213(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){
C_save_and_reclaim((void *)f_1213,c,av);}
a=C_alloc(3);
t3=C_i_setslot(t2,C_fix(3),lf[8]);
t4=C_a_i_cons(&a,2,t2,C_SCHEME_END_OF_LIST);
t5=C_eqp(C_SCHEME_END_OF_LIST,lf[17]);
if(C_truep(t5)){
t6=C_mutate(&lf[17] /* (set! ready-queue-head ...) */,t4);
t7=C_mutate(&lf[18] /* (set! ready-queue-tail ...) */,t4);
t8=t1;{
C_word *av2=av;
av2[0]=t8;
av2[1]=t7;
((C_proc)(void*)(*((C_word*)t8+1)))(2,av2);}}
else{
t6=C_i_setslot(lf[18],C_fix(1),t4);
t7=C_mutate(&lf[18] /* (set! ready-queue-tail ...) */,t4);
t8=t1;{
C_word *av2=av;
av2[0]=t8;
av2[1]=t7;
((C_proc)(void*)(*((C_word*)t8+1)))(2,av2);}}}

/* ##sys#update-thread-state-buffer in k931 in k928 */
static C_word f_1258(C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;{}
t2=C_slot(t1,C_fix(5));
t3=C_i_setslot(t2,C_fix(0),*((C_word*)lf[10]+1));
t4=C_i_setslot(t2,C_fix(1),*((C_word*)lf[11]+1));
t5=C_i_setslot(t2,C_fix(2),*((C_word*)lf[12]+1));
t6=C_i_setslot(t2,C_fix(3),*((C_word*)lf[13]+1));
t7=C_i_setslot(t2,C_fix(4),*((C_word*)lf[14]+1));
return(C_i_setslot(t2,C_fix(5),*((C_word*)lf[15]+1)));}

/* ##sys#interrupt-hook in k931 in k928 */
static void C_ccall f_1312(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3=av[3];
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(12,c,3)))){
C_save_and_reclaim((void *)f_1312,c,av);}
a=C_alloc(12);
t4=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1316,a[2]=((C_word*)t0)[2],a[3]=t1,a[4]=t2,a[5]=t3,tmp=(C_word)a,a+=6,tmp);
t5=C_eqp(t2,C_fix(255));
if(C_truep(t5)){
t6=*((C_word*)lf[3]+1);
t7=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1330,a[2]=((C_word*)t0)[2],a[3]=t2,a[4]=t3,a[5]=((C_word)li15),tmp=(C_word)a,a+=6,tmp);
t8=C_i_setslot(*((C_word*)lf[3]+1),C_fix(1),t7);
/* scheduler.scm:287: ##sys#schedule */
t9=*((C_word*)lf[2]+1);{
C_word *av2=av;
av2[0]=t9;
av2[1]=t4;
((C_proc)(void*)(*((C_word*)t9+1)))(2,av2);}}
else{
/* scheduler.scm:288: oldhook */
t6=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t6;
av2[1]=t1;
av2[2]=t2;
av2[3]=t3;
((C_proc)(void*)(*((C_word*)t6+1)))(4,av2);}}}

/* k1314 in ##sys#interrupt-hook in k931 in k928 */
static void C_ccall f_1316(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,3)))){
C_save_and_reclaim((void *)f_1316,c,av);}
/* scheduler.scm:288: oldhook */
t2=((C_word*)t0)[2];{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t2;
av2[1]=((C_word*)t0)[3];
av2[2]=((C_word*)t0)[4];
av2[3]=((C_word*)t0)[5];
((C_proc)(void*)(*((C_word*)t2+1)))(4,av2);}}

/* a1329 in ##sys#interrupt-hook in k931 in k928 */
static void C_ccall f_1330(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,3)))){
C_save_and_reclaim((void *)f_1330,c,av);}
/* scheduler.scm:286: oldhook */
t2=((C_word*)t0)[2];{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t2;
av2[1]=t1;
av2[2]=((C_word*)t0)[3];
av2[3]=((C_word*)t0)[4];
((C_proc)(void*)(*((C_word*)t2+1)))(4,av2);}}

/* ##sys#timeout-queue in k931 in k928 */
static void C_ccall f_1337(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1337,c,av);}
t2=t1;{
C_word *av2=av;
av2[0]=t2;
av2[1]=lf[5];
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* ##sys#remove-from-timeout-list in k931 in k928 */
static void C_ccall f_1340(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(4,c,3)))){
C_save_and_reclaim((void *)f_1340,c,av);}
a=C_alloc(4);
t3=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1346,a[2]=t2,a[3]=((C_word)li18),tmp=(C_word)a,a+=4,tmp);
t4=t1;{
C_word *av2=av;
av2[0]=t4;
av2[1]=(
  f_1346(t3,lf[5],C_SCHEME_FALSE)
);
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}

/* loop in ##sys#remove-from-timeout-list in k931 in k928 */
static C_word f_1346(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
loop:{}
if(C_truep(C_i_nullp(t1))){
return(t1);}
else{
t3=C_slot(t1,C_fix(0));
t4=C_slot(t1,C_fix(1));
t5=C_slot(t3,C_fix(1));
t6=C_eqp(t5,((C_word*)t0)[2]);
if(C_truep(t6)){
if(C_truep(t2)){
return(C_i_setslot(t2,C_fix(1),t4));}
else{
t7=C_mutate(&lf[5] /* (set! timeout-list ...) */,t4);
return(t7);}}
else{
t9=t4;
t10=t1;
t1=t9;
t2=t10;
goto loop;}}}

/* ##sys#thread-block-for-timeout! in k931 in k928 */
static void C_ccall f_1381(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3=av[3];
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(13,c,4)))){
C_save_and_reclaim((void *)f_1381,c,av);}
a=C_alloc(13);
if(C_truep(C_i_greaterp(t3,C_fix(0)))){
t4=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1391,a[2]=t2,a[3]=t1,a[4]=t3,tmp=(C_word)a,a+=5,tmp);
t5=C_SCHEME_UNDEFINED;
t6=(*a=C_VECTOR_TYPE|1,a[1]=t5,tmp=(C_word)a,a+=2,tmp);
t7=C_set_block_item(t6,0,(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1402,a[2]=t3,a[3]=t2,a[4]=t6,a[5]=((C_word)li20),tmp=(C_word)a,a+=6,tmp));
t8=((C_word*)t6)[1];
f_1402(t8,t4,lf[5],C_SCHEME_FALSE);}
else{
t4=C_SCHEME_UNDEFINED;
t5=t1;{
C_word *av2=av;
av2[0]=t5;
av2[1]=t4;
((C_proc)(void*)(*((C_word*)t5+1)))(2,av2);}}}

/* k1389 in ##sys#thread-block-for-timeout! in k931 in k928 */
static void C_ccall f_1391(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1391,c,av);}
t2=C_i_setslot(((C_word*)t0)[2],C_fix(3),lf[49]);
t3=C_i_set_i_slot(((C_word*)t0)[2],C_fix(13),C_SCHEME_FALSE);
t4=((C_word*)t0)[3];{
C_word *av2=av;
av2[0]=t4;
av2[1]=C_i_setslot(((C_word*)t0)[2],C_fix(4),((C_word*)t0)[4]);
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}

/* loop in ##sys#thread-block-for-timeout! in k931 in k928 */
static void f_1402(C_word t0,C_word t1,C_word t2,C_word t3){
C_word tmp;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(6,0,3)))){
C_save_and_reclaim_args((void *)trf_1402,4,t0,t1,t2,t3);}
a=C_alloc(6);
t4=C_i_nullp(t2);
t5=(C_truep(t4)?t4:C_i_lessp(((C_word*)t0)[2],C_u_i_caar(t2)));
if(C_truep(t5)){
if(C_truep(t3)){
t6=C_a_i_cons(&a,2,((C_word*)t0)[2],((C_word*)t0)[3]);
t7=C_a_i_cons(&a,2,t6,t2);
t8=t1;{
C_word av2[2];
av2[0]=t8;
av2[1]=C_i_setslot(t3,C_fix(1),t7);
((C_proc)(void*)(*((C_word*)t8+1)))(2,av2);}}
else{
t6=C_a_i_cons(&a,2,((C_word*)t0)[2],((C_word*)t0)[3]);
t7=C_a_i_cons(&a,2,t6,t2);
t8=C_mutate(&lf[5] /* (set! timeout-list ...) */,t7);
t9=t1;{
C_word av2[2];
av2[0]=t9;
av2[1]=t8;
((C_proc)(void*)(*((C_word*)t9+1)))(2,av2);}}}
else{
/* scheduler.scm:315: loop */
t10=t1;
t11=C_u_i_cdr(t2);
t12=t2;
t1=t10;
t2=t11;
t3=t12;
goto loop;}}

/* ##sys#thread-block-for-termination! in k931 in k928 */
static void C_ccall f_1450(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3=av[3];
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){
C_save_and_reclaim((void *)f_1450,c,av);}
a=C_alloc(3);
t4=C_slot(t3,C_fix(3));
t5=C_eqp(t4,lf[51]);
t6=(C_truep(t5)?t5:C_eqp(t4,lf[52]));
if(C_truep(t6)){
t7=C_SCHEME_UNDEFINED;
t8=t1;{
C_word *av2=av;
av2[0]=t8;
av2[1]=t7;
((C_proc)(void*)(*((C_word*)t8+1)))(2,av2);}}
else{
t7=C_slot(t3,C_fix(12));
t8=C_a_i_cons(&a,2,t2,t7);
t9=C_i_setslot(t3,C_fix(12),t8);
t10=C_i_setslot(t2,C_fix(3),lf[49]);
t11=C_i_set_i_slot(t2,C_fix(13),C_SCHEME_FALSE);
t12=t1;{
C_word *av2=av;
av2[0]=t12;
av2[1]=C_i_setslot(t2,C_fix(11),t3);
((C_proc)(void*)(*((C_word*)t12+1)))(2,av2);}}}

/* k1513 in for-each-loop304 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1515(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1515,c,av);}
t2=C_i_set_i_slot(((C_word*)t0)[2],C_fix(3),C_SCHEME_END_OF_LIST);
t3=((C_word*)((C_word*)t0)[3])[1];
f_1557(t3,((C_word*)t0)[4],C_slot(((C_word*)t0)[5],C_fix(1)));}

/* for-each-loop318 in for-each-loop304 in ##sys#thread-kill! in k931 in k928 */
static void f_1531(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,0,2)))){
C_save_and_reclaim_args((void *)trf_1531,3,t0,t1,t2);}
a=C_alloc(5);
if(C_truep(C_i_pairp(t2))){
t3=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1541,a[2]=((C_word*)t0)[2],a[3]=t1,a[4]=t2,tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:342: ##sys#thread-unblock! */
t4=*((C_word*)lf[44]+1);{
C_word av2[3];
av2[0]=t4;
av2[1]=t3;
av2[2]=C_slot(t2,C_fix(0));
((C_proc)(void*)(*((C_word*)t4+1)))(3,av2);}}
else{
t3=C_SCHEME_UNDEFINED;
t4=t1;{
C_word av2[2];
av2[0]=t4;
av2[1]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}}

/* k1539 in for-each-loop318 in for-each-loop304 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1541(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1541,c,av);}
t2=((C_word*)((C_word*)t0)[2])[1];
f_1531(t2,((C_word*)t0)[3],C_slot(((C_word*)t0)[4],C_fix(1)));}

/* for-each-loop304 in ##sys#thread-kill! in k931 in k928 */
static void f_1557(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word t13;
C_word t14;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(12,0,3)))){
C_save_and_reclaim_args((void *)trf_1557,3,t0,t1,t2);}
a=C_alloc(12);
if(C_truep(C_i_pairp(t2))){
t3=C_slot(t2,C_fix(0));
t4=C_i_set_i_slot(t3,C_fix(2),C_SCHEME_FALSE);
t5=C_i_set_i_slot(t3,C_fix(4),C_SCHEME_TRUE);
t6=C_i_set_i_slot(t3,C_fix(5),C_SCHEME_FALSE);
t7=C_slot(t3,C_fix(3));
t8=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1515,a[2]=t3,a[3]=((C_word*)t0)[2],a[4]=t1,a[5]=t2,tmp=(C_word)a,a+=6,tmp);
if(C_truep(C_i_nullp(t7))){
t9=C_i_set_i_slot(t3,C_fix(3),C_SCHEME_END_OF_LIST);
t13=t1;
t14=C_slot(t2,C_fix(1));
t1=t13;
t2=t14;
goto loop;}
else{
t9=C_SCHEME_UNDEFINED;
t10=(*a=C_VECTOR_TYPE|1,a[1]=t9,tmp=(C_word)a,a+=2,tmp);
t11=C_set_block_item(t10,0,(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1531,a[2]=t10,a[3]=((C_word)li25),tmp=(C_word)a,a+=4,tmp));
t12=((C_word*)t10)[1];
f_1531(t12,t8,t7);}}
else{
t3=C_SCHEME_UNDEFINED;
t4=t1;{
C_word av2[2];
av2[0]=t4;
av2[1]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}}

/* ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1580(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3=av[3];
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(11,c,3)))){
C_save_and_reclaim((void *)f_1580,c,av);}
a=C_alloc(11);
t4=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1584,a[2]=t2,a[3]=t3,a[4]=t1,tmp=(C_word)a,a+=5,tmp);
t5=C_slot(t2,C_fix(8));
if(C_truep(C_i_nullp(t5))){
t6=C_SCHEME_UNDEFINED;
t7=t4;{
C_word *av2=av;
av2[0]=t7;
av2[1]=t6;
f_1584(2,av2);}}
else{
t6=C_SCHEME_UNDEFINED;
t7=(*a=C_VECTOR_TYPE|1,a[1]=t6,tmp=(C_word)a,a+=2,tmp);
t8=C_set_block_item(t7,0,(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1557,a[2]=t7,a[3]=((C_word)li26),tmp=(C_word)a,a+=4,tmp));
t9=((C_word*)t7)[1];
f_1557(t9,t4,t5);}}

/* k1582 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1584(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(7,c,3)))){
C_save_and_reclaim((void *)f_1584,c,av);}
a=C_alloc(7);
t2=C_slot(((C_word*)t0)[2],C_fix(11));
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1590,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
if(C_truep(C_i_structurep(t2,lf[54]))){
t4=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1671,a[2]=t3,a[3]=t2,tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:353: delq */
f_935(t4,((C_word*)t0)[2],C_slot(t2,C_fix(2)));}
else{
if(C_truep(C_i_structurep(t2,lf[55]))){
t4=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1688,a[2]=t3,a[3]=t2,tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:355: delq */
f_935(t4,((C_word*)t0)[2],C_slot(t2,C_fix(12)));}
else{
t4=C_SCHEME_UNDEFINED;
t5=t3;
f_1590(t5,t4);}}}

/* k1588 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void f_1590(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,0,2)))){
C_save_and_reclaim_args((void *)trf_1590,2,t0,t1);}
a=C_alloc(3);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1593,a[2]=t2,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:356: ##sys#remove-from-timeout-list */
t4=*((C_word*)lf[21]+1);{
C_word av2[3];
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[2];
((C_proc)(void*)(*((C_word*)t4+1)))(3,av2);}}

/* k1591 in k1588 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1593(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,2)))){
C_save_and_reclaim((void *)f_1593,c,av);}
a=C_alloc(3);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1596,a[2]=t2,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:357: ##sys#clear-i/o-state-for-thread! */
f_2303(t3,((C_word*)t2)[2]);}

/* k1594 in k1591 in k1588 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1596(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word t13;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(15,c,3)))){
C_save_and_reclaim((void *)f_1596,c,av);}
a=C_alloc(15);
t2=((C_word*)t0)[2];
t3=C_i_setslot(((C_word*)t2)[2],C_fix(3),((C_word*)t2)[3]);
t4=C_i_set_i_slot(((C_word*)t2)[2],C_fix(4),C_SCHEME_FALSE);
t5=C_i_set_i_slot(((C_word*)t2)[2],C_fix(11),C_SCHEME_FALSE);
t6=C_i_set_i_slot(((C_word*)t2)[2],C_fix(8),C_SCHEME_END_OF_LIST);
t7=C_slot(((C_word*)t2)[2],C_fix(12));
t8=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1614,a[2]=((C_word*)t2)[4],a[3]=((C_word*)t2)[2],tmp=(C_word)a,a+=4,tmp);
if(C_truep(C_i_nullp(t7))){
t9=((C_word*)t2)[4];{
C_word *av2=av;
av2[0]=t9;
av2[1]=C_i_set_i_slot(((C_word*)t2)[2],C_fix(12),C_SCHEME_END_OF_LIST);
((C_proc)(void*)(*((C_word*)t9+1)))(2,av2);}}
else{
t9=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1621,a[2]=((C_word*)t2)[2],a[3]=((C_word)li23),tmp=(C_word)a,a+=4,tmp);
t10=C_SCHEME_UNDEFINED;
t11=(*a=C_VECTOR_TYPE|1,a[1]=t10,tmp=(C_word)a,a+=2,tmp);
t12=C_set_block_item(t11,0,(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1640,a[2]=t11,a[3]=t9,a[4]=((C_word)li24),tmp=(C_word)a,a+=5,tmp));
t13=((C_word*)t11)[1];
f_1640(t13,t8,t7);}}

/* k1612 in k1594 in k1591 in k1588 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1614(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1614,c,av);}
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=C_i_set_i_slot(((C_word*)t0)[3],C_fix(12),C_SCHEME_END_OF_LIST);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* g353 in k1594 in k1591 in k1588 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void f_1621(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,0,2)))){
C_save_and_reclaim_args((void *)trf_1621,3,t0,t1,t2);}
t3=C_slot(t2,C_fix(11));
t4=C_eqp(t3,((C_word*)t0)[2]);
if(C_truep(t4)){
/* scheduler.scm:368: ##sys#thread-basic-unblock! */
t5=*((C_word*)lf[20]+1);{
C_word av2[3];
av2[0]=t5;
av2[1]=t1;
av2[2]=t2;
((C_proc)(void*)(*((C_word*)t5+1)))(3,av2);}}
else{
t5=C_SCHEME_UNDEFINED;
t6=t1;{
C_word av2[2];
av2[0]=t6;
av2[1]=t5;
((C_proc)(void*)(*((C_word*)t6+1)))(2,av2);}}}

/* for-each-loop352 in k1594 in k1591 in k1588 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void f_1640(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,0,2)))){
C_save_and_reclaim_args((void *)trf_1640,3,t0,t1,t2);}
a=C_alloc(5);
if(C_truep(C_i_pairp(t2))){
t3=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1650,a[2]=((C_word*)t0)[2],a[3]=t1,a[4]=t2,tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:364: g353 */
t4=((C_word*)t0)[3];
f_1621(t4,t3,C_slot(t2,C_fix(0)));}
else{
t3=C_SCHEME_UNDEFINED;
t4=t1;{
C_word av2[2];
av2[0]=t4;
av2[1]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}}

/* k1648 in for-each-loop352 in k1594 in k1591 in k1588 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1650(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1650,c,av);}
t2=((C_word*)((C_word*)t0)[2])[1];
f_1640(t2,((C_word*)t0)[3],C_slot(((C_word*)t0)[4],C_fix(1)));}

/* k1669 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1671(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1671,c,av);}
t2=((C_word*)t0)[2];
f_1590(t2,C_i_setslot(((C_word*)t0)[3],C_fix(2),t1));}

/* k1686 in k1582 in ##sys#thread-kill! in k931 in k928 */
static void C_ccall f_1688(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1688,c,av);}
t2=((C_word*)t0)[2];
f_1590(t2,C_i_setslot(((C_word*)t0)[3],C_fix(12),t1));}

/* ##sys#thread-basic-unblock! in k931 in k928 */
static void C_ccall f_1694(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1694,c,av);}
t3=C_i_set_i_slot(t2,C_fix(11),C_SCHEME_FALSE);
t4=C_i_set_i_slot(t2,C_fix(4),C_SCHEME_FALSE);
/* scheduler.scm:376: ##sys#add-to-ready-queue */
t5=*((C_word*)lf[42]+1);{
C_word *av2=av;
av2[0]=t5;
av2[1]=t1;
av2[2]=t2;
((C_proc)(void*)(*((C_word*)t5+1)))(3,av2);}}

/* ##sys#default-exception-handler in k931 in k928 */
static void C_ccall f_1706(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(10,c,4)))){
C_save_and_reclaim((void *)f_1706,c,av);}
a=C_alloc(10);
t3=*((C_word*)lf[3]+1);
t4=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1710,a[2]=t3,a[3]=t2,a[4]=t1,tmp=(C_word)a,a+=5,tmp);
if(C_truep(C_mk_bool(C_abort_on_thread_exceptions))){
t5=*((C_word*)lf[43]+1);
t6=C_slot(*((C_word*)lf[43]+1),C_fix(1));
t7=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1730,a[2]=t6,a[3]=t2,a[4]=((C_word)li29),tmp=(C_word)a,a+=5,tmp);
t8=C_i_setslot(*((C_word*)lf[43]+1),C_fix(1),t7);
/* scheduler.scm:390: ##sys#thread-unblock! */
t9=*((C_word*)lf[44]+1);{
C_word *av2=av;
av2[0]=t9;
av2[1]=t4;
av2[2]=*((C_word*)lf[43]+1);
((C_proc)(void*)(*((C_word*)t9+1)))(3,av2);}}
else{
/* scheduler.scm:392: ##sys#show-exception-warning */
t5=*((C_word*)lf[58]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t5;
av2[1]=t4;
av2[2]=t2;
av2[3]=lf[59];
av2[4]=t3;
((C_proc)(void*)(*((C_word*)t5+1)))(5,av2);}}}

/* k1708 in ##sys#default-exception-handler in k931 in k928 */
static void C_ccall f_1710(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,3)))){
C_save_and_reclaim((void *)f_1710,c,av);}
a=C_alloc(3);
t2=C_i_setslot(((C_word*)t0)[2],C_fix(7),((C_word*)t0)[3]);
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1716,a[2]=((C_word*)t0)[4],tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:394: ##sys#thread-kill! */
t4=*((C_word*)lf[53]+1);{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t0)[2];
av2[3]=lf[52];
((C_proc)(void*)(*((C_word*)t4+1)))(4,av2);}}

/* k1714 in k1708 in ##sys#default-exception-handler in k931 in k928 */
static void C_ccall f_1716(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1716,c,av);}
/* scheduler.scm:395: ##sys#schedule */
t2=*((C_word*)lf[2]+1);{
C_word *av2=av;
av2[0]=t2;
av2[1]=((C_word*)t0)[2];
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* a1729 in ##sys#default-exception-handler in k931 in k928 */
static void C_ccall f_1730(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(4,c,2)))){
C_save_and_reclaim((void *)f_1730,c,av);}
a=C_alloc(4);
t2=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1734,a[2]=((C_word*)t0)[2],a[3]=t1,tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:388: chicken.condition#signal */
t3=*((C_word*)lf[57]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(3,av2);}}

/* k1732 in a1729 in ##sys#default-exception-handler in k931 in k928 */
static void C_ccall f_1734(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1734,c,av);}
/* scheduler.scm:389: ptx */
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* ##sys#fd-queue in k931 in k928 */
static void C_ccall f_1743(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1743,c,av);}
t2=t1;{
C_word *av2=av;
av2[0]=t2;
av2[1]=lf[6];
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_1757(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word t13;
C_word t14;
C_word t15;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(25,0,3)))){
C_save_and_reclaim_args((void *)trf_1757,3,t0,t1,t2);}
a=C_alloc(25);
if(C_truep(C_i_nullp(t2))){
t3=C_SCHEME_UNDEFINED;
t4=t1;{
C_word av2[2];
av2[0]=t4;
av2[1]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}
else{
t3=C_u_i_caar(t2);
t4=C_SCHEME_FALSE;
t5=(*a=C_VECTOR_TYPE|1,a[1]=t4,tmp=(C_word)a,a+=2,tmp);
t6=C_SCHEME_FALSE;
t7=(*a=C_VECTOR_TYPE|1,a[1]=t6,tmp=(C_word)a,a+=2,tmp);
t8=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1768,a[2]=t5,a[3]=t7,a[4]=t3,a[5]=((C_word)li5),tmp=(C_word)a,a+=6,tmp);
t9=C_u_i_car(t2);
t10=C_u_i_cdr(t9);
t11=(*a=C_CLOSURE_TYPE|7,a[1]=(C_word)f_1853,a[2]=t5,a[3]=t7,a[4]=t3,a[5]=((C_word*)t0)[2],a[6]=t1,a[7]=t2,tmp=(C_word)a,a+=8,tmp);
t12=C_SCHEME_UNDEFINED;
t13=(*a=C_VECTOR_TYPE|1,a[1]=t12,tmp=(C_word)a,a+=2,tmp);
t14=C_set_block_item(t13,0,(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1865,a[2]=t13,a[3]=t8,a[4]=((C_word)li6),tmp=(C_word)a,a+=5,tmp));
t15=((C_word*)t13)[1];
f_1865(t15,t11,t10);}}

/* g412 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_1768(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(6,0,2)))){
C_save_and_reclaim_args((void *)trf_1768,3,t0,t1,t2);}
a=C_alloc(6);
t3=C_slot(t2,C_fix(11));
if(C_truep(C_i_pairp(t3))){
t4=C_u_i_cdr(t3);
t5=C_eqp(t4,C_SCHEME_TRUE);
t6=(C_truep(t5)?t5:C_eqp(t4,lf[29]));
if(C_truep(t6)){
t7=C_set_block_item(((C_word*)t0)[2],0,C_SCHEME_TRUE);
t8=t1;{
C_word av2[2];
av2[0]=t8;
av2[1]=t7;
((C_proc)(void*)(*((C_word*)t8+1)))(2,av2);}}
else{
t7=C_eqp(t4,C_SCHEME_FALSE);
t8=(C_truep(t7)?t7:C_eqp(t4,lf[30]));
if(C_truep(t8)){
t9=C_set_block_item(((C_word*)t0)[3],0,C_SCHEME_TRUE);
t10=t1;{
C_word av2[2];
av2[0]=t10;
av2[1]=t9;
((C_proc)(void*)(*((C_word*)t10+1)))(2,av2);}}
else{
t9=C_eqp(t4,lf[31]);
if(C_truep(t9)){
t10=C_set_block_item(((C_word*)t0)[2],0,C_SCHEME_TRUE);
t11=C_set_block_item(((C_word*)t0)[3],0,C_SCHEME_TRUE);
t12=t1;{
C_word av2[2];
av2[0]=t12;
av2[1]=t11;
((C_proc)(void*)(*((C_word*)t12+1)))(2,av2);}}
else{
t10=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1811,a[2]=t1,a[3]=C_SCHEME_UNDEFINED,a[4]=((C_word*)t0)[4],a[5]=t4,tmp=(C_word)a,a+=6,tmp);
/* scheduler.scm:428: scheme#open-output-string */
t11=*((C_word*)lf[28]+1);{
C_word av2[2];
av2[0]=t11;
av2[1]=t10;
((C_proc)(void*)(*((C_word*)t11+1)))(2,av2);}}}}}
else{
t4=C_SCHEME_UNDEFINED;
t5=t1;{
C_word av2[2];
av2[0]=t5;
av2[1]=t4;
((C_proc)(void*)(*((C_word*)t5+1)))(2,av2);}}}

/* k1809 in g412 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1811(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,4)))){
C_save_and_reclaim((void *)f_1811,c,av);}
a=C_alloc(3);
t2=C_mutate(((C_word *)t0)+3,t1);
t3=C_i_check_port_2(((C_word*)t0)[3],C_fix(2),C_SCHEME_TRUE,lf[22]);
t4=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1817,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:428: ##sys#print */
t5=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t5;
av2[1]=t4;
av2[2]=lf[39];
av2[3]=C_SCHEME_FALSE;
av2[4]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t5+1)))(5,av2);}}

/* k1815 in k1809 in g412 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1817(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,c,4)))){
C_save_and_reclaim((void *)f_1817,c,av);}
a=C_alloc(5);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1820,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],a[4]=((C_word*)t2)[4],tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:428: ##sys#print */
t4=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[5];
av2[3]=C_SCHEME_TRUE;
av2[4]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(5,av2);}}

/* k1818 in k1815 in k1809 in g412 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1820(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,4)))){
C_save_and_reclaim((void *)f_1820,c,av);}
a=C_alloc(3);
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1823,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:428: ##sys#print */
t3=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=lf[38];
av2[3]=C_SCHEME_FALSE;
av2[4]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(5,av2);}}

/* k1821 in k1818 in k1815 in k1809 in g412 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1823(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(4,c,4)))){
C_save_and_reclaim((void *)f_1823,c,av);}
a=C_alloc(4);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1826,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:428: ##sys#print */
t4=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[4];
av2[3]=C_SCHEME_TRUE;
av2[4]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(5,av2);}}

/* k1824 in k1821 in k1818 in k1815 in k1809 in g412 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1826(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,3)))){
C_save_and_reclaim((void *)f_1826,c,av);}
a=C_alloc(3);
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1829,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:428: ##sys#write-char-0 */
t3=*((C_word*)lf[24]+1);{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=C_make_character(41);
av2[3]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(4,av2);}}

/* k1827 in k1824 in k1821 in k1818 in k1815 in k1809 in g412 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1829(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,2)))){
C_save_and_reclaim((void *)f_1829,c,av);}
a=C_alloc(3);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1832,a[2]=((C_word*)t2)[2],tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:428: scheme#get-output-string */
t4=*((C_word*)lf[23]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(3,av2);}}

/* k1830 in k1827 in k1824 in k1821 in k1818 in k1815 in k1809 in g412 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1832(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1832,c,av);}
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=C_halt(t1);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* k1851 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1853(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1853,c,av);}
t2=((C_word*)((C_word*)t0)[2])[1];
t3=((C_word*)((C_word*)t0)[3])[1];
t4=stub460(C_SCHEME_UNDEFINED,((C_word*)t0)[4],t2,t3);
/* scheduler.scm:433: loop */
t5=((C_word*)((C_word*)t0)[5])[1];
f_1757(t5,((C_word*)t0)[6],C_u_i_cdr(((C_word*)t0)[7]));}

/* for-each-loop411 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_1865(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,0,2)))){
C_save_and_reclaim_args((void *)trf_1865,3,t0,t1,t2);}
a=C_alloc(5);
if(C_truep(C_i_pairp(t2))){
t3=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1875,a[2]=((C_word*)t0)[2],a[3]=t1,a[4]=t2,tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:411: g412 */
t4=((C_word*)t0)[3];
f_1768(t4,t3,C_slot(t2,C_fix(0)));}
else{
t3=C_SCHEME_UNDEFINED;
t4=t1;{
C_word av2[2];
av2[0]=t4;
av2[1]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}}

/* k1873 in for-each-loop411 in loop in k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1875(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_1875,c,av);}
t2=((C_word*)((C_word*)t0)[2])[1];
f_1865(t2,((C_word*)t0)[3],C_slot(((C_word*)t0)[4],C_fix(1)));}

/* k1888 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1890(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(6,c,3)))){
C_save_and_reclaim((void *)f_1890,c,av);}
a=C_alloc(6);
t2=stub401(C_SCHEME_UNDEFINED,t1);
t3=C_SCHEME_UNDEFINED;
t4=(*a=C_VECTOR_TYPE|1,a[1]=t3,tmp=(C_word)a,a+=2,tmp);
t5=C_set_block_item(t4,0,(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1757,a[2]=t4,a[3]=((C_word)li7),tmp=(C_word)a,a+=4,tmp));
t6=((C_word*)t4)[1];
f_1757(t6,((C_word*)t0)[2],lf[6]);}

/* k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1924(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,4)))){
C_save_and_reclaim((void *)f_1924,c,av);}
a=C_alloc(3);
t2=C_mutate(((C_word *)t0)+3,t1);
t3=C_i_check_port_2(((C_word*)t0)[3],C_fix(2),C_SCHEME_TRUE,lf[22]);
t4=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1930,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:441: ##sys#print */
t5=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t5;
av2[1]=t4;
av2[2]=lf[34];
av2[3]=C_SCHEME_FALSE;
av2[4]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t5+1)))(5,av2);}}

/* k1928 in k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1930(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(6,c,4)))){
C_save_and_reclaim((void *)f_1930,c,av);}
a=C_alloc(6);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1933,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],a[4]=((C_word*)t2)[4],a[5]=((C_word*)t2)[5],tmp=(C_word)a,a+=6,tmp);
/* scheduler.scm:441: ##sys#print */
t4=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[6];
av2[3]=C_SCHEME_TRUE;
av2[4]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(5,av2);}}

/* k1931 in k1928 in k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1933(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,4)))){
C_save_and_reclaim((void *)f_1933,c,av);}
a=C_alloc(3);
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1936,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:441: ##sys#print */
t3=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=lf[33];
av2[3]=C_SCHEME_FALSE;
av2[4]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(5,av2);}}

/* k1934 in k1931 in k1928 in k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1936(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,c,4)))){
C_save_and_reclaim((void *)f_1936,c,av);}
a=C_alloc(5);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1939,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],a[4]=((C_word*)t2)[4],tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:441: ##sys#print */
t4=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[5];
av2[3]=C_SCHEME_TRUE;
av2[4]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(5,av2);}}

/* k1937 in k1934 in k1931 in k1928 in k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1939(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,4)))){
C_save_and_reclaim((void *)f_1939,c,av);}
a=C_alloc(3);
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1942,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:441: ##sys#print */
t3=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=lf[32];
av2[3]=C_SCHEME_FALSE;
av2[4]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(5,av2);}}

/* k1940 in k1937 in k1934 in k1931 in k1928 in k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1942(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(4,c,4)))){
C_save_and_reclaim((void *)f_1942,c,av);}
a=C_alloc(4);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1945,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:441: ##sys#print */
t4=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[4];
av2[3]=C_SCHEME_TRUE;
av2[4]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(5,av2);}}

/* k1943 in k1940 in k1937 in k1934 in k1931 in k1928 in k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1945(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,3)))){
C_save_and_reclaim((void *)f_1945,c,av);}
a=C_alloc(3);
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1948,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:441: ##sys#write-char-0 */
t3=*((C_word*)lf[24]+1);{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=C_make_character(41);
av2[3]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(4,av2);}}

/* k1946 in k1943 in k1940 in k1937 in k1934 in k1931 in k1928 in k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1948(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,2)))){
C_save_and_reclaim((void *)f_1948,c,av);}
a=C_alloc(3);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1951,a[2]=((C_word*)t2)[2],tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:441: scheme#get-output-string */
t4=*((C_word*)lf[23]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(3,av2);}}

/* k1949 in k1946 in k1943 in k1940 in k1937 in k1934 in k1931 in k1928 in k1922 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_1951(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_1951,c,av);}
t2=((C_word*)t0)[2];
f_2220(t2,C_halt(t1));}

/* ##sys#thread-block-for-i/o! in k931 in k928 */
static void C_ccall f_1969(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3=av[3];
C_word t4=av[4];
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(14,c,3)))){
C_save_and_reclaim((void *)f_1969,c,av);}
a=C_alloc(14);
t5=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1973,a[2]=t2,a[3]=t3,a[4]=t4,a[5]=t1,tmp=(C_word)a,a+=6,tmp);
t6=C_SCHEME_UNDEFINED;
t7=(*a=C_VECTOR_TYPE|1,a[1]=t6,tmp=(C_word)a,a+=2,tmp);
t8=C_set_block_item(t7,0,(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_1988,a[2]=t3,a[3]=t2,a[4]=t7,a[5]=((C_word)li32),tmp=(C_word)a,a+=6,tmp));
t9=((C_word*)t7)[1];
f_1988(t9,t5,lf[6]);}

/* k1971 in ##sys#thread-block-for-i/o! in k931 in k928 */
static void C_ccall f_1973(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){
C_save_and_reclaim((void *)f_1973,c,av);}
a=C_alloc(3);
t2=C_i_setslot(((C_word*)t0)[2],C_fix(3),lf[49]);
t3=C_i_set_i_slot(((C_word*)t0)[2],C_fix(13),C_SCHEME_FALSE);
t4=C_a_i_cons(&a,2,((C_word*)t0)[3],((C_word*)t0)[4]);
t5=((C_word*)t0)[5];{
C_word *av2=av;
av2[0]=t5;
av2[1]=C_i_setslot(((C_word*)t0)[2],C_fix(11),t4);
((C_proc)(void*)(*((C_word*)t5+1)))(2,av2);}}

/* loop in ##sys#thread-block-for-i/o! in k931 in k928 */
static void f_1988(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(9,0,2)))){
C_save_and_reclaim_args((void *)trf_1988,3,t0,t1,t2);}
a=C_alloc(9);
if(C_truep(C_i_nullp(t2))){
t3=C_a_i_list2(&a,2,((C_word*)t0)[2],((C_word*)t0)[3]);
t4=C_a_i_cons(&a,2,t3,lf[6]);
t5=C_mutate(&lf[6] /* (set! fd-list ...) */,t4);
t6=t1;{
C_word av2[2];
av2[0]=t6;
av2[1]=t5;
((C_proc)(void*)(*((C_word*)t6+1)))(2,av2);}}
else{
t3=C_u_i_car(t2);
t4=C_u_i_car(t3);
t5=C_eqp(((C_word*)t0)[2],t4);
if(C_truep(t5)){
t6=C_u_i_cdr(t3);
t7=C_a_i_cons(&a,2,((C_word*)t0)[3],t6);
t8=t1;{
C_word av2[2];
av2[0]=t8;
av2[1]=C_i_setslot(t3,C_fix(1),t7);
((C_proc)(void*)(*((C_word*)t8+1)))(2,av2);}}
else{
/* scheduler.scm:454: loop */
t9=t1;
t10=C_u_i_cdr(t2);
t1=t9;
t2=t10;
goto loop;}}}

/* k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2036(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(11,c,2)))){
C_save_and_reclaim((void *)f_2036,c,av);}
a=C_alloc(11);
t2=C_i_pairp(lf[5]);
t3=C_i_pairp(lf[17]);
t4=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2045,a[2]=t3,a[3]=t2,a[4]=((C_word*)t0)[2],tmp=(C_word)a,a+=5,tmp);
t5=(C_truep(t2)?C_i_not(t3):C_SCHEME_FALSE);
if(C_truep(t5)){
t6=C_u_i_caar(lf[5]);
t7=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2287,a[2]=t4,tmp=(C_word)a,a+=3,tmp);
t8=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2298,a[2]=t7,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:466: scheme#round */
t9=*((C_word*)lf[37]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t9;
av2[1]=t8;
av2[2]=t6;
((C_proc)(void*)(*((C_word*)t9+1)))(3,av2);}}
else{
t6=t4;{
C_word *av2=av;
av2[0]=t6;
av2[1]=C_fix(0);
f_2045(2,av2);}}}

/* k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2045(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(9,c,5)))){
C_save_and_reclaim((void *)f_2045,c,av);}
a=C_alloc(9);
t2=(C_truep(((C_word*)t0)[2])?stub528(C_SCHEME_UNDEFINED,((C_word*)t0)[2],t1):stub528(C_SCHEME_UNDEFINED,((C_word*)t0)[3],t1));
t3=C_eqp(C_fix(-1),t2);
if(C_truep(t3)){
/* scheduler.scm:476: ##sys#force-primordial */
t4=*((C_word*)lf[19]+1);{
C_word *av2=av;
av2[0]=t4;
av2[1]=((C_word*)t0)[4];
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}
else{
if(C_truep(C_fixnum_greaterp(t2,C_fix(0)))){
t4=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2069,a[2]=((C_word*)t0)[4],tmp=(C_word)a,a+=3,tmp);
t5=C_SCHEME_UNDEFINED;
t6=(*a=C_VECTOR_TYPE|1,a[1]=t5,tmp=(C_word)a,a+=2,tmp);
t7=C_set_block_item(t6,0,(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2071,a[2]=t6,a[3]=((C_word)li4),tmp=(C_word)a,a+=4,tmp));
t8=((C_word*)t6)[1];
f_2071(t8,t4,t2,C_fix(0),lf[6]);}
else{
t4=((C_word*)t0)[4];{
C_word *av2=av;
av2[0]=t4;
av2[1]=C_SCHEME_UNDEFINED;
f_1021(2,av2);}}}}

/* k2067 in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2069(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_2069,c,av);}
t2=C_mutate(&lf[6] /* (set! fd-list ...) */,t1);
t3=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t3;
av2[1]=t2;
f_1021(2,av2);}}

/* loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_2071(C_word t0,C_word t1,C_word t2,C_word t3,C_word t4){
C_word tmp;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word t13;
C_word t14;
C_word t15;
C_word t16;
C_word t17;
C_word t18;
C_word t19;
C_word t20;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(33,0,4)))){
C_save_and_reclaim_args((void *)trf_2071,5,t0,t1,t2,t3,t4);}
a=C_alloc(33);
t5=C_i_zerop(t2);
t6=(C_truep(t5)?t5:C_i_nullp(t4));
if(C_truep(t6)){
t7=t1;{
C_word av2[2];
av2[0]=t7;
av2[1]=t4;
((C_proc)(void*)(*((C_word*)t7+1)))(2,av2);}}
else{
t7=C_u_i_car(t4);
t8=C_u_i_car(t7);
t9=C_fd_input_ready(t8,t3);
t10=C_fd_output_ready(t8,t3);
t11=(C_truep(t9)?t9:t10);
if(C_truep(t11)){
t12=C_u_i_cdr(t7);
t13=C_SCHEME_UNDEFINED;
t14=(*a=C_VECTOR_TYPE|1,a[1]=t13,tmp=(C_word)a,a+=2,tmp);
t15=C_set_block_item(t14,0,(*a=C_CLOSURE_TYPE|10,a[1]=(C_word)f_2098,a[2]=t2,a[3]=t3,a[4]=((C_word*)t0)[2],a[5]=t4,a[6]=t8,a[7]=t14,a[8]=t9,a[9]=t10,a[10]=((C_word)li3),tmp=(C_word)a,a+=11,tmp));
t16=((C_word*)t14)[1];
f_2098(t16,t1,t12,C_SCHEME_END_OF_LIST);}
else{
t12=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2267,a[2]=t1,a[3]=t7,tmp=(C_word)a,a+=4,tmp);
t13=C_s_a_i_plus(&a,2,t3,C_fix(1));
/* scheduler.scm:517: loop */
t17=t12;
t18=t2;
t19=t13;
t20=C_u_i_cdr(t4);
t1=t17;
t2=t18;
t3=t19;
t4=t20;
goto loop;}}}

/* loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_2098(C_word t0,C_word t1,C_word t2,C_word t3){
C_word tmp;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word t13;
C_word t14;
C_word t15;
C_word t16;
C_word t17;
C_word t18;
C_word t19;
C_word t20;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(65,0,4)))){
C_save_and_reclaim_args((void *)trf_2098,4,t0,t1,t2,t3);}
a=C_alloc(65);
if(C_truep(C_i_nullp(t2))){
if(C_truep(C_i_nullp(t3))){
t4=C_s_a_i_minus(&a,2,((C_word*)t0)[2],C_fix(1));
t5=C_s_a_i_plus(&a,2,((C_word*)t0)[3],C_fix(1));
/* scheduler.scm:493: loop */
t6=((C_word*)((C_word*)t0)[4])[1];
f_2071(t6,t1,t4,t5,C_u_i_cdr(((C_word*)t0)[5]));}
else{
t4=C_a_i_cons(&a,2,((C_word*)t0)[6],t3);
t5=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2133,a[2]=t1,a[3]=t4,tmp=(C_word)a,a+=4,tmp);
t6=C_s_a_i_minus(&a,2,((C_word*)t0)[2],C_fix(1));
t7=C_s_a_i_plus(&a,2,((C_word*)t0)[3],C_fix(1));
/* scheduler.scm:495: loop */
t8=((C_word*)((C_word*)t0)[4])[1];
f_2071(t8,t5,t6,t7,C_u_i_cdr(((C_word*)t0)[5]));}}
else{
t4=C_u_i_car(t2);
t5=C_slot(t4,C_fix(11));
if(C_truep(C_slot(t4,C_fix(13)))){
/* scheduler.scm:501: loop2 */
t18=t1;
t19=C_u_i_cdr(t2);
t20=t3;
t1=t18;
t2=t19;
t3=t20;
goto loop;}
else{
t6=C_i_pairp(t5);
if(C_truep(C_i_not(t6))){
t7=(*a=C_CLOSURE_TYPE|6,a[1]=(C_word)f_2167,a[2]=((C_word*)t0)[7],a[3]=t1,a[4]=t2,a[5]=t3,a[6]=t4,tmp=(C_word)a,a+=7,tmp);
if(C_truep(C_slot(t4,C_fix(4)))){
/* scheduler.scm:506: ##sys#remove-from-timeout-list */
t8=*((C_word*)lf[21]+1);{
C_word av2[3];
av2[0]=t8;
av2[1]=t7;
av2[2]=t4;
((C_proc)(void*)(*((C_word*)t8+1)))(3,av2);}}
else{
t8=t7;{
C_word av2[2];
av2[0]=t8;
av2[1]=C_SCHEME_UNDEFINED;
f_2167(2,av2);}}}
else{
t7=C_u_i_car(t5);
t8=C_eqp(((C_word*)t0)[6],t7);
if(C_truep(C_i_not(t8))){
t9=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_2191,a[2]=t1,a[3]=C_SCHEME_UNDEFINED,a[4]=((C_word*)t0)[6],a[5]=t5,tmp=(C_word)a,a+=6,tmp);
/* scheduler.scm:510: scheme#open-output-string */
t10=*((C_word*)lf[28]+1);{
C_word av2[2];
av2[0]=t10;
av2[1]=t9;
((C_proc)(void*)(*((C_word*)t10+1)))(2,av2);}}
else{
t9=(*a=C_CLOSURE_TYPE|6,a[1]=(C_word)f_2220,a[2]=((C_word*)t0)[7],a[3]=t1,a[4]=t2,a[5]=t3,a[6]=t4,tmp=(C_word)a,a+=7,tmp);
t10=C_u_i_cdr(t5);
t11=C_eqp(t10,C_SCHEME_TRUE);
t12=(C_truep(t11)?t11:C_eqp(t10,lf[29]));
if(C_truep(t12)){
t13=t9;
f_2220(t13,((C_word*)t0)[8]);}
else{
t13=C_eqp(t10,C_SCHEME_FALSE);
t14=(C_truep(t13)?t13:C_eqp(t10,lf[30]));
if(C_truep(t14)){
t15=t9;
f_2220(t15,((C_word*)t0)[9]);}
else{
t15=C_eqp(t10,lf[31]);
if(C_truep(t15)){
t16=t9;
f_2220(t16,(C_truep(((C_word*)t0)[8])?((C_word*)t0)[8]:((C_word*)t0)[9]));}
else{
t16=(*a=C_CLOSURE_TYPE|6,a[1]=(C_word)f_1924,a[2]=t9,a[3]=C_SCHEME_UNDEFINED,a[4]=((C_word*)t0)[9],a[5]=((C_word*)t0)[8],a[6]=t10,tmp=(C_word)a,a+=7,tmp);
/* scheduler.scm:441: scheme#open-output-string */
t17=*((C_word*)lf[28]+1);{
C_word av2[2];
av2[0]=t17;
av2[1]=t16;
((C_proc)(void*)(*((C_word*)t17+1)))(2,av2);}}}}}}}}}

/* k2131 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2133(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){
C_save_and_reclaim((void *)f_2133,c,av);}
a=C_alloc(3);
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=C_a_i_cons(&a,2,((C_word*)t0)[3],t1);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* k2165 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2167(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(6,c,2)))){
C_save_and_reclaim((void *)f_2167,c,av);}
a=C_alloc(6);
t2=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_2170,a[2]=((C_word*)t0)[2],a[3]=((C_word*)t0)[3],a[4]=((C_word*)t0)[4],a[5]=((C_word*)t0)[5],tmp=(C_word)a,a+=6,tmp);
/* scheduler.scm:507: ##sys#thread-basic-unblock! */
t3=*((C_word*)lf[20]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=((C_word*)t0)[6];
((C_proc)(void*)(*((C_word*)t3+1)))(3,av2);}}

/* k2168 in k2165 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2170(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,3)))){
C_save_and_reclaim((void *)f_2170,c,av);}
/* scheduler.scm:508: loop2 */
t2=((C_word*)((C_word*)t0)[2])[1];
f_2098(t2,((C_word*)t0)[3],C_u_i_cdr(((C_word*)t0)[4]),((C_word*)t0)[5]);}

/* k2189 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2191(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,4)))){
C_save_and_reclaim((void *)f_2191,c,av);}
a=C_alloc(3);
t2=C_mutate(((C_word *)t0)+3,t1);
t3=C_i_check_port_2(((C_word*)t0)[3],C_fix(2),C_SCHEME_TRUE,lf[22]);
t4=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2197,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:510: ##sys#print */
t5=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t5;
av2[1]=t4;
av2[2]=lf[27];
av2[3]=C_SCHEME_FALSE;
av2[4]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t5+1)))(5,av2);}}

/* k2195 in k2189 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2197(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,c,4)))){
C_save_and_reclaim((void *)f_2197,c,av);}
a=C_alloc(5);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2200,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],a[4]=((C_word*)t2)[4],tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:510: ##sys#print */
t4=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=C_u_i_car(((C_word*)t2)[5]);
av2[3]=C_SCHEME_TRUE;
av2[4]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(5,av2);}}

/* k2198 in k2195 in k2189 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2200(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,4)))){
C_save_and_reclaim((void *)f_2200,c,av);}
a=C_alloc(3);
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2203,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:510: ##sys#print */
t3=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=lf[26];
av2[3]=C_SCHEME_FALSE;
av2[4]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(5,av2);}}

/* k2201 in k2198 in k2195 in k2189 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2203(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(4,c,4)))){
C_save_and_reclaim((void *)f_2203,c,av);}
a=C_alloc(4);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2206,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:510: ##sys#print */
t4=*((C_word*)lf[25]+1);{
C_word *av2;
if(c >= 5) {
  av2=av;
} else {
  av2=C_alloc(5);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[4];
av2[3]=C_SCHEME_TRUE;
av2[4]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(5,av2);}}

/* k2204 in k2201 in k2198 in k2195 in k2189 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2206(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,3)))){
C_save_and_reclaim((void *)f_2206,c,av);}
a=C_alloc(3);
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2209,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:510: ##sys#write-char-0 */
t3=*((C_word*)lf[24]+1);{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t3;
av2[1]=t2;
av2[2]=C_make_character(41);
av2[3]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(4,av2);}}

/* k2207 in k2204 in k2201 in k2198 in k2195 in k2189 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2209(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,2)))){
C_save_and_reclaim((void *)f_2209,c,av);}
a=C_alloc(3);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2212,a[2]=((C_word*)t2)[2],tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:510: scheme#get-output-string */
t4=*((C_word*)lf[23]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t4+1)))(3,av2);}}

/* k2210 in k2207 in k2204 in k2201 in k2198 in k2195 in k2189 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2212(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_2212,c,av);}
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=C_halt(t1);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* k2218 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void f_2220(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,0,3)))){
C_save_and_reclaim_args((void *)trf_2220,2,t0,t1);}
a=C_alloc(3);
if(C_truep(t1)){
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2223,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
if(C_truep(C_slot(((C_word*)t0)[6],C_fix(4)))){
/* scheduler.scm:513: ##sys#remove-from-timeout-list */
t3=*((C_word*)lf[21]+1);{
C_word av2[3];
av2[0]=t3;
av2[1]=t2;
av2[2]=((C_word*)t0)[6];
((C_proc)(void*)(*((C_word*)t3+1)))(3,av2);}}
else{
t3=t2;{
C_word av2[2];
av2[0]=t3;
av2[1]=C_SCHEME_UNDEFINED;
f_2223(2,av2);}}}
else{
t2=C_u_i_cdr(((C_word*)t0)[4]);
t3=C_a_i_cons(&a,2,((C_word*)t0)[6],((C_word*)t0)[5]);
/* scheduler.scm:516: loop2 */
t4=((C_word*)((C_word*)t0)[2])[1];
f_2098(t4,((C_word*)t0)[3],t2,t3);}}

/* k2221 in k2218 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2223(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(6,c,2)))){
C_save_and_reclaim((void *)f_2223,c,av);}
a=C_alloc(6);
t2=((C_word*)t0)[2];
t3=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_2226,a[2]=((C_word*)t2)[2],a[3]=((C_word*)t2)[3],a[4]=((C_word*)t2)[4],a[5]=((C_word*)t2)[5],tmp=(C_word)a,a+=6,tmp);
/* scheduler.scm:514: ##sys#thread-basic-unblock! */
t4=*((C_word*)lf[20]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t4;
av2[1]=t3;
av2[2]=((C_word*)t2)[6];
((C_proc)(void*)(*((C_word*)t4+1)))(3,av2);}}

/* k2224 in k2221 in k2218 in loop2 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2226(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,3)))){
C_save_and_reclaim((void *)f_2226,c,av);}
/* scheduler.scm:515: loop2 */
t2=((C_word*)((C_word*)t0)[2])[1];
f_2098(t2,((C_word*)t0)[3],C_u_i_cdr(((C_word*)t0)[4]),((C_word*)t0)[5]);}

/* k2265 in loop in k2043 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2267(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){
C_save_and_reclaim((void *)f_2267,c,av);}
a=C_alloc(3);
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=C_a_i_cons(&a,2,((C_word*)t0)[3],t1);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* k2285 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2287(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(36,c,3)))){
C_save_and_reclaim((void *)f_2287,c,av);}
a=C_alloc(36);
t2=C_a_i_current_process_milliseconds(&a,1,C_SCHEME_FALSE);
t3=C_s_a_i_minus(&a,2,t1,t2);
/* scheduler.scm:468: scheme#max */
t4=*((C_word*)lf[35]+1);{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t4;
av2[1]=((C_word*)t0)[2];
av2[2]=C_fix(0);
av2[3]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(4,av2);}}

/* k2296 in k2034 in k1016 in loop1 in k1007 in ##sys#schedule in k931 in k928 */
static void C_ccall f_2298(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_2298,c,av);}
/* scheduler.scm:466: scheme#inexact->exact */
t2=*((C_word*)lf[36]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t2;
av2[1]=((C_word*)t0)[2];
av2[2]=t1;
((C_proc)(void*)(*((C_word*)t2+1)))(3,av2);}}

/* ##sys#clear-i/o-state-for-thread! in k931 in k928 */
static void f_2303(C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(11,0,3)))){
C_save_and_reclaim_args((void *)trf_2303,2,t1,t2);}
a=C_alloc(11);
t3=C_slot(t2,C_fix(11));
if(C_truep(C_i_pairp(t3))){
t4=C_slot(t2,C_fix(11));
t5=C_u_i_car(t4);
t6=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2317,a[2]=t1,tmp=(C_word)a,a+=3,tmp);
t7=C_SCHEME_UNDEFINED;
t8=(*a=C_VECTOR_TYPE|1,a[1]=t7,tmp=(C_word)a,a+=2,tmp);
t9=C_set_block_item(t8,0,(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_2319,a[2]=t5,a[3]=t2,a[4]=t8,a[5]=((C_word)li34),tmp=(C_word)a,a+=6,tmp));
t10=((C_word*)t8)[1];
f_2319(t10,t6,lf[6]);}
else{
t4=C_SCHEME_UNDEFINED;
t5=t1;{
C_word av2[2];
av2[0]=t5;
av2[1]=t4;
((C_proc)(void*)(*((C_word*)t5+1)))(2,av2);}}}

/* k2315 in ##sys#clear-i/o-state-for-thread! in k931 in k928 */
static void C_ccall f_2317(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_2317,c,av);}
t2=C_mutate(&lf[6] /* (set! fd-list ...) */,t1);
t3=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t3;
av2[1]=t2;
((C_proc)(void*)(*((C_word*)t3+1)))(2,av2);}}

/* loop in ##sys#clear-i/o-state-for-thread! in k931 in k928 */
static void f_2319(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(5,0,3)))){
C_save_and_reclaim_args((void *)trf_2319,3,t0,t1,t2);}
a=C_alloc(5);
if(C_truep(C_i_nullp(t2))){
t3=t1;{
C_word av2[2];
av2[0]=t3;
av2[1]=C_SCHEME_END_OF_LIST;
((C_proc)(void*)(*((C_word*)t3+1)))(2,av2);}}
else{
t3=C_u_i_car(t2);
t4=C_u_i_car(t3);
t5=C_eqp(((C_word*)t0)[2],t4);
if(C_truep(t5)){
t6=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2341,a[2]=t1,a[3]=t2,a[4]=t3,tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:532: delq */
f_935(t6,((C_word*)t0)[3],C_u_i_cdr(t3));}
else{
t6=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2360,a[2]=t1,a[3]=t3,tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:537: loop */
t8=t6;
t9=C_u_i_cdr(t2);
t1=t8;
t2=t9;
goto loop;}}}

/* k2339 in loop in ##sys#clear-i/o-state-for-thread! in k931 in k928 */
static void C_ccall f_2341(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_2341,c,av);}
if(C_truep(C_i_nullp(t1))){
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=C_u_i_cdr(((C_word*)t0)[3]);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}
else{
t2=C_i_setslot(((C_word*)t0)[4],C_fix(1),t1);
t3=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t3;
av2[1]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(2,av2);}}}

/* k2358 in loop in ##sys#clear-i/o-state-for-thread! in k931 in k928 */
static void C_ccall f_2360(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){
C_save_and_reclaim((void *)f_2360,c,av);}
a=C_alloc(3);
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=C_a_i_cons(&a,2,((C_word*)t0)[3],t1);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* ##sys#all-threads in k931 in k928 */
static void C_ccall f_2372(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(10,c,6)))){
C_save_and_reclaim((void *)f_2372,c,av);}
a=C_alloc(10);
t2=C_rest_nullp(c,2);
t3=(C_truep(t2)?(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2507,a[2]=((C_word)li36),tmp=(C_word)a,a+=3,tmp):C_get_rest_arg(c,2,av,2,t0));
t4=C_rest_nullp(c,2);
t5=C_rest_nullp(c,3);
t6=(C_truep(t5)?C_SCHEME_END_OF_LIST:C_get_rest_arg(c,3,av,2,t0));
t7=C_rest_nullp(c,3);
t8=C_SCHEME_UNDEFINED;
t9=(*a=C_VECTOR_TYPE|1,a[1]=t8,tmp=(C_word)a,a+=2,tmp);
t10=C_set_block_item(t9,0,(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2390,a[2]=t9,a[3]=t3,a[4]=((C_word)li40),tmp=(C_word)a,a+=5,tmp));
t11=((C_word*)t9)[1];
f_2390(t11,t1,lf[17],t6);}

/* loop in ##sys#all-threads in k931 in k928 */
static void f_2390(C_word t0,C_word t1,C_word t2,C_word t3){
C_word tmp;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(7,0,5)))){
C_save_and_reclaim_args((void *)trf_2390,4,t0,t1,t2,t3);}
a=C_alloc(7);
if(C_truep(C_i_pairp(t2))){
t4=C_u_i_cdr(t2);
t5=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2406,a[2]=((C_word*)t0)[2],a[3]=t1,a[4]=t4,tmp=(C_word)a,a+=5,tmp);
/* scheduler.scm:550: cns */
t6=((C_word*)t0)[3];{
C_word av2[6];
av2[0]=t6;
av2[1]=t5;
av2[2]=lf[8];
av2[3]=C_SCHEME_FALSE;
av2[4]=C_u_i_car(t2);
av2[5]=t3;
((C_proc)(void*)(*((C_word*)t6+1)))(6,av2);}}
else{
t4=C_SCHEME_UNDEFINED;
t5=(*a=C_VECTOR_TYPE|1,a[1]=t4,tmp=(C_word)a,a+=2,tmp);
t6=C_set_block_item(t5,0,(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2413,a[2]=t5,a[3]=((C_word*)t0)[3],a[4]=((C_word)li39),tmp=(C_word)a,a+=5,tmp));
t7=((C_word*)t5)[1];
f_2413(t7,t1,lf[6],t3);}}

/* k2404 in loop in ##sys#all-threads in k931 in k928 */
static void C_ccall f_2406(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,3)))){
C_save_and_reclaim((void *)f_2406,c,av);}
/* scheduler.scm:550: loop */
t2=((C_word*)((C_word*)t0)[2])[1];
f_2390(t2,((C_word*)t0)[3],((C_word*)t0)[4],t1);}

/* loop in loop in ##sys#all-threads in k931 in k928 */
static void f_2413(C_word t0,C_word t1,C_word t2,C_word t3){
C_word tmp;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(14,0,4)))){
C_save_and_reclaim_args((void *)trf_2413,4,t0,t1,t2,t3);}
a=C_alloc(14);
if(C_truep(C_i_pairp(t2))){
t4=C_u_i_cdr(t2);
t5=C_u_i_caar(t2);
t6=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2432,a[2]=((C_word*)t0)[2],a[3]=t1,a[4]=t4,tmp=(C_word)a,a+=5,tmp);
t7=C_u_i_car(t2);
t8=C_u_i_cdr(t7);
t9=C_SCHEME_UNDEFINED;
t10=(*a=C_VECTOR_TYPE|1,a[1]=t9,tmp=(C_word)a,a+=2,tmp);
t11=C_set_block_item(t10,0,(*a=C_CLOSURE_TYPE|6,a[1]=(C_word)f_2437,a[2]=t3,a[3]=((C_word*)t0)[3],a[4]=t5,a[5]=t10,a[6]=((C_word)li37),tmp=(C_word)a,a+=7,tmp));
t12=((C_word*)t10)[1];
f_2437(t12,t6,t8);}
else{
t4=C_SCHEME_UNDEFINED;
t5=(*a=C_VECTOR_TYPE|1,a[1]=t4,tmp=(C_word)a,a+=2,tmp);
t6=C_set_block_item(t5,0,(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2462,a[2]=t5,a[3]=((C_word*)t0)[3],a[4]=((C_word)li38),tmp=(C_word)a,a+=5,tmp));
t7=((C_word*)t5)[1];
f_2462(t7,t1,lf[5],t3);}}

/* k2430 in loop in loop in ##sys#all-threads in k931 in k928 */
static void C_ccall f_2432(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,3)))){
C_save_and_reclaim((void *)f_2432,c,av);}
/* scheduler.scm:553: loop */
t2=((C_word*)((C_word*)t0)[2])[1];
f_2413(t2,((C_word*)t0)[3],((C_word*)t0)[4],t1);}

/* loop in loop in loop in ##sys#all-threads in k931 in k928 */
static void f_2437(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(6,0,2)))){
C_save_and_reclaim_args((void *)trf_2437,3,t0,t1,t2);}
a=C_alloc(6);
if(C_truep(C_i_nullp(t2))){
t3=t1;{
C_word av2[2];
av2[0]=t3;
av2[1]=((C_word*)t0)[2];
((C_proc)(void*)(*((C_word*)t3+1)))(2,av2);}}
else{
t3=C_u_i_car(t2);
t4=(*a=C_CLOSURE_TYPE|5,a[1]=(C_word)f_2455,a[2]=((C_word*)t0)[3],a[3]=t1,a[4]=((C_word*)t0)[4],a[5]=t3,tmp=(C_word)a,a+=6,tmp);
/* scheduler.scm:557: loop */
t6=t4;
t7=C_u_i_cdr(t2);
t1=t6;
t2=t7;
goto loop;}}

/* k2453 in loop in loop in loop in ##sys#all-threads in k931 in k928 */
static void C_ccall f_2455(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,5)))){
C_save_and_reclaim((void *)f_2455,c,av);}
/* scheduler.scm:557: cns */
t2=((C_word*)t0)[2];{
C_word *av2;
if(c >= 6) {
  av2=av;
} else {
  av2=C_alloc(6);
}
av2[0]=t2;
av2[1]=((C_word*)t0)[3];
av2[2]=lf[63];
av2[3]=((C_word*)t0)[4];
av2[4]=((C_word*)t0)[5];
av2[5]=t1;
((C_proc)(void*)(*((C_word*)t2+1)))(6,av2);}}

/* loop in loop in loop in ##sys#all-threads in k931 in k928 */
static void f_2462(C_word t0,C_word t1,C_word t2,C_word t3){
C_word tmp;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,0,5)))){
C_save_and_reclaim_args((void *)trf_2462,4,t0,t1,t2,t3);}
a=C_alloc(5);
if(C_truep(C_i_pairp(t2))){
t4=C_u_i_cdr(t2);
t5=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_2478,a[2]=((C_word*)t0)[2],a[3]=t1,a[4]=t4,tmp=(C_word)a,a+=5,tmp);
t6=C_u_i_caar(t2);
t7=C_u_i_car(t2);
/* scheduler.scm:560: cns */
t8=((C_word*)t0)[3];{
C_word av2[6];
av2[0]=t8;
av2[1]=t5;
av2[2]=lf[64];
av2[3]=t6;
av2[4]=C_u_i_cdr(t7);
av2[5]=t3;
((C_proc)(void*)(*((C_word*)t8+1)))(6,av2);}}
else{
t4=t1;{
C_word av2[2];
av2[0]=t4;
av2[1]=t3;
((C_proc)(void*)(*((C_word*)t4+1)))(2,av2);}}}

/* k2476 in loop in loop in loop in ##sys#all-threads in k931 in k928 */
static void C_ccall f_2478(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,3)))){
C_save_and_reclaim((void *)f_2478,c,av);}
/* scheduler.scm:560: loop */
t2=((C_word*)((C_word*)t0)[2])[1];
f_2462(t2,((C_word*)t0)[3],((C_word*)t0)[4],t1);}

/* f_2507 in ##sys#all-threads in k931 in k928 */
static void C_ccall f_2507(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3=av[3];
C_word t4=av[4];
C_word t5=av[5];
C_word t6;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){
C_save_and_reclaim((void *)f_2507,c,av);}
a=C_alloc(3);
t6=t1;{
C_word *av2=av;
av2[0]=t6;
av2[1]=C_a_i_cons(&a,2,t4,t5);
((C_proc)(void*)(*((C_word*)t6+1)))(2,av2);}}

/* ##sys#fetch-and-clear-threads in k931 in k928 */
static void C_ccall f_2516(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(5,c,1)))){
C_save_and_reclaim((void *)f_2516,c,av);}
a=C_alloc(5);
t2=C_a_i_vector4(&a,4,lf[17],lf[18],lf[6],lf[5]);
t3=lf[17] /* ready-queue-head */ =C_SCHEME_END_OF_LIST;;
t4=lf[18] /* ready-queue-tail */ =C_SCHEME_END_OF_LIST;;
t5=lf[6] /* fd-list */ =C_SCHEME_END_OF_LIST;;
t6=lf[5] /* timeout-list */ =C_SCHEME_END_OF_LIST;;
t7=t1;{
C_word *av2=av;
av2[0]=t7;
av2[1]=t2;
((C_proc)(void*)(*((C_word*)t7+1)))(2,av2);}}

/* ##sys#restore-threads in k931 in k928 */
static void C_ccall f_2526(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_2526,c,av);}
t3=C_slot(t2,C_fix(0));
t4=C_mutate(&lf[17] /* (set! ready-queue-head ...) */,t3);
t5=C_slot(t2,C_fix(1));
t6=C_mutate(&lf[18] /* (set! ready-queue-tail ...) */,t5);
t7=C_slot(t2,C_fix(2));
t8=C_mutate(&lf[6] /* (set! fd-list ...) */,t7);
t9=C_slot(t2,C_fix(3));
t10=C_mutate(&lf[5] /* (set! timeout-list ...) */,t9);
t11=t1;{
C_word *av2=av;
av2[0]=t11;
av2[1]=t10;
((C_proc)(void*)(*((C_word*)t11+1)))(2,av2);}}

/* ##sys#thread-unblock! in k931 in k928 */
static void C_ccall f_2545(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(4,c,2)))){
C_save_and_reclaim((void *)f_2545,c,av);}
a=C_alloc(4);
t3=C_slot(t2,C_fix(3));
t4=C_eqp(lf[49],t3);
t5=(C_truep(t4)?t4:C_eqp(lf[67],C_slot(t2,C_fix(3))));
if(C_truep(t5)){
t6=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2558,a[2]=t1,a[3]=t2,tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:589: ##sys#remove-from-timeout-list */
t7=*((C_word*)lf[21]+1);{
C_word *av2=av;
av2[0]=t7;
av2[1]=t6;
av2[2]=t2;
((C_proc)(void*)(*((C_word*)t7+1)))(3,av2);}}
else{
t6=C_SCHEME_UNDEFINED;
t7=t1;{
C_word *av2=av;
av2[0]=t7;
av2[1]=t6;
((C_proc)(void*)(*((C_word*)t7+1)))(2,av2);}}}

/* k2556 in ##sys#thread-unblock! in k931 in k928 */
static void C_ccall f_2558(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,2)))){
C_save_and_reclaim((void *)f_2558,c,av);}
a=C_alloc(3);
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2561,a[2]=t0,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:590: ##sys#clear-i/o-state-for-thread! */
f_2303(t2,((C_word*)t0)[3]);}

/* k2559 in k2556 in ##sys#thread-unblock! in k931 in k928 */
static void C_ccall f_2561(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_2561,c,av);}
t2=((C_word*)t0)[2];
/* scheduler.scm:591: ##sys#thread-basic-unblock! */
t3=*((C_word*)lf[20]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t3;
av2[1]=((C_word*)t2)[2];
av2[2]=((C_word*)t2)[3];
((C_proc)(void*)(*((C_word*)t3+1)))(3,av2);}}

/* ##sys#thread-sleep! in k931 in k928 */
static void C_ccall f_2577(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(4,c,3)))){
C_save_and_reclaim((void *)f_2577,c,av);}
a=C_alloc(4);
t3=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2583,a[2]=t2,a[3]=((C_word)li46),tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:597: ##sys#call-with-current-continuation */{
C_word *av2=av;
av2[0]=0;
av2[1]=t1;
av2[2]=t3;
C_call_cc(3,av2);}}

/* a2582 in ##sys#thread-sleep! in k931 in k928 */
static void C_ccall f_2583(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(7,c,3)))){
C_save_and_reclaim((void *)f_2583,c,av);}
a=C_alloc(7);
t3=*((C_word*)lf[3]+1);
t4=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2595,a[2]=t2,a[3]=((C_word)li45),tmp=(C_word)a,a+=4,tmp);
t5=C_i_setslot(*((C_word*)lf[3]+1),C_fix(1),t4);
t6=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2590,a[2]=t1,tmp=(C_word)a,a+=3,tmp);
/* scheduler.scm:601: ##sys#thread-block-for-timeout! */
t7=*((C_word*)lf[48]+1);{
C_word *av2;
if(c >= 4) {
  av2=av;
} else {
  av2=C_alloc(4);
}
av2[0]=t7;
av2[1]=t6;
av2[2]=*((C_word*)lf[3]+1);
av2[3]=((C_word*)t0)[2];
((C_proc)(void*)(*((C_word*)t7+1)))(4,av2);}}

/* k2588 in a2582 in ##sys#thread-sleep! in k931 in k928 */
static void C_ccall f_2590(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_2590,c,av);}
/* scheduler.scm:602: ##sys#schedule */
t2=*((C_word*)lf[2]+1);{
C_word *av2=av;
av2[0]=t2;
av2[1]=((C_word*)t0)[2];
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* a2594 in a2582 in ##sys#thread-sleep! in k931 in k928 */
static void C_ccall f_2595(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){
C_save_and_reclaim((void *)f_2595,c,av);}
/* scheduler.scm:600: return */
t2=((C_word*)t0)[2];{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t2;
av2[1]=t1;
av2[2]=C_SCHEME_UNDEFINED;
((C_proc)(void*)(*((C_word*)t2+1)))(3,av2);}}

/* chicken.base#sleep-hook in k931 in k928 */
static void C_ccall f_2601(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word t5;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(69,c,2)))){
C_save_and_reclaim((void *)f_2601,c,av);}
a=C_alloc(69);
t3=C_s_a_i_times(&a,2,lf[70],t2);
t4=C_s_a_i_plus(&a,2,C_a_i_current_process_milliseconds(&a,1,C_SCHEME_FALSE),t3);
/* scheduler.scm:609: ##sys#thread-sleep! */
t5=*((C_word*)lf[68]+1);{
C_word *av2=av;
av2[0]=t5;
av2[1]=t1;
av2[2]=t4;
((C_proc)(void*)(*((C_word*)t5+1)))(3,av2);}}

/* ##sys#kill-other-threads in k931 in k928 */
static void C_ccall f_2615(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2=av[2];
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word t13;
C_word t14;
C_word t15;
C_word t16;
C_word t17;
C_word t18;
C_word t19;
C_word t20;
C_word t21;
C_word t22;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(31,c,2)))){
C_save_and_reclaim((void *)f_2615,c,av);}
a=C_alloc(31);
t3=*((C_word*)lf[3]+1);
t4=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2618,a[2]=t3,a[3]=((C_word)li49),tmp=(C_word)a,a+=4,tmp);
t5=C_mutate((C_word*)lf[43]+1 /* (set! ##sys#primordial-thread ...) */,*((C_word*)lf[3]+1));
t6=C_a_i_list1(&a,1,*((C_word*)lf[3]+1));
t7=C_mutate(&lf[17] /* (set! ready-queue-head ...) */,t6);
t8=C_mutate(&lf[18] /* (set! ready-queue-tail ...) */,lf[17]);
t9=(
/* scheduler.scm:629: suspend */
  f_2618(t4,*((C_word*)lf[3]+1))
);
t10=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2644,a[2]=t4,a[3]=((C_word)li50),tmp=(C_word)a,a+=4,tmp);
t11=lf[5];
t12=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2722,a[2]=t10,a[3]=((C_word)li51),tmp=(C_word)a,a+=4,tmp);
t13=(
  f_2722(t12,lf[5])
);
t14=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2665,a[2]=t4,a[3]=((C_word)li52),tmp=(C_word)a,a+=4,tmp);
t15=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2656,a[2]=t14,a[3]=((C_word)li53),tmp=(C_word)a,a+=4,tmp);
t16=lf[6];
t17=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2699,a[2]=t15,a[3]=((C_word)li54),tmp=(C_word)a,a+=4,tmp);
t18=(
  f_2699(t17,lf[6])
);
t19=lf[5] /* timeout-list */ =C_SCHEME_END_OF_LIST;;
t20=lf[6] /* fd-list */ =C_SCHEME_END_OF_LIST;;
t21=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2694,a[2]=((C_word*)t0)[2],a[3]=t1,tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:634: thunk */
t22=t2;{
C_word *av2=av;
av2[0]=t22;
av2[1]=t21;
((C_proc)(void*)(*((C_word*)t22+1)))(2,av2);}}

/* suspend in ##sys#kill-other-threads in k931 in k928 */
static C_word f_2618(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
C_word t5;{}
t2=C_eqp(t1,((C_word*)t0)[2]);
t3=(C_truep(t2)?C_SCHEME_UNDEFINED:C_i_setslot(t1,C_fix(3),lf[73]));
t4=C_i_set_i_slot(t1,C_fix(11),C_SCHEME_FALSE);
return(C_i_set_i_slot(t1,C_fix(12),C_SCHEME_END_OF_LIST));}

/* g665 in ##sys#kill-other-threads in k931 in k928 */
static C_word f_2644(C_word t0,C_word t1){
C_word tmp;
C_word t2;{}
return((
/* scheduler.scm:630: suspend */
  f_2618(((C_word*)t0)[2],C_u_i_cdr(t1))
));}

/* g675 in ##sys#kill-other-threads in k931 in k928 */
static C_word f_2656(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;{}
t2=C_u_i_cdr(t1);
return((
  f_2665(((C_word*)t0)[2],t2)
));}

/* for-each-loop697 in ##sys#kill-other-threads in k931 in k928 */
static C_word f_2665(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
loop:{}
if(C_truep(C_i_pairp(t1))){
t2=(
/* scheduler.scm:631: g698 */
  f_2618(((C_word*)t0)[2],C_slot(t1,C_fix(0)))
);
t4=C_slot(t1,C_fix(1));
t1=t4;
goto loop;}
else{
t2=C_SCHEME_UNDEFINED;
return(t2);}}

/* k2692 in ##sys#kill-other-threads in k931 in k928 */
static void C_ccall f_2694(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){
C_save_and_reclaim((void *)f_2694,c,av);}
/* scheduler.scm:635: exit */
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=((C_word*)t0)[3];
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* for-each-loop674 in ##sys#kill-other-threads in k931 in k928 */
static C_word f_2699(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
loop:{}
if(C_truep(C_i_pairp(t1))){
t2=(
/* scheduler.scm:631: g675 */
  f_2656(((C_word*)t0)[2],C_slot(t1,C_fix(0)))
);
t4=C_slot(t1,C_fix(1));
t1=t4;
goto loop;}
else{
t2=C_SCHEME_UNDEFINED;
return(t2);}}

/* for-each-loop664 in ##sys#kill-other-threads in k931 in k928 */
static C_word f_2722(C_word t0,C_word t1){
C_word tmp;
C_word t2;
C_word t3;
C_word t4;
loop:{}
if(C_truep(C_i_pairp(t1))){
t2=(
/* scheduler.scm:630: g665 */
  f_2644(((C_word*)t0)[2],C_slot(t1,C_fix(0)))
);
t4=C_slot(t1,C_fix(1));
t1=t4;
goto loop;}
else{
t2=C_SCHEME_UNDEFINED;
return(t2);}}

/* k928 */
static void C_ccall f_930(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(11,c,2)))){
C_save_and_reclaim((void *)f_930,c,av);}
a=C_alloc(11);
t2=C_a_i_provide(&a,1,lf[0]);
t3=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_933,a[2]=((C_word*)t0)[2],tmp=(C_word)a,a+=3,tmp);{
C_word *av2=av;
av2[0]=C_SCHEME_UNDEFINED;
av2[1]=t3;
C_library_toplevel(2,av2);}}

/* k931 in k928 */
static void C_ccall f_933(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word t12;
C_word t13;
C_word t14;
C_word t15;
C_word t16;
C_word t17;
C_word t18;
C_word t19;
C_word t20;
C_word t21;
C_word t22;
C_word t23;
C_word t24;
C_word t25;
C_word t26;
C_word t27;
C_word t28;
C_word t29;
C_word t30;
C_word t31;
C_word t32;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(74,c,5)))){
C_save_and_reclaim((void *)f_933,c,av);}
a=C_alloc(74);
t2=C_mutate(&lf[1] /* (set! delq ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_935,a[2]=((C_word)li1),tmp=(C_word)a,a+=3,tmp));
t3=C_mutate((C_word*)lf[2]+1 /* (set! ##sys#schedule ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_978,a[2]=((C_word)li10),tmp=(C_word)a,a+=3,tmp));
t4=C_mutate((C_word*)lf[19]+1 /* (set! ##sys#force-primordial ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1199,a[2]=((C_word)li11),tmp=(C_word)a,a+=3,tmp));
t5=lf[17] /* ready-queue-head */ =C_SCHEME_END_OF_LIST;;
t6=lf[18] /* ready-queue-tail */ =C_SCHEME_END_OF_LIST;;
t7=C_mutate((C_word*)lf[45]+1 /* (set! ##sys#ready-queue ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1210,a[2]=((C_word)li12),tmp=(C_word)a,a+=3,tmp));
t8=C_mutate((C_word*)lf[42]+1 /* (set! ##sys#add-to-ready-queue ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1213,a[2]=((C_word)li13),tmp=(C_word)a,a+=3,tmp));
t9=C_mutate(&lf[4] /* (set! ##sys#update-thread-state-buffer ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1258,a[2]=((C_word)li14),tmp=(C_word)a,a+=3,tmp));
t10=*((C_word*)lf[46]+1);
t11=C_mutate((C_word*)lf[46]+1 /* (set! ##sys#interrupt-hook ...) */,(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_1312,a[2]=t10,a[3]=((C_word)li16),tmp=(C_word)a,a+=4,tmp));
t12=lf[5] /* timeout-list */ =C_SCHEME_END_OF_LIST;;
t13=C_mutate((C_word*)lf[47]+1 /* (set! ##sys#timeout-queue ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1337,a[2]=((C_word)li17),tmp=(C_word)a,a+=3,tmp));
t14=C_mutate((C_word*)lf[21]+1 /* (set! ##sys#remove-from-timeout-list ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1340,a[2]=((C_word)li19),tmp=(C_word)a,a+=3,tmp));
t15=C_mutate((C_word*)lf[48]+1 /* (set! ##sys#thread-block-for-timeout! ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1381,a[2]=((C_word)li21),tmp=(C_word)a,a+=3,tmp));
t16=C_mutate((C_word*)lf[50]+1 /* (set! ##sys#thread-block-for-termination! ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1450,a[2]=((C_word)li22),tmp=(C_word)a,a+=3,tmp));
t17=C_mutate((C_word*)lf[53]+1 /* (set! ##sys#thread-kill! ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1580,a[2]=((C_word)li27),tmp=(C_word)a,a+=3,tmp));
t18=C_mutate((C_word*)lf[20]+1 /* (set! ##sys#thread-basic-unblock! ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1694,a[2]=((C_word)li28),tmp=(C_word)a,a+=3,tmp));
t19=C_mutate((C_word*)lf[56]+1 /* (set! ##sys#default-exception-handler ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1706,a[2]=((C_word)li30),tmp=(C_word)a,a+=3,tmp));
t20=lf[6] /* fd-list */ =C_SCHEME_END_OF_LIST;;
t21=C_mutate((C_word*)lf[60]+1 /* (set! ##sys#fd-queue ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1743,a[2]=((C_word)li31),tmp=(C_word)a,a+=3,tmp));
t22=C_mutate((C_word*)lf[61]+1 /* (set! ##sys#thread-block-for-i/o! ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_1969,a[2]=((C_word)li33),tmp=(C_word)a,a+=3,tmp));
t23=C_mutate(&lf[41] /* (set! ##sys#clear-i/o-state-for-thread! ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2303,a[2]=((C_word)li35),tmp=(C_word)a,a+=3,tmp));
t24=C_mutate((C_word*)lf[62]+1 /* (set! ##sys#all-threads ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2372,a[2]=((C_word)li41),tmp=(C_word)a,a+=3,tmp));
t25=C_mutate((C_word*)lf[65]+1 /* (set! ##sys#fetch-and-clear-threads ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2516,a[2]=((C_word)li42),tmp=(C_word)a,a+=3,tmp));
t26=C_mutate((C_word*)lf[66]+1 /* (set! ##sys#restore-threads ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2526,a[2]=((C_word)li43),tmp=(C_word)a,a+=3,tmp));
t27=C_mutate((C_word*)lf[44]+1 /* (set! ##sys#thread-unblock! ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2545,a[2]=((C_word)li44),tmp=(C_word)a,a+=3,tmp));
t28=C_mutate((C_word*)lf[68]+1 /* (set! ##sys#thread-sleep! ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2577,a[2]=((C_word)li47),tmp=(C_word)a,a+=3,tmp));
t29=C_mutate((C_word*)lf[69]+1 /* (set! chicken.base#sleep-hook ...) */,(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_2601,a[2]=((C_word)li48),tmp=(C_word)a,a+=3,tmp));
t30=*((C_word*)lf[71]+1);
t31=C_mutate((C_word*)lf[72]+1 /* (set! ##sys#kill-other-threads ...) */,(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_2615,a[2]=t30,a[3]=((C_word)li55),tmp=(C_word)a,a+=4,tmp));
t32=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t32;
av2[1]=C_SCHEME_UNDEFINED;
((C_proc)(void*)(*((C_word*)t32+1)))(2,av2);}}

/* delq in k931 in k928 */
static void f_935(C_word t1,C_word t2,C_word t3){
C_word tmp;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(7,0,3)))){
C_save_and_reclaim_args((void *)trf_935,3,t1,t2,t3);}
a=C_alloc(7);
t4=C_SCHEME_UNDEFINED;
t5=(*a=C_VECTOR_TYPE|1,a[1]=t4,tmp=(C_word)a,a+=2,tmp);
t6=C_set_block_item(t5,0,(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_941,a[2]=t2,a[3]=t5,a[4]=((C_word)li0),tmp=(C_word)a,a+=5,tmp));
t7=((C_word*)t5)[1];
f_941(t7,t1,t3);}

/* loop in delq in k931 in k928 */
static void f_941(C_word t0,C_word t1,C_word t2){
C_word tmp;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word *a;
loop:
if(C_unlikely(!C_demand(C_calculate_demand(4,0,2)))){
C_save_and_reclaim_args((void *)trf_941,3,t0,t1,t2);}
a=C_alloc(4);
if(C_truep(C_i_nullp(t2))){
t3=t1;{
C_word av2[2];
av2[0]=t3;
av2[1]=t2;
((C_proc)(void*)(*((C_word*)t3+1)))(2,av2);}}
else{
t3=C_slot(t2,C_fix(0));
t4=C_eqp(((C_word*)t0)[2],t3);
if(C_truep(t4)){
t5=t1;{
C_word av2[2];
av2[0]=t5;
av2[1]=C_slot(t2,C_fix(1));
((C_proc)(void*)(*((C_word*)t5+1)))(2,av2);}}
else{
t5=C_slot(t2,C_fix(0));
t6=(*a=C_CLOSURE_TYPE|3,a[1]=(C_word)f_968,a[2]=t1,a[3]=t5,tmp=(C_word)a,a+=4,tmp);
/* scheduler.scm:162: loop */
t8=t6;
t9=C_slot(t2,C_fix(1));
t1=t8;
t2=t9;
goto loop;}}}

/* k966 in loop in delq in k931 in k928 */
static void C_ccall f_968(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){
C_save_and_reclaim((void *)f_968,c,av);}
a=C_alloc(3);
t2=((C_word*)t0)[2];{
C_word *av2=av;
av2[0]=t2;
av2[1]=C_a_i_cons(&a,2,((C_word*)t0)[3],t1);
((C_proc)(void*)(*((C_word*)t2+1)))(2,av2);}}

/* ##sys#schedule in k931 in k928 */
static void C_ccall f_978(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word t4;
C_word t5;
C_word t6;
C_word t7;
C_word t8;
C_word t9;
C_word t10;
C_word t11;
C_word *a;
if(C_unlikely(!C_demand(C_calculate_demand(7,c,2)))){
C_save_and_reclaim((void *)f_978,c,av);}
a=C_alloc(7);
t2=*((C_word*)lf[3]+1);
t3=C_SCHEME_FALSE;
t4=(*a=C_VECTOR_TYPE|1,a[1]=t3,tmp=(C_word)a,a+=2,tmp);
t5=C_slot(*((C_word*)lf[3]+1),C_fix(3));
t6=(
/* scheduler.scm:180: ##sys#update-thread-state-buffer */
  f_1258(*((C_word*)lf[3]+1))
);
t7=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_1009,a[2]=t4,a[3]=t2,a[4]=t1,tmp=(C_word)a,a+=5,tmp);
t8=C_eqp(t5,lf[9]);
t9=(C_truep(t8)?t8:C_eqp(t5,lf[8]));
if(C_truep(t9)){
t10=C_i_set_i_slot(*((C_word*)lf[3]+1),C_fix(13),C_SCHEME_FALSE);
/* scheduler.scm:184: ##sys#add-to-ready-queue */
t11=*((C_word*)lf[42]+1);{
C_word *av2;
if(c >= 3) {
  av2=av;
} else {
  av2=C_alloc(3);
}
av2[0]=t11;
av2[1]=t7;
av2[2]=*((C_word*)lf[3]+1);
((C_proc)(void*)(*((C_word*)t11+1)))(3,av2);}}
else{
t10=t7;{
C_word *av2=av;
av2[0]=t10;
av2[1]=C_SCHEME_UNDEFINED;
f_1009(2,av2);}}}

/* toplevel */
static int toplevel_initialized=0;

void C_ccall C_scheduler_toplevel(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(toplevel_initialized) {C_kontinue(t1,C_SCHEME_UNDEFINED);}
else C_toplevel_entry(C_text("scheduler"));
C_check_nursery_minimum(C_calculate_demand(3,c,2));
if(C_unlikely(!C_demand(C_calculate_demand(3,c,2)))){
C_save_and_reclaim((void*)C_scheduler_toplevel,c,av);}
toplevel_initialized=1;
if(C_unlikely(!C_demand_2(403))){
C_save(t1);
C_rereclaim2(403*sizeof(C_word),1);
t1=C_restore;}
a=C_alloc(3);
C_initialize_lf(lf,74);
lf[0]=C_h_intern(&lf[0],9, C_text("scheduler"));
lf[2]=C_h_intern(&lf[2],14, C_text("##sys#schedule"));
lf[3]=C_h_intern(&lf[3],20, C_text("##sys#current-thread"));
lf[7]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\011\144\145\141\144\154\157\143\153\000"));
lf[8]=C_h_intern(&lf[8],5, C_text("ready"));
lf[9]=C_h_intern(&lf[9],7, C_text("running"));
lf[10]=C_h_intern(&lf[10],19, C_text("##sys#dynamic-winds"));
lf[11]=C_h_intern(&lf[11],20, C_text("##sys#standard-input"));
lf[12]=C_h_intern(&lf[12],21, C_text("##sys#standard-output"));
lf[13]=C_h_intern(&lf[13],20, C_text("##sys#standard-error"));
lf[14]=C_h_intern(&lf[14],31, C_text("##sys#current-exception-handler"));
lf[15]=C_h_intern(&lf[15],30, C_text("##sys#current-parameter-vector"));
lf[16]=C_h_intern(&lf[16],23, C_text("##sys#call-with-cthulhu"));
lf[19]=C_h_intern(&lf[19],22, C_text("##sys#force-primordial"));
lf[20]=C_h_intern(&lf[20],27, C_text("##sys#thread-basic-unblock!"));
lf[21]=C_h_intern(&lf[21],30, C_text("##sys#remove-from-timeout-list"));
lf[22]=C_h_intern(&lf[22],6, C_text("format"));
lf[23]=C_h_intern(&lf[23],24, C_text("scheme#get-output-string"));
lf[24]=C_h_intern(&lf[24],18, C_text("##sys#write-char-0"));
lf[25]=C_h_intern(&lf[25],11, C_text("##sys#print"));
lf[26]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\014\040\050\145\170\160\145\143\164\145\144\040\000"));
lf[27]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\072\164\150\162\145\141\144\040\151\163\040\162\145\147\151\163\164\145\162\145\144\040\146\157\162\040\111\057\117\040\157\156\040\165\156\153\156\157\167\156\040\146\151\154\145\055\144\145\163\143\162\151\160\164\157\162\072\040\000"));
lf[28]=C_h_intern(&lf[28],25, C_text("scheme#open-output-string"));
lf[29]=C_h_intern_kw(&lf[29],5, C_text("input"));
lf[30]=C_h_intern_kw(&lf[30],6, C_text("output"));
lf[31]=C_h_intern_kw(&lf[31],3, C_text("all"));
lf[32]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\007\054\040\157\040\075\040\000"));
lf[33]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\007\040\050\151\040\075\040\000"));
lf[34]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\044\146\144\163\145\164\055\164\145\163\164\072\040\151\156\166\141\154\151\144\040\151\057\157\040\144\151\162\145\143\164\151\157\156\072\040\000"));
lf[35]=C_h_intern(&lf[35],10, C_text("scheme#max"));
lf[36]=C_h_intern(&lf[36],21, C_text("scheme#inexact->exact"));
lf[37]=C_h_intern(&lf[37],12, C_text("scheme#round"));
lf[38]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\010\040\050\146\144\040\075\040\000"));
lf[39]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\046\143\162\145\141\164\145\055\146\144\163\145\164\072\040\151\156\166\141\154\151\144\040\151\057\157\040\144\151\162\145\143\164\151\157\156\072\040\000"));
lf[40]=C_h_intern(&lf[40],12, C_text("##sys#length"));
lf[42]=C_h_intern(&lf[42],24, C_text("##sys#add-to-ready-queue"));
lf[43]=C_h_intern(&lf[43],23, C_text("##sys#primordial-thread"));
lf[44]=C_h_intern(&lf[44],21, C_text("##sys#thread-unblock!"));
lf[45]=C_h_intern(&lf[45],17, C_text("##sys#ready-queue"));
lf[46]=C_h_intern(&lf[46],20, C_text("##sys#interrupt-hook"));
lf[47]=C_h_intern(&lf[47],19, C_text("##sys#timeout-queue"));
lf[48]=C_h_intern(&lf[48],31, C_text("##sys#thread-block-for-timeout!"));
lf[49]=C_h_intern(&lf[49],7, C_text("blocked"));
lf[50]=C_h_intern(&lf[50],35, C_text("##sys#thread-block-for-termination!"));
lf[51]=C_h_intern(&lf[51],4, C_text("dead"));
lf[52]=C_h_intern(&lf[52],10, C_text("terminated"));
lf[53]=C_h_intern(&lf[53],18, C_text("##sys#thread-kill!"));
lf[54]=C_h_intern(&lf[54],18, C_text("condition-variable"));
lf[55]=C_h_intern(&lf[55],6, C_text("thread"));
lf[56]=C_h_intern(&lf[56],31, C_text("##sys#default-exception-handler"));
lf[57]=C_h_intern(&lf[57],24, C_text("chicken.condition#signal"));
lf[58]=C_h_intern(&lf[58],28, C_text("##sys#show-exception-warning"));
lf[59]=C_decode_literal(C_heaptop,C_text("\376\002\000\000\012\151\156\040\164\150\162\145\141\144\000"));
lf[60]=C_h_intern(&lf[60],14, C_text("##sys#fd-queue"));
lf[61]=C_h_intern(&lf[61],27, C_text("##sys#thread-block-for-i/o!"));
lf[62]=C_h_intern(&lf[62],17, C_text("##sys#all-threads"));
lf[63]=C_h_intern(&lf[63],3, C_text("i/o"));
lf[64]=C_h_intern(&lf[64],7, C_text("timeout"));
lf[65]=C_h_intern(&lf[65],29, C_text("##sys#fetch-and-clear-threads"));
lf[66]=C_h_intern(&lf[66],21, C_text("##sys#restore-threads"));
lf[67]=C_h_intern(&lf[67],8, C_text("sleeping"));
lf[68]=C_h_intern(&lf[68],19, C_text("##sys#thread-sleep!"));
lf[69]=C_h_intern(&lf[69],23, C_text("chicken.base#sleep-hook"));
lf[70]=C_decode_literal(C_heaptop,C_text("\376\1251000.0\000"));
lf[71]=C_h_intern(&lf[71],17, C_text("chicken.base#exit"));
lf[72]=C_h_intern(&lf[72],24, C_text("##sys#kill-other-threads"));
lf[73]=C_h_intern(&lf[73],9, C_text("suspended"));
C_register_lf2(lf,74,create_ptable());{}
t2=(*a=C_CLOSURE_TYPE|2,a[1]=(C_word)f_930,a[2]=t1,tmp=(C_word)a,a+=3,tmp);{
C_word *av2=av;
av2[0]=C_SCHEME_UNDEFINED;
av2[1]=t2;
C_extras_toplevel(2,av2);}}

#ifdef C_ENABLE_PTABLES
static C_PTABLE_ENTRY ptable[136] = {
{C_text("f_1009:scheduler_2escm"),(void*)f_1009},
{C_text("f_1014:scheduler_2escm"),(void*)f_1014},
{C_text("f_1018:scheduler_2escm"),(void*)f_1018},
{C_text("f_1021:scheduler_2escm"),(void*)f_1021},
{C_text("f_1026:scheduler_2escm"),(void*)f_1026},
{C_text("f_1030:scheduler_2escm"),(void*)f_1030},
{C_text("f_1090:scheduler_2escm"),(void*)f_1090},
{C_text("f_1124:scheduler_2escm"),(void*)f_1124},
{C_text("f_1127:scheduler_2escm"),(void*)f_1127},
{C_text("f_1139:scheduler_2escm"),(void*)f_1139},
{C_text("f_1145:scheduler_2escm"),(void*)f_1145},
{C_text("f_1157:scheduler_2escm"),(void*)f_1157},
{C_text("f_1165:scheduler_2escm"),(void*)f_1165},
{C_text("f_1199:scheduler_2escm"),(void*)f_1199},
{C_text("f_1210:scheduler_2escm"),(void*)f_1210},
{C_text("f_1213:scheduler_2escm"),(void*)f_1213},
{C_text("f_1258:scheduler_2escm"),(void*)f_1258},
{C_text("f_1312:scheduler_2escm"),(void*)f_1312},
{C_text("f_1316:scheduler_2escm"),(void*)f_1316},
{C_text("f_1330:scheduler_2escm"),(void*)f_1330},
{C_text("f_1337:scheduler_2escm"),(void*)f_1337},
{C_text("f_1340:scheduler_2escm"),(void*)f_1340},
{C_text("f_1346:scheduler_2escm"),(void*)f_1346},
{C_text("f_1381:scheduler_2escm"),(void*)f_1381},
{C_text("f_1391:scheduler_2escm"),(void*)f_1391},
{C_text("f_1402:scheduler_2escm"),(void*)f_1402},
{C_text("f_1450:scheduler_2escm"),(void*)f_1450},
{C_text("f_1515:scheduler_2escm"),(void*)f_1515},
{C_text("f_1531:scheduler_2escm"),(void*)f_1531},
{C_text("f_1541:scheduler_2escm"),(void*)f_1541},
{C_text("f_1557:scheduler_2escm"),(void*)f_1557},
{C_text("f_1580:scheduler_2escm"),(void*)f_1580},
{C_text("f_1584:scheduler_2escm"),(void*)f_1584},
{C_text("f_1590:scheduler_2escm"),(void*)f_1590},
{C_text("f_1593:scheduler_2escm"),(void*)f_1593},
{C_text("f_1596:scheduler_2escm"),(void*)f_1596},
{C_text("f_1614:scheduler_2escm"),(void*)f_1614},
{C_text("f_1621:scheduler_2escm"),(void*)f_1621},
{C_text("f_1640:scheduler_2escm"),(void*)f_1640},
{C_text("f_1650:scheduler_2escm"),(void*)f_1650},
{C_text("f_1671:scheduler_2escm"),(void*)f_1671},
{C_text("f_1688:scheduler_2escm"),(void*)f_1688},
{C_text("f_1694:scheduler_2escm"),(void*)f_1694},
{C_text("f_1706:scheduler_2escm"),(void*)f_1706},
{C_text("f_1710:scheduler_2escm"),(void*)f_1710},
{C_text("f_1716:scheduler_2escm"),(void*)f_1716},
{C_text("f_1730:scheduler_2escm"),(void*)f_1730},
{C_text("f_1734:scheduler_2escm"),(void*)f_1734},
{C_text("f_1743:scheduler_2escm"),(void*)f_1743},
{C_text("f_1757:scheduler_2escm"),(void*)f_1757},
{C_text("f_1768:scheduler_2escm"),(void*)f_1768},
{C_text("f_1811:scheduler_2escm"),(void*)f_1811},
{C_text("f_1817:scheduler_2escm"),(void*)f_1817},
{C_text("f_1820:scheduler_2escm"),(void*)f_1820},
{C_text("f_1823:scheduler_2escm"),(void*)f_1823},
{C_text("f_1826:scheduler_2escm"),(void*)f_1826},
{C_text("f_1829:scheduler_2escm"),(void*)f_1829},
{C_text("f_1832:scheduler_2escm"),(void*)f_1832},
{C_text("f_1853:scheduler_2escm"),(void*)f_1853},
{C_text("f_1865:scheduler_2escm"),(void*)f_1865},
{C_text("f_1875:scheduler_2escm"),(void*)f_1875},
{C_text("f_1890:scheduler_2escm"),(void*)f_1890},
{C_text("f_1924:scheduler_2escm"),(void*)f_1924},
{C_text("f_1930:scheduler_2escm"),(void*)f_1930},
{C_text("f_1933:scheduler_2escm"),(void*)f_1933},
{C_text("f_1936:scheduler_2escm"),(void*)f_1936},
{C_text("f_1939:scheduler_2escm"),(void*)f_1939},
{C_text("f_1942:scheduler_2escm"),(void*)f_1942},
{C_text("f_1945:scheduler_2escm"),(void*)f_1945},
{C_text("f_1948:scheduler_2escm"),(void*)f_1948},
{C_text("f_1951:scheduler_2escm"),(void*)f_1951},
{C_text("f_1969:scheduler_2escm"),(void*)f_1969},
{C_text("f_1973:scheduler_2escm"),(void*)f_1973},
{C_text("f_1988:scheduler_2escm"),(void*)f_1988},
{C_text("f_2036:scheduler_2escm"),(void*)f_2036},
{C_text("f_2045:scheduler_2escm"),(void*)f_2045},
{C_text("f_2069:scheduler_2escm"),(void*)f_2069},
{C_text("f_2071:scheduler_2escm"),(void*)f_2071},
{C_text("f_2098:scheduler_2escm"),(void*)f_2098},
{C_text("f_2133:scheduler_2escm"),(void*)f_2133},
{C_text("f_2167:scheduler_2escm"),(void*)f_2167},
{C_text("f_2170:scheduler_2escm"),(void*)f_2170},
{C_text("f_2191:scheduler_2escm"),(void*)f_2191},
{C_text("f_2197:scheduler_2escm"),(void*)f_2197},
{C_text("f_2200:scheduler_2escm"),(void*)f_2200},
{C_text("f_2203:scheduler_2escm"),(void*)f_2203},
{C_text("f_2206:scheduler_2escm"),(void*)f_2206},
{C_text("f_2209:scheduler_2escm"),(void*)f_2209},
{C_text("f_2212:scheduler_2escm"),(void*)f_2212},
{C_text("f_2220:scheduler_2escm"),(void*)f_2220},
{C_text("f_2223:scheduler_2escm"),(void*)f_2223},
{C_text("f_2226:scheduler_2escm"),(void*)f_2226},
{C_text("f_2267:scheduler_2escm"),(void*)f_2267},
{C_text("f_2287:scheduler_2escm"),(void*)f_2287},
{C_text("f_2298:scheduler_2escm"),(void*)f_2298},
{C_text("f_2303:scheduler_2escm"),(void*)f_2303},
{C_text("f_2317:scheduler_2escm"),(void*)f_2317},
{C_text("f_2319:scheduler_2escm"),(void*)f_2319},
{C_text("f_2341:scheduler_2escm"),(void*)f_2341},
{C_text("f_2360:scheduler_2escm"),(void*)f_2360},
{C_text("f_2372:scheduler_2escm"),(void*)f_2372},
{C_text("f_2390:scheduler_2escm"),(void*)f_2390},
{C_text("f_2406:scheduler_2escm"),(void*)f_2406},
{C_text("f_2413:scheduler_2escm"),(void*)f_2413},
{C_text("f_2432:scheduler_2escm"),(void*)f_2432},
{C_text("f_2437:scheduler_2escm"),(void*)f_2437},
{C_text("f_2455:scheduler_2escm"),(void*)f_2455},
{C_text("f_2462:scheduler_2escm"),(void*)f_2462},
{C_text("f_2478:scheduler_2escm"),(void*)f_2478},
{C_text("f_2507:scheduler_2escm"),(void*)f_2507},
{C_text("f_2516:scheduler_2escm"),(void*)f_2516},
{C_text("f_2526:scheduler_2escm"),(void*)f_2526},
{C_text("f_2545:scheduler_2escm"),(void*)f_2545},
{C_text("f_2558:scheduler_2escm"),(void*)f_2558},
{C_text("f_2561:scheduler_2escm"),(void*)f_2561},
{C_text("f_2577:scheduler_2escm"),(void*)f_2577},
{C_text("f_2583:scheduler_2escm"),(void*)f_2583},
{C_text("f_2590:scheduler_2escm"),(void*)f_2590},
{C_text("f_2595:scheduler_2escm"),(void*)f_2595},
{C_text("f_2601:scheduler_2escm"),(void*)f_2601},
{C_text("f_2615:scheduler_2escm"),(void*)f_2615},
{C_text("f_2618:scheduler_2escm"),(void*)f_2618},
{C_text("f_2644:scheduler_2escm"),(void*)f_2644},
{C_text("f_2656:scheduler_2escm"),(void*)f_2656},
{C_text("f_2665:scheduler_2escm"),(void*)f_2665},
{C_text("f_2694:scheduler_2escm"),(void*)f_2694},
{C_text("f_2699:scheduler_2escm"),(void*)f_2699},
{C_text("f_2722:scheduler_2escm"),(void*)f_2722},
{C_text("f_930:scheduler_2escm"),(void*)f_930},
{C_text("f_933:scheduler_2escm"),(void*)f_933},
{C_text("f_935:scheduler_2escm"),(void*)f_935},
{C_text("f_941:scheduler_2escm"),(void*)f_941},
{C_text("f_968:scheduler_2escm"),(void*)f_968},
{C_text("f_978:scheduler_2escm"),(void*)f_978},
{C_text("toplevel:scheduler_2escm"),(void*)C_scheduler_toplevel},
{NULL,NULL}};
#endif

static C_PTABLE_ENTRY *create_ptable(void){
#ifdef C_ENABLE_PTABLES
return ptable;
#else
return NULL;
#endif
}

/*
S|applied compiler syntax:
S|  chicken.format#sprintf		3
S|  scheme#for-each		6
S|  ##sys#for-each		1
o|eliminated procedure checks: 101 
o|specializations:
o|  3 (chicken.base#add1 *)
o|  2 (chicken.base#sub1 *)
o|  1 (scheme#zero? *)
o|  3 (##sys#check-output-port * * *)
o|  10 (scheme#eqv? * (or eof null fixnum char boolean symbol keyword))
o|  3 (scheme#car pair)
o|  20 (scheme#cdr pair)
o|  4 (scheme#cdar (pair pair *))
(o e)|safe calls: 249 
(o e)|assignments to immediate values: 12 
o|inlining procedure: k943 
o|inlining procedure: k943 
o|inlining procedure: k1031 
o|inlining procedure: k1031 
o|contracted procedure: "(scheduler.scm:234) switch178" 
o|contracted procedure: "(scheduler.scm:170) ##sys#restore-thread-state-buffer" 
o|contracted procedure: "(scheduler.scm:229) remove-from-ready-queue" 
o|inlining procedure: k1235 
o|inlining procedure: k1235 
o|propagated global variable: first-pair239 ready-queue-head 
o|inlining procedure: k1074 
o|inlining procedure: k1074 
o|contracted procedure: "(scheduler.scm:226) ##sys#unblock-threads-for-i/o" 
o|inlining procedure: k2051 
o|inlining procedure: k2051 
o|inlining procedure: k2073 
o|inlining procedure: k2073 
o|inlining procedure: k2100 
o|inlining procedure: k2100 
o|inlining procedure: k2159 
o|inlining procedure: k2159 
o|substituted constant variable: a2193 
o|substituted constant variable: a2194 
o|inlining procedure: k2215 
o|inlining procedure: k2215 
o|contracted procedure: "(scheduler.scm:511) fdset-test" 
o|inlining procedure: k1894 
o|inlining procedure: k1894 
o|inlining procedure: k1912 
o|substituted constant variable: a1926 
o|substituted constant variable: a1927 
o|inlining procedure: k1912 
o|substituted constant variable: a1953 
o|substituted constant variable: a1958 
o|substituted constant variable: a1960 
o|substituted constant variable: a1965 
o|substituted constant variable: a1967 
o|contracted procedure: "(scheduler.scm:471) g524525" 
o|contracted procedure: "(scheduler.scm:461) create-fdset" 
o|inlining procedure: k1759 
o|inlining procedure: k1773 
o|inlining procedure: k1790 
o|inlining procedure: k1790 
o|substituted constant variable: a1813 
o|substituted constant variable: a1814 
o|substituted constant variable: a1834 
o|substituted constant variable: a1839 
o|substituted constant variable: a1841 
o|substituted constant variable: a1846 
o|substituted constant variable: a1848 
o|inlining procedure: k1773 
o|inlining procedure: k1759 
o|contracted procedure: "(scheduler.scm:408) g455456" 
o|inlining procedure: k1867 
o|inlining procedure: k1867 
o|contracted procedure: "(scheduler.scm:404) g398399" 
o|inlining procedure: k1092 
o|inlining procedure: k1092 
o|inlining procedure: k1113 
o|inlining procedure: k1113 
o|inlining procedure: k1147 
o|inlining procedure: k1147 
o|inlining procedure: k1169 
o|inlining procedure: k1169 
o|propagated global variable: ct184 ##sys#current-thread 
o|inlining procedure: k1221 
o|inlining procedure: k1221 
o|inlining procedure: k1314 
o|propagated global variable: ct263 ##sys#current-thread 
o|inlining procedure: k1314 
o|inlining procedure: k1348 
o|inlining procedure: k1348 
o|inlining procedure: k1366 
o|inlining procedure: k1366 
o|inlining procedure: k1383 
o|inlining procedure: k1404 
o|inlining procedure: k1404 
o|inlining procedure: k1383 
o|inlining procedure: k1455 
o|inlining procedure: k1455 
o|inlining procedure: k1612 
o|inlining procedure: k1623 
o|inlining procedure: k1623 
o|inlining procedure: k1612 
o|inlining procedure: k1642 
o|inlining procedure: k1642 
o|inlining procedure: k1676 
o|inlining procedure: k1676 
o|contracted procedure: "(scheduler.scm:349) ##sys#abandon-mutexes" 
o|inlining procedure: k1493 
o|inlining procedure: k1493 
o|inlining procedure: k1559 
o|contracted procedure: "(scheduler.scm:332) g305312" 
o|inlining procedure: k1513 
o|inlining procedure: k1513 
o|inlining procedure: k1533 
o|contracted procedure: "(scheduler.scm:339) g319326" 
o|inlining procedure: k1533 
o|inlining procedure: k1559 
o|propagated global variable: pt388 ##sys#primordial-thread 
o|inlining procedure: k1990 
o|inlining procedure: k1990 
o|inlining procedure: k2305 
o|inlining procedure: k2321 
o|inlining procedure: k2321 
o|inlining procedure: k2342 
o|inlining procedure: k2342 
o|inlining procedure: k2305 
o|inlining procedure: k2392 
o|inlining procedure: k2392 
o|inlining procedure: k2415 
o|inlining procedure: k2439 
o|inlining procedure: k2439 
o|inlining procedure: k2415 
o|inlining procedure: k2464 
o|inlining procedure: k2464 
o|inlining procedure: k2547 
o|inlining procedure: k2547 
o|propagated global variable: ct654 ##sys#current-thread 
o|propagated global variable: primordial660 ##sys#current-thread 
o|inlining procedure: k2667 
o|inlining procedure: k2667 
o|inlining procedure: k2701 
o|inlining procedure: k2701 
o|propagated global variable: g681693 fd-list 
o|inlining procedure: k2724 
o|inlining procedure: k2724 
o|propagated global variable: g671686 timeout-list 
o|propagated global variable: primordial660 ##sys#current-thread 
o|replaced variables: 442 
o|removed binding forms: 186 
o|inlining procedure: k1245 
o|inlining procedure: k1245 
o|substituted constant variable: r12362749 
o|inlining procedure: k2276 
o|inlining procedure: k2276 
o|substituted constant variable: r11482780 
o|substituted constant variable: r11702783 
o|substituted constant variable: r23222845 
o|converted assignments to bindings: (suspend661) 
o|simplifications: ((let . 1)) 
o|replaced variables: 69 
o|removed binding forms: 371 
o|inlining procedure: k1040 
o|inlining procedure: k1856 
o|replaced variables: 8 
o|removed binding forms: 52 
o|substituted constant variable: r10412963 
o|contracted procedure: k987 
o|contracted procedure: k1750 
o|removed binding forms: 11 
o|removed conditional forms: 1 
o|removed binding forms: 2 
o|simplifications: ((if . 17) (let . 19) (##core#call . 242)) 
o|  call simplifications:
o|    scheme#*
o|    scheme#+
o|    ##sys#call-with-current-continuation
o|    scheme#vector
o|    scheme#list	2
o|    ##sys#structure?	2
o|    scheme#>
o|    scheme#<
o|    chicken.fixnum#fx=	2
o|    scheme#set-cdr!	3
o|    scheme#equal?
o|    scheme#>=
o|    ##sys#setislot	18
o|    scheme#caar	7
o|    scheme#-	2
o|    chicken.fixnum#fx>
o|    scheme#pair?	16
o|    scheme#car	12
o|    scheme#cdr	8
o|    scheme#not	6
o|    ##sys#setslot	30
o|    scheme#null?	26
o|    scheme#eq?	26
o|    scheme#cons	16
o|    ##sys#slot	57
o|contracted procedure: k946 
o|contracted procedure: k974 
o|contracted procedure: k952 
o|contracted procedure: k962 
o|contracted procedure: k970 
o|contracted procedure: k1001 
o|contracted procedure: k1034 
o|contracted procedure: k1046 
o|contracted procedure: k1040 
o|contracted procedure: k1065 
o|contracted procedure: k1055 
o|contracted procedure: k984 
o|contracted procedure: k1284 
o|contracted procedure: k1288 
o|contracted procedure: k1292 
o|contracted procedure: k1296 
o|contracted procedure: k1300 
o|contracted procedure: k1304 
o|contracted procedure: k1308 
o|contracted procedure: k991 
o|contracted procedure: k998 
o|contracted procedure: k1254 
o|contracted procedure: k1238 
o|contracted procedure: k1241 
o|propagated global variable: first-pair239 ready-queue-head 
o|contracted procedure: k1249 
o|contracted procedure: k1077 
o|contracted procedure: k2037 
o|contracted procedure: k2040 
o|contracted procedure: k2048 
o|contracted procedure: k2054 
o|contracted procedure: k2063 
o|contracted procedure: k2077 
o|contracted procedure: k2080 
o|contracted procedure: k2083 
o|contracted procedure: k2089 
o|contracted procedure: k2103 
o|contracted procedure: k2109 
o|contracted procedure: k2120 
o|contracted procedure: k2127 
o|contracted procedure: k2139 
o|contracted procedure: k2142 
o|contracted procedure: k2145 
o|contracted procedure: k2151 
o|contracted procedure: k2258 
o|contracted procedure: k2162 
o|contracted procedure: k2176 
o|contracted procedure: k2254 
o|contracted procedure: k2250 
o|contracted procedure: k2185 
o|contracted procedure: k2232 
o|contracted procedure: k2244 
o|contracted procedure: k1897 
o|contracted procedure: k1900 
o|contracted procedure: k1906 
o|contracted procedure: k1909 
o|contracted procedure: k1915 
o|contracted procedure: k2279 
o|contracted procedure: k2282 
o|contracted procedure: k2292 
o|contracted procedure: k1762 
o|contracted procedure: k1765 
o|contracted procedure: k1770 
o|contracted procedure: k1776 
o|contracted procedure: k1783 
o|contracted procedure: k1786 
o|contracted procedure: k1793 
o|contracted procedure: k1796 
o|contracted procedure: k1803 
o|contracted procedure: k1870 
o|contracted procedure: k1880 
o|contracted procedure: k1884 
o|contracted procedure: k1083 
o|contracted procedure: k1095 
o|contracted procedure: k1099 
o|contracted procedure: k1104 
o|contracted procedure: k1110 
o|contracted procedure: k1116 
o|contracted procedure: k1119 
o|contracted procedure: k1140 
o|contracted procedure: k1150 
o|contracted procedure: k1159 
o|contracted procedure: k1166 
o|contracted procedure: k1172 
o|contracted procedure: k1183 
o|contracted procedure: k1186 
o|contracted procedure: k1189 
o|propagated global variable: ct184 ##sys#current-thread 
o|contracted procedure: k1201 
o|contracted procedure: k1215 
o|contracted procedure: k1218 
o|contracted procedure: k1225 
o|contracted procedure: k1221 
o|contracted procedure: k1260 
o|contracted procedure: k1263 
o|contracted procedure: k1266 
o|contracted procedure: k1269 
o|contracted procedure: k1272 
o|contracted procedure: k1275 
o|contracted procedure: k1320 
o|contracted procedure: k1323 
o|contracted procedure: k1351 
o|contracted procedure: k1354 
o|contracted procedure: k1357 
o|contracted procedure: k1377 
o|contracted procedure: k1363 
o|contracted procedure: k1386 
o|contracted procedure: k1392 
o|contracted procedure: k1395 
o|contracted procedure: k1407 
o|contracted procedure: k1424 
o|contracted procedure: k1420 
o|contracted procedure: k1432 
o|contracted procedure: k1428 
o|contracted procedure: k1439 
o|contracted procedure: k1446 
o|contracted procedure: k1452 
o|contracted procedure: k1458 
o|contracted procedure: k1461 
o|contracted procedure: k1481 
o|contracted procedure: k1477 
o|contracted procedure: k1464 
o|contracted procedure: k1467 
o|contracted procedure: k1470 
o|contracted procedure: k1585 
o|contracted procedure: k1597 
o|contracted procedure: k1600 
o|contracted procedure: k1603 
o|contracted procedure: k1606 
o|contracted procedure: k1609 
o|contracted procedure: k1618 
o|contracted procedure: k1633 
o|contracted procedure: k1626 
o|contracted procedure: k1645 
o|contracted procedure: k1655 
o|contracted procedure: k1659 
o|contracted procedure: k1662 
o|contracted procedure: k1673 
o|contracted procedure: k1679 
o|contracted procedure: k1690 
o|contracted procedure: k1490 
o|contracted procedure: k1496 
o|contracted procedure: k1562 
o|contracted procedure: k1572 
o|contracted procedure: k1576 
o|contracted procedure: k1501 
o|contracted procedure: k1504 
o|contracted procedure: k1507 
o|contracted procedure: k1510 
o|contracted procedure: k1519 
o|contracted procedure: k1536 
o|contracted procedure: k1546 
o|contracted procedure: k1550 
o|contracted procedure: k1696 
o|contracted procedure: k1699 
o|contracted procedure: k1711 
o|contracted procedure: k1720 
o|contracted procedure: k1723 
o|propagated global variable: pt388 ##sys#primordial-thread 
o|propagated global variable: pt388 ##sys#primordial-thread 
o|contracted procedure: k1974 
o|contracted procedure: k1977 
o|contracted procedure: k1984 
o|contracted procedure: k1993 
o|contracted procedure: k2001 
o|contracted procedure: k1997 
o|contracted procedure: k2004 
o|contracted procedure: k2028 
o|contracted procedure: k2010 
o|contracted procedure: k2017 
o|contracted procedure: k2368 
o|contracted procedure: k2308 
o|contracted procedure: k2364 
o|contracted procedure: k2311 
o|contracted procedure: k2324 
o|contracted procedure: k2327 
o|contracted procedure: k2330 
o|contracted procedure: k2336 
o|contracted procedure: k2345 
o|contracted procedure: k2349 
o|contracted procedure: k2504 
o|contracted procedure: k2374 
o|contracted procedure: k2498 
o|contracted procedure: k2377 
o|contracted procedure: k2492 
o|contracted procedure: k2380 
o|contracted procedure: k2486 
o|contracted procedure: k2383 
o|contracted procedure: k2395 
o|contracted procedure: k2418 
o|contracted procedure: k2427 
o|contracted procedure: k2442 
o|contracted procedure: k2449 
o|contracted procedure: k2467 
o|contracted procedure: k2480 
o|contracted procedure: k2518 
o|contracted procedure: k2529 
o|contracted procedure: k2533 
o|contracted procedure: k2537 
o|contracted procedure: k2541 
o|contracted procedure: k2573 
o|contracted procedure: k2550 
o|contracted procedure: k2569 
o|contracted procedure: k2585 
o|propagated global variable: ct654 ##sys#current-thread 
o|contracted procedure: k2611 
o|contracted procedure: k2607 
o|contracted procedure: k2629 
o|contracted procedure: k2620 
o|contracted procedure: k2623 
o|contracted procedure: k2637 
o|contracted procedure: k2650 
o|contracted procedure: k2658 
o|contracted procedure: k2670 
o|contracted procedure: k2680 
o|contracted procedure: k2684 
o|contracted procedure: k2704 
o|contracted procedure: k2714 
o|contracted procedure: k2718 
o|contracted procedure: k2727 
o|contracted procedure: k2737 
o|contracted procedure: k2741 
o|propagated global variable: primordial660 ##sys#current-thread 
o|simplifications: ((if . 2) (let . 67)) 
o|removed binding forms: 217 
o|contracted procedure: k1410 
o|inlining procedure: k1565 
o|inlining procedure: k1565 
(o x)|known list op on rest arg sublist: ##core#rest-null? rest601602 0 
(o x)|known list op on rest arg sublist: ##core#rest-car rest601602 0 
(o x)|known list op on rest arg sublist: ##core#rest-null? rest601602 0 
(o x)|known list op on rest arg sublist: ##core#rest-cdr rest601602 0 
o|contracted procedure: k2553 
o|removed binding forms: 2 
(o x)|known list op on rest arg sublist: ##core#rest-null? r2378 1 
(o x)|known list op on rest arg sublist: ##core#rest-car r2378 1 
(o x)|known list op on rest arg sublist: ##core#rest-null? r2378 1 
(o x)|known list op on rest arg sublist: ##core#rest-cdr r2378 1 
o|removed binding forms: 1 
o|removed binding forms: 2 
o|direct leaf routine/allocation: ##sys#update-thread-state-buffer 0 
o|direct leaf routine/allocation: loop270 0 
o|direct leaf routine/allocation: suspend661 0 
o|direct leaf routine/allocation: g665685 0 
o|contracted procedure: "(scheduler.scm:180) k1004" 
o|contracted procedure: "(scheduler.scm:223) k1068" 
o|propagated global variable: ct184 ##sys#current-thread 
o|propagated global variable: ct184 ##sys#current-thread 
o|converted assignments to bindings: (loop270) 
o|contracted procedure: "(scheduler.scm:629) k2641" 
o|contracted procedure: "(scheduler.scm:631) k2673" 
o|contracted procedure: "(scheduler.scm:630) k2730" 
o|simplifications: ((let . 1)) 
o|removed binding forms: 5 
o|direct leaf routine/allocation: for-each-loop697707 0 
o|direct leaf routine/allocation: for-each-loop664688 0 
o|contracted procedure: k2653 
o|converted assignments to bindings: (for-each-loop697707) 
o|converted assignments to bindings: (for-each-loop664688) 
o|simplifications: ((let . 2)) 
o|removed binding forms: 1 
o|direct leaf routine with hoistable closures/allocation: g675692 (for-each-loop697707) 0 
o|contracted procedure: "(scheduler.scm:631) k2707" 
o|removed binding forms: 2 
o|direct leaf routine/allocation: for-each-loop674711 0 
o|contracted procedure: k2687 
o|converted assignments to bindings: (for-each-loop674711) 
o|simplifications: ((let . 1)) 
o|removed binding forms: 1 
o|customizable procedures: (loop627 loop624 loop620 loop617 loop586 loop508 for-each-loop318329 for-each-loop304337 delq k1588 g353360 for-each-loop352363 loop279 k1137 ##sys#clear-i/o-state-for-thread! loop193 g412419 for-each-loop411451 loop404 k2218 loop2553 loop539 k1028 loop2210 loop1191 loop170) 
o|shared closure containers: 14 
o|shared closure users: 16 
o|calls to known targets: 73 
o|identified direct recursive calls: f_941 1 
o|identified direct recursive calls: f_2098 1 
o|identified direct recursive calls: f_2071 1 
o|identified direct recursive calls: f_1090 1 
o|identified direct recursive calls: f_1346 1 
o|identified direct recursive calls: f_1402 1 
o|identified direct recursive calls: f_1557 1 
o|identified direct recursive calls: f_1988 1 
o|identified direct recursive calls: f_2319 1 
o|identified direct recursive calls: f_2437 1 
o|unused rest argument: rest601602 f_2372 
o|identified direct recursive calls: f_2722 1 
o|identified direct recursive calls: f_2665 1 
o|identified direct recursive calls: f_2699 1 
o|fast box initializations: 18 
o|fast global references: 48 
o|fast global assignments: 31 
o|dropping unused closure argument: f_1258 
o|dropping unused closure argument: f_2303 
o|dropping unused closure argument: f_935 
*/
/* end of file */
