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

; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>::_Alloc_hider" = type { %"class.glslang::pool_allocator.14", ptr }
%"class.glslang::pool_allocator.14" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.glslang::TSampler" = type { i32 }
%"struct.glslang::TParameter" = type { ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.350 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.351 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.352 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.353 = external hidden unnamed_addr constant [124 x i8], align 1
@.str.354 = external hidden unnamed_addr constant [78 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7glslang5TType18getBasicTypeStringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(144)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang8TSampler9isTextureEv(ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7glslang13TParseContext30constructorTextureSamplerErrorERKNS_10TSourceLocERKNS_9TFunctionE(ptr noundef nonnull align 8 dereferenceable(24912) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(328) %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.glslang::TSampler", align 4
  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
  %14 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #4
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds ptr, ptr %16, i64 12
  %18 = load ptr, ptr %17, align 8
  %19 = call noundef nonnull align 8 dereferenceable(144) ptr %18(ptr noundef nonnull align 8 dereferenceable(328) %15)
  call void @_ZNK7glslang5TType18getBasicTypeStringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(144) %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %20 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  store ptr %20, ptr %9, align 8, !tbaa !5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds ptr, ptr %22, i64 36
  %24 = load ptr, ptr %23, align 8
  %25 = invoke noundef i32 %24(ptr noundef nonnull align 8 dereferenceable(328) %21)
          to label %26 unwind label %35

26:                                               ; preds = %3
  %27 = icmp ne i32 %25, 2
  br i1 %27, label %28, label %39

28:                                               ; preds = %26
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %14, align 8, !tbaa !9
  %32 = getelementptr inbounds ptr, ptr %31, i64 42
  %33 = load ptr, ptr %32, align 8
  invoke void (ptr, ptr, ptr, ptr, ptr, ...) %33(ptr noundef nonnull align 8 dereferenceable(1176) %14, ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef @.str.350, ptr noundef %30, ptr noundef @.str.2)
          to label %34 unwind label %35

34:                                               ; preds = %28
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %206

35:                                               ; preds = %103, %95, %89, %86, %79, %73, %64, %58, %51, %45, %39, %28, %3
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %10, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %11, align 4
  br label %208

39:                                               ; preds = %26
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds ptr, ptr %41, i64 12
  %43 = load ptr, ptr %42, align 8
  %44 = invoke noundef nonnull align 8 dereferenceable(144) ptr %43(ptr noundef nonnull align 8 dereferenceable(328) %40)
          to label %45 unwind label %35

45:                                               ; preds = %39
  %46 = load ptr, ptr %44, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %46, i64 29
  %48 = load ptr, ptr %47, align 8
  %49 = invoke noundef zeroext i1 %48(ptr noundef nonnull align 8 dereferenceable(144) %44)
          to label %50 unwind label %35

50:                                               ; preds = %45
  br i1 %49, label %51, label %58

51:                                               ; preds = %50
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load ptr, ptr %14, align 8, !tbaa !9
  %55 = getelementptr inbounds ptr, ptr %54, i64 42
  %56 = load ptr, ptr %55, align 8
  invoke void (ptr, ptr, ptr, ptr, ptr, ...) %56(ptr noundef nonnull align 8 dereferenceable(1176) %14, ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef @.str.351, ptr noundef %53, ptr noundef @.str.2)
          to label %57 unwind label %35

57:                                               ; preds = %51
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %206

58:                                               ; preds = %50
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = load ptr, ptr %59, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %60, i64 40
  %62 = load ptr, ptr %61, align 8
  %63 = invoke noundef nonnull align 8 dereferenceable(24) ptr %62(ptr noundef nonnull align 8 dereferenceable(328) %59, i32 noundef 0)
          to label %64 unwind label %35

64:                                               ; preds = %58
  %65 = getelementptr inbounds %"struct.glslang::TParameter", ptr %63, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds ptr, ptr %67, i64 7
  %69 = load ptr, ptr %68, align 8
  %70 = invoke noundef i32 %69(ptr noundef nonnull align 8 dereferenceable(144) %66)
          to label %71 unwind label %35

71:                                               ; preds = %64
  %72 = icmp ne i32 %70, 14
  br i1 %72, label %103, label %73

73:                                               ; preds = %71
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds ptr, ptr %75, i64 40
  %77 = load ptr, ptr %76, align 8
  %78 = invoke noundef nonnull align 8 dereferenceable(24) ptr %77(ptr noundef nonnull align 8 dereferenceable(328) %74, i32 noundef 0)
          to label %79 unwind label %35

79:                                               ; preds = %73
  %80 = getelementptr inbounds %"struct.glslang::TParameter", ptr %78, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = getelementptr inbounds ptr, ptr %82, i64 9
  %84 = load ptr, ptr %83, align 8
  %85 = invoke noundef nonnull align 4 dereferenceable(4) ptr %84(ptr noundef nonnull align 8 dereferenceable(144) %81)
          to label %86 unwind label %35

86:                                               ; preds = %79
  %87 = invoke noundef zeroext i1 @_ZNK7glslang8TSampler9isTextureEv(ptr noundef nonnull align 4 dereferenceable(4) %85)
          to label %88 unwind label %35

88:                                               ; preds = %86
  br i1 %87, label %89, label %103

89:                                               ; preds = %88
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load ptr, ptr %90, align 8, !tbaa !9
  %92 = getelementptr inbounds ptr, ptr %91, i64 40
  %93 = load ptr, ptr %92, align 8
  %94 = invoke noundef nonnull align 8 dereferenceable(24) ptr %93(ptr noundef nonnull align 8 dereferenceable(328) %90, i32 noundef 0)
          to label %95 unwind label %35

95:                                               ; preds = %89
  %96 = getelementptr inbounds %"struct.glslang::TParameter", ptr %94, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !11
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds ptr, ptr %98, i64 29
  %100 = load ptr, ptr %99, align 8
  %101 = invoke noundef zeroext i1 %100(ptr noundef nonnull align 8 dereferenceable(144) %97)
          to label %102 unwind label %35

102:                                              ; preds = %95
  br i1 %101, label %103, label %110

103:                                              ; preds = %102, %88, %71
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load ptr, ptr %14, align 8, !tbaa !9
  %107 = getelementptr inbounds ptr, ptr %106, i64 42
  %108 = load ptr, ptr %107, align 8
  invoke void (ptr, ptr, ptr, ptr, ptr, ...) %108(ptr noundef nonnull align 8 dereferenceable(1176) %14, ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef @.str.352, ptr noundef %105, ptr noundef @.str.2)
          to label %109 unwind label %35

109:                                              ; preds = %103
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %206

110:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load ptr, ptr %111, align 8, !tbaa !9
  %113 = getelementptr inbounds ptr, ptr %112, i64 12
  %114 = load ptr, ptr %113, align 8
  %115 = invoke noundef nonnull align 8 dereferenceable(144) ptr %114(ptr noundef nonnull align 8 dereferenceable(328) %111)
          to label %116 unwind label %148

116:                                              ; preds = %110
  %117 = load ptr, ptr %115, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %117, i64 8
  %119 = load ptr, ptr %118, align 8
  %120 = invoke noundef nonnull align 4 dereferenceable(4) ptr %119(ptr noundef nonnull align 8 dereferenceable(144) %115)
          to label %121 unwind label %148

121:                                              ; preds = %116
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %120, i64 4, i1 false), !tbaa.struct !13
  invoke void @_ZN7glslang8TSampler11setCombinedEb(ptr noundef nonnull align 4 dereferenceable(4) %13, i1 noundef zeroext false)
          to label %122 unwind label %148

122:                                              ; preds = %121
  %123 = load i32, ptr %13, align 4
  %124 = and i32 %123, -131073
  %125 = or i32 %124, 0
  store i32 %125, ptr %13, align 4
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  %128 = getelementptr inbounds ptr, ptr %127, i64 40
  %129 = load ptr, ptr %128, align 8
  %130 = invoke noundef nonnull align 8 dereferenceable(24) ptr %129(ptr noundef nonnull align 8 dereferenceable(328) %126, i32 noundef 0)
          to label %131 unwind label %148

131:                                              ; preds = %122
  %132 = getelementptr inbounds %"struct.glslang::TParameter", ptr %130, i32 0, i32 1
  %133 = load ptr, ptr %132, align 8, !tbaa !11
  %134 = load ptr, ptr %133, align 8, !tbaa !9
  %135 = getelementptr inbounds ptr, ptr %134, i64 9
  %136 = load ptr, ptr %135, align 8
  %137 = invoke noundef nonnull align 4 dereferenceable(4) ptr %136(ptr noundef nonnull align 8 dereferenceable(144) %133)
          to label %138 unwind label %148

138:                                              ; preds = %131
  %139 = invoke noundef zeroext i1 @_ZNK7glslang8TSamplerneERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %137)
          to label %140 unwind label %148

140:                                              ; preds = %138
  br i1 %139, label %141, label %152

141:                                              ; preds = %140
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = load ptr, ptr %14, align 8, !tbaa !9
  %145 = getelementptr inbounds ptr, ptr %144, i64 42
  %146 = load ptr, ptr %145, align 8
  invoke void (ptr, ptr, ptr, ptr, ptr, ...) %146(ptr noundef nonnull align 8 dereferenceable(1176) %14, ptr noundef nonnull align 8 dereferenceable(24) %142, ptr noundef @.str.353, ptr noundef %143, ptr noundef @.str.2)
          to label %147 unwind label %148

147:                                              ; preds = %141
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %205

148:                                              ; preds = %197, %189, %183, %180, %173, %167, %158, %152, %141, %138, %131, %122, %121, %116, %110
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %10, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %208

152:                                              ; preds = %140
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = load ptr, ptr %153, align 8, !tbaa !9
  %155 = getelementptr inbounds ptr, ptr %154, i64 40
  %156 = load ptr, ptr %155, align 8
  %157 = invoke noundef nonnull align 8 dereferenceable(24) ptr %156(ptr noundef nonnull align 8 dereferenceable(328) %153, i32 noundef 1)
          to label %158 unwind label %148

158:                                              ; preds = %152
  %159 = getelementptr inbounds %"struct.glslang::TParameter", ptr %157, i32 0, i32 1
  %160 = load ptr, ptr %159, align 8, !tbaa !11
  %161 = load ptr, ptr %160, align 8, !tbaa !9
  %162 = getelementptr inbounds ptr, ptr %161, i64 7
  %163 = load ptr, ptr %162, align 8
  %164 = invoke noundef i32 %163(ptr noundef nonnull align 8 dereferenceable(144) %160)
          to label %165 unwind label %148

165:                                              ; preds = %158
  %166 = icmp ne i32 %164, 14
  br i1 %166, label %197, label %167

167:                                              ; preds = %165
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = load ptr, ptr %168, align 8, !tbaa !9
  %170 = getelementptr inbounds ptr, ptr %169, i64 40
  %171 = load ptr, ptr %170, align 8
  %172 = invoke noundef nonnull align 8 dereferenceable(24) ptr %171(ptr noundef nonnull align 8 dereferenceable(328) %168, i32 noundef 1)
          to label %173 unwind label %148

173:                                              ; preds = %167
  %174 = getelementptr inbounds %"struct.glslang::TParameter", ptr %172, i32 0, i32 1
  %175 = load ptr, ptr %174, align 8, !tbaa !11
  %176 = load ptr, ptr %175, align 8, !tbaa !9
  %177 = getelementptr inbounds ptr, ptr %176, i64 9
  %178 = load ptr, ptr %177, align 8
  %179 = invoke noundef nonnull align 4 dereferenceable(4) ptr %178(ptr noundef nonnull align 8 dereferenceable(144) %175)
          to label %180 unwind label %148

180:                                              ; preds = %173
  %181 = invoke noundef zeroext i1 @_ZNK7glslang8TSampler13isPureSamplerEv(ptr noundef nonnull align 4 dereferenceable(4) %179)
          to label %182 unwind label %148

182:                                              ; preds = %180
  br i1 %181, label %183, label %197

183:                                              ; preds = %182
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = load ptr, ptr %184, align 8, !tbaa !9
  %186 = getelementptr inbounds ptr, ptr %185, i64 40
  %187 = load ptr, ptr %186, align 8
  %188 = invoke noundef nonnull align 8 dereferenceable(24) ptr %187(ptr noundef nonnull align 8 dereferenceable(328) %184, i32 noundef 1)
          to label %189 unwind label %148

189:                                              ; preds = %183
  %190 = getelementptr inbounds %"struct.glslang::TParameter", ptr %188, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !11
  %192 = load ptr, ptr %191, align 8, !tbaa !9
  %193 = getelementptr inbounds ptr, ptr %192, i64 29
  %194 = load ptr, ptr %193, align 8
  %195 = invoke noundef zeroext i1 %194(ptr noundef nonnull align 8 dereferenceable(144) %191)
          to label %196 unwind label %148

196:                                              ; preds = %189
  br i1 %195, label %197, label %204

197:                                              ; preds = %196, %182, %165
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = load ptr, ptr %9, align 8, !tbaa !5
  %200 = load ptr, ptr %14, align 8, !tbaa !9
  %201 = getelementptr inbounds ptr, ptr %200, i64 42
  %202 = load ptr, ptr %201, align 8
  invoke void (ptr, ptr, ptr, ptr, ptr, ...) %202(ptr noundef nonnull align 8 dereferenceable(1176) %14, ptr noundef nonnull align 8 dereferenceable(24) %198, ptr noundef @.str.354, ptr noundef %199, ptr noundef @.str.2)
          to label %203 unwind label %148

203:                                              ; preds = %197
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %205

204:                                              ; preds = %196
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %205

205:                                              ; preds = %204, %203, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %206

206:                                              ; preds = %205, %109, %57, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #4
  %207 = load i1, ptr %4, align 1
  ret i1 %207

208:                                              ; preds = %148, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #4
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %10, align 8
  %211 = load i32, ptr %11, align 4
  %212 = insertvalue { ptr, i32 } poison, ptr %210, 0
  %213 = insertvalue { ptr, i32 } %212, i32 %211, 1
  resume { ptr, i32 } %213
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7glslang8TSampler11setCombinedEb(ptr noundef nonnull align 4 dereferenceable(4), i1 noundef zeroext) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang8TSamplerneERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang8TSampler13isPureSamplerEv(ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

!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, !6, i64 8}
!12 = !{!"_ZTSN7glslang10TParameterE", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{i64 0, i64 4, !14}
!14 = !{!7, !7, i64 0}


; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>::_Alloc_hider" = type { %"class.glslang::pool_allocator.14", ptr }
%"class.glslang::pool_allocator.14" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.glslang::TSampler" = type { i32 }

@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.350 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.351 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.352 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.353 = external hidden unnamed_addr constant [124 x i8], align 1
@.str.354 = external hidden unnamed_addr constant [78 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7glslang5TType18getBasicTypeStringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7glslang13TParseContext30constructorTextureSamplerErrorERKNS_10TSourceLocERKNS_9TFunctionE(ptr noundef nonnull align 8 dereferenceable(24912) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(328) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"struct.glslang::TSampler", align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #3
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 96
  %8 = load ptr, ptr %7, align 8
  %9 = tail call noundef nonnull align 8 dereferenceable(144) ptr %8(ptr noundef nonnull align 8 dereferenceable(328) %2)
  call void @_ZNK7glslang5TType18getBasicTypeStringB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(144) %9)
  %10 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(40) %4) #3
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 288
  %13 = load ptr, ptr %12, align 8
  %14 = invoke noundef i32 %13(ptr noundef nonnull align 8 dereferenceable(328) %2)
          to label %15 unwind label %16

15:                                               ; preds = %3
  %.not = icmp eq i32 %14, 2
  br i1 %.not, label %18, label %.invoke

16:                                               ; preds = %.invoke, %61, %56, %47, %42, %34, %29, %23, %18, %3
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %149

18:                                               ; preds = %15
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 96
  %21 = load ptr, ptr %20, align 8
  %22 = invoke noundef nonnull align 8 dereferenceable(144) ptr %21(ptr noundef nonnull align 8 dereferenceable(328) %2)
          to label %23 unwind label %16

23:                                               ; preds = %18
  %24 = load ptr, ptr %22, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 232
  %26 = load ptr, ptr %25, align 8
  %27 = invoke noundef zeroext i1 %26(ptr noundef nonnull align 8 dereferenceable(144) %22)
          to label %28 unwind label %16

28:                                               ; preds = %23
  br i1 %27, label %.invoke, label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 320
  %32 = load ptr, ptr %31, align 8
  %33 = invoke noundef nonnull align 8 dereferenceable(24) ptr %32(ptr noundef nonnull align 8 dereferenceable(328) %2, i32 noundef 0)
          to label %34 unwind label %16

34:                                               ; preds = %29
  %35 = getelementptr inbounds i8, ptr %33, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !8
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 56
  %39 = load ptr, ptr %38, align 8
  %40 = invoke noundef i32 %39(ptr noundef nonnull align 8 dereferenceable(144) %36)
          to label %41 unwind label %16

41:                                               ; preds = %34
  %.not26 = icmp eq i32 %40, 14
  br i1 %.not26, label %42, label %.invoke

42:                                               ; preds = %41
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 320
  %45 = load ptr, ptr %44, align 8
  %46 = invoke noundef nonnull align 8 dereferenceable(24) ptr %45(ptr noundef nonnull align 8 dereferenceable(328) %2, i32 noundef 0)
          to label %47 unwind label %16

47:                                               ; preds = %42
  %48 = getelementptr inbounds i8, ptr %46, i64 8
  %49 = load ptr, ptr %48, align 8, !tbaa !8
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i64 72
  %52 = load ptr, ptr %51, align 8
  %53 = invoke noundef nonnull align 4 dereferenceable(4) ptr %52(ptr noundef nonnull align 8 dereferenceable(144) %49)
          to label %54 unwind label %16

54:                                               ; preds = %47
  %55 = call noundef zeroext i1 @_ZNK7glslang8TSampler9isTextureEv(ptr noundef nonnull align 4 dereferenceable(4) %53)
  br i1 %55, label %56, label %.invoke

56:                                               ; preds = %54
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %57, i64 320
  %59 = load ptr, ptr %58, align 8
  %60 = invoke noundef nonnull align 8 dereferenceable(24) ptr %59(ptr noundef nonnull align 8 dereferenceable(328) %2, i32 noundef 0)
          to label %61 unwind label %16

61:                                               ; preds = %56
  %62 = getelementptr inbounds i8, ptr %60, i64 8
  %63 = load ptr, ptr %62, align 8, !tbaa !8
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %64, i64 232
  %66 = load ptr, ptr %65, align 8
  %67 = invoke noundef zeroext i1 %66(ptr noundef nonnull align 8 dereferenceable(144) %63)
          to label %68 unwind label %16

68:                                               ; preds = %61
  br i1 %67, label %.invoke, label %73

.invoke:                                          ; preds = %41, %54, %68, %28, %15
  %69 = phi ptr [ @.str.350, %15 ], [ @.str.351, %28 ], [ @.str.352, %68 ], [ @.str.352, %54 ], [ @.str.352, %41 ]
  %70 = load ptr, ptr %0, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 336
  %72 = load ptr, ptr %71, align 8
  invoke void (ptr, ptr, ptr, ptr, ptr, ...) %72(ptr noundef nonnull align 8 dereferenceable(1176) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull %69, ptr noundef %10, ptr noundef nonnull @.str.2)
          to label %148 unwind label %16

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %74, i64 96
  %76 = load ptr, ptr %75, align 8
  %77 = invoke noundef nonnull align 8 dereferenceable(144) ptr %76(ptr noundef nonnull align 8 dereferenceable(328) %2)
          to label %78 unwind label %101

78:                                               ; preds = %73
  %79 = load ptr, ptr %77, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 64
  %81 = load ptr, ptr %80, align 8
  %82 = invoke noundef nonnull align 4 dereferenceable(4) ptr %81(ptr noundef nonnull align 8 dereferenceable(144) %77)
          to label %83 unwind label %101

83:                                               ; preds = %78
  %84 = load i32, ptr %82, align 4, !tbaa !12
  store i32 %84, ptr %5, align 4, !tbaa !12
  call void @_ZN7glslang8TSampler11setCombinedEb(ptr noundef nonnull align 4 dereferenceable(4) %5, i1 noundef zeroext false)
  %85 = load i32, ptr %5, align 4
  %86 = and i32 %85, -131073
  store i32 %86, ptr %5, align 4
  %87 = load ptr, ptr %2, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i64 320
  %89 = load ptr, ptr %88, align 8
  %90 = invoke noundef nonnull align 8 dereferenceable(24) ptr %89(ptr noundef nonnull align 8 dereferenceable(328) %2, i32 noundef 0)
          to label %91 unwind label %101

91:                                               ; preds = %83
  %92 = getelementptr inbounds i8, ptr %90, i64 8
  %93 = load ptr, ptr %92, align 8, !tbaa !8
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 72
  %96 = load ptr, ptr %95, align 8
  %97 = invoke noundef nonnull align 4 dereferenceable(4) ptr %96(ptr noundef nonnull align 8 dereferenceable(144) %93)
          to label %98 unwind label %101

98:                                               ; preds = %91
  %99 = invoke noundef zeroext i1 @_ZNK7glslang8TSamplerneERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %97)
          to label %100 unwind label %101

100:                                              ; preds = %98
  br i1 %99, label %.invoke30, label %103

101:                                              ; preds = %.invoke30, %135, %130, %121, %116, %108, %103, %98, %91, %83, %78, %73
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  br label %149

103:                                              ; preds = %100
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i64 320
  %106 = load ptr, ptr %105, align 8
  %107 = invoke noundef nonnull align 8 dereferenceable(24) ptr %106(ptr noundef nonnull align 8 dereferenceable(328) %2, i32 noundef 1)
          to label %108 unwind label %101

108:                                              ; preds = %103
  %109 = getelementptr inbounds i8, ptr %107, i64 8
  %110 = load ptr, ptr %109, align 8, !tbaa !8
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %111, i64 56
  %113 = load ptr, ptr %112, align 8
  %114 = invoke noundef i32 %113(ptr noundef nonnull align 8 dereferenceable(144) %110)
          to label %115 unwind label %101

115:                                              ; preds = %108
  %.not27 = icmp eq i32 %114, 14
  br i1 %.not27, label %116, label %.invoke30

116:                                              ; preds = %115
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 320
  %119 = load ptr, ptr %118, align 8
  %120 = invoke noundef nonnull align 8 dereferenceable(24) ptr %119(ptr noundef nonnull align 8 dereferenceable(328) %2, i32 noundef 1)
          to label %121 unwind label %101

121:                                              ; preds = %116
  %122 = getelementptr inbounds i8, ptr %120, i64 8
  %123 = load ptr, ptr %122, align 8, !tbaa !8
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i64 72
  %126 = load ptr, ptr %125, align 8
  %127 = invoke noundef nonnull align 4 dereferenceable(4) ptr %126(ptr noundef nonnull align 8 dereferenceable(144) %123)
          to label %128 unwind label %101

128:                                              ; preds = %121
  %129 = call noundef zeroext i1 @_ZNK7glslang8TSampler13isPureSamplerEv(ptr noundef nonnull align 4 dereferenceable(4) %127)
  br i1 %129, label %130, label %.invoke30

130:                                              ; preds = %128
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %131, i64 320
  %133 = load ptr, ptr %132, align 8
  %134 = invoke noundef nonnull align 8 dereferenceable(24) ptr %133(ptr noundef nonnull align 8 dereferenceable(328) %2, i32 noundef 1)
          to label %135 unwind label %101

135:                                              ; preds = %130
  %136 = getelementptr inbounds i8, ptr %134, i64 8
  %137 = load ptr, ptr %136, align 8, !tbaa !8
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i64 232
  %140 = load ptr, ptr %139, align 8
  %141 = invoke noundef zeroext i1 %140(ptr noundef nonnull align 8 dereferenceable(144) %137)
          to label %142 unwind label %101

142:                                              ; preds = %135
  br i1 %141, label %.invoke30, label %147

.invoke30:                                        ; preds = %115, %128, %142, %100
  %143 = phi ptr [ @.str.353, %100 ], [ @.str.354, %142 ], [ @.str.354, %128 ], [ @.str.354, %115 ]
  %144 = load ptr, ptr %0, align 8, !tbaa !5
  %145 = getelementptr inbounds i8, ptr %144, i64 336
  %146 = load ptr, ptr %145, align 8
  invoke void (ptr, ptr, ptr, ptr, ptr, ...) %146(ptr noundef nonnull align 8 dereferenceable(1176) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull %143, ptr noundef %10, ptr noundef nonnull @.str.2)
          to label %147 unwind label %101

147:                                              ; preds = %.invoke30, %142
  %.025 = phi i1 [ false, %142 ], [ true, %.invoke30 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  br label %148

148:                                              ; preds = %.invoke, %147
  %.1 = phi i1 [ %.025, %147 ], [ true, %.invoke ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  ret i1 %.1

149:                                              ; preds = %101, %16
  %.pn = phi { ptr, i32 } [ %17, %16 ], [ %102, %101 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7glslang8TSampler11setCombinedEb(ptr noundef nonnull align 4 dereferenceable(4), i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang8TSamplerneERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!9, !10, i64 8}
!9 = !{!"_ZTSN7glslang10TParameterE", !10, i64 0, !10, i64 8, !10, i64 16}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!11, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass