; LLVM IR from paroj/gltut :: glsdk/glimg/source (ImageFormat)

; 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.glimg::UncheckedImageFormat" = type { i32, i32, i32, i32, i32 }

@__const._ZNK5glimg20UncheckedImageFormat18ValidateFormatTextB5cxx11Ev.tests = external hidden unnamed_addr constant [4 x i32], align 16
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [50 x i8], align 1
@_ZN5glimg12_GLOBAL__N_114g_alphaFormatsE = external hidden global [2 x i32], align 4
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1
@_ZN5glimg12_GLOBAL__N_112g_rgbFormatsE = external hidden global [2 x i32], align 4
@.str.6 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [59 x i8], align 1
@_ZN5glimg12_GLOBAL__N_116g_floatBitdepthsE = external hidden global [3 x i32], align 4
@.str.19 = external hidden unnamed_addr constant [89 x i8], align 1
@_ZN5glimg12_GLOBAL__N_113g_srgbFormatsE = external hidden global [3 x i32], align 4
@.str.20 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [67 x i8], align 1
@_ZN5glimg12_GLOBAL__N_120g_threeCompBitdepthsE = external hidden global [2 x i32], align 4
@.str.25 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [46 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5glimg20UncheckedImageFormat18ValidateFormatTextB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 4 dereferenceable(20) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [4 x i32], align 16
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i8, align 1
  %20 = alloca i8, align 1
  %21 = alloca i8, align 1
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca %"class.std::allocator", align 1
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca %"class.std::allocator", align 1
  %31 = alloca %"class.std::allocator", align 1
  %32 = alloca %"class.std::allocator", align 1
  %33 = alloca %"class.std::allocator", align 1
  %34 = alloca %"class.std::allocator", align 1
  %35 = alloca %"class.std::allocator", align 1
  %36 = alloca %"class.std::allocator", align 1
  %37 = alloca %"class.std::allocator", align 1
  %38 = alloca %"class.std::allocator", align 1
  %39 = alloca %"class.std::allocator", align 1
  %40 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8
  %42 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = icmp slt i32 %43, 6
  br i1 %44, label %45, label %81

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const._ZNK5glimg20UncheckedImageFormat18ValidateFormatTextB5cxx11Ev.tests, i64 16, i1 false)
  %46 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 4
  %47 = load i32, ptr %46, align 4, !tbaa !16
  %48 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 0
  %49 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi4EiEEbT0_PS2_(i32 noundef %47, ptr noundef %48)
  br i1 %49, label %56, label %50

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %51 unwind label %52

51:                                               ; preds = %50
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  store i32 1, ptr %9, align 4
  br label %77

52:                                               ; preds = %50
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %7, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %80

56:                                               ; preds = %45
  %57 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !17
  %59 = icmp eq i32 %58, 4
  br i1 %59, label %60, label %66

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %61 unwind label %62

61:                                               ; preds = %60
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  store i32 1, ptr %9, align 4
  br label %77

62:                                               ; preds = %60
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %7, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  br label %80

66:                                               ; preds = %56
  %67 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %68 = load i32, ptr %67, align 4, !tbaa !18
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %76

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %71 unwind label %72

71:                                               ; preds = %70
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  store i32 1, ptr %9, align 4
  br label %77

72:                                               ; preds = %70
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %7, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  br label %80

76:                                               ; preds = %66
  store i32 0, ptr %9, align 4
  br label %77

77:                                               ; preds = %76, %71, %61, %51
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #5
  %78 = load i32, ptr %9, align 4
  switch i32 %78, label %500 [
    i32 0, label %79
    i32 1, label %494
  ]

79:                                               ; preds = %77
  br label %202

80:                                               ; preds = %72, %62, %52
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #5
  br label %495

81:                                               ; preds = %2
  %82 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 2
  %83 = load i32, ptr %82, align 4, !tbaa !17
  %84 = icmp ne i32 %83, 4
  br i1 %84, label %85, label %91

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %86 unwind label %87

86:                                               ; preds = %85
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %494

87:                                               ; preds = %85
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %7, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %495

91:                                               ; preds = %81
  %92 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %93 = load i32, ptr %92, align 4, !tbaa !18
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %101

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %96 unwind label %97

96:                                               ; preds = %95
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  br label %494

97:                                               ; preds = %95
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  br label %495

101:                                              ; preds = %91
  %102 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = icmp eq i32 %103, 7
  br i1 %104, label %113, label %105

105:                                              ; preds = %101
  %106 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = icmp eq i32 %107, 8
  br i1 %108, label %113, label %109

109:                                              ; preds = %105
  %110 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = icmp eq i32 %111, 15
  br i1 %112, label %113, label %124

113:                                              ; preds = %109, %105, %101
  %114 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !19
  %116 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef %115, ptr noundef @_ZN5glimg12_GLOBAL__N_114g_alphaFormatsE)
  br i1 %116, label %123, label %117

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %118 unwind label %119

118:                                              ; preds = %117
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %494

119:                                              ; preds = %117
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %7, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %495

123:                                              ; preds = %113
  br label %144

124:                                              ; preds = %109
  %125 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %126 = load i32, ptr %125, align 4, !tbaa !9
  %127 = icmp eq i32 %126, 6
  br i1 %127, label %128, label %143

128:                                              ; preds = %124
  %129 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !19
  %131 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef %130, ptr noundef @_ZN5glimg12_GLOBAL__N_112g_rgbFormatsE)
  br i1 %131, label %142, label %132

132:                                              ; preds = %128
  %133 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %134 = load i32, ptr %133, align 4, !tbaa !19
  %135 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef %134, ptr noundef @_ZN5glimg12_GLOBAL__N_114g_alphaFormatsE)
  br i1 %135, label %142, label %136

136:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %137 unwind label %138

137:                                              ; preds = %136
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %494

138:                                              ; preds = %136
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %7, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %495

142:                                              ; preds = %132, %128
  br label %143

143:                                              ; preds = %142, %124
  br label %144

144:                                              ; preds = %143, %123
  %145 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = icmp eq i32 %146, 9
  br i1 %147, label %152, label %148

148:                                              ; preds = %144
  %149 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %150 = load i32, ptr %149, align 4, !tbaa !9
  %151 = icmp eq i32 %150, 10
  br i1 %151, label %152, label %163

152:                                              ; preds = %148, %144
  %153 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %154 = load i32, ptr %153, align 4, !tbaa !19
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %162

156:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %157 unwind label %158

157:                                              ; preds = %156
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %494

158:                                              ; preds = %156
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %7, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %495

162:                                              ; preds = %152
  br label %163

163:                                              ; preds = %162, %148
  %164 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %165 = load i32, ptr %164, align 4, !tbaa !9
  %166 = icmp eq i32 %165, 11
  br i1 %166, label %171, label %167

167:                                              ; preds = %163
  %168 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %169 = load i32, ptr %168, align 4, !tbaa !9
  %170 = icmp eq i32 %169, 12
  br i1 %170, label %171, label %182

171:                                              ; preds = %167, %163
  %172 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %173 = load i32, ptr %172, align 4, !tbaa !19
  %174 = icmp ne i32 %173, 1
  br i1 %174, label %175, label %181

175:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %176 unwind label %177

176:                                              ; preds = %175
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %494

177:                                              ; preds = %175
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %7, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %495

181:                                              ; preds = %171
  br label %182

182:                                              ; preds = %181, %167
  %183 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %184 = load i32, ptr %183, align 4, !tbaa !9
  %185 = icmp eq i32 %184, 13
  br i1 %185, label %190, label %186

186:                                              ; preds = %182
  %187 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %188 = load i32, ptr %187, align 4, !tbaa !9
  %189 = icmp eq i32 %188, 14
  br i1 %189, label %190, label %201

190:                                              ; preds = %186, %182
  %191 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %192 = load i32, ptr %191, align 4, !tbaa !19
  %193 = icmp ne i32 %192, 2
  br i1 %193, label %194, label %200

194:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %195 unwind label %196

195:                                              ; preds = %194
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  br label %494

196:                                              ; preds = %194
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %7, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  br label %495

200:                                              ; preds = %190
  br label %201

201:                                              ; preds = %200, %186
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br label %494

202:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  %203 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %204 = load i32, ptr %203, align 4, !tbaa !9
  %205 = icmp eq i32 %204, 5
  %206 = zext i1 %205 to i8
  store i8 %206, ptr %19, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  %207 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 2
  %208 = load i32, ptr %207, align 4, !tbaa !17
  %209 = icmp eq i32 %208, 2
  %210 = zext i1 %209 to i8
  store i8 %210, ptr %20, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #5
  %211 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %212 = load i32, ptr %211, align 4, !tbaa !18
  %213 = icmp eq i32 %212, 16
  %214 = zext i1 %213 to i8
  store i8 %214, ptr %21, align 1, !tbaa !20
  %215 = load i8, ptr %19, align 1, !tbaa !20, !range !22, !noundef !23
  %216 = trunc i8 %215 to i1
  %217 = zext i1 %216 to i32
  %218 = load i8, ptr %20, align 1, !tbaa !20, !range !22, !noundef !23
  %219 = trunc i8 %218 to i1
  %220 = zext i1 %219 to i32
  %221 = icmp ne i32 %217, %220
  br i1 %221, label %230, label %222

222:                                              ; preds = %202
  %223 = load i8, ptr %20, align 1, !tbaa !20, !range !22, !noundef !23
  %224 = trunc i8 %223 to i1
  %225 = zext i1 %224 to i32
  %226 = load i8, ptr %21, align 1, !tbaa !20, !range !22, !noundef !23
  %227 = trunc i8 %226 to i1
  %228 = zext i1 %227 to i32
  %229 = icmp ne i32 %225, %228
  br i1 %229, label %230, label %236

230:                                              ; preds = %222, %202
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %231 unwind label %232

231:                                              ; preds = %230
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  store i32 1, ptr %9, align 4
  br label %254

232:                                              ; preds = %230
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %7, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  br label %270

236:                                              ; preds = %222
  %237 = load i8, ptr %19, align 1, !tbaa !20, !range !22, !noundef !23
  %238 = trunc i8 %237 to i1
  br i1 %238, label %239, label %249

239:                                              ; preds = %236
  %240 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %241 = load i32, ptr %240, align 4, !tbaa !19
  %242 = icmp ne i32 %241, 2
  br i1 %242, label %243, label %249

243:                                              ; preds = %239
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %244 unwind label %245

244:                                              ; preds = %243
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  store i32 1, ptr %9, align 4
  br label %254

245:                                              ; preds = %243
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %7, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  br label %270

249:                                              ; preds = %239, %236
  %250 = load i8, ptr %19, align 1, !tbaa !20, !range !22, !noundef !23
  %251 = trunc i8 %250 to i1
  br i1 %251, label %252, label %253

252:                                              ; preds = %249
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  store i32 1, ptr %9, align 4
  br label %254

253:                                              ; preds = %249
  store i32 0, ptr %9, align 4
  br label %254

254:                                              ; preds = %253, %252, %244, %231
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  %255 = load i32, ptr %9, align 4
  switch i32 %255, label %500 [
    i32 0, label %256
    i32 1, label %494
  ]

