target triple = "air64_v28-apple-macosx26.0.0"
source_filename = "-"
; datalayout DataLayout { endian: Little, pointers: {0: PointerSpec { size_bits: 64, abi_bits: 64, pref_bits: 64, index_bits: 64 }}, ints: {1: AlignSpec { abi_bits: 8, pref_bits: 8 }, 8: AlignSpec { abi_bits: 8, pref_bits: 8 }, 16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }}, floats: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }}, vectors: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 24: AlignSpec { abi_bits: 32, pref_bits: 32 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 48: AlignSpec { abi_bits: 64, pref_bits: 64 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 96: AlignSpec { abi_bits: 128, pref_bits: 128 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }, 192: AlignSpec { abi_bits: 256, pref_bits: 256 }, 256: AlignSpec { abi_bits: 256, pref_bits: 256 }, 512: AlignSpec { abi_bits: 512, pref_bits: 512 }, 1024: AlignSpec { abi_bits: 1024, pref_bits: 1024 }}, aggregate: AlignSpec { abi_bits: 0, pref_bits: 64 }, native_ints: [8, 16, 32], stack_align_bits: None, alloca_space: 0, program_space: 0, globals_space: 0, mangling: None, fn_ptr_align: None, non_integral: [] }
%t3 = type { ptr addrspace(4) } ; "struct.metal::_imageblock_base"
%t9 = type void (%t3, ptr addrspace(1), <2 x i16>, <2 x i32>)
%t11 = type half (i16)
%t12 = type <2 x i16> (<2 x i32>)
%t13 = type void (i32, i32)
%t16 = type i1 (<2 x i1>)
%t17 = type ptr addrspace(4) (<2 x i16>, i32, i16)
%t18 = type void (ptr addrspace(1), ptr addrspace(4), i1, <2 x i16>, <2 x i16>, <2 x i16>, i16, i1, i32)
%t20 = type [2 x i32]
c10 = %t20 [27, 2]
c25 = <2 x i32> [3, 3]

define %t9 @f0 "ib_half_cell" convergent "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="64" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" {
bb0:
  %i0 = tail call ptr addrspace(4) @f6 [air Imageblock(Data)](%a2, i32 0, i16 0)
  %i1 = extractelement %a2, i64 0
  %i2 = tail call reassoc nnan ninf nsz arcp contract afn half @f1 [air Convert(Convert { dst: NumTy { elem: F16, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I16, lanes: 1 }, src_kind: Unsigned, src_fp8: None, rounding: None, saturate: false })](%i1)
  %i3 = insertelement <2 x half> undef, %i2, i64 0
  %i4 = extractelement %a2, i64 1
  %i5 = tail call reassoc nnan ninf nsz arcp contract afn half @f1 [air Convert(Convert { dst: NumTy { elem: F16, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I16, lanes: 1 }, src_kind: Unsigned, src_fp8: None, rounding: None, saturate: false })](%i4)
  %i6 = insertelement %i3, %i5, i64 1
  %i7 = bitcast %i0 to ptr addrspace(4)
  store %i6, %i7, align 4
  tail call void @f4 [air Sync(Barrier { name: Threadgroup, flags: MemFlags { device: false, threadgroup: false, texture: false, threadgroup_imageblock: true, object_data: false }, order: None, scope: Threadgroup, memory: Threadgroup })](i32 8, i32 1) convergent
  %i10 = icmp eq %a2, <2 x i16> zeroinitializer
  %i11 = tail call i1 @f5 [air BoolReduce(BoolReduce { all: true, lanes: 2 })](%i10)
  br %i11, bb1, bb2
bb1:
  %i13 = shl <2 x i32> %a3, <2 x i32> c25
  %i14 = tail call <2 x i16> @f2 [air Convert(Convert { dst: NumTy { elem: I16, lanes: 2 }, dst_kind: Unsigned, src: NumTy { elem: I32, lanes: 2 }, src_kind: Unsigned, src_fp8: None, rounding: None, saturate: false })](%i13)
  tail call void @f7 [air Texture(Texture { op: WriteImageblockSlice, image: ImageShape { dim: D2, array: false, ms: false, depth: false }, texel: Some(Texel { ty: NumTy { elem: F16, lanes: 2 }, sign: None }), coord16: true, form: Current, status: true, access: Some(Write), states_access: true })](%a1, %i0, i1 0, <2 x i16> zeroinitializer, <2 x i16> undef, %i14, i16 0, i1 0, i32 2) arg0( nocapture ) arg1( nocapture )
  br bb2
bb2:
  ret void
}

declare %t11 @f1 "air.convert.f.f16.u.i16" memory(NoModRef, NoModRef, NoModRef)

declare %t12 @f2 "air.convert.u.v2i16.u.v2i32" memory(NoModRef, NoModRef, NoModRef)

define %t9 @f3 "ib_half2_cell" convergent "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="64" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" {
bb0:
  %i0 = tail call ptr addrspace(4) @f6 [air Imageblock(Data)](%a2, i32 0, i16 0)
  %i1 = extractelement %a2, i64 0
  %i2 = tail call reassoc nnan ninf nsz arcp contract afn half @f1 [air Convert(Convert { dst: NumTy { elem: F16, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I16, lanes: 1 }, src_kind: Unsigned, src_fp8: None, rounding: None, saturate: false })](%i1)
  %i3 = insertelement <2 x half> undef, %i2, i64 0
  %i4 = extractelement %a2, i64 1
  %i5 = tail call reassoc nnan ninf nsz arcp contract afn half @f1 [air Convert(Convert { dst: NumTy { elem: F16, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I16, lanes: 1 }, src_kind: Unsigned, src_fp8: None, rounding: None, saturate: false })](%i4)
  %i6 = insertelement %i3, %i5, i64 1
  %i7 = bitcast %i0 to ptr addrspace(4)
  store %i6, %i7, align 4
  tail call void @f4 [air Sync(Barrier { name: Threadgroup, flags: MemFlags { device: false, threadgroup: false, texture: false, threadgroup_imageblock: true, object_data: false }, order: None, scope: Threadgroup, memory: Threadgroup })](i32 8, i32 1) convergent
  %i10 = icmp eq %a2, <2 x i16> zeroinitializer
  %i11 = tail call i1 @f5 [air BoolReduce(BoolReduce { all: true, lanes: 2 })](%i10)
  br %i11, bb1, bb2
bb1:
  %i13 = shl <2 x i32> %a3, <2 x i32> c25
  %i14 = tail call <2 x i16> @f2 [air Convert(Convert { dst: NumTy { elem: I16, lanes: 2 }, dst_kind: Unsigned, src: NumTy { elem: I32, lanes: 2 }, src_kind: Unsigned, src_fp8: None, rounding: None, saturate: false })](%i13)
  tail call void @f7 [air Texture(Texture { op: WriteImageblockSlice, image: ImageShape { dim: D2, array: false, ms: false, depth: false }, texel: Some(Texel { ty: NumTy { elem: F16, lanes: 2 }, sign: None }), coord16: true, form: Current, status: true, access: Some(Write), states_access: true })](%a1, %i0, i1 0, <2 x i16> zeroinitializer, <2 x i16> undef, %i14, i16 0, i1 0, i32 2) arg0( nocapture ) arg1( nocapture )
  br bb2
bb2:
  ret void
}

declare %t13 @f4 "air.wg.barrier" convergent

declare %t16 @f5 "air.all.v2i1" memory(NoModRef, NoModRef, NoModRef)

declare %t17 @f6 "air.imageblock_data" memory(Ref, Ref, Ref)

declare %t18 @f7 "air.write_imageblock_slice_to_texture_2d.i16.v2f16" memory(ModRef, NoModRef, NoModRef) %a0( nocapture ) %a1( nocapture )
!md0 = !"SDK Version"
!md1 = !"wchar_size"
!md2 = !"frame-pointer"
!md3 = !"air.max_device_buffers"
!md4 = !"air.max_constant_buffers"
!md5 = !"air.max_threadgroup_buffers"
!md6 = !"air.max_textures"
!md7 = !"air.max_read_write_textures"
!md8 = !"air.max_samplers"
!md9 = !"air.imageblock"
!md10 = !"explicit"
!md11 = !"air.imageblock_data_size"
!md12 = !"air.struct_type_info"
!md13 = !"half"
!md14 = !"v"
!md15 = !"air.arg_type_align_size"
!md16 = !"air.arg_type_name"
!md17 = !"imageblock<HalfCell, layout_explicit>"
!md18 = !"air.arg_name"
!md19 = !"ib"
!md20 = !"air.texture"
!md21 = !"air.location_index"
!md22 = !"air.write"
!md23 = !"texture2d<half, write>"
!md24 = !"t"
!md25 = !"air.thread_position_in_threadgroup"
!md26 = !"ushort2"
!md27 = !"tid"
!md28 = !"air.threadgroup_position_in_grid"
!md29 = !"uint2"
!md30 = !"tg"
!md31 = !"half2"
!md32 = !"imageblock<Half2Cell, layout_explicit>"
!md33 = !"air.compile.denorms_disable"
!md34 = !"air.compile.fast_math_enable"
!md35 = !"air.compile.framebuffer_fetch_enable"
!md36 = !"Apple metal version 32023.922 (metalfe-32023.922.4)"
!md37 = !"Metal"
!md38 = !"omnipotent char"
!md39 = !"Simple C++ TBAA"
!md40 = i32 2
!md41 = %t20 c10
!md42 = i32 1
!md43 = i32 4
!md44 = i32 7
!md45 = i32 31
!md46 = i32 128
!md47 = i32 8
!md48 = i32 16
!md49 = ptr addrspace(0) @f0
!md50 = i32 0
!md51 = i32 3
!md52 = ptr addrspace(0) @f3
!md53 = i64 0
!md54 = !{!md40, !md0, !md41}
!md55 = !{!md42, !md1, !md43}
!md56 = !{!md44, !md2, !md40}
!md57 = !{!md44, !md3, !md45}
!md58 = !{!md44, !md4, !md45}
!md59 = !{!md44, !md5, !md45}
!md60 = !{!md44, !md6, !md46}
!md61 = !{!md44, !md7, !md47}
!md62 = !{!md44, !md8, !md48}
!md63 = !{}
!md64 = !{!md50, !md40, !md50, !md13, !md14}
!md65 = !{!md50, !md9, !md10, !md11, !md40, !md12, !md64, !md15, !md40, !md16, !md17, !md18, !md19}
!md66 = !{!md42, !md20, !md21, !md50, !md42, !md22, !md16, !md23, !md18, !md24}
!md67 = !{!md40, !md25, !md16, !md26, !md18, !md27}
!md68 = !{!md51, !md28, !md16, !md29, !md18, !md30}
!md69 = !{!md65, !md66, !md67, !md68}
!md70 = !{!md49, !md63, !md69}
!md71 = !{!md50, !md43, !md50, !md31, !md14}
!md72 = !{!md50, !md9, !md10, !md11, !md43, !md12, !md71, !md15, !md43, !md16, !md32, !md18, !md19}
!md73 = !{!md72, !md66, !md67, !md68}
!md74 = !{!md52, !md63, !md73}
!md75 = !{!md33}
!md76 = !{!md34}
!md77 = !{!md35}
!md78 = !{!md36}
!md79 = !{!md40, !md47, !md50}
!md80 = !{!md37, !md43, !md50, !md50}
!md81 = !{!md39}
!md82 = !{!md38, !md81, !md53}
!md83 = !{!md82, !md82, !md53}
!"llvm.module.flags" = !{!md54, !md55, !md56, !md57, !md58, !md59, !md60, !md61, !md62}
!"air.kernel" = !{!md70, !md74}
!"air.compile_options" = !{!md75, !md76, !md77}
!"llvm.ident" = !{!md78}
!"air.version" = !{!md79}
!"air.language_version" = !{!md80}
