module demo.hello air 0 lang 0.1 features [arrays, capabilities, effects, ownership, resources] fn @main(%out: cap) -> void effects [io.write] entry: %bytes_1 = local.alloc array local.zero %bytes_1 %w_2 = borrow.mut %bytes_1 %i_3 = const.usize 0 %c_4 = const.u8 104 %e_5 = borrow.index %w_2, %i_3 store %e_5, %c_4 borrow.end %e_5 %i_6 = const.usize 1 %c_7 = const.u8 101 %e_8 = borrow.index %w_2, %i_6 store %e_8, %c_7 borrow.end %e_8 %i_9 = const.usize 2 %c_10 = const.u8 108 %e_11 = borrow.index %w_2, %i_9 store %e_11, %c_10 borrow.end %e_11 %i_12 = const.usize 3 %c_13 = const.u8 108 %e_14 = borrow.index %w_2, %i_12 store %e_14, %c_13 borrow.end %e_14 %i_15 = const.usize 4 %c_16 = const.u8 111 %e_17 = borrow.index %w_2, %i_15 store %e_17, %c_16 borrow.end %e_17 %i_18 = const.usize 5 %c_19 = const.u8 44 %e_20 = borrow.index %w_2, %i_18 store %e_20, %c_19 borrow.end %e_20 %i_21 = const.usize 6 %c_22 = const.u8 32 %e_23 = borrow.index %w_2, %i_21 store %e_23, %c_22 borrow.end %e_23 %i_24 = const.usize 7 %c_25 = const.u8 97 %e_26 = borrow.index %w_2, %i_24 store %e_26, %c_25 borrow.end %e_26 %i_27 = const.usize 8 %c_28 = const.u8 106 %e_29 = borrow.index %w_2, %i_27 store %e_29, %c_28 borrow.end %e_29 %i_30 = const.usize 9 %c_31 = const.u8 105 %e_32 = borrow.index %w_2, %i_30 store %e_32, %c_31 borrow.end %e_32 %i_33 = const.usize 10 %c_34 = const.u8 10 %e_35 = borrow.index %w_2, %i_33 store %e_35, %c_34 borrow.end %e_35 borrow.end %w_2 %b_36 = borrow.ref %bytes_1 %s_37 = slice.make %b_36 intrinsic io.stdout_write(%out, %s_37), ok -> @ok_38, err -> @err_39 ok_38: borrow.end %s_37 borrow.end %b_36 ret err_39(%err_40: io_error): borrow.end %s_37 borrow.end %b_36 trap