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

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

%"struct.glslang::TRange" = type { i32, i32 }
%"class.glslang::TIntermediate" = type { i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::list", i32, i32, %"struct.glslang::SpvVersion", ptr, %"class.std::set", %"class.glslang::MustBeAssigned", i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, [3 x i32], [3 x i8], [3 x i32], i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32, i32, ptr, ptr, i32, i8, i32, i32, i32, i32, i8, i8, i8, i32, i32, i32, i8, i8, i8, i32, i8, i32, i8, %"class.std::vector", i8, i8, i8, i32, i32, i32, i32, i8, %"struct.std::array", %"struct.std::array.9", %"class.std::vector.15", i8, i8, i8, i8, i8, i8, i8, %"class.std::set.20", i32, i8, i8, i8, i8, ptr, ptr, %"class.std::unordered_map", i32, %"class.glslang::TNumericFeatures", %"class.std::unordered_map.31", %"class.std::unordered_set", %"class.std::vector.64", [4 x %"class.std::vector.69"], [2 x %"class.std::vector.74"], %"class.std::set.20", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::map.79", %"class.glslang::TProcesses" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<glslang::TCall, std::allocator<glslang::TCall>>::_List_impl" }
%"struct.std::__cxx11::_List_base<glslang::TCall, std::allocator<glslang::TCall>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"struct.glslang::SpvVersion" = type <{ i32, i32, i32, i32, i8, [3 x i8] }>
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"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::MustBeAssigned" = type <{ %struct.TBuiltInResource, i8, [3 x i8] }>
%struct.TBuiltInResource = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.TLimits }
%struct.TLimits = type { i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<glslang::TXfbBuffer, std::allocator<glslang::TXfbBuffer>>::_Vector_impl" }
%"struct.std::_Vector_base<glslang::TXfbBuffer, std::allocator<glslang::TXfbBuffer>>::_Vector_impl" = type { %"struct.std::_Vector_base<glslang::TXfbBuffer, std::allocator<glslang::TXfbBuffer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glslang::TXfbBuffer, std::allocator<glslang::TXfbBuffer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::array" = type { [6 x i32] }
%"struct.std::array.9" = type { [6 x %"class.std::map"] }
%"class.std::map" = type { %"class.std::_Rb_tree.10" }
%"class.std::_Rb_tree.10" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, 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 }
%"class.glslang::TNumericFeatures" = type { i32 }
%"class.std::unordered_map.31" = type { %"class.std::_Hashtable.32" }
%"class.std::_Hashtable.32" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.45" }
%"class.std::_Hashtable.45" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.64" = type { %"struct.std::_Vector_base.65" }
%"struct.std::_Vector_base.65" = type { %"struct.std::_Vector_base<glslang::TOffsetRange, std::allocator<glslang::TOffsetRange>>::_Vector_impl" }
%"struct.std::_Vector_base<glslang::TOffsetRange, std::allocator<glslang::TOffsetRange>>::_Vector_impl" = type { %"struct.std::_Vector_base<glslang::TOffsetRange, std::allocator<glslang::TOffsetRange>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glslang::TOffsetRange, std::allocator<glslang::TOffsetRange>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.69" = type { %"struct.std::_Vector_base.70" }
%"struct.std::_Vector_base.70" = type { %"struct.std::_Vector_base<glslang::TIoRange, std::allocator<glslang::TIoRange>>::_Vector_impl" }
%"struct.std::_Vector_base<glslang::TIoRange, std::allocator<glslang::TIoRange>>::_Vector_impl" = type { %"struct.std::_Vector_base<glslang::TIoRange, std::allocator<glslang::TIoRange>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glslang::TIoRange, std::allocator<glslang::TIoRange>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.74" = type { %"struct.std::_Vector_base.75" }
%"struct.std::_Vector_base.75" = type { %"struct.std::_Vector_base<glslang::TRange, std::allocator<glslang::TRange>>::_Vector_impl" }
%"struct.std::_Vector_base<glslang::TRange, std::allocator<glslang::TRange>>::_Vector_impl" = type { %"struct.std::_Vector_base<glslang::TRange, std::allocator<glslang::TRange>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glslang::TRange, std::allocator<glslang::TRange>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set.20" = type { %"class.std::_Rb_tree.21" }
%"class.std::_Rb_tree.21" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, std::_Identity<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>, std::_Identity<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char>>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::map.79" = type { %"class.std::_Rb_tree.80" }
%"class.std::_Rb_tree.80" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.glslang::TProcesses" = type { %"class.std::vector.15" }
%"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::TXfbBuffer" = type <{ %"class.std::vector.74", i32, i32, i8, i8, i8, [5 x i8] }>

@.str.14 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [53 x i8], align 1
@__PRETTY_FUNCTION__._ZN7glslang13TIntermediate18addXfbBufferOffsetERKNS_5TTypeE = external hidden unnamed_addr constant [62 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(35) ptr @_ZNSt6vectorIN7glslang10TXfbBufferESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN7glslang6TRangeESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN7glslang6TRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang13TIntermediate18addXfbBufferOffsetERKNS_5TTypeE(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef nonnull align 8 dereferenceable(144) %1) #4 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.glslang::TRange", align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = getelementptr inbounds ptr, ptr %15, i64 11
  %17 = load ptr, ptr %16, align 8
  %18 = call noundef nonnull align 8 dereferenceable(72) ptr %17(ptr noundef nonnull align 8 dereferenceable(144) %14)
  store ptr %18, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbOffsetEv(ptr noundef nonnull align 8 dereferenceable(72) %19)
  br i1 %20, label %21, label %24

21:                                               ; preds = %2
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbBufferEv(ptr noundef nonnull align 8 dereferenceable(72) %22)
  br label %24

24:                                               ; preds = %21, %2
  %25 = phi i1 [ false, %2 ], [ %23, %21 ]
  br i1 %25, label %26, label %27

26:                                               ; preds = %24
  br label %29

27:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.130, ptr noundef @.str.14, i32 noundef 1880, ptr noundef @__PRETTY_FUNCTION__._ZN7glslang13TIntermediate18addXfbBufferOffsetERKNS_5TTypeE) #6
  unreachable

28:                                               ; No predecessors!
  br label %29

29:                                               ; preds = %28, %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %30 = getelementptr inbounds %"class.glslang::TIntermediate", ptr %13, i32 0, i32 51
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.glslang::TQualifier", ptr %31, i32 0, i32 7
  %33 = load i64, ptr %32, align 4
  %34 = and i64 %33, 15
  %35 = trunc i64 %34 to i32
  %36 = zext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(35) ptr @_ZNSt6vectorIN7glslang10TXfbBufferESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %36) #5
  store ptr %37, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %39, i32 0, i32 3
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %43, i32 0, i32 5
  %45 = call noundef i32 @_ZNK7glslang13TIntermediate18computeTypeXfbSizeERKNS_5TTypeERbS4_S4_(ptr noundef nonnull align 8 dereferenceable(1784) %13, ptr noundef nonnull align 8 dereferenceable(144) %38, ptr noundef nonnull align 1 dereferenceable(1) %40, ptr noundef nonnull align 1 dereferenceable(1) %42, ptr noundef nonnull align 1 dereferenceable(1) %44)
  store i32 %45, ptr %8, align 4, !tbaa !11
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %46, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.glslang::TQualifier", ptr %48, i32 0, i32 7
  %50 = load i64, ptr %49, align 4
  %51 = lshr i64 %50, 18
  %52 = and i64 %51, 8191
  %53 = trunc i64 %52 to i32
  %54 = load i32, ptr %8, align 4, !tbaa !11
  %55 = add i32 %53, %54
  store i32 %55, ptr %9, align 4, !tbaa !11
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %47, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %57 = load i32, ptr %56, align 4, !tbaa !11
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %58, i32 0, i32 2
  store i32 %57, ptr %59, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.glslang::TQualifier", ptr %60, i32 0, i32 7
  %62 = load i64, ptr %61, align 4
  %63 = lshr i64 %62, 18
  %64 = and i64 %63, 8191
  %65 = trunc i64 %64 to i32
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.glslang::TQualifier", ptr %66, i32 0, i32 7
  %68 = load i64, ptr %67, align 4
  %69 = lshr i64 %68, 18
  %70 = and i64 %69, 8191
  %71 = trunc i64 %70 to i32
  %72 = load i32, ptr %8, align 4, !tbaa !11
  %73 = add i32 %71, %72
  %74 = sub i32 %73, 1
  call void @_ZN7glslang6TRangeC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %10, i32 noundef %65, i32 noundef %74)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !20
  br label %75

75:                                               ; preds = %98, %29
  %76 = load i64, ptr %11, align 8, !tbaa !20
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %77, i32 0, i32 0
  %79 = call noundef i64 @_ZNKSt6vectorIN7glslang6TRangeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #5
  %80 = icmp ult i64 %76, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %75
  store i32 2, ptr %12, align 4
  br label %101

82:                                               ; preds = %75
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %83, i32 0, i32 0
  %85 = load i64, ptr %11, align 8, !tbaa !20
  %86 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN7glslang6TRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %85) #5
  %87 = call noundef zeroext i1 @_ZNK7glslang6TRange7overlapERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %86)
  br i1 %87, label %88, label %97