256:                                              ; preds = %254
  %257 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %258 = load i32, ptr %257, align 4, !tbaa !19
  %259 = icmp eq i32 %258, 8
  br i1 %259, label %264, label %260

260:                                              ; preds = %256
  %261 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %262 = load i32, ptr %261, align 4, !tbaa !19
  %263 = icmp eq i32 %262, 9
  br i1 %263, label %264, label %338

264:                                              ; preds = %260, %256
  %265 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 2
  %266 = load i32, ptr %265, align 4, !tbaa !17
  %267 = icmp ne i32 %266, 3
  br i1 %267, label %268, label %275

268:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %269 unwind label %271

269:                                              ; preds = %268
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  br label %494

270:                                              ; preds = %245, %232
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  br label %495

271:                                              ; preds = %268
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %7, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  br label %495

275:                                              ; preds = %264
  %276 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %277 = load i32, ptr %276, align 4, !tbaa !9
  %278 = icmp eq i32 %277, 0
  br i1 %278, label %279, label %306

279:                                              ; preds = %275
  %280 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %281 = load i32, ptr %280, align 4, !tbaa !19
  %282 = icmp eq i32 %281, 8
  br i1 %282, label %283, label %294

283:                                              ; preds = %279
  %284 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %285 = load i32, ptr %284, align 4, !tbaa !18
  %286 = icmp ne i32 %285, 2
  br i1 %286, label %287, label %293

287:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %288 unwind label %289

288:                                              ; preds = %287
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #5
  br label %494

289:                                              ; preds = %287
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %7, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #5
  br label %495

293:                                              ; preds = %283
  br label %305

294:                                              ; preds = %279
  %295 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %296 = load i32, ptr %295, align 4, !tbaa !18
  %297 = icmp ne i32 %296, 9
  br i1 %297, label %298, label %304

298:                                              ; preds = %294
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %299 unwind label %300

299:                                              ; preds = %298
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  br label %494

300:                                              ; preds = %298
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %7, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  br label %495

304:                                              ; preds = %294
  br label %305

305:                                              ; preds = %304, %293
  br label %332

306:                                              ; preds = %275
  %307 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %308 = load i32, ptr %307, align 4, !tbaa !9
  %309 = icmp eq i32 %308, 4
  br i1 %309, label %310, label %325

310:                                              ; preds = %306
  %311 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %312 = load i32, ptr %311, align 4, !tbaa !18
  %313 = icmp ne i32 %312, 3
  br i1 %313, label %318, label %314

314:                                              ; preds = %310
  %315 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %316 = load i32, ptr %315, align 4, !tbaa !19
  %317 = icmp ne i32 %316, 8
  br i1 %317, label %318, label %324

318:                                              ; preds = %314, %310
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %319 unwind label %320

319:                                              ; preds = %318
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #5
  br label %494

320:                                              ; preds = %318
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %7, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #5
  br label %495

324:                                              ; preds = %314
  br label %331

325:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %326 unwind label %327

326:                                              ; preds = %325
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #5
  br label %494

327:                                              ; preds = %325
  %328 = landingpad { ptr, i32 }
          cleanup
  %329 = extractvalue { ptr, i32 } %328, 0
  store ptr %329, ptr %7, align 8
  %330 = extractvalue { ptr, i32 } %328, 1
  store i32 %330, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #5
  br label %495

331:                                              ; preds = %324
  br label %332

332:                                              ; preds = %331, %305
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %333 unwind label %334

333:                                              ; preds = %332
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #5
  br label %494

334:                                              ; preds = %332
  %335 = landingpad { ptr, i32 }
          cleanup
  %336 = extractvalue { ptr, i32 } %335, 0
  store ptr %336, ptr %7, align 8
  %337 = extractvalue { ptr, i32 } %335, 1
  store i32 %337, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #5
  br label %495

338:                                              ; preds = %260
  %339 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %340 = load i32, ptr %339, align 4, !tbaa !18
  %341 = icmp eq i32 %340, 9
  br i1 %341, label %342, label %348

342:                                              ; preds = %338
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %343 unwind label %344

343:                                              ; preds = %342
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #5
  br label %494

344:                                              ; preds = %342
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %7, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #5
  br label %495

348:                                              ; preds = %338
  %349 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %350 = load i32, ptr %349, align 4, !tbaa !9
  %351 = icmp eq i32 %350, 4
  br i1 %351, label %352, label %363

352:                                              ; preds = %348
  %353 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %354 = load i32, ptr %353, align 4, !tbaa !18
  %355 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi3ENS_8BitdepthEEEbT0_PS3_(i32 noundef %354, ptr noundef @_ZN5glimg12_GLOBAL__N_116g_floatBitdepthsE)
  br i1 %355, label %362, label %356

356:                                              ; preds = %352
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %357 unwind label %358

357:                                              ; preds = %356
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #5
  br label %494

358:                                              ; preds = %356
  %359 = landingpad { ptr, i32 }
          cleanup
  %360 = extractvalue { ptr, i32 } %359, 0
  store ptr %360, ptr %7, align 8
  %361 = extractvalue { ptr, i32 } %359, 1
  store i32 %361, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #5
  br label %495

362:                                              ; preds = %352
  br label %363

363:                                              ; preds = %362, %348
  %364 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %365 = load i32, ptr %364, align 4, !tbaa !19
  %366 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi3ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef %365, ptr noundef @_ZN5glimg12_GLOBAL__N_113g_srgbFormatsE)
  br i1 %366, label %367, label %378

367:                                              ; preds = %363
  %368 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %369 = load i32, ptr %368, align 4, !tbaa !9
  %370 = icmp ne i32 %369, 0
  br i1 %370, label %371, label %377

371:                                              ; preds = %367
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %372 unwind label %373

372:                                              ; preds = %371
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #5
  br label %494

373:                                              ; preds = %371
  %374 = landingpad { ptr, i32 }
          cleanup
  %375 = extractvalue { ptr, i32 } %374, 0
  store ptr %375, ptr %7, align 8
  %376 = extractvalue { ptr, i32 } %374, 1
  store i32 %376, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #5
  br label %495

377:                                              ; preds = %367
  br label %378

378:                                              ; preds = %377, %363
  %379 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %380 = load i32, ptr %379, align 4, !tbaa !18
  %381 = icmp eq i32 %380, 15
  br i1 %381, label %382, label %401

382:                                              ; preds = %378
  %383 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %384 = load i32, ptr %383, align 4, !tbaa !9
  %385 = icmp eq i32 %384, 4
  br i1 %385, label %386, label %394

386:                                              ; preds = %382
  %387 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 2
  %388 = load i32, ptr %387, align 4, !tbaa !17
  %389 = icmp eq i32 %388, 0
  br i1 %389, label %390, label %394

390:                                              ; preds = %386
  %391 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %392 = load i32, ptr %391, align 4, !tbaa !19
  %393 = icmp eq i32 %392, 2
  br i1 %393, label %400, label %394

394:                                              ; preds = %390, %386, %382
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %395 unwind label %396

395:                                              ; preds = %394
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #5
  br label %494

396:                                              ; preds = %394
  %397 = landingpad { ptr, i32 }
          cleanup
  %398 = extractvalue { ptr, i32 } %397, 0
  store ptr %398, ptr %7, align 8
  %399 = extractvalue { ptr, i32 } %397, 1
  store i32 %399, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #5
  br label %495

400:                                              ; preds = %390
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br label %494

401:                                              ; preds = %378
  %402 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %403 = load i32, ptr %402, align 4, !tbaa !18
  %404 = icmp sge i32 %403, 4
  br i1 %404, label %405, label %458

405:                                              ; preds = %401
  %406 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %407 = load i32, ptr %406, align 4, !tbaa !9
  %408 = icmp ne i32 %407, 0
  br i1 %408, label %409, label %419

409:                                              ; preds = %405
  %410 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %411 = load i32, ptr %410, align 4, !tbaa !9
  %412 = icmp ne i32 %411, 4
  br i1 %412, label %413, label %419

413:                                              ; preds = %409
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.22, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %414 unwind label %415

414:                                              ; preds = %413
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #5
  br label %494

415:                                              ; preds = %413
  %416 = landingpad { ptr, i32 }
          cleanup
  %417 = extractvalue { ptr, i32 } %416, 0
  store ptr %417, ptr %7, align 8
  %418 = extractvalue { ptr, i32 } %416, 1
  store i32 %418, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #5
  br label %495

419:                                              ; preds = %409, %405
  %420 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %421 = load i32, ptr %420, align 4, !tbaa !19
  %422 = call noundef i32 @_ZN5glimg14ComponentCountENS_15PixelComponentsE(i32 noundef %421)
  switch i32 %422, label %457 [
    i32 1, label %423
    i32 2, label %429
    i32 3, label %435
    i32 4, label %446
  ]

423:                                              ; preds = %419
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.23, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %424 unwind label %425

424:                                              ; preds = %423
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #5
  br label %494

425:                                              ; preds = %423
  %426 = landingpad { ptr, i32 }
          cleanup
  %427 = extractvalue { ptr, i32 } %426, 0
  store ptr %427, ptr %7, align 8
  %428 = extractvalue { ptr, i32 } %426, 1
  store i32 %428, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #5
  br label %495

429:                                              ; preds = %419
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.24, ptr noundef nonnull align 1 dereferenceable(1) %36)
          to label %430 unwind label %431

430:                                              ; preds = %429
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #5
  br label %494

431:                                              ; preds = %429
  %432 = landingpad { ptr, i32 }
          cleanup
  %433 = extractvalue { ptr, i32 } %432, 0
  store ptr %433, ptr %7, align 8
  %434 = extractvalue { ptr, i32 } %432, 1
  store i32 %434, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #5
  br label %495

435:                                              ; preds = %419
  %436 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %437 = load i32, ptr %436, align 4, !tbaa !18
  %438 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_8BitdepthEEEbT0_PS3_(i32 noundef %437, ptr noundef @_ZN5glimg12_GLOBAL__N_120g_threeCompBitdepthsE)
  br i1 %438, label %445, label %439

439:                                              ; preds = %435
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.25, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %440 unwind label %441

440:                                              ; preds = %439
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #5
  br label %494

441:                                              ; preds = %439
  %442 = landingpad { ptr, i32 }
          cleanup
  %443 = extractvalue { ptr, i32 } %442, 0
  store ptr %443, ptr %7, align 8
  %444 = extractvalue { ptr, i32 } %442, 1
  store i32 %444, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #5
  br label %495

445:                                              ; preds = %435
  br label %457

446:                                              ; preds = %419
  %447 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %448 = load i32, ptr %447, align 4, !tbaa !18
  %449 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_8BitdepthEEEbT0_PS3_(i32 noundef %448, ptr noundef @_ZN5glimg12_GLOBAL__N_120g_threeCompBitdepthsE)
  br i1 %449, label %450, label %456

450:                                              ; preds = %446
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.26, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %451 unwind label %452

451:                                              ; preds = %450
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #5
  br label %494

452:                                              ; preds = %450
  %453 = landingpad { ptr, i32 }
          cleanup
  %454 = extractvalue { ptr, i32 } %453, 0
  store ptr %454, ptr %7, align 8
  %455 = extractvalue { ptr, i32 } %453, 1
  store i32 %455, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #5
  br label %495

456:                                              ; preds = %446
  br label %457

457:                                              ; preds = %456, %445, %419
  br label %458

458:                                              ; preds = %457, %401
  %459 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 3
  %460 = load i32, ptr %459, align 4, !tbaa !18
  %461 = icmp eq i32 %460, 3
  br i1 %461, label %462, label %477

462:                                              ; preds = %458
  %463 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %464 = load i32, ptr %463, align 4, !tbaa !9
  %465 = icmp eq i32 %464, 0
  br i1 %465, label %470, label %466

466:                                              ; preds = %462
  %467 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 0
  %468 = load i32, ptr %467, align 4, !tbaa !9
  %469 = icmp eq i32 %468, 1
  br i1 %469, label %470, label %476

470:                                              ; preds = %466, %462
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %471 unwind label %472

471:                                              ; preds = %470
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #5
  br label %494

472:                                              ; preds = %470
  %473 = landingpad { ptr, i32 }
          cleanup
  %474 = extractvalue { ptr, i32 } %473, 0
  store ptr %474, ptr %7, align 8
  %475 = extractvalue { ptr, i32 } %473, 1
  store i32 %475, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #5
  br label %495

476:                                              ; preds = %466
  br label %477

477:                                              ; preds = %476, %458
  %478 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 2
  %479 = load i32, ptr %478, align 4, !tbaa !17
  %480 = icmp eq i32 %479, 1
  br i1 %480, label %481, label %493

481:                                              ; preds = %477
  %482 = getelementptr inbounds %"struct.glimg::UncheckedImageFormat", ptr %41, i32 0, i32 1
  %483 = load i32, ptr %482, align 4, !tbaa !19
  %484 = call noundef i32 @_ZN5glimg14ComponentCountENS_15PixelComponentsE(i32 noundef %483)
  %485 = icmp slt i32 %484, 3
  br i1 %485, label %486, label %492

486:                                              ; preds = %481
  call void @llvm.lifetime.start.p0(i64 1, ptr %40) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.28, ptr noundef nonnull align 1 dereferenceable(1) %40)
          to label %487 unwind label %488

487:                                              ; preds = %486
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #5
  br label %494

488:                                              ; preds = %486
  %489 = landingpad { ptr, i32 }
          cleanup
  %490 = extractvalue { ptr, i32 } %489, 0
  store ptr %490, ptr %7, align 8
  %491 = extractvalue { ptr, i32 } %489, 1
  store i32 %491, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #5
  br label %495

492:                                              ; preds = %481
  br label %493

493:                                              ; preds = %492, %477
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br label %494

494:                                              ; preds = %493, %487, %471, %451, %440, %430, %424, %414, %400, %395, %372, %357, %343, %333, %326, %319, %299, %288, %269, %254, %201, %195, %176, %157, %137, %118, %96, %86, %77
  ret void

495:                                              ; preds = %488, %472, %452, %441, %431, %425, %415, %396, %373, %358, %344, %334, %327, %320, %300, %289, %271, %270, %196, %177, %158, %138, %119, %97, %87, %80
  %496 = load ptr, ptr %7, align 8
  %497 = load i32, ptr %8, align 4
  %498 = insertvalue { ptr, i32 } poison, ptr %496, 0
  %499 = insertvalue { ptr, i32 } %498, i32 %497, 1
  resume { ptr, i32 } %499

500:                                              ; preds = %254, %77
  unreachable
}

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

; 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) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi4EiEEbT0_PS2_(i32 noundef, ptr noundef) #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef, ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi3ENS_8BitdepthEEEbT0_PS3_(i32 noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi3ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef, ptr noundef) #3

declare noundef i32 @_ZN5glimg14ComponentCountENS_15PixelComponentsE(i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_8BitdepthEEEbT0_PS3_(i32 noundef, ptr noundef) #3

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

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

!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, !11, i64 0}
!10 = !{!"_ZTSN5glimg20UncheckedImageFormatE", !11, i64 0, !12, i64 4, !13, i64 8, !14, i64 12, !15, i64 16}
!11 = !{!"_ZTSN5glimg13PixelDataTypeE", !7, i64 0}
!12 = !{!"_ZTSN5glimg15PixelComponentsE", !7, i64 0}
!13 = !{!"_ZTSN5glimg14ComponentOrderE", !7, i64 0}
!14 = !{!"_ZTSN5glimg8BitdepthE", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!10, !15, i64 16}
!17 = !{!10, !13, i64 8}
!18 = !{!10, !14, i64 12}
!19 = !{!10, !12, i64 4}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}


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

@__const._ZNK5glimg20UncheckedImageFormat18ValidateFormatTextB5cxx11Ev.tests = external hidden unnamed_addr constant [4 x i32], align 16
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [50 x i8], align 1
@_ZN5glimg12_GLOBAL__N_114g_alphaFormatsE = external hidden global [2 x i32], align 4
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1
@_ZN5glimg12_GLOBAL__N_112g_rgbFormatsE = external hidden global [2 x i32], align 4
@.str.6 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [59 x i8], align 1
@_ZN5glimg12_GLOBAL__N_116g_floatBitdepthsE = external hidden global [3 x i32], align 4
@.str.19 = external hidden unnamed_addr constant [89 x i8], align 1
@_ZN5glimg12_GLOBAL__N_113g_srgbFormatsE = external hidden global [3 x i32], align 4
@.str.20 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [67 x i8], align 1
@_ZN5glimg12_GLOBAL__N_120g_threeCompBitdepthsE = external hidden global [2 x i32], align 4
@.str.25 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [46 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5glimg20UncheckedImageFormat18ValidateFormatTextB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(20) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [4 x i32], align 16
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca %"class.std::allocator", align 1
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca %"class.std::allocator", align 1
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca %"class.std::allocator", align 1
  %31 = alloca %"class.std::allocator", align 1
  %32 = alloca %"class.std::allocator", align 1
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = icmp slt i32 %33, 6
  br i1 %34, label %35, label %60

35:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 16 dereferenceable(16) @__const._ZNK5glimg20UncheckedImageFormat18ValidateFormatTextB5cxx11Ev.tests, i64 16, i1 false)
  %36 = getelementptr inbounds i8, ptr %1, i64 16
  %37 = load i32, ptr %36, align 4, !tbaa !14
  %38 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi4EiEEbT0_PS2_(i32 noundef %37, ptr noundef nonnull %3)
  br i1 %38, label %43, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %40 unwind label %41

40:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %.thread

41:                                               ; preds = %39
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %59

43:                                               ; preds = %35
  %44 = getelementptr inbounds i8, ptr %1, i64 8
  %45 = load i32, ptr %44, align 4, !tbaa !15
  %46 = icmp eq i32 %45, 4
  br i1 %46, label %47, label %51

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

48:                                               ; preds = %47
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %.thread

49:                                               ; preds = %47
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %59

51:                                               ; preds = %43
  %52 = getelementptr inbounds i8, ptr %1, i64 12
  %53 = load i32, ptr %52, align 4, !tbaa !16
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %116

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %56 unwind label %57

56:                                               ; preds = %55
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  br label %.thread

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

.thread:                                          ; preds = %48, %56, %40
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  br label %.thread75

59:                                               ; preds = %57, %49, %41
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %58, %57 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  br label %256

60:                                               ; preds = %2
  %61 = getelementptr inbounds i8, ptr %1, i64 8
  %62 = load i32, ptr %61, align 4, !tbaa !15
  %.not = icmp eq i32 %62, 4
  br i1 %.not, label %67, label %63

63:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %64 unwind label %65

64:                                               ; preds = %63
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  br label %.thread75

65:                                               ; preds = %63
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  br label %256

67:                                               ; preds = %60
  %68 = getelementptr inbounds i8, ptr %1, i64 12
  %69 = load i32, ptr %68, align 4, !tbaa !16
  %.not26 = icmp eq i32 %69, 0
  br i1 %.not26, label %74, label %70

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %71 unwind label %72

71:                                               ; preds = %70
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  br label %.thread75

72:                                               ; preds = %70
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  br label %256

74:                                               ; preds = %67
  switch i32 %33, label %94 [
    i32 7, label %75
    i32 8, label %75
    i32 15, label %75
    i32 6, label %83
  ]

75:                                               ; preds = %74, %74, %74
  %76 = getelementptr inbounds i8, ptr %1, i64 4
  %77 = load i32, ptr %76, align 4, !tbaa !17
  %78 = tail call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef %77, ptr noundef nonnull @_ZN5glimg12_GLOBAL__N_114g_alphaFormatsE)
  br i1 %78, label %94, label %79

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %80 unwind label %81

80:                                               ; preds = %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  br label %.thread75

81:                                               ; preds = %79
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  br label %256

83:                                               ; preds = %74
  %84 = getelementptr inbounds i8, ptr %1, i64 4
  %85 = load i32, ptr %84, align 4, !tbaa !17
  %86 = tail call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef %85, ptr noundef nonnull @_ZN5glimg12_GLOBAL__N_112g_rgbFormatsE)
  br i1 %86, label %94, label %87

87:                                               ; preds = %83
  %88 = load i32, ptr %84, align 4, !tbaa !17
  %89 = tail call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef %88, ptr noundef nonnull @_ZN5glimg12_GLOBAL__N_114g_alphaFormatsE)
  br i1 %89, label %94, label %90

90:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %91 unwind label %92

91:                                               ; preds = %90
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  br label %.thread75

92:                                               ; preds = %90
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  br label %256

94:                                               ; preds = %74, %87, %83, %75
  %95 = load i32, ptr %1, align 4, !tbaa !5
  %96 = add i32 %95, -11
  %switch57 = icmp ult i32 %96, -2
  %97 = getelementptr inbounds i8, ptr %1, i64 4
  %98 = load i32, ptr %97, align 4
  %.not27 = icmp eq i32 %98, 0
  %or.cond59 = select i1 %switch57, i1 true, i1 %.not27
  br i1 %or.cond59, label %103, label %99

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %100 unwind label %101

100:                                              ; preds = %99
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %.thread75

101:                                              ; preds = %99
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %256

103:                                              ; preds = %94
  %104 = add i32 %95, -13
  %switch61 = icmp ult i32 %104, -2
  %.not28 = icmp eq i32 %98, 1
  %or.cond63 = select i1 %switch61, i1 true, i1 %.not28
  br i1 %or.cond63, label %109, label %105

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %106 unwind label %107

106:                                              ; preds = %105
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %.thread75

107:                                              ; preds = %105
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %256

109:                                              ; preds = %103
  %110 = add i32 %95, -15
  %switch65 = icmp ult i32 %110, -2
  %.not29 = icmp eq i32 %98, 2
  %or.cond67 = select i1 %switch65, i1 true, i1 %.not29
  br i1 %or.cond67, label %115, label %111

111:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %112 unwind label %113

112:                                              ; preds = %111
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  br label %.thread75

113:                                              ; preds = %111
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  br label %256

115:                                              ; preds = %109
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br label %.thread75

116:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %117 = load i32, ptr %1, align 4, !tbaa !5
  %118 = icmp eq i32 %117, 5
  %119 = icmp eq i32 %45, 2
  %120 = xor i1 %118, %119
  %121 = icmp eq i32 %53, 16
  %.not32.not = xor i1 %119, %121
  %or.cond.not79 = or i1 %.not32.not, %120
  br i1 %or.cond.not79, label %122, label %126

122:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %123 unwind label %124

123:                                              ; preds = %122
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  br label %.thread75

124:                                              ; preds = %122
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  br label %256

126:                                              ; preds = %116
  %127 = getelementptr inbounds i8, ptr %1, i64 4
  %128 = load i32, ptr %127, align 4
  %.not33 = icmp ne i32 %128, 2
  %or.cond.not = select i1 %118, i1 %.not33, i1 false
  br i1 %or.cond.not, label %129, label %133

129:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %130 unwind label %131

130:                                              ; preds = %129
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  br label %.thread75

131:                                              ; preds = %129
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  br label %256

133:                                              ; preds = %126
  br i1 %118, label %134, label %135

134:                                              ; preds = %133
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br label %.thread75

135:                                              ; preds = %133
  %136 = and i32 %128, -2
  %switch69 = icmp eq i32 %136, 8
  br i1 %switch69, label %137, label %168

137:                                              ; preds = %135
  %.not39 = icmp eq i32 %45, 3
  br i1 %.not39, label %142, label %138

138:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %139 unwind label %140

139:                                              ; preds = %138
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  br label %.thread75

140:                                              ; preds = %138
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  br label %256

142:                                              ; preds = %137
  switch i32 %117, label %160 [
    i32 0, label %143
    i32 4, label %155
  ]

143:                                              ; preds = %142
  %144 = icmp eq i32 %128, 8
  br i1 %144, label %145, label %150

145:                                              ; preds = %143
  %.not43 = icmp eq i32 %53, 2
  br i1 %.not43, label %164, label %146

146:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %147 unwind label %148

147:                                              ; preds = %146
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #5
  br label %.thread75

148:                                              ; preds = %146
  %149 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #5
  br label %256

150:                                              ; preds = %143
  %.not42 = icmp eq i32 %53, 9
  br i1 %.not42, label %164, label %151

151:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %152 unwind label %153

152:                                              ; preds = %151
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  br label %.thread75

153:                                              ; preds = %151
  %154 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  br label %256

155:                                              ; preds = %142
  %.not40 = icmp eq i32 %53, 3
  %.not41 = icmp eq i32 %128, 8
  %or.cond50 = and i1 %.not41, %.not40
  br i1 %or.cond50, label %164, label %156

156:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %157 unwind label %158

157:                                              ; preds = %156
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #5
  br label %.thread75

158:                                              ; preds = %156
  %159 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #5
  br label %256

160:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %161 unwind label %162

161:                                              ; preds = %160
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #5
  br label %.thread75

162:                                              ; preds = %160
  %163 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #5
  br label %256

164:                                              ; preds = %155, %145, %150
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %165 unwind label %166

165:                                              ; preds = %164
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #5
  br label %.thread75

166:                                              ; preds = %164
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #5
  br label %256

168:                                              ; preds = %135
  %169 = icmp eq i32 %53, 9
  br i1 %169, label %170, label %174

170:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %171 unwind label %172

171:                                              ; preds = %170
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #5
  br label %.thread75

172:                                              ; preds = %170
  %173 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #5
  br label %256

174:                                              ; preds = %168
  %175 = icmp eq i32 %117, 4
  br i1 %175, label %176, label %182

176:                                              ; preds = %174
  %177 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi3ENS_8BitdepthEEEbT0_PS3_(i32 noundef %53, ptr noundef nonnull @_ZN5glimg12_GLOBAL__N_116g_floatBitdepthsE)
  br i1 %177, label %._crit_edge, label %178

._crit_edge:                                      ; preds = %176
  %.pre = load i32, ptr %127, align 4, !tbaa !17
  br label %182

178:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %179 unwind label %180

179:                                              ; preds = %178
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #5
  br label %.thread75

180:                                              ; preds = %178
  %181 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #5
  br label %256

182:                                              ; preds = %._crit_edge, %174
  %183 = phi i32 [ %.pre, %._crit_edge ], [ %128, %174 ]
  %184 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi3ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef %183, ptr noundef nonnull @_ZN5glimg12_GLOBAL__N_113g_srgbFormatsE)
  %185 = load i32, ptr %1, align 4
  %.not36 = icmp ne i32 %185, 0
  %or.cond52.not = select i1 %184, i1 %.not36, i1 false
  br i1 %or.cond52.not, label %186, label %190

186:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %24) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %187 unwind label %188

187:                                              ; preds = %186
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #5
  br label %.thread75

188:                                              ; preds = %186
  %189 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #5
  br label %256

190:                                              ; preds = %182
  %191 = load i32, ptr %52, align 4, !tbaa !16
  %192 = icmp eq i32 %191, 15
  br i1 %192, label %193, label %204

193:                                              ; preds = %190
  %194 = icmp eq i32 %185, 4
  %195 = load i32, ptr %44, align 4
  %196 = icmp eq i32 %195, 0
  %or.cond54 = select i1 %194, i1 %196, i1 false
  %197 = load i32, ptr %127, align 4
  %198 = icmp eq i32 %197, 2
  %or.cond56 = select i1 %or.cond54, i1 %198, i1 false
  br i1 %or.cond56, label %203, label %199

199:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %25) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %200 unwind label %201

200:                                              ; preds = %199
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #5
  br label %.thread75

201:                                              ; preds = %199
  %202 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #5
  br label %256

203:                                              ; preds = %193
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br label %.thread75

204:                                              ; preds = %190
  %205 = icmp sgt i32 %191, 3
  br i1 %205, label %206, label %236

206:                                              ; preds = %204
  switch i32 %185, label %207 [
    i32 0, label %211
    i32 4, label %211
  ]

207:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %26) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.22, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %208 unwind label %209

208:                                              ; preds = %207
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %26) #5
  br label %.thread75

209:                                              ; preds = %207
  %210 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %26) #5
  br label %256

211:                                              ; preds = %206, %206
  %212 = load i32, ptr %127, align 4, !tbaa !17
  %213 = call noundef i32 @_ZN5glimg14ComponentCountENS_15PixelComponentsE(i32 noundef %212)
  switch i32 %213, label %236 [
    i32 1, label %214
    i32 2, label %218
    i32 3, label %222
    i32 4, label %229
  ]

214:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %27) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.23, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %215 unwind label %216

215:                                              ; preds = %214
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #5
  br label %.thread75

216:                                              ; preds = %214
  %217 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #5
  br label %256

218:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %28) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.24, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %219 unwind label %220

219:                                              ; preds = %218
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #5
  br label %.thread75

220:                                              ; preds = %218
  %221 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #5
  br label %256

222:                                              ; preds = %211
  %223 = load i32, ptr %52, align 4, !tbaa !16
  %224 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_8BitdepthEEEbT0_PS3_(i32 noundef %223, ptr noundef nonnull @_ZN5glimg12_GLOBAL__N_120g_threeCompBitdepthsE)
  br i1 %224, label %236, label %225

225:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %29) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.25, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %226 unwind label %227

226:                                              ; preds = %225
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #5
  br label %.thread75

227:                                              ; preds = %225
  %228 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #5
  br label %256

229:                                              ; preds = %211
  %230 = load i32, ptr %52, align 4, !tbaa !16
  %231 = call noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_8BitdepthEEEbT0_PS3_(i32 noundef %230, ptr noundef nonnull @_ZN5glimg12_GLOBAL__N_120g_threeCompBitdepthsE)
  br i1 %231, label %232, label %236

232:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %30) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.26, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %233 unwind label %234

233:                                              ; preds = %232
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %30) #5
  br label %.thread75

234:                                              ; preds = %232
  %235 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %30) #5
  br label %256

236:                                              ; preds = %211, %222, %229, %204
  %237 = load i32, ptr %52, align 4, !tbaa !16
  %238 = icmp eq i32 %237, 3
  %239 = load i32, ptr %1, align 4
  %switch70 = icmp ult i32 %239, 2
  %or.cond71 = select i1 %238, i1 %switch70, i1 false
  br i1 %or.cond71, label %240, label %244

240:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %241 unwind label %242

241:                                              ; preds = %240
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #5
  br label %.thread75

242:                                              ; preds = %240
  %243 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #5
  br label %256

244:                                              ; preds = %236
  %245 = load i32, ptr %44, align 4, !tbaa !15
  %246 = icmp eq i32 %245, 1
  br i1 %246, label %247, label %255

247:                                              ; preds = %244
  %248 = load i32, ptr %127, align 4, !tbaa !17
  %249 = call noundef i32 @_ZN5glimg14ComponentCountENS_15PixelComponentsE(i32 noundef %248)
  %250 = icmp slt i32 %249, 3
  br i1 %250, label %251, label %255

251:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %32) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.28, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %252 unwind label %253

252:                                              ; preds = %251
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %32) #5
  br label %.thread75

253:                                              ; preds = %251
  %254 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %32) #5
  br label %256

255:                                              ; preds = %247, %244
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br label %.thread75

.thread75:                                        ; preds = %134, %130, %123, %.thread, %255, %252, %241, %233, %226, %219, %215, %208, %203, %200, %187, %179, %171, %165, %161, %157, %152, %147, %139, %115, %112, %106, %100, %91, %80, %71, %64
  ret void

256:                                              ; preds = %124, %131, %253, %242, %234, %227, %220, %216, %209, %201, %188, %180, %172, %166, %162, %158, %153, %148, %140, %113, %107, %101, %92, %81, %72, %65, %59
  %.pn44 = phi { ptr, i32 } [ %141, %140 ], [ %149, %148 ], [ %167, %166 ], [ %154, %153 ], [ %159, %158 ], [ %163, %162 ], [ %173, %172 ], [ %189, %188 ], [ %202, %201 ], [ %210, %209 ], [ %243, %242 ], [ %254, %253 ], [ %235, %234 ], [ %228, %227 ], [ %221, %220 ], [ %217, %216 ], [ %181, %180 ], [ %.pn, %59 ], [ %66, %65 ], [ %73, %72 ], [ %102, %101 ], [ %108, %107 ], [ %114, %113 ], [ %82, %81 ], [ %93, %92 ], [ %125, %124 ], [ %132, %131 ]
  resume { ptr, i32 } %.pn44
}

; 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 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) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi4EiEEbT0_PS2_(i32 noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi3ENS_8BitdepthEEEbT0_PS3_(i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi3ENS_15PixelComponentsEEEbT0_PS3_(i32 noundef, ptr noundef) local_unnamed_addr #3

declare noundef i32 @_ZN5glimg14ComponentCountENS_15PixelComponentsE(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5glimg12_GLOBAL__N_112IsOneOfTheseILi2ENS_8BitdepthEEEbT0_PS3_(i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

!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 = !{!"_ZTSN5glimg20UncheckedImageFormatE", !7, i64 0, !10, i64 4, !11, i64 8, !12, i64 12, !13, i64 16}
!7 = !{!"_ZTSN5glimg13PixelDataTypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN5glimg15PixelComponentsE", !8, i64 0}
!11 = !{!"_ZTSN5glimg14ComponentOrderE", !8, i64 0}
!12 = !{!"_ZTSN5glimg8BitdepthE", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!6, !13, i64 16}
!15 = !{!6, !11, i64 8}
!16 = !{!6, !12, i64 12}
!17 = !{!6, !10, i64 4}


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