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 <{ <4 x float> }>
%t5 = type %t3 (i32)
%t6 = type float (i32)
%t7 = type <4 x float> ()
%t10 = type void (<4 x float>, i32, ptr addrspace(1))
%t11 = type i32 (float)
%t13 = type void (ptr addrspace(1), ptr addrspace(1), <2 x i32>)
%t15 = type i32 (ptr addrspace(1), i32, i32, i32, i1)
%t16 = type i32 (ptr addrspace(1))
%t18 = type ptr addrspace(2) ()
%t20 = type { <4 x float>, i8 }
%t21 = type %t20 (ptr addrspace(1), ptr addrspace(2), <2 x i32>, i32, i32)
%t22 = type %t20 (ptr addrspace(1), ptr addrspace(2), <2 x i32>, <2 x i32>, i32, i32)
%t23 = type { float, i8 }
%t24 = type %t23 (ptr addrspace(1), ptr addrspace(2), i32, <2 x i32>, i32, i32)
%t25 = type %t23 (ptr addrspace(1), ptr addrspace(2), i32, <2 x i32>, <2 x i32>, i32, i32)
%t27 = type [2 x i32]
%t31 = type { i32 } ; "struct.metal::_atomic"
c22 = %t27 [27, 0]
c36 = <2 x float> [0x40000000, 0x40000000]
c37 = <2 x float> [0xBF800000, 0xBF800000]
c40 = <4 x i32> [0, 1, poison, poison]
c44 = <4 x float> [poison, poison, 0x3F000000, 0x3F800000]
c45 = <4 x i32> [0, 1, 6, 7]
c47 = <4 x float> [0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000]

define %t5 @f0 "psc_vertex" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "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 = shl i32 %a0, i32 1
  %i1 = and i32 %i0, i32 2
  %i2 = tail call reassoc nnan ninf nsz arcp contract afn float @f1 [air Convert(Convert { dst: NumTy { elem: F32, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I32, lanes: 1 }, src_kind: Unsigned, src_fp8: None, rounding: None, saturate: false })](%i1)
  %i3 = insertelement <2 x float> undef, %i2, i64 0
  %i4 = and i32 %a0, i32 2
  %i5 = tail call reassoc nnan ninf nsz arcp contract afn float @f1 [air Convert(Convert { dst: NumTy { elem: F32, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I32, lanes: 1 }, src_kind: Unsigned, src_fp8: None, rounding: None, saturate: false })](%i4)
  %i6 = insertelement %i3, %i5, i64 1
  %i7 = fmul reassoc nnan ninf nsz arcp contract afn <2 x float> %i6, <2 x float> c36
  %i8 = fadd reassoc nnan ninf nsz arcp contract afn <2 x float> %i7, <2 x float> c37
  %i9 = shufflevector <4 x float> %i8, <2 x float> poison, <0, 1, poison, poison>
  %i10 = shufflevector <4 x float> %i9, <4 x float> c44, <0, 1, 6, 7>
  %i11 = insertvalue %t3 undef %i10, 0
  ret %i11
}

declare %t6 @f1 "air.convert.f.f32.u.i32" memory(NoModRef, NoModRef, NoModRef)

define %t7 @f2 "psc_white" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "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:
  ret <4 x float> c47
}

define %t10 @f3 "psc_counter" "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "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" %a2( nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = extractelement %a0, i64 1
  %i1 = tail call i32 @f4 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 1 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 1 }, src_kind: Float, src_fp8: None, rounding: None, saturate: false })](%i0)
  %i2 = shl i32 %i1, i32 4
  %i3 = extractelement %a0, i64 0
  %i4 = tail call i32 @f4 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 1 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 1 }, src_kind: Float, src_fp8: None, rounding: None, saturate: false })](%i3)
  %i5 = add i32 %i2, %i4
  %i6 = shl i32 %i5, i32 1
  %i7 = zext %i6 to i64
  %i8 = getelementptr inbounds %t31, %a2, %i7, i32 0
  %i9 = tail call i32 @f10 [air Atomic(Atomic { space: Global, op: Add, sign: Some(Unsigned), ty: NumTy { elem: I32, lanes: 1 }, order: Relaxed, failure: None, scope: Device, volatile: true, fetch: true, flags: None, stated_volatile: true })](%i8, i32 1, i32 0, i32 2, i1 1) arg0( nocapture )
  %i10 = or i32 %i6, i32 1
  %i11 = zext %i10 to i64
  %i12 = getelementptr inbounds %t31, %a2, %i11, i32 0
  %i13 = tail call i32 @f11 [air Atomic(Atomic { space: Global, op: Or, sign: Some(Unsigned), ty: NumTy { elem: I32, lanes: 1 }, order: Relaxed, failure: None, scope: Device, volatile: true, fetch: true, flags: None, stated_volatile: true })](%i12, %a1, i32 0, i32 2, i1 1) arg0( nocapture )
  ret void
}

declare %t11 @f4 "air.convert.u.i32.f.f32" memory(NoModRef, NoModRef, NoModRef)

define %t7 @f5 "psc_early" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "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:
  ret <4 x float> c47
}

define %t13 @f6 "psc_read_samples" "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "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" %a1( Mod nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = tail call i32 @f12 [air Texture(Texture { op: Query(NumSamples), image: ImageShape { dim: D2, array: false, ms: true, depth: false }, texel: None, coord16: false, form: Current, status: true, access: None, states_access: true, device_coherent: false })](%a0) arg0( Ref nocapture )
  %i1 = icmp eq %i0, i32 0
  br %i1, bb2, bb1
bb1:
  %i3 = tail call ptr addrspace(2) @f13 [air Sampler(GetReadSampler)]()
  br bb3
bb2:
  %i5 = phi i32 [i32 0, bb0], [%i23, bb3]
  %i6 = extractelement %a2, i64 1
  %i7 = shl i32 %i6, i32 4
  %i8 = extractelement %a2, i64 0
  %i9 = add i32 %i7, %i8
  %i10 = zext %i9 to i64
  %i11 = getelementptr inbounds i32, %a1, %i10
  store %i5, %i11, align 4
  ret void
bb3:
  %i14 = phi i32 [i32 0, bb1], [%i23, bb3]
  %i15 = phi i32 [i32 0, bb1], [%i24, bb3]
  %i16 = tail call %t20 @f14 [air Texture(Texture { op: Read, image: ImageShape { dim: D2, array: false, ms: true, depth: false }, texel: Some(Texel { ty: NumTy { elem: F32, lanes: 4 }, sign: None }), coord16: false, form: Current, status: true, access: Some(Read), states_access: true, device_coherent: false })](%a0, %i3, %a2, %i15, i32 1) arg0( Ref nocapture )
  %i17 = extractvalue <4 x float> %i16, 0
  %i18 = extractelement %i17, i64 0
  %i19 = fcmp reassoc nnan ninf nsz arcp contract afn ogt %i18, float 0x3F000000
  %i20 = and i32 %i15, i32 31
  %i21 = shl nuw i32 i32 1, %i20
  %i22 = select i32 %i19, %i21, i32 0
  %i23 = or i32 %i22, %i14
  %i24 = add nuw i32 %i15, i32 1
  %i25 = icmp eq %i24, %i0
  br %i25, bb2, bb3, !llvm.loop LoopHints { unroll: Default, must_progress: true }
}

define %t13 @f7 "psc_read" "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "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" %a0( Ref nocapture ) %a1( Mod nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = tail call ptr addrspace(2) @f13 [air Sampler(GetReadSampler)]()
  %i1 = tail call %t20 @f15 [air Texture(Texture { op: Read, image: ImageShape { dim: D2, array: false, ms: false, depth: false }, texel: Some(Texel { ty: NumTy { elem: F32, lanes: 4 }, sign: None }), coord16: false, form: Current, status: true, access: Some(Read), states_access: true, device_coherent: false })](%a0, %i0, %a2, <2 x i32> zeroinitializer, i32 0, i32 1) arg0( Ref nocapture )
  %i2 = extractvalue <4 x float> %i1, 0
  %i3 = extractelement %i2, i64 0
  %i4 = fcmp reassoc nnan ninf nsz arcp contract afn ogt %i3, float 0x3F000000
  %i5 = zext %i4 to i32
  %i6 = extractelement %a2, i64 1
  %i7 = shl i32 %i6, i32 4
  %i8 = extractelement %a2, i64 0
  %i9 = add i32 %i7, %i8
  %i10 = zext %i9 to i64
  %i11 = getelementptr inbounds i32, %a1, %i10
  store %i5, %i11, align 4
  ret void
}

define %t13 @f8 "psc_read_depth_samples" "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" %a1( Mod nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = tail call i32 @f16 [air Texture(Texture { op: Query(NumSamples), image: ImageShape { dim: D2, array: false, ms: true, depth: true }, texel: None, coord16: false, form: Current, status: true, access: None, states_access: true, device_coherent: false })](%a0) arg0( Ref nocapture )
  %i1 = icmp eq %i0, i32 0
  br %i1, bb2, bb1
bb1:
  %i3 = tail call ptr addrspace(2) @f13 [air Sampler(GetReadSampler)]()
  br bb3
bb2:
  %i5 = phi i32 [i32 0, bb0], [%i22, bb3]
  %i6 = extractelement %a2, i64 1
  %i7 = shl i32 %i6, i32 4
  %i8 = extractelement %a2, i64 0
  %i9 = add i32 %i7, %i8
  %i10 = zext %i9 to i64
  %i11 = getelementptr inbounds i32, %a1, %i10
  store %i5, %i11, align 4
  ret void
bb3:
  %i14 = phi i32 [i32 0, bb1], [%i23, bb3]
  %i15 = phi i32 [i32 0, bb1], [%i22, bb3]
  %i16 = tail call %t23 @f17 [air Texture(Texture { op: Read, image: ImageShape { dim: D2, array: false, ms: true, depth: true }, texel: Some(Texel { ty: NumTy { elem: F32, lanes: 1 }, sign: None }), coord16: false, form: Current, status: true, access: Some(Read), states_access: true, device_coherent: false })](%a0, %i3, i32 1, %a2, %i14, i32 1) arg0( Ref nocapture )
  %i17 = extractvalue float %i16, 0
  %i18 = fcmp reassoc nnan ninf nsz arcp contract afn olt %i17, float 0x3F400000
  %i19 = and i32 %i14, i32 31
  %i20 = shl nuw i32 i32 1, %i19
  %i21 = select i32 %i18, %i20, i32 0
  %i22 = or i32 %i21, %i15
  %i23 = add nuw i32 %i14, i32 1
  %i24 = icmp eq %i23, %i0
  br %i24, bb2, bb3, !llvm.loop LoopHints { unroll: Default, must_progress: true }
}

define %t13 @f9 "psc_read_depth" "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" %a0( Ref nocapture ) %a1( Mod nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = tail call ptr addrspace(2) @f13 [air Sampler(GetReadSampler)]()
  %i1 = tail call %t23 @f18 [air Texture(Texture { op: Read, image: ImageShape { dim: D2, array: false, ms: false, depth: true }, texel: Some(Texel { ty: NumTy { elem: F32, lanes: 1 }, sign: None }), coord16: false, form: Current, status: true, access: Some(Read), states_access: true, device_coherent: false })](%a0, %i0, i32 1, %a2, <2 x i32> zeroinitializer, i32 0, i32 1) arg0( Ref nocapture )
  %i2 = extractvalue float %i1, 0
  %i3 = fcmp reassoc nnan ninf nsz arcp contract afn olt %i2, float 0x3F400000
  %i4 = zext %i3 to i32
  %i5 = extractelement %a2, i64 1
  %i6 = shl i32 %i5, i32 4
  %i7 = extractelement %a2, i64 0
  %i8 = add i32 %i6, %i7
  %i9 = zext %i8 to i64
  %i10 = getelementptr inbounds i32, %a1, %i9
  store %i4, %i10, align 4
  ret void
}

