/*===========================================================================*/
/*   (Llib/socket.scm)                                                       */
/*   Bigloo (2.6b)                                                           */
/*   Inria -- Sophia Antipolis (c)       Mon Dec 15 12:14:36 CET 2003        */
/*===========================================================================*/
/* COMPILATION: (/users/serrano/prgm/project/bigloo/bin/bigloo -O4 -mklib -cc gcc-2.95 -fsharing -q -s -copt -DBGL_NO_PIC -unsafe -c Llib/socket.scm -indent -o objs/obj_u/Llib/socket.c)*/
/* GC selection */
#define THE_GC BOEHM_GC

#include <bigloo.h>
#include <signal.h>

static obj_t BGl__socketzd2outputzd2zz__socketz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_modulezd2initializa7ationz75zz__socketz00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zz__errorz00(long, char *);
static obj_t BGl__makezd2serverzd2socketz00zz__socketz00(obj_t, obj_t);
static obj_t BGl__socketzd2inputzd2zz__socketz00(obj_t, obj_t);
static obj_t BGl__socketzd2serverzf3z21zz__socketz00(obj_t, obj_t);
BGL_EXPORTED_DECL bool_t BGl_socketzd2serverzf3z21zz__socketz00(obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2localzd2addressz00zz__socketz00(obj_t);
static obj_t BGl__makezd2clientzd2socketz00zz__socketz00(obj_t, obj_t, obj_t, obj_t);
extern obj_t socket_close(obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2hostzd2addressz00zz__socketz00(obj_t);
extern obj_t socket_accept(obj_t, bool_t, bool_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2acceptzd2connectionz00zz__socketz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_makezd2clientzd2socketz00zz__socketz00(obj_t, int, obj_t);
BGL_EXPORTED_DECL bool_t BGl_socketzd2clientzf3z21zz__socketz00(obj_t);
static obj_t BGl__socketzd2acceptzd2connectionz00zz__socketz00(obj_t, obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2portzd2numberz00zz__socketz00(obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2inputzd2zz__socketz00(obj_t);
extern obj_t make_client_socket(obj_t, int, bool_t);
static obj_t BGl__socketzd2clientzf3z21zz__socketz00(obj_t, obj_t);
static obj_t BGl_importedzd2moduleszd2initz00zz__socketz00();
extern obj_t socket_local_addr(obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2closezd2zz__socketz00(obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2outputzd2zz__socketz00(obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2dupzd2zz__socketz00(obj_t);
extern obj_t make_server_socket(int);
static obj_t BGl__socketzd2hostnamezd2zz__socketz00(obj_t, obj_t);
extern obj_t socket_shutdown(obj_t, bool_t);
static obj_t BGl_requirezd2initializa7ationz75zz__socketz00 = BUNSPEC;
static obj_t BGl__socketzd2downzf3z21zz__socketz00(obj_t, obj_t);
static obj_t BGl__socketzd2localzd2addressz00zz__socketz00(obj_t, obj_t);
extern obj_t socket_accept_connection(obj_t, bool_t);
BGL_EXPORTED_DECL obj_t BGl_makezd2serverzd2socketz00zz__socketz00(obj_t);
extern obj_t socket_dup(obj_t);
static obj_t BGl__socketzd2acceptzd2zz__socketz00(obj_t, obj_t, obj_t);
static obj_t BGl__socketzf3zf3zz__socketz00(obj_t, obj_t);
static obj_t BGl__socketzd2dupzd2zz__socketz00(obj_t, obj_t);
BGL_EXPORTED_DECL bool_t BGl_socketzf3zf3zz__socketz00(obj_t);
static obj_t BGl__socketzd2shutdownzd2zz__socketz00(obj_t, obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2shutdownzd2zz__socketz00(obj_t, obj_t);
static obj_t BGl__socketzd2portzd2numberz00zz__socketz00(obj_t, obj_t);
static obj_t BGl__socketzd2hostzd2addressz00zz__socketz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2hostnamezd2zz__socketz00(obj_t);
BGL_EXPORTED_DECL bool_t BGl_socketzd2downzf3z21zz__socketz00(obj_t);
BGL_EXPORTED_DECL obj_t BGl_socketzd2acceptzd2zz__socketz00(obj_t, obj_t);
static obj_t BGl__socketzd2closezd2zz__socketz00(obj_t, obj_t);
static obj_t *__cnst;


DEFINE_EXPORT_PROCEDURE( BGl_socketzd2shutdownzd2envz00zz__socketz00, BgL_bgl__socketza7d2shutdownza7d2za7za7__socketza7001750za7, va_generic_entry, BGl__socketzd2shutdownzd2zz__socketz00, -2 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzf3zd2envz21zz__socketz00, BgL_bgl__socketza7f3za7f3za7za7__socketza7001751za7, BGl__socketzf3zf3zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2dupzd2envz00zz__socketz00, BgL_bgl__socketza7d2dupza7d2za7za7__socketza7001752za7, BGl__socketzd2dupzd2zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2outputzd2envz00zz__socketz00, BgL_bgl__socketza7d2outputza7d2za7za7__socketza7001753za7, BGl__socketzd2outputzd2zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2closezd2envz00zz__socketz00, BgL_bgl__socketza7d2closeza7d2za7za7__socketza7001754za7, BGl__socketzd2closezd2zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2downzf3zd2envzf3zz__socketz00, BgL_bgl__socketza7d2downza7f3za721za7za7__socketza7001755z00, BGl__socketzd2downzf3z21zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2hostnamezd2envz00zz__socketz00, BgL_bgl__socketza7d2hostnameza7d2za7za7__socketza7001756za7, BGl__socketzd2hostnamezd2zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2inputzd2envz00zz__socketz00, BgL_bgl__socketza7d2inputza7d2za7za7__socketza7001757za7, BGl__socketzd2inputzd2zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2hostzd2addresszd2envzd2zz__socketz00, BgL_bgl__socketza7d2hostza7d2addressza700za7za7__socketza7001758z00, BGl__socketzd2hostzd2addressz00zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2portzd2numberzd2envzd2zz__socketz00, BgL_bgl__socketza7d2portza7d2numberza700za7za7__socketza7001759z00, BGl__socketzd2portzd2numberz00zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_makezd2clientzd2socketzd2envzd2zz__socketz00, BgL_bgl__makeza7d2clientza7d2socketza700za7za7__socketza7001760z00, va_generic_entry, BGl__makezd2clientzd2socketz00zz__socketz00, -3 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2clientzf3zd2envzf3zz__socketz00, BgL_bgl__socketza7d2clientza7f3za721za7za7__socketza7001761z00, BGl__socketzd2clientzf3z21zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_makezd2serverzd2socketzd2envzd2zz__socketz00, BgL_bgl__makeza7d2serverza7d2socketza700za7za7__socketza7001762z00, va_generic_entry, BGl__makezd2serverzd2socketz00zz__socketz00, -1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2serverzf3zd2envzf3zz__socketz00, BgL_bgl__socketza7d2serverza7f3za721za7za7__socketza7001763z00, BGl__socketzd2serverzf3z21zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2acceptzd2envz00zz__socketz00, BgL_bgl__socketza7d2acceptza7d2za7za7__socketza7001764za7, va_generic_entry, BGl__socketzd2acceptzd2zz__socketz00, -2 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2localzd2addresszd2envzd2zz__socketz00, BgL_bgl__socketza7d2localza7d2addressza700za7za7__socketza7001765z00, BGl__socketzd2localzd2addressz00zz__socketz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_socketzd2acceptzd2connectionzd2envzd2zz__socketz00, BgL_bgl__socketza7d2acceptza7d2connectionza700za7za7__socketza7001766z00, va_generic_entry, BGl__socketzd2acceptzd2connectionz00zz__socketz00, -2 );



/* module-initialization */
BGL_EXPORTED_DEF obj_t BGl_modulezd2initializa7ationz75zz__socketz00(long BgL_checksumz00_664, char * BgL_fromz00_665)
{ AN_OBJECT;
{ 
if(
CBOOL(BGl_requirezd2initializa7ationz75zz__socketz00))
{ 
BGl_requirezd2initializa7ationz75zz__socketz00 = 
BBOOL(((bool_t)0)); 
BGl_importedzd2moduleszd2initz00zz__socketz00(); 
return BUNSPEC;}  else 
{ 
return BUNSPEC;} } 
}



/* socket? */
BGL_EXPORTED_DEF bool_t BGl_socketzf3zf3zz__socketz00(obj_t BgL_objz00_1)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 134 */
return 
SOCKETP(BgL_objz00_1);} 
}



/* _socket? */
obj_t BGl__socketzf3zf3zz__socketz00(obj_t BgL_envz00_579, obj_t BgL_objz00_580)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 134 */
{ /* ./Llib/socket.scm 135 */
bool_t BgL_auxz00_671;
BgL_auxz00_671 = 
SOCKETP(BgL_objz00_580); 
return 
BBOOL(BgL_auxz00_671);} } 
}



/* socket-server? */
BGL_EXPORTED_DEF bool_t BGl_socketzd2serverzf3z21zz__socketz00(obj_t BgL_objz00_2)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 140 */
return 
SOCKET_SERVERP(BgL_objz00_2);} 
}



/* _socket-server? */
obj_t BGl__socketzd2serverzf3z21zz__socketz00(obj_t BgL_envz00_581, obj_t BgL_objz00_582)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 140 */
{ /* ./Llib/socket.scm 141 */
bool_t BgL_auxz00_675;
BgL_auxz00_675 = 
SOCKET_SERVERP(BgL_objz00_582); 
return 
BBOOL(BgL_auxz00_675);} } 
}



/* socket-client? */
BGL_EXPORTED_DEF bool_t BGl_socketzd2clientzf3z21zz__socketz00(obj_t BgL_objz00_3)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 146 */
return 
SOCKET_CLIENTP(BgL_objz00_3);} 
}



