; LLVM IR from hbatagelo/abcg :: abcg/external/glslang/glslang/MachineIndependent (Constant)

; 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"

%"class.glslang::TConstUnionArray" = type { ptr, ptr }
%"class.glslang::TType" = type { ptr, i32, [4 x i8], %"class.glslang::TQualifier", ptr, %union.anon, ptr, ptr, %"struct.glslang::TSampler", ptr, ptr }
%"class.glslang::TQualifier" = type <{ ptr, i64, i8, [3 x i8], i32, i32, i64, i64, i8, i8, i8, i8, i8, [3 x i8], i32, i8, [3 x i8], i32, ptr }>
%union.anon = type { ptr }
%"struct.glslang::TSampler" = type { i32 }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7glslang5TTypeC2ENS_10TBasicTypeENS_17TStorageQualifierEiiib(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7glslang16TConstUnionArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 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
declare dso_local void @_ZN7glslang16TConstUnionArrayC2Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #2 align 2

declare noundef ptr @_ZNK7glslang13TIntermediate16addConstantUnionERKNS_16TConstUnionArrayERKNS_5TTypeERKNS_10TSourceLocEb(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7glslang13TIntermediate11foldSwizzleEPNS_12TIntermTypedERNS_17TSwizzleSelectorsIiEERKNS_10TSourceLocE(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(20) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.glslang::TConstUnionArray", align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.glslang::TType", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = getelementptr inbounds ptr, ptr %18, i64 5
  %20 = load ptr, ptr %19, align 8
  %21 = call noundef ptr %20(ptr noundef nonnull align 8 dereferenceable(32) %17)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK7glslang20TIntermConstantUnion13getConstArrayEv(ptr noundef nonnull align 8 dereferenceable(193) %21)
  store ptr %22, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = call noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiE4sizeEv(ptr noundef nonnull align 4 dereferenceable(20) %23)
  call void @_ZN7glslang16TConstUnionArrayC2Ei(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %49, %4
  %26 = load i32, ptr %11, align 4, !tbaa !11
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = invoke noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiE4sizeEv(ptr noundef nonnull align 4 dereferenceable(20) %27)
          to label %29 unwind label %32

29:                                               ; preds = %25
  %30 = icmp slt i32 %26, %28
  br i1 %30, label %36, label %31

31:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %52

32:                                               ; preds = %44, %41, %36, %25
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %12, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %98

36:                                               ; preds = %29
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load i32, ptr %11, align 4, !tbaa !11
  %40 = invoke noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiEixEi(ptr noundef nonnull align 4 dereferenceable(20) %38, i32 noundef %39)
          to label %41 unwind label %32

41:                                               ; preds = %36
  %42 = sext i32 %40 to i64
  %43 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZNK7glslang16TConstUnionArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %37, i64 noundef %42)
          to label %44 unwind label %32

44:                                               ; preds = %41
  %45 = load i32, ptr %11, align 4, !tbaa !11
  %46 = sext i32 %45 to i64
  %47 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN7glslang16TConstUnionArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %46)
          to label %48 unwind label %32

48:                                               ; preds = %44
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %47, ptr align 8 %43, i64 12, i1 false), !tbaa.struct !13
  br label %49

49:                                               ; preds = %48
  %50 = load i32, ptr %11, align 4, !tbaa !11
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %11, align 4, !tbaa !11
  br label %25, !llvm.loop !17

52:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds ptr, ptr %54, i64 30
  %56 = load ptr, ptr %55, align 8
  %57 = invoke noundef nonnull align 8 dereferenceable(144) ptr %56(ptr noundef nonnull align 8 dereferenceable(176) %53)
          to label %58 unwind label %66

58:                                               ; preds = %52
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = invoke noundef ptr @_ZNK7glslang13TIntermediate16addConstantUnionERKNS_16TConstUnionArrayERKNS_5TTypeERKNS_10TSourceLocEb(ptr noundef nonnull align 8 dereferenceable(1784) %16, ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(144) %57, ptr noundef nonnull align 8 dereferenceable(24) %59, i1 noundef zeroext false)
          to label %61 unwind label %66

61:                                               ; preds = %58
  store ptr %60, ptr %14, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = icmp eq ptr %62, null
  br i1 %63, label %64, label %70

64:                                               ; preds = %61
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %65, ptr %14, align 8, !tbaa !5
  br label %95

66:                                               ; preds = %58, %52
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %12, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %13, align 4
  br label %97

70:                                               ; preds = %61
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 144, ptr %15) #5
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds ptr, ptr %73, i64 32
  %75 = load ptr, ptr %74, align 8
  %76 = invoke noundef i32 %75(ptr noundef nonnull align 8 dereferenceable(176) %72)
          to label %77 unwind label %86

77:                                               ; preds = %70
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = invoke noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiE4sizeEv(ptr noundef nonnull align 4 dereferenceable(20) %78)
          to label %80 unwind label %86

80:                                               ; preds = %77
  invoke void @_ZN7glslang5TTypeC2ENS_10TBasicTypeENS_17TStorageQualifierEiiib(ptr noundef nonnull align 8 dereferenceable(144) %15, i32 noundef %76, i32 noundef 2, i32 noundef %79, i32 noundef 0, i32 noundef 0, i1 noundef zeroext false)
          to label %81 unwind label %86

81:                                               ; preds = %80
  %82 = load ptr, ptr %71, align 8, !tbaa !9
  %83 = getelementptr inbounds ptr, ptr %82, i64 29
  %84 = load ptr, ptr %83, align 8
  invoke void %84(ptr noundef nonnull align 8 dereferenceable(176) %71, ptr noundef nonnull align 8 dereferenceable(144) %15)
          to label %85 unwind label %90

85:                                               ; preds = %81
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %15) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %15) #5
  br label %95

86:                                               ; preds = %80, %77, %70
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %12, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %13, align 4
  br label %94

90:                                               ; preds = %81
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %12, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %13, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %15) #5
  br label %94

94:                                               ; preds = %90, %86
  call void @llvm.lifetime.end.p0(i64 144, ptr %15) #5
  br label %97

95:                                               ; preds = %85, %64
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @_ZN7glslang16TConstUnionArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret ptr %96

97:                                               ; preds = %94, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %98

98:                                               ; preds = %97, %32
  call void @_ZN7glslang16TConstUnionArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %12, align 8
  %101 = load i32, ptr %13, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 #5 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 8, !14, i64 8, i64 4, !15}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN7glslang10TBasicTypeE", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; 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"

%"class.glslang::TConstUnionArray" = type { ptr, ptr }
%"class.glslang::TType" = type { ptr, i32, [4 x i8], %"class.glslang::TQualifier", ptr, %union.anon, ptr, ptr, %"struct.glslang::TSampler", ptr, ptr }
%"class.glslang::TQualifier" = type <{ ptr, i64, i8, [3 x i8], i32, i32, i64, i64, i8, i8, i8, i8, i8, [3 x i8], i32, i8, [3 x i8], i32, ptr }>
%union.anon = type { ptr }
%"struct.glslang::TSampler" = type { i32 }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7glslang5TTypeC2ENS_10TBasicTypeENS_17TStorageQualifierEiiib(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7glslang16TConstUnionArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7glslang16TConstUnionArrayC2Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #2 align 2

declare noundef ptr @_ZNK7glslang13TIntermediate16addConstantUnionERKNS_16TConstUnionArrayERKNS_5TTypeERKNS_10TSourceLocEb(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7glslang13TIntermediate11foldSwizzleEPNS_12TIntermTypedERNS_17TSwizzleSelectorsIiEERKNS_10TSourceLocE(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(20) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.glslang::TConstUnionArray", align 8
  %6 = alloca %"class.glslang::TType", align 8
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 40
  %9 = load ptr, ptr %8, align 8
  %10 = tail call noundef ptr %9(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK7glslang20TIntermConstantUnion13getConstArrayEv(ptr noundef nonnull align 8 dereferenceable(193) %10)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %12 = tail call noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiE4sizeEv(ptr noundef nonnull align 4 dereferenceable(20) %2)
  call void @_ZN7glslang16TConstUnionArrayC2Ei(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %12)
  %13 = call noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiE4sizeEv(ptr noundef nonnull align 4 dereferenceable(20) %2)
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %4
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 240
  %17 = load ptr, ptr %16, align 8
  %18 = invoke noundef nonnull align 8 dereferenceable(144) ptr %17(ptr noundef nonnull align 8 dereferenceable(176) %1)
          to label %27 unwind label %31

.lr.ph:                                           ; preds = %4, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %4 ]
  %19 = trunc nuw nsw i64 %indvars.iv to i32
  %20 = call noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiEixEi(ptr noundef nonnull align 4 dereferenceable(20) %2, i32 noundef %19)
  %21 = sext i32 %20 to i64
  %22 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK7glslang16TConstUnionArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %11, i64 noundef %21)
  %23 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN7glslang16TConstUnionArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %indvars.iv)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %23, ptr noundef nonnull align 8 dereferenceable(12) %22, i64 12, i1 false), !tbaa.struct !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = call noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiE4sizeEv(ptr noundef nonnull align 4 dereferenceable(20) %2)
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %indvars.iv.next, %25
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !13

27:                                               ; preds = %._crit_edge
  %28 = invoke noundef ptr @_ZNK7glslang13TIntermediate16addConstantUnionERKNS_16TConstUnionArrayERKNS_5TTypeERKNS_10TSourceLocEb(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(144) %18, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext false)
          to label %29 unwind label %31

29:                                               ; preds = %27
  %30 = icmp eq ptr %28, null
  br i1 %30, label %50, label %33

31:                                               ; preds = %27, %._crit_edge
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %51

33:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %6) #5
  %34 = load ptr, ptr %1, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 256
  %36 = load ptr, ptr %35, align 8
  %37 = invoke noundef i32 %36(ptr noundef nonnull align 8 dereferenceable(176) %1)
          to label %38 unwind label %45

38:                                               ; preds = %33
  %39 = call noundef i32 @_ZNK7glslang17TSwizzleSelectorsIiE4sizeEv(ptr noundef nonnull align 4 dereferenceable(20) %2)
  invoke void @_ZN7glslang5TTypeC2ENS_10TBasicTypeENS_17TStorageQualifierEiiib(ptr noundef nonnull align 8 dereferenceable(144) %6, i32 noundef %37, i32 noundef 2, i32 noundef %39, i32 noundef 0, i32 noundef 0, i1 noundef zeroext false)
          to label %40 unwind label %45

40:                                               ; preds = %38
  %41 = load ptr, ptr %28, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 232
  %43 = load ptr, ptr %42, align 8
  invoke void %43(ptr noundef nonnull align 8 dereferenceable(176) %28, ptr noundef nonnull align 8 dereferenceable(144) %6)
          to label %44 unwind label %47

44:                                               ; preds = %40
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %6) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %6) #5
  br label %50

45:                                               ; preds = %38, %33
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %40
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %6) #5
  br label %49

49:                                               ; preds = %47, %45
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %6) #5
  br label %51

50:                                               ; preds = %29, %44
  %.0 = phi ptr [ %28, %44 ], [ %1, %29 ]
  call void @_ZN7glslang16TConstUnionArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  ret ptr %.0

51:                                               ; preds = %49, %31
  %.pn.pn = phi { ptr, i32 } [ %.pn, %49 ], [ %32, %31 ]
  call void @_ZN7glslang16TConstUnionArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn.pn
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 #5 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{i64 0, i64 8, !9, i64 8, i64 4, !11}
!9 = !{!10, !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN7glslang10TBasicTypeE", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass