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

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

%"class.glslang::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" }
%"struct.glslang::TIoRange" = type { %"struct.glslang::TRange", %"struct.glslang::TRange", i32, i32 }
%"struct.glslang::TRange" = type { i32, i32 }

; 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: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang13TIntermediate18checkLocationRangeEiRKNS_8TIoRangeERKNS_5TTypeERb(ptr noundef nonnull align 8 dereferenceable(1784) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(144) %3, ptr noundef nonnull align 1 dereferenceable(1) %4) #2 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %14 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %15

15:                                               ; preds = %90, %5
  %16 = load i64, ptr %12, align 8, !tbaa !11
  %17 = getelementptr inbounds %"class.glslang::TIntermediate", ptr %14, i32 0, i32 84
  %18 = load i32, ptr %8, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [4 x %"class.std::vector.69"], ptr %17, i64 0, i64 %19
  %21 = call noundef i64 @_ZNKSt6vectorIN7glslang8TIoRangeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  %22 = icmp ult i64 %16, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %15
  store i32 2, ptr %13, align 4
  br label %93

24:                                               ; preds = %15
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds %"class.glslang::TIntermediate", ptr %14, i32 0, i32 84
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [4 x %"class.std::vector.69"], ptr %26, i64 0, i64 %28
  %30 = load i64, ptr %12, align 8, !tbaa !11
  %31 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %30) #4
  %32 = call noundef zeroext i1 @_ZNK7glslang8TIoRange7overlapERKS0_(ptr noundef nonnull align 4 dereferenceable(24) %25, ptr noundef nonnull align 4 dereferenceable(24) %31)
  br i1 %32, label %33, label %47

33:                                               ; preds = %24
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.glslang::TIoRange", ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds %"struct.glslang::TRange", ptr %35, i32 0, i32 0
  %37 = getelementptr inbounds %"class.glslang::TIntermediate", ptr %14, i32 0, i32 84
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [4 x %"class.std::vector.69"], ptr %37, i64 0, i64 %39
  %41 = load i64, ptr %12, align 8, !tbaa !11
  %42 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #4
  %43 = getelementptr inbounds %"struct.glslang::TIoRange", ptr %42, i32 0, i32 0
  %44 = getelementptr inbounds %"struct.glslang::TRange", ptr %43, i32 0, i32 0
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %44)
  %46 = load i32, ptr %45, align 4, !tbaa !9
  store i32 %46, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %93

47:                                               ; preds = %24
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.glslang::TIoRange", ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds %"class.glslang::TIntermediate", ptr %14, i32 0, i32 84
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [4 x %"class.std::vector.69"], ptr %50, i64 0, i64 %52
  %54 = load i64, ptr %12, align 8, !tbaa !11
  %55 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %54) #4
  %56 = getelementptr inbounds %"struct.glslang::TIoRange", ptr %55, i32 0, i32 0
  %57 = call noundef zeroext i1 @_ZNK7glslang6TRange7overlapERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %49, ptr noundef nonnull align 4 dereferenceable(8) %56)
  br i1 %57, label %58, label %88

58:                                               ; preds = %47
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = getelementptr inbounds ptr, ptr %60, i64 7
  %62 = load ptr, ptr %61, align 8
  %63 = call noundef i32 %62(ptr noundef nonnull align 8 dereferenceable(144) %59)
  %64 = getelementptr inbounds %"class.glslang::TIntermediate", ptr %14, i32 0, i32 84
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [4 x %"class.std::vector.69"], ptr %64, i64 0, i64 %66
  %68 = load i64, ptr %12, align 8, !tbaa !11
  %69 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %68) #4
  %70 = getelementptr inbounds %"struct.glslang::TIoRange", ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 4, !tbaa !15
  %72 = icmp ne i32 %63, %71
  br i1 %72, label %73, label %88

73:                                               ; preds = %58
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  store i8 1, ptr %74, align 1, !tbaa !19
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.glslang::TIoRange", ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds %"struct.glslang::TRange", ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds %"class.glslang::TIntermediate", ptr %14, i32 0, i32 84
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [4 x %"class.std::vector.69"], ptr %78, i64 0, i64 %80
  %82 = load i64, ptr %12, align 8, !tbaa !11
  %83 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %82) #4
  %84 = getelementptr inbounds %"struct.glslang::TIoRange", ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %"struct.glslang::TRange", ptr %84, i32 0, i32 0
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %77, ptr noundef nonnull align 4 dereferenceable(4) %85)
  %87 = load i32, ptr %86, align 4, !tbaa !9
  store i32 %87, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %93

88:                                               ; preds = %58, %47
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  %91 = load i64, ptr %12, align 8, !tbaa !11
  %92 = add i64 %91, 1
  store i64 %92, ptr %12, align 8, !tbaa !11
  br label %15, !llvm.loop !21

93:                                               ; preds = %73, %33, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %94 = load i32, ptr %13, align 4
  switch i32 %94, label %98 [
    i32 2, label %95
    i32 1, label %96
  ]

95:                                               ; preds = %93
  store i32 -1, ptr %6, align 4
  br label %96

96:                                               ; preds = %95, %93
  %97 = load i32, ptr %6, align 4
  ret i32 %97

98:                                               ; preds = %93
  unreachable
}

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

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

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

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 = { 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 = { 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 = { 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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !18, i64 16}
!16 = !{!"_ZTSN7glslang8TIoRangeE", !17, i64 0, !17, i64 8, !18, i64 16, !10, i64 20}
!17 = !{!"_ZTSN7glslang6TRangeE", !10, i64 0, !10, i64 4}
!18 = !{!"_ZTSN7glslang10TBasicTypeE", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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

%"class.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 }

; 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 #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang13TIntermediate18checkLocationRangeEiRKNS_8TIoRangeERKNS_5TTypeERb(ptr noundef nonnull align 8 dereferenceable(1784) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(144) %3, ptr nocapture noundef nonnull writeonly align 1 dereferenceable(1) %4) local_unnamed_addr #1 align 2 {
  %6 = getelementptr inbounds i8, ptr %0, i64 1456
  %7 = sext i32 %1 to i64
  %8 = getelementptr inbounds [4 x %"class.std::vector.69"], ptr %6, i64 0, i64 %7
  %9 = tail call noundef i64 @_ZNKSt6vectorIN7glslang8TIoRangeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  %.not2328.not = icmp eq i64 %9, 0
  br i1 %.not2328.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %5, %24
  %.02129 = phi i64 [ %25, %24 ], [ 0, %5 ]
  %10 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.02129) #3
  %11 = tail call noundef zeroext i1 @_ZNK7glslang8TIoRange7overlapERKS0_(ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(24) %10)
  br i1 %11, label %.loopexit.sink.split, label %12

12:                                               ; preds = %.lr.ph
  %13 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.02129) #3
  %14 = tail call noundef zeroext i1 @_ZNK7glslang6TRange7overlapERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %13)
  br i1 %14, label %15, label %24

15:                                               ; preds = %12
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 56
  %18 = load ptr, ptr %17, align 8
  %19 = tail call noundef i32 %18(ptr noundef nonnull align 8 dereferenceable(144) %3)
  %20 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.02129) #3
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load i32, ptr %21, align 4, !tbaa !8
  %.not = icmp eq i32 %19, %22
  br i1 %.not, label %24, label %23

23:                                               ; preds = %15
  store i8 1, ptr %4, align 1, !tbaa !14
  br label %.loopexit.sink.split

24:                                               ; preds = %15, %12
  %25 = add nuw i64 %.02129, 1
  %26 = tail call noundef i64 @_ZNKSt6vectorIN7glslang8TIoRangeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  %.not23 = icmp ult i64 %25, %26
  br i1 %.not23, label %.lr.ph, label %.loopexit, !llvm.loop !16

.loopexit.sink.split:                             ; preds = %.lr.ph, %23
  %27 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN7glslang8TIoRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.02129) #3
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %29 = load i32, ptr %28, align 4, !tbaa !18
  br label %.loopexit

.loopexit:                                        ; preds = %24, %.loopexit.sink.split, %5
  %spec.select = phi i32 [ -1, %5 ], [ %29, %.loopexit.sink.split ], [ -1, %24 ]
  ret i32 %spec.select
}

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

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

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

attributes #0 = { 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 #1 = { 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 #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 = { 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, !13, i64 16}
!9 = !{!"_ZTSN7glslang8TIoRangeE", !10, i64 0, !10, i64 8, !13, i64 16, !11, i64 20}
!10 = !{!"_ZTSN7glslang6TRangeE", !11, i64 0, !11, i64 4}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"_ZTSN7glslang10TBasicTypeE", !12, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !12, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!11, !11, i64 0}


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