declare %t15 @f10 "air.atomic.global.add.u.i32" %a0( nocapture )

declare %t15 @f11 "air.atomic.global.or.u.i32" %a0( nocapture )

declare %t16 @f12 "air.get_num_samples_texture_2d_ms" memory(Ref, NoModRef, NoModRef) %a0( Ref nocapture )

declare %t18 @f13 "air.get_read_sampler" memory(NoModRef, Ref, NoModRef)

declare %t21 @f14 "air.read_texture_2d_ms.v4f32" memory(Ref, NoModRef, NoModRef) %a0( Ref nocapture )

declare %t22 @f15 "air.read_texture_2d.v4f32" memory(Ref, NoModRef, NoModRef) %a0( Ref nocapture )

declare %t16 @f16 "air.get_num_samples_depth_2d_ms" memory(Ref, NoModRef, NoModRef) %a0( Ref nocapture )

declare %t24 @f17 "air.read_depth_2d_ms.f32" memory(Ref, NoModRef, NoModRef) %a0( Ref nocapture )

declare %t25 @f18 "air.read_depth_2d.f32" memory(Ref, NoModRef, NoModRef) %a0( Ref 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.position"
!md10 = !"air.arg_type_name"
!md11 = !"float4"
!md12 = !"air.arg_name"
!md13 = !"position"
!md14 = !"air.vertex_id"
!md15 = !"uint"
!md16 = !"id"
!md17 = !"air.render_target"
!md18 = !"air.center"
!md19 = !"air.no_perspective"
!md20 = !"air.sample_mask_in"
!md21 = !"mask"
!md22 = !"air.buffer"
!md23 = !"air.location_index"
!md24 = !"air.read_write"
!md25 = !"air.address_space"
!md26 = !"air.struct_type_info"
!md27 = !"__s"
!md28 = !"air.arg_type_size"
!md29 = !"air.arg_type_align_size"
!md30 = !"metal::_atomic"
!md31 = !"runs"
!md32 = !"early_fragment_tests"
!md33 = !"air.texture"
!md34 = !"air.read"
!md35 = !"texture2d_ms<float, read>"
!md36 = !"t"
!md37 = !"out"
!md38 = !"air.thread_position_in_grid"
!md39 = !"uint2"
!md40 = !"g"
!md41 = !"texture2d<float, read>"
!md42 = !"depth2d_ms<float, read>"
!md43 = !"depth2d<float, read>"
!md44 = !"air.compile.denorms_disable"
!md45 = !"air.compile.fast_math_enable"
!md46 = !"air.compile.framebuffer_fetch_enable"
!md47 = !"Apple metal version 32023.921 (metalfe-32023.921.6)"
!md48 = !"Metal"
!md49 = !"air-alias-scope-textures"
!md50 = !"air-alias-scope-arg(1)"
!md51 = !"int"
!md52 = !"omnipotent char"
!md53 = !"Simple C++ TBAA"
!md54 = !"llvm.loop.mustprogress"
!md55 = i32 2
!md56 = %t27 c22
!md57 = i32 1
!md58 = i32 4
!md59 = i32 7
!md60 = i32 31
!md61 = i32 128
!md62 = i32 8
!md63 = i32 16
!md64 = ptr addrspace(0) @f0
!md65 = i32 0
!md66 = ptr addrspace(0) @f2
!md67 = ptr addrspace(0) @f3
!md68 = ptr addrspace(0) @f5
!md69 = ptr addrspace(0) @f6
!md70 = ptr addrspace(0) @f7
!md71 = ptr addrspace(0) @f8
!md72 = ptr addrspace(0) @f9
!md73 = i64 0
!md74 = !{!md55, !md0, !md56}
!md75 = !{!md57, !md1, !md58}
!md76 = !{!md59, !md2, !md55}
!md77 = !{!md59, !md3, !md60}
!md78 = !{!md59, !md4, !md60}
!md79 = !{!md59, !md5, !md60}
!md80 = !{!md59, !md6, !md61}
!md81 = !{!md59, !md7, !md62}
!md82 = !{!md59, !md8, !md63}
!md83 = !{!md9, !md10, !md11, !md12, !md13}
!md84 = !{!md83}
!md85 = !{!md65, !md14, !md10, !md15, !md12, !md16}
!md86 = !{!md85}
!md87 = !{!md64, !md84, !md86}
!md88 = !{!md17, !md65, !md65, !md10, !md11}
!md89 = !{!md88}
!md90 = !{}
!md91 = !{!md66, !md89, !md90}
!md92 = !{!md65, !md9, !md18, !md19, !md10, !md11, !md12, !md13}
!md93 = !{!md57, !md20, !md10, !md15, !md12, !md21}
!md94 = !{!md65, !md58, !md65, !md15, !md27}
!md95 = !{!md55, !md22, !md23, !md65, !md57, !md24, !md25, !md57, !md26, !md94, !md28, !md58, !md29, !md58, !md10, !md30, !md12, !md31}
!md96 = !{!md92, !md93, !md95}
!md97 = !{!md67, !md90, !md96}
!md98 = !{!md68, !md89, !md90, !md32}
!md99 = !{!md65, !md33, !md23, !md65, !md57, !md34, !md10, !md35, !md12, !md36}
!md100 = !{!md57, !md22, !md23, !md57, !md57, !md24, !md25, !md57, !md28, !md58, !md29, !md58, !md10, !md15, !md12, !md37}
!md101 = !{!md55, !md38, !md10, !md39, !md12, !md40}
!md102 = !{!md99, !md100, !md101}
!md103 = !{!md69, !md90, !md102}
!md104 = !{!md65, !md33, !md23, !md65, !md57, !md34, !md10, !md41, !md12, !md36}
!md105 = !{!md104, !md100, !md101}
!md106 = !{!md70, !md90, !md105}
!md107 = !{!md65, !md33, !md23, !md65, !md57, !md34, !md10, !md42, !md12, !md36}
!md108 = !{!md107, !md100, !md101}
!md109 = !{!md71, !md90, !md108}
!md110 = !{!md65, !md33, !md23, !md65, !md57, !md34, !md10, !md43, !md12, !md36}
!md111 = !{!md110, !md100, !md101}
!md112 = !{!md72, !md90, !md111}
!md113 = !{!md44}
!md114 = !{!md45}
!md115 = !{!md46}
!md116 = !{!md47}
!md117 = !{!md55, !md62, !md65}
!md118 = !{!md48, !md58, !md65, !md65}
!md119 = !{!md53}
!md120 = !{!md52, !md119, !md73}
!md121 = !{!md51, !md120, !md73}
!md122 = !{!md121, !md121, !md73}
!md123 = !{!md54}
!"llvm.module.flags" = !{!md74, !md75, !md76, !md77, !md78, !md79, !md80, !md81, !md82}
!"air.vertex" = !{!md87}
!"air.fragment" = !{!md91, !md97, !md98}
!"air.kernel" = !{!md103, !md106, !md109, !md112}
!"air.compile_options" = !{!md113, !md114, !md115}
!"llvm.ident" = !{!md116}
!"air.version" = !{!md117}
!"air.language_version" = !{!md118}
