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

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

%"struct.glslang::TVarEntryInfo" = type { i64, ptr, i8, i32, i32, i32, i32, i32, i32 }
%"struct.glslang::TDefaultIoResolverBase" = type { %"class.glslang::TIoMapResolver", %"class.std::unordered_map", i8, ptr, i32, i32, i32, [15 x i8], [14 x ptr] }
%"class.glslang::TIoMapResolver" = type { ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.glslang::SpvVersion" = type <{ i32, i32, i32, i32, i8, [3 x i8] }>
%"struct.glslang::TTypeLoc" = type { ptr, %"struct.glslang::TSourceLoc" }
%"struct.glslang::TSourceLoc" = type { ptr, i32, i32, i32 }

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang22TDefaultIoResolverBase21doAutoLocationMappingEv(ptr noundef nonnull align 8 dereferenceable(224)) #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: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang22TDefaultIoResolverBase22resolveUniformLocationE11EShLanguageRNS_13TVarEntryInfoE(ptr noundef nonnull align 8 dereferenceable(224) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(48) %2) unnamed_addr #0 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %13 = load ptr, ptr %7, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.glslang::TVarEntryInfo", ptr %13, i32 0, i32 1
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds ptr, ptr %16, i64 30
  %18 = load ptr, ptr %17, align 8
  %19 = call noundef nonnull align 8 dereferenceable(144) ptr %18(ptr noundef nonnull align 8 dereferenceable(176) %15)
  store ptr %19, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.glslang::TVarEntryInfo", ptr %20, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %24 = getelementptr inbounds ptr, ptr %23, i64 51
  %25 = load ptr, ptr %24, align 8
  %26 = call noundef nonnull align 8 dereferenceable(40) ptr %25(ptr noundef nonnull align 8 dereferenceable(256) %22)
  %27 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(40) %26) #4
  store ptr %27, ptr %9, align 8, !tbaa !5
  %28 = call noundef zeroext i1 @_ZNK7glslang22TDefaultIoResolverBase21doAutoLocationMappingEv(ptr noundef nonnull align 8 dereferenceable(224) %12)
  br i1 %28, label %32, label %29

29:                                               ; preds = %3
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.glslang::TVarEntryInfo", ptr %30, i32 0, i32 5
  store i32 -1, ptr %31, align 4, !tbaa !18
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %125

32:                                               ; preds = %3
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = getelementptr inbounds ptr, ptr %34, i64 11
  %36 = load ptr, ptr %35, align 8
  %37 = call noundef nonnull align 8 dereferenceable(72) ptr %36(ptr noundef nonnull align 8 dereferenceable(144) %33)
  %38 = call noundef zeroext i1 @_ZNK7glslang10TQualifier11hasLocationEv(ptr noundef nonnull align 8 dereferenceable(72) %37)
  br i1 %38, label %71, label %39

39:                                               ; preds = %32
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = getelementptr inbounds ptr, ptr %41, i64 39
  %43 = load ptr, ptr %42, align 8
  %44 = call noundef zeroext i1 %43(ptr noundef nonnull align 8 dereferenceable(144) %40)
  br i1 %44, label %71, label %45

45:                                               ; preds = %39
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  %48 = getelementptr inbounds ptr, ptr %47, i64 7
  %49 = load ptr, ptr %48, align 8
  %50 = call noundef i32 %49(ptr noundef nonnull align 8 dereferenceable(144) %46)
  %51 = icmp eq i32 %50, 16
  br i1 %51, label %71, label %52

52:                                               ; preds = %45
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZNK7glslang5TType8isAtomicEv(ptr noundef nonnull align 8 dereferenceable(144) %53)
  br i1 %54, label %71, label %55

55:                                               ; preds = %52
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZNK7glslang5TType11isSpirvTypeEv(ptr noundef nonnull align 8 dereferenceable(144) %56)
  br i1 %57, label %71, label %58

58:                                               ; preds = %55
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load ptr, ptr %59, align 8, !tbaa !16
  %61 = getelementptr inbounds ptr, ptr %60, i64 49
  %62 = load ptr, ptr %61, align 8
  %63 = call noundef zeroext i1 %62(ptr noundef nonnull align 8 dereferenceable(144) %59)
  br i1 %63, label %64, label %74

64:                                               ; preds = %58
  %65 = getelementptr inbounds %"struct.glslang::TDefaultIoResolverBase", ptr %12, i32 0, i32 3
  %66 = load ptr, ptr %65, align 8, !tbaa !19
  %67 = call noundef nonnull align 4 dereferenceable(17) ptr @_ZNK7glslang13TIntermediate6getSpvEv(ptr noundef nonnull align 8 dereferenceable(1784) %66)
  %68 = getelementptr inbounds %"struct.glslang::SpvVersion", ptr %67, i32 0, i32 3
  %69 = load i32, ptr %68, align 4, !tbaa !28
  %70 = icmp eq i32 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %64, %55, %52, %45, %39, %32
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.glslang::TVarEntryInfo", ptr %72, i32 0, i32 5
  store i32 -1, ptr %73, align 4, !tbaa !18
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %125

74:                                               ; preds = %64, %58
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  %77 = getelementptr inbounds ptr, ptr %76, i64 35
  %78 = load ptr, ptr %77, align 8
  %79 = call noundef zeroext i1 %78(ptr noundef nonnull align 8 dereferenceable(144) %75)
  br i1 %79, label %80, label %102

80:                                               ; preds = %74
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %81)
  %83 = call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %82) #4
  %84 = icmp ult i64 %83, 1
  br i1 %84, label %85, label %88

85:                                               ; preds = %80
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.glslang::TVarEntryInfo", ptr %86, i32 0, i32 5
  store i32 -1, ptr %87, align 4, !tbaa !18
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %125

88:                                               ; preds = %80
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %89)
  %91 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %90, i64 noundef 0) #4
  %92 = getelementptr inbounds %"struct.glslang::TTypeLoc", ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !30
  %94 = load ptr, ptr %93, align 8, !tbaa !16
  %95 = getelementptr inbounds ptr, ptr %94, i64 39
  %96 = load ptr, ptr %95, align 8
  %97 = call noundef zeroext i1 %96(ptr noundef nonnull align 8 dereferenceable(144) %93)
  br i1 %97, label %98, label %101

98:                                               ; preds = %88
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.glslang::TVarEntryInfo", ptr %99, i32 0, i32 5
  store i32 -1, ptr %100, align 4, !tbaa !18
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %125

101:                                              ; preds = %88
  br label %102

102:                                              ; preds = %101, %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %103 = getelementptr inbounds %"struct.glslang::TDefaultIoResolverBase", ptr %12, i32 0, i32 3
  %104 = load ptr, ptr %103, align 8, !tbaa !19
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = call noundef i32 @_ZNK7glslang13TIntermediate26getUniformLocationOverrideEPKc(ptr noundef nonnull align 8 dereferenceable(1784) %104, ptr noundef %105)
  store i32 %106, ptr %11, align 4, !tbaa !33
  %107 = load i32, ptr %11, align 4, !tbaa !33
  %108 = icmp ne i32 %107, -1
  br i1 %108, label %109, label %113

109:                                              ; preds = %102
  %110 = load i32, ptr %11, align 4, !tbaa !33
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.glslang::TVarEntryInfo", ptr %111, i32 0, i32 5
  store i32 %110, ptr %112, align 4, !tbaa !18
  store i32 %110, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %124

113:                                              ; preds = %102
  %114 = getelementptr inbounds %"struct.glslang::TDefaultIoResolverBase", ptr %12, i32 0, i32 4
  %115 = load i32, ptr %114, align 8, !tbaa !34
  store i32 %115, ptr %11, align 4, !tbaa !33
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = call noundef i32 @_ZN7glslang13TIntermediate30computeTypeUniformLocationSizeERKNS_5TTypeE(ptr noundef nonnull align 8 dereferenceable(144) %116)
  %118 = getelementptr inbounds %"struct.glslang::TDefaultIoResolverBase", ptr %12, i32 0, i32 4
  %119 = load i32, ptr %118, align 8, !tbaa !34
  %120 = add nsw i32 %119, %117
  store i32 %120, ptr %118, align 8, !tbaa !34
  %121 = load i32, ptr %11, align 4, !tbaa !33
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.glslang::TVarEntryInfo", ptr %122, i32 0, i32 5
  store i32 %121, ptr %123, align 4, !tbaa !18
  store i32 %121, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %124

124:                                              ; preds = %113, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %125

125:                                              ; preds = %124, %98, %85, %71, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %126 = load i32, ptr %4, align 4
  ret i32 %126
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang5TType11isSpirvTypeEv(ptr noundef nonnull align 8 dereferenceable(144)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(17) ptr @_ZNK7glslang13TIntermediate6getSpvEv(ptr noundef nonnull align 8 dereferenceable(1784)) #2 align 2

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

; 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 noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7glslang13TIntermediate26getUniformLocationOverrideEPKc(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef) #0 align 2

declare noundef i32 @_ZN7glslang13TIntermediate30computeTypeUniformLocationSizeERKNS_5TTypeE(ptr noundef nonnull align 8 dereferenceable(144)) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!"_ZTS11EShLanguage", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN7glslang13TVarEntryInfoE", !13, i64 0, !6, i64 8, !14, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !10, i64 40}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = !{!12, !15, i64 28}
!19 = !{!20, !6, i64 72}
!20 = !{!"_ZTSN7glslang22TDefaultIoResolverBaseE", !21, i64 0, !22, i64 8, !14, i64 64, !6, i64 72, !15, i64 80, !15, i64 84, !15, i64 88, !7, i64 92, !7, i64 112}
!21 = !{!"_ZTSN7glslang14TIoMapResolverE"}
!22 = !{!"_ZTSSt13unordered_mapIiSt6vectorIiSaIiEESt4hashIiESt8equal_toIiESaISt4pairIKiS2_EEE", !23, i64 0}
!23 = !{!"_ZTSSt10_HashtableIiSt4pairIKiSt6vectorIiSaIiEEESaIS5_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !24, i64 8, !25, i64 16, !24, i64 24, !26, i64 32, !6, i64 48}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!26 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !27, i64 0, !24, i64 8}
!27 = !{!"float", !7, i64 0}
!28 = !{!29, !15, i64 12}
!29 = !{!"_ZTSN7glslang10SpvVersionE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !14, i64 16}
!30 = !{!31, !6, i64 0}
!31 = !{!"_ZTSN7glslang8TTypeLocE", !6, i64 0, !32, i64 8}
!32 = !{!"_ZTSN7glslang10TSourceLocE", !6, i64 0, !15, i64 8, !15, i64 12, !15, i64 16}
!33 = !{!15, !15, i64 0}
!34 = !{!20, !15, i64 80}


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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang22TDefaultIoResolverBase21doAutoLocationMappingEv(ptr noundef nonnull align 8 dereferenceable(224)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang22TDefaultIoResolverBase22resolveUniformLocationE11EShLanguageRNS_13TVarEntryInfoE(ptr noundef nonnull align 8 dereferenceable(224) %0, i32 noundef %1, ptr nocapture noundef nonnull align 8 dereferenceable(48) %2) unnamed_addr #0 align 2 {
  %4 = getelementptr inbounds i8, ptr %2, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %5, align 8, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %6, i64 240
  %8 = load ptr, ptr %7, align 8
  %9 = tail call noundef nonnull align 8 dereferenceable(144) ptr %8(ptr noundef nonnull align 8 dereferenceable(176) %5)
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %10, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %11, i64 408
  %13 = load ptr, ptr %12, align 8
  %14 = tail call noundef nonnull align 8 dereferenceable(40) ptr %13(ptr noundef nonnull align 8 dereferenceable(256) %10)
  %15 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(40) %14) #3
  %16 = tail call noundef zeroext i1 @_ZNK7glslang22TDefaultIoResolverBase21doAutoLocationMappingEv(ptr noundef nonnull align 8 dereferenceable(224) %0)
  br i1 %16, label %17, label %77

17:                                               ; preds = %3
  %18 = load ptr, ptr %9, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %18, i64 88
  %20 = load ptr, ptr %19, align 8
  %21 = tail call noundef nonnull align 8 dereferenceable(72) ptr %20(ptr noundef nonnull align 8 dereferenceable(144) %9)
  %22 = tail call noundef zeroext i1 @_ZNK7glslang10TQualifier11hasLocationEv(ptr noundef nonnull align 8 dereferenceable(72) %21)
  br i1 %22, label %77, label %23

23:                                               ; preds = %17
  %24 = load ptr, ptr %9, align 8, !tbaa !14
  %25 = getelementptr inbounds i8, ptr %24, i64 312
  %26 = load ptr, ptr %25, align 8
  %27 = tail call noundef zeroext i1 %26(ptr noundef nonnull align 8 dereferenceable(144) %9)
  br i1 %27, label %77, label %28

28:                                               ; preds = %23
  %29 = load ptr, ptr %9, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %29, i64 56
  %31 = load ptr, ptr %30, align 8
  %32 = tail call noundef i32 %31(ptr noundef nonnull align 8 dereferenceable(144) %9)
  %33 = icmp eq i32 %32, 16
  br i1 %33, label %77, label %34

34:                                               ; preds = %28
  %35 = tail call noundef zeroext i1 @_ZNK7glslang5TType8isAtomicEv(ptr noundef nonnull align 8 dereferenceable(144) %9)
  br i1 %35, label %77, label %36

36:                                               ; preds = %34
  %37 = tail call noundef zeroext i1 @_ZNK7glslang5TType11isSpirvTypeEv(ptr noundef nonnull align 8 dereferenceable(144) %9)
  br i1 %37, label %77, label %38

38:                                               ; preds = %36
  %39 = load ptr, ptr %9, align 8, !tbaa !14
  %40 = getelementptr inbounds i8, ptr %39, i64 392
  %41 = load ptr, ptr %40, align 8
  %42 = tail call noundef zeroext i1 %41(ptr noundef nonnull align 8 dereferenceable(144) %9)
  br i1 %42, label %43, label %50

43:                                               ; preds = %38
  %44 = getelementptr inbounds i8, ptr %0, i64 72
  %45 = load ptr, ptr %44, align 8, !tbaa !16
  %46 = tail call noundef nonnull align 4 dereferenceable(17) ptr @_ZNK7glslang13TIntermediate6getSpvEv(ptr noundef nonnull align 8 dereferenceable(1784) %45)
  %47 = getelementptr inbounds i8, ptr %46, i64 12
  %48 = load i32, ptr %47, align 4, !tbaa !25
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %77, label %50

50:                                               ; preds = %43, %38
  %51 = load ptr, ptr %9, align 8, !tbaa !14
  %52 = getelementptr inbounds i8, ptr %51, i64 280
  %53 = load ptr, ptr %52, align 8
  %54 = tail call noundef zeroext i1 %53(ptr noundef nonnull align 8 dereferenceable(144) %9)
  br i1 %54, label %55, label %67

55:                                               ; preds = %50
  %56 = tail call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %9)
  %57 = tail call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %56) #3
  %58 = icmp eq i64 %57, 0
  br i1 %58, label %77, label %59

59:                                               ; preds = %55
  %60 = tail call noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144) %9)
  %61 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %60, i64 noundef 0) #3
  %62 = load ptr, ptr %61, align 8, !tbaa !27
  %63 = load ptr, ptr %62, align 8, !tbaa !14
  %64 = getelementptr inbounds i8, ptr %63, i64 312
  %65 = load ptr, ptr %64, align 8
  %66 = tail call noundef zeroext i1 %65(ptr noundef nonnull align 8 dereferenceable(144) %62)
  br i1 %66, label %77, label %67

67:                                               ; preds = %59, %50
  %68 = getelementptr inbounds i8, ptr %0, i64 72
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = tail call noundef i32 @_ZNK7glslang13TIntermediate26getUniformLocationOverrideEPKc(ptr noundef nonnull align 8 dereferenceable(1784) %69, ptr noundef %15)
  %.not = icmp eq i32 %70, -1
  br i1 %.not, label %71, label %77

71:                                               ; preds = %67
  %72 = getelementptr inbounds i8, ptr %0, i64 80
  %73 = load i32, ptr %72, align 8, !tbaa !30
  %74 = tail call noundef i32 @_ZN7glslang13TIntermediate30computeTypeUniformLocationSizeERKNS_5TTypeE(ptr noundef nonnull align 8 dereferenceable(144) %9)
  %75 = load i32, ptr %72, align 8, !tbaa !30
  %76 = add nsw i32 %75, %74
  store i32 %76, ptr %72, align 8, !tbaa !30
  br label %77

77:                                               ; preds = %67, %59, %55, %17, %23, %28, %34, %36, %43, %3, %71
  %.sink = phi i32 [ %73, %71 ], [ -1, %3 ], [ -1, %43 ], [ -1, %36 ], [ -1, %34 ], [ -1, %28 ], [ -1, %23 ], [ -1, %17 ], [ -1, %55 ], [ -1, %59 ], [ %70, %67 ]
  %78 = getelementptr inbounds i8, ptr %2, i64 28
  store i32 %.sink, ptr %78, align 4, !tbaa !31
  ret i32 %.sink
}

; 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 #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7glslang5TType11isSpirvTypeEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(17) ptr @_ZNK7glslang13TIntermediate6getSpvEv(ptr noundef nonnull align 8 dereferenceable(1784)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7glslang5TType9getStructEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #0 align 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 #1 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 #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7glslang13TIntermediate26getUniformLocationOverrideEPKc(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef) local_unnamed_addr #0 align 2

declare noundef i32 @_ZN7glslang13TIntermediate30computeTypeUniformLocationSizeERKNS_5TTypeE(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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, !10, i64 8}
!6 = !{!"_ZTSN7glslang13TVarEntryInfoE", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !13, i64 40}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTS11EShLanguage", !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !9, i64 0}
!16 = !{!17, !10, i64 72}
!17 = !{!"_ZTSN7glslang22TDefaultIoResolverBaseE", !18, i64 0, !19, i64 8, !11, i64 64, !10, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !8, i64 92, !8, i64 112}
!18 = !{!"_ZTSN7glslang14TIoMapResolverE"}
!19 = !{!"_ZTSSt13unordered_mapIiSt6vectorIiSaIiEESt4hashIiESt8equal_toIiESaISt4pairIKiS2_EEE", !20, i64 0}
!20 = !{!"_ZTSSt10_HashtableIiSt4pairIKiSt6vectorIiSaIiEEESaIS5_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb0ELb0ELb1EEEE", !10, i64 0, !21, i64 8, !22, i64 16, !21, i64 24, !23, i64 32, !10, i64 48}
!21 = !{!"long", !8, i64 0}
!22 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !10, i64 0}
!23 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !24, i64 0, !21, i64 8}
!24 = !{!"float", !8, i64 0}
!25 = !{!26, !12, i64 12}
!26 = !{!"_ZTSN7glslang10SpvVersionE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !11, i64 16}
!27 = !{!28, !10, i64 0}
!28 = !{!"_ZTSN7glslang8TTypeLocE", !10, i64 0, !29, i64 8}
!29 = !{!"_ZTSN7glslang10TSourceLocE", !10, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!30 = !{!17, !12, i64 80}
!31 = !{!6, !12, i64 28}


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