ats_bool_type _2home_2hwxi_2research_2Postiats_2git_2src_2pats_counter_2esats__lt_count_count (ats_int_type arg0, ats_int_type arg1) { /* local vardec */ ATSlocal (ats_bool_type, tmp1) ; __ats_lab__2home_2hwxi_2research_2Postiats_2git_2src_2pats_counter_2esats__lt_count_count: tmp1 = atspre_lt_int_int (arg0, arg1) ; return (tmp1) ; } /* end of [_2home_2hwxi_2research_2Postiats_2git_2src_2pats_counter_2esats__lt_count_count] */
ats_bool_type aux_31 (ats_int_type env0, ats_clo_ref_type env1, ats_ptr_type arg0) { /* local vardec */ ATSlocal (ats_bool_type, tmp45) ; ATSlocal (ats_int_type, tmp46) ; ATSlocal (ats_ptr_type, tmp47) ; ATSlocal (ats_ptr_type, tmp48) ; ATSlocal (ats_int_type, tmp49) ; ATSlocal (ats_bool_type, tmp51) ; ATSlocal (ats_ptr_type, tmp52) ; ATSlocal (ats_bool_type, tmp53) ; ATSlocal (ats_ptr_type, tmp54) ; __ats_lab_aux_31: do { /* branch: __ats_lab_4 */ __ats_lab_4_0: if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_5_0 ; } __ats_lab_4_1: tmp46 = ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_1) ; tmp47 = &ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_2) ; tmp48 = &ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_3) ; tmp49 = compare_elt_elt_01770_ats_int_type (env0, tmp46, env1) ; tmp51 = atspre_lt_int_int (tmp49, 0) ; if (tmp51) { tmp52 = ats_ptrget_mac(ats_ptr_type, tmp47) ; arg0 = tmp52 ; goto __ats_lab_aux_31 ; // tail call } else { tmp53 = atspre_gt_int_int (tmp49, 0) ; if (tmp53) { tmp54 = ats_ptrget_mac(ats_ptr_type, tmp48) ; arg0 = tmp54 ; goto __ats_lab_aux_31 ; // tail call } else { tmp45 = ats_true_bool ; } /* end of [if] */ } /* end of [if] */ break ; /* branch: __ats_lab_5 */ __ats_lab_5_0: // if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; } __ats_lab_5_1: tmp45 = ats_false_bool ; break ; } while (0) ; return (tmp45) ; } /* end of [aux_31] */
ats_pid_type atslib_fork_exn () { /* local vardec */ ATSlocal (ats_pid_type, tmp0) ; ATSlocal (ats_pid_type, tmp1) ; ATSlocal (ats_bool_type, tmp2) ; // ATSlocal_void (tmp3) ; ATSlocal (ats_int_type, tmp4) ; // ATSlocal_void (tmp5) ; __ats_lab_atslib_fork_exn: tmp1 = atslib_fork_err () ; tmp2 = atspre_lt_int_int (ats_castfn_mac(ats_int_type, tmp1), 0) ; if (tmp2) { tmp4 = atslib_errno_get () ; /* tmp5 = */ atslib_perror (ATSstrcst("fork")) ; /* tmp3 = */ ats_exit_errmsg (ats_castfn_mac(ats_int_type, tmp4), ATSstrcst("exit(ATS): [fork] failed.\n")) ; } else { /* empty */ } /* end of [if] */ tmp0 = tmp1 ; return (tmp0) ; } /* end of [atslib_fork_exn] */
ats_bool_type insert_35 (ats_clo_ref_type env0, ats_ref_type arg0, ats_int_type arg1) { /* local vardec */ ATSlocal (ats_bool_type, tmp59) ; ATSlocal (ats_ptr_type, tmp60) ; ATSlocal (ats_ptr_type, tmp61) ; ATSlocal (ats_ptr_type, tmp62) ; ATSlocal (ats_ptr_type, tmp63) ; ATSlocal (ats_int_type, tmp64) ; ATSlocal (ats_int_type, tmp65) ; ATSlocal (ats_bool_type, tmp66) ; ATSlocal (ats_bool_type, tmp67) ; ATSlocal (ats_int_type, tmp68) ; ATSlocal (ats_ptr_type, tmp71) ; ATSlocal (ats_int_type, tmp72) ; ATSlocal (ats_ptr_type, tmp73) ; ATSlocal (ats_bool_type, tmp74) ; ATSlocal (ats_int_type, tmp75) ; ATSlocal (ats_int_type, tmp76) ; ATSlocal (ats_int_type, tmp77) ; ATSlocal (ats_ptr_type, tmp78) ; ATSlocal (ats_bool_type, tmp108) ; ATSlocal (ats_bool_type, tmp109) ; ATSlocal (ats_int_type, tmp110) ; ATSlocal (ats_ptr_type, tmp111) ; ATSlocal (ats_int_type, tmp112) ; ATSlocal (ats_ptr_type, tmp113) ; ATSlocal (ats_bool_type, tmp114) ; ATSlocal (ats_int_type, tmp115) ; ATSlocal (ats_int_type, tmp116) ; ATSlocal (ats_int_type, tmp117) ; ATSlocal (ats_ptr_type, tmp118) ; ATSlocal (ats_ptr_type, tmp148) ; ATSlocal (ats_ptr_type, tmp149) ; ATSlocal (ats_ptr_type, tmp150) ; __ats_lab_insert_35: do { /* branch: __ats_lab_6 */ __ats_lab_6_0: if (ats_ptrget_mac(ats_ptr_type, arg0) == (ats_sum_ptr_type)0) { goto __ats_lab_9_0 ; } __ats_lab_6_1: tmp60 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_0) ; tmp61 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_1) ; tmp62 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_2) ; tmp63 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_3) ; tmp65 = ats_ptrget_mac(ats_int_type, tmp61) ; tmp64 = compare_elt_elt_01770_ats_int_type (arg1, tmp65, env0) ; tmp66 = atspre_lt_int_int (tmp64, 0) ; if (tmp66) { tmp67 = insert_35 (env0, tmp62, arg1) ; tmp71 = ats_ptrget_mac(ats_ptr_type, tmp62) ; tmp68 = avltree_height_067_ats_int_type (tmp71) ; tmp73 = ats_ptrget_mac(ats_ptr_type, tmp63) ; tmp72 = avltree_height_067_ats_int_type (tmp73) ; tmp75 = atspre_isub (tmp68, tmp72) ; tmp74 = atspre_ilte (tmp75, 1) ; if (tmp74) { tmp77 = atspre_imax (tmp68, tmp72) ; tmp76 = atspre_iadd (1, tmp77) ; ats_ptrget_mac(ats_int_type, tmp60) = tmp76 ; tmp59 = tmp67 ; } else { tmp78 = avltree_rrotate_0121_ats_int_type (tmp60, tmp68, tmp62, tmp72, tmp63, ats_ptrget_mac(ats_ptr_type, arg0)) ; ats_ptrget_mac(ats_ptr_type, arg0) = tmp78 ; tmp59 = tmp67 ; } /* end of [if] */ } else { tmp108 = atspre_gt_int_int (tmp64, 0) ; if (tmp108) { tmp109 = insert_35 (env0, tmp63, arg1) ; tmp111 = ats_ptrget_mac(ats_ptr_type, tmp62) ; tmp110 = avltree_height_067_ats_int_type (tmp111) ; tmp113 = ats_ptrget_mac(ats_ptr_type, tmp63) ; tmp112 = avltree_height_067_ats_int_type (tmp113) ; tmp115 = atspre_isub (tmp112, tmp110) ; tmp114 = atspre_ilte (tmp115, 1) ; if (tmp114) { tmp117 = atspre_imax (tmp110, tmp112) ; tmp116 = atspre_iadd (1, tmp117) ; ats_ptrget_mac(ats_int_type, tmp60) = tmp116 ; tmp59 = tmp109 ; } else { tmp118 = avltree_lrotate_097_ats_int_type (tmp60, tmp110, tmp62, tmp112, tmp63, ats_ptrget_mac(ats_ptr_type, arg0)) ; ats_ptrget_mac(ats_ptr_type, arg0) = tmp118 ; tmp59 = tmp109 ; } /* end of [if] */ } else { tmp59 = ats_true_bool ; } /* end of [if] */ } /* end of [if] */ break ; /* branch: __ats_lab_9 */ __ats_lab_9_0: // if (ats_ptrget_mac(ats_ptr_type, arg0) != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; } __ats_lab_9_1: tmp149 = (ats_sum_ptr_type)0 ; tmp150 = (ats_sum_ptr_type)0 ; tmp148 = ATS_MALLOC(sizeof(anairiats_sum_0)) ; ats_selptrset_mac(anairiats_sum_0, tmp148, atslab_0, 1) ; ats_selptrset_mac(anairiats_sum_0, tmp148, atslab_1, arg1) ; ats_selptrset_mac(anairiats_sum_0, tmp148, atslab_2, tmp149) ; ats_selptrset_mac(anairiats_sum_0, tmp148, atslab_3, tmp150) ; ats_ptrget_mac(ats_ptr_type, arg0) = tmp148 ; tmp59 = ats_false_bool ; break ; } while (0) ; return (tmp59) ; } /* end of [insert_35] */
ats_bool_type insert_12 (ats_uint_type env0, ats_clo_ref_type env1, ats_ref_type arg0, ats_ptr_type arg1, ats_ref_type arg2) { /* local vardec */ ATSlocal (ats_bool_type, tmp33) ; ATSlocal (ats_ptr_type, tmp34) ; ATSlocal (ats_ptr_type, tmp35) ; ATSlocal (ats_ptr_type, tmp36) ; ATSlocal (ats_ptr_type, tmp37) ; ATSlocal (ats_ptr_type, tmp38) ; ATSlocal (ats_int_type, tmp39) ; ATSlocal (ats_uint_type, tmp40) ; ATSlocal (ats_bool_type, tmp41) ; ATSlocal (ats_bool_type, tmp42) ; ATSlocal (ats_int_type, tmp43) ; ATSlocal (ats_ptr_type, tmp46) ; ATSlocal (ats_int_type, tmp47) ; ATSlocal (ats_ptr_type, tmp48) ; ATSlocal (ats_bool_type, tmp49) ; ATSlocal (ats_int_type, tmp50) ; ATSlocal (ats_int_type, tmp51) ; ATSlocal (ats_int_type, tmp52) ; ATSlocal (ats_ptr_type, tmp53) ; ATSlocal (ats_bool_type, tmp83) ; ATSlocal (ats_bool_type, tmp84) ; ATSlocal (ats_int_type, tmp85) ; ATSlocal (ats_ptr_type, tmp86) ; ATSlocal (ats_int_type, tmp87) ; ATSlocal (ats_ptr_type, tmp88) ; ATSlocal (ats_bool_type, tmp89) ; ATSlocal (ats_int_type, tmp90) ; ATSlocal (ats_int_type, tmp91) ; ATSlocal (ats_int_type, tmp92) ; ATSlocal (ats_ptr_type, tmp93) ; ATSlocal (ats_ptr_type, tmp123) ; ATSlocal (ats_ptr_type, tmp124) ; ATSlocal (ats_ptr_type, tmp125) ; ATSlocal (ats_ptr_type, tmp126) ; __ats_lab_insert_12: do { /* branch: __ats_lab_7 */ __ats_lab_7_0: if (ats_ptrget_mac(ats_ptr_type, arg0) == (ats_sum_ptr_type)0) { goto __ats_lab_10_0 ; } __ats_lab_7_1: tmp34 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_0) ; tmp35 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_1) ; tmp36 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_2) ; tmp37 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_3) ; tmp38 = &ats_caselptrlab_mac(anairiats_sum_0, ats_ptrget_mac(ats_ptr_type, arg0), atslab_4) ; tmp40 = ats_ptrget_mac(ats_uint_type, tmp35) ; tmp39 = compare_key_key_01713_ats_uint_type (env0, tmp40, env1) ; tmp41 = atspre_lt_int_int (tmp39, 0) ; if (tmp41) { tmp42 = insert_12 (env0, env1, tmp37, arg1, arg2) ; tmp46 = ats_ptrget_mac(ats_ptr_type, tmp37) ; tmp43 = avltree_height_036_ats_uint_type_2cats_ptr_type (tmp46) ; tmp48 = ats_ptrget_mac(ats_ptr_type, tmp38) ; tmp47 = avltree_height_036_ats_uint_type_2cats_ptr_type (tmp48) ; tmp50 = atspre_isub (tmp43, tmp47) ; tmp49 = atspre_ilte (tmp50, 1) ; if (tmp49) { tmp52 = atspre_imax (tmp43, tmp47) ; tmp51 = atspre_iadd (1, tmp52) ; ats_ptrget_mac(ats_int_type, tmp34) = tmp51 ; tmp33 = tmp42 ; } else { tmp53 = avltree_rrotate_089_ats_uint_type_2cats_ptr_type (tmp34, tmp43, tmp37, tmp47, tmp38, ats_ptrget_mac(ats_ptr_type, arg0)) ; ats_ptrget_mac(ats_ptr_type, arg0) = tmp53 ; tmp33 = tmp42 ; } /* end of [if] */ } else { tmp83 = atspre_gt_int_int (tmp39, 0) ; if (tmp83) { tmp84 = insert_12 (env0, env1, tmp38, arg1, arg2) ; tmp86 = ats_ptrget_mac(ats_ptr_type, tmp37) ; tmp85 = avltree_height_036_ats_uint_type_2cats_ptr_type (tmp86) ; tmp88 = ats_ptrget_mac(ats_ptr_type, tmp38) ; tmp87 = avltree_height_036_ats_uint_type_2cats_ptr_type (tmp88) ; tmp90 = atspre_isub (tmp87, tmp85) ; tmp89 = atspre_ilte (tmp90, 1) ; if (tmp89) { tmp92 = atspre_imax (tmp85, tmp87) ; tmp91 = atspre_iadd (1, tmp92) ; ats_ptrget_mac(ats_int_type, tmp34) = tmp91 ; tmp33 = tmp84 ; } else { tmp93 = avltree_lrotate_064_ats_uint_type_2cats_ptr_type (tmp34, tmp85, tmp37, tmp87, tmp38, ats_ptrget_mac(ats_ptr_type, arg0)) ; ats_ptrget_mac(ats_ptr_type, arg0) = tmp93 ; tmp33 = tmp84 ; } /* end of [if] */ } else { tmp123 = ats_ptrget_mac(ats_ptr_type, tmp36) ; ats_ptrget_mac(ats_ptr_type, arg2) = tmp123 ; ats_ptrget_mac(ats_ptr_type, tmp36) = arg1 ; tmp33 = ats_true_bool ; } /* end of [if] */ } /* end of [if] */ break ; /* branch: __ats_lab_10 */ __ats_lab_10_0: // if (ats_ptrget_mac(ats_ptr_type, arg0) != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; } __ats_lab_10_1: tmp125 = (ats_sum_ptr_type)0 ; tmp126 = (ats_sum_ptr_type)0 ; tmp124 = ATS_MALLOC(sizeof(anairiats_sum_0)) ; ats_selptrset_mac(anairiats_sum_0, tmp124, atslab_0, 1) ; ats_selptrset_mac(anairiats_sum_0, tmp124, atslab_1, env0) ; ats_selptrset_mac(anairiats_sum_0, tmp124, atslab_2, arg1) ; ats_selptrset_mac(anairiats_sum_0, tmp124, atslab_3, tmp125) ; ats_selptrset_mac(anairiats_sum_0, tmp124, atslab_4, tmp126) ; ats_ptrget_mac(ats_ptr_type, arg0) = tmp124 ; tmp33 = ats_false_bool ; break ; } while (0) ; return (tmp33) ; } /* end of [insert_12] */
ats_ptr_type search_9 (ats_uint_type env0, ats_clo_ref_type env1, ats_ptr_type arg0) { /* local vardec */ ATSlocal (ats_ptr_type, tmp16) ; ATSlocal (ats_uint_type, tmp17) ; ATSlocal (ats_ptr_type, tmp18) ; ATSlocal (ats_ptr_type, tmp19) ; ATSlocal (ats_ptr_type, tmp20) ; ATSlocal (ats_int_type, tmp21) ; ATSlocal (ats_bool_type, tmp22) ; ATSlocal (ats_ptr_type, tmp23) ; ATSlocal (ats_bool_type, tmp24) ; ATSlocal (ats_ptr_type, tmp25) ; __ats_lab_search_9: do { /* branch: __ats_lab_2 */ __ats_lab_2_0: if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_6_0 ; } __ats_lab_2_1: tmp17 = ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_1) ; tmp18 = &ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_2) ; tmp19 = &ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_3) ; tmp20 = &ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_4) ; tmp21 = compare_key_key_01713_ats_uint_type (env0, tmp17, env1) ; do { /* branch: __ats_lab_3 */ __ats_lab_3_0: __ats_lab_3_1: tmp22 = atspre_lt_int_int (tmp21, 0) ; if (!tmp22) { goto __ats_lab_4_1 ; } tmp23 = ats_ptrget_mac(ats_ptr_type, tmp19) ; arg0 = tmp23 ; goto __ats_lab_search_9 ; // tail call break ; /* branch: __ats_lab_4 */ __ats_lab_4_0: __ats_lab_4_1: tmp24 = atspre_gt_int_int (tmp21, 0) ; if (!tmp24) { goto __ats_lab_5_1 ; } tmp25 = ats_ptrget_mac(ats_ptr_type, tmp20) ; arg0 = tmp25 ; goto __ats_lab_search_9 ; // tail call break ; /* branch: __ats_lab_5 */ __ats_lab_5_0: __ats_lab_5_1: tmp16 = tmp18 ; break ; } while (0) ; break ; /* branch: __ats_lab_6 */ __ats_lab_6_0: // if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; } __ats_lab_6_1: tmp16 = atspre_null_ptr ; break ; } while (0) ; return (tmp16) ; } /* end of [search_9] */