; 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 }
%"struct.glslang::TTypeLoc" = type { ptr, %"struct.glslang::TSourceLoc" }
%"struct.glslang::TSourceLoc" = type { ptr, i32, i32, 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__._ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b = external hidden unnamed_addr constant [89 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 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 #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7glslang13TIntermediate22getBaseAlignmentScalarERKNS_5TTypeERi(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, i1 noundef zeroext %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.glslang::TType", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.glslang::TType", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  %24 = zext i1 %3 to i8
  store i8 %24, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds ptr, ptr %27, i64 29
  %29 = load ptr, ptr %28, align 8
  %30 = call noundef zeroext i1 %29(ptr noundef nonnull align 8 dereferenceable(144) %26)
  br i1 %30, label %31, label %63

31:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 144, ptr %12) #5
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %12, ptr noundef nonnull align 8 dereferenceable(144) %32, i32 noundef 0, i1 noundef zeroext false)
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i8, ptr %9, align 1, !tbaa !9, !range !15, !noundef !16
  %35 = trunc i8 %34 to i1
  %36 = invoke noundef i32 @_ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b(ptr noundef nonnull align 8 dereferenceable(144) %12, ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %11, i1 noundef zeroext %35)
          to label %37 unwind label %59

37:                                               ; preds = %31
  store i32 %36, ptr %10, align 4, !tbaa !11
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %39, ptr %40, align 4, !tbaa !11
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = load i32, ptr %10, align 4, !tbaa !11
  invoke void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4) %41, i32 noundef %42)
          to label %43 unwind label %59

43:                                               ; preds = %37
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  %48 = getelementptr inbounds ptr, ptr %47, i64 15
  %49 = load ptr, ptr %48, align 8
  %50 = invoke noundef i32 %49(ptr noundef nonnull align 8 dereferenceable(144) %46)
          to label %51 unwind label %59

51:                                               ; preds = %43
  %52 = sub nsw i32 %50, 1
  %53 = mul nsw i32 %45, %52
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = load i32, ptr %54, align 4, !tbaa !11
  %56 = add nsw i32 %53, %55
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %56, ptr %57, align 4, !tbaa !11
  %58 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %58, ptr %5, align 4
  store i32 1, ptr %15, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %12) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %12) #5
  br label %202

59:                                               ; preds = %43, %37, %31
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %13, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %14, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %12) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %12) #5
  br label %204

63:                                               ; preds = %4
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds ptr, ptr %65, i64 7
  %67 = load ptr, ptr %66, align 8
  %68 = call noundef i32 %67(ptr noundef nonnull align 8 dereferenceable(144) %64)
  %69 = icmp eq i32 %68, 15
  br i1 %69, label %70, label %124

70:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %71)
  store ptr %72, ptr %16, align 8, !tbaa !5
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %73, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 0, ptr %18, align 8, !tbaa !17
  br label %74

74:                                               ; preds = %119, %70
  %75 = load i64, ptr %18, align 8, !tbaa !17
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %76) #5
  %78 = icmp ult i64 %75, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %74
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %122

80:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = load i64, ptr %18, align 8, !tbaa !17
  %83 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %81, i64 noundef %82) #5
  %84 = getelementptr inbounds %"struct.glslang::TTypeLoc", ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  %87 = getelementptr inbounds ptr, ptr %86, i64 10
  %88 = load ptr, ptr %87, align 8
  %89 = call noundef nonnull align 8 dereferenceable(72) ptr %88(ptr noundef nonnull align 8 dereferenceable(144) %85)
  %90 = getelementptr inbounds %"class.glslang::TQualifier", ptr %89, i32 0, i32 1
  %91 = load i64, ptr %90, align 8
  %92 = lshr i64 %91, 59
  %93 = and i64 %92, 7
  %94 = trunc i64 %93 to i32
  store i32 %94, ptr %20, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %95 = load ptr, ptr %16, align 8, !tbaa !5
  %96 = load i64, ptr %18, align 8, !tbaa !17
  %97 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %95, i64 noundef %96) #5
  %98 = getelementptr inbounds %"struct.glslang::TTypeLoc", ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  %100 = load i32, ptr %20, align 4, !tbaa !22
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %105

102:                                              ; preds = %80
  %103 = load i32, ptr %20, align 4, !tbaa !22
  %104 = icmp eq i32 %103, 1
  br label %108

105:                                              ; preds = %80
  %106 = load i8, ptr %9, align 1, !tbaa !9, !range !15, !noundef !16
  %107 = trunc i8 %106 to i1
  br label %108

108:                                              ; preds = %105, %102
  %109 = phi i1 [ %104, %102 ], [ %107, %105 ]
  %110 = call noundef i32 @_ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b(ptr noundef nonnull align 8 dereferenceable(144) %99, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %11, i1 noundef zeroext %109)
  store i32 %110, ptr %21, align 4, !tbaa !11
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %112 = load i32, ptr %111, align 4, !tbaa !11
  store i32 %112, ptr %17, align 4, !tbaa !11
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = load i32, ptr %21, align 4, !tbaa !11
  call void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4) %113, i32 noundef %114)
  %115 = load i32, ptr %19, align 4, !tbaa !11
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !11
  %118 = add nsw i32 %117, %115
  store i32 %118, ptr %116, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %119

119:                                              ; preds = %108
  %120 = load i64, ptr %18, align 8, !tbaa !17
  %121 = add i64 %120, 1
  store i64 %121, ptr %18, align 8, !tbaa !17
  br label %74, !llvm.loop !24

122:                                              ; preds = %79
  %123 = load i32, ptr %17, align 4, !tbaa !11
  store i32 %123, ptr %5, align 4
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %202

124:                                              ; preds = %63
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = load ptr, ptr %125, align 8, !tbaa !13
  %127 = getelementptr inbounds ptr, ptr %126, i64 24
  %128 = load ptr, ptr %127, align 8
  %129 = call noundef zeroext i1 %128(ptr noundef nonnull align 8 dereferenceable(144) %125)
  br i1 %129, label %130, label %134

130:                                              ; preds = %124
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = call noundef i32 @_ZN7glslang13TIntermediate22getBaseAlignmentScalarERKNS_5TTypeERi(ptr noundef nonnull align 8 dereferenceable(144) %131, ptr noundef nonnull align 4 dereferenceable(4) %132)
  store i32 %133, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %202

134:                                              ; preds = %124
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = load ptr, ptr %135, align 8, !tbaa !13
  %137 = getelementptr inbounds ptr, ptr %136, i64 27
  %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 %153

140:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = call noundef i32 @_ZN7glslang13TIntermediate22getBaseAlignmentScalarERKNS_5TTypeERi(ptr noundef nonnull align 8 dereferenceable(144) %141, ptr noundef nonnull align 4 dereferenceable(4) %142)
  store i32 %143, ptr %22, align 4, !tbaa !11
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = load ptr, ptr %144, align 8, !tbaa !13
  %146 = getelementptr inbounds ptr, ptr %145, i64 12
  %147 = load ptr, ptr %146, align 8
  %148 = call noundef i32 %147(ptr noundef nonnull align 8 dereferenceable(144) %144)
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = load i32, ptr %149, align 4, !tbaa !11
  %151 = mul nsw i32 %150, %148
  store i32 %151, ptr %149, align 4, !tbaa !11
  %152 = load i32, ptr %22, align 4, !tbaa !11
  store i32 %152, ptr %5, align 4
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %202

153:                                              ; preds = %134
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = load ptr, ptr %154, align 8, !tbaa !13
  %156 = getelementptr inbounds ptr, ptr %155, i64 28
  %157 = load ptr, ptr %156, align 8
  %158 = call noundef zeroext i1 %157(ptr noundef nonnull align 8 dereferenceable(144) %154)
  br i1 %158, label %159, label %201

159:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 144, ptr %23) #5
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = load i8, ptr %9, align 1, !tbaa !9, !range !15, !noundef !16
  %162 = trunc i8 %161 to i1
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %23, ptr noundef nonnull align 8 dereferenceable(144) %160, i32 noundef 0, i1 noundef zeroext %162)
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = load i8, ptr %9, align 1, !tbaa !9, !range !15, !noundef !16
  %165 = trunc i8 %164 to i1
  %166 = invoke noundef i32 @_ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b(ptr noundef nonnull align 8 dereferenceable(144) %23, ptr noundef nonnull align 4 dereferenceable(4) %163, ptr noundef nonnull align 4 dereferenceable(4) %11, i1 noundef zeroext %165)
          to label %167 unwind label %184

167:                                              ; preds = %159
  store i32 %166, ptr %10, align 4, !tbaa !11
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = load i32, ptr %168, align 4, !tbaa !11
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %169, ptr %170, align 4, !tbaa !11
  %171 = load i8, ptr %9, align 1, !tbaa !9, !range !15, !noundef !16
  %172 = trunc i8 %171 to i1
  br i1 %172, label %173, label %188

