; LLVM IR from Try/Tempest :: Engine/thirdparty/spirv_cross (spirv_hlsl)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.spirv_cross::SPIRType" = type { %"struct.spirv_cross::IVariant.base", i32, i32, i32, i32, i32, %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.325", i32, i8, i8, i32, %"class.spirv_cross::SmallVector.227", %"class.spirv_cross::SmallVector.92", %"struct.spirv_cross::SPIRType::ImageType", %"class.spirv_cross::TypedID.328", %"class.spirv_cross::TypedID.328", %"class.std::unordered_set.165" }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.324" }>
%"class.spirv_cross::TypedID.324" = type { i32 }
%"class.spirv_cross::SmallVector.325" = type { %"class.spirv_cross::VectorView.326", i64, %"class.spirv_cross::AlignedBuffer.327" }
%"class.spirv_cross::VectorView.326" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.327" = type { [8 x i8] }
%"class.spirv_cross::SmallVector.227" = type { %"class.spirv_cross::VectorView.228", i64, %"class.spirv_cross::AlignedBuffer.229" }
%"class.spirv_cross::VectorView.228" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.229" = type { [32 x i8] }
%"class.spirv_cross::SmallVector.92" = type { %"class.spirv_cross::VectorView.93", i64, %"class.spirv_cross::AlignedBuffer.94" }
%"class.spirv_cross::VectorView.93" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.94" = type { [32 x i8] }
%"struct.spirv_cross::SPIRType::ImageType" = type { %"class.spirv_cross::TypedID.328", i32, i8, i8, i8, i32, i32, i32 }
%"class.spirv_cross::TypedID.328" = type { i32 }
%"class.std::unordered_set.165" = type { %"class.std::_Hashtable.166" }
%"class.std::_Hashtable.166" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK11spirv_cross12CompilerHLSL26type_to_consumed_locationsERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(10528) %0, ptr noundef nonnull align 8 dereferenceable(336) %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %10, i32 0, i32 2
  %12 = load i32, ptr %11, align 8, !tbaa !11
  %13 = icmp eq i32 %12, 15
  br i1 %13, label %14, label %38

14:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %34, %14
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %17, i32 0, i32 12
  %19 = call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %18) #4
  %20 = trunc i64 %19 to i32
  %21 = icmp ult i32 %16, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %37

23:                                               ; preds = %15
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %24, i32 0, i32 12
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %25, i64 noundef %27) #4
  %29 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %28)
  %30 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176) %9, i32 noundef %29)
  %31 = call noundef i32 @_ZNK11spirv_cross12CompilerHLSL26type_to_consumed_locationsERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(10528) %9, ptr noundef nonnull align 8 dereferenceable(336) %30)
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = add i32 %32, %31
  store i32 %33, ptr %5, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %23
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = add i32 %35, 1
  store i32 %36, ptr %6, align 4, !tbaa !9
  br label %15, !llvm.loop !39

37:                                               ; preds = %22
  br label %86

38:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %75, %38
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %41, i32 0, i32 6
  %43 = call noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %42) #4
  %44 = trunc i64 %43 to i32
  %45 = icmp ult i32 %40, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %78

47:                                               ; preds = %39
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %48, i32 0, i32 7
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11spirv_cross10VectorViewIbEixEm(ptr noundef nonnull align 8 dereferenceable(16) %49, i64 noundef %51) #4
  %53 = load i8, ptr %52, align 1, !tbaa !41, !range !42, !noundef !43
  %54 = trunc i8 %53 to i1
  br i1 %54, label %55, label %64

55:                                               ; preds = %47
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %56, i32 0, i32 6
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %57, i64 noundef %59) #4
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = mul i32 %62, %61
  store i32 %63, ptr %7, align 4, !tbaa !9
  br label %74

64:                                               ; preds = %47
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %65, i32 0, i32 6
  %67 = load i32, ptr %8, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %66, i64 noundef %68) #4
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = call noundef i32 @_ZNK11spirv_cross8Compiler21evaluate_constant_u32Ej(ptr noundef nonnull align 8 dereferenceable(3176) %9, i32 noundef %70)
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = mul i32 %72, %71
  store i32 %73, ptr %7, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %64, %55
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %8, align 4, !tbaa !9
  %77 = add i32 %76, 1
  store i32 %77, ptr %8, align 4, !tbaa !9
  br label %39, !llvm.loop !44

78:                                               ; preds = %46
  %79 = load i32, ptr %7, align 4, !tbaa !9
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %80, i32 0, i32 5
  %82 = load i32, ptr %81, align 4, !tbaa !45
  %83 = mul i32 %79, %82
  %84 = load i32, ptr %5, align 4, !tbaa !9
  %85 = add i32 %84, %83
  store i32 %85, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %86

86:                                               ; preds = %78, %37
  %87 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret i32 %87
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11spirv_cross10VectorViewIbEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewIjEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #1 align 2

declare noundef i32 @_ZNK11spirv_cross8Compiler21evaluate_constant_u32Ej(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !16, i64 16}
!12 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !13, i64 0, !15, i64 12, !16, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !17, i64 32, !21, i64 88, !10, i64 120, !24, i64 124, !24, i64 125, !25, i64 128, !26, i64 136, !17, i64 192, !29, i64 248, !30, i64 272, !30, i64 276, !34, i64 280}
!13 = !{!"_ZTSN11spirv_cross8IVariantE", !14, i64 8}
!14 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !10, i64 0}
!15 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!16 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !7, i64 0}
!17 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !18, i64 0, !19, i64 16, !20, i64 24}
!18 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !6, i64 0, !19, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!21 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !22, i64 0, !19, i64 16, !23, i64 24}
!22 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !6, i64 0, !19, i64 8}
!23 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !7, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!26 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !27, i64 0, !19, i64 16, !28, i64 24}
!27 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !6, i64 0, !19, i64 8}
!28 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !7, i64 0}
!29 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !30, i64 0, !31, i64 4, !24, i64 8, !24, i64 9, !24, i64 10, !10, i64 12, !32, i64 16, !33, i64 20}
!30 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !10, i64 0}
!31 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!32 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!33 = !{!"_ZTSN3spv15AccessQualifierE", !7, i64 0}
!34 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !35, i64 0}
!35 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !6, i64 0, !19, i64 8, !36, i64 16, !19, i64 24, !37, i64 32, !6, i64 48}
!36 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!37 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !38, i64 0, !19, i64 8}
!38 = !{!"float", !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!24, !24, i64 0}
!42 = !{i8 0, i8 2}
!43 = !{}
!44 = distinct !{!44, !40}
!45 = !{!12, !10, i64 28}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK11spirv_cross12CompilerHLSL26type_to_consumed_locationsERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(10528) %0, ptr noundef nonnull align 8 dereferenceable(336) %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 16
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = icmp eq i32 %4, 15
  br i1 %5, label %.preheader, label %.preheader26

.preheader26:                                     ; preds = %2
  %6 = getelementptr inbounds i8, ptr %1, i64 32
  %7 = tail call noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #3
  %8 = and i64 %7, 4294967295
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader26
  %9 = getelementptr inbounds i8, ptr %1, i64 88
  br label %24

.preheader:                                       ; preds = %2
  %10 = getelementptr inbounds i8, ptr %1, i64 136
  %11 = tail call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #3
  %12 = and i64 %11, 4294967295
  %.not33 = icmp eq i64 %12, 0
  br i1 %.not33, label %.loopexit, label %.lr.ph31

.lr.ph31:                                         ; preds = %.preheader, %.lr.ph31
  %indvars.iv35 = phi i64 [ %indvars.iv.next36, %.lr.ph31 ], [ 0, %.preheader ]
  %.02429 = phi i32 [ %17, %.lr.ph31 ], [ 0, %.preheader ]
  %13 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv35) #3
  %14 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %13)
  %15 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %14)
  %16 = tail call noundef i32 @_ZNK11spirv_cross12CompilerHLSL26type_to_consumed_locationsERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(10528) %0, ptr noundef nonnull align 8 dereferenceable(336) %15)
  %17 = add i32 %16, %.02429
  %indvars.iv.next36 = add nuw nsw i64 %indvars.iv35, 1
  %18 = tail call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #3
  %19 = and i64 %18, 4294967295
  %20 = icmp ult i64 %indvars.iv.next36, %19
  br i1 %20, label %.lr.ph31, label %.loopexit, !llvm.loop !37

._crit_edge:                                      ; preds = %32, %.preheader26
  %.022.lcssa = phi i32 [ 1, %.preheader26 ], [ %.1, %32 ]
  %21 = getelementptr inbounds i8, ptr %1, i64 28
  %22 = load i32, ptr %21, align 4, !tbaa !39
  %23 = mul i32 %22, %.022.lcssa
  br label %.loopexit

24:                                               ; preds = %.lr.ph, %32
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %32 ]
  %.02227 = phi i32 [ 1, %.lr.ph ], [ %.1, %32 ]
  %25 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11spirv_cross10VectorViewIbEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %indvars.iv) #3
  %26 = load i8, ptr %25, align 1, !tbaa !40, !range !41, !noundef !42
  %27 = trunc nuw i8 %26 to i1
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv) #3
  %29 = load i32, ptr %28, align 4, !tbaa !43
  br i1 %27, label %32, label %30

30:                                               ; preds = %24
  %31 = tail call noundef i32 @_ZNK11spirv_cross8Compiler21evaluate_constant_u32Ej(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %29)
  br label %32

32:                                               ; preds = %24, %30
  %.pn = phi i32 [ %31, %30 ], [ %29, %24 ]
  %.1 = mul i32 %.pn, %.02227
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = tail call noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #3
  %34 = and i64 %33, 4294967295
  %35 = icmp ult i64 %indvars.iv.next, %34
  br i1 %35, label %24, label %._crit_edge, !llvm.loop !44

.loopexit:                                        ; preds = %.lr.ph31, %.preheader, %._crit_edge
  %.125 = phi i32 [ %23, %._crit_edge ], [ 0, %.preheader ], [ %17, %.lr.ph31 ]
  ret i32 %.125
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11spirv_cross10VectorViewIbEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewIjEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

declare noundef i32 @_ZNK11spirv_cross8Compiler21evaluate_constant_u32Ej(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 16}
!6 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !7, i64 0, !12, i64 12, !13, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !14, i64 32, !19, i64 88, !9, i64 120, !22, i64 124, !22, i64 125, !23, i64 128, !24, i64 136, !14, i64 192, !27, i64 248, !28, i64 272, !28, i64 276, !32, i64 280}
!7 = !{!"_ZTSN11spirv_cross8IVariantE", !8, i64 8}
!8 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN3spv2OpE", !10, i64 0}
!13 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !10, i64 0}
!14 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !15, i64 0, !17, i64 16, !18, i64 24}
!15 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !16, i64 0, !17, i64 8}
!16 = !{!"any pointer", !10, i64 0}
!17 = !{!"long", !10, i64 0}
!18 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !10, i64 0}
!19 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !20, i64 0, !17, i64 16, !21, i64 24}
!20 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !16, i64 0, !17, i64 8}
!21 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !10, i64 0}
!22 = !{!"bool", !10, i64 0}
!23 = !{!"_ZTSN3spv12StorageClassE", !10, i64 0}
!24 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !25, i64 0, !17, i64 16, !26, i64 24}
!25 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !16, i64 0, !17, i64 8}
!26 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !10, i64 0}
!27 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !28, i64 0, !29, i64 4, !22, i64 8, !22, i64 9, !22, i64 10, !9, i64 12, !30, i64 16, !31, i64 20}
!28 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !9, i64 0}
!29 = !{!"_ZTSN3spv3DimE", !10, i64 0}
!30 = !{!"_ZTSN3spv11ImageFormatE", !10, i64 0}
!31 = !{!"_ZTSN3spv15AccessQualifierE", !10, i64 0}
!32 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !33, i64 0}
!33 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !16, i64 0, !17, i64 8, !34, i64 16, !17, i64 24, !35, i64 32, !16, i64 48}
!34 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !16, i64 0}
!35 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !36, i64 0, !17, i64 8}
!36 = !{!"float", !10, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!6, !9, i64 28}
!40 = !{!22, !22, i64 0}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{!9, !9, i64 0}
!44 = distinct !{!44, !38}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass