/* ========================================================================
 * PlantUML : a free UML diagram generator
 * ========================================================================
 *
 * Project Info:  http://plantuml.com
 * 
 * If you like this project or if you find it useful, you can support us at:
 * 
 * http://plantuml.com/patreon (only 1$ per month!)
 * http://plantuml.com/paypal
 * 
 * This file is part of Smetana.
 * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
 *
 * (C) Copyright 2009-2020, Arnaud Roques
 *
 * This translation is distributed under the same Licence as the original C program:
 * 
 *************************************************************************
 * Copyright (c) 2011 AT&T Intellectual Property 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors: See CVS logs. Details at http://www.graphviz.org/
 *************************************************************************
 *
 * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
 * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
 * 
 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
 * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
 * 
 * You may obtain a copy of the License at
 * 
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package gen.lib.ortho;
import static smetana.core.Macro.UNSUPPORTED;

public class partition__c {
//1 2digov3edok6d5srhgtlmrycs
// extern lt_symlist_t lt_preloaded_symbols[]


//1 baedz5i9est5csw3epz3cv7z
// typedef Ppoly_t Ppolyline_t


//1 9k44uhd5foylaeoekf3llonjq
// extern Dtmethod_t* 	Dtset


//1 1ahfywsmzcpcig2oxm7pt9ihj
// extern Dtmethod_t* 	Dtbag


//1 anhghfj3k7dmkudy2n7rvt31v
// extern Dtmethod_t* 	Dtoset


//1 5l6oj1ux946zjwvir94ykejbc
// extern Dtmethod_t* 	Dtobag


//1 2wtf222ak6cui8cfjnw6w377z
// extern Dtmethod_t*	Dtlist


//1 d1s1s6ibtcsmst88e3057u9r7
// extern Dtmethod_t*	Dtstack


//1 axa7mflo824p6fspjn1rdk0mt
// extern Dtmethod_t*	Dtqueue


//1 ega812utobm4xx9oa9w9ayij6
// extern Dtmethod_t*	Dtdeque


//1 cyfr996ur43045jv1tjbelzmj
// extern Dtmethod_t*	Dtorder


//1 wlofoiftbjgrrabzb2brkycg
// extern Dtmethod_t*	Dttree


//1 12bds94t7voj7ulwpcvgf6agr
// extern Dtmethod_t*	Dthash


//1 9lqknzty480cy7zsubmabkk8h
// extern Dtmethod_t	_Dttree


//1 bvn6zkbcp8vjdhkccqo1xrkrb
// extern Dtmethod_t	_Dthash


//1 9lidhtd6nsmmv3e7vjv9e10gw
// extern Dtmethod_t	_Dtlist


//1 34ujfamjxo7xn89u90oh2k6f8
// extern Dtmethod_t	_Dtqueue


//1 3jy4aceckzkdv950h89p4wjc8
// extern Dtmethod_t	_Dtstack


//1 8dfqgf3u1v830qzcjqh9o8ha7
// extern Agmemdisc_t AgMemDisc


//1 18k2oh2t6llfsdc5x0wlcnby8
// extern Agiddisc_t AgIdDisc


//1 a4r7hi80gdxtsv4hdoqpyiivn
// extern Agiodisc_t AgIoDisc


//1 bnzt5syjb7mgeru19114vd6xx
// extern Agdisc_t AgDefaultDisc


//1 35y2gbegsdjilegaribes00mg
// extern Agdesc_t Agdirected, Agstrictdirected, Agundirected,     Agstrictundirected


//1 c2rygslq6bcuka3awmvy2b3ow
// typedef Agsubnode_t	Agnoderef_t


//1 xam6yv0dcsx57dtg44igpbzn
// typedef Dtlink_t	Agedgeref_t


//1 1duz2zmve5bdooct0ezmnnaxq
// static int chain_idx, mon_idx


//1 67uj2vwqlb937zf3jgzd5bre1
// static monchain_t* mchain


//1 b7wevmtwi3ljzl56axez0c18m
// static vertexchain_t* vert


//1 2owm4aavvrdgcsmzw0xh1keul
// static int* mon




//3 c5f2ppu5vis7zj6x1ehr7ipb8
// static void convert (boxf bb, int flip, int ccw, pointf* pts) 
public static Object convert(Object... arg) {
UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
UNSUPPORTED("7z9p7ryaqovx8l4zvz8ut5lh"); // convert (boxf bb, int flip, int ccw, pointf* pts)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("d4u5o9hun4r9ctb05sitn35ie"); //     pts[0] = bb.LL;
UNSUPPORTED("8c7ixjyy0o8pk7jvbhubvu7fk"); //     pts[2] = bb.UR;
UNSUPPORTED("3oqttg1p147o6iu2ik3nuhaag"); //     if (ccw) {
UNSUPPORTED("b6cwugc335s6xo11bjy8lzdtv"); // 	pts[1].x = bb.UR.x;
UNSUPPORTED("5g8pg756wtn4jz9pynuub13nu"); // 	pts[1].y = bb.LL.y;
UNSUPPORTED("86i7iwyoibsuencp95bp2l0q4"); // 	pts[3].x = bb.LL.x;
UNSUPPORTED("es4u9iskz0bxl8yc2utghf7yw"); // 	pts[3].y = bb.UR.y;
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("1nyzbeonram6636b1w955bypn"); //     else {
UNSUPPORTED("apctdgahb5872oqu7l5h6puc2"); // 	pts[1].x = bb.LL.x;
UNSUPPORTED("7hnlqi5nik1acsnv1f8p6bcl"); // 	pts[1].y = bb.UR.y;
UNSUPPORTED("7jd9pnw8dy4kydjdmsqgagnag"); // 	pts[3].x = bb.UR.x;
UNSUPPORTED("tk95qh6cyvgcle477dclxmdc"); // 	pts[3].y = bb.LL.y;
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("9wlzvfxuhvsgkkq6lvlrw01d2"); //     if (flip) {
UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // 	int i;
UNSUPPORTED("5d0rjolqhmqfhdts46h273pw"); // 	for (i = 0; i < 4; i++) {
UNSUPPORTED("9dpwe8ucpbv8y180jmvfjohj0"); // 	    double tmp = pts[i].y;
UNSUPPORTED("8nsyib2abbayywi8ydtyfrh1w"); // 	    pts[i].y = pts[i].x;
UNSUPPORTED("e2stbhhso88rb6d0bps3wesbm"); // 	    pts[i].x = -tmp;
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 7f2x9i3stjkwyki8jhp8g4crp
// static int store (segment_t* seg, int first, pointf* pts) 
public static Object store(Object... arg) {
UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
UNSUPPORTED("ck5s10q08ha996jg1dthuj4gz"); // store (segment_t* seg, int first, pointf* pts)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("6a67ll1vnp0gczc7sdxxm0eus"); //     int i, last = first + 4 - 1;
UNSUPPORTED("cp0v943eklkgtfrjyj59exkgj"); //     int j = 0;
UNSUPPORTED("32ltq51ztqu722sxfo74u4mtw"); //     for (i = first; i <= last; i++, j++) {
UNSUPPORTED("79puvan9sro080fsgrgz2t2q7"); // 	if (i == first) {
UNSUPPORTED("64r4m4ormvokugbo70tnvjx5m"); // 	    seg[i].next = first+1;
UNSUPPORTED("1dm0tna3ay2sbc2yaliye2bse"); // 	    seg[i].prev = last;
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("6cjbyd0qmosdne3p1e7cmt94k"); // 	else if (i == last) {
UNSUPPORTED("eanh96xgpeo6woibzznfh0wbv"); // 	    seg[i].next = first;
UNSUPPORTED("9dcogmtm6yucs0hqvurnlvd8c"); // 	    seg[i].prev = last-1;
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // 	else {
UNSUPPORTED("2n6qylkakd0eh8qirmanhkqv6"); // 	    seg[i].next = i+1;
UNSUPPORTED("e074ljxriocjv010xtqimpe82"); // 	    seg[i].prev = i-1;
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("5n6eo7o5v5jxlkoan6t7rxrs6"); // 	seg[i].is_inserted = 0;
UNSUPPORTED("8boueifn4zp07ophbsfll1c4j"); // 	seg[seg[i].prev].v1 = seg[i].v0 = pts[j];
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("2fba7o4mz0g2iwmw1tsdmnyeq"); //     return (last+1);
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 86pkmn254w4mzlbm1tvtj0utl
// static void genSegments (cell* cells, int ncells, boxf bb, segment_t* seg, int flip) 
public static Object genSegments(Object... arg) {
UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
UNSUPPORTED("1kvuie0el6g2uqdy7kissygr5"); // genSegments (cell* cells, int ncells, boxf bb, segment_t* seg, int flip)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("brjd2xw92qki6azgl484qbcab"); //     int j = 0, i = 1;
UNSUPPORTED("d8sp6cfkpfyndzmid92shiq50"); //     pointf pts[4];
UNSUPPORTED("599xkip8oct4w8qnqgosguvxf"); //     convert (bb, flip, 1, pts);
UNSUPPORTED("2ukjeetspuv54livez9siabr3"); //     i = store (seg, i, pts);
UNSUPPORTED("c0t3vyjxjf53cre3fnsjl1zct"); //     for (j = 0; j < ncells; j++) {
UNSUPPORTED("nnyfz2s31gezrnoj0r6t3c7e"); // 	convert (cells[j].bb, flip, 0, pts);
UNSUPPORTED("dtkvdb642xk2z42q0cqxa8cuw"); // 	i = store (seg, i, pts);
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 adiv3g0l2lfgmsrp6nszkbu7e
// static void  generateRandomOrdering(int n, int* permute) 
public static Object generateRandomOrdering(Object... arg) {
UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void 
UNSUPPORTED("bayg75oypsrrhfr1fn4t44xzq"); // generateRandomOrdering(int n, int* permute)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("dbbxghj26zogt3ririv6d35rx"); //     int i, j, tmp;
UNSUPPORTED("bm4rxb9avtrlnwyqnenc25krj"); //     for (i = 0; i <= n; i++) permute[i] = i;
UNSUPPORTED("8m819riue7hsq2j2p8vn2ssb5"); //     for (i = 1; i <= n; i++) {
UNSUPPORTED("2kwf0aqv8qsg7rp5zguz8rp9a"); // 	j = i + drand48() * (n + 1 - i);
UNSUPPORTED("7d04842291lql0mh7uyxlrdk5"); // 	if (j != i) {
UNSUPPORTED("9c8awz319ebq9x0wpxjy3vdr6"); // 	    tmp = permute[i];
UNSUPPORTED("9tz2w7jz6snz46csphfzc6j1r"); // 	    permute [i] = permute[j];
UNSUPPORTED("c274z0kj80nfnoqb077lr9e5w"); //             permute [j] = tmp;
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 abhkjog92vle0cw28y59cd6ny
// static int  inside_polygon (trap_t *t, segment_t* seg) 
public static Object inside_polygon(Object... arg) {
UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int 
UNSUPPORTED("5e3r7cxnwod76fm476ejisqjs"); // inside_polygon (trap_t *t, segment_t* seg)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("1iqmfrt5wo4mwmshecxpdfpa9"); //   int rseg = t->rseg;
UNSUPPORTED("dxnx57i2vw0o7ngs9bgwpet6"); //   if (t->state == 2)
UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); //     return 0;
UNSUPPORTED("ciw4dstxif0s9rksfu13tmxi1"); //   if ((t->lseg <= 0) || (t->rseg <= 0))
UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); //     return 0;
UNSUPPORTED("ea7zf31094dwtjf2dzluky008"); //   if (((t->u0 <= 0) && (t->u1 <= 0)) || 
UNSUPPORTED("e15aszibtu1esr9cm5ddq9d5u"); //       ((t->d0 <= 0) && (t->d1 <= 0))) /* triangle */
UNSUPPORTED("be5gm064ul8v8gm34w7hgonoj"); //     return ((((&seg[rseg].v1)->y > (&seg[rseg].v0)->y + 1.0e-7) ? NOT(0) : (((&seg[rseg].v1)->y < (&seg[rseg].v0)->y - 1.0e-7) ? 0 : ((&seg[rseg].v1)->x > (&seg[rseg].v0)->x))));
UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); //   return 0;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 ew088xpoj2s831ch0zbnz5elx
// static double get_angle (pointf *vp0, pointf *vpnext, pointf *vp1) 
public static Object get_angle(Object... arg) {
UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double
UNSUPPORTED("dahlnw9xplc13ehv56akxp6fe"); // get_angle (pointf *vp0, pointf *vpnext, pointf *vp1)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("369yvcclaxnouso7vjmxhcz1l"); //   pointf v0, v1;
UNSUPPORTED("941ut9wx36d2re4xt7vn0stim"); //   v0.x = vpnext->x - vp0->x;
UNSUPPORTED("7dfsrn98hfr6a80nms62qv9dy"); //   v0.y = vpnext->y - vp0->y;
UNSUPPORTED("eholvtx37o5y2d1638yxn6v24"); //   v1.x = vp1->x - vp0->x;
UNSUPPORTED("9967xssda33wyljha7pewt4mk"); //   v1.y = vp1->y - vp0->y;
UNSUPPORTED("j9n4bua0t2z6uqjun1rcultc"); //   if (((v0).x * (v1).y - (v1).x * (v0).y) >= 0)	/* sine is positive */
UNSUPPORTED("cf3rdnuyrr7l7ewade7a57djr"); //     return ((v0).x * (v1).x + (v0).y * (v1).y)/(sqrt((v0).x * (v0).x + (v0).y * (v0).y))/(sqrt((v1).x * (v1).x + (v1).y * (v1).y));
UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); //   else
UNSUPPORTED("b8d4rpcuwbgggvigw19cs3pz3"); //     return (-1.0 * ((v0).x * (v1).x + (v0).y * (v1).y)/(sqrt((v0).x * (v0).x + (v0).y * (v0).y))/(sqrt((v1).x * (v1).x + (v1).y * (v1).y)) - 2);
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 7gi4ub1tqpupq617koabfz9iy
// static int get_vertex_positions (int v0, int v1, int *ip, int *iq) 
public static Object get_vertex_positions(Object... arg) {
UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
UNSUPPORTED("86uczcsl4cyu14zme5scqmswu"); // get_vertex_positions (int v0, int v1, int *ip, int *iq)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("en82orb21pn5f2w6hxc0pmi6r"); //   vertexchain_t *vp0, *vp1;
UNSUPPORTED("9cyat6ft4tmgpumn70l9fwydy"); //   register int i;
UNSUPPORTED("55a7kpuxgq6hsi6ljkbdivg16"); //   double angle, temp;
UNSUPPORTED("bjekmi3f789xf2g33a7v1marm"); //   int tp, tq;
UNSUPPORTED("6v6uklf23950dew0q3vlmjmtu"); //   vp0 = &vert[v0];
UNSUPPORTED("e6h7hqx9nzufu0i4o6xctjri6"); //   vp1 = &vert[v1];
UNSUPPORTED("ety4qtnzh8rpooitlhb64ufil"); //   /* p is identified as follows. Scan from (v0, v1) rightwards till */
UNSUPPORTED("9em6bl9ikz3uv4t3tpkdoxeb9"); //   /* you hit the first segment starting from v0. That chain is the */
UNSUPPORTED("17iufy6n7vezx6qpdhhsc8zvy"); //   /* chain of our interest */
UNSUPPORTED("zq0nk6k4owgwciv5sc0z95vf"); //   angle = -4.0;
UNSUPPORTED("2d2pdjjgu969q63zrkykinxdb"); //   for (i = 0; i < 4; i++)
UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); //     {
UNSUPPORTED("aiwx3n6xiaje2wbcw9fja0kp6"); //       if (vp0->vnext[i] <= 0)
UNSUPPORTED("6hzbngzom80qdcr88vnds1r59"); // 	continue;
UNSUPPORTED("2qqqfeckj323vggxs72i2b9bd"); //       if ((temp = get_angle(&vp0->pt, &(vert[vp0->vnext[i]].pt), 
UNSUPPORTED("bfendrzuwv7ttibwlfxnzh3mv"); // 			    &vp1->pt)) > angle)
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("d5mp4kdylwkyngcbi2ra9gda7"); // 	  angle = temp;
UNSUPPORTED("8gf4rptcek1rtsswxgp4f5sp"); // 	  tp = i;
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("29ch4xe4dtb8vrs3u6br7fkfn"); //   *ip = tp;
UNSUPPORTED("449uwiujph9yz1kmgp91x1mph"); //   /* Do similar actions for q */
UNSUPPORTED("zq0nk6k4owgwciv5sc0z95vf"); //   angle = -4.0;
UNSUPPORTED("2d2pdjjgu969q63zrkykinxdb"); //   for (i = 0; i < 4; i++)
UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); //     {
UNSUPPORTED("6utzp015ebcuvv226lur8xqjn"); //       if (vp1->vnext[i] <= 0)
UNSUPPORTED("6u4qfk9ctif0s5v6pg2ym2kh0"); // 	continue;      
UNSUPPORTED("4qeaopyujc1p8ghdkrfs8swg1"); //       if ((temp = get_angle(&vp1->pt, &(vert[vp1->vnext[i]].pt), 
UNSUPPORTED("6d1kzaf50kwdnqztg4frxwh8t"); // 			    &vp0->pt)) > angle)
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("d5mp4kdylwkyngcbi2ra9gda7"); // 	  angle = temp;
UNSUPPORTED("5ksmrx85xq93zau95l8v9vcve"); // 	  tq = i;
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("8xqnxp3votu03cx1jrh2jwkzn"); //   *iq = tq;
UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); //   return 0;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 9a6v0rhhqdmefbgzi11be5g6h
// static int  make_new_monotone_poly (int mcur, int v0, int v1) 
public static Object make_new_monotone_poly(Object... arg) {
UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int 
UNSUPPORTED("8dv9txhv2yeoqkzbydeqjl054"); // make_new_monotone_poly (int mcur, int v0, int v1)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("9ikjwwfx33ts34kb25fa7bc2l"); //   int p, q, ip, iq;
UNSUPPORTED("9j34whh433i14tkn8pbaxw6gh"); //   int mnew = (++mon_idx);
UNSUPPORTED("56fxdenx5fitvdwopxm5znugu"); //   int i, j, nf0, nf1;
UNSUPPORTED("en82orb21pn5f2w6hxc0pmi6r"); //   vertexchain_t *vp0, *vp1;
UNSUPPORTED("6v6uklf23950dew0q3vlmjmtu"); //   vp0 = &vert[v0];
UNSUPPORTED("e6h7hqx9nzufu0i4o6xctjri6"); //   vp1 = &vert[v1];
UNSUPPORTED("alqs5f8e3n3u5onl2jk7dufp7"); //   get_vertex_positions(v0, v1, &ip, &iq);
UNSUPPORTED("2hakm8lo9g5t2j1ag9nyr2s6n"); //   p = vp0->vpos[ip];
UNSUPPORTED("9cggg3kyqycbmj88qwiid1uar"); //   q = vp1->vpos[iq];
UNSUPPORTED("3rkbxqt4po5kl0o0mduct8rcc"); //   /* At this stage, we have got the positions of v0 and v1 in the */
UNSUPPORTED("c8605sg6k4m4718ch7un7l4n0"); //   /* desired chain. Now modify the linked lists */
UNSUPPORTED("h85pxdzzlj05gngtc6052x5l"); //   i = (++chain_idx);	/* for the new list */
UNSUPPORTED("eowz6d0op1t6t0njrx6bb0yn8"); //   j = (++chain_idx);
UNSUPPORTED("dn6hlugxl248e01l7ox4q9u8w"); //   mchain[i].vnum = v0;
UNSUPPORTED("cbym1az3wmxvz10xvo5c25vlp"); //   mchain[j].vnum = v1;
UNSUPPORTED("3xenn6wt1u82649f6st1y0jpy"); //   mchain[i].next = mchain[p].next;
UNSUPPORTED("8gj5lqet3v2djl0zzmduxhjbo"); //   mchain[mchain[p].next].prev = i;
UNSUPPORTED("8jwcwnyjn22k8hwa6snhelhdv"); //   mchain[i].prev = j;
UNSUPPORTED("e8e675obna2uq1ayo5j6qxb3c"); //   mchain[j].next = i;
UNSUPPORTED("249azfk4cx6fvn29okrr43mxg"); //   mchain[j].prev = mchain[q].prev;
UNSUPPORTED("1ejluvyey6e0j7029btn2imcn"); //   mchain[mchain[q].prev].next = j;
UNSUPPORTED("d1hgtt0rm4nozlb8yt6pa0k8q"); //   mchain[p].next = q;
UNSUPPORTED("c8s9isar38c8ee9yj9szqdh2j"); //   mchain[q].prev = p;
UNSUPPORTED("42hpz0zje3mclnj3dro8ypwml"); //   nf0 = vp0->nextfree;
UNSUPPORTED("3vhonm18vr4ry7uanlxdzsa78"); //   nf1 = vp1->nextfree;
UNSUPPORTED("dikgb6wf4n9mffboqek4g7min"); //   vp0->vnext[ip] = v1;
UNSUPPORTED("dcc84n7kvdgludx7het4l77pa"); //   vp0->vpos[nf0] = i;
UNSUPPORTED("bn2d4dxs38on2tt66qsk854a7"); //   vp0->vnext[nf0] = mchain[mchain[i].next].vnum;
UNSUPPORTED("s8g0h9c5ugu7jx7fammu57j5"); //   vp1->vpos[nf1] = j;
UNSUPPORTED("2cfbu34obnbyi820v423b3p3a"); //   vp1->vnext[nf1] = v0;
UNSUPPORTED("18ghn7twlfq25wg7ho4mdpjq5"); //   vp0->nextfree++;
UNSUPPORTED("6pibe6i58ps0evcw0elchlr5n"); //   vp1->nextfree++;
UNSUPPORTED("8ofsl1uexufhfiekbia3rpw71"); //   mon[mcur] = p;
UNSUPPORTED("6qcylzq69scx8z47rc3q53c2p"); //   mon[mnew] = i;
UNSUPPORTED("1txsom7ht7w6bgk1wfyx8lsst"); //   return mnew;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 d0so1zakha0q0j27n2kdrpttw
// static int traverse_polygon (int* visited, boxf* decomp, int size, segment_t* seg, trap_t* tr,     int mcur, int trnum, int from, int flip, int dir) 
public static Object traverse_polygon(Object... arg) {
UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
UNSUPPORTED("9guvbji3t13b64dg1nyaopea3"); // traverse_polygon (int* visited, boxf* decomp, int size, segment_t* seg, trap_t* tr,
UNSUPPORTED("cop1jvb6sbgiafrugdgcuyww8"); //     int mcur, int trnum, int from, int flip, int dir)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("9hip0zrehch3ppd50n93ndz9f"); //   trap_t *t = &tr[trnum];
UNSUPPORTED("9vw5pneq9i40hijbn87i6muzw"); //   int mnew;
UNSUPPORTED("4by94oz8hw5ksrudixtwwrdjt"); //   int v0, v1;
UNSUPPORTED("4d0metbv0f36rcwe2dlscspik"); //   int retval;
UNSUPPORTED("6b0tp7olw8su1dlt9r0409joh"); //   int do_switch = 0;
UNSUPPORTED("d0q9pab7nbe8xr6dncj1rkglj"); //   if ((trnum <= 0) || visited[trnum])
UNSUPPORTED("5fnyq1zql95vx5xiysa7fj12a"); //     return size;
UNSUPPORTED("cnabgqf0r6cwbefc6z48v4muv"); //   visited[trnum] = NOT(0);
UNSUPPORTED("e3779kj7w5dz1oy9qmxmrgv6x"); //   if ((t->hi.y > t->lo.y) &&
UNSUPPORTED("1bkd7ej5xoxkn9w9yngm73in6"); //       (seg[t->lseg].v0.x == seg[t->lseg].v1.x) &&
UNSUPPORTED("6dhg0j2967gtz8tbuf2fkmvte"); //       (seg[t->rseg].v0.x == seg[t->rseg].v1.x)) {
UNSUPPORTED("cegqs3fbxpy1vh6ttghu2haol"); //       if (flip) {
UNSUPPORTED("6uelhwb8drf4b6q5ru2myp9gr"); //           decomp[size].LL.x = t->lo.y;
UNSUPPORTED("3ie5nszkp1w8ls6i09xu2kj58"); //           decomp[size].LL.y = -seg[t->rseg].v0.x;
UNSUPPORTED("61vo1z771fo68sucys7bs0ijk"); //           decomp[size].UR.x = t->hi.y;
UNSUPPORTED("a9grvoswejyt77ctdmsonk0qt"); //           decomp[size].UR.y = -seg[t->lseg].v0.x;
UNSUPPORTED("yjgjo2sxpmhb7skgxwjx03ie"); //       } else {
UNSUPPORTED("8ruo1j70pzrg494vp86s1sqc"); //           decomp[size].LL.x = seg[t->lseg].v0.x;
UNSUPPORTED("6mj48zie12c6x3u7xea2f8hr3"); //           decomp[size].LL.y = t->lo.y;
UNSUPPORTED("39hkdsjwkvofrh735gqoi7dci"); //           decomp[size].UR.x = seg[t->rseg].v0.x;
UNSUPPORTED("1bjhgfi5s9y6kuu4xguq9bd20"); //           decomp[size].UR.y = t->hi.y;
UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); //       }
UNSUPPORTED("cy8kzhvb0obp7jgom47s7zco9"); //       size++;
UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); //   }
UNSUPPORTED("8xva2s9wcuidd7mlvpytarai8"); //   /* We have much more information available here. */
UNSUPPORTED("zp53t0r52m3c9e801jgb0anx"); //   /* rseg: goes upwards   */
UNSUPPORTED("2a7sgu699nkxh3e7rs42nslze"); //   /* lseg: goes downwards */
UNSUPPORTED("bspvkvr3shhnvq13d1c9svgc8"); //   /* Initially assume that dir = TR_FROM_DN (from the left) */
UNSUPPORTED("859erkm7vifnaeylhrg1ge489"); //   /* Switch v0 and v1 if necessary afterwards */
UNSUPPORTED("7nenieaup2bo7wznju50124gu"); //   /* special cases for triangles with cusps at the opposite ends. */
UNSUPPORTED("2f72rdf12bkur0sb8jzt141et"); //   /* take care of this first */
UNSUPPORTED("ark0tbg2u4lksur0hn1thlg8u"); //   if ((t->u0 <= 0) && (t->u1 <= 0))
UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); //     {
UNSUPPORTED("2gky1sit45s3urap7m9572dui"); //       if ((t->d0 > 0) && (t->d1 > 0)) /* downward opening triangle */
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("a7q0c7q3zwi84dk8feu8hw949"); // 	  v0 = tr[t->d1].lseg;
UNSUPPORTED("3un92nsknf6dvivoo4ut6xpjw"); // 	  v1 = t->lseg;
UNSUPPORTED("b9sp6domcray594tb7rq7599"); // 	  if (from == t->d1)
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("9b48jw83n2qlbd27xuf69c5qe"); // 	      do_switch = NOT(0);
UNSUPPORTED("7dchvr9xk6f4wwi83audzw6vj"); // 	      mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("4mo16xjesdvkqcrs3j9pw6rb6"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("dtlg30b72ms08kp03lb2akq3r"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1);	    
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // 	  else
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("5ente0j9qdx8ibzrosxtyl4nv"); // 	      mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("3r3k4encoopl3sdf3f1ozjqhk"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("1zydelpskydrv2jlukrghxjqm"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1);
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); //       else
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("d1qk9y23kl78admhc396jcrkj"); // 	  retval = -1;	/* Just traverse all neighbours */
UNSUPPORTED("55rfugj7cpg4mi8oc5lwm9ve9"); // 	  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("7n2ov6zceqcw0j8pmeiz8hn4s"); // 	  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("e1jcx0tbalqyelsxssbh3lmt6"); // 	  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("4me7fmwngeaircvtb7sff3ijj"); // 	  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("biibbejkkn6y2hgp4rbkzlt63"); //   else if ((t->d0 <= 0) && (t->d1 <= 0))
UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); //     {
UNSUPPORTED("co9cdjh0zss1ce6wn5hsovb4o"); //       if ((t->u0 > 0) && (t->u1 > 0)) /* upward opening triangle */
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("608hye0unh62kxu73xjcim0vg"); // 	  v0 = t->rseg;
UNSUPPORTED("997u5iufydhu5b83stykxqi4s"); // 	  v1 = tr[t->u0].rseg;
UNSUPPORTED("5pqs6tn54r9kjjuv7noh9n97t"); // 	  if (from == t->u1)
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("9b48jw83n2qlbd27xuf69c5qe"); // 	      do_switch = NOT(0);
UNSUPPORTED("7dchvr9xk6f4wwi83audzw6vj"); // 	      mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("c0yxgwq7qw8py1stvijtw9ut3"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("et6qmwrb429cnthwmphempxu0"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2);	    
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // 	  else
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("5ente0j9qdx8ibzrosxtyl4nv"); // 	      mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("bxugslyfkclt3755mhv0sc3ht"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("64qq66m1iccqslv5wour58853"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2);
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); //       else
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("d1qk9y23kl78admhc396jcrkj"); // 	  retval = -1;	/* Just traverse all neighbours */
UNSUPPORTED("55rfugj7cpg4mi8oc5lwm9ve9"); // 	  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("7n2ov6zceqcw0j8pmeiz8hn4s"); // 	  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("e1jcx0tbalqyelsxssbh3lmt6"); // 	  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("4me7fmwngeaircvtb7sff3ijj"); // 	  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("1izitiatr2ulhvy8h0pnsxiiz"); //   else if ((t->u0 > 0) && (t->u1 > 0)) 
UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); //     {
UNSUPPORTED("5pvgc5lzsbemakfagmdy8onnt"); //       if ((t->d0 > 0) && (t->d1 > 0)) /* downward + upward cusps */
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("a7q0c7q3zwi84dk8feu8hw949"); // 	  v0 = tr[t->d1].lseg;
UNSUPPORTED("997u5iufydhu5b83stykxqi4s"); // 	  v1 = tr[t->u0].rseg;
UNSUPPORTED("3oejl3ub1rc10j9jmx94a30sw"); // 	  retval = 3;
UNSUPPORTED("cpjixbghid2v2ttmi1omjq4df"); // 	  if (((dir == 2) && (t->d1 == from)) ||
UNSUPPORTED("1vtjp034u1x48uhzu2jvmh0ek"); // 	      ((dir == 1) && (t->u1 == from)))
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("9b48jw83n2qlbd27xuf69c5qe"); // 	      do_switch = NOT(0);
UNSUPPORTED("7dchvr9xk6f4wwi83audzw6vj"); // 	      mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("c0yxgwq7qw8py1stvijtw9ut3"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("4mo16xjesdvkqcrs3j9pw6rb6"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("bwjfea2e7yj2tyyhz2fj73xub"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2);
UNSUPPORTED("c6tug0v8jlllvmf2nw412i7az"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1);
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // 	  else
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("5ente0j9qdx8ibzrosxtyl4nv"); // 	      mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("bxugslyfkclt3755mhv0sc3ht"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("3r3k4encoopl3sdf3f1ozjqhk"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("64qq66m1iccqslv5wour58853"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2);
UNSUPPORTED("b00fn0czpty1ag5ihw9ev67k9"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1);	      
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("7vbb8vznij9zlyolu6orgzq63"); //       else			/* only downward cusp */
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("8a5njs108pwwsicxpr9cp011e"); // 	  if (((fabs((&t->lo)->y - (&seg[t->lseg].v1)->y) <= 1.0e-7) && (fabs((&t->lo)->x - (&seg[t->lseg].v1)->x) <= 1.0e-7)))
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("iq55fez7l08t1doqy34awci0"); // 	      v0 = tr[t->u0].rseg;
UNSUPPORTED("6dqmuhbse549xc7nbc1t4fi8c"); // 	      v1 = seg[t->lseg].next;
UNSUPPORTED("3o1isg154krcrahue9rgdvzzv"); // 	      retval = 4;
UNSUPPORTED("ct1dz4hcovsoo7o89yuv4jqaj"); // 	      if ((dir == 1) && (t->u0 == from))
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // 		  do_switch = NOT(0);
UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // 		  mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1);
UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2);
UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // 	      else
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // 		  mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // 	  else
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("7mcbwj8a2veib26ww67v0xayb"); // 	      v0 = t->rseg;
UNSUPPORTED("el138o2v6si9fi54s9rho23kj"); // 	      v1 = tr[t->u0].rseg;	
UNSUPPORTED("cdlggb241g5t55g6npu51bhjo"); // 	      retval = 5;
UNSUPPORTED("5jw5gn3xil0quizho5x17qzin"); // 	      if ((dir == 1) && (t->u1 == from))
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // 		  do_switch = NOT(0);
UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // 		  mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1);
UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1);
UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // 	      else
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // 		  mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("8ql1l7nv15rr51xt5ty1sjycw"); //   else if ((t->u0 > 0) || (t->u1 > 0)) /* no downward cusp */
UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); //     {
UNSUPPORTED("duzxgn403jzqn6d6ut3gz298t"); //       if ((t->d0 > 0) && (t->d1 > 0)) /* only upward cusp */
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("4xbxe3o8leve6xm0t19ee2vfe"); // 	  if (((fabs((&t->hi)->y - (&seg[t->lseg].v0)->y) <= 1.0e-7) && (fabs((&t->hi)->x - (&seg[t->lseg].v0)->x) <= 1.0e-7)))
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("ddiuyd0k6l4ju7yt0t7gnkyn2"); // 	      v0 = tr[t->d1].lseg;
UNSUPPORTED("3xgnfxeseit96nt2oywbb12cm"); // 	      v1 = t->lseg;
UNSUPPORTED("612bonw6ququtpyb2otlknu6u"); // 	      retval = 6;
UNSUPPORTED("52c1b8vw0ww4s2y1fp9e5rjxt"); // 	      if (!((dir == 2) && (t->d0 == from)))
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // 		  do_switch = NOT(0);
UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // 		  mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // 	      else
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // 		  mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2);
UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2);
UNSUPPORTED("5yk6sndya5s45z9fap3jlftsv"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1);	      
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // 	  else
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("ddiuyd0k6l4ju7yt0t7gnkyn2"); // 	      v0 = tr[t->d1].lseg;
UNSUPPORTED("7wup2u127p4wprrhd2g65hvf6"); // 	      v1 = seg[t->rseg].next;
UNSUPPORTED("6ywwmc78aiixut85yk4dr53yx"); // 	      retval = 7;	    
UNSUPPORTED("ayjr7wdfuvpw08o3v1x8gwrxn"); // 	      if ((dir == 2) && (t->d1 == from))
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // 		  do_switch = NOT(0);
UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // 		  mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2);
UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2);
UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // 	      else
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // 		  mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("cs5d2p3v6x67knxt079180lf1"); //       else			/* no cusp */
UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // 	{
UNSUPPORTED("u3jb6lmd4ip7tq4edphxoy2z"); // 	  if (((fabs((&t->hi)->y - (&seg[t->lseg].v0)->y) <= 1.0e-7) && (fabs((&t->hi)->x - (&seg[t->lseg].v0)->x) <= 1.0e-7)) &&
UNSUPPORTED("8hbx4q52b68r4izus3j4ewijg"); // 	      ((fabs((&t->lo)->y - (&seg[t->rseg].v0)->y) <= 1.0e-7) && (fabs((&t->lo)->x - (&seg[t->rseg].v0)->x) <= 1.0e-7)))
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("7mcbwj8a2veib26ww67v0xayb"); // 	      v0 = t->rseg;
UNSUPPORTED("3xgnfxeseit96nt2oywbb12cm"); // 	      v1 = t->lseg;
UNSUPPORTED("cj0s3n96u7e6tq1nzlxp8a7gv"); // 	      retval = 2;
UNSUPPORTED("azgs71ez0f45idcd7u0uhjkz4"); // 	      if (dir == 1)
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // 		  do_switch = NOT(0);
UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // 		  mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1);
UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // 	      else
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // 		  mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2);
UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("30bq1zitecexyibeos8lcz9ms"); // 	  else if (((fabs((&t->hi)->y - (&seg[t->rseg].v1)->y) <= 1.0e-7) && (fabs((&t->hi)->x - (&seg[t->rseg].v1)->x) <= 1.0e-7)) &&
UNSUPPORTED("7fm0u4okmm25vcrbk21uccbkf"); // 		   ((fabs((&t->lo)->y - (&seg[t->lseg].v1)->y) <= 1.0e-7) && (fabs((&t->lo)->x - (&seg[t->lseg].v1)->x) <= 1.0e-7)))
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("8e5yhelccmj6n8d33ziozi9ej"); // 	      v0 = seg[t->rseg].next;
UNSUPPORTED("6dqmuhbse549xc7nbc1t4fi8c"); // 	      v1 = seg[t->lseg].next;
UNSUPPORTED("eh17urgk88bfnpryw1evbojlf"); // 	      retval = 1;
UNSUPPORTED("azgs71ez0f45idcd7u0uhjkz4"); // 	      if (dir == 1)
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // 		  do_switch = NOT(0);
UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // 		  mnew = make_new_monotone_poly(mcur, v1, v0);
UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1);
UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // 	      else
UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // 		{
UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // 		  mnew = make_new_monotone_poly(mcur, v0, v1);
UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);
UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2);
UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // 		  size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2);
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // 		}
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("4i2amsjqesppq3lp9vpmv7r4r"); // 	  else			/* no split possible */
UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // 	    {
UNSUPPORTED("a4ghaevttvkkfms2dhd4j26pc"); // 	      retval = -1;
UNSUPPORTED("bxugslyfkclt3755mhv0sc3ht"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2);
UNSUPPORTED("3r3k4encoopl3sdf3f1ozjqhk"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1);
UNSUPPORTED("c0yxgwq7qw8py1stvijtw9ut3"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2);
UNSUPPORTED("3ypcbrw5a964vz3dszjca8xvw"); // 	      size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1);	      	      
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // 	    }
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // 	}
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("8mmoka8dpm06e00j83nvx2wfc"); //   return size;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 1q5h2go20arrwvxkwi1dpllun
// static int monotonate_trapezoids(int nsegs, segment_t*seg, trap_t* tr,      int flip, boxf* decomp) 
public static Object monotonate_trapezoids(Object... arg) {
UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
UNSUPPORTED("4st5re5qeun3fazm6nwtr2504"); // monotonate_trapezoids(int nsegs, segment_t*seg, trap_t* tr, 
UNSUPPORTED("3gqslrg5hqigs6bb03nagwbax"); //     int flip, boxf* decomp)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("9v0t4zzai4k1kr9wu7yirdcca"); //     int i, size;
UNSUPPORTED("2axop7sy1z49z2ga4o3phveq3"); //     int tr_start;
UNSUPPORTED("403dbgvseikvuaz19wa8ka871"); //     int tr_size = (5*(nsegs)+1);
UNSUPPORTED("5l974t0r35h6lgions7zrfr9n"); //     int* visited = (int*)zmalloc((tr_size)*sizeof(int));
UNSUPPORTED("8kbv1p0hl6a1jsb28mp9xizs6"); //     mchain = (monchain_t*)zmalloc((tr_size)*sizeof(monchain_t));
UNSUPPORTED("50knp82hjjep106iokix8jayb"); //     vert = (vertexchain_t*)zmalloc((nsegs+1)*sizeof(vertexchain_t)); 
UNSUPPORTED("3joe7zjof9jfs427j0nanppzg"); //     mon = (int*)zmalloc((nsegs)*sizeof(int));    
UNSUPPORTED("5stezg8pn70o9al2yeof9vbbm"); //   /* First locate a trapezoid which lies inside the polygon */
UNSUPPORTED("clz63gofo9l9x4djgclagrdbl"); //   /* and which is triangular */
UNSUPPORTED("bfkwyvnluov44fmf0ve0qc47b"); //     for (i = 0; i < (5*(nsegs)+1); i++)
UNSUPPORTED("3kwag0shsa1vlgnpfz2z52jad"); // 	if (inside_polygon(&tr[i], seg)) break;
UNSUPPORTED("ebpi22p8d3ms6x8kif7wf849m"); //     tr_start = i;
UNSUPPORTED("80e8cmn8ppz1g34yart4h3guc"); //   /* Initialise the mon data-structure and start spanning all the */
UNSUPPORTED("c288aziy4b5qyrm0inw81wpf"); //   /* trapezoids within the polygon */
UNSUPPORTED("9qxeq136dyf2jnwd4bf1kuaq6"); //     for (i = 1; i <= nsegs; i++) {
UNSUPPORTED("9m9y60p6vbo7stjuyotwxb88s"); // 	mchain[i].prev = seg[i].prev;
UNSUPPORTED("88ejlvwd7gy17hqrhragtc8zv"); // 	mchain[i].next = seg[i].next;
UNSUPPORTED("cu3ie2h2ob81y8d5ebxfm56uj"); // 	mchain[i].vnum = i;
UNSUPPORTED("9akiu4gv6b7q4t4v7jbvspe77"); // 	vert[i].pt = seg[i].v0;
UNSUPPORTED("j6yppsuzqh4phhdx6t7chtp3"); // 	vert[i].vnext[0] = seg[i].next; /* next vertex */
UNSUPPORTED("avvt0stq2xxai7od20rqmnt4c"); // 	vert[i].vpos[0] = i;	/* locn. of next vertex */
UNSUPPORTED("68bp8qgzocylz07fdkq761k61"); // 	vert[i].nextfree = 1;
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); //     }
UNSUPPORTED("50js3uabj113ezvs27yvc5zv5"); //     chain_idx = nsegs;
UNSUPPORTED("8ocywthfoxu2ckdm469ksnvdw"); //     mon_idx = 0;
UNSUPPORTED("36vw4fu4m3w15c4afhp1dgf7p"); //     mon[0] = 1;			/* position of any vertex in the first */
UNSUPPORTED("1gkcquzwnonqmlrklzwimth46"); // 				/* chain  */
UNSUPPORTED("5mq8oebfg9zlu2dh458odwyza"); //   /* traverse the polygon */
UNSUPPORTED("l12iv7r3oz1l157wkxev3k26"); //     if (tr[tr_start].u0 > 0)
UNSUPPORTED("ef00tkl3m246yucima83gjqry"); // 	size = traverse_polygon (visited, decomp, 0, seg, tr, 0, tr_start, tr[tr_start].u0, flip, 1);
UNSUPPORTED("ek9ndv4cgpvv1ppq3o6hffjln"); //     else if (tr[tr_start].d0 > 0)
UNSUPPORTED("2phk6542w1awpzofg19twa9u3"); // 	size = traverse_polygon (visited, decomp, 0, seg, tr, 0, tr_start, tr[tr_start].d0, flip, 2);
UNSUPPORTED("7p1upi5nlpk6oews5ejvqxzgq"); //     free (visited);
UNSUPPORTED("dyur1to2vops13ap1n0q7lsol"); //     free (mchain);
UNSUPPORTED("8pnrg51s1fq9cek6lwdi7795g"); //     free (vert);
UNSUPPORTED("d0yk4ad70j6la3tjcpwkdaqvf"); //     free (mon);
UNSUPPORTED("6vecslx1iges54gigd2bc6x6h"); //   /* return the number of rects created */
UNSUPPORTED("8mmoka8dpm06e00j83nvx2wfc"); //   return size;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 7dl8o2typqtrtf964o8l9x9mn
// static int  rectIntersect (boxf *d, const boxf *r0, const boxf *r1) 
public static Object rectIntersect(Object... arg) {
UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int 
UNSUPPORTED("emzrn19dd9a1n8a75xt78ialj"); // rectIntersect (boxf *d, const boxf *r0, const boxf *r1)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("6wfj8onzmd4ihhh62dqfmqpbx"); //     double t;
UNSUPPORTED("10mg3ctpr0doly1xr4mn7m39v"); //     t = (r0->LL.x > r1->LL.x) ? r0->LL.x : r1->LL.x;
UNSUPPORTED("4q3ymg1fo2b29aomy5kba4o06"); //     d->UR.x = (r0->UR.x < r1->UR.x) ? r0->UR.x : r1->UR.x;
UNSUPPORTED("1muxzktb9b7cx05opqest2kf9"); //     d->LL.x = t;
UNSUPPORTED("qu5cb749o6mku5meyk7xzjiq"); //     t = (r0->LL.y > r1->LL.y) ? r0->LL.y : r1->LL.y;
UNSUPPORTED("3063iivbgzdi6hh53rsfr6o54"); //     d->UR.y = (r0->UR.y < r1->UR.y) ? r0->UR.y : r1->UR.y;
UNSUPPORTED("5at6mfpw5k8ldnmm0icvhnj8j"); //     d->LL.y = t;
UNSUPPORTED("upus29izwyyfylisn68yvdtv"); //     if ((d->LL.x >= d->UR.x) ||
UNSUPPORTED("b45965pwcafgyy3hsxz3h3ywo"); //         (d->LL.y >= d->UR.y))
UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); //     return 0;
UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); //     return 1;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}




//3 73fynz7ym6jvzqhvlj7evww7y
// boxf* partition (cell* cells, int ncells, int* nrects, boxf bb) 
public static Object partition(Object... arg) {
UNSUPPORTED("e6wfqaorm3eq04ew3viebrrmw"); // boxf*
UNSUPPORTED("6tl2sd3xvb9xj27ba3ekerljs"); // partition (cell* cells, int ncells, int* nrects, boxf bb)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("5a9fu6e10ez4wfuzd6drz5wqj"); //     int nsegs = 4*(ncells+1);
UNSUPPORTED("8wy6s9fpdi1b5ozj26nvgi5k8"); //     segment_t* segs = (segment_t*)gmalloc((nsegs+1)*sizeof(segment_t));
UNSUPPORTED("56aa5hinuuh4nm3lzmpzutm67"); //     int* permute = (int*)zmalloc((nsegs+1)*sizeof(int));
UNSUPPORTED("79evy8eevd0rueiuu9nwedmmd"); //     int hd_size, vd_size;
UNSUPPORTED("377uv2ijmy274yxftumax5tc"); //     int i, j, cnt = 0;
UNSUPPORTED("aset1r6i7s8ess7vp2yh2hy3l"); //     boxf* rs;
UNSUPPORTED("bxa465e0rk3cso7kp0a5dkzjk"); //     int ntraps = (5*(nsegs)+1);
UNSUPPORTED("er46tt5i0x6c3jxkq7mwoku1i"); //     trap_t* trs = (trap_t*)gmalloc((ntraps)*sizeof(trap_t));
UNSUPPORTED("afztmb3ryx5mnwhx57hubf04c"); //     boxf* hor_decomp = (boxf*)zmalloc((ntraps)*sizeof(boxf));
UNSUPPORTED("57drcp2w6xycpft0alhizl1jb"); //     boxf* vert_decomp = (boxf*)zmalloc((ntraps)*sizeof(boxf));
UNSUPPORTED("1k4qbp811phcxky1im1ceolu8"); //     int nt;
UNSUPPORTED("4x4e3wgmpgyp48r9d918kpji2"); //     /* fprintf (stderr, "cells = %d segs = %d traps = %d\n", ncells, nsegs, ntraps);  */
UNSUPPORTED("3aznlcy8m96vtolzl06u5su27"); //     genSegments (cells, ncells, bb, segs, 0);
UNSUPPORTED("cc0cvkd217k2gs1dd318mzfup"); //     srand(173);
UNSUPPORTED("1icg2pbsojr5i5uz47hr32q6g"); //     generateRandomOrdering (nsegs, permute);
UNSUPPORTED("diwoovfk15pa3cutfdespebi4"); //     nt = construct_trapezoids(nsegs, segs, permute, ntraps, trs);
UNSUPPORTED("9y24uilj6sd8c40w65qz24w28"); //     /* fprintf (stderr, "hor traps = %d\n", nt); */
UNSUPPORTED("bywih9homfisgvn30fa9ylam6"); //     hd_size = monotonate_trapezoids (nsegs, segs, trs, 0, hor_decomp);
UNSUPPORTED("br66y4yenl0hukxxeblvw92wg"); //     genSegments (cells, ncells, bb, segs, 1);
UNSUPPORTED("1icg2pbsojr5i5uz47hr32q6g"); //     generateRandomOrdering (nsegs, permute);
UNSUPPORTED("diwoovfk15pa3cutfdespebi4"); //     nt = construct_trapezoids(nsegs, segs, permute, ntraps, trs);
UNSUPPORTED("nklu5u660tkq7hgg1skeyos0"); //     /* fprintf (stderr, "ver traps = %d\n", nt); */
UNSUPPORTED("aan563s5w2u32ftofra38kc7f"); //     vd_size = monotonate_trapezoids (nsegs, segs, trs, 1, vert_decomp);
UNSUPPORTED("3tjm1uhdfv0fgkihdgxfbtp2k"); //     rs = (boxf*)zmalloc((hd_size*vd_size)*sizeof(boxf));
UNSUPPORTED("1rg2b95x8evw81ge2jwloma9y"); //     for (i=0; i<vd_size; i++) 
UNSUPPORTED("deh27dmdimq7xjse31ugm10q2"); // 	for (j=0; j<hd_size; j++)
UNSUPPORTED("ecs2boj9ol0jad85kohtrmhjn"); // 	    if (rectIntersect(&rs[cnt], &vert_decomp[i], &hor_decomp[j]))
UNSUPPORTED("e582tvavmpq7rmvpljjzzogkb"); // 		cnt++;
UNSUPPORTED("3r567j02zez92pbf1xosyruuy"); //     rs = RALLOC (cnt, rs, boxf);
UNSUPPORTED("864f5ylvxgoy5rwmwl4pstg2p"); //     free (segs);
UNSUPPORTED("cw72bzwepetjgucravr0r4tes"); //     free (permute);
UNSUPPORTED("fe68055ozba4x8hu6folhq63"); //     free (trs);
UNSUPPORTED("1bxw4aid8f0ujf72zwkuybw96"); //     free (hor_decomp);
UNSUPPORTED("a2xs0v27ec23bhvf4kay6bu6b"); //     free (vert_decomp);
UNSUPPORTED("3pwrekbwa61rwk7qtiod6xaax"); //     *nrects = cnt;
UNSUPPORTED("ejswo03ycqos8e6zlteyjobpz"); //     return rs;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }

throw new UnsupportedOperationException();
}


}