173:                                              ; preds = %167
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = load i32, ptr %174, align 4, !tbaa !11
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = load ptr, ptr %176, align 8, !tbaa !13
  %178 = getelementptr inbounds ptr, ptr %177, i64 14
  %179 = load ptr, ptr %178, align 8
  %180 = invoke noundef i32 %179(ptr noundef nonnull align 8 dereferenceable(144) %176)
          to label %181 unwind label %184

181:                                              ; preds = %173
  %182 = mul nsw i32 %175, %180
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %182, ptr %183, align 4, !tbaa !11
  br label %199

184:                                              ; preds = %188, %173, %159
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %13, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %14, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %23) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %23) #5
  br label %204

188:                                              ; preds = %167
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = load i32, ptr %189, align 4, !tbaa !11
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = load ptr, ptr %191, align 8, !tbaa !13
  %193 = getelementptr inbounds ptr, ptr %192, i64 13
  %194 = load ptr, ptr %193, align 8
  %195 = invoke noundef i32 %194(ptr noundef nonnull align 8 dereferenceable(144) %191)
          to label %196 unwind label %184

196:                                              ; preds = %188
  %197 = mul nsw i32 %190, %195
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %197, ptr %198, align 4, !tbaa !11
  br label %199

199:                                              ; preds = %196, %181
  %200 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %200, ptr %5, align 4
  store i32 1, ptr %15, align 4
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %23) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %23) #5
  br label %202

201:                                              ; preds = %153
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.14, i32 noundef 2248, ptr noundef @__PRETTY_FUNCTION__._ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b) #6
  unreachable

202:                                              ; preds = %199, %140, %130, %122, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %203 = load i32, ptr %5, align 4
  ret i32 %203

204:                                              ; preds = %184, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %205

205:                                              ; preds = %204
  %206 = load ptr, ptr %13, align 8
  %207 = load i32, ptr %14, align 4
  %208 = insertvalue { ptr, i32 } poison, ptr %206, 0
  %209 = insertvalue { ptr, i32 } %208, i32 %207, 1
  resume { ptr, i32 } %209
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTSN7glslang8TTypeLocE", !6, i64 0, !21, i64 8}
!21 = !{!"_ZTSN7glslang10TSourceLocE", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTSN7glslang13TLayoutMatrixE", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"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__._ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b = external hidden unnamed_addr constant [89 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #3 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 #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7glslang13TIntermediate22getBaseAlignmentScalarERKNS_5TTypeERi(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, i1 noundef zeroext %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca %"class.glslang::TType", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.glslang::TType", align 8
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %11 = load ptr, ptr %0, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %11, i64 232
  %13 = load ptr, ptr %12, align 8
  %14 = tail call noundef zeroext i1 %13(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %14, label %15, label %31

15:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %6) #5
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %6, ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef 0, i1 noundef zeroext false)
  %16 = invoke noundef i32 @_ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b(ptr noundef nonnull align 8 dereferenceable(144) %6, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %5, i1 noundef zeroext %3)
          to label %17 unwind label %29

17:                                               ; preds = %15
  %18 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %18, ptr %2, align 4, !tbaa !5
  call void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef %16)
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = load ptr, ptr %0, align 8, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %20, i64 120
  %22 = load ptr, ptr %21, align 8
  %23 = invoke noundef i32 %22(ptr noundef nonnull align 8 dereferenceable(144) %0)
          to label %24 unwind label %29

24:                                               ; preds = %17
  %25 = add nsw i32 %23, -1
  %26 = mul nsw i32 %25, %19
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = add nsw i32 %27, %26
  store i32 %28, ptr %1, align 4, !tbaa !5
  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 %102

29:                                               ; preds = %17, %15
  %30 = landingpad { ptr, i32 }
          cleanup
  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 %103

31:                                               ; preds = %4
  %32 = load ptr, ptr %0, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %32, i64 56
  %34 = load ptr, ptr %33, align 8
  %35 = tail call noundef i32 %34(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %36 = icmp eq i32 %35, 15
  br i1 %36, label %37, label %66

37:                                               ; preds = %31
  %38 = tail call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  %39 = tail call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %38) #5
  %.not61 = icmp eq i64 %39, 0
  br i1 %.not61, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %7, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %37
  %40 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ 0, %37 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %102

.lr.ph:                                           ; preds = %37, %.lr.ph
  %.05560 = phi i64 [ %63, %.lr.ph ], [ 0, %37 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %41 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef %.05560) #5
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %43, i64 80
  %45 = load ptr, ptr %44, align 8
  %46 = call noundef nonnull align 8 dereferenceable(72) ptr %45(ptr noundef nonnull align 8 dereferenceable(144) %42)
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load i64, ptr %47, align 8
  %49 = lshr i64 %48, 59
  %50 = trunc nuw nsw i64 %49 to i32
  %51 = and i32 %50, 7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %52 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef %.05560) #5
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %.not = icmp eq i32 %51, 0
  %54 = icmp eq i32 %51, 1
  %55 = select i1 %.not, i1 %3, i1 %54
  %56 = call noundef i32 @_ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b(ptr noundef nonnull align 8 dereferenceable(144) %53, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %5, i1 noundef zeroext %55)
  store i32 %56, ptr %9, align 4, !tbaa !5
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %58 = load i32, ptr %57, align 4, !tbaa !5
  store i32 %58, ptr %7, align 4, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !5
  call void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef %59)
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = add nsw i32 %61, %60
  store i32 %62, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  %63 = add nuw i64 %.05560, 1
  %64 = call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %38) #5
  %65 = icmp ult i64 %63, %64
  br i1 %65, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !15

66:                                               ; preds = %31
  %67 = load ptr, ptr %0, align 8, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %67, i64 192
  %69 = load ptr, ptr %68, align 8
  %70 = tail call noundef zeroext i1 %69(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %70, label %71, label %73

71:                                               ; preds = %66
  %72 = tail call noundef i32 @_ZN7glslang13TIntermediate22getBaseAlignmentScalarERKNS_5TTypeERi(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 4 dereferenceable(4) %1)
  br label %102

73:                                               ; preds = %66
  %74 = load ptr, ptr %0, align 8, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %74, i64 216
  %76 = load ptr, ptr %75, align 8
  %77 = tail call noundef zeroext i1 %76(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %77, label %78, label %86

78:                                               ; preds = %73
  %79 = tail call noundef i32 @_ZN7glslang13TIntermediate22getBaseAlignmentScalarERKNS_5TTypeERi(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %80 = load ptr, ptr %0, align 8, !tbaa !9
  %81 = getelementptr inbounds i8, ptr %80, i64 96
  %82 = load ptr, ptr %81, align 8
  %83 = tail call noundef i32 %82(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %84 = load i32, ptr %1, align 4, !tbaa !5
  %85 = mul nsw i32 %84, %83
  store i32 %85, ptr %1, align 4, !tbaa !5
  br label %102

86:                                               ; preds = %73
  %87 = load ptr, ptr %0, align 8, !tbaa !9
  %88 = getelementptr inbounds i8, ptr %87, i64 224
  %89 = load ptr, ptr %88, align 8
  %90 = tail call noundef zeroext i1 %89(ptr noundef nonnull align 8 dereferenceable(144) %0)
  br i1 %90, label %91, label %101

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %10) #5
  call void @_ZN7glslang5TTypeC2ERKS0_ib(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef 0, i1 noundef zeroext %3)
  %92 = invoke noundef i32 @_ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %5, i1 noundef zeroext %3)
          to label %.invoke unwind label %98

.invoke:                                          ; preds = %91
  %93 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %93, ptr %2, align 4, !tbaa !5
  %94 = load ptr, ptr %0, align 8, !tbaa !9
  %. = select i1 %3, i64 112, i64 104
  %95 = getelementptr inbounds i8, ptr %94, i64 %.
  %96 = load ptr, ptr %95, align 8
  %97 = invoke noundef i32 %96(ptr noundef nonnull align 8 dereferenceable(144) %0)
          to label %100 unwind label %98

98:                                               ; preds = %.invoke, %91
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %10) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %10) #5
  br label %103

100:                                              ; preds = %.invoke
  %storemerge = mul nsw i32 %97, %93
  store i32 %storemerge, ptr %1, align 4, !tbaa !5
  call void @_ZN7glslang5TTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %10) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %10) #5
  br label %102

101:                                              ; preds = %86
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.14, i32 noundef 2248, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7glslang13TIntermediate18getScalarAlignmentERKNS_5TTypeERiS4_b) #6
  unreachable

102:                                              ; preds = %100, %78, %71, %._crit_edge, %24
  %.0 = phi i32 [ %16, %24 ], [ %40, %._crit_edge ], [ %72, %71 ], [ %79, %78 ], [ %92, %100 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  ret i32 %.0

103:                                              ; preds = %98, %29
  %.pn58 = phi { ptr, i32 } [ %30, %29 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn58
}

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


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