/* _socket-client? */
obj_t BGl__socketzd2clientzf3z21zz__socketz00(obj_t BgL_envz00_583, obj_t BgL_objz00_584)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 146 */
{ /* ./Llib/socket.scm 147 */
bool_t BgL_auxz00_679;
BgL_auxz00_679 = 
SOCKET_CLIENTP(BgL_objz00_584); 
return 
BBOOL(BgL_auxz00_679);} } 
}



/* socket-hostname */
BGL_EXPORTED_DEF obj_t BGl_socketzd2hostnamezd2zz__socketz00(obj_t BgL_socketz00_4)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 152 */
return 
SOCKET_HOSTNAME(BgL_socketz00_4);} 
}



/* _socket-hostname */
obj_t BGl__socketzd2hostnamezd2zz__socketz00(obj_t BgL_envz00_585, obj_t BgL_socketz00_586)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 152 */
return 
SOCKET_HOSTNAME(BgL_socketz00_586);} 
}



/* socket-host-address */
BGL_EXPORTED_DEF obj_t BGl_socketzd2hostzd2addressz00zz__socketz00(obj_t BgL_socketz00_5)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 158 */
return 
SOCKET_HOSTIP(BgL_socketz00_5);} 
}



/* _socket-host-address */
obj_t BGl__socketzd2hostzd2addressz00zz__socketz00(obj_t BgL_envz00_587, obj_t BgL_socketz00_588)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 158 */
return 
SOCKET_HOSTIP(BgL_socketz00_588);} 
}



/* socket-local-address */
BGL_EXPORTED_DEF obj_t BGl_socketzd2localzd2addressz00zz__socketz00(obj_t BgL_socketz00_6)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 164 */
return 
socket_local_addr(BgL_socketz00_6);} 
}



/* _socket-local-address */
obj_t BGl__socketzd2localzd2addressz00zz__socketz00(obj_t BgL_envz00_589, obj_t BgL_socketz00_590)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 164 */
return 
socket_local_addr(BgL_socketz00_590);} 
}



/* socket-down? */
BGL_EXPORTED_DEF bool_t BGl_socketzd2downzf3z21zz__socketz00(obj_t BgL_socketz00_7)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 170 */
return 
SOCKET_DOWNP(BgL_socketz00_7);} 
}



/* _socket-down? */
obj_t BGl__socketzd2downzf3z21zz__socketz00(obj_t BgL_envz00_591, obj_t BgL_socketz00_592)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 170 */
{ /* ./Llib/socket.scm 171 */
bool_t BgL_auxz00_689;
BgL_auxz00_689 = 
SOCKET_DOWNP(BgL_socketz00_592); 
return 
BBOOL(BgL_auxz00_689);} } 
}



/* socket-port-number */
BGL_EXPORTED_DEF obj_t BGl_socketzd2portzd2numberz00zz__socketz00(obj_t BgL_socketz00_8)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 176 */
{ /* ./Llib/socket.scm 177 */
int BgL_auxz00_692;
BgL_auxz00_692 = 
SOCKET_PORT(BgL_socketz00_8); 
return 
BINT(BgL_auxz00_692);} } 
}



