ats_void_type
copy_3 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp13) ;
ATSlocal (ats_ptr_type, tmp14) ;
ATSlocal (ats_ptr_type, tmp15) ;
ATSlocal (ats_ptr_type, tmp16) ;

__ats_lab_copy_3:
do {
/* branch: __ats_lab_5 */
__ats_lab_5_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_6_0 ; }
__ats_lab_5_1:
tmp14 = ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_0) ;
tmp15 = ats_caselptrlab_mac(anairiats_sum_0, arg0, atslab_1) ;
ats_ptrget_mac(ats_ptr_type, arg1) = tmp14 ;
tmp16 = atspre_padd_size (arg1, sizeof(ats_ptr_type)) ;
arg0 = tmp15 ;
arg1 = tmp16 ;
goto __ats_lab_copy_3 ; // tail call
break ;

/* branch: __ats_lab_6 */
__ats_lab_6_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_6_1:
break ;
} while (0) ;
return /* (tmp13) */ ;
} /* end of [copy_3] */
ats_void_type
loop_6 (ats_int_type arg0, ats_ptr_type arg1, ats_int_type arg2) {
/* local vardec */
// ATSlocal_void (tmp30) ;
ATSlocal (ats_bool_type, tmp31) ;
ATSlocal (ats_int_type, tmp32) ;
ATSlocal (ats_int_type, tmp33) ;
ATSlocal (ats_int_type, tmp34) ;
// ATSlocal_void (tmp35) ;
ATSlocal (ats_ptr_type, tmp48) ;
ATSlocal (ats_int_type, tmp49) ;

__ats_lab_loop_6:
tmp32 = atspre_isub (arg0, arg2) ;
tmp31 = atspre_igte (tmp32, 2) ;
if (tmp31) {
tmp34 = atspre_isub (arg0, arg2) ;
tmp33 = atslib_randint (tmp34) ;
/* tmp35 = */ array_ptr_exch__intsz_01527_ats_int_type (arg1, 0, tmp33) ;
tmp48 = atspre_padd_size (arg1, sizeof(ats_int_type)) ;
tmp49 = atspre_iadd (arg2, 1) ;
arg0 = arg0 ;
arg1 = tmp48 ;
arg2 = tmp49 ;
goto __ats_lab_loop_6 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp30) */ ;
} /* end of [loop_6] */
ats_size_type
loop_4 (ats_int_type arg0, ats_ptr_type arg1, ats_size_type arg2, ats_ref_type arg3) {
/* local vardec */
ATSlocal (ats_size_type, tmp14) ;
ATSlocal (ats_bool_type, tmp15) ;
ATSlocal (ats_ssize_type, tmp16) ;
ATSlocal (ats_bool_type, tmp17) ;
ATSlocal (ats_ptr_type, tmp18) ;
ATSlocal (ats_size_type, tmp19) ;
ATSlocal (ats_bool_type, tmp20) ;
ATSlocal (ats_bool_type, tmp21) ;
ATSlocal (ats_int_type, tmp22) ;
ATSlocal (ats_bool_type, tmp24) ;
ATSlocal (ats_int_type, tmp25) ;

__ats_lab_loop_4:
tmp15 = atspre_gt_size1_int1 (arg2, 0) ;
if (tmp15) {
tmp16 = atslib_fildes_read_err (arg0, arg1, arg2) ;
tmp17 = atspre_gt_ssize1_int1 (tmp16, 0) ;
if (tmp17) {
tmp18 = atspre_padd_size (arg1, ats_castfn_mac(ats_size_type, tmp16)) ;
tmp19 = atspre_sub_size1_size1 (arg2, ats_castfn_mac(ats_size_type, tmp16)) ;
arg0 = arg0 ;
arg1 = tmp18 ;
arg2 = tmp19 ;
arg3 = arg3 ;
goto __ats_lab_loop_4 ; // tail call
} else {
tmp21 = atspre_lt_ssize1_int1 (tmp16, 0) ;
if (tmp21) {
tmp22 = atslib_errno_get () ;
tmp20 = atslib_eq_errno_errno (tmp22, EINTR) ;
} else {
tmp20 = ats_false_bool ;
} /* end of [if] */
if (tmp20) {
arg0 = arg0 ;
arg1 = arg1 ;
arg2 = arg2 ;
arg3 = arg3 ;
goto __ats_lab_loop_4 ; // tail call
} else {
tmp24 = atspre_lt_ssize1_int1 (tmp16, 0) ;
if (tmp24) {
tmp25 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp25 ;
} else {
/* empty */
} /* end of [if] */
tmp14 = arg2 ;
} /* end of [if] */
} /* end of [if] */
} else {
tmp14 = atspre_size1_of_int1 (0) ;
} /* end of [if] */
return (tmp14) ;
} /* end of [loop_4] */
ats_size_type
loop_7 (ats_int_type arg0, ats_ptr_type arg1, ats_size_type arg2, ats_ref_type arg3) {
/* local vardec */
ATSlocal (ats_size_type, tmp35) ;
ATSlocal (ats_bool_type, tmp36) ;
ATSlocal (ats_ssize_type, tmp37) ;
ATSlocal (ats_bool_type, tmp38) ;
ATSlocal (ats_ptr_type, tmp39) ;
ATSlocal (ats_size_type, tmp40) ;
ATSlocal (ats_bool_type, tmp41) ;
ATSlocal (ats_bool_type, tmp42) ;
ATSlocal (ats_int_type, tmp43) ;
ATSlocal (ats_int_type, tmp44) ;

__ats_lab_loop_7:
tmp36 = atspre_gt_size1_int1 (arg2, 0) ;
if (tmp36) {
tmp37 = atslib_fildes_write_err (arg0, arg1, arg2) ;
tmp38 = atspre_gt_ssize1_int1 (tmp37, 0) ;
if (tmp38) {
tmp39 = atspre_padd_size (arg1, ats_castfn_mac(ats_size_type, tmp37)) ;
tmp40 = atspre_sub_size1_size1 (arg2, ats_castfn_mac(ats_size_type, tmp37)) ;
arg0 = arg0 ;
arg1 = tmp39 ;
arg2 = tmp40 ;
arg3 = arg3 ;
goto __ats_lab_loop_7 ; // tail call
} else {
tmp42 = atspre_lt_ssize1_int1 (tmp37, 0) ;
if (tmp42) {
tmp43 = atslib_errno_get () ;
tmp41 = atslib_eq_errno_errno (tmp43, EINTR) ;
} else {
tmp41 = ats_true_bool ;
} /* end of [if] */
if (tmp41) {
arg0 = arg0 ;
arg1 = arg1 ;
arg2 = arg2 ;
arg3 = arg3 ;
goto __ats_lab_loop_7 ; // tail call
} else {
tmp44 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp44 ;
tmp35 = arg2 ;
} /* end of [if] */
} /* end of [if] */
} else {
tmp35 = atspre_size1_of_int1 (0) ;
} /* end of [if] */
return (tmp35) ;
} /* end of [loop_7] */
ats_void_type
loop_5 (ats_int_type arg0, ats_ptr_type arg1, ats_int_type arg2) {
/* local vardec */
// ATSlocal_void (tmp25) ;
ATSlocal (ats_bool_type, tmp26) ;
ATSlocal (ats_ptr_type, tmp27) ;
ATSlocal (ats_int_type, tmp28) ;

__ats_lab_loop_5:
tmp26 = atspre_ilt (arg2, arg0) ;
if (tmp26) {
ats_ptrget_mac(ats_int_type, arg1) = arg2 ;
tmp27 = atspre_padd_size (arg1, sizeof(ats_int_type)) ;
tmp28 = atspre_iadd (arg2, 1) ;
arg0 = arg0 ;
arg1 = tmp27 ;
arg2 = tmp28 ;
goto __ats_lab_loop_5 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp25) */ ;
} /* end of [loop_5] */
ats_void_type
aux_2 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp9) ;
ATSlocal (ats_bool_type, tmp10) ;
ATSlocal (ats_ptr_type, tmp11) ;
ATSlocal (ats_int_type, tmp12) ;

__ats_lab_aux_2:
tmp10 = atspre_igt (arg1, 0) ;
if (tmp10) {
ats_ptrget_mac(ats_ptr_type, arg0) = arg2 ;
tmp11 = atspre_padd_size (arg0, sizeof(ats_ptr_type)) ;
tmp12 = atspre_isub (arg1, 1) ;
arg0 = tmp11 ;
arg1 = tmp12 ;
arg2 = arg2 ;
goto __ats_lab_aux_2 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp9) */ ;
} /* end of [aux_2] */