/*
**
** The C code is generated by ATS/Postiats
** The compilation time is: 2014-8-4: 12h:36m
**
*/
/*
typedefs-for-tyrecs-and-tysums(beg)
*/
typedef
ATSstruct {
int exntag ;
char *exnmsg ;
atstkind_type(atstype_ptrk) atslab__0; 
} pats_ccomp_runtime2_tyexn ;
/*
typedefs-for-tyrecs-and-tysums(end)
*/
/*
dynconlst-declaration(beg)
*/
/*
dynconlst-declaration(end)
*/
/*
dyncstlst-declaration(beg)
*/
ATSdyncst_mac(atspre_prerr_string)
ATSdyncst_mac(atspre_prerr_newline)
ATSdyncst_mac(atspre_exit)
ATSdyncst_extfun(atsruntime_handle_uncaughtexn_rest, (atstype_exnconptr), atsvoid_t0ype) ;
/*
dyncstlst-declaration(end)
*/
/*
dynvalist-implementation(beg)
*/
/*
dynvalist-implementation(end)
*/
/*
exnconlst-declaration(beg)
*/
/*
assumelst-declaration(beg)
*/
/*
assumelst-declaration(end)
*/
/*
extypelst-declaration(beg)
*/
/*
extypelst-declaration(end)
*/

/* ****** ****** */

/*
/home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1541(line=43, offs=3) -- 2287(line=72, offs=4)
*/
/*
local: 
global: atsruntime_handle_uncaughtexn$0$0(level=0)
local: 
global: 
*/
ATSextern()
atsvoid_t0ype
atsruntime_handle_uncaughtexn(void *arg0)
{
/* tmpvardeclst(beg) */
ATStmpdec_void(tmpret0) ;
ATStmpdec(tmp1, atstkind_type(atstype_ptrk)) ;
ATStmpdec(tmp2, atstkind_type(atstype_ptrk)) ;
ATStmpdec_void(tmp3) ;
ATStmpdec_void(tmp4) ;
ATStmpdec_void(tmp5) ;
ATStmpdec_void(tmp6) ;
ATStmpdec_void(tmp7) ;
ATStmpdec_void(tmp8) ;
ATStmpdec_void(tmp9) ;
ATStmpdec_void(tmp10) ;
ATStmpdec_void(tmp11) ;
ATStmpdec_void(tmp12) ;
ATStmpdec_void(tmp13) ;
ATStmpdec_void(tmp14) ;
ATStmpdec_void(tmp15) ;
ATStmpdec_void(tmp16) ;
/* tmpvardeclst(end) */
/* funbodyinstrlst(beg) */
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1509(line=42, offs=1) -- 2287(line=72, offs=4)
*/
ATSINSflab(__patsflab_atsruntime_handle_uncaughtexn):
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1641(line=51, offs=1) -- 2280(line=70, offs=65)
*/
ATScaseof_beg()
/*
** ibranchlst-beg
*/
ATSbranch_beg()
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1659(line=53, offs=3) -- 1672(line=53, offs=16)
*/
ATSINSlab(__atstmplab0):
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1542(line=43, offs=4) -- 1545(line=43, offs=7)
*/
ATSifnthen(ATSCKpat_exn0(arg0, ATSLIB_056_prelude__AssertExn)) { ATSINSgoto(__atstmplab2) ; } ;
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1672(line=53, offs=16) -- 1672(line=53, offs=16)
*/
ATSINSlab(__atstmplab1):
/*
emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)
*/
/*
ibranch-mbody:
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1676(line=53, offs=20) -- 1761(line=56, offs=6)
*/
/*
letpush(beg)
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1693(line=54, offs=14) -- 1706(line=54, offs=27)
*/
ATSINSmove_void(tmp3, atspre_prerr_string(ATSPMVstring("exit(ATS): uncaught exception at run-time"))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1720(line=55, offs=14) -- 1744(line=55, offs=38)
*/
ATSINSmove_void(tmp4, atspre_prerr_string(ATSPMVstring(": AssertExn"))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1720(line=55, offs=14) -- 1744(line=55, offs=38)
*/
ATSINSmove_void(tmp5, atspre_prerr_newline()) ;

/*
letpush(end)
*/

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1748(line=55, offs=42) -- 1754(line=55, offs=48)
*/
ATSINSmove_void(tmpret0, atspre_exit(ATSPMVi0nt(1))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1676(line=53, offs=20) -- 1761(line=56, offs=6)
*/
/*
INSletpop()
*/
ATSbranch_end()

ATSbranch_beg()
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1788(line=57, offs=3) -- 1803(line=57, offs=18)
*/
ATSINSlab(__atstmplab2):
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1542(line=43, offs=4) -- 1545(line=43, offs=7)
*/
ATSifnthen(ATSCKpat_exn0(arg0, ATSLIB_056_prelude__NotFoundExn)) { ATSINSgoto(__atstmplab4) ; } ;
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1803(line=57, offs=18) -- 1803(line=57, offs=18)
*/
ATSINSlab(__atstmplab3):
/*
emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)
*/
/*
ibranch-mbody:
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1807(line=57, offs=22) -- 1894(line=60, offs=6)
*/
/*
letpush(beg)
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1824(line=58, offs=14) -- 1837(line=58, offs=27)
*/
ATSINSmove_void(tmp6, atspre_prerr_string(ATSPMVstring("exit(ATS): uncaught exception at run-time"))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1851(line=59, offs=14) -- 1877(line=59, offs=40)
*/
ATSINSmove_void(tmp7, atspre_prerr_string(ATSPMVstring(": NotFoundExn"))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1851(line=59, offs=14) -- 1877(line=59, offs=40)
*/
ATSINSmove_void(tmp8, atspre_prerr_newline()) ;

/*
letpush(end)
*/

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1881(line=59, offs=44) -- 1887(line=59, offs=50)
*/
ATSINSmove_void(tmpret0, atspre_exit(ATSPMVi0nt(1))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1807(line=57, offs=22) -- 1894(line=60, offs=6)
*/
/*
INSletpop()
*/
ATSbranch_end()

ATSbranch_beg()
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1921(line=61, offs=3) -- 1940(line=61, offs=22)
*/
ATSINSlab(__atstmplab4):
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1542(line=43, offs=4) -- 1545(line=43, offs=7)
*/
ATSifnthen(ATSCKpat_exn1(arg0, ATSLIB_056_prelude__GenerallyExn)) { ATSINSgoto(__atstmplab6) ; } ;
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1940(line=61, offs=22) -- 1940(line=61, offs=22)
*/
ATSINSlab(__atstmplab5):
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1936(line=61, offs=18) -- 1939(line=61, offs=21)
*/
ATSINSmove(tmp1, ATSSELcon(arg0, pats_ccomp_runtime2_tyexn, atslab__0)) ;
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1921(line=61, offs=3) -- 2039(line=64, offs=6)
*/
/*
ATSINSfreecon(arg0) ;
*/
/*
emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)
*/
/*
ibranch-mbody:
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1944(line=61, offs=26) -- 2039(line=64, offs=6)
*/
/*
letpush(beg)
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1961(line=62, offs=14) -- 1974(line=62, offs=27)
*/
ATSINSmove_void(tmp9, atspre_prerr_string(ATSPMVstring("exit(ATS): uncaught exception at run-time"))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1988(line=63, offs=14) -- 2022(line=63, offs=48)
*/
ATSINSmove_void(tmp10, atspre_prerr_string(ATSPMVstring(": GenerallyExn: "))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1988(line=63, offs=14) -- 2022(line=63, offs=48)
*/
ATSINSmove_void(tmp11, atspre_prerr_string(tmp1)) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1988(line=63, offs=14) -- 2022(line=63, offs=48)
*/
ATSINSmove_void(tmp12, atspre_prerr_newline()) ;

/*
letpush(end)
*/

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2026(line=63, offs=52) -- 2032(line=63, offs=58)
*/
ATSINSmove_void(tmpret0, atspre_exit(ATSPMVi0nt(1))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1944(line=61, offs=26) -- 2039(line=64, offs=6)
*/
/*
INSletpop()
*/
ATSbranch_end()

ATSbranch_beg()
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2066(line=65, offs=3) -- 2086(line=65, offs=23)
*/
ATSINSlab(__atstmplab6):
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1542(line=43, offs=4) -- 1545(line=43, offs=7)
*/
ATSifnthen(ATSCKpat_exn1(arg0, ATSLIB_056_prelude__IllegalArgExn)) { ATSINSgoto(__atstmplab8) ; } ;
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2086(line=65, offs=23) -- 2086(line=65, offs=23)
*/
ATSINSlab(__atstmplab7):
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2082(line=65, offs=19) -- 2085(line=65, offs=22)
*/
ATSINSmove(tmp2, ATSSELcon(arg0, pats_ccomp_runtime2_tyexn, atslab__0)) ;
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2066(line=65, offs=3) -- 2186(line=68, offs=6)
*/
/*
ATSINSfreecon(arg0) ;
*/
/*
emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)
*/
/*
ibranch-mbody:
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2090(line=65, offs=27) -- 2186(line=68, offs=6)
*/
/*
letpush(beg)
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2107(line=66, offs=14) -- 2120(line=66, offs=27)
*/
ATSINSmove_void(tmp13, atspre_prerr_string(ATSPMVstring("exit(ATS): uncaught exception at run-time"))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2134(line=67, offs=14) -- 2169(line=67, offs=49)
*/
ATSINSmove_void(tmp14, atspre_prerr_string(ATSPMVstring(": IllegalArgExn: "))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2134(line=67, offs=14) -- 2169(line=67, offs=49)
*/
ATSINSmove_void(tmp15, atspre_prerr_string(tmp2)) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2134(line=67, offs=14) -- 2169(line=67, offs=49)
*/
ATSINSmove_void(tmp16, atspre_prerr_newline()) ;

/*
letpush(end)
*/

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2173(line=67, offs=53) -- 2179(line=67, offs=59)
*/
ATSINSmove_void(tmpret0, atspre_exit(ATSPMVi0nt(1))) ;

/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2090(line=65, offs=27) -- 2186(line=68, offs=6)
*/
/*
INSletpop()
*/
ATSbranch_end()

ATSbranch_beg()
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2219(line=70, offs=4) -- 2219(line=70, offs=4)
*/
ATSINSlab(__atstmplab8):
/*
emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)
*/
/*
ibranch-mbody:
*/
/*
emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2240(line=70, offs=25) -- 2279(line=70, offs=64)
*/
ATSINSmove_void(tmpret0, atsruntime_handle_uncaughtexn_rest(arg0)) ;

ATSbranch_end()

/*
** ibranchlst-end
*/
ATScaseof_end()

/* funbodyinstrlst(end) */
ATSreturn_void(tmpret0) ;
} /* end of [atsruntime_handle_uncaughtexn] */

/* ****** ****** */

/* end of [pats_ccomp_runtime2_dats.c] */