/* _socket-port-number */
obj_t BGl__socketzd2portzd2numberz00zz__socketz00(obj_t BgL_envz00_593, obj_t BgL_socketz00_594)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 176 */
{ /* ./Llib/socket.scm 177 */
int BgL_auxz00_695;
BgL_auxz00_695 = 
SOCKET_PORT(BgL_socketz00_594); 
return 
BINT(BgL_auxz00_695);} } 
}



/* socket-input */
BGL_EXPORTED_DEF obj_t BGl_socketzd2inputzd2zz__socketz00(obj_t BgL_socketz00_9)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 182 */
return 
SOCKET_INPUT(BgL_socketz00_9);} 
}



/* _socket-input */
obj_t BGl__socketzd2inputzd2zz__socketz00(obj_t BgL_envz00_595, obj_t BgL_socketz00_596)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 182 */
return 
SOCKET_INPUT(BgL_socketz00_596);} 
}



/* socket-output */
BGL_EXPORTED_DEF obj_t BGl_socketzd2outputzd2zz__socketz00(obj_t BgL_socketz00_10)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 188 */
return 
SOCKET_OUTPUT(BgL_socketz00_10);} 
}



/* _socket-output */
obj_t BGl__socketzd2outputzd2zz__socketz00(obj_t BgL_envz00_597, obj_t BgL_socketz00_598)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 188 */
return 
SOCKET_OUTPUT(BgL_socketz00_598);} 
}



/* make-client-socket */
BGL_EXPORTED_DEF obj_t BGl_makezd2clientzd2socketz00zz__socketz00(obj_t BgL_hostnamez00_11, int BgL_portzd2numberzd2_12, obj_t BgL_bufferedz00_13)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 194 */
{ /* ./Llib/socket.scm 197 */
bool_t BgL_arg1020z00_628;
{ /* ./Llib/socket.scm 197 */
bool_t BgL__ortest_1003z00_629;
BgL__ortest_1003z00_629 = 
NULLP(BgL_bufferedz00_13); 
if(BgL__ortest_1003z00_629)
{ /* ./Llib/socket.scm 197 */
BgL_arg1020z00_628 = BgL__ortest_1003z00_629; }  else 
{ /* ./Llib/socket.scm 197 */
obj_t BgL_auxz00_704;
BgL_auxz00_704 = 
CAR(BgL_bufferedz00_13); 
BgL_arg1020z00_628 = 
(BgL_auxz00_704==BTRUE); } } 
return 
make_client_socket(BgL_hostnamez00_11, BgL_portzd2numberzd2_12, BgL_arg1020z00_628);} } 
}



/* _make-client-socket */
obj_t BGl__makezd2clientzd2socketz00zz__socketz00(obj_t BgL_envz00_599, obj_t BgL_hostnamez00_600, obj_t BgL_portzd2numberzd2_601, obj_t BgL_bufferedz00_602)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 194 */
{ /* ./Llib/socket.scm 197 */
obj_t BgL_res1744z00_635;
{ /* ./Llib/socket.scm 197 */
int BgL_portzd2numberzd2_631;
BgL_portzd2numberzd2_631 = 
CINT(BgL_portzd2numberzd2_601); 
{ /* ./Llib/socket.scm 197 */
bool_t BgL_arg1020z00_633;
{ /* ./Llib/socket.scm 197 */
bool_t BgL__ortest_1003z00_634;
BgL__ortest_1003z00_634 = 
NULLP(BgL_bufferedz00_602); 
if(BgL__ortest_1003z00_634)
{ /* ./Llib/socket.scm 197 */
BgL_arg1020z00_633 = BgL__ortest_1003z00_634; }  else 
{ /* ./Llib/socket.scm 197 */
obj_t BgL_auxz00_711;
BgL_auxz00_711 = 
CAR(BgL_bufferedz00_602); 
BgL_arg1020z00_633 = 
(BgL_auxz00_711==BTRUE); } } 
BgL_res1744z00_635 = 
make_client_socket(BgL_hostnamez00_600, BgL_portzd2numberzd2_631, BgL_arg1020z00_633); } } 
return BgL_res1744z00_635;} } 
}



/* make-server-socket */
BGL_EXPORTED_DEF obj_t BGl_makezd2serverzd2socketz00zz__socketz00(obj_t BgL_portzd2numberzd2_14)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 202 */
{ /* ./Llib/socket.scm 203 */
obj_t BgL_arg1028z00_636;
if(
NULLP(BgL_portzd2numberzd2_14))
{ /* ./Llib/socket.scm 203 */
BgL_arg1028z00_636 = 
BINT(((long)0)); }  else 
{ /* ./Llib/socket.scm 203 */
BgL_arg1028z00_636 = 
CAR(BgL_portzd2numberzd2_14); } 
{ /* ./Llib/socket.scm 203 */
int BgL_auxz00_719;
BgL_auxz00_719 = 
CINT(BgL_arg1028z00_636); 
return 
make_server_socket(BgL_auxz00_719);} } } 
}



/* _make-server-socket */
obj_t BGl__makezd2serverzd2socketz00zz__socketz00(obj_t BgL_envz00_603, obj_t BgL_portzd2numberzd2_604)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 202 */
{ /* ./Llib/socket.scm 203 */
obj_t BgL_res1745z00_639;
{ /* ./Llib/socket.scm 203 */
obj_t BgL_arg1028z00_638;
if(
NULLP(BgL_portzd2numberzd2_604))
{ /* ./Llib/socket.scm 203 */
BgL_arg1028z00_638 = 
BINT(((long)0)); }  else 
{ /* ./Llib/socket.scm 203 */
BgL_arg1028z00_638 = 
CAR(BgL_portzd2numberzd2_604); } 
{ /* ./Llib/socket.scm 203 */
int BgL_auxz00_726;
BgL_auxz00_726 = 
CINT(BgL_arg1028z00_638); 
BgL_res1745z00_639 = 
make_server_socket(BgL_auxz00_726); } } 
return BgL_res1745z00_639;} } 
}



/* socket-accept-connection */
BGL_EXPORTED_DEF obj_t BGl_socketzd2acceptzd2connectionz00zz__socketz00(obj_t BgL_socketz00_15, obj_t BgL_bufferedz00_16)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 208 */
{ /* ./Llib/socket.scm 209 */
bool_t BgL_bufz00_640;
{ /* ./Llib/socket.scm 209 */
bool_t BgL__ortest_1004z00_641;
BgL__ortest_1004z00_641 = 
NULLP(BgL_bufferedz00_16); 
if(BgL__ortest_1004z00_641)
{ /* ./Llib/socket.scm 209 */
BgL_bufz00_640 = BgL__ortest_1004z00_641; }  else 
{ /* ./Llib/socket.scm 209 */
obj_t BgL_auxz00_731;
BgL_auxz00_731 = 
CAR(BgL_bufferedz00_16); 
BgL_bufz00_640 = 
(BgL_auxz00_731==BTRUE); } } 
return 
socket_accept_connection(BgL_socketz00_15, BgL_bufz00_640);} } 
}



/* _socket-accept-connection */
obj_t BGl__socketzd2acceptzd2connectionz00zz__socketz00(obj_t BgL_envz00_605, obj_t BgL_socketz00_606, obj_t BgL_bufferedz00_607)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 208 */
{ /* ./Llib/socket.scm 209 */
bool_t BgL_bufz00_644;
{ /* ./Llib/socket.scm 209 */
bool_t BgL__ortest_1004z00_645;
BgL__ortest_1004z00_645 = 
NULLP(BgL_bufferedz00_607); 
if(BgL__ortest_1004z00_645)
{ /* ./Llib/socket.scm 209 */
BgL_bufz00_644 = BgL__ortest_1004z00_645; }  else 
{ /* ./Llib/socket.scm 209 */
obj_t BgL_auxz00_737;
BgL_auxz00_737 = 
CAR(BgL_bufferedz00_607); 
BgL_bufz00_644 = 
(BgL_auxz00_737==BTRUE); } } 
return 
socket_accept_connection(BgL_socketz00_606, BgL_bufz00_644);} } 
}



/* socket-accept */
BGL_EXPORTED_DEF obj_t BGl_socketzd2acceptzd2zz__socketz00(obj_t BgL_socketz00_17, obj_t BgL_bufferedz00_18)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 215 */
{ /* ./Llib/socket.scm 216 */
bool_t BgL_bufz00_646;obj_t BgL_errpz00_647;
{ /* ./Llib/socket.scm 216 */
bool_t BgL__ortest_1005z00_648;
BgL__ortest_1005z00_648 = 
NULLP(BgL_bufferedz00_18); 
if(BgL__ortest_1005z00_648)
{ /* ./Llib/socket.scm 216 */
BgL_bufz00_646 = BgL__ortest_1005z00_648; }  else 
{ /* ./Llib/socket.scm 216 */
obj_t BgL_auxz00_743;
BgL_auxz00_743 = 
CAR(BgL_bufferedz00_18); 
BgL_bufz00_646 = 
(BgL_auxz00_743==BTRUE); } } 
{ /* ./Llib/socket.scm 216 */
bool_t BgL__ortest_1006z00_649;
BgL__ortest_1006z00_649 = 
NULLP(BgL_bufferedz00_18); 
if(BgL__ortest_1006z00_649)
{ /* ./Llib/socket.scm 216 */
BgL_errpz00_647 = 
BBOOL(BgL__ortest_1006z00_649); }  else 
{ /* ./Llib/socket.scm 216 */
bool_t BgL__ortest_1007z00_650;
{ /* ./Llib/socket.scm 216 */
obj_t BgL_auxz00_749;
BgL_auxz00_749 = 
CDR(BgL_bufferedz00_18); 
BgL__ortest_1007z00_650 = 
NULLP(BgL_auxz00_749); } 
if(BgL__ortest_1007z00_650)
{ /* ./Llib/socket.scm 216 */
BgL_errpz00_647 = 
BBOOL(BgL__ortest_1007z00_650); }  else 
{ /* ./Llib/socket.scm 216 */
obj_t BgL_auxz00_754;
BgL_auxz00_754 = 
CDR(BgL_bufferedz00_18); 
BgL_errpz00_647 = 
CAR(BgL_auxz00_754); } } } 
{ /* ./Llib/socket.scm 216 */
bool_t BgL_auxz00_757;
BgL_auxz00_757 = 
CBOOL(BgL_errpz00_647); 
return 
socket_accept(BgL_socketz00_17, BgL_bufz00_646, BgL_auxz00_757);} } } 
}



/* _socket-accept */
obj_t BGl__socketzd2acceptzd2zz__socketz00(obj_t BgL_envz00_608, obj_t BgL_socketz00_609, obj_t BgL_bufferedz00_610)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 215 */
{ /* ./Llib/socket.scm 216 */
bool_t BgL_bufz00_653;obj_t BgL_errpz00_654;
{ /* ./Llib/socket.scm 216 */
bool_t BgL__ortest_1005z00_655;
BgL__ortest_1005z00_655 = 
NULLP(BgL_bufferedz00_610); 
if(BgL__ortest_1005z00_655)
{ /* ./Llib/socket.scm 216 */
BgL_bufz00_653 = BgL__ortest_1005z00_655; }  else 
{ /* ./Llib/socket.scm 216 */
obj_t BgL_auxz00_762;
BgL_auxz00_762 = 
CAR(BgL_bufferedz00_610); 
BgL_bufz00_653 = 
(BgL_auxz00_762==BTRUE); } } 
{ /* ./Llib/socket.scm 216 */
bool_t BgL__ortest_1006z00_656;
BgL__ortest_1006z00_656 = 
NULLP(BgL_bufferedz00_610); 
if(BgL__ortest_1006z00_656)
{ /* ./Llib/socket.scm 216 */
BgL_errpz00_654 = 
BBOOL(BgL__ortest_1006z00_656); }  else 
{ /* ./Llib/socket.scm 216 */
bool_t BgL__ortest_1007z00_657;
{ /* ./Llib/socket.scm 216 */
obj_t BgL_auxz00_768;
BgL_auxz00_768 = 
CDR(BgL_bufferedz00_610); 
BgL__ortest_1007z00_657 = 
NULLP(BgL_auxz00_768); } 
if(BgL__ortest_1007z00_657)
{ /* ./Llib/socket.scm 216 */
BgL_errpz00_654 = 
BBOOL(BgL__ortest_1007z00_657); }  else 
{ /* ./Llib/socket.scm 216 */
obj_t BgL_auxz00_773;
BgL_auxz00_773 = 
CDR(BgL_bufferedz00_610); 
BgL_errpz00_654 = 
CAR(BgL_auxz00_773); } } } 
{ /* ./Llib/socket.scm 216 */
bool_t BgL_auxz00_776;
BgL_auxz00_776 = 
CBOOL(BgL_errpz00_654); 
return 
socket_accept(BgL_socketz00_609, BgL_bufz00_653, BgL_auxz00_776);} } } 
}



/* socket-dup */
BGL_EXPORTED_DEF obj_t BGl_socketzd2dupzd2zz__socketz00(obj_t BgL_socketz00_19)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 225 */
return 
socket_dup(BgL_socketz00_19);} 
}



/* _socket-dup */
obj_t BGl__socketzd2dupzd2zz__socketz00(obj_t BgL_envz00_611, obj_t BgL_socketz00_612)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 225 */
return 
socket_dup(BgL_socketz00_612);} 
}



/* socket-shutdown */
BGL_EXPORTED_DEF obj_t BGl_socketzd2shutdownzd2zz__socketz00(obj_t BgL_socketz00_20, obj_t BgL_closez00_21)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 231 */
{ /* ./Llib/socket.scm 232 */
obj_t BgL_arg1053z00_659;
if(
PAIRP(BgL_closez00_21))
{ /* ./Llib/socket.scm 232 */
BgL_arg1053z00_659 = 
CAR(BgL_closez00_21); }  else 
{ /* ./Llib/socket.scm 232 */
BgL_arg1053z00_659 = BTRUE; } 
{ /* ./Llib/socket.scm 232 */
bool_t BgL_auxz00_784;
BgL_auxz00_784 = 
CBOOL(BgL_arg1053z00_659); 
return 
socket_shutdown(BgL_socketz00_20, BgL_auxz00_784);} } } 
}



/* _socket-shutdown */
obj_t BGl__socketzd2shutdownzd2zz__socketz00(obj_t BgL_envz00_613, obj_t BgL_socketz00_614, obj_t BgL_closez00_615)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 231 */
{ /* ./Llib/socket.scm 232 */
obj_t BgL_arg1053z00_662;
if(
PAIRP(BgL_closez00_615))
{ /* ./Llib/socket.scm 232 */
BgL_arg1053z00_662 = 
CAR(BgL_closez00_615); }  else 
{ /* ./Llib/socket.scm 232 */
BgL_arg1053z00_662 = BTRUE; } 
{ /* ./Llib/socket.scm 232 */
bool_t BgL_auxz00_790;
BgL_auxz00_790 = 
CBOOL(BgL_arg1053z00_662); 
return 
socket_shutdown(BgL_socketz00_614, BgL_auxz00_790);} } } 
}



/* socket-close */
BGL_EXPORTED_DEF obj_t BGl_socketzd2closezd2zz__socketz00(obj_t BgL_socketz00_22)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 237 */
return 
socket_close(BgL_socketz00_22);} 
}



/* _socket-close */
obj_t BGl__socketzd2closezd2zz__socketz00(obj_t BgL_envz00_616, obj_t BgL_socketz00_617)
{ AN_OBJECT;
{ /* ./Llib/socket.scm 237 */
return 
socket_close(BgL_socketz00_617);} 
}



/* imported-modules-init */
obj_t BGl_importedzd2moduleszd2initz00zz__socketz00()
{ AN_OBJECT;
{ /* ./Llib/socket.scm 15 */
return 
BGl_modulezd2initializa7ationz75zz__errorz00(((long)11084), "__socket");} 
}

