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

; 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::TType" = type { ptr, i32, [4 x i8], %"class.glslang::TQualifier", ptr, %union.anon.84, 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.84 = type { ptr }
%"struct.glslang::TSampler" = type { i32 }

@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [114 x i8], align 1
@__PRETTY_FUNCTION__._ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage = external hidden unnamed_addr constant [87 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang10TQualifier11isPipeInputEv(ptr noundef nonnull align 8 dereferenceable(72)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.glslang::TType", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.glslang::TType", align 8
  %13 = alloca %"class.glslang::TType", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds ptr, ptr %15, i64 29
  %17 = load ptr, ptr %16, align 8
  %18 = call noundef zeroext i1 %17(ptr noundef nonnull align 8 dereferenceable(144) %14)
  br i1 %18, label %19, label %62

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 144, ptr %6) #4
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %6, ptr noundef nonnull align 8 dereferenceable(144) %20, i32 noundef 0, i1 noundef zeroext false)
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds ptr, ptr %22, i64 30
  %24 = load ptr, ptr %23, align 8
  %25 = invoke noundef zeroext i1 %24(ptr noundef nonnull align 8 dereferenceable(144) %21)
          to label %26 unwind label %47

26:                                               ; preds = %19
  br i1 %25, label %27, label %51

27:                                               ; preds = %26
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds ptr, ptr %29, i64 11
  %31 = load ptr, ptr %30, align 8
  %32 = invoke noundef nonnull align 8 dereferenceable(72) ptr %31(ptr noundef nonnull align 8 dereferenceable(144) %28)
          to label %33 unwind label %47

33:                                               ; preds = %27
  %34 = invoke noundef zeroext i1 @_ZNK7glslang10TQualifier9isPerViewEv(ptr noundef nonnull align 8 dereferenceable(72) %32)
          to label %35 unwind label %47

35:                                               ; preds = %33
  br i1 %34, label %51, label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds ptr, ptr %38, i64 15
  %40 = load ptr, ptr %39, align 8
  %41 = invoke noundef i32 %40(ptr noundef nonnull align 8 dereferenceable(144) %37)
          to label %42 unwind label %47

42:                                               ; preds = %36
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = invoke noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %6, i32 noundef %43)
          to label %45 unwind label %47

45:                                               ; preds = %42
  %46 = mul nsw i32 %41, %44
  store i32 %46, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %61

47:                                               ; preds = %53, %51, %42, %36, %33, %27, %19
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %6) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr %6) #4
  br label %159

51:                                               ; preds = %35, %26
  %52 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN7glslang5TType12getQualifierEv(ptr noundef nonnull align 8 dereferenceable(144) %6)
          to label %53 unwind label %47

53:                                               ; preds = %51
  %54 = getelementptr inbounds %"class.glslang::TQualifier", ptr %52, i32 0, i32 1
  %55 = load i64, ptr %54, align 8
  %56 = and i64 %55, -2199023255553
  %57 = or i64 %56, 0
  store i64 %57, ptr %54, align 8
  %58 = load i32, ptr %5, align 4, !tbaa !9
  %59 = invoke noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %6, i32 noundef %58)
          to label %60 unwind label %47

60:                                               ; preds = %53
  store i32 %59, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %61

61:                                               ; preds = %60, %45
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %6) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr %6) #4
  br label %157

62:                                               ; preds = %2
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = getelementptr inbounds ptr, ptr %64, i64 35
  %66 = load ptr, ptr %65, align 8
  %67 = call noundef zeroext i1 %66(ptr noundef nonnull align 8 dereferenceable(144) %63)
  br i1 %67, label %68, label %94

68:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %69

69:                                               ; preds = %85, %68
  %70 = load i32, ptr %11, align 4, !tbaa !13
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %71)
  %73 = call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %72) #4
  %74 = trunc i64 %73 to i32
  %75 = icmp slt i32 %70, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %69
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %92

77:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 144, ptr %12) #4
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = load i32, ptr %11, align 4, !tbaa !13
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %12, ptr noundef nonnull align 8 dereferenceable(144) %78, i32 noundef %79, i1 noundef zeroext false)
  %80 = load i32, ptr %5, align 4, !tbaa !9
  %81 = invoke noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %12, i32 noundef %80)
          to label %82 unwind label %88

82:                                               ; preds = %77
  %83 = load i32, ptr %10, align 4, !tbaa !13
  %84 = add nsw i32 %83, %81
  store i32 %84, ptr %10, align 4, !tbaa !13
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %12) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr %12) #4
  br label %85

85:                                               ; preds = %82
  %86 = load i32, ptr %11, align 4, !tbaa !13
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %11, align 4, !tbaa !13
  br label %69, !llvm.loop !15

88:                                               ; preds = %77
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %7, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %8, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %12) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %159

92:                                               ; preds = %76
  %93 = load i32, ptr %10, align 4, !tbaa !13
  store i32 %93, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %157

94:                                               ; preds = %62
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = load ptr, ptr %95, align 8, !tbaa !11
  %97 = getelementptr inbounds ptr, ptr %96, i64 24
  %98 = load ptr, ptr %97, align 8
  %99 = call noundef zeroext i1 %98(ptr noundef nonnull align 8 dereferenceable(144) %95)
  br i1 %99, label %100, label %101

100:                                              ; preds = %94
  store i32 1, ptr %3, align 4
  br label %157

101:                                              ; preds = %94
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds ptr, ptr %103, i64 27
  %105 = load ptr, ptr %104, align 8
  %106 = call noundef zeroext i1 %105(ptr noundef nonnull align 8 dereferenceable(144) %102)
  br i1 %106, label %107, label %134

107:                                              ; preds = %101
  %108 = load i32, ptr %5, align 4, !tbaa !9
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %118

110:                                              ; preds = %107
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = load ptr, ptr %111, align 8, !tbaa !11
  %113 = getelementptr inbounds ptr, ptr %112, i64 11
  %114 = load ptr, ptr %113, align 8
  %115 = call noundef nonnull align 8 dereferenceable(72) ptr %114(ptr noundef nonnull align 8 dereferenceable(144) %111)
  %116 = call noundef zeroext i1 @_ZNK7glslang10TQualifier11isPipeInputEv(ptr noundef nonnull align 8 dereferenceable(72) %115)
  br i1 %116, label %117, label %118

117:                                              ; preds = %110
  store i32 1, ptr %3, align 4
  br label %157

118:                                              ; preds = %110, %107
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = load ptr, ptr %119, align 8, !tbaa !11
  %121 = getelementptr inbounds ptr, ptr %120, i64 7
  %122 = load ptr, ptr %121, align 8
  %123 = call noundef i32 %122(ptr noundef nonnull align 8 dereferenceable(144) %119)
  %124 = icmp eq i32 %123, 2
  br i1 %124, label %125, label %133

125:                                              ; preds = %118
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = getelementptr inbounds ptr, ptr %127, i64 12
  %129 = load ptr, ptr %128, align 8
  %130 = call noundef i32 %129(ptr noundef nonnull align 8 dereferenceable(144) %126)
  %131 = icmp sgt i32 %130, 2
  br i1 %131, label %132, label %133

132:                                              ; preds = %125
  store i32 2, ptr %3, align 4
  br label %157

133:                                              ; preds = %125, %118
  store i32 1, ptr %3, align 4
  br label %157

134:                                              ; preds = %101
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = load ptr, ptr %135, align 8, !tbaa !11
  %137 = getelementptr inbounds ptr, ptr %136, i64 28
  %138 = load ptr, ptr %137, align 8
  %139 = call noundef zeroext i1 %138(ptr noundef nonnull align 8 dereferenceable(144) %135)
  br i1 %139, label %140, label %156

140:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 144, ptr %13) #4
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %13, ptr noundef nonnull align 8 dereferenceable(144) %141, i32 noundef 0, i1 noundef zeroext false)
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  %144 = getelementptr inbounds ptr, ptr %143, i64 13
  %145 = load ptr, ptr %144, align 8
  %146 = invoke noundef i32 %145(ptr noundef nonnull align 8 dereferenceable(144) %142)
          to label %147 unwind label %152

147:                                              ; preds = %140
  %148 = load i32, ptr %5, align 4, !tbaa !9
  %149 = invoke noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %13, i32 noundef %148)
          to label %150 unwind label %152

150:                                              ; preds = %147
  %151 = mul nsw i32 %146, %149
  store i32 %151, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %13) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr %13) #4
  br label %157

152:                                              ; preds = %147, %140
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %7, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %8, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %13) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr %13) #4
  br label %159

156:                                              ; preds = %134
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.14, i32 noundef 1835, ptr noundef @__PRETTY_FUNCTION__._ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage) #5
  unreachable

157:                                              ; preds = %150, %133, %132, %117, %100, %92, %61
  %158 = load i32, ptr %3, align 4
  ret i32 %158

159:                                              ; preds = %152, %88, %47
  %160 = load ptr, ptr %7, align 8
  %161 = load i32, ptr %8, align 4
  %162 = insertvalue { ptr, i32 } poison, ptr %160, 0
  %163 = insertvalue { ptr, i32 } %162, i32 %161, 1
  resume { ptr, i32 } %163
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang10TQualifier9isPerViewEv(ptr noundef nonnull align 8 dereferenceable(72)) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "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 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 #4 = { nounwind }
attributes #5 = { noreturn 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 = !{!"_ZTS11EShLanguage", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"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::TType" = type { ptr, i32, [4 x i8], %"class.glslang::TQualifier", ptr, %union.anon.84, 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.84 = type { ptr }
%"struct.glslang::TSampler" = type { i32 }

@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [114 x i8], align 1
@__PRETTY_FUNCTION__._ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage = external hidden unnamed_addr constant [87 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang10TQualifier11isPipeInputEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.glslang::TType", align 8
  %4 = alloca %"class.glslang::TType", align 8
  %5 = alloca %"class.glslang::TType", align 8
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 232
  %8 = load ptr, ptr %7, align 8
  %9 = tail call noundef zeroext i1 %8(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %9, label %10, label %41

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %3) #4
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %3, ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef 0, i1 noundef zeroext false)
  %11 = load ptr, ptr %0, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 240
  %13 = load ptr, ptr %12, align 8
  %14 = invoke noundef zeroext i1 %13(ptr noundef nonnull align 8 dereferenceable(144) %0)
          to label %15 unwind label %32

15:                                               ; preds = %10
  br i1 %14, label %16, label %34

16:                                               ; preds = %15
  %17 = load ptr, ptr %0, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 88
  %19 = load ptr, ptr %18, align 8
  %20 = invoke noundef nonnull align 8 dereferenceable(72) ptr %19(ptr noundef nonnull align 8 dereferenceable(144) %0)
          to label %21 unwind label %32

21:                                               ; preds = %16
  %22 = call noundef zeroext i1 @_ZNK7glslang10TQualifier9isPerViewEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  br i1 %22, label %34, label %23

23:                                               ; preds = %21
  %24 = load ptr, ptr %0, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 120
  %26 = load ptr, ptr %25, align 8
  %27 = invoke noundef i32 %26(ptr noundef nonnull align 8 dereferenceable(144) %0)
          to label %28 unwind label %32

28:                                               ; preds = %23
  %29 = invoke noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %3, i32 noundef %1)
          to label %30 unwind label %32

30:                                               ; preds = %28
  %31 = mul nsw i32 %29, %27
  br label %40

32:                                               ; preds = %34, %28, %23, %16, %10
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %3) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #4
  br label %108

34:                                               ; preds = %21, %15
  %35 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7glslang5TType12getQualifierEv(ptr noundef nonnull align 8 dereferenceable(144) %3)
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = load i64, ptr %36, align 8
  %38 = and i64 %37, -2199023255553
  store i64 %38, ptr %36, align 8
  %39 = invoke noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %3, i32 noundef %1)
          to label %40 unwind label %32

40:                                               ; preds = %34, %30
  %.031 = phi i32 [ %31, %30 ], [ %39, %34 ]
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %3) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #4
  br label %.loopexit

41:                                               ; preds = %2
  %42 = load ptr, ptr %0, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 280
  %44 = load ptr, ptr %43, align 8
  %45 = tail call noundef zeroext i1 %44(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %45, label %.preheader, label %60

.preheader:                                       ; preds = %41
  %46 = tail call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %47 = tail call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %46) #4
  %48 = trunc i64 %47 to i32
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %51
  %.035 = phi i32 [ %53, %51 ], [ 0, %.preheader ]
  %.02834 = phi i32 [ %52, %51 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %4) #4
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %4, ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.035, i1 noundef zeroext false)
  %50 = invoke noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %4, i32 noundef %1)
          to label %51 unwind label %58

51:                                               ; preds = %.lr.ph
  %52 = add nsw i32 %50, %.02834
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %4) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #4
  %53 = add nuw nsw i32 %.035, 1
  %54 = call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %55 = call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %54) #4
  %56 = trunc i64 %55 to i32
  %57 = icmp slt i32 %53, %56
  br i1 %57, label %.lr.ph, label %.loopexit, !llvm.loop !8

58:                                               ; preds = %.lr.ph
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %4) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #4
  br label %108

60:                                               ; preds = %41
  %61 = load ptr, ptr %0, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i64 192
  %63 = load ptr, ptr %62, align 8
  %64 = tail call noundef zeroext i1 %63(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %64, label %.loopexit, label %65

65:                                               ; preds = %60
  %66 = load ptr, ptr %0, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i64 216
  %68 = load ptr, ptr %67, align 8
  %69 = tail call noundef zeroext i1 %68(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %69, label %70, label %91

70:                                               ; preds = %65
  %71 = icmp eq i32 %1, 0
  br i1 %71, label %72, label %78

72:                                               ; preds = %70
  %73 = load ptr, ptr %0, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 88
  %75 = load ptr, ptr %74, align 8
  %76 = tail call noundef nonnull align 8 dereferenceable(72) ptr %75(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %77 = tail call noundef zeroext i1 @_ZNK7glslang10TQualifier11isPipeInputEv(ptr noundef nonnull align 8 dereferenceable(72) %76)
  br i1 %77, label %.loopexit, label %78

78:                                               ; preds = %72, %70
  %79 = load ptr, ptr %0, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 56
  %81 = load ptr, ptr %80, align 8
  %82 = tail call noundef i32 %81(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %83 = icmp eq i32 %82, 2
  br i1 %83, label %84, label %90

84:                                               ; preds = %78
  %85 = load ptr, ptr %0, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 96
  %87 = load ptr, ptr %86, align 8
  %88 = tail call noundef i32 %87(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %89 = icmp sgt i32 %88, 2
  br i1 %89, label %.loopexit, label %90

90:                                               ; preds = %84, %78
  br label %.loopexit

91:                                               ; preds = %65
  %92 = load ptr, ptr %0, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 224
  %94 = load ptr, ptr %93, align 8
  %95 = tail call noundef zeroext i1 %94(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %95, label %96, label %107

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %5) #4
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %5, ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef 0, i1 noundef zeroext false)
  %97 = load ptr, ptr %0, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 104
  %99 = load ptr, ptr %98, align 8
  %100 = invoke noundef i32 %99(ptr noundef nonnull align 8 dereferenceable(144) %0)
          to label %101 unwind label %105

101:                                              ; preds = %96
  %102 = invoke noundef i32 @_ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage(ptr noundef nonnull align 8 dereferenceable(144) %5, i32 noundef %1)
          to label %103 unwind label %105

103:                                              ; preds = %101
  %104 = mul nsw i32 %102, %100
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %5) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %5) #4
  br label %.loopexit

105:                                              ; preds = %101, %96
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %5) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %5) #4
  br label %108

107:                                              ; preds = %91
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.14, i32 noundef 1835, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7glslang13TIntermediate23computeTypeLocationSizeERKNS_5TTypeE11EShLanguage) #5
  unreachable

.loopexit:                                        ; preds = %51, %.preheader, %84, %72, %60, %103, %90, %40
  %.1 = phi i32 [ %.031, %40 ], [ 1, %90 ], [ %104, %103 ], [ 1, %60 ], [ 1, %72 ], [ 2, %84 ], [ 0, %.preheader ], [ %52, %51 ]
  ret i32 %.1

108:                                              ; preds = %105, %58, %32
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %59, %58 ], [ %106, %105 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang10TQualifier9isPerViewEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "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 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 #4 = { nounwind }
attributes #5 = { noreturn 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 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


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