ats_int_type
ATS_2d0_2e2_2e10_2libc_2SATS_2random_2esats__srand48_with_gettimeofday () {
/* local vardec */
ATSlocal (ats_int_type, tmp0) ;
ATSlocal (ats_timeval_type, tmp1) ;
ATSlocal (ats_int_type, tmp2) ;
// ATSlocal_void (tmp3) ;
ATSlocal (ats_bool_type, tmp4) ;
ATSlocal (ats_lint_type, tmp5) ;
ATSlocal (ats_lint_type, tmp6) ;
ATSlocal (ats_time_type, tmp7) ;
ATSlocal (ats_suseconds_type, tmp8) ;

__ats_lab_ATS_2d0_2e2_2e10_2libc_2SATS_2random_2esats__srand48_with_gettimeofday:
/* ats_timeval_type tmp1 ; */
tmp2 = atslib_gettimeofday_tv ((&tmp1)) ;
tmp4 = atspre_ieq (tmp2, 0) ;
if (tmp4) {
tmp7 = ats_select_mac(tmp1, tv_sec) ;
tmp6 = atspre_mul_lint_lint (ats_castfn_mac(ats_lint_type, tmp7), 1000000L) ;
tmp8 = ats_select_mac(tmp1, tv_usec) ;
tmp5 = atspre_add_lint_lint (tmp6, ats_castfn_mac(ats_lint_type, tmp8)) ;
/* tmp3 = */ atslib_srand48 (tmp5) ;
} else {
/* empty */
} /* end of [if] */
tmp0 = tmp2 ;
return (tmp0) ;
} /* end of [ATS_2d0_2e2_2e10_2libc_2SATS_2random_2esats__srand48_with_gettimeofday] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_localjoin (ats_ref_type arg0) {
/* local vardec */
// ATSlocal_void (tmp58) ;
ATSlocal (ats_ptr_type, tmp59) ;
ATSlocal (ats_ptr_type, tmp60) ;
ATSlocal (ats_ptr_type, tmp61) ;
// ATSlocal_void (tmp62) ;
ATSlocal (ats_ptr_type, tmp63) ;
ATSlocal (ats_ptr_type, tmp64) ;
ATSlocal (ats_ptr_type, tmp65) ;
// ATSlocal_void (tmp66) ;
// ATSlocal_void (tmp67) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_localjoin:
tmp59 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) ;
if (tmp59 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/home/hwxi/research/Postiats/git/src/pats_symenv.dats: 5012(line=209, offs=5) -- 5039(line=209, offs=32)") ; }
tmp60 = ats_caselptrlab_mac(anairiats_sum_1, tmp59, atslab_0) ;
tmp61 = ats_caselptrlab_mac(anairiats_sum_1, tmp59, atslab_1) ;
ATS_FREE(tmp59) ;
/* tmp62 = */ _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_free (tmp60) ;
if (tmp61 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/home/hwxi/research/Postiats/git/src/pats_symenv.dats: 5070(line=211, offs=5) -- 5097(line=211, offs=32)") ; }
tmp63 = ats_caselptrlab_mac(anairiats_sum_1, tmp61, atslab_0) ;
tmp64 = ats_caselptrlab_mac(anairiats_sum_1, tmp61, atslab_1) ;
ATS_FREE(tmp61) ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) = tmp64 ;
tmp65 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) = tmp63 ;
/* tmp66 = */ _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_joinwth (&ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map), tmp65) ;
/* tmp67 = */ _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_free (tmp65) ;
/* tmp58 = tmp66 */ ;
return /* (tmp58) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_localjoin] */
ats_ptr_type
aux_3 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp14) ;
ATSlocal (anairiats_rec_1, tmp15) ;
ATSlocal (ats_ptr_type, tmp16) ;
ATSlocal (ats_ptr_type, tmp17) ;
ATSlocal (ats_ptr_type, tmp18) ;
ATSlocal (ats_ptr_type, tmp19) ;

__ats_lab_aux_3:
do {
/* branch: __ats_lab_4 */
__ats_lab_4_0:
if (arg1 == (ats_sum_ptr_type)0) { goto __ats_lab_5_0 ; }
__ats_lab_4_1:
tmp15 = ats_caselptrlab_mac(anairiats_sum_2, arg1, atslab_0) ;
tmp16 = ats_caselptrlab_mac(anairiats_sum_2, arg1, atslab_1) ;
tmp17 = ats_select_mac(tmp15, atslab_0) ;
tmp18 = ats_select_mac(tmp15, atslab_1) ;
tmp19 = aux_3 (arg0, tmp16) ;
tmp14 = _2opt_2ats_2d0_2e2_2e9_2src_2ats_staexp2_2esats__s2exp_uni (tmp17, tmp18, tmp19) ;
break ;

/* branch: __ats_lab_5 */
__ats_lab_5_0:
// if (arg1 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_5_1:
tmp14 = arg0 ;
break ;
} while (0) ;
return (tmp14) ;
} /* end of [aux_3] */
ats_ptr_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_search (ats_ref_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp19) ;
ATSlocal (ats_ptr_type, tmp20) ;
ATSlocal (ats_ptr_type, tmp21) ;
ATSlocal (ats_ptr_type, tmp22) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_search:
tmp21 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) ;
tmp20 = _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_search (tmp21, arg1) ;
do {
/* branch: __ats_lab_6 */
__ats_lab_6_0:
if (tmp20 == (ats_sum_ptr_type)0) { goto __ats_lab_7_0 ; }
__ats_lab_6_1:
tmp19 = tmp20 ;
break ;

/* branch: __ats_lab_7 */
__ats_lab_7_0:
// if (tmp20 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_7_1:
tmp22 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) ;
tmp19 = symmaplst_search_1 (tmp22, arg1) ;
break ;
} while (0) ;
return (tmp19) ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_search] */
ats_void_type
ATS_2d0_2e2_2e12_2libats_2SATS_2linqueue_lst_2esats__queue_initialize (ats_ref_type arg0) {
/* local vardec */
// ATSlocal_void (tmp6) ;

__ats_lab_ATS_2d0_2e2_2e12_2libats_2SATS_2linqueue_lst_2esats__queue_initialize:
ats_select_mac(ats_ptrget_mac(atslib_linqueue_lst_QUEUE, arg0), ptr1) = atspre_null_ptr ;
ats_select_mac(ats_ptrget_mac(atslib_linqueue_lst_QUEUE, arg0), ptr2) = atspre_null_ptr ;
return /* (tmp6) */ ;
} /* end of [ATS_2d0_2e2_2e12_2libats_2SATS_2linqueue_lst_2esats__queue_initialize] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_init (ats_ref_type arg0, ats_lint_type arg1, ats_int_type arg2, ats_int_type arg3) {
/* local vardec */
// ATSlocal_void (tmp11) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_init:
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ntot) = arg1 ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), nrow) = arg2 ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) = arg3 ;
return /* (tmp11) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_init] */
ats_ptr_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_restore (ats_ref_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp49) ;
ATSlocal (ats_ptr_type, tmp50) ;
// ATSlocal_void (tmp51) ;
ATSlocal (ats_ptr_type, tmp52) ;
ATSlocal (ats_ptr_type, tmp53) ;
ATSlocal (anairiats_rec_3, tmp54) ;
ATSlocal (ats_ptr_type, tmp55) ;
ATSlocal (ats_ptr_type, tmp56) ;
ATSlocal (ats_ptr_type, tmp57) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_restore:
tmp50 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) ;
tmp52 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) ;
/* tmp51 = */ symmaplst_free_0 (tmp52) ;
tmp53 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_savedlst) ;
if (tmp53 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/home/hwxi/research/Postiats/git/src/pats_symenv.dats: 4757(line=195, offs=7) -- 4793(line=195, offs=43)") ; }
tmp54 = ats_caselptrlab_mac(anairiats_sum_4, tmp53, atslab_0) ;
tmp55 = ats_caselptrlab_mac(anairiats_sum_4, tmp53, atslab_1) ;
ATS_FREE(tmp53) ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_savedlst) = tmp55 ;
tmp56 = ats_select_mac(tmp54, atslab_0) ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) = tmp56 ;
tmp57 = ats_select_mac(tmp54, atslab_1) ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) = tmp57 ;
tmp49 = tmp50 ;
return (tmp49) ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_restore] */
ats_ptr_type
atspre_matrix_make_arrpsz__main (ats_size_type arg0, ats_size_type arg1, anairiats_rec_0 arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp3) ;
// ATSlocal_void (tmp4) ;
ATSlocal (ats_ptr_type, tmp5) ;
// ATSlocal_void (tmp6) ;

__ats_lab_atspre_matrix_make_arrpsz__main:
tmp5 = ats_select_mac(arg2, atslab_2) ;
/* tmp4 = */ atspre_vbox_make_view_ptr (tmp5) ;
/* tmp6 = ats_selsin_mac(tmp4, atslab_1) */ ;
tmp3 = ats_select_mac(arg2, atslab_2) ;
return (tmp3) ;
} /* end of [atspre_matrix_make_arrpsz__main] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_top_clear (ats_ref_type arg0) {
/* local vardec */
// ATSlocal_void (tmp37) ;
// ATSlocal_void (tmp38) ;
ATSlocal (ats_ptr_type, tmp39) ;
ATSlocal (ats_ptr_type, tmp40) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_top_clear:
tmp39 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) ;
/* tmp38 = */ _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_free (tmp39) ;
tmp40 = _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_make_nil () ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) = tmp40 ;
return /* (tmp37) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_top_clear] */
ats_int_type
ATS_2d0_2e2_2e10_2libc_2sys_2SATS_2stat_2esats__isfdtype (ats_int_type arg0, ats_mode_type arg1) {
/* local vardec */
ATSlocal (ats_int_type, tmp0) ;
ATSlocal (ats_stat_type, tmp1) ;
ATSlocal (ats_int_type, tmp2) ;
ATSlocal (ats_bool_type, tmp3) ;
ATSlocal (ats_mode_type, tmp4) ;
ATSlocal (ats_mode_type, tmp5) ;
ATSlocal (ats_bool_type, tmp6) ;

__ats_lab_ATS_2d0_2e2_2e10_2libc_2sys_2SATS_2stat_2esats__isfdtype:
/* ats_stat_type tmp1 ; */
tmp2 = atslib_fstat_err (arg0, (&tmp1)) ;
tmp3 = atspre_igte (tmp2, 0) ;
if (tmp3) {
tmp5 = ats_select_mac(tmp1, st_mode) ;
tmp4 = atslib_lor_mode_mode (tmp5, S_IFMT) ;
tmp6 = atslib_eq_mode_mode (arg1, tmp4) ;
if (tmp6) {
tmp0 = 1 ;
} else {
tmp0 = 0 ;
} /* end of [if] */
} else {
tmp0 = -1 ;
} /* end of [if] */
return (tmp0) ;
} /* end of [ATS_2d0_2e2_2e10_2libc_2sys_2SATS_2stat_2esats__isfdtype] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_push (ats_ref_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp31) ;
ATSlocal (ats_ptr_type, tmp32) ;
ATSlocal (ats_ptr_type, tmp33) ;
ATSlocal (ats_ptr_type, tmp34) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_push:
tmp33 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) ;
tmp34 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) ;
tmp32 = ATS_MALLOC(sizeof(anairiats_sum_1)) ;
ats_selptrset_mac(anairiats_sum_1, tmp32, atslab_0, tmp33) ;
ats_selptrset_mac(anairiats_sum_1, tmp32, atslab_1, tmp34) ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) = tmp32 ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) = arg1 ;
return /* (tmp31) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_push] */
ats_int_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_get_ncol (ats_ref_type arg0) {
/* local vardec */
ATSlocal (ats_int_type, tmp10) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_get_ncol:
tmp10 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) ;
return (tmp10) ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_get_ncol] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_incby_count (ats_ref_type arg0, ats_uint_type arg1) {
/* local vardec */
// ATSlocal_void (tmp32) ;
ATSlocal (ats_lint_type, tmp33) ;
ATSlocal (ats_lint_type, tmp34) ;
ATSlocal (ats_lint_type, tmp35) ;
ATSlocal (ats_int_type, tmp36) ;
ATSlocal (ats_int_type, tmp37) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_incby_count:
tmp34 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ntot) ;
tmp35 = atspre_lint_of_uint (arg1) ;
tmp33 = atspre_add_lint_lint (tmp34, tmp35) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ntot) = tmp33 ;
tmp37 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) ;
tmp36 = atspre_add_int_int (tmp37, ats_castfn_mac(ats_int_type, arg1)) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) = tmp36 ;
return /* (tmp32) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_incby_count] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_decby_count (ats_ref_type arg0, ats_uint_type arg1) {
/* local vardec */
// ATSlocal_void (tmp26) ;
ATSlocal (ats_lint_type, tmp27) ;
ATSlocal (ats_lint_type, tmp28) ;
ATSlocal (ats_lint_type, tmp29) ;
ATSlocal (ats_int_type, tmp30) ;
ATSlocal (ats_int_type, tmp31) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_decby_count:
tmp28 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ntot) ;
tmp29 = atspre_lint_of_uint (arg1) ;
tmp27 = atspre_sub_lint_lint (tmp28, tmp29) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ntot) = tmp27 ;
tmp31 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) ;
tmp30 = atspre_sub_int_int (tmp31, ats_castfn_mac(ats_int_type, arg1)) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) = tmp30 ;
return /* (tmp26) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_decby_count] */
ats_ptr_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_search (ats_ref_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp68) ;
ATSlocal (ats_ptr_type, tmp69) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_search:
tmp69 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_pervasive) ;
tmp68 = _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_search (tmp69, arg1) ;
return (tmp68) ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_search] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__fprint_symenv_map (ats_ptr_type arg0, ats_ref_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp74) ;
ATSlocal (ats_ptr_type, tmp75) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__fprint_symenv_map:
tmp75 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg1), atslab_map) ;
/* tmp74 = */ _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__fprint_symmap (arg0, tmp75, arg2) ;
return /* (tmp74) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__fprint_symenv_map] */
ats_void_type
aux_6 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp30) ;
ATSlocal (anairiats_rec_2, tmp31) ;
ATSlocal (ats_ptr_type, tmp32) ;
// ATSlocal_void (tmp33) ;
ATSlocal (ats_ptr_type, tmp34) ;
// ATSlocal_void (tmp35) ;
// ATSlocal_void (tmp36) ;
ATSlocal (ats_ptr_type, tmp37) ;
// ATSlocal_void (tmp38) ;

__ats_lab_aux_6:
do {
/* branch: __ats_lab_4 */
__ats_lab_4_0:
if (arg1 == (ats_sum_ptr_type)0) { goto __ats_lab_5_0 ; }
__ats_lab_4_1:
tmp31 = ats_caselptrlab_mac(anairiats_sum_3, arg1, atslab_0) ;
tmp32 = ats_caselptrlab_mac(anairiats_sum_3, arg1, atslab_1) ;
ATS_FREE(arg1) ;
tmp34 = ats_select_mac(tmp31, atslab_0) ;
/* tmp33 = */ _2home_2hwxi_2Research_2ATS_2dPostiats_2src_2pats_staexp2_2esats__fprint_s2var (arg0, tmp34) ;
/* tmp35 = */ atspre_fprint_string (arg0, ATSstrcst(" -> ")) ;
tmp37 = ats_select_mac(tmp31, atslab_1) ;
/* tmp36 = */ _2home_2hwxi_2Research_2ATS_2dPostiats_2src_2pats_staexp2_2esats__fprint_s2exp (arg0, tmp37) ;
/* tmp38 = */ atspre_fprint_newline (arg0) ;
arg0 = arg0 ;
arg1 = tmp32 ;
goto __ats_lab_aux_6 ; // tail call
break ;

/* branch: __ats_lab_5 */
__ats_lab_5_0:
// if (arg1 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_5_1:
break ;
} while (0) ;
return /* (tmp30) */ ;
} /* end of [aux_6] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__fprint_position (ats_ptr_type arg0, pats_position_struct arg1) {
/* local vardec */
// ATSlocal_void (tmp1) ;
ATSlocal (ats_lint_type, tmp2) ;
ATSlocal (ats_int_type, tmp3) ;
ATSlocal (ats_int_type, tmp4) ;
ATSlocal (ats_lint_type, tmp5) ;
ATSlocal (ats_int_type, tmp6) ;
ATSlocal (ats_int_type, tmp7) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__fprint_position:
tmp2 = ats_select_mac(arg1, ntot) ;
tmp3 = ats_select_mac(arg1, nrow) ;
tmp4 = ats_select_mac(arg1, ncol) ;
tmp5 = atspre_add_lint_lint (tmp2, 1L) ;
tmp6 = atspre_add_int_int (tmp3, 1) ;
tmp7 = atspre_add_int_int (tmp4, 1) ;
/* tmp1 = */ atspre_fprintf_exn (arg0, ATSstrcst("%li(line=%i, offs=%i)"), tmp5, tmp6, tmp7) ;
return /* (tmp1) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__fprint_position] */
ats_ptr_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pop (ats_ref_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp24) ;
ATSlocal (ats_ptr_type, tmp25) ;
ATSlocal (ats_ptr_type, tmp26) ;
ATSlocal (ats_ptr_type, tmp27) ;
ATSlocal (ats_ptr_type, tmp28) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pop:
tmp25 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) ;
tmp26 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) ;
if (tmp26 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/home/hwxi/research/Postiats/git/src/pats_symenv.dats: 3577(line=138, offs=7) -- 3615(line=138, offs=45)") ; }
tmp27 = ats_caselptrlab_mac(anairiats_sum_1, tmp26, atslab_0) ;
tmp28 = ats_caselptrlab_mac(anairiats_sum_1, tmp26, atslab_1) ;
ATS_FREE(tmp26) ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) = tmp27 ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) = tmp28 ;
tmp24 = tmp25 ;
return (tmp24) ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pop] */
ats_ptr_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__location_make_fil_pos_pos (ats_ptr_type arg0, pats_position_struct arg1, pats_position_struct arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp81) ;
ATSlocal (ats_lint_type, tmp82) ;
ATSlocal (ats_int_type, tmp83) ;
ATSlocal (ats_int_type, tmp84) ;
ATSlocal (ats_lint_type, tmp85) ;
ATSlocal (ats_int_type, tmp86) ;
ATSlocal (ats_int_type, tmp87) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__location_make_fil_pos_pos:
tmp82 = ats_select_mac(arg1, ntot) ;
tmp83 = ats_select_mac(arg1, nrow) ;
tmp84 = ats_select_mac(arg1, ncol) ;
tmp85 = ats_select_mac(arg2, ntot) ;
tmp86 = ats_select_mac(arg2, nrow) ;
tmp87 = ats_select_mac(arg2, ncol) ;
tmp81 = ATS_MALLOC(sizeof(anairiats_rec_0)) ;
ats_selptrset_mac(anairiats_rec_0, tmp81, atslab_filename, arg0) ;
ats_selptrset_mac(anairiats_rec_0, tmp81, atslab_beg_ntot, tmp82) ;
ats_selptrset_mac(anairiats_rec_0, tmp81, atslab_beg_nrow, tmp83) ;
ats_selptrset_mac(anairiats_rec_0, tmp81, atslab_beg_ncol, tmp84) ;
ats_selptrset_mac(anairiats_rec_0, tmp81, atslab_end_ntot, tmp85) ;
ats_selptrset_mac(anairiats_rec_0, tmp81, atslab_end_nrow, tmp86) ;
ats_selptrset_mac(anairiats_rec_0, tmp81, atslab_end_ncol, tmp87) ;

return (tmp81) ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__location_make_fil_pos_pos] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_savecur (ats_ref_type arg0) {
/* local vardec */
// ATSlocal_void (tmp41) ;
ATSlocal (ats_ptr_type, tmp42) ;
ATSlocal (ats_ptr_type, tmp43) ;
ATSlocal (ats_ptr_type, tmp44) ;
ATSlocal (ats_ptr_type, tmp45) ;
ATSlocal (ats_ptr_type, tmp46) ;
ATSlocal (anairiats_rec_3, tmp47) ;
ATSlocal (ats_ptr_type, tmp48) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_savecur:
tmp42 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) ;
tmp43 = _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_make_nil () ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_map) = tmp43 ;
tmp44 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) ;
tmp45 = (ats_sum_ptr_type)0 ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_maplst) = tmp45 ;
tmp47.atslab_0 = tmp42 ;
tmp47.atslab_1 = tmp44 ;

tmp48 = ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_savedlst) ;
tmp46 = ATS_MALLOC(sizeof(anairiats_sum_4)) ;
ats_selptrset_mac(anairiats_sum_4, tmp46, atslab_0, tmp47) ;
ats_selptrset_mac(anairiats_sum_4, tmp46, atslab_1, tmp48) ;
ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_savedlst) = tmp46 ;
return /* (tmp41) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_savecur] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_namespace_2esats__the_namespace_restore () {
/* local vardec */
// ATSlocal_void (tmp73) ;
ATSlocal (ats_ptr_type, tmp74) ;
ATSlocal (ats_ptr_type, tmp75) ;
ATSlocal (anairiats_rec_2, tmp76) ;
ATSlocal (ats_ptr_type, tmp77) ;
ATSlocal (ats_ptr_type, tmp78) ;
// ATSlocal_void (tmp79) ;
ATSlocal (ats_ptr_type, tmp80) ;
ATSlocal (ats_ptr_type, tmp81) ;
ATSlocal (ats_ptr_type, tmp82) ;
// ATSlocal_void (tmp83) ;
ATSlocal (ats_ptr_type, tmp84) ;
ATSlocal (ats_ptr_type, tmp85) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_namespace_2esats__the_namespace_restore:
tmp74 = ats_selsin_mac(ats_castfn_mac(ats_ptr_type, statmp14), atslab_1) ;
tmp75 = ats_ptrget_mac(ats_ptr_type, tmp74) ;
if (tmp75 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/home/hwxi/research/Postiats/git/src/pats_namespace.dats: 5697(line=242, offs=7) -- 5723(line=242, offs=33)") ; }
tmp76 = ats_caselptrlab_mac(anairiats_sum_3, tmp75, atslab_0) ;
tmp77 = ats_caselptrlab_mac(anairiats_sum_3, tmp75, atslab_1) ;
ATS_FREE(tmp75) ;
ats_ptrget_mac(ats_ptr_type, tmp74) = tmp77 ;
tmp78 = ats_selsin_mac(ats_castfn_mac(ats_ptr_type, statmp8), atslab_1) ;
tmp80 = ats_ptrget_mac(ats_ptr_type, tmp78) ;
/* tmp79 = */ fenvlst_vt_free_0 (tmp80) ;
tmp81 = ats_select_mac(tmp76, atslab_0) ;
ats_ptrget_mac(ats_ptr_type, tmp78) = tmp81 ;
tmp82 = ats_selsin_mac(ats_castfn_mac(ats_ptr_type, statmp12), atslab_1) ;
tmp84 = ats_ptrget_mac(ats_ptr_type, tmp82) ;
/* tmp83 = */ fenvlstlst_vt_free_3 (tmp84) ;
tmp85 = ats_select_mac(tmp76, atslab_1) ;
ats_ptrget_mac(ats_ptr_type, tmp82) = tmp85 ;
return /* (tmp73) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_namespace_2esats__the_namespace_restore] */
ats_ptr_type
ATS_2d0_2e2_2e10_2prelude_2SATS_2matrix0_2esats__matrix0_make_arrpsz__main (ats_size_type arg0, ats_size_type arg1, anairiats_rec_0 arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp5) ;
ATSlocal (anairiats_rec_1, tmp6) ;
ATSlocal (ats_ptr_type, tmp7) ;

__ats_lab_ATS_2d0_2e2_2e10_2prelude_2SATS_2matrix0_2esats__matrix0_make_arrpsz__main:
tmp7 = ats_select_mac(arg2, atslab_2) ;
tmp6.atslab_3 = tmp7 ;
tmp6.atslab_4 = arg0 ;
tmp6.atslab_5 = arg1 ;

tmp5 = ref_01265_anairiats_rec_1 (tmp6) ;
return (tmp5) ;
} /* end of [ATS_2d0_2e2_2e10_2prelude_2SATS_2matrix0_2esats__matrix0_make_arrpsz__main] */
ats_bool_type
ATS_2d0_2e2_2e12_2libats_2SATS_2linqueue_lst_2esats__queue_is_empty (ats_ref_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp1) ;
ATSlocal (ats_ptr_type, tmp2) ;
ATSlocal (ats_bool_type, tmp3) ;

__ats_lab_ATS_2d0_2e2_2e12_2libats_2SATS_2linqueue_lst_2esats__queue_is_empty:
tmp2 = ats_select_mac(ats_ptrget_mac(atslib_linqueue_lst_QUEUE, arg0), ptr1) ;
tmp3 = atspre_pgt (tmp2, atspre_null_ptr) ;
if (tmp3) {
tmp1 = ats_false_bool ;
} else {
tmp1 = ats_true_bool ;
} /* end of [if] */
return (tmp1) ;
} /* end of [ATS_2d0_2e2_2e12_2libats_2SATS_2linqueue_lst_2esats__queue_is_empty] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_copy (ats_ref_type arg0, ats_ref_type arg1) {
/* local vardec */
// ATSlocal_void (tmp12) ;
ATSlocal (ats_lint_type, tmp13) ;
ATSlocal (ats_int_type, tmp14) ;
ATSlocal (ats_int_type, tmp15) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_copy:
tmp13 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg1), ntot) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ntot) = tmp13 ;
tmp14 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg1), nrow) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), nrow) = tmp14 ;
tmp15 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg1), ncol) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) = tmp15 ;
return /* (tmp12) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_copy] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_incby_char (ats_ref_type arg0, ats_int_type arg1) {
/* local vardec */
// ATSlocal_void (tmp16) ;
ATSlocal (ats_bool_type, tmp17) ;
ATSlocal (ats_lint_type, tmp18) ;
ATSlocal (ats_lint_type, tmp19) ;
ATSlocal (ats_bool_type, tmp20) ;
ATSlocal (ats_int_type, tmp21) ;
ATSlocal (ats_int_type, tmp22) ;
ATSlocal (ats_int_type, tmp23) ;
ATSlocal (ats_int_type, tmp24) ;
ATSlocal (ats_int_type, tmp25) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_incby_char:
tmp17 = atspre_gte_int_int (arg1, 0) ;
if (tmp17) {
tmp19 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ntot) ;
tmp18 = atspre_add_lint_lint (tmp19, 1L) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ntot) = tmp18 ;
tmp21 = atspre_int_of_char ('\n') ;
tmp20 = atspre_eq_int_int (arg1, tmp21) ;
if (tmp20) {
tmp23 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), nrow) ;
tmp22 = atspre_add_int_int (tmp23, 1) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), nrow) = tmp22 ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) = 0 ;
} else {
tmp25 = ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) ;
tmp24 = atspre_add_int_int (tmp25, 1) ;
ats_select_mac(ats_ptrget_mac(pats_position_struct, arg0), ncol) = tmp24 ;
} /* end of [if] */
} else {
/* empty */
} /* end of [if] */
return /* (tmp16) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_location_2esats__position_incby_char] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_insert (ats_ref_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp70) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_insert:
/* tmp70 = */ _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_insert (&ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_pervasive), arg1, arg2) ;
return /* (tmp70) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_insert] */
ats_void_type
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_joinwth1 (ats_ref_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp73) ;

__ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_joinwth1:
/* tmp73 = */ _2home_2hwxi_2research_2Postiats_2git_2src_2pats_symmap_2esats__symmap_joinwth (&ats_select_mac(ats_ptrget_mac(anairiats_rec_2, arg0), atslab_pervasive), arg1) ;
return /* (tmp73) */ ;
} /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_symenv_2esats__symenv_pervasive_joinwth1] */