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: [] }
%t5 = type <4 x float> (<4 x float>, ptr addrspace(1), ptr addrspace(2))
%t7 = type i32 (float)
%t8 = type <4 x float> (<4 x float>, ptr addrspace(1))
%t11 = type <2 x i32> (<2 x float>)
%t12 = type <{ <4 x float> }>
%t13 = type %t12 (<4 x float>)
%t14 = type <4 x float> (<4 x float>, <4 x float>, ptr addrspace(1))
%t15 = type <4 x float> (<4 x float>, i32, ptr addrspace(1))
%t16 = type <4 x float> (<4 x float>, <4 x float>)
%t18 = type void ()
%t19 = type ptr addrspace(2) ()
%t21 = type { <4 x float>, i8 }
%t22 = type %t21 (ptr addrspace(1), ptr addrspace(2), <2 x i32>, <2 x i32>, i32, i32)
%t23 = type void (ptr addrspace(1), <2 x i32>, <4 x float>, i32, i32)
%t24 = type float (float)
%t26 = type [2 x i32]
c16 = %t26 [27, 2]
c30 = <4 x float> [poison, 0x0, 0x0, 0x3F800000]
c33 = <2 x i32> [0, 1]
c36 = <4 x float> [0x3E800000, 0x3E800000, 0x3E800000, 0x3E800000]
c38 = <4 x float> [poison, poison, 0x0, 0x3F800000]
c39 = <4 x i32> [0, 1, 6, 7]
c45 = <4 x float> [poison, poison, poison, 0x3F800000]
c46 = <4 x i32> [0, 5, 6, 3]

define %t5 @f0 "rog_buffer" memory(ModRef, 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" %a1( nocapture "air-buffer-no-alias"="" ) %a2( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = extractelement %a0, i64 1
  %i1 = tail call i32 @f1 [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 = load i32, %a2, align 4
  %i3 = mul i32 %i2, %i1
  %i4 = extractelement %a0, i64 0
  %i5 = tail call i32 @f1 [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 })](%i4)
  %i6 = add i32 %i3, %i5
  %i7 = zext %i6 to i64
  %i8 = getelementptr inbounds float, %a1, %i7
  %i9 = load float, %i8, align 4
  %i10 = fadd reassoc nnan ninf nsz arcp contract afn float %i9, float 0x3F800000
  store %i10, %i8, align 4
  %i12 = insertelement <4 x float> c30, %i10, i64 0
  ret %i12
}

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

define %t8 @f2 "rog_texture" "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:
  %i0 = shufflevector <2 x float> %a0, <4 x float> poison, <0, 1>
  %i1 = tail call <2 x i32> @f3 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 2 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 2 }, src_kind: Float, src_fp8: None, rounding: None, saturate: false })](%i0)
  %i2 = tail call ptr addrspace(2) @f10 [air Sampler(GetReadSampler)]()
  %i3 = tail call %t21 @f11 [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(ReadWrite), states_access: true })](%a1, %i2, %i1, <2 x i32> zeroinitializer, i32 0, i32 3) arg0( Ref nocapture )
  %i4 = extractvalue <4 x float> %i3, 0
  %i5 = fadd reassoc nnan ninf nsz arcp contract afn <4 x float> %i4, <4 x float> c36
  tail call void @f12 [air Texture(Texture { op: Write, 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(ReadWrite), states_access: true })](%a1, %i1, %i5, i32 0, i32 3) arg0( nocapture )
  ret %i5
}

declare %t11 @f3 "air.convert.u.v2i32.f.v2f32" memory(NoModRef, NoModRef, NoModRef)

define %t13 @f4 "rog_output" 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:
  %i0 = shufflevector <4 x float> %a0, <4 x float> c38, <0, 1, 6, 7>
  %i1 = insertvalue %t12 undef %i0, 0
  ret %i1
}

define %t14 @f5 "rog_discard" "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( Ref nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = extractelement %a1, i64 3
  %i1 = fcmp reassoc nnan ninf nsz arcp contract afn olt %i0, float 0x3F000000
  br %i1, bb1, bb2
bb1:
  tail call void @f9 [air Fragment(Discard)]()
  br bb2
bb2:
  %i5 = load float, %a2, align 4
  %i6 = insertelement <4 x float> poison, %i5, i64 0
  %i7 = shufflevector <4 x float> %i6, <4 x float> poison, <0, 0, 0, 0>
  %i8 = fmul reassoc nnan ninf nsz arcp contract afn <4 x float> %i7, %a1
  ret %i8
}

define %t5 @f6 "rog_loop" memory(ModRef, 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" %a1( nocapture "air-buffer-no-alias"="" ) %a2( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = extractelement %a0, i64 0
  %i1 = tail call i32 @f1 [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 = zext %i1 to i64
  %i3 = getelementptr inbounds float, %a1, %i2
  %i4 = load float, %i3, align 4
  %i5 = load i32, %a2, align 4
  %i6 = icmp eq %i5, i32 0
  br %i6, bb1, bb2
bb1:
  %i8 = phi float [%i4, bb0], [%i16, bb2]
  store %i8, %i3, align 4
  %i10 = insertelement <4 x float> poison, %i8, i64 0
  %i11 = shufflevector <4 x float> %i10, <4 x float> poison, <0, 0, 0, 0>
  ret %i11
bb2:
  %i13 = phi i32 [%i17, bb2], [i32 0, bb0]
  %i14 = phi float [%i16, bb2], [%i4, bb0]
  %i15 = fmul reassoc nnan ninf nsz arcp contract afn float %i14, float 0x3F000000
  %i16 = fadd reassoc nnan ninf nsz arcp contract afn float %i15, float 0x3F800000
  %i17 = add nuw i32 %i13, i32 1
  %i18 = icmp eq %i17, %i5
  br %i18, bb1, bb2, !llvm.loop LoopHints { unroll: Default, must_progress: true }
}

define %t15 @f7 "rog_sample" memory(ModRef, 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" %a2( nocapture "air-buffer-no-alias"="" ) {
bb0:
  %i0 = extractelement %a0, i64 0
  %i1 = tail call i32 @f1 [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 2
  %i3 = add i32 %i2, %a1
  %i4 = zext %i3 to i64
  %i5 = getelementptr inbounds float, %a2, %i4
  %i6 = load float, %i5, align 4
  %i7 = fadd reassoc nnan ninf nsz arcp contract afn float %i6, float 0x3F800000
  store %i7, %i5, align 4
  %i9 = insertelement <4 x float> poison, %i7, i64 0
  %i10 = shufflevector <4 x float> %i9, <4 x float> poison, <0, 0, 0, 0>
  ret %i10
}

define %t16 @f8 "discard_then_simd" convergent "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:
  %i0 = extractelement %a1, i64 3
  %i1 = fcmp reassoc nnan ninf nsz arcp contract afn olt %i0, float 0x3F000000
  br %i1, bb1, bb2
bb1:
  tail call void @f9 [air Fragment(Discard)]()
  br bb2
bb2:
  %i5 = extractelement %a1, i64 0
  %i6 = tail call reassoc nnan ninf nsz arcp contract afn float @f13 [air Group(Group { scope: Simdgroup, op: Sum, ty: Some(NumTy { elem: F32, lanes: 1 }), sign: None })](%i5) convergent
  %i7 = insertelement <4 x float> c45, %i6, i64 0
  %i8 = shufflevector <4 x float> %i7, %a1, <0, 5, 6, 3>
  ret %i8
}

declare %t18 @f9 "air.discard_fragment"

declare %t19 @f10 "air.get_read_sampler" memory(NoModRef, Ref, NoModRef)

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

declare %t23 @f12 "air.write_texture_2d.v4f32" memory(ModRef, NoModRef, NoModRef) %a0( nocapture )

declare %t24 @f13 "air.simd_sum.f32" convergent
!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.render_target"
!md10 = !"air.arg_type_name"
!md11 = !"float4"
!md12 = !"air.position"
!md13 = !"air.center"
!md14 = !"air.no_perspective"
!md15 = !"air.arg_name"
!md16 = !"position"
!md17 = !"air.buffer"
!md18 = !"air.location_index"
!md19 = !"air.read_write"
!md20 = !"air.address_space"
!md21 = !"air.raster_order_group"
!md22 = !"air.arg_type_size"
!md23 = !"air.arg_type_align_size"
!md24 = !"float"
!md25 = !"acc"
!md26 = !"air.buffer_size"
!md27 = !"air.read"
!md28 = !"uint"
!md29 = !"width"
!md30 = !"air.texture"
!md31 = !"texture2d<float, read_write>"
!md32 = !"t"
!md33 = !"color"
!md34 = !"air.arg_unused"
!md35 = !"air.fragment_input"
!md36 = !"generated(5colorDv4_f)"
!md37 = !"air.perspective"
!md38 = !"n"
!md39 = !"air.sample_id"
!md40 = !"sample"
!md41 = !"air.compile.denorms_disable"
!md42 = !"air.compile.fast_math_enable"
!md43 = !"air.compile.framebuffer_fetch_enable"
!md44 = !"Apple metal version 32023.922 (metalfe-32023.922.4)"
!md45 = !"Metal"
!md46 = !"int"
!md47 = !"omnipotent char"
!md48 = !"Simple C++ TBAA"
!md49 = !"air-alias-scope-arg(2)"
!md50 = !"air-alias-scope-arg(1)"
!md51 = i32 2
!md52 = %t26 c16
!md53 = i32 1
!md54 = i32 4
!md55 = i32 7
!md56 = i32 31
!md57 = i32 128
!md58 = i32 8
!md59 = i32 16
!md60 = ptr addrspace(0) @f0
!md61 = i32 0
!md62 = ptr addrspace(0) @f2
!md63 = ptr addrspace(0) @f4
!md64 = ptr addrspace(0) @f5
!md65 = ptr addrspace(0) @f6
!md66 = ptr addrspace(0) @f7
!md67 = ptr addrspace(0) @f8
!md68 = i64 0
!md69 = !{!md51, !md0, !md52}
!md70 = !{!md53, !md1, !md54}
!md71 = !{!md55, !md2, !md51}
!md72 = !{!md55, !md3, !md56}
!md73 = !{!md55, !md4, !md56}
!md74 = !{!md55, !md5, !md56}
!md75 = !{!md55, !md6, !md57}
!md76 = !{!md55, !md7, !md58}
!md77 = !{!md55, !md8, !md59}
!md78 = !{!md9, !md61, !md61, !md10, !md11}
!md79 = !{!md78}
!md80 = !{!md61, !md12, !md13, !md14, !md10, !md11, !md15, !md16}
!md81 = !{!md53, !md17, !md18, !md61, !md53, !md19, !md20, !md53, !md21, !md61, !md22, !md54, !md23, !md54, !md10, !md24, !md15, !md25}
!md82 = !{!md51, !md17, !md26, !md54, !md18, !md53, !md53, !md27, !md20, !md51, !md22, !md54, !md23, !md54, !md10, !md28, !md15, !md29}
!md83 = !{!md80, !md81, !md82}
!md84 = !{!md60, !md79, !md83}
!md85 = !{!md53, !md30, !md18, !md61, !md53, !md19, !md21, !md61, !md10, !md31, !md15, !md32}
!md86 = !{!md80, !md85}
!md87 = !{!md62, !md79, !md86}
!md88 = !{!md9, !md61, !md61, !md21, !md61, !md10, !md11, !md15, !md33}
!md89 = !{!md88}
!md90 = !{!md80}
!md91 = !{!md63, !md89, !md90}
!md92 = !{!md61, !md12, !md13, !md14, !md10, !md11, !md15, !md16, !md34}
!md93 = !{!md53, !md35, !md36, !md13, !md37, !md10, !md11, !md15, !md33}
!md94 = !{!md51, !md17, !md18, !md61, !md53, !md19, !md20, !md53, !md21, !md61, !md22, !md54, !md23, !md54, !md10, !md24, !md15, !md25}
!md95 = !{!md92, !md93, !md94}
!md96 = !{!md64, !md79, !md95}
!md97 = !{!md51, !md17, !md26, !md54, !md18, !md53, !md53, !md27, !md20, !md51, !md22, !md54, !md23, !md54, !md10, !md28, !md15, !md38}
!md98 = !{!md80, !md81, !md97}
!md99 = !{!md65, !md79, !md98}
!md100 = !{!md53, !md39, !md10, !md28, !md15, !md40}
!md101 = !{!md80, !md100, !md94}
!md102 = !{!md66, !md79, !md101}
!md103 = !{!md92, !md93}
!md104 = !{!md67, !md79, !md103}
!md105 = !{!md41}
!md106 = !{!md42}
!md107 = !{!md43}
!md108 = !{!md44}
!md109 = !{!md51, !md58, !md61}
!md110 = !{!md45, !md54, !md61, !md61}
!md111 = !{!md48}
!md112 = !{!md47, !md111, !md68}
!md113 = !{!md46, !md112, !md68}
!md114 = !{!md113, !md113, !md68}
!md115 = !{!md24, !md112, !md68}
!md116 = !{!md115, !md115, !md68}
!"llvm.module.flags" = !{!md69, !md70, !md71, !md72, !md73, !md74, !md75, !md76, !md77}
!"air.fragment" = !{!md84, !md87, !md91, !md96, !md99, !md102, !md104}
!"air.compile_options" = !{!md105, !md106, !md107}
!"llvm.ident" = !{!md108}
!"air.version" = !{!md109}
!"air.language_version" = !{!md110}