88:                                               ; preds = %82
  %89 = getelementptr inbounds %"struct.glslang::TRange", ptr %10, i32 0, i32 0
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %90, i32 0, i32 0
  %92 = load i64, ptr %11, align 8, !tbaa !20
  %93 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN7glslang6TRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %92) #5
  %94 = getelementptr inbounds %"struct.glslang::TRange", ptr %93, i32 0, i32 0
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %89, ptr noundef nonnull align 4 dereferenceable(4) %94)
  %96 = load i32, ptr %95, align 4, !tbaa !11
  store i32 %96, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %101

97:                                               ; preds = %82
  br label %98

98:                                               ; preds = %97
  %99 = load i64, ptr %11, align 8, !tbaa !20
  %100 = add i64 %99, 1
  store i64 %100, ptr %11, align 8, !tbaa !20
  br label %75, !llvm.loop !22

101:                                              ; preds = %88, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %102 = load i32, ptr %12, align 4
  switch i32 %102, label %106 [
    i32 2, label %103
  ]

103:                                              ; preds = %101
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.glslang::TXfbBuffer", ptr %104, i32 0, i32 0
  call void @_ZNSt6vectorIN7glslang6TRangeESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %105, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %106

106:                                              ; preds = %103, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %107 = load i32, ptr %3, align 4
  ret i32 %107
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local 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)) #4 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 28}
!14 = !{!"_ZTSN7glslang10TXfbBufferE", !15, i64 0, !12, i64 24, !12, i64 28, !19, i64 32, !19, i64 33, !19, i64 34}
!15 = !{!"_ZTSSt6vectorIN7glslang6TRangeESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN7glslang6TRangeESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN7glslang6TRangeESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN7glslang6TRangeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"bool", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"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"

%"struct.glslang::TRange" = type { i32, i32 }

@.str.14 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [53 x i8], align 1
@__PRETTY_FUNCTION__._ZN7glslang13TIntermediate18addXfbBufferOffsetERKNS_5TTypeE = external hidden unnamed_addr constant [62 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(35) ptr @_ZNSt6vectorIN7glslang10TXfbBufferESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN7glslang6TRangeESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN7glslang6TRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang13TIntermediate18addXfbBufferOffsetERKNS_5TTypeE(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef nonnull align 8 dereferenceable(144) %1) local_unnamed_addr #4 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca %"struct.glslang::TRange", align 4
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 88
  %7 = load ptr, ptr %6, align 8
  %8 = tail call noundef nonnull align 8 dereferenceable(72) ptr %7(ptr noundef nonnull align 8 dereferenceable(144) %1)
  %9 = tail call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbOffsetEv(ptr noundef nonnull align 8 dereferenceable(72) %8)
  br i1 %9, label %10, label %.critedge

10:                                               ; preds = %2
  %11 = tail call noundef zeroext i1 @_ZNK7glslang10TQualifier12hasXfbBufferEv(ptr noundef nonnull align 8 dereferenceable(72) %8)
  br i1 %11, label %12, label %.critedge

.critedge:                                        ; preds = %2, %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.130, ptr noundef nonnull @.str.14, i32 noundef 1880, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7glslang13TIntermediate18addXfbBufferOffsetERKNS_5TTypeE) #5
  unreachable

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %0, i64 792
  %14 = getelementptr inbounds i8, ptr %8, i64 36
  %15 = load i64, ptr %14, align 4
  %16 = and i64 %15, 15
  %17 = tail call noundef nonnull align 8 dereferenceable(35) ptr @_ZNSt6vectorIN7glslang10TXfbBufferESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %16) #6
  %18 = getelementptr inbounds i8, ptr %17, i64 32
  %19 = getelementptr inbounds i8, ptr %17, i64 33
  %20 = getelementptr inbounds i8, ptr %17, i64 34
  %21 = tail call noundef i32 @_ZNK7glslang13TIntermediate18computeTypeXfbSizeERKNS_5TTypeERbS4_S4_(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef nonnull align 1 dereferenceable(1) %19, ptr noundef nonnull align 1 dereferenceable(1) %20)
  %22 = getelementptr inbounds i8, ptr %17, i64 28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %23 = load i64, ptr %14, align 4
  %24 = trunc i64 %23 to i32
  %25 = lshr i32 %24, 18
  %26 = and i32 %25, 8191
  %27 = add i32 %26, %21
  store i32 %27, ptr %3, align 4, !tbaa !8
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %29 = load i32, ptr %28, align 4, !tbaa !8
  store i32 %29, ptr %22, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %30 = load i64, ptr %14, align 4
  %31 = trunc i64 %30 to i32
  %32 = lshr i32 %31, 18
  %33 = and i32 %32, 8191
  %34 = add i32 %21, -1
  %35 = add i32 %34, %33
  call void @_ZN7glslang6TRangeC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %4, i32 noundef %33, i32 noundef %35)
  %36 = call noundef i64 @_ZNKSt6vectorIN7glslang6TRangeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %.not29.not = icmp eq i64 %36, 0
  br i1 %.not29.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %12, %42
  %.02530 = phi i64 [ %43, %42 ], [ 0, %12 ]
  %37 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN7glslang6TRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %.02530) #6
  %38 = call noundef zeroext i1 @_ZNK7glslang6TRange7overlapERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %37)
  br i1 %38, label %.thread, label %42

.thread:                                          ; preds = %.lr.ph
  %39 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN7glslang6TRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %.02530) #6
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %41 = load i32, ptr %40, align 4, !tbaa !8
  br label %45

42:                                               ; preds = %.lr.ph
  %43 = add nuw i64 %.02530, 1
  %44 = call noundef i64 @_ZNKSt6vectorIN7glslang6TRangeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %.not = icmp ult i64 %43, %44
  br i1 %.not, label %.lr.ph, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %42, %12
  call void @_ZNSt6vectorIN7glslang6TRangeESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(8) %4)
  br label %45

45:                                               ; preds = %.thread, %._crit_edge
  %.1 = phi i32 [ -1, %._crit_edge ], [ %41, %.thread ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  ret i32 %.1
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local 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 #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !9, i64 28}
!12 = !{!"_ZTSN7glslang10TXfbBufferE", !13, i64 0, !9, i64 24, !9, i64 28, !18, i64 32, !18, i64 33, !18, i64 34}
!13 = !{!"_ZTSSt6vectorIN7glslang6TRangeESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN7glslang6TRangeESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN7glslang6TRangeESaIS1_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN7glslang6TRangeESaIS1_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !10, i64 0}
!18 = !{!"bool", !10, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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