/*===========================================================================*/
/*   (SawMill/collapse.scm)                                                  */
/*   Bigloo (4.5b)                                                           */
/*   Inria -- Sophia Antipolis (c)       Fri Dec 22 05:17:06 PM CET 2023     */
/*===========================================================================*/
/* COMPILATION: (/home/serrano/prgm/project/bigloo/bigloo/bin/bigloo -ldopt -L/home/serrano/prgm/project/bigloo/bigloo/libbacktrace/home/serrano/prgm/project/bigloo/bigloo/lib/bigloo/4.5b  -q -afile .afile -fsharing -fno-reflection -cc gcc -lib-dir /home/serrano/prgm/project/bigloo/bigloo/lib/bigloo/4.5b -unsafev -gno-error-localization -no-hello -O2 -rm -unsafe -s -stdc -indent SawMill/collapse.scm) */
/* GC selection */
#define THE_GC BOEHM_GC

/* unsafe mode */
#define BIGLOO_UNSAFE 1

/* traces mode */
#define BIGLOO_TRACE 0

/* standard Bigloo include */
#include <bigloo.h>

#ifdef __cplusplus
extern "C"
{
#endif
#ifndef BGL_MODULE_TYPE_DEFINITIONS
#define BGL_MODULE_TYPE_DEFINITIONS
#ifndef BGL_SAW_COLLAPSE_TYPE_DEFINITIONS
#define BGL_SAW_COLLAPSE_TYPE_DEFINITIONS

/* object type definitions */
	typedef struct BgL_blockz00_bgl
	{
		header_t header;
		obj_t widening;
		int BgL_labelz00;
		obj_t BgL_predsz00;
		obj_t BgL_succsz00;
		obj_t BgL_firstz00;
	}               *BgL_blockz00_bglt;

	typedef struct BgL_collapsedz00_bgl
	{
		obj_t BgL_lastz00;
	}                   *BgL_collapsedz00_bglt;


#endif													// BGL_SAW_COLLAPSE_TYPE_DEFINITIONS
#endif													// BGL_MODULE_TYPE_DEFINITIONS

	static obj_t BGl_requirezd2initializa7ationz75zzsaw_collapsez00 = BUNSPEC;
	BGL_IMPORT obj_t BGl_za2classesza2z00zz__objectz00;
	static obj_t BGl_genericzd2initzd2zzsaw_collapsez00(void);
	BGL_IMPORT obj_t BGl_makezd2classzd2fieldz00zz__objectz00(obj_t, obj_t, obj_t,
		bool_t, bool_t, obj_t, obj_t, obj_t);
	static obj_t BGl_objectzd2initzd2zzsaw_collapsez00(void);
	BGL_IMPORT obj_t BGl_readz00zz__readerz00(obj_t, obj_t);
	BGL_IMPORT obj_t BGl_openzd2inputzd2stringz12z12zz__r4_ports_6_10_1z00(obj_t,
		obj_t, obj_t);
	static obj_t BGl_methodzd2initzd2zzsaw_collapsez00(void);
	static obj_t BGl_z62collapsez62zzsaw_collapsez00(obj_t, obj_t);
	BGL_EXPORTED_DECL obj_t
		BGl_modulezd2initializa7ationz75zzsaw_collapsez00(long, char *);
	extern obj_t BGl_modulezd2initializa7ationz75zzsaw_defsz00(long, char *);
	extern obj_t BGl_modulezd2initializa7ationz75zzsaw_libz00(long, char *);
	extern obj_t BGl_modulezd2initializa7ationz75zzast_nodez00(long, char *);
	extern obj_t BGl_modulezd2initializa7ationz75zzast_varz00(long, char *);
	extern obj_t BGl_modulezd2initializa7ationz75zztype_typez00(long, char *);
	BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__r4_ports_6_10_1z00(long,
		char *);
	BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__r4_vectors_6_8z00(long,
		char *);
	BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__r4_strings_6_7z00(long,
		char *);
	BGL_IMPORT obj_t
		BGl_modulezd2initializa7ationz75zz__r4_numbers_6_5_fixnumz00(long, char *);
	BGL_IMPORT obj_t
		BGl_modulezd2initializa7ationz75zz__r4_pairs_and_lists_6_3z00(long, char *);
	BGL_IMPORT obj_t
		BGl_modulezd2initializa7ationz75zz__r4_equivalence_6_2z00(long, char *);
	BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__readerz00(long, char *);
	BGL_IMPORT obj_t BGl_modulezd2initializa7ationz75zz__objectz00(long, char *);
	extern obj_t BGl_substz00zzsaw_libz00(obj_t, obj_t, obj_t);
	static obj_t BGl_cnstzd2initzd2zzsaw_collapsez00(void);
	static obj_t BGl_libraryzd2moduleszd2initz00zzsaw_collapsez00(void);
	BGL_IMPORT obj_t BGl_registerzd2classz12zc0zz__objectz00(obj_t, obj_t, obj_t,
		long, obj_t, obj_t, obj_t, obj_t, obj_t, obj_t, obj_t);
	static bool_t BGl_dfsze70ze7zzsaw_collapsez00(BgL_blockz00_bglt);
	static obj_t BGl_importedzd2moduleszd2initz00zzsaw_collapsez00(void);
	static obj_t BGl_gczd2rootszd2initz00zzsaw_collapsez00(void);
	static obj_t BGl_collapsedz00zzsaw_collapsez00 = BUNSPEC;
	static obj_t BGl_z62lambda1600z62zzsaw_collapsez00(obj_t, obj_t, obj_t);
	static obj_t BGl_z62zc3z04anonymousza31582ze3ze5zzsaw_collapsez00(obj_t,
		obj_t);
	BGL_EXPORTED_DECL obj_t BGl_collapsez00zzsaw_collapsez00(BgL_blockz00_bglt);
	BGL_IMPORT obj_t BGl_classzd2superzd2zz__objectz00(obj_t);
	static BgL_blockz00_bglt BGl_z62lambda1576z62zzsaw_collapsez00(obj_t, obj_t,
		obj_t, obj_t, obj_t, obj_t);
	BGL_IMPORT obj_t BGl_lastzd2pairzd2zz__r4_pairs_and_lists_6_3z00(obj_t);
	static BgL_blockz00_bglt BGl_z62lambda1580z62zzsaw_collapsez00(obj_t, obj_t);
	static BgL_blockz00_bglt BGl_z62lambda1583z62zzsaw_collapsez00(obj_t, obj_t);
	extern obj_t BGl_blockz00zzsaw_defsz00;
	static obj_t BGl_z62lambda1599z62zzsaw_collapsez00(obj_t, obj_t);
	static obj_t __cnst[4];


	   
		 
		DEFINE_EXPORT_BGL_PROCEDURE(BGl_collapsezd2envzd2zzsaw_collapsez00,
		BgL_bgl_za762collapseza762za7za71861z00,
		BGl_z62collapsez62zzsaw_collapsez00, 0L, BUNSPEC, 1);
	      DEFINE_STRING(BGl_string1858z00zzsaw_collapsez00,
		BgL_bgl_string1858za700za7za7s1862za7, "saw_collapse", 12);
	      DEFINE_STRING(BGl_string1859z00zzsaw_collapsez00,
		BgL_bgl_string1859za700za7za7s1863za7, "saw_collapse collapsed obj last ",
		32);
	      DEFINE_STATIC_BGL_PROCEDURE(BGl_proc1852z00zzsaw_collapsez00,
		BgL_bgl_za762lambda1600za7621864z00, BGl_z62lambda1600z62zzsaw_collapsez00,
		0L, BUNSPEC, 2);
	      DEFINE_STATIC_BGL_PROCEDURE(BGl_proc1853z00zzsaw_collapsez00,
		BgL_bgl_za762lambda1599za7621865z00, BGl_z62lambda1599z62zzsaw_collapsez00,
		0L, BUNSPEC, 1);
	      DEFINE_STATIC_BGL_PROCEDURE(BGl_proc1854z00zzsaw_collapsez00,
		BgL_bgl_za762lambda1583za7621866z00, BGl_z62lambda1583z62zzsaw_collapsez00,
		0L, BUNSPEC, 1);
	      DEFINE_STATIC_BGL_PROCEDURE(BGl_proc1855z00zzsaw_collapsez00,
		BgL_bgl_za762za7c3za704anonymo1867za7,
		BGl_z62zc3z04anonymousza31582ze3ze5zzsaw_collapsez00, 0L, BUNSPEC, 1);
	      DEFINE_STATIC_BGL_PROCEDURE(BGl_proc1856z00zzsaw_collapsez00,
		BgL_bgl_za762lambda1580za7621868z00, BGl_z62lambda1580z62zzsaw_collapsez00,
		0L, BUNSPEC, 1);
	      DEFINE_STATIC_BGL_PROCEDURE(BGl_proc1857z00zzsaw_collapsez00,
		BgL_bgl_za762lambda1576za7621869z00, BGl_z62lambda1576z62zzsaw_collapsez00,
		0L, BUNSPEC, 5);

/* GC roots registration */
	static obj_t bgl_gc_roots_register()
	{
#if defined( BGL_GC_ROOTS )
#define ADD_ROOT( addr ) (addr > roots_max ? roots_max = addr : (addr < roots_min ? roots_min = addr : 0))
		void *roots_min = (void *) ULONG_MAX, *roots_max = 0;
		   
			 ADD_ROOT((void *) (&BGl_requirezd2initializa7ationz75zzsaw_collapsez00));
		     ADD_ROOT((void *) (&BGl_collapsedz00zzsaw_collapsez00));
#undef ADD_ROOT
		if   (roots_max > 0)
			     GC_add_roots(roots_min, ((void **) roots_max) + 1);
#endif
		     return BUNSPEC;
	}



/* module-initialization */
	BGL_EXPORTED_DEF obj_t BGl_modulezd2initializa7ationz75zzsaw_collapsez00(long
		BgL_checksumz00_2358, char *BgL_fromz00_2359)
	{
		{
			if (CBOOL(BGl_requirezd2initializa7ationz75zzsaw_collapsez00))
				{
					BGl_requirezd2initializa7ationz75zzsaw_collapsez00 =
						BBOOL(((bool_t) 0));
					BGl_gczd2rootszd2initz00zzsaw_collapsez00();
					BGl_libraryzd2moduleszd2initz00zzsaw_collapsez00();
					BGl_cnstzd2initzd2zzsaw_collapsez00();
					BGl_importedzd2moduleszd2initz00zzsaw_collapsez00();
					BGl_objectzd2initzd2zzsaw_collapsez00();
					return BGl_methodzd2initzd2zzsaw_collapsez00();
				}
			else
				{
					return BUNSPEC;
				}
		}

	}



/* library-modules-init */
	obj_t BGl_libraryzd2moduleszd2initz00zzsaw_collapsez00(void)
	{
		{	/* SawMill/collapse.scm 1 */
			BGl_modulezd2initializa7ationz75zz__objectz00(0L, "saw_collapse");
			BGl_modulezd2initializa7ationz75zz__readerz00(0L, "saw_collapse");
			BGl_modulezd2initializa7ationz75zz__r4_ports_6_10_1z00(0L,
				"saw_collapse");
			BGl_modulezd2initializa7ationz75zz__r4_pairs_and_lists_6_3z00(0L,
				"saw_collapse");
			BGl_modulezd2initializa7ationz75zz__r4_strings_6_7z00(0L, "saw_collapse");
			BGl_modulezd2initializa7ationz75zz__r4_equivalence_6_2z00(0L,
				"saw_collapse");
			BGl_modulezd2initializa7ationz75zz__r4_vectors_6_8z00(0L, "saw_collapse");
			BGl_modulezd2initializa7ationz75zz__r4_numbers_6_5_fixnumz00(0L,
				"saw_collapse");
			return BUNSPEC;
		}

	}



/* cnst-init */
	obj_t BGl_cnstzd2initzd2zzsaw_collapsez00(void)
	{
		{	/* SawMill/collapse.scm 1 */
			{	/* SawMill/collapse.scm 1 */
				obj_t BgL_cportz00_2325;

				{	/* SawMill/collapse.scm 1 */
					obj_t BgL_stringz00_2332;

					BgL_stringz00_2332 = BGl_string1859z00zzsaw_collapsez00;
					{	/* SawMill/collapse.scm 1 */
						obj_t BgL_startz00_2333;

						BgL_startz00_2333 = BINT(0L);
						{	/* SawMill/collapse.scm 1 */
							obj_t BgL_endz00_2334;

							BgL_endz00_2334 =
								BINT(STRING_LENGTH(((obj_t) BgL_stringz00_2332)));
							{	/* SawMill/collapse.scm 1 */

								BgL_cportz00_2325 =
									BGl_openzd2inputzd2stringz12z12zz__r4_ports_6_10_1z00
									(BgL_stringz00_2332, BgL_startz00_2333, BgL_endz00_2334);
				}}}}
				{
					long BgL_iz00_2326;

					BgL_iz00_2326 = 3L;
				BgL_loopz00_2327:
					if ((BgL_iz00_2326 == -1L))
						{	/* SawMill/collapse.scm 1 */
							return BUNSPEC;
						}
					else
						{	/* SawMill/collapse.scm 1 */
							{	/* SawMill/collapse.scm 1 */
								obj_t BgL_arg1860z00_2328;

								{	/* SawMill/collapse.scm 1 */

									{	/* SawMill/collapse.scm 1 */
										obj_t BgL_locationz00_2330;

										BgL_locationz00_2330 = BBOOL(((bool_t) 0));
										{	/* SawMill/collapse.scm 1 */

											BgL_arg1860z00_2328 =
												BGl_readz00zz__readerz00(BgL_cportz00_2325,
												BgL_locationz00_2330);
										}
									}
								}
								{	/* SawMill/collapse.scm 1 */
									int BgL_tmpz00_2386;

									BgL_tmpz00_2386 = (int) (BgL_iz00_2326);
									CNST_TABLE_SET(BgL_tmpz00_2386, BgL_arg1860z00_2328);
							}}
							{	/* SawMill/collapse.scm 1 */
								int BgL_auxz00_2331;

								BgL_auxz00_2331 = (int) ((BgL_iz00_2326 - 1L));
								{
									long BgL_iz00_2391;

									BgL_iz00_2391 = (long) (BgL_auxz00_2331);
									BgL_iz00_2326 = BgL_iz00_2391;
									goto BgL_loopz00_2327;
								}
							}
						}
				}
			}
		}

	}



/* gc-roots-init */
	obj_t BGl_gczd2rootszd2initz00zzsaw_collapsez00(void)
	{
		{	/* SawMill/collapse.scm 1 */
			return bgl_gc_roots_register();
		}

	}



/* collapse */
	BGL_EXPORTED_DEF obj_t BGl_collapsez00zzsaw_collapsez00(BgL_blockz00_bglt
		BgL_bz00_24)
	{
		{	/* SawMill/collapse.scm 13 */
			BGl_dfsze70ze7zzsaw_collapsez00(BgL_bz00_24);
			return BUNSPEC;
		}

	}



/* dfs~0 */
	bool_t BGl_dfsze70ze7zzsaw_collapsez00(BgL_blockz00_bglt BgL_bz00_1827)
	{
		{	/* SawMill/collapse.scm 14 */
			{	/* SawMill/collapse.scm 16 */
				BgL_collapsedz00_bglt BgL_wide1177z00_1832;

				BgL_wide1177z00_1832 =
					((BgL_collapsedz00_bglt) BOBJECT(GC_MALLOC(sizeof(struct
								BgL_collapsedz00_bgl))));
				{	/* SawMill/collapse.scm 16 */
					obj_t BgL_auxz00_2399;
					BgL_objectz00_bglt BgL_tmpz00_2396;

					BgL_auxz00_2399 = ((obj_t) BgL_wide1177z00_1832);
					BgL_tmpz00_2396 =
						((BgL_objectz00_bglt) ((BgL_blockz00_bglt) BgL_bz00_1827));
					BGL_OBJECT_WIDENING_SET(BgL_tmpz00_2396, BgL_auxz00_2399);
				}
				((BgL_objectz00_bglt) ((BgL_blockz00_bglt) BgL_bz00_1827));
				{	/* SawMill/collapse.scm 16 */
					long BgL_arg1436z00_1833;

					BgL_arg1436z00_1833 =
						BGL_CLASS_NUM(BGl_collapsedz00zzsaw_collapsez00);
					BGL_OBJECT_CLASS_NUM_SET(
						((BgL_objectz00_bglt)
							((BgL_blockz00_bglt) BgL_bz00_1827)), BgL_arg1436z00_1833);
				}
				((BgL_blockz00_bglt) ((BgL_blockz00_bglt) BgL_bz00_1827));
			}
			{
				BgL_collapsedz00_bglt BgL_auxz00_2410;

				{
					obj_t BgL_auxz00_2411;

					{	/* SawMill/collapse.scm 16 */
						BgL_objectz00_bglt BgL_tmpz00_2412;

						BgL_tmpz00_2412 =
							((BgL_objectz00_bglt) ((BgL_blockz00_bglt) BgL_bz00_1827));
						BgL_auxz00_2411 = BGL_OBJECT_WIDENING(BgL_tmpz00_2412);
					}
					BgL_auxz00_2410 = ((BgL_collapsedz00_bglt) BgL_auxz00_2411);
				}
				((((BgL_collapsedz00_bglt) COBJECT(BgL_auxz00_2410))->BgL_lastz00) =
					((obj_t)
						BGl_lastzd2pairzd2zz__r4_pairs_and_lists_6_3z00(((
									(BgL_blockz00_bglt) COBJECT(BgL_bz00_1827))->BgL_firstz00))),
					BUNSPEC);
			}
			((BgL_blockz00_bglt) BgL_bz00_1827);
			{	/* SawMill/collapse.scm 17 */
				bool_t BgL_test1872z00_2421;

				if (NULLP((((BgL_blockz00_bglt) COBJECT(BgL_bz00_1827))->BgL_predsz00)))
					{	/* SawMill/collapse.scm 17 */
						BgL_test1872z00_2421 = ((bool_t) 0);
					}
				else
					{	/* SawMill/collapse.scm 17 */
						BgL_test1872z00_2421 =
							NULLP(CDR(
								(((BgL_blockz00_bglt) COBJECT(BgL_bz00_1827))->BgL_predsz00)));
					}
				if (BgL_test1872z00_2421)
					{	/* SawMill/collapse.scm 18 */
						obj_t BgL_pz00_1842;

						BgL_pz00_1842 =
							CAR((((BgL_blockz00_bglt) COBJECT(BgL_bz00_1827))->BgL_predsz00));
						{	/* SawMill/collapse.scm 18 */
							obj_t BgL_psz00_1843;

							BgL_psz00_1843 =
								(((BgL_blockz00_bglt) COBJECT(
										((BgL_blockz00_bglt) BgL_pz00_1842)))->BgL_succsz00);
							{	/* SawMill/collapse.scm 18 */

								if (NULLP(CDR(((obj_t) BgL_psz00_1843))))
									{	/* SawMill/collapse.scm 19 */
										{	/* SawMill/collapse.scm 21 */
											obj_t BgL_arg1496z00_1846;
											obj_t BgL_arg1497z00_1847;

											{
												BgL_collapsedz00_bglt BgL_auxz00_2436;

												{
													obj_t BgL_auxz00_2437;

													{	/* SawMill/collapse.scm 21 */
														BgL_objectz00_bglt BgL_tmpz00_2438;

														BgL_tmpz00_2438 =
															((BgL_objectz00_bglt)
															((BgL_blockz00_bglt) BgL_pz00_1842));
														BgL_auxz00_2437 =
															BGL_OBJECT_WIDENING(BgL_tmpz00_2438);
													}
													BgL_auxz00_2436 =
														((BgL_collapsedz00_bglt) BgL_auxz00_2437);
												}
												BgL_arg1496z00_1846 =
													(((BgL_collapsedz00_bglt) COBJECT(BgL_auxz00_2436))->
													BgL_lastz00);
											}
											BgL_arg1497z00_1847 =
												(((BgL_blockz00_bglt) COBJECT(BgL_bz00_1827))->
												BgL_firstz00);
											{	/* SawMill/collapse.scm 21 */
												obj_t BgL_tmpz00_2445;

												BgL_tmpz00_2445 = ((obj_t) BgL_arg1496z00_1846);
												SET_CDR(BgL_tmpz00_2445, BgL_arg1497z00_1847);
											}
										}
										{	/* SawMill/collapse.scm 22 */
											obj_t BgL_arg1519z00_1848;

											{
												BgL_collapsedz00_bglt BgL_auxz00_2448;

												{
													obj_t BgL_auxz00_2449;

													{	/* SawMill/collapse.scm 22 */
														BgL_objectz00_bglt BgL_tmpz00_2450;

														BgL_tmpz00_2450 =
															((BgL_objectz00_bglt)
															((BgL_blockz00_bglt) BgL_bz00_1827));
														BgL_auxz00_2449 =
															BGL_OBJECT_WIDENING(BgL_tmpz00_2450);
													}
													BgL_auxz00_2448 =
														((BgL_collapsedz00_bglt) BgL_auxz00_2449);
												}
												BgL_arg1519z00_1848 =
													(((BgL_collapsedz00_bglt) COBJECT(BgL_auxz00_2448))->
													BgL_lastz00);
											}
											{
												BgL_collapsedz00_bglt BgL_auxz00_2456;

												{
													obj_t BgL_auxz00_2457;

													{	/* SawMill/collapse.scm 22 */
														BgL_objectz00_bglt BgL_tmpz00_2458;

														BgL_tmpz00_2458 =
															((BgL_objectz00_bglt)
															((BgL_blockz00_bglt) BgL_pz00_1842));
														BgL_auxz00_2457 =
															BGL_OBJECT_WIDENING(BgL_tmpz00_2458);
													}
													BgL_auxz00_2456 =
														((BgL_collapsedz00_bglt) BgL_auxz00_2457);
												}
												((((BgL_collapsedz00_bglt) COBJECT(BgL_auxz00_2456))->
														BgL_lastz00) =
													((obj_t) BgL_arg1519z00_1848), BUNSPEC);
											}
										}
										{	/* SawMill/collapse.scm 23 */
											obj_t BgL_arg1528z00_1849;

											BgL_arg1528z00_1849 =
												(((BgL_blockz00_bglt) COBJECT(BgL_bz00_1827))->
												BgL_succsz00);
											((((BgL_blockz00_bglt) COBJECT(((BgL_blockz00_bglt)
																BgL_pz00_1842)))->BgL_succsz00) =
												((obj_t) BgL_arg1528z00_1849), BUNSPEC);
										}
										{	/* SawMill/collapse.scm 24 */
											obj_t BgL_g1397z00_1850;

											BgL_g1397z00_1850 =
												(((BgL_blockz00_bglt) COBJECT(BgL_bz00_1827))->
												BgL_succsz00);
											{
												obj_t BgL_l1395z00_1852;

												BgL_l1395z00_1852 = BgL_g1397z00_1850;
											BgL_zc3z04anonymousza31529ze3z87_1853:
												if (PAIRP(BgL_l1395z00_1852))
													{	/* SawMill/collapse.scm 24 */
														{	/* SawMill/collapse.scm 25 */
															obj_t BgL_sz00_1855;

															BgL_sz00_1855 = CAR(BgL_l1395z00_1852);
															{
																obj_t BgL_auxz00_2471;

																{	/* SawMill/collapse.scm 26 */
																	obj_t BgL_arg1532z00_1857;

																	BgL_arg1532z00_1857 =
																		(((BgL_blockz00_bglt) COBJECT(
																				((BgL_blockz00_bglt) BgL_sz00_1855)))->
																		BgL_predsz00);
																	BgL_auxz00_2471 =
																		BGl_substz00zzsaw_libz00
																		(BgL_arg1532z00_1857,
																		((obj_t) BgL_bz00_1827), BgL_pz00_1842);
																}
																((((BgL_blockz00_bglt) COBJECT(
																				((BgL_blockz00_bglt) BgL_sz00_1855)))->
																		BgL_predsz00) =
																	((obj_t) BgL_auxz00_2471), BUNSPEC);
															}
														}
														{
															obj_t BgL_l1395z00_2478;

															BgL_l1395z00_2478 = CDR(BgL_l1395z00_1852);
															BgL_l1395z00_1852 = BgL_l1395z00_2478;
															goto BgL_zc3z04anonymousza31529ze3z87_1853;
														}
													}
												else
													{	/* SawMill/collapse.scm 24 */
														((bool_t) 1);
													}
											}
										}
									}
								else
									{	/* SawMill/collapse.scm 19 */
										((bool_t) 0);
									}
							}
						}
					}
				else
					{	/* SawMill/collapse.scm 17 */
						((bool_t) 0);
					}
			}
			{	/* SawMill/collapse.scm 28 */
				obj_t BgL_g1400z00_1866;

				BgL_g1400z00_1866 =
					(((BgL_blockz00_bglt) COBJECT(BgL_bz00_1827))->BgL_succsz00);
				{
					obj_t BgL_l1398z00_1868;

					BgL_l1398z00_1868 = BgL_g1400z00_1866;
				BgL_zc3z04anonymousza31551ze3z87_1869:
					if (PAIRP(BgL_l1398z00_1868))
						{	/* SawMill/collapse.scm 28 */
							{	/* SawMill/collapse.scm 29 */
								BgL_blockz00_bglt BgL_succz00_1871;

								BgL_succz00_1871 = ((BgL_blockz00_bglt) CAR(BgL_l1398z00_1868));
								{	/* SawMill/collapse.scm 29 */
									bool_t BgL_test1877z00_2485;

									{	/* SawMill/collapse.scm 29 */
										obj_t BgL_classz00_2259;

										BgL_classz00_2259 = BGl_collapsedz00zzsaw_collapsez00;
										{	/* SawMill/collapse.scm 29 */
											obj_t BgL_oclassz00_2261;

											{	/* SawMill/collapse.scm 29 */
												long BgL_arg1808z00_2263;

												{	/* SawMill/collapse.scm 29 */
													long BgL_arg1809z00_2264;

													BgL_arg1809z00_2264 =
														BGL_OBJECT_CLASS_NUM(
														((BgL_objectz00_bglt) BgL_succz00_1871));
													BgL_arg1808z00_2263 =
														(BgL_arg1809z00_2264 - OBJECT_TYPE);
												}
												BgL_oclassz00_2261 =
													VECTOR_REF(BGl_za2classesza2z00zz__objectz00,
													BgL_arg1808z00_2263);
											}
											BgL_test1877z00_2485 =
												(BgL_oclassz00_2261 == BgL_classz00_2259);
									}}
									if (BgL_test1877z00_2485)
										{	/* SawMill/collapse.scm 29 */
											((bool_t) 0);
										}
									else
										{	/* SawMill/collapse.scm 29 */
											BGl_dfsze70ze7zzsaw_collapsez00(BgL_succz00_1871);
										}
								}
							}
							{
								obj_t BgL_l1398z00_2492;

								BgL_l1398z00_2492 = CDR(BgL_l1398z00_1868);
								BgL_l1398z00_1868 = BgL_l1398z00_2492;
								goto BgL_zc3z04anonymousza31551ze3z87_1869;
							}
						}
					else
						{	/* SawMill/collapse.scm 28 */
							return ((bool_t) 1);
						}
				}
			}
		}

	}



/* &collapse */
	obj_t BGl_z62collapsez62zzsaw_collapsez00(obj_t BgL_envz00_2300,
		obj_t BgL_bz00_2301)
	{
		{	/* SawMill/collapse.scm 13 */
			return
				BGl_collapsez00zzsaw_collapsez00(((BgL_blockz00_bglt) BgL_bz00_2301));
		}

	}



/* object-init */
	obj_t BGl_objectzd2initzd2zzsaw_collapsez00(void)
	{
		{	/* SawMill/collapse.scm 1 */
			{	/* SawMill/collapse.scm 7 */
				obj_t BgL_arg1565z00_1880;
				obj_t BgL_arg1575z00_1881;

				{	/* SawMill/collapse.scm 7 */
					obj_t BgL_v1401z00_1907;

					BgL_v1401z00_1907 = create_vector(1L);
					{	/* SawMill/collapse.scm 7 */
						obj_t BgL_arg1595z00_1908;

						BgL_arg1595z00_1908 =
							BGl_makezd2classzd2fieldz00zz__objectz00(CNST_TABLE_REF(0L),
							BGl_proc1853z00zzsaw_collapsez00,
							BGl_proc1852z00zzsaw_collapsez00, ((bool_t) 0), ((bool_t) 0),
							BFALSE, BFALSE, CNST_TABLE_REF(1L));
						VECTOR_SET(BgL_v1401z00_1907, 0L, BgL_arg1595z00_1908);
					}
					BgL_arg1565z00_1880 = BgL_v1401z00_1907;
				}
				{	/* SawMill/collapse.scm 7 */
					obj_t BgL_v1402z00_1918;

					BgL_v1402z00_1918 = create_vector(0L);
					BgL_arg1575z00_1881 = BgL_v1402z00_1918;
				}
				return (BGl_collapsedz00zzsaw_collapsez00 =
					BGl_registerzd2classz12zc0zz__objectz00(CNST_TABLE_REF(2L),
						CNST_TABLE_REF(3L), BGl_blockz00zzsaw_defsz00, 33907L,
						BGl_proc1857z00zzsaw_collapsez00, BGl_proc1856z00zzsaw_collapsez00,
						BFALSE, BGl_proc1855z00zzsaw_collapsez00,
						BGl_proc1854z00zzsaw_collapsez00, BgL_arg1565z00_1880,
						BgL_arg1575z00_1881), BUNSPEC);
			}
		}

	}



/* &lambda1583 */
	BgL_blockz00_bglt BGl_z62lambda1583z62zzsaw_collapsez00(obj_t BgL_envz00_2308,
		obj_t BgL_o1159z00_2309)
	{
		{	/* SawMill/collapse.scm 7 */
			{	/* SawMill/collapse.scm 7 */
				long BgL_arg1586z00_2337;

				{	/* SawMill/collapse.scm 7 */
					obj_t BgL_arg1590z00_2338;

					{	/* SawMill/collapse.scm 7 */
						obj_t BgL_arg1592z00_2339;

						{	/* SawMill/collapse.scm 7 */
							long BgL_arg1808z00_2340;

							{	/* SawMill/collapse.scm 7 */
								long BgL_arg1809z00_2341;

								BgL_arg1809z00_2341 =
									BGL_OBJECT_CLASS_NUM(
									((BgL_objectz00_bglt)
										((BgL_blockz00_bglt) BgL_o1159z00_2309)));
								BgL_arg1808z00_2340 = (BgL_arg1809z00_2341 - OBJECT_TYPE);
							}
							BgL_arg1592z00_2339 =
								VECTOR_REF(BGl_za2classesza2z00zz__objectz00,
								BgL_arg1808z00_2340);
						}
						BgL_arg1590z00_2338 =
							BGl_classzd2superzd2zz__objectz00(BgL_arg1592z00_2339);
					}
					{	/* SawMill/collapse.scm 7 */
						obj_t BgL_tmpz00_2511;

						BgL_tmpz00_2511 = ((obj_t) BgL_arg1590z00_2338);
						BgL_arg1586z00_2337 = BGL_CLASS_NUM(BgL_tmpz00_2511);
				}}
				BGL_OBJECT_CLASS_NUM_SET(
					((BgL_objectz00_bglt)
						((BgL_blockz00_bglt) BgL_o1159z00_2309)), BgL_arg1586z00_2337);
			}
			{	/* SawMill/collapse.scm 7 */
				BgL_objectz00_bglt BgL_tmpz00_2517;

				BgL_tmpz00_2517 =
					((BgL_objectz00_bglt) ((BgL_blockz00_bglt) BgL_o1159z00_2309));
				BGL_OBJECT_WIDENING_SET(BgL_tmpz00_2517, BFALSE);
			}
			((BgL_objectz00_bglt) ((BgL_blockz00_bglt) BgL_o1159z00_2309));
			return ((BgL_blockz00_bglt) ((BgL_blockz00_bglt) BgL_o1159z00_2309));
		}

	}



/* &<@anonymous:1582> */
	obj_t BGl_z62zc3z04anonymousza31582ze3ze5zzsaw_collapsez00(obj_t
		BgL_envz00_2310, obj_t BgL_new1158z00_2311)
	{
		{	/* SawMill/collapse.scm 7 */
			{
				BgL_blockz00_bglt BgL_auxz00_2525;

				((((BgL_blockz00_bglt) COBJECT(
								((BgL_blockz00_bglt)
									((BgL_blockz00_bglt) BgL_new1158z00_2311))))->BgL_labelz00) =
					((int) (int) (0L)), BUNSPEC);
				((((BgL_blockz00_bglt) COBJECT(((BgL_blockz00_bglt) ((BgL_blockz00_bglt)
										BgL_new1158z00_2311))))->BgL_predsz00) =
					((obj_t) BNIL), BUNSPEC);
				((((BgL_blockz00_bglt) COBJECT(((BgL_blockz00_bglt) ((BgL_blockz00_bglt)
										BgL_new1158z00_2311))))->BgL_succsz00) =
					((obj_t) BNIL), BUNSPEC);
				((((BgL_blockz00_bglt) COBJECT(((BgL_blockz00_bglt) ((BgL_blockz00_bglt)
										BgL_new1158z00_2311))))->BgL_firstz00) =
					((obj_t) BNIL), BUNSPEC);
				{
					BgL_collapsedz00_bglt BgL_auxz00_2539;

					{
						obj_t BgL_auxz00_2540;

						{	/* SawMill/collapse.scm 7 */
							BgL_objectz00_bglt BgL_tmpz00_2541;

							BgL_tmpz00_2541 =
								((BgL_objectz00_bglt)
								((BgL_blockz00_bglt) BgL_new1158z00_2311));
							BgL_auxz00_2540 = BGL_OBJECT_WIDENING(BgL_tmpz00_2541);
						}
						BgL_auxz00_2539 = ((BgL_collapsedz00_bglt) BgL_auxz00_2540);
					}
					((((BgL_collapsedz00_bglt) COBJECT(BgL_auxz00_2539))->BgL_lastz00) =
						((obj_t) BUNSPEC), BUNSPEC);
				}
				BgL_auxz00_2525 = ((BgL_blockz00_bglt) BgL_new1158z00_2311);
				return ((obj_t) BgL_auxz00_2525);
			}
		}

	}



/* &lambda1580 */
	BgL_blockz00_bglt BGl_z62lambda1580z62zzsaw_collapsez00(obj_t BgL_envz00_2312,
		obj_t BgL_o1154z00_2313)
	{
		{	/* SawMill/collapse.scm 7 */
			{	/* SawMill/collapse.scm 7 */
				BgL_collapsedz00_bglt BgL_wide1156z00_2344;

				BgL_wide1156z00_2344 =
					((BgL_collapsedz00_bglt) BOBJECT(GC_MALLOC(sizeof(struct
								BgL_collapsedz00_bgl))));
				{	/* SawMill/collapse.scm 7 */
					obj_t BgL_auxz00_2554;
					BgL_objectz00_bglt BgL_tmpz00_2550;

					BgL_auxz00_2554 = ((obj_t) BgL_wide1156z00_2344);
					BgL_tmpz00_2550 =
						((BgL_objectz00_bglt)
						((BgL_blockz00_bglt) ((BgL_blockz00_bglt) BgL_o1154z00_2313)));
					BGL_OBJECT_WIDENING_SET(BgL_tmpz00_2550, BgL_auxz00_2554);
				}
				((BgL_objectz00_bglt)
					((BgL_blockz00_bglt) ((BgL_blockz00_bglt) BgL_o1154z00_2313)));
				{	/* SawMill/collapse.scm 7 */
					long BgL_arg1581z00_2345;

					BgL_arg1581z00_2345 =
						BGL_CLASS_NUM(BGl_collapsedz00zzsaw_collapsez00);
					BGL_OBJECT_CLASS_NUM_SET(
						((BgL_objectz00_bglt)
							((BgL_blockz00_bglt)
								((BgL_blockz00_bglt) BgL_o1154z00_2313))), BgL_arg1581z00_2345);
				}
				return
					((BgL_blockz00_bglt)
					((BgL_blockz00_bglt) ((BgL_blockz00_bglt) BgL_o1154z00_2313)));
			}
		}

	}



/* &lambda1576 */
	BgL_blockz00_bglt BGl_z62lambda1576z62zzsaw_collapsez00(obj_t BgL_envz00_2314,
		obj_t BgL_label1149z00_2315, obj_t BgL_preds1150z00_2316,
		obj_t BgL_succs1151z00_2317, obj_t BgL_first1152z00_2318,
		obj_t BgL_last1153z00_2319)
	{
		{	/* SawMill/collapse.scm 7 */
			{	/* SawMill/collapse.scm 7 */
				int BgL_label1149z00_2346;

				BgL_label1149z00_2346 = CINT(BgL_label1149z00_2315);
				{	/* SawMill/collapse.scm 7 */
					BgL_blockz00_bglt BgL_new1184z00_2350;

					{	/* SawMill/collapse.scm 7 */
						BgL_blockz00_bglt BgL_tmp1182z00_2351;
						BgL_collapsedz00_bglt BgL_wide1183z00_2352;

						{
							BgL_blockz00_bglt BgL_auxz00_2569;

							{	/* SawMill/collapse.scm 7 */
								BgL_blockz00_bglt BgL_new1181z00_2353;

								BgL_new1181z00_2353 =
									((BgL_blockz00_bglt) BOBJECT(GC_MALLOC(sizeof(struct
												BgL_blockz00_bgl))));
								{	/* SawMill/collapse.scm 7 */
									long BgL_arg1579z00_2354;

									BgL_arg1579z00_2354 =
										BGL_CLASS_NUM(BGl_blockz00zzsaw_defsz00);
									BGL_OBJECT_CLASS_NUM_SET(
										((BgL_objectz00_bglt) BgL_new1181z00_2353),
										BgL_arg1579z00_2354);
								}
								{	/* SawMill/collapse.scm 7 */
									BgL_objectz00_bglt BgL_tmpz00_2574;

									BgL_tmpz00_2574 = ((BgL_objectz00_bglt) BgL_new1181z00_2353);
									BGL_OBJECT_WIDENING_SET(BgL_tmpz00_2574, BFALSE);
								}
								((BgL_objectz00_bglt) BgL_new1181z00_2353);
								BgL_auxz00_2569 = BgL_new1181z00_2353;
							}
							BgL_tmp1182z00_2351 = ((BgL_blockz00_bglt) BgL_auxz00_2569);
						}
						BgL_wide1183z00_2352 =
							((BgL_collapsedz00_bglt) BOBJECT(GC_MALLOC(sizeof(struct
										BgL_collapsedz00_bgl))));
						{	/* SawMill/collapse.scm 7 */
							obj_t BgL_auxz00_2582;
							BgL_objectz00_bglt BgL_tmpz00_2580;

							BgL_auxz00_2582 = ((obj_t) BgL_wide1183z00_2352);
							BgL_tmpz00_2580 = ((BgL_objectz00_bglt) BgL_tmp1182z00_2351);
							BGL_OBJECT_WIDENING_SET(BgL_tmpz00_2580, BgL_auxz00_2582);
						}
						((BgL_objectz00_bglt) BgL_tmp1182z00_2351);
						{	/* SawMill/collapse.scm 7 */
							long BgL_arg1578z00_2355;

							BgL_arg1578z00_2355 =
								BGL_CLASS_NUM(BGl_collapsedz00zzsaw_collapsez00);
							BGL_OBJECT_CLASS_NUM_SET(
								((BgL_objectz00_bglt) BgL_tmp1182z00_2351),
								BgL_arg1578z00_2355);
						}
						BgL_new1184z00_2350 = ((BgL_blockz00_bglt) BgL_tmp1182z00_2351);
					}
					((((BgL_blockz00_bglt) COBJECT(
									((BgL_blockz00_bglt) BgL_new1184z00_2350)))->BgL_labelz00) =
						((int) BgL_label1149z00_2346), BUNSPEC);
					((((BgL_blockz00_bglt) COBJECT(((BgL_blockz00_bglt)
										BgL_new1184z00_2350)))->BgL_predsz00) =
						((obj_t) ((obj_t) BgL_preds1150z00_2316)), BUNSPEC);
					((((BgL_blockz00_bglt) COBJECT(((BgL_blockz00_bglt)
										BgL_new1184z00_2350)))->BgL_succsz00) =
						((obj_t) ((obj_t) BgL_succs1151z00_2317)), BUNSPEC);
					((((BgL_blockz00_bglt) COBJECT(((BgL_blockz00_bglt)
										BgL_new1184z00_2350)))->BgL_firstz00) =
						((obj_t) ((obj_t) BgL_first1152z00_2318)), BUNSPEC);
					{
						BgL_collapsedz00_bglt BgL_auxz00_2601;

						{
							obj_t BgL_auxz00_2602;

							{	/* SawMill/collapse.scm 7 */
								BgL_objectz00_bglt BgL_tmpz00_2603;

								BgL_tmpz00_2603 = ((BgL_objectz00_bglt) BgL_new1184z00_2350);
								BgL_auxz00_2602 = BGL_OBJECT_WIDENING(BgL_tmpz00_2603);
							}
							BgL_auxz00_2601 = ((BgL_collapsedz00_bglt) BgL_auxz00_2602);
						}
						((((BgL_collapsedz00_bglt) COBJECT(BgL_auxz00_2601))->BgL_lastz00) =
							((obj_t) BgL_last1153z00_2319), BUNSPEC);
					}
					return BgL_new1184z00_2350;
				}
			}
		}

	}



/* &lambda1600 */
	obj_t BGl_z62lambda1600z62zzsaw_collapsez00(obj_t BgL_envz00_2320,
		obj_t BgL_oz00_2321, obj_t BgL_vz00_2322)
	{
		{	/* SawMill/collapse.scm 7 */
			{
				BgL_collapsedz00_bglt BgL_auxz00_2608;

				{
					obj_t BgL_auxz00_2609;

					{	/* SawMill/collapse.scm 7 */
						BgL_objectz00_bglt BgL_tmpz00_2610;

						BgL_tmpz00_2610 =
							((BgL_objectz00_bglt) ((BgL_blockz00_bglt) BgL_oz00_2321));
						BgL_auxz00_2609 = BGL_OBJECT_WIDENING(BgL_tmpz00_2610);
					}
					BgL_auxz00_2608 = ((BgL_collapsedz00_bglt) BgL_auxz00_2609);
				}
				return
					((((BgL_collapsedz00_bglt) COBJECT(BgL_auxz00_2608))->BgL_lastz00) =
					((obj_t) BgL_vz00_2322), BUNSPEC);
			}
		}

	}



/* &lambda1599 */
	obj_t BGl_z62lambda1599z62zzsaw_collapsez00(obj_t BgL_envz00_2323,
		obj_t BgL_oz00_2324)
	{
		{	/* SawMill/collapse.scm 7 */
			{
				BgL_collapsedz00_bglt BgL_auxz00_2616;

				{
					obj_t BgL_auxz00_2617;

					{	/* SawMill/collapse.scm 7 */
						BgL_objectz00_bglt BgL_tmpz00_2618;

						BgL_tmpz00_2618 =
							((BgL_objectz00_bglt) ((BgL_blockz00_bglt) BgL_oz00_2324));
						BgL_auxz00_2617 = BGL_OBJECT_WIDENING(BgL_tmpz00_2618);
					}
					BgL_auxz00_2616 = ((BgL_collapsedz00_bglt) BgL_auxz00_2617);
				}
				return
					(((BgL_collapsedz00_bglt) COBJECT(BgL_auxz00_2616))->BgL_lastz00);
			}
		}

	}



/* generic-init */
	obj_t BGl_genericzd2initzd2zzsaw_collapsez00(void)
	{
		{	/* SawMill/collapse.scm 1 */
			return BUNSPEC;
		}

	}



/* method-init */
	obj_t BGl_methodzd2initzd2zzsaw_collapsez00(void)
	{
		{	/* SawMill/collapse.scm 1 */
			return BUNSPEC;
		}

	}



/* imported-modules-init */
	obj_t BGl_importedzd2moduleszd2initz00zzsaw_collapsez00(void)
	{
		{	/* SawMill/collapse.scm 1 */
			BGl_modulezd2initializa7ationz75zztype_typez00(515343395L,
				BSTRING_TO_STRING(BGl_string1858z00zzsaw_collapsez00));
			BGl_modulezd2initializa7ationz75zzast_varz00(90839984L,
				BSTRING_TO_STRING(BGl_string1858z00zzsaw_collapsez00));
			BGl_modulezd2initializa7ationz75zzast_nodez00(469732712L,
				BSTRING_TO_STRING(BGl_string1858z00zzsaw_collapsez00));
			BGl_modulezd2initializa7ationz75zzsaw_libz00(57049157L,
				BSTRING_TO_STRING(BGl_string1858z00zzsaw_collapsez00));
			return
				BGl_modulezd2initializa7ationz75zzsaw_defsz00(404844772L,
				BSTRING_TO_STRING(BGl_string1858z00zzsaw_collapsez00));
		}

	}

#ifdef __cplusplus
}
#endif
