; LLVM IR from ronan-kerviche/glip-lib :: GLIP-Lib/src/Core (HdlTextureTools)

; 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.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 }
%"struct.Glip::CoreGL::HdlTextureFormatDescriptor" = type { i32, i32, i32, i32, i32, [4 x i32], [4 x i32], [4 x i32], i8, i8, i8 }

@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@_ZTIN4Glip9ExceptionE = external constant ptr
@.str.2 = external hidden unnamed_addr constant [110 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor15getChannelIndexEj(ptr noundef nonnull align 4 dereferenceable(72), i32 noundef) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor16getChannelOffsetEij(ptr noundef nonnull align 4 dereferenceable(72), i32 noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor14getChannelSizeEij(ptr noundef nonnull align 4 dereferenceable(72), i32 noundef, i32 noundef) #2 align 2

declare ptr @__cxa_allocate_exception(i64)

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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

declare void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN4Glip9ExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4Glip6CoreGL26HdlTextureFormatDescriptor13getBitShuffleERKS1_RKjS3_S5_PciPb(ptr noundef nonnull align 4 dereferenceable(72) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(72) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef %4, i32 noundef %5, ptr noundef %6) #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i32, align 4
  %22 = alloca i1, align 1
  %23 = alloca i32, align 4
  %24 = alloca i8, align 1
  %25 = alloca i32, align 4
  %26 = alloca [16 x i8], align 16
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store i32 %5, ptr %13, align 4, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.Glip::CoreGL::HdlTextureFormatDescriptor", ptr %36, i32 0, i32 8
  %38 = load i8, ptr %37, align 4, !tbaa !11, !range !14, !noundef !15
  %39 = trunc i8 %38 to i1
  br i1 %39, label %45, label %40

40:                                               ; preds = %7
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.Glip::CoreGL::HdlTextureFormatDescriptor", ptr %41, i32 0, i32 8
  %43 = load i8, ptr %42, align 4, !tbaa !11, !range !14, !noundef !15
  %44 = trunc i8 %43 to i1
  br i1 %44, label %45, label %67

45:                                               ; preds = %40, %7
  store i1 true, ptr %22, align 1
  %46 = call ptr @__cxa_allocate_exception(i64 152) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %47 unwind label %50

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %48 unwind label %54

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 1, ptr %21, align 4, !tbaa !16
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %46, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %19, i32 noundef 438, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %49 unwind label %58

49:                                               ; preds = %48
  store i1 false, ptr %22, align 1
  invoke void @__cxa_throw(ptr %46, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #9
          to label %203 unwind label %58

50:                                               ; preds = %45
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %17, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %18, align 4
  br label %63

54:                                               ; preds = %47
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %17, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %18, align 4
  br label %62

58:                                               ; preds = %49, %48
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %17, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  br label %62

62:                                               ; preds = %58, %54
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  br label %63

63:                                               ; preds = %62, %50
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #8
  %64 = load i1, ptr %22, align 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  call void @__cxa_free_exception(ptr %46) #8
  br label %66

66:                                               ; preds = %65, %63
  br label %198

67:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 -16777216, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #8
  %68 = load i8, ptr %23, align 4, !tbaa !18
  %69 = sext i8 %68 to i32
  %70 = icmp eq i32 %69, 0
  %71 = zext i1 %70 to i8
  store i8 %71, ptr %24, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 16, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %157, %67
  %73 = load i32, ptr %28, align 4, !tbaa !9
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.Glip::CoreGL::HdlTextureFormatDescriptor", ptr %74, i32 0, i32 4
  %76 = load i32, ptr %75, align 4, !tbaa !20
  %77 = icmp slt i32 %73, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %72
  store i32 2, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %160

79:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.Glip::CoreGL::HdlTextureFormatDescriptor", ptr %81, i32 0, i32 5
  %83 = load i32, ptr %28, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [4 x i32], ptr %82, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = call noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor15getChannelIndexEj(ptr noundef nonnull align 4 dereferenceable(72) %80, i32 noundef %86)
  store i32 %87, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i32, ptr %28, align 4, !tbaa !9
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = call noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor14getChannelSizeEij(ptr noundef nonnull align 4 dereferenceable(72) %88, i32 noundef %89, i32 noundef %91)
  store i32 %92, ptr %31, align 4, !tbaa !9
  %93 = load i32, ptr %30, align 4, !tbaa !9
  %94 = icmp slt i32 %93, 0
  br i1 %94, label %95, label %102

95:                                               ; preds = %79
  %96 = getelementptr inbounds [16 x i8], ptr %26, i64 0, i64 0
  %97 = load i32, ptr %27, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i8, ptr %96, i64 %98
  %100 = load i32, ptr %31, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %99, i8 -1, i64 %101, i1 false)
  br label %153

102:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = load i32, ptr %30, align 4, !tbaa !9
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = load i32, ptr %105, align 4, !tbaa !9
  %107 = call noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor14getChannelSizeEij(ptr noundef nonnull align 4 dereferenceable(72) %103, i32 noundef %104, i32 noundef %106)
  store i32 %107, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = load i32, ptr %30, align 4, !tbaa !9
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = call noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor16getChannelOffsetEij(ptr noundef nonnull align 4 dereferenceable(72) %108, i32 noundef %109, i32 noundef %111)
  store i32 %112, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  store i32 0, ptr %34, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %149, %102
  %114 = load i32, ptr %34, align 4, !tbaa !9
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = icmp slt i32 %114, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %113
  store i32 5, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %152

119:                                              ; preds = %113
  %120 = load i8, ptr %24, align 1, !tbaa !19, !range !14, !noundef !15
  %121 = trunc i8 %120 to i1
  br i1 %121, label %122, label %138

122:                                              ; preds = %119
  %123 = load i32, ptr %33, align 4, !tbaa !9
  %124 = load i32, ptr %32, align 4, !tbaa !9
  %125 = add nsw i32 %123, %124
  %126 = load i32, ptr %34, align 4, !tbaa !9
  %127 = sub nsw i32 %125, %126
  %128 = sub nsw i32 %127, 1
  %129 = trunc i32 %128 to i8
  %130 = load i32, ptr %27, align 4, !tbaa !9
  %131 = load i32, ptr %31, align 4, !tbaa !9
  %132 = add nsw i32 %130, %131
  %133 = load i32, ptr %34, align 4, !tbaa !9
  %134 = sub nsw i32 %132, %133
  %135 = sub nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [16 x i8], ptr %26, i64 0, i64 %136
  store i8 %129, ptr %137, align 1, !tbaa !18
  br label %148

138:                                              ; preds = %119
  %139 = load i32, ptr %33, align 4, !tbaa !9
  %140 = load i32, ptr %34, align 4, !tbaa !9
  %141 = add nsw i32 %139, %140
  %142 = trunc i32 %141 to i8
  %143 = load i32, ptr %27, align 4, !tbaa !9
  %144 = load i32, ptr %34, align 4, !tbaa !9
  %145 = add nsw i32 %143, %144
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [16 x i8], ptr %26, i64 0, i64 %146
  store i8 %142, ptr %147, align 1, !tbaa !18
  br label %148

148:                                              ; preds = %138, %122
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %34, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %34, align 4, !tbaa !9
  br label %113, !llvm.loop !21

152:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %153

153:                                              ; preds = %152, %95
  %154 = load i32, ptr %31, align 4, !tbaa !9
  %155 = load i32, ptr %27, align 4, !tbaa !9
  %156 = add nsw i32 %155, %154
  store i32 %156, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %157

157:                                              ; preds = %153
  %158 = load i32, ptr %28, align 4, !tbaa !9
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %28, align 4, !tbaa !9
  br label %72, !llvm.loop !23

160:                                              ; preds = %78
  %161 = load ptr, ptr %14, align 8, !tbaa !5
  %162 = icmp ne ptr %161, null
  br i1 %162, label %163, label %189

163:                                              ; preds = %160
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  store i8 1, ptr %164, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %165

165:                                              ; preds = %185, %163
  %166 = load i32, ptr %35, align 4, !tbaa !9
  %167 = load i32, ptr %27, align 4, !tbaa !9
  %168 = icmp slt i32 %166, %167
  br i1 %168, label %170, label %169

169:                                              ; preds = %165
  store i32 8, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %188

170:                                              ; preds = %165
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = load i8, ptr %171, align 1, !tbaa !19, !range !14, !noundef !15
  %173 = trunc i8 %172 to i1
  br i1 %173, label %174, label %181

174:                                              ; preds = %170
  %175 = load i32, ptr %35, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [16 x i8], ptr %26, i64 0, i64 %176
  %178 = load i8, ptr %177, align 1, !tbaa !18
  %179 = sext i8 %178 to i32
  %180 = icmp slt i32 %179, 0
  br label %181

181:                                              ; preds = %174, %170
  %182 = phi i1 [ false, %170 ], [ %180, %174 ]
  %183 = load ptr, ptr %14, align 8, !tbaa !5
  %184 = zext i1 %182 to i8
  store i8 %184, ptr %183, align 1, !tbaa !19
  br label %185

185:                                              ; preds = %181
  %186 = load i32, ptr %35, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %35, align 4, !tbaa !9
  br label %165, !llvm.loop !24

188:                                              ; preds = %169
  br label %189

189:                                              ; preds = %188, %160
  %190 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %191 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %190, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %192 = load i32, ptr %191, align 4, !tbaa !9
  store i32 %192, ptr %27, align 4, !tbaa !9
  %193 = load ptr, ptr %12, align 8, !tbaa !5
  %194 = getelementptr inbounds [16 x i8], ptr %26, i64 0, i64 0
  %195 = load i32, ptr %27, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %193, ptr align 16 %194, i64 %196, i1 false)
  %197 = load i32, ptr %27, align 4, !tbaa !9
  store i32 1, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  ret i32 %197

198:                                              ; preds = %66
  %199 = load ptr, ptr %17, align 8
  %200 = load i32, ptr %18, align 4
  %201 = insertvalue { ptr, i32 } poison, ptr %199, 0
  %202 = insertvalue { ptr, i32 } %201, i32 %200, 1
  resume { ptr, i32 } %202

203:                                              ; preds = %49
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { 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, !13, i64 68}
!12 = !{!"_ZTSN4Glip6CoreGL26HdlTextureFormatDescriptorE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 20, !7, i64 36, !7, i64 52, !13, i64 68, !13, i64 69, !13, i64 70}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTSN4Glip9Exception4TypeE", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!13, !13, i64 0}
!20 = !{!12, !10, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}


; 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::__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 }

@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@_ZTIN4Glip9ExceptionE = external constant ptr
@.str.2 = external hidden unnamed_addr constant [110 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor15getChannelIndexEj(ptr noundef nonnull align 4 dereferenceable(72), i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor16getChannelOffsetEij(ptr noundef nonnull align 4 dereferenceable(72), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor14getChannelSizeEij(ptr noundef nonnull align 4 dereferenceable(72), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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

declare void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN4Glip9ExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #4

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4Glip6CoreGL26HdlTextureFormatDescriptor13getBitShuffleERKS1_RKjS3_S5_PciPb(ptr noundef nonnull align 4 dereferenceable(72) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(72) %2, ptr nocapture noundef nonnull readonly align 4 dereferenceable(4) %3, ptr nocapture noundef writeonly %4, i32 noundef %5, ptr noundef writeonly %6) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [16 x i8], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 %5, ptr %8, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 68
  %20 = load i8, ptr %19, align 4, !tbaa !9, !range !12, !noundef !13
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %26, label %22

22:                                               ; preds = %7
  %23 = getelementptr inbounds i8, ptr %2, i64 68
  %24 = load i8, ptr %23, align 4, !tbaa !9, !range !12, !noundef !13
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %26, label %38

26:                                               ; preds = %22, %7
  %27 = tail call ptr @__cxa_allocate_exception(i64 152) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %28 unwind label %.thread

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %29 unwind label %32

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  store i32 1, ptr %13, align 4, !tbaa !14
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %27, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull %11, i32 noundef 438, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %30 unwind label %34

30:                                               ; preds = %29
  invoke void @__cxa_throw(ptr nonnull %27, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #9
          to label %117 unwind label %34

.thread:                                          ; preds = %26
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  br label %37

32:                                               ; preds = %28
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %36

34:                                               ; preds = %30, %29
  %.042 = phi i1 [ false, %30 ], [ true, %29 ]
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %36

36:                                               ; preds = %32, %34
  %.143 = phi i1 [ %.042, %34 ], [ true, %32 ]
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  br i1 %.143, label %37, label %116

37:                                               ; preds = %.thread, %36
  %.pn.pn51 = phi { ptr, i32 } [ %31, %.thread ], [ %.pn, %36 ]
  call void @__cxa_free_exception(ptr %27) #8
  br label %116

38:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  store i32 16, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %0, i64 16
  %40 = load i32, ptr %39, align 4, !tbaa !16
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph55, label %._crit_edge56.thread

.lr.ph55:                                         ; preds = %38
  %42 = getelementptr inbounds i8, ptr %0, i64 20
  br label %43

._crit_edge56:                                    ; preds = %78
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %.loopexit, label %84

._crit_edge56.thread:                             ; preds = %38
  %.not63 = icmp eq ptr %6, null
  br i1 %.not63, label %.loopexit, label %.loopexit.sink.split

43:                                               ; preds = %.lr.ph55, %78
  %44 = phi i32 [ 0, %.lr.ph55 ], [ %80, %78 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph55 ], [ %indvars.iv.next, %78 ]
  %45 = getelementptr inbounds [4 x i32], ptr %42, i64 0, i64 %indvars.iv
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = call noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor15getChannelIndexEj(ptr noundef nonnull align 4 dereferenceable(72) %2, i32 noundef %46)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #8
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  %50 = call noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor14getChannelSizeEij(ptr noundef nonnull align 4 dereferenceable(72) %0, i32 noundef %49, i32 noundef %48)
  store i32 %50, ptr %17, align 4, !tbaa !5
  %51 = icmp slt i32 %47, 0
  br i1 %51, label %52, label %56

52:                                               ; preds = %43
  %53 = sext i32 %44 to i64
  %54 = getelementptr inbounds i8, ptr %15, i64 %53
  %55 = sext i32 %50 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 1 %54, i8 -1, i64 %55, i1 false)
  br label %78

56:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = call noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor14getChannelSizeEij(ptr noundef nonnull align 4 dereferenceable(72) %2, i32 noundef %47, i32 noundef %57)
  store i32 %58, ptr %18, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = call noundef i32 @_ZNK4Glip6CoreGL26HdlTextureFormatDescriptor16getChannelOffsetEij(ptr noundef nonnull align 4 dereferenceable(72) %2, i32 noundef %47, i32 noundef %59)
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  %.pre = load i32, ptr %17, align 4, !tbaa !5
  br label %78

.lr.ph:                                           ; preds = %56, %.lr.ph
  %.03752 = phi i32 [ %74, %.lr.ph ], [ 0, %56 ]
  %64 = load i32, ptr %18, align 4, !tbaa !5
  %65 = xor i32 %.03752, -1
  %66 = add i32 %60, %65
  %67 = add i32 %66, %64
  %68 = trunc i32 %67 to i8
  %69 = load i32, ptr %17, align 4, !tbaa !5
  %70 = add i32 %44, %65
  %71 = add i32 %70, %69
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 %72
  store i8 %68, ptr %73, align 1, !tbaa !17
  %74 = add nuw nsw i32 %.03752, 1
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp slt i32 %74, %76
  br i1 %77, label %.lr.ph, label %._crit_edge, !llvm.loop !18

78:                                               ; preds = %._crit_edge, %52
  %79 = phi i32 [ %.pre, %._crit_edge ], [ %50, %52 ]
  %80 = add i32 %44, %79
  store i32 %80, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %81 = load i32, ptr %39, align 4, !tbaa !16
  %82 = sext i32 %81 to i64
  %83 = icmp slt i64 %indvars.iv.next, %82
  br i1 %83, label %43, label %._crit_edge56, !llvm.loop !20

84:                                               ; preds = %._crit_edge56
  store i8 1, ptr %6, align 1, !tbaa !21
  %85 = icmp sgt i32 %80, 0
  br i1 %85, label %.lr.ph59, label %.loopexit

.lr.ph59:                                         ; preds = %84
  %wide.trip.count = zext nneg i32 %80 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %86 = icmp ult i32 %80, 4
  br i1 %86, label %..loopexit_crit_edge.unr-lcssa, label %.lr.ph59.new

.lr.ph59.new:                                     ; preds = %.lr.ph59
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %87

87:                                               ; preds = %.critedge73, %.lr.ph59.new
  %indvars.iv61 = phi i64 [ 0, %.lr.ph59.new ], [ %indvars.iv.next62.3, %.critedge73 ]
  %88 = phi i1 [ true, %.lr.ph59.new ], [ %103, %.critedge73 ]
  %niter = phi i64 [ 0, %.lr.ph59.new ], [ %niter.next.3, %.critedge73 ]
  br i1 %88, label %89, label %.critedge73

89:                                               ; preds = %87
  %90 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 %indvars.iv61
  %91 = load i8, ptr %90, align 4, !tbaa !17
  %92 = icmp slt i8 %91, 0
  br i1 %92, label %.critedge, label %.critedge73

.critedge:                                        ; preds = %89
  %indvars.iv.next62 = or disjoint i64 %indvars.iv61, 1
  %93 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 %indvars.iv.next62
  %94 = load i8, ptr %93, align 1, !tbaa !17
  %95 = icmp slt i8 %94, 0
  br i1 %95, label %.critedge72, label %.critedge73

.critedge72:                                      ; preds = %.critedge
  %indvars.iv.next62.1 = or disjoint i64 %indvars.iv61, 2
  %96 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 %indvars.iv.next62.1
  %97 = load i8, ptr %96, align 2, !tbaa !17
  %98 = icmp slt i8 %97, 0
  br i1 %98, label %99, label %.critedge73

99:                                               ; preds = %.critedge72
  %indvars.iv.next62.2 = or disjoint i64 %indvars.iv61, 3
  %100 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 %indvars.iv.next62.2
  %101 = load i8, ptr %100, align 1, !tbaa !17
  %102 = icmp slt i8 %101, 0
  br label %.critedge73

.critedge73:                                      ; preds = %.critedge, %87, %89, %99, %.critedge72
  %103 = phi i1 [ false, %.critedge72 ], [ %102, %99 ], [ false, %89 ], [ false, %87 ], [ false, %.critedge ]
  %indvars.iv.next62.3 = add nuw nsw i64 %indvars.iv61, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %..loopexit_crit_edge.unr-lcssa, label %87, !llvm.loop !22

..loopexit_crit_edge.unr-lcssa:                   ; preds = %.critedge73, %.lr.ph59
  %.lcssa.ph = phi i1 [ poison, %.lr.ph59 ], [ %103, %.critedge73 ]
  %indvars.iv61.unr = phi i64 [ 0, %.lr.ph59 ], [ %indvars.iv.next62.3, %.critedge73 ]
  %.unr = phi i1 [ true, %.lr.ph59 ], [ %103, %.critedge73 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %..loopexit_crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %..loopexit_crit_edge.unr-lcssa, %109
  %indvars.iv61.epil = phi i64 [ %indvars.iv.next62.epil, %109 ], [ %indvars.iv61.unr, %..loopexit_crit_edge.unr-lcssa ]
  %104 = phi i1 [ %110, %109 ], [ %.unr, %..loopexit_crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %109 ], [ 0, %..loopexit_crit_edge.unr-lcssa ]
  br i1 %104, label %105, label %109

105:                                              ; preds = %.epil.preheader
  %106 = getelementptr inbounds [16 x i8], ptr %15, i64 0, i64 %indvars.iv61.epil
  %107 = load i8, ptr %106, align 1, !tbaa !17
  %108 = icmp slt i8 %107, 0
  br label %109

109:                                              ; preds = %105, %.epil.preheader
  %110 = phi i1 [ false, %.epil.preheader ], [ %108, %105 ]
  %indvars.iv.next62.epil = add nuw nsw i64 %indvars.iv61.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %..loopexit_crit_edge, label %.epil.preheader, !llvm.loop !23

..loopexit_crit_edge:                             ; preds = %109, %..loopexit_crit_edge.unr-lcssa
  %.lcssa = phi i1 [ %.lcssa.ph, %..loopexit_crit_edge.unr-lcssa ], [ %110, %109 ]
  %111 = zext i1 %.lcssa to i8
  br label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %._crit_edge56.thread, %..loopexit_crit_edge
  %.sink = phi i8 [ %111, %..loopexit_crit_edge ], [ 1, %._crit_edge56.thread ]
  store i8 %.sink, ptr %6, align 1, !tbaa !21
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.sink.split, %._crit_edge56.thread, %84, %._crit_edge56
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %112, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %4, ptr nonnull align 16 %15, i64 %115, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  ret i32 %114

116:                                              ; preds = %36, %37
  %.pn.pn50 = phi { ptr, i32 } [ %.pn, %36 ], [ %.pn.pn51, %37 ]
  resume { ptr, i32 } %.pn.pn50

117:                                              ; preds = %30
  unreachable
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

attributes #0 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 68}
!10 = !{!"_ZTSN4Glip6CoreGL26HdlTextureFormatDescriptorE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !7, i64 20, !7, i64 36, !7, i64 52, !11, i64 68, !11, i64 69, !11, i64 70}
!11 = !{!"bool", !7, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN4Glip9Exception4TypeE", !7, i64 0}
!16 = !{!10, !6, i64 16}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!11, !11, i64 0}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}


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