; LLVM IR from paroj/gltut :: glsdk/glmesh/source (VertexFormat)

; 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.glload::LoadTest" = type { i8, i32 }
%"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::allocator" = type { i8 }
%"class.glmesh::AttribDesc" = type { i32, i32, i32, i32 }

@_ZTIN6glmesh29AttributeDataInvalidExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs = external hidden global i32, align 4
@_ZN2gl11GetIntegervE = external global ptr, align 8
@_ZTIN6glmesh33AttributeDataUnsupportedExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZN2gl4exts25var_ARB_half_float_vertexE = external global %"class.glload::LoadTest", align 4
@.str.7 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [40 x i8], align 1
@_ZN2gl4exts19var_EXT_gpu_shader4E = external global %"class.glload::LoadTest", align 4
@.str.10 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [53 x i8], align 1
@_ZN2gl4exts27var_ARB_vertex_attrib_64bitE = external global %"class.glload::LoadTest", align 4
@.str.12 = external hidden unnamed_addr constant [67 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6glmesh10AttribDescC2EjjNS_14VertexDataTypeENS_14AttribDataTypeE(ptr noundef nonnull align 4 dereferenceable(16) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca i1, align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca i1, align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i1, align 1
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca i1, align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca i1, align 1
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca i1, align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !11
  store i32 %4, ptr %10, align 4, !tbaa !13
  %31 = load ptr, ptr %6, align 8
  %32 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 0
  %33 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %33, ptr %32, align 4, !tbaa !15
  %34 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 1
  %35 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %35, ptr %34, align 4, !tbaa !17
  %36 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %37 = load i32, ptr %9, align 4, !tbaa !11
  store i32 %37, ptr %36, align 4, !tbaa !18
  %38 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 3
  %39 = load i32, ptr %10, align 4, !tbaa !13
  store i32 %39, ptr %38, align 4, !tbaa !19
  %40 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !17
  %42 = icmp ule i32 1, %41
  br i1 %42, label %43, label %47

43:                                               ; preds = %5
  %44 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 1
  %45 = load i32, ptr %44, align 4, !tbaa !17
  %46 = icmp ule i32 %45, 4
  br i1 %46, label %56, label %47

47:                                               ; preds = %43, %5
  %48 = call ptr @__cxa_allocate_exception(i64 40) #4
  %49 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 1
  %50 = load i32, ptr %49, align 4, !tbaa !17
  invoke void @_ZN6glmesh29AttributeDataInvalidExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(40) %48, i32 noundef %50)
          to label %51 unwind label %52

51:                                               ; preds = %47
  call void @__cxa_throw(ptr %48, ptr @_ZTIN6glmesh29AttributeDataInvalidExceptionE, ptr @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
  unreachable

52:                                               ; preds = %47
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %12, align 4
  call void @__cxa_free_exception(ptr %48) #4
  br label %233

56:                                               ; preds = %43
  %57 = load i32, ptr @_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs, align 4, !tbaa !9
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = load ptr, ptr @_ZN2gl11GetIntegervE, align 8, !tbaa !5
  call void %60(i32 noundef 34921, ptr noundef @_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs)
  br label %61

61:                                               ; preds = %59, %56
  %62 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = load i32, ptr @_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs, align 4, !tbaa !9
  %65 = icmp uge i32 %63, %64
  br i1 %65, label %66, label %76

66:                                               ; preds = %61
  %67 = call ptr @__cxa_allocate_exception(i64 40) #4
  %68 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !15
  %70 = load i32, ptr @_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs, align 4, !tbaa !9
  invoke void @_ZN6glmesh33AttributeDataUnsupportedExceptionC1Eji(ptr noundef nonnull align 8 dereferenceable(40) %67, i32 noundef %69, i32 noundef %70)
          to label %71 unwind label %72

71:                                               ; preds = %66
  call void @__cxa_throw(ptr %67, ptr @_ZTIN6glmesh33AttributeDataUnsupportedExceptionE, ptr @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
  unreachable

72:                                               ; preds = %66
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %11, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %12, align 4
  call void @__cxa_free_exception(ptr %67) #4
  br label %233

76:                                               ; preds = %61
  %77 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %78 = load i32, ptr %77, align 4, !tbaa !18
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %104

80:                                               ; preds = %76
  %81 = call noundef i32 @_ZN6glload12IsVersionGEQEii(i32 noundef 3, i32 noundef 0)
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %103, label %83

83:                                               ; preds = %80
  %84 = call { i64, i64 } @_ZNK6glload8LoadTestcvMS0_KFvvEEv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN2gl4exts25var_ARB_half_float_vertexE)
  %85 = extractvalue { i64, i64 } %84, 0
  %86 = icmp ne i64 %85, 0
  br i1 %86, label %103, label %87

87:                                               ; preds = %83
  store i1 true, ptr %15, align 1
  %88 = call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %89 unwind label %91

89:                                               ; preds = %87
  invoke void @_ZN6glmesh33AttributeDataUnsupportedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %88, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %90 unwind label %95

90:                                               ; preds = %89
  store i1 false, ptr %15, align 1
  invoke void @__cxa_throw(ptr %88, ptr @_ZTIN6glmesh33AttributeDataUnsupportedExceptionE, ptr @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %238 unwind label %95

91:                                               ; preds = %87
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %11, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %12, align 4
  br label %99

95:                                               ; preds = %90, %89
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %11, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  br label %99

99:                                               ; preds = %95, %91
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  %100 = load i1, ptr %15, align 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %99
  call void @__cxa_free_exception(ptr %88) #4
  br label %102

102:                                              ; preds = %101, %99
  br label %233

103:                                              ; preds = %83, %80
  br label %104

104:                                              ; preds = %103, %76
  %105 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 3
  %106 = load i32, ptr %105, align 4, !tbaa !19
  switch i32 %106, label %232 [
    i32 0, label %232
    i32 1, label %107
    i32 2, label %136
    i32 3, label %188
  ]

107:                                              ; preds = %104
  %108 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %109 = load i32, ptr %108, align 4, !tbaa !18
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %119, label %111

111:                                              ; preds = %107
  %112 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %113 = load i32, ptr %112, align 4, !tbaa !18
  %114 = icmp eq i32 %113, 1
  br i1 %114, label %119, label %115

115:                                              ; preds = %111
  %116 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %117 = load i32, ptr %116, align 4, !tbaa !18
  %118 = icmp eq i32 %117, 2
  br i1 %118, label %119, label %135

119:                                              ; preds = %115, %111, %107
  store i1 true, ptr %18, align 1
  %120 = call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %121 unwind label %123

121:                                              ; preds = %119
  invoke void @_ZN6glmesh29AttributeDataInvalidExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %120, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %122 unwind label %127

122:                                              ; preds = %121
  store i1 false, ptr %18, align 1
  invoke void @__cxa_throw(ptr %120, ptr @_ZTIN6glmesh29AttributeDataInvalidExceptionE, ptr @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %238 unwind label %127

123:                                              ; preds = %119
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %11, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %12, align 4
  br label %131

127:                                              ; preds = %122, %121
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %11, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %131

131:                                              ; preds = %127, %123
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  %132 = load i1, ptr %18, align 1
  br i1 %132, label %133, label %134

133:                                              ; preds = %131
  call void @__cxa_free_exception(ptr %120) #4
  br label %134

134:                                              ; preds = %133, %131
  br label %233

135:                                              ; preds = %115
  br label %232

136:                                              ; preds = %104
  %137 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %138 = load i32, ptr %137, align 4, !tbaa !18
  %139 = icmp eq i32 %138, 0
  br i1 %139, label %148, label %140

140:                                              ; preds = %136
  %141 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %142 = load i32, ptr %141, align 4, !tbaa !18
  %143 = icmp eq i32 %142, 1
  br i1 %143, label %148, label %144

144:                                              ; preds = %140
  %145 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %146 = load i32, ptr %145, align 4, !tbaa !18
  %147 = icmp eq i32 %146, 2
  br i1 %147, label %148, label %164

148:                                              ; preds = %144, %140, %136
  store i1 true, ptr %21, align 1
  %149 = call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %150 unwind label %152

150:                                              ; preds = %148
  invoke void @_ZN6glmesh29AttributeDataInvalidExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %149, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %151 unwind label %156

151:                                              ; preds = %150
  store i1 false, ptr %21, align 1
  invoke void @__cxa_throw(ptr %149, ptr @_ZTIN6glmesh29AttributeDataInvalidExceptionE, ptr @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %238 unwind label %156

152:                                              ; preds = %148
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %11, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %12, align 4
  br label %160

156:                                              ; preds = %151, %150
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %11, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  br label %160

160:                                              ; preds = %156, %152
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #4
  %161 = load i1, ptr %21, align 1
  br i1 %161, label %162, label %163

162:                                              ; preds = %160
  call void @__cxa_free_exception(ptr %149) #4
  br label %163

163:                                              ; preds = %162, %160
  br label %233

164:                                              ; preds = %144
  %165 = call noundef i32 @_ZN6glload12IsVersionGEQEii(i32 noundef 3, i32 noundef 0)
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %187, label %167

167:                                              ; preds = %164
  %168 = call { i64, i64 } @_ZNK6glload8LoadTestcvMS0_KFvvEEv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN2gl4exts19var_EXT_gpu_shader4E)
  %169 = extractvalue { i64, i64 } %168, 0
  %170 = icmp ne i64 %169, 0
  br i1 %170, label %187, label %171

171:                                              ; preds = %167
  store i1 true, ptr %24, align 1
  %172 = call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %173 unwind label %175

173:                                              ; preds = %171
  invoke void @_ZN6glmesh33AttributeDataUnsupportedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %172, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %174 unwind label %179

174:                                              ; preds = %173
  store i1 false, ptr %24, align 1
  invoke void @__cxa_throw(ptr %172, ptr @_ZTIN6glmesh33AttributeDataUnsupportedExceptionE, ptr @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %238 unwind label %179

175:                                              ; preds = %171
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %11, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %12, align 4
  br label %183

179:                                              ; preds = %174, %173
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %11, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  br label %183

183:                                              ; preds = %179, %175
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  %184 = load i1, ptr %24, align 1
  br i1 %184, label %185, label %186

185:                                              ; preds = %183
  call void @__cxa_free_exception(ptr %172) #4
  br label %186

186:                                              ; preds = %185, %183
  br label %233

187:                                              ; preds = %167, %164
  br label %232

188:                                              ; preds = %104
  %189 = getelementptr inbounds %"class.glmesh::AttribDesc", ptr %31, i32 0, i32 2
  %190 = load i32, ptr %189, align 4, !tbaa !18
  %191 = icmp ne i32 %190, 2
  br i1 %191, label %192, label %208

192:                                              ; preds = %188
  store i1 true, ptr %27, align 1
  %193 = call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %194 unwind label %196

194:                                              ; preds = %192
  invoke void @_ZN6glmesh29AttributeDataInvalidExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %193, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %195 unwind label %200

195:                                              ; preds = %194
  store i1 false, ptr %27, align 1
  invoke void @__cxa_throw(ptr %193, ptr @_ZTIN6glmesh29AttributeDataInvalidExceptionE, ptr @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %238 unwind label %200

196:                                              ; preds = %192
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %11, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %12, align 4
  br label %204

200:                                              ; preds = %195, %194
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %11, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #4
  br label %204

204:                                              ; preds = %200, %196
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #4
  %205 = load i1, ptr %27, align 1
  br i1 %205, label %206, label %207

206:                                              ; preds = %204
  call void @__cxa_free_exception(ptr %193) #4
  br label %207

207:                                              ; preds = %206, %204
  br label %233

208:                                              ; preds = %188
  %209 = call noundef i32 @_ZN6glload12IsVersionGEQEii(i32 noundef 4, i32 noundef 1)
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %231, label %211

211:                                              ; preds = %208
  %212 = call { i64, i64 } @_ZNK6glload8LoadTestcvMS0_KFvvEEv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN2gl4exts27var_ARB_vertex_attrib_64bitE)
  %213 = extractvalue { i64, i64 } %212, 0
  %214 = icmp ne i64 %213, 0
  br i1 %214, label %231, label %215

215:                                              ; preds = %211
  store i1 true, ptr %30, align 1
  %216 = call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %217 unwind label %219

217:                                              ; preds = %215
  invoke void @_ZN6glmesh33AttributeDataUnsupportedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %216, ptr noundef nonnull align 8 dereferenceable(32) %28)
          to label %218 unwind label %223

218:                                              ; preds = %217
  store i1 false, ptr %30, align 1
  invoke void @__cxa_throw(ptr %216, ptr @_ZTIN6glmesh33AttributeDataUnsupportedExceptionE, ptr @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %238 unwind label %223

219:                                              ; preds = %215
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %11, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %12, align 4
  br label %227

223:                                              ; preds = %218, %217
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %11, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  br label %227

227:                                              ; preds = %223, %219
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #4
  %228 = load i1, ptr %30, align 1
  br i1 %228, label %229, label %230

229:                                              ; preds = %227
  call void @__cxa_free_exception(ptr %216) #4
  br label %230

230:                                              ; preds = %229, %227
  br label %233

231:                                              ; preds = %211, %208
  br label %232

232:                                              ; preds = %231, %187, %135, %104, %104
  ret void

233:                                              ; preds = %230, %207, %186, %163, %134, %102, %72, %52
  %234 = load ptr, ptr %11, align 8
  %235 = load i32, ptr %12, align 4
  %236 = insertvalue { ptr, i32 } poison, ptr %234, 0
  %237 = insertvalue { ptr, i32 } %236, i32 %235, 1
  resume { ptr, i32 } %237

238:                                              ; preds = %218, %195, %174, %151, %122, %90
  unreachable
}

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

declare noundef i32 @_ZN6glload12IsVersionGEQEii(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK6glload8LoadTestcvMS0_KFvvEEv(ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glmesh33AttributeDataUnsupportedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glmesh29AttributeDataInvalidExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare void @_ZN6glmesh29AttributeDataInvalidExceptionC1Ei(ptr, i32)

declare void @_ZN6glmesh33AttributeDataUnsupportedExceptionC1Eji(ptr, i32, i32)

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 }
attributes #5 = { noreturn }

!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 = !{!"_ZTSN6glmesh14VertexDataTypeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN6glmesh14AttribDataTypeE", !7, i64 0}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSN6glmesh10AttribDescE", !10, i64 0, !10, i64 4, !12, i64 8, !14, i64 12}
!17 = !{!16, !10, i64 4}
!18 = !{!16, !12, i64 8}
!19 = !{!16, !14, i64 12}


; 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.glload::LoadTest" = type { i8, i32 }
%"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::allocator" = type { i8 }

@_ZTIN6glmesh29AttributeDataInvalidExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs = external hidden global i32, align 4
@_ZN2gl11GetIntegervE = external local_unnamed_addr global ptr, align 8
@_ZTIN6glmesh33AttributeDataUnsupportedExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZN2gl4exts25var_ARB_half_float_vertexE = external global %"class.glload::LoadTest", align 4
@.str.7 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [40 x i8], align 1
@_ZN2gl4exts19var_EXT_gpu_shader4E = external global %"class.glload::LoadTest", align 4
@.str.10 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [53 x i8], align 1
@_ZN2gl4exts27var_ARB_vertex_attrib_64bitE = external global %"class.glload::LoadTest", align 4
@.str.12 = external hidden unnamed_addr constant [67 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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 uwtable
define dso_local void @_ZN6glmesh10AttribDescC2EjjNS_14VertexDataTypeENS_14AttribDataTypeE(ptr nocapture noundef nonnull align 4 dereferenceable(16) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  store i32 %1, ptr %0, align 4, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %2, ptr %18, align 4, !tbaa !12
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %3, ptr %19, align 4, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %4, ptr %20, align 4, !tbaa !14
  %21 = add i32 %2, -1
  %or.cond = icmp ult i32 %21, 4
  br i1 %or.cond, label %28, label %22

22:                                               ; preds = %5
  %23 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  %24 = load i32, ptr %18, align 4, !tbaa !12
  invoke void @_ZN6glmesh29AttributeDataInvalidExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(40) %23, i32 noundef %24)
          to label %25 unwind label %26

25:                                               ; preds = %22
  tail call void @__cxa_throw(ptr %23, ptr nonnull @_ZTIN6glmesh29AttributeDataInvalidExceptionE, ptr nonnull @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
  unreachable

26:                                               ; preds = %22
  %27 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %23) #4
  br label %118

28:                                               ; preds = %5
  %29 = load i32, ptr @_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs, align 4, !tbaa !15
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = load ptr, ptr @_ZN2gl11GetIntegervE, align 8, !tbaa !16
  tail call void %32(i32 noundef 34921, ptr noundef nonnull @_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs)
  %.pre = load i32, ptr %0, align 4, !tbaa !5
  %.pre79 = load i32, ptr @_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs, align 4, !tbaa !15
  br label %33

33:                                               ; preds = %31, %28
  %34 = phi i32 [ %.pre79, %31 ], [ %29, %28 ]
  %35 = phi i32 [ %.pre, %31 ], [ %1, %28 ]
  %.not34 = icmp ult i32 %35, %34
  br i1 %.not34, label %43, label %36

36:                                               ; preds = %33
  %37 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  %38 = load i32, ptr %0, align 4, !tbaa !5
  %39 = load i32, ptr @_ZZN6glmesh10AttribDescC1EjjNS_14VertexDataTypeENS_14AttribDataTypeEE10maxAttribs, align 4, !tbaa !15
  invoke void @_ZN6glmesh33AttributeDataUnsupportedExceptionC1Eji(ptr noundef nonnull align 8 dereferenceable(40) %37, i32 noundef %38, i32 noundef %39)
          to label %40 unwind label %41

40:                                               ; preds = %36
  tail call void @__cxa_throw(ptr %37, ptr nonnull @_ZTIN6glmesh33AttributeDataUnsupportedExceptionE, ptr nonnull @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
  unreachable

41:                                               ; preds = %36
  %42 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %37) #4
  br label %118

43:                                               ; preds = %33
  %44 = load i32, ptr %19, align 4, !tbaa !13
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %59

46:                                               ; preds = %43
  %47 = tail call noundef i32 @_ZN6glload12IsVersionGEQEii(i32 noundef 3, i32 noundef 0)
  %.not35 = icmp eq i32 %47, 0
  br i1 %.not35, label %48, label %59

48:                                               ; preds = %46
  %49 = tail call { i64, i64 } @_ZNK6glload8LoadTestcvMS0_KFvvEEv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN2gl4exts25var_ARB_half_float_vertexE)
  %50 = extractvalue { i64, i64 } %49, 0
  %.not36 = icmp eq i64 %50, 0
  br i1 %.not36, label %51, label %59

51:                                               ; preds = %48
  %52 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %53 unwind label %.thread

53:                                               ; preds = %51
  invoke void @_ZN6glmesh33AttributeDataUnsupportedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %52, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %54 unwind label %56

54:                                               ; preds = %53
  invoke void @__cxa_throw(ptr nonnull %52, ptr nonnull @_ZTIN6glmesh33AttributeDataUnsupportedExceptionE, ptr nonnull @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %119 unwind label %56

.thread:                                          ; preds = %51
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %58

56:                                               ; preds = %53, %54
  %.020 = phi i1 [ false, %54 ], [ true, %53 ]
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br i1 %.020, label %58, label %118

58:                                               ; preds = %.thread, %56
  %.pn58 = phi { ptr, i32 } [ %55, %.thread ], [ %57, %56 ]
  call void @__cxa_free_exception(ptr %52) #4
  br label %118

59:                                               ; preds = %46, %48, %43
  %60 = load i32, ptr %20, align 4, !tbaa !14
  switch i32 %60, label %117 [
    i32 3, label %94
    i32 1, label %61
    i32 2, label %71
  ]

61:                                               ; preds = %59
  %62 = load i32, ptr %19, align 4, !tbaa !13
  %switch = icmp ult i32 %62, 3
  br i1 %switch, label %63, label %117

63:                                               ; preds = %61
  %64 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %65 unwind label %.thread59

65:                                               ; preds = %63
  invoke void @_ZN6glmesh29AttributeDataInvalidExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %64, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %66 unwind label %68

66:                                               ; preds = %65
  invoke void @__cxa_throw(ptr nonnull %64, ptr nonnull @_ZTIN6glmesh29AttributeDataInvalidExceptionE, ptr nonnull @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %119 unwind label %68

.thread59:                                        ; preds = %63
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br label %70

68:                                               ; preds = %65, %66
  %.018 = phi i1 [ false, %66 ], [ true, %65 ]
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br i1 %.018, label %70, label %118

70:                                               ; preds = %.thread59, %68
  %.pn4462 = phi { ptr, i32 } [ %67, %.thread59 ], [ %69, %68 ]
  call void @__cxa_free_exception(ptr %64) #4
  br label %118

71:                                               ; preds = %59
  %72 = load i32, ptr %19, align 4, !tbaa !13
  %switch55 = icmp ult i32 %72, 3
  br i1 %switch55, label %73, label %81

73:                                               ; preds = %71
  %74 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %75 unwind label %.thread63

75:                                               ; preds = %73
  invoke void @_ZN6glmesh29AttributeDataInvalidExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %74, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %76 unwind label %78

76:                                               ; preds = %75
  invoke void @__cxa_throw(ptr nonnull %74, ptr nonnull @_ZTIN6glmesh29AttributeDataInvalidExceptionE, ptr nonnull @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %119 unwind label %78

.thread63:                                        ; preds = %73
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  br label %80

78:                                               ; preds = %75, %76
  %.016 = phi i1 [ false, %76 ], [ true, %75 ]
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  br i1 %.016, label %80, label %118

80:                                               ; preds = %.thread63, %78
  %.pn4266 = phi { ptr, i32 } [ %77, %.thread63 ], [ %79, %78 ]
  call void @__cxa_free_exception(ptr %74) #4
  br label %118

81:                                               ; preds = %71
  %82 = tail call noundef i32 @_ZN6glload12IsVersionGEQEii(i32 noundef 3, i32 noundef 0)
  %.not38 = icmp eq i32 %82, 0
  br i1 %.not38, label %83, label %117

83:                                               ; preds = %81
  %84 = tail call { i64, i64 } @_ZNK6glload8LoadTestcvMS0_KFvvEEv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN2gl4exts19var_EXT_gpu_shader4E)
  %85 = extractvalue { i64, i64 } %84, 0
  %.not39 = icmp eq i64 %85, 0
  br i1 %.not39, label %86, label %117

86:                                               ; preds = %83
  %87 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %88 unwind label %.thread67

88:                                               ; preds = %86
  invoke void @_ZN6glmesh33AttributeDataUnsupportedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %87, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %89 unwind label %91

89:                                               ; preds = %88
  invoke void @__cxa_throw(ptr nonnull %87, ptr nonnull @_ZTIN6glmesh33AttributeDataUnsupportedExceptionE, ptr nonnull @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %119 unwind label %91

.thread67:                                        ; preds = %86
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  br label %93

91:                                               ; preds = %88, %89
  %.014 = phi i1 [ false, %89 ], [ true, %88 ]
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  br i1 %.014, label %93, label %118

93:                                               ; preds = %.thread67, %91
  %.pn4070 = phi { ptr, i32 } [ %90, %.thread67 ], [ %92, %91 ]
  call void @__cxa_free_exception(ptr %87) #4
  br label %118

94:                                               ; preds = %59
  %95 = load i32, ptr %19, align 4, !tbaa !13
  %.not46 = icmp eq i32 %95, 2
  br i1 %.not46, label %104, label %96

96:                                               ; preds = %94
  %97 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %98 unwind label %.thread71

98:                                               ; preds = %96
  invoke void @_ZN6glmesh29AttributeDataInvalidExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %97, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %99 unwind label %101

99:                                               ; preds = %98
  invoke void @__cxa_throw(ptr nonnull %97, ptr nonnull @_ZTIN6glmesh29AttributeDataInvalidExceptionE, ptr nonnull @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %119 unwind label %101

.thread71:                                        ; preds = %96
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  br label %103

101:                                              ; preds = %98, %99
  %.012 = phi i1 [ false, %99 ], [ true, %98 ]
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  br i1 %.012, label %103, label %118

103:                                              ; preds = %.thread71, %101
  %.pn5174 = phi { ptr, i32 } [ %100, %.thread71 ], [ %102, %101 ]
  call void @__cxa_free_exception(ptr %97) #4
  br label %118

104:                                              ; preds = %94
  %105 = tail call noundef i32 @_ZN6glload12IsVersionGEQEii(i32 noundef 4, i32 noundef 1)
  %.not47 = icmp eq i32 %105, 0
  br i1 %.not47, label %106, label %117

106:                                              ; preds = %104
  %107 = tail call { i64, i64 } @_ZNK6glload8LoadTestcvMS0_KFvvEEv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN2gl4exts27var_ARB_vertex_attrib_64bitE)
  %108 = extractvalue { i64, i64 } %107, 0
  %.not48 = icmp eq i64 %108, 0
  br i1 %.not48, label %109, label %117

109:                                              ; preds = %106
  %110 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %111 unwind label %.thread75

111:                                              ; preds = %109
  invoke void @_ZN6glmesh33AttributeDataUnsupportedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %110, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %112 unwind label %114

112:                                              ; preds = %111
  invoke void @__cxa_throw(ptr nonnull %110, ptr nonnull @_ZTIN6glmesh33AttributeDataUnsupportedExceptionE, ptr nonnull @_ZN6glmesh21VertexFormatExceptionD2Ev) #5
          to label %119 unwind label %114

.thread75:                                        ; preds = %109
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #4
  br label %116

114:                                              ; preds = %111, %112
  %.0 = phi i1 [ false, %112 ], [ true, %111 ]
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #4
  br i1 %.0, label %116, label %118

116:                                              ; preds = %.thread75, %114
  %.pn4978 = phi { ptr, i32 } [ %113, %.thread75 ], [ %115, %114 ]
  call void @__cxa_free_exception(ptr %110) #4
  br label %118

117:                                              ; preds = %61, %104, %106, %81, %83, %59
  ret void

118:                                              ; preds = %114, %116, %101, %103, %91, %93, %78, %80, %68, %70, %56, %58, %41, %26
  %.pn53 = phi { ptr, i32 } [ %42, %41 ], [ %.pn4266, %80 ], [ %79, %78 ], [ %.pn4070, %93 ], [ %92, %91 ], [ %.pn4462, %70 ], [ %69, %68 ], [ %.pn5174, %103 ], [ %102, %101 ], [ %.pn4978, %116 ], [ %115, %114 ], [ %.pn58, %58 ], [ %57, %56 ], [ %27, %26 ]
  resume { ptr, i32 } %.pn53

119:                                              ; preds = %112, %99, %89, %76, %66, %54
  unreachable
}

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare noundef i32 @_ZN6glload12IsVersionGEQEii(i32 noundef, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glmesh33AttributeDataUnsupportedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glmesh29AttributeDataInvalidExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare void @_ZN6glmesh29AttributeDataInvalidExceptionC1Ei(ptr, i32) local_unnamed_addr

declare void @_ZN6glmesh33AttributeDataUnsupportedExceptionC1Eji(ptr, i32, i32) local_unnamed_addr

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 }
attributes #5 = { noreturn }

!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, !7, i64 0}
!6 = !{!"_ZTSN6glmesh10AttribDescE", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 12}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6glmesh14VertexDataTypeE", !8, i64 0}
!11 = !{!"_ZTSN6glmesh14AttribDataTypeE", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !10, i64 8}
!14 = !{!6, !11, i64 12}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !8, i64 0}


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