; 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.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 }>
%"struct.glslang::TTypeLoc" = type { ptr, %"struct.glslang::TSourceLoc" }
%"struct.glslang::TSourceLoc" = type { ptr, i32, i32, i32 }
%"class.glslang::TParseVersions" = type { ptr, i8, i32, ptr, i32, i32, %"struct.glslang::SpvVersion", ptr, %"class.glslang::TMap", %"class.glslang::TMap.0", i32, i32, ptr }
%"struct.glslang::SpvVersion" = type <{ i32, i32, i32, i32, i8, [3 x i8] }>
%"class.glslang::TMap" = type { %"class.std::map" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, glslang::TExtensionBehavior>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, glslang::TExtensionBehavior>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>>, glslang::pool_allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, glslang::TExtensionBehavior>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, glslang::TExtensionBehavior>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, glslang::TExtensionBehavior>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>>, glslang::pool_allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, glslang::TExtensionBehavior>>>::_Rb_tree_impl" = type { %"class.glslang::pool_allocator", [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.glslang::pool_allocator" = type { ptr }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.glslang::TMap.0" = type { %"class.std::map.1" }
%"class.std::map.1" = type { %"class.std::_Rb_tree.2" }
%"class.std::_Rb_tree.2" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, unsigned int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, unsigned int>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>>, glslang::pool_allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, unsigned int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, unsigned int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, unsigned int>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>>, glslang::pool_allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, unsigned int>>>::_Rb_tree_impl" = type { %"class.glslang::pool_allocator.3", [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.glslang::pool_allocator.3" = type { ptr }

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7glslang13TParseContext13fixXfbOffsetsERNS_10TQualifierERNS_7TVectorINS_8TTypeLocEEE(ptr noundef nonnull align 8 dereferenceable(24912) %0, ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbBufferEv(ptr noundef nonnull align 8 dereferenceable(72) %15)
  br i1 %16, label %17, label %20

17:                                               ; preds = %3
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbOffsetEv(ptr noundef nonnull align 8 dereferenceable(72) %18)
  br i1 %19, label %21, label %20

20:                                               ; preds = %17, %3
  br label %101

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.glslang::TQualifier", ptr %22, i32 0, i32 7
  %24 = load i64, ptr %23, align 4
  %25 = lshr i64 %24, 18
  %26 = and i64 %25, 8191
  %27 = trunc i64 %26 to i32
  store i32 %27, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %92, %21
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %31) #4
  %33 = icmp ult i64 %30, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %95

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %36, i64 noundef %38) #4
  %40 = getelementptr inbounds %"struct.glslang::TTypeLoc", ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  %43 = getelementptr inbounds ptr, ptr %42, i64 10
  %44 = load ptr, ptr %43, align 8
  %45 = call noundef nonnull align 8 dereferenceable(72) ptr %44(ptr noundef nonnull align 8 dereferenceable(144) %41)
  store ptr %45, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  store i8 0, ptr %10, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  store i8 0, ptr %11, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  store i8 0, ptr %12, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %46 = getelementptr inbounds %"class.glslang::TParseVersions", ptr %14, i32 0, i32 7
  %47 = load ptr, ptr %46, align 8, !tbaa !18
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = zext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %48, i64 noundef %50) #4
  %52 = getelementptr inbounds %"struct.glslang::TTypeLoc", ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = call noundef i32 @_ZNK7glslang13TIntermediate18computeTypeXfbSizeERKNS_5TTypeERbS4_S4_(ptr noundef nonnull align 8 dereferenceable(1784) %47, ptr noundef nonnull align 8 dereferenceable(144) %53, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
  store i32 %54, ptr %13, align 4, !tbaa !9
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbOffsetEv(ptr noundef nonnull align 8 dereferenceable(72) %55)
  br i1 %56, label %81, label %57

57:                                               ; preds = %35
  %58 = load i8, ptr %10, align 1, !tbaa !16, !range !40, !noundef !41
  %59 = trunc i8 %58 to i1
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  call void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef 8)
  br label %71

61:                                               ; preds = %57
  %62 = load i8, ptr %11, align 1, !tbaa !16, !range !40, !noundef !41
  %63 = trunc i8 %62 to i1
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  call void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef 4)
  br label %70

65:                                               ; preds = %61
  %66 = load i8, ptr %12, align 1, !tbaa !16, !range !40, !noundef !41
  %67 = trunc i8 %66 to i1
  br i1 %67, label %68, label %69

68:                                               ; preds = %65
  call void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef 2)
  br label %69

69:                                               ; preds = %68, %65
  br label %70

70:                                               ; preds = %69, %64
  br label %71

71:                                               ; preds = %70, %60
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.glslang::TQualifier", ptr %73, i32 0, i32 7
  %75 = zext i32 %72 to i64
  %76 = load i64, ptr %74, align 4
  %77 = and i64 %75, 8191
  %78 = shl i64 %77, 18
  %79 = and i64 %76, -2147221505
  %80 = or i64 %79, %78
  store i64 %80, ptr %74, align 4
  br label %88

81:                                               ; preds = %35
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.glslang::TQualifier", ptr %82, i32 0, i32 7
  %84 = load i64, ptr %83, align 4
  %85 = lshr i64 %84, 18
  %86 = and i64 %85, 8191
  %87 = trunc i64 %86 to i32
  store i32 %87, ptr %7, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %81, %71
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = load i32, ptr %7, align 4, !tbaa !9
  %91 = add nsw i32 %90, %89
  store i32 %91, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %92

92:                                               ; preds = %88
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = add i32 %93, 1
  store i32 %94, ptr %8, align 4, !tbaa !9
  br label %28, !llvm.loop !42

95:                                               ; preds = %34
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %"class.glslang::TQualifier", ptr %96, i32 0, i32 7
  %98 = load i64, ptr %97, align 4
  %99 = and i64 %98, -2147221505
  %100 = or i64 %99, 2147221504
  store i64 %100, ptr %97, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %101

101:                                              ; preds = %95, %20
  ret void
}

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

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

declare noundef i32 @_ZNK7glslang13TIntermediate18computeTypeXfbSizeERKNS_5TTypeERbS4_S4_(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN7glslang8TTypeLocE", !6, i64 0, !13, i64 8}
!13 = !{!"_ZTSN7glslang10TSourceLocE", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !6, i64 56}
!19 = !{!"_ZTSN7glslang14TParseVersionsE", !17, i64 8, !20, i64 12, !6, i64 16, !10, i64 24, !21, i64 28, !22, i64 32, !6, i64 56, !23, i64 64, !34, i64 120, !39, i64 176, !10, i64 180, !6, i64 184}
!20 = !{!"_ZTS8EProfile", !7, i64 0}
!21 = !{!"_ZTS11EShLanguage", !7, i64 0}
!22 = !{!"_ZTSN7glslang10SpvVersionE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !17, i64 16}
!23 = !{!"_ZTSN7glslang4TMapINSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEENS_18TExtensionBehaviorESt4lessIS7_EEE", !24, i64 0}
!24 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEENS4_18TExtensionBehaviorESt4lessIS7_ENS5_ISt4pairIKS7_S8_EEEE", !25, i64 0}
!25 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEESt4pairIKS7_NS4_18TExtensionBehaviorEESt10_Select1stISB_ESt4lessIS7_ENS5_ISB_EEE", !26, i64 0}
!26 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEESt4pairIKS7_NS4_18TExtensionBehaviorEESt10_Select1stISB_ESt4lessIS7_ENS5_ISB_EEE13_Rb_tree_implISF_Lb1EEE", !27, i64 0, !28, i64 8, !30, i64 16}
!27 = !{!"_ZTSN7glslang14pool_allocatorISt13_Rb_tree_nodeISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_IcEEEENS_18TExtensionBehaviorEEEEE", !6, i64 0}
!28 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEEEE", !29, i64 0}
!29 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEEE"}
!30 = !{!"_ZTSSt15_Rb_tree_header", !31, i64 0, !33, i64 32}
!31 = !{!"_ZTSSt18_Rb_tree_node_base", !32, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!32 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!33 = !{!"long", !7, i64 0}
!34 = !{!"_ZTSN7glslang4TMapINSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEEjSt4lessIS7_EEE", !35, i64 0}
!35 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEEjSt4lessIS7_ENS5_ISt4pairIKS7_jEEEE", !36, i64 0}
!36 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEESt4pairIKS7_jESt10_Select1stISA_ESt4lessIS7_ENS5_ISA_EEE", !37, i64 0}
!37 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEESt4pairIKS7_jESt10_Select1stISA_ESt4lessIS7_ENS5_ISA_EEE13_Rb_tree_implISE_Lb1EEE", !38, i64 0, !28, i64 8, !30, i64 16}
!38 = !{!"_ZTSN7glslang14pool_allocatorISt13_Rb_tree_nodeISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_IcEEEEjEEEE", !6, i64 0}
!39 = !{!"_ZTS11EShMessages", !7, i64 0}
!40 = !{i8 0, i8 2}
!41 = !{}
!42 = distinct !{!42, !43}
!43 = !{!"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"

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

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

; 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 zeroext i1 @_ZNK7glslang10TQualifier12hasXfbBufferEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7glslang13TParseContext13fixXfbOffsetsERNS_10TQualifierERNS_7TVectorINS_8TTypeLocEEE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(24912) %0, ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #2 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  %8 = tail call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbBufferEv(ptr noundef nonnull align 8 dereferenceable(72) %1)
  br i1 %8, label %9, label %65

9:                                                ; preds = %3
  %10 = tail call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbOffsetEv(ptr noundef nonnull align 8 dereferenceable(72) %1)
  br i1 %10, label %11, label %65

11:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %12 = getelementptr inbounds i8, ptr %1, i64 36
  %13 = load i64, ptr %12, align 4
  %14 = trunc i64 %13 to i32
  %15 = lshr i32 %14, 18
  %16 = and i32 %15, 8191
  store i32 %16, ptr %4, align 4, !tbaa !5
  %17 = tail call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %11
  %18 = getelementptr inbounds i8, ptr %0, i64 56
  br label %21

._crit_edge:                                      ; preds = %58, %11
  %19 = load i64, ptr %12, align 4
  %20 = or i64 %19, 2147221504
  store i64 %20, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %65

21:                                               ; preds = %.lr.ph, %58
  %22 = phi i64 [ 0, %.lr.ph ], [ %62, %58 ]
  %.016 = phi i32 [ 0, %.lr.ph ], [ %61, %58 ]
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %22) #4
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = getelementptr inbounds i8, ptr %25, i64 80
  %27 = load ptr, ptr %26, align 8
  %28 = call noundef nonnull align 8 dereferenceable(72) ptr %27(ptr noundef nonnull align 8 dereferenceable(144) %24)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  store i8 0, ptr %5, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  store i8 0, ptr %6, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  store i8 0, ptr %7, align 1, !tbaa !15
  %29 = load ptr, ptr %18, align 8, !tbaa !17
  %30 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %22) #4
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call noundef i32 @_ZNK7glslang13TIntermediate18computeTypeXfbSizeERKNS_5TTypeERbS4_S4_(ptr noundef nonnull align 8 dereferenceable(1784) %29, ptr noundef nonnull align 8 dereferenceable(144) %31, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
  %33 = call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbOffsetEv(ptr noundef nonnull align 8 dereferenceable(72) %28)
  br i1 %33, label %52, label %34

34:                                               ; preds = %21
  %35 = load i8, ptr %5, align 1, !tbaa !15, !range !39, !noundef !40
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %.sink.split, label %37

37:                                               ; preds = %34
  %38 = load i8, ptr %6, align 1, !tbaa !15, !range !39, !noundef !40
  %39 = trunc nuw i8 %38 to i1
  br i1 %39, label %.sink.split, label %40

40:                                               ; preds = %37
  %41 = load i8, ptr %7, align 1, !tbaa !15, !range !39, !noundef !40
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %.sink.split, label %43

.sink.split:                                      ; preds = %40, %37, %34
  %.sink = phi i32 [ 8, %34 ], [ 4, %37 ], [ 2, %40 ]
  call void @_ZN7glslang11RoundToPow2IiEEvRT_i(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %.sink)
  br label %43

43:                                               ; preds = %.sink.split, %40
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %28, i64 36
  %46 = load i64, ptr %45, align 4
  %47 = shl i32 %44, 18
  %48 = and i32 %47, 2147221504
  %49 = zext nneg i32 %48 to i64
  %50 = and i64 %46, -2147221505
  %51 = or disjoint i64 %50, %49
  store i64 %51, ptr %45, align 4
  br label %58

52:                                               ; preds = %21
  %53 = getelementptr inbounds i8, ptr %28, i64 36
  %54 = load i64, ptr %53, align 4
  %55 = trunc i64 %54 to i32
  %56 = lshr i32 %55, 18
  %57 = and i32 %56, 8191
  br label %58

58:                                               ; preds = %52, %43
  %59 = phi i32 [ %57, %52 ], [ %44, %43 ]
  %60 = add nsw i32 %59, %32
  store i32 %60, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  %61 = add i32 %.016, 1
  %62 = zext i32 %61 to i64
  %63 = call noundef i64 @_ZNKSt6vectorIN7glslang8TTypeLocENS0_14pool_allocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  %64 = icmp ugt i64 %63, %62
  br i1 %64, label %21, label %._crit_edge, !llvm.loop !41

65:                                               ; preds = %3, %9, %._crit_edge
  ret void
}

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

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

declare noundef i32 @_ZNK7glslang13TIntermediate18computeTypeXfbSizeERKNS_5TTypeERbS4_S4_(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN7glslang8TTypeLocE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"_ZTSN7glslang10TSourceLocE", !11, i64 0, !6, i64 8, !6, i64 12, !6, i64 16}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!18, !11, i64 56}
!18 = !{!"_ZTSN7glslang14TParseVersionsE", !16, i64 8, !19, i64 12, !11, i64 16, !6, i64 24, !20, i64 28, !21, i64 32, !11, i64 56, !22, i64 64, !33, i64 120, !38, i64 176, !6, i64 180, !11, i64 184}
!19 = !{!"_ZTS8EProfile", !7, i64 0}
!20 = !{!"_ZTS11EShLanguage", !7, i64 0}
!21 = !{!"_ZTSN7glslang10SpvVersionE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !16, i64 16}
!22 = !{!"_ZTSN7glslang4TMapINSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEENS_18TExtensionBehaviorESt4lessIS7_EEE", !23, i64 0}
!23 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEENS4_18TExtensionBehaviorESt4lessIS7_ENS5_ISt4pairIKS7_S8_EEEE", !24, i64 0}
!24 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEESt4pairIKS7_NS4_18TExtensionBehaviorEESt10_Select1stISB_ESt4lessIS7_ENS5_ISB_EEE", !25, i64 0}
!25 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEESt4pairIKS7_NS4_18TExtensionBehaviorEESt10_Select1stISB_ESt4lessIS7_ENS5_ISB_EEE13_Rb_tree_implISF_Lb1EEE", !26, i64 0, !27, i64 8, !29, i64 16}
!26 = !{!"_ZTSN7glslang14pool_allocatorISt13_Rb_tree_nodeISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_IcEEEENS_18TExtensionBehaviorEEEEE", !11, i64 0}
!27 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEEEE", !28, i64 0}
!28 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEEE"}
!29 = !{!"_ZTSSt15_Rb_tree_header", !30, i64 0, !32, i64 32}
!30 = !{!"_ZTSSt18_Rb_tree_node_base", !31, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!31 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!32 = !{!"long", !7, i64 0}
!33 = !{!"_ZTSN7glslang4TMapINSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEEjSt4lessIS7_EEE", !34, i64 0}
!34 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEEjSt4lessIS7_ENS5_ISt4pairIKS7_jEEEE", !35, i64 0}
!35 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEESt4pairIKS7_jESt10_Select1stISA_ESt4lessIS7_ENS5_ISA_EEE", !36, i64 0}
!36 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEESt4pairIKS7_jESt10_Select1stISA_ESt4lessIS7_ENS5_ISA_EEE13_Rb_tree_implISE_Lb1EEE", !37, i64 0, !27, i64 8, !29, i64 16}
!37 = !{!"_ZTSN7glslang14pool_allocatorISt13_Rb_tree_nodeISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_IcEEEEjEEEE", !11, i64 0}
!38 = !{!"_ZTS11EShMessages", !7, i64 0}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass