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

; 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::basic_fstream" = type { %"class.std::basic_iostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.3 }
%union.anon.3 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%"class.std::fpos" = type { i64, %struct.__mbstate_t }
%"class.Glip::CoreGL::HdlTextureFormat" = type { %"class.Glip::CoreGL::HdlAbstractTextureFormat.base", [4 x i8] }
%"class.Glip::CoreGL::HdlAbstractTextureFormat.base" = type <{ ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>

@_ZN4Glip7Modules11ImageBuffer15headerSignatureB5cxx11E = external dso_local global %"class.std::__cxx11::basic_string", align 8
@.str.3 = external hidden unnamed_addr constant [94 x i8], align 1
@_ZTIN4Glip9ExceptionE = external constant ptr
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [49 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4Glip7Modules11ImageBuffer6getPtrEv(ptr noundef nonnull align 8 dereferenceable(72)) #2 align 2

declare ptr @__cxa_allocate_exception(i64)

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4Glip7Modules11ImageBuffer4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS7_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::basic_fstream", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca i32, align 4
  %13 = alloca i1, align 1
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::fpos", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca i32, align 4
  %21 = alloca i1, align 1
  %22 = alloca %"class.std::fpos", align 8
  %23 = alloca [56 x i8], align 16
  %24 = alloca i32, align 4
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  %30 = alloca %"class.std::allocator", align 1
  %31 = alloca i32, align 4
  %32 = alloca i1, align 1
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca %"class.std::__cxx11::basic_string", align 8
  %46 = alloca %"class.std::__cxx11::basic_string", align 8
  %47 = alloca %"class.std::__cxx11::basic_string", align 8
  %48 = alloca %"class.std::allocator", align 1
  %49 = alloca i32, align 4
  %50 = alloca i1, align 1
  %51 = alloca ptr, align 8
  %52 = alloca %"class.Glip::CoreGL::HdlTextureFormat", align 8
  %53 = alloca ptr, align 8
  %54 = alloca i64, align 8
  %55 = alloca %"class.std::fpos", align 8
  %56 = alloca %"class.std::__cxx11::basic_string", align 8
  %57 = alloca %"class.std::__cxx11::basic_string", align 8
  %58 = alloca %"class.std::__cxx11::basic_string", align 8
  %59 = alloca %"class.std::allocator", align 1
  %60 = alloca i32, align 4
  %61 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 528, ptr %5) #9
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(264) %5)
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %62) #9
  %64 = invoke noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 8, i32 noundef 4)
          to label %65 unwind label %77

65:                                               ; preds = %2
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef %63, i32 noundef %64)
          to label %66 unwind label %77

66:                                               ; preds = %65
  %67 = invoke noundef zeroext i1 @_ZNSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(264) %5)
          to label %68 unwind label %77

68:                                               ; preds = %66
  br i1 %67, label %103, label %69

69:                                               ; preds = %68
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %5)
          to label %70 unwind label %77

70:                                               ; preds = %69
  store i1 true, ptr %13, align 1
  %71 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #9
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef @.str.15, ptr noundef nonnull align 8 dereferenceable(32) %72)
          to label %73 unwind label %81

73:                                               ; preds = %70
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.16)
          to label %74 unwind label %85

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

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 2, ptr %12, align 4, !tbaa !9
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %71, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %10, i32 noundef 589, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %76 unwind label %93

76:                                               ; preds = %75
  store i1 false, ptr %13, align 1
  invoke void @__cxa_throw(ptr %71, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #10
          to label %510 unwind label %93

77:                                               ; preds = %103, %69, %66, %65, %2
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %6, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %7, align 4
  br label %504

81:                                               ; preds = %70
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %6, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %7, align 4
  br label %99

85:                                               ; preds = %73
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %6, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %7, align 4
  br label %98

89:                                               ; preds = %74
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  br label %97

93:                                               ; preds = %76, %75
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %6, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  br label %97

97:                                               ; preds = %93, %89
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  br label %98

98:                                               ; preds = %97, %85
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  br label %99

99:                                               ; preds = %98, %81
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #9
  %100 = load i1, ptr %13, align 1
  br i1 %100, label %101, label %102

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

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

103:                                              ; preds = %68
  %104 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 0, i32 noundef 2)
          to label %105 unwind label %77

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #9
  %106 = invoke { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %107 unwind label %123

107:                                              ; preds = %105
  %108 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 0
  %109 = extractvalue { i64, i64 } %106, 0
  store i64 %109, ptr %108, align 8
  %110 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 1
  %111 = extractvalue { i64, i64 } %106, 1
  store i64 %111, ptr %110, align 8
  %112 = invoke noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %113 unwind label %123

113:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #9
  store i64 %112, ptr %14, align 8, !tbaa !11
  %114 = load i64, ptr %14, align 8, !tbaa !11
  %115 = icmp ult i64 %114, 56
  br i1 %115, label %116, label %149

116:                                              ; preds = %113
  store i1 true, ptr %21, align 1
  %117 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #9
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %118)
          to label %119 unwind label %127

119:                                              ; preds = %116
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.18)
          to label %120 unwind label %131

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %121 unwind label %135

121:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 2, ptr %20, align 4, !tbaa !9
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %117, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef %18, i32 noundef 596, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %122 unwind label %139

122:                                              ; preds = %121
  store i1 false, ptr %21, align 1
  invoke void @__cxa_throw(ptr %117, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #10
          to label %510 unwind label %139

123:                                              ; preds = %107, %105
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %6, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #9
  br label %503

127:                                              ; preds = %116
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %6, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %7, align 4
  br label %145

131:                                              ; preds = %119
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %6, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %7, align 4
  br label %144

135:                                              ; preds = %120
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %6, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %7, align 4
  br label %143

139:                                              ; preds = %122, %121
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %6, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #9
  br label %143

143:                                              ; preds = %139, %135
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #9
  br label %144

144:                                              ; preds = %143, %131
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  br label %145

145:                                              ; preds = %144, %127
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #9
  %146 = load i1, ptr %21, align 1
  br i1 %146, label %147, label %148

147:                                              ; preds = %145
  call void @__cxa_free_exception(ptr %117) #9
  br label %148

148:                                              ; preds = %147, %145
  br label %503

149:                                              ; preds = %113
  invoke void @_ZNSt4fposI11__mbstate_tEC2El(ptr noundef nonnull align 8 dereferenceable(16) %22, i64 noundef 0)
          to label %150 unwind label %171

150:                                              ; preds = %149
  %151 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 0
  %152 = load i64, ptr %151, align 8
  %153 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 1
  %154 = load i64, ptr %153, align 8
  %155 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgESt4fposI11__mbstate_tE(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 %152, i64 %154)
          to label %156 unwind label %171

156:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #9
  %157 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %158 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %157, i64 noundef 56)
          to label %159 unwind label %175

159:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #9
  %160 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef %160, i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %161 unwind label %179

161:                                              ; preds = %159
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #9
  %162 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) @_ZN4Glip7Modules11ImageBuffer15headerSignatureB5cxx11E) #9
  br i1 %162, label %163, label %209

163:                                              ; preds = %161
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %5)
          to label %164 unwind label %183

164:                                              ; preds = %163
  store i1 true, ptr %32, align 1
  %165 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #9
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %28, ptr noundef @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %166)
          to label %167 unwind label %187

167:                                              ; preds = %164
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %27, ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef @.str.19)
          to label %168 unwind label %191

168:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %169 unwind label %195

169:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  store i32 2, ptr %31, align 4, !tbaa !9
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %165, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef %29, i32 noundef 614, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %170 unwind label %199

170:                                              ; preds = %169
  store i1 false, ptr %32, align 1
  invoke void @__cxa_throw(ptr %165, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #10
          to label %510 unwind label %199

171:                                              ; preds = %150, %149
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %6, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %7, align 4
  br label %503

175:                                              ; preds = %156
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %6, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %7, align 4
  br label %502

179:                                              ; preds = %159
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %6, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #9
  br label %501

183:                                              ; preds = %163
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %6, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %7, align 4
  br label %500

187:                                              ; preds = %164
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %6, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %7, align 4
  br label %205

191:                                              ; preds = %167
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %6, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %7, align 4
  br label %204

195:                                              ; preds = %168
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %6, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %7, align 4
  br label %203

199:                                              ; preds = %170, %169
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %6, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #9
  br label %203

203:                                              ; preds = %199, %195
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  br label %204

204:                                              ; preds = %203, %191
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  br label %205

205:                                              ; preds = %204, %187
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #9
  %206 = load i1, ptr %32, align 1
  br i1 %206, label %207, label %208

207:                                              ; preds = %205
  call void @__cxa_free_exception(ptr %165) #9
  br label %208

208:                                              ; preds = %207, %205
  br label %500

209:                                              ; preds = %161
  %210 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %25) #9
  %211 = load i32, ptr %24, align 4, !tbaa !13
  %212 = zext i32 %211 to i64
  %213 = add i64 %212, %210
  %214 = trunc i64 %213 to i32
  store i32 %214, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  %215 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %216 = load i32, ptr %24, align 4, !tbaa !13
  %217 = zext i32 %216 to i64
  %218 = getelementptr inbounds i8, ptr %215, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !13
  store i32 %219, ptr %33, align 4, !tbaa !13
  %220 = load i32, ptr %24, align 4, !tbaa !13
  %221 = zext i32 %220 to i64
  %222 = add i64 %221, 4
  %223 = trunc i64 %222 to i32
  store i32 %223, ptr %24, align 4, !tbaa !13
  %224 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %225 = load i32, ptr %24, align 4, !tbaa !13
  %226 = zext i32 %225 to i64
  %227 = getelementptr inbounds i8, ptr %224, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !13
  store i32 %228, ptr %34, align 4, !tbaa !13
  %229 = load i32, ptr %24, align 4, !tbaa !13
  %230 = zext i32 %229 to i64
  %231 = add i64 %230, 4
  %232 = trunc i64 %231 to i32
  store i32 %232, ptr %24, align 4, !tbaa !13
  %233 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %234 = load i32, ptr %24, align 4, !tbaa !13
  %235 = zext i32 %234 to i64
  %236 = getelementptr inbounds i8, ptr %233, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !13
  store i32 %237, ptr %35, align 4, !tbaa !13
  %238 = load i32, ptr %24, align 4, !tbaa !13
  %239 = zext i32 %238 to i64
  %240 = add i64 %239, 4
  %241 = trunc i64 %240 to i32
  store i32 %241, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #9
  %242 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %243 = load i32, ptr %24, align 4, !tbaa !13
  %244 = zext i32 %243 to i64
  %245 = getelementptr inbounds i8, ptr %242, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !13
  store i32 %246, ptr %36, align 4, !tbaa !13
  %247 = load i32, ptr %24, align 4, !tbaa !13
  %248 = zext i32 %247 to i64
  %249 = add i64 %248, 4
  %250 = trunc i64 %249 to i32
  store i32 %250, ptr %24, align 4, !tbaa !13
  %251 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %252 = load i32, ptr %24, align 4, !tbaa !13
  %253 = zext i32 %252 to i64
  %254 = getelementptr inbounds i8, ptr %251, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !13
  store i32 %255, ptr %37, align 4, !tbaa !13
  %256 = load i32, ptr %24, align 4, !tbaa !13
  %257 = zext i32 %256 to i64
  %258 = add i64 %257, 4
  %259 = trunc i64 %258 to i32
  store i32 %259, ptr %24, align 4, !tbaa !13
  %260 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %261 = load i32, ptr %24, align 4, !tbaa !13
  %262 = zext i32 %261 to i64
  %263 = getelementptr inbounds i8, ptr %260, i64 %262
  %264 = load i32, ptr %263, align 4, !tbaa !13
  store i32 %264, ptr %38, align 4, !tbaa !13
  %265 = load i32, ptr %24, align 4, !tbaa !13
  %266 = zext i32 %265 to i64
  %267 = add i64 %266, 4
  %268 = trunc i64 %267 to i32
  store i32 %268, ptr %24, align 4, !tbaa !13
  %269 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %270 = load i32, ptr %24, align 4, !tbaa !13
  %271 = zext i32 %270 to i64
  %272 = getelementptr inbounds i8, ptr %269, i64 %271
  %273 = load i32, ptr %272, align 4, !tbaa !13
  store i32 %273, ptr %39, align 4, !tbaa !13
  %274 = load i32, ptr %24, align 4, !tbaa !13
  %275 = zext i32 %274 to i64
  %276 = add i64 %275, 4
  %277 = trunc i64 %276 to i32
  store i32 %277, ptr %24, align 4, !tbaa !13
  %278 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %279 = load i32, ptr %24, align 4, !tbaa !13
  %280 = zext i32 %279 to i64
  %281 = getelementptr inbounds i8, ptr %278, i64 %280
  %282 = load i32, ptr %281, align 4, !tbaa !13
  store i32 %282, ptr %40, align 4, !tbaa !13
  %283 = load i32, ptr %24, align 4, !tbaa !13
  %284 = zext i32 %283 to i64
  %285 = add i64 %284, 4
  %286 = trunc i64 %285 to i32
  store i32 %286, ptr %24, align 4, !tbaa !13
  %287 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %288 = load i32, ptr %24, align 4, !tbaa !13
  %289 = zext i32 %288 to i64
  %290 = getelementptr inbounds i8, ptr %287, i64 %289
  %291 = load i32, ptr %290, align 4, !tbaa !13
  store i32 %291, ptr %41, align 4, !tbaa !13
  %292 = load i32, ptr %24, align 4, !tbaa !13
  %293 = zext i32 %292 to i64
  %294 = add i64 %293, 4
  %295 = trunc i64 %294 to i32
  store i32 %295, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #9
  %296 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %297 = load i32, ptr %24, align 4, !tbaa !13
  %298 = zext i32 %297 to i64
  %299 = getelementptr inbounds i8, ptr %296, i64 %298
  %300 = load i32, ptr %299, align 4, !tbaa !13
  store i32 %300, ptr %42, align 4, !tbaa !13
  %301 = load i32, ptr %24, align 4, !tbaa !13
  %302 = zext i32 %301 to i64
  %303 = add i64 %302, 4
  %304 = trunc i64 %303 to i32
  store i32 %304, ptr %24, align 4, !tbaa !13
  %305 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %306 = load i32, ptr %24, align 4, !tbaa !13
  %307 = zext i32 %306 to i64
  %308 = getelementptr inbounds i8, ptr %305, i64 %307
  %309 = load i32, ptr %308, align 4, !tbaa !13
  store i32 %309, ptr %43, align 4, !tbaa !13
  %310 = load i32, ptr %24, align 4, !tbaa !13
  %311 = zext i32 %310 to i64
  %312 = add i64 %311, 4
  %313 = trunc i64 %312 to i32
  store i32 %313, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  %314 = getelementptr inbounds [56 x i8], ptr %23, i64 0, i64 0
  %315 = load i32, ptr %24, align 4, !tbaa !13
  %316 = zext i32 %315 to i64
  %317 = getelementptr inbounds i8, ptr %314, i64 %316
  %318 = load i32, ptr %317, align 4, !tbaa !13
  store i32 %318, ptr %44, align 4, !tbaa !13
  %319 = load i32, ptr %24, align 4, !tbaa !13
  %320 = zext i32 %319 to i64
  %321 = add i64 %320, 4
  %322 = trunc i64 %321 to i32
  store i32 %322, ptr %24, align 4, !tbaa !13
  %323 = load i32, ptr %44, align 4, !tbaa !13
  %324 = icmp ugt i32 %323, 1048576
  br i1 %324, label %325, label %359

325:                                              ; preds = %209
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %5)
          to label %326 unwind label %333

326:                                              ; preds = %325
  store i1 true, ptr %50, align 1
  %327 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %45) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %46) #9
  %328 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %46, ptr noundef @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %328)
          to label %329 unwind label %337

329:                                              ; preds = %326
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %45, ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef @.str.20)
          to label %330 unwind label %341

330:                                              ; preds = %329
  call void @llvm.lifetime.start.p0(i64 1, ptr %48) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %48) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %48)
          to label %331 unwind label %345

331:                                              ; preds = %330
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #9
  store i32 2, ptr %49, align 4, !tbaa !9
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %327, ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef %47, i32 noundef 655, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %332 unwind label %349

332:                                              ; preds = %331
  store i1 false, ptr %50, align 1
  invoke void @__cxa_throw(ptr %327, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #10
          to label %510 unwind label %349

333:                                              ; preds = %325
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %6, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %7, align 4
  br label %499

337:                                              ; preds = %326
  %338 = landingpad { ptr, i32 }
          cleanup
  %339 = extractvalue { ptr, i32 } %338, 0
  store ptr %339, ptr %6, align 8
  %340 = extractvalue { ptr, i32 } %338, 1
  store i32 %340, ptr %7, align 4
  br label %355

341:                                              ; preds = %329
  %342 = landingpad { ptr, i32 }
          cleanup
  %343 = extractvalue { ptr, i32 } %342, 0
  store ptr %343, ptr %6, align 8
  %344 = extractvalue { ptr, i32 } %342, 1
  store i32 %344, ptr %7, align 4
  br label %354

345:                                              ; preds = %330
  %346 = landingpad { ptr, i32 }
          cleanup
  %347 = extractvalue { ptr, i32 } %346, 0
  store ptr %347, ptr %6, align 8
  %348 = extractvalue { ptr, i32 } %346, 1
  store i32 %348, ptr %7, align 4
  br label %353

349:                                              ; preds = %332, %331
  %350 = landingpad { ptr, i32 }
          cleanup
  %351 = extractvalue { ptr, i32 } %350, 0
  store ptr %351, ptr %6, align 8
  %352 = extractvalue { ptr, i32 } %350, 1
  store i32 %352, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #9
  br label %353

353:                                              ; preds = %349, %345
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %48) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %48) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #9
  br label %354

354:                                              ; preds = %353, %341
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #9
  br label %355

355:                                              ; preds = %354, %337
  call void @llvm.lifetime.end.p0(i64 32, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %45) #9
  %356 = load i1, ptr %50, align 1
  br i1 %356, label %357, label %358

357:                                              ; preds = %355
  call void @__cxa_free_exception(ptr %327) #9
  br label %358

358:                                              ; preds = %357, %355
  br label %499

359:                                              ; preds = %209
  %360 = load i32, ptr %44, align 4, !tbaa !13
  %361 = icmp eq i32 %360, 0
  br i1 %361, label %362, label %368

362:                                              ; preds = %359
  %363 = load ptr, ptr %4, align 8, !tbaa !5
  %364 = icmp ne ptr %363, null
  br i1 %364, label %365, label %367

365:                                              ; preds = %362
  %366 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %366) #9
  br label %367

367:                                              ; preds = %365, %362
  br label %396

368:                                              ; preds = %359
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #9
  %369 = load i32, ptr %44, align 4, !tbaa !13
  %370 = zext i32 %369 to i64
  %371 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %370) #11
          to label %372 unwind label %387

372:                                              ; preds = %368
  store ptr %371, ptr %51, align 8, !tbaa !5
  %373 = load ptr, ptr %51, align 8, !tbaa !5
  %374 = load i32, ptr %44, align 4, !tbaa !13
  %375 = zext i32 %374 to i64
  %376 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %373, i64 noundef %375)
          to label %377 unwind label %387

377:                                              ; preds = %372
  %378 = load ptr, ptr %4, align 8, !tbaa !5
  %379 = icmp ne ptr %378, null
  br i1 %379, label %380, label %391

380:                                              ; preds = %377
  %381 = load ptr, ptr %4, align 8, !tbaa !5
  %382 = load ptr, ptr %51, align 8, !tbaa !5
  %383 = load i32, ptr %44, align 4, !tbaa !13
  %384 = zext i32 %383 to i64
  %385 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %381, ptr noundef %382, i64 noundef %384)
          to label %386 unwind label %387

386:                                              ; preds = %380
  br label %391

387:                                              ; preds = %380, %372, %368
  %388 = landingpad { ptr, i32 }
          cleanup
  %389 = extractvalue { ptr, i32 } %388, 0
  store ptr %389, ptr %6, align 8
  %390 = extractvalue { ptr, i32 } %388, 1
  store i32 %390, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  br label %499

391:                                              ; preds = %386, %377
  %392 = load ptr, ptr %51, align 8, !tbaa !5
  %393 = icmp eq ptr %392, null
  br i1 %393, label %395, label %394

394:                                              ; preds = %391
  call void @_ZdaPv(ptr noundef %392) #12
  br label %395

395:                                              ; preds = %394, %391
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  br label %396

396:                                              ; preds = %395, %367
  call void @llvm.lifetime.start.p0(i64 56, ptr %52) #9
  %397 = load i32, ptr %33, align 4, !tbaa !13
  %398 = load i32, ptr %34, align 4, !tbaa !13
  %399 = load i32, ptr %36, align 4, !tbaa !13
  %400 = load i32, ptr %37, align 4, !tbaa !13
  %401 = load i32, ptr %38, align 4, !tbaa !13
  %402 = load i32, ptr %39, align 4, !tbaa !13
  %403 = load i32, ptr %40, align 4, !tbaa !13
  %404 = load i32, ptr %41, align 4, !tbaa !13
  %405 = load i32, ptr %42, align 4, !tbaa !13
  %406 = load i32, ptr %43, align 4, !tbaa !13
  invoke void @_ZN4Glip6CoreGL16HdlTextureFormatC1Eiijjjjjjii(ptr noundef nonnull align 8 dereferenceable(52) %52, i32 noundef %397, i32 noundef %398, i32 noundef %399, i32 noundef %400, i32 noundef %401, i32 noundef %402, i32 noundef %403, i32 noundef %404, i32 noundef %405, i32 noundef %406)
          to label %407 unwind label %445

407:                                              ; preds = %396
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #9
  %408 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #11
          to label %409 unwind label %449

409:                                              ; preds = %407
  %410 = load i32, ptr %35, align 4, !tbaa !13
  invoke void @_ZN4Glip7Modules11ImageBufferC1ERKNS_6CoreGL24HdlAbstractTextureFormatEi(ptr noundef nonnull align 8 dereferenceable(72) %408, ptr noundef nonnull align 8 dereferenceable(52) %52, i32 noundef %410)
          to label %411 unwind label %453

411:                                              ; preds = %409
  store ptr %408, ptr %53, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #9
  %412 = load i64, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %55) #9
  %413 = invoke { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %414 unwind label %457

414:                                              ; preds = %411
  %415 = getelementptr inbounds { i64, i64 }, ptr %55, i32 0, i32 0
  %416 = extractvalue { i64, i64 } %413, 0
  store i64 %416, ptr %415, align 8
  %417 = getelementptr inbounds { i64, i64 }, ptr %55, i32 0, i32 1
  %418 = extractvalue { i64, i64 } %413, 1
  store i64 %418, ptr %417, align 8
  %419 = invoke noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %55)
          to label %420 unwind label %457

420:                                              ; preds = %414
  %421 = sub i64 %412, %419
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #9
  store i64 %421, ptr %54, align 8, !tbaa !11
  %422 = load i64, ptr %54, align 8, !tbaa !11
  %423 = load ptr, ptr %53, align 8, !tbaa !5
  %424 = load ptr, ptr %423, align 8, !tbaa !15
  %425 = getelementptr inbounds ptr, ptr %424, i64 3
  %426 = load ptr, ptr %425, align 8
  %427 = invoke noundef i64 %426(ptr noundef nonnull align 8 dereferenceable(52) %423)
          to label %428 unwind label %461

428:                                              ; preds = %420
  %429 = icmp ne i64 %422, %427
  br i1 %429, label %430, label %487

430:                                              ; preds = %428
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %5)
          to label %431 unwind label %461

431:                                              ; preds = %430
  %432 = load ptr, ptr %53, align 8, !tbaa !5
  %433 = icmp eq ptr %432, null
  br i1 %433, label %438, label %434

434:                                              ; preds = %431
  %435 = load ptr, ptr %432, align 8, !tbaa !15
  %436 = getelementptr inbounds ptr, ptr %435, i64 1
  %437 = load ptr, ptr %436, align 8
  call void %437(ptr noundef nonnull align 8 dereferenceable(72) %432) #9
  br label %438

438:                                              ; preds = %434, %431
  store i1 true, ptr %61, align 1
  %439 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %56) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %57) #9
  %440 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %57, ptr noundef @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %440)
          to label %441 unwind label %465

441:                                              ; preds = %438
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %56, ptr noundef nonnull align 8 dereferenceable(32) %57, ptr noundef @.str.21)
          to label %442 unwind label %469

442:                                              ; preds = %441
  call void @llvm.lifetime.start.p0(i64 1, ptr %59) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %59) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %59)
          to label %443 unwind label %473

443:                                              ; preds = %442
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #9
  store i32 2, ptr %60, align 4, !tbaa !9
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %439, ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef %58, i32 noundef 687, ptr noundef nonnull align 4 dereferenceable(4) %60)
          to label %444 unwind label %477

444:                                              ; preds = %443
  store i1 false, ptr %61, align 1
  invoke void @__cxa_throw(ptr %439, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #10
          to label %510 unwind label %477

445:                                              ; preds = %396
  %446 = landingpad { ptr, i32 }
          cleanup
  %447 = extractvalue { ptr, i32 } %446, 0
  store ptr %447, ptr %6, align 8
  %448 = extractvalue { ptr, i32 } %446, 1
  store i32 %448, ptr %7, align 4
  br label %498

449:                                              ; preds = %407
  %450 = landingpad { ptr, i32 }
          cleanup
  %451 = extractvalue { ptr, i32 } %450, 0
  store ptr %451, ptr %6, align 8
  %452 = extractvalue { ptr, i32 } %450, 1
  store i32 %452, ptr %7, align 4
  br label %497

453:                                              ; preds = %409
  %454 = landingpad { ptr, i32 }
          cleanup
  %455 = extractvalue { ptr, i32 } %454, 0
  store ptr %455, ptr %6, align 8
  %456 = extractvalue { ptr, i32 } %454, 1
  store i32 %456, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %408, i64 noundef 72) #12
  br label %497

457:                                              ; preds = %414, %411
  %458 = landingpad { ptr, i32 }
          cleanup
  %459 = extractvalue { ptr, i32 } %458, 0
  store ptr %459, ptr %6, align 8
  %460 = extractvalue { ptr, i32 } %458, 1
  store i32 %460, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #9
  br label %496

461:                                              ; preds = %493, %490, %487, %430, %420
  %462 = landingpad { ptr, i32 }
          cleanup
  %463 = extractvalue { ptr, i32 } %462, 0
  store ptr %463, ptr %6, align 8
  %464 = extractvalue { ptr, i32 } %462, 1
  store i32 %464, ptr %7, align 4
  br label %496

465:                                              ; preds = %438
  %466 = landingpad { ptr, i32 }
          cleanup
  %467 = extractvalue { ptr, i32 } %466, 0
  store ptr %467, ptr %6, align 8
  %468 = extractvalue { ptr, i32 } %466, 1
  store i32 %468, ptr %7, align 4
  br label %483

469:                                              ; preds = %441
  %470 = landingpad { ptr, i32 }
          cleanup
  %471 = extractvalue { ptr, i32 } %470, 0
  store ptr %471, ptr %6, align 8
  %472 = extractvalue { ptr, i32 } %470, 1
  store i32 %472, ptr %7, align 4
  br label %482

473:                                              ; preds = %442
  %474 = landingpad { ptr, i32 }
          cleanup
  %475 = extractvalue { ptr, i32 } %474, 0
  store ptr %475, ptr %6, align 8
  %476 = extractvalue { ptr, i32 } %474, 1
  store i32 %476, ptr %7, align 4
  br label %481

477:                                              ; preds = %444, %443
  %478 = landingpad { ptr, i32 }
          cleanup
  %479 = extractvalue { ptr, i32 } %478, 0
  store ptr %479, ptr %6, align 8
  %480 = extractvalue { ptr, i32 } %478, 1
  store i32 %480, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %58) #9
  br label %481

481:                                              ; preds = %477, %473
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %59) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %59) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %56) #9
  br label %482

482:                                              ; preds = %481, %469
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %57) #9
  br label %483

483:                                              ; preds = %482, %465
  call void @llvm.lifetime.end.p0(i64 32, ptr %57) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %56) #9
  %484 = load i1, ptr %61, align 1
  br i1 %484, label %485, label %486

485:                                              ; preds = %483
  call void @__cxa_free_exception(ptr %439) #9
  br label %486

486:                                              ; preds = %485, %483
  br label %496

487:                                              ; preds = %428
  %488 = load ptr, ptr %53, align 8, !tbaa !5
  %489 = invoke noundef ptr @_ZN4Glip7Modules11ImageBuffer6getPtrEv(ptr noundef nonnull align 8 dereferenceable(72) %488)
          to label %490 unwind label %461

490:                                              ; preds = %487
  %491 = load i64, ptr %54, align 8, !tbaa !11
  %492 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %489, i64 noundef %491)
          to label %493 unwind label %461

493:                                              ; preds = %490
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %5)
          to label %494 unwind label %461

494:                                              ; preds = %493
  %495 = load ptr, ptr %53, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  call void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %52) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264) %5) #9
  call void @llvm.lifetime.end.p0(i64 528, ptr %5) #9
  ret ptr %495

496:                                              ; preds = %486, %461, %457
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #9
  br label %497

497:                                              ; preds = %496, %453, %449
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  call void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %52) #9
  br label %498

498:                                              ; preds = %497, %445
  call void @llvm.lifetime.end.p0(i64 56, ptr %52) #9
  br label %499

499:                                              ; preds = %498, %387, %358, %333
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %500

500:                                              ; preds = %499, %208, %183
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #9
  br label %501

501:                                              ; preds = %500, %179
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %502

502:                                              ; preds = %501, %175
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #9
  br label %503

503:                                              ; preds = %502, %171, %148, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %504

504:                                              ; preds = %503, %102, %77
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264) %5) #9
  call void @llvm.lifetime.end.p0(i64 528, ptr %5) #9
  br label %505

505:                                              ; preds = %504
  %506 = load ptr, ptr %6, align 8
  %507 = load i32, ptr %7, align 4
  %508 = insertvalue { ptr, i32 } poison, ptr %506, 0
  %509 = insertvalue { ptr, i32 } %508, i32 %507, 1
  resume { ptr, i32 } %509

510:                                              ; preds = %444, %332, %170, %122, %76
  unreachable
}

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(264)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef, i32 noundef) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(264)) #1 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i32 noundef) #4

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgESt4fposI11__mbstate_tE(ptr noundef nonnull align 8 dereferenceable(16), i64, i64) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4fposI11__mbstate_tEC2El(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #7

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) #2 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #3

declare void @_ZN4Glip6CoreGL16HdlTextureFormatC1Eiijjjjjjii(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #8

; Function Attrs: nounwind
declare void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #5

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

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

declare void @_ZN4Glip7Modules11ImageBufferC1ERKNS_6CoreGL24HdlAbstractTextureFormatEi(ptr, ptr, i32)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint 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 #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nobuiltin allocsize(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 #9 = { nounwind }
attributes #10 = { noreturn }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN4Glip9Exception4TypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}


; 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::basic_fstream" = type { %"class.std::basic_iostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.3 }
%union.anon.3 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%"class.std::fpos" = type { i64, %struct.__mbstate_t }
%"class.Glip::CoreGL::HdlTextureFormat" = type { %"class.Glip::CoreGL::HdlAbstractTextureFormat.base", [4 x i8] }
%"class.Glip::CoreGL::HdlAbstractTextureFormat.base" = type <{ ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>

@_ZN4Glip7Modules11ImageBuffer15headerSignatureB5cxx11E = external dso_local global %"class.std::__cxx11::basic_string", align 8
@.str.3 = external hidden unnamed_addr constant [94 x i8], align 1
@_ZTIN4Glip9ExceptionE = external constant ptr
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [49 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4Glip7Modules11ImageBuffer6getPtrEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4Glip7Modules11ImageBuffer4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS7_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::basic_fstream", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::fpos", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::fpos", align 8
  %16 = alloca [56 x i8], align 16
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca i32, align 4
  %29 = alloca %"class.Glip::CoreGL::HdlTextureFormat", align 8
  %30 = alloca %"class.std::fpos", align 8
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::__cxx11::basic_string", align 8
  %34 = alloca %"class.std::allocator", align 1
  %35 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 528, ptr nonnull %3) #9
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(264) %3)
  %36 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #9
  %37 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 8, i32 noundef 4)
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(264) %3, ptr noundef %36, i32 noundef %37)
          to label %38 unwind label %47

38:                                               ; preds = %2
  %39 = call noundef zeroext i1 @_ZNSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(264) %3)
  br i1 %39, label %57, label %40

40:                                               ; preds = %38
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %3)
          to label %41 unwind label %47

41:                                               ; preds = %40
  %42 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull @.str.15, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %43 unwind label %.thread

43:                                               ; preds = %41
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.16)
          to label %44 unwind label %.thread150

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

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  store i32 2, ptr %8, align 4, !tbaa !5
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %42, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull %6, i32 noundef 589, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %46 unwind label %53

46:                                               ; preds = %45
  invoke void @__cxa_throw(ptr nonnull %42, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #10
          to label %255 unwind label %53

47:                                               ; preds = %57, %40, %2
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %254

.thread:                                          ; preds = %41
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  br label %56

.thread150:                                       ; preds = %43
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  br label %56

51:                                               ; preds = %44
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %46, %45
  %.096 = phi i1 [ false, %46 ], [ true, %45 ]
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  br label %55

55:                                               ; preds = %51, %53
  %.197 = phi i1 [ %.096, %53 ], [ true, %51 ]
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  br i1 %.197, label %56, label %254

56:                                               ; preds = %.thread150, %.thread, %55
  %.pn.pn.pn149 = phi { ptr, i32 } [ %49, %.thread ], [ %.pn, %55 ], [ %50, %.thread150 ]
  call void @__cxa_free_exception(ptr %42) #9
  br label %254

57:                                               ; preds = %38
  %58 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef 0, i32 noundef 2)
          to label %59 unwind label %47

59:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  %60 = invoke { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %61 unwind label %73

61:                                               ; preds = %59
  %62 = extractvalue { i64, i64 } %60, 0
  store i64 %62, ptr %9, align 8
  %63 = getelementptr inbounds i8, ptr %9, i64 8
  %64 = extractvalue { i64, i64 } %60, 1
  store i64 %64, ptr %63, align 8
  %65 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  %66 = icmp ult i64 %65, 56
  br i1 %66, label %67, label %83

67:                                               ; preds = %61
  %68 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %69 unwind label %.thread153

69:                                               ; preds = %67
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.18)
          to label %70 unwind label %.thread157

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %71 unwind label %77

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #9
  store i32 2, ptr %14, align 4, !tbaa !5
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %68, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull %12, i32 noundef 596, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %72 unwind label %79

72:                                               ; preds = %71
  invoke void @__cxa_throw(ptr nonnull %68, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #10
          to label %255 unwind label %79

73:                                               ; preds = %59
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  br label %254

.thread153:                                       ; preds = %67
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  br label %82

.thread157:                                       ; preds = %69
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  br label %82

77:                                               ; preds = %70
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %72, %71
  %.0104 = phi i1 [ false, %72 ], [ true, %71 ]
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  br label %81

81:                                               ; preds = %77, %79
  %.1105 = phi i1 [ %.0104, %79 ], [ true, %77 ]
  %.pn141 = phi { ptr, i32 } [ %80, %79 ], [ %78, %77 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  br i1 %.1105, label %82, label %254

82:                                               ; preds = %.thread157, %.thread153, %81
  %.pn141.pn.pn156 = phi { ptr, i32 } [ %75, %.thread153 ], [ %.pn141, %81 ], [ %76, %.thread157 ]
  call void @__cxa_free_exception(ptr %68) #9
  br label %254

83:                                               ; preds = %61
  call void @_ZNSt4fposI11__mbstate_tEC2El(ptr noundef nonnull align 8 dereferenceable(16) %15, i64 noundef 0)
  %84 = load i64, ptr %15, align 8
  %85 = getelementptr inbounds i8, ptr %15, i64 8
  %86 = load i64, ptr %85, align 8
  %87 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgESt4fposI11__mbstate_tE(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 %84, i64 %86)
          to label %88 unwind label %100

88:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %16) #9
  %89 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %16, i64 noundef 56)
          to label %90 unwind label %102

90:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull %16, i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %91 unwind label %104

91:                                               ; preds = %90
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #9
  %92 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) @_ZN4Glip7Modules11ImageBuffer15headerSignatureB5cxx11E) #9
  br i1 %92, label %93, label %116

93:                                               ; preds = %91
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %3)
          to label %94 unwind label %106

94:                                               ; preds = %93
  %95 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef nonnull @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %96 unwind label %.thread160

96:                                               ; preds = %94
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.19)
          to label %97 unwind label %.thread164

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %98 unwind label %110

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #9
  store i32 2, ptr %23, align 4, !tbaa !5
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %95, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull %21, i32 noundef 614, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %99 unwind label %112

99:                                               ; preds = %98
  invoke void @__cxa_throw(ptr nonnull %95, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #10
          to label %255 unwind label %112

100:                                              ; preds = %83
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %254

102:                                              ; preds = %88
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %253

104:                                              ; preds = %90
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #9
  br label %252

106:                                              ; preds = %93
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %251

.thread160:                                       ; preds = %94
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #9
  br label %115

.thread164:                                       ; preds = %96
  %109 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #9
  br label %115

110:                                              ; preds = %97
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %114

112:                                              ; preds = %99, %98
  %.0108 = phi i1 [ false, %99 ], [ true, %98 ]
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  br label %114

114:                                              ; preds = %110, %112
  %.1109 = phi i1 [ %.0108, %112 ], [ true, %110 ]
  %.pn134 = phi { ptr, i32 } [ %113, %112 ], [ %111, %110 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #9
  br i1 %.1109, label %115, label %251

115:                                              ; preds = %.thread164, %.thread160, %114
  %.pn134.pn.pn163 = phi { ptr, i32 } [ %108, %.thread160 ], [ %.pn134, %114 ], [ %109, %.thread164 ]
  call void @__cxa_free_exception(ptr %95) #9
  br label %251

116:                                              ; preds = %91
  %117 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  %118 = and i64 %117, 4294967295
  %119 = getelementptr inbounds i8, ptr %16, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = add i64 %117, 4
  %122 = and i64 %121, 4294967295
  %123 = getelementptr inbounds i8, ptr %16, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = add i64 %117, 8
  %126 = and i64 %125, 4294967295
  %127 = getelementptr inbounds i8, ptr %16, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !9
  %129 = add i64 %117, 12
  %130 = and i64 %129, 4294967295
  %131 = getelementptr inbounds i8, ptr %16, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = add i64 %117, 16
  %134 = and i64 %133, 4294967295
  %135 = getelementptr inbounds i8, ptr %16, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !9
  %137 = add i64 %117, 20
  %138 = and i64 %137, 4294967295
  %139 = getelementptr inbounds i8, ptr %16, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !9
  %141 = add i64 %117, 24
  %142 = and i64 %141, 4294967295
  %143 = getelementptr inbounds i8, ptr %16, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !9
  %145 = add i64 %117, 28
  %146 = and i64 %145, 4294967295
  %147 = getelementptr inbounds i8, ptr %16, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !9
  %149 = add i64 %117, 32
  %150 = and i64 %149, 4294967295
  %151 = getelementptr inbounds i8, ptr %16, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = add i64 %117, 36
  %154 = and i64 %153, 4294967295
  %155 = getelementptr inbounds i8, ptr %16, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = add i64 %117, 40
  %158 = and i64 %157, 4294967295
  %159 = getelementptr inbounds i8, ptr %16, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = add i64 %117, 44
  %162 = and i64 %161, 4294967295
  %163 = getelementptr inbounds i8, ptr %16, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = icmp ugt i32 %164, 1048576
  br i1 %165, label %166, label %183

166:                                              ; preds = %116
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %3)
          to label %167 unwind label %173

167:                                              ; preds = %166
  %168 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %25) #9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %25, ptr noundef nonnull @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %169 unwind label %.thread167

169:                                              ; preds = %167
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull @.str.20)
          to label %170 unwind label %.thread171

170:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %27) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %171 unwind label %177

171:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #9
  store i32 2, ptr %28, align 4, !tbaa !5
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %168, ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull %26, i32 noundef 655, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %172 unwind label %179

172:                                              ; preds = %171
  invoke void @__cxa_throw(ptr nonnull %168, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #10
          to label %255 unwind label %179

173:                                              ; preds = %166
  %174 = landingpad { ptr, i32 }
          cleanup
  br label %251

.thread167:                                       ; preds = %167
  %175 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #9
  br label %182

.thread171:                                       ; preds = %169
  %176 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #9
  br label %182

177:                                              ; preds = %170
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %181

179:                                              ; preds = %172, %171
  %.0100 = phi i1 [ false, %172 ], [ true, %171 ]
  %180 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  br label %181

181:                                              ; preds = %177, %179
  %.1101 = phi i1 [ %.0100, %179 ], [ true, %177 ]
  %.pn129 = phi { ptr, i32 } [ %180, %179 ], [ %178, %177 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #9
  br i1 %.1101, label %182, label %251

182:                                              ; preds = %.thread171, %.thread167, %181
  %.pn129.pn.pn170 = phi { ptr, i32 } [ %175, %.thread167 ], [ %.pn129, %181 ], [ %176, %.thread171 ]
  call void @__cxa_free_exception(ptr %168) #9
  br label %251

183:                                              ; preds = %116
  %184 = icmp eq i32 %164, 0
  br i1 %184, label %185, label %187

185:                                              ; preds = %183
  %.not120 = icmp eq ptr %1, null
  br i1 %.not120, label %198, label %186

186:                                              ; preds = %185
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  br label %198

187:                                              ; preds = %183
  %188 = zext nneg i32 %164 to i64
  %189 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %188) #11
          to label %190 unwind label %195

190:                                              ; preds = %187
  %191 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %189, i64 noundef %188)
          to label %192 unwind label %195

192:                                              ; preds = %190
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %197, label %193

193:                                              ; preds = %192
  %194 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %189, i64 noundef %188)
          to label %197 unwind label %195

195:                                              ; preds = %193, %190, %187
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %251

197:                                              ; preds = %192, %193
  call void @_ZdaPv(ptr noundef nonnull %189) #12
  br label %198

198:                                              ; preds = %185, %186, %197
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %29) #9
  invoke void @_ZN4Glip6CoreGL16HdlTextureFormatC1Eiijjjjjjii(ptr noundef nonnull align 8 dereferenceable(52) %29, i32 noundef %120, i32 noundef %124, i32 noundef %132, i32 noundef %136, i32 noundef %140, i32 noundef %144, i32 noundef %148, i32 noundef %152, i32 noundef %156, i32 noundef %160)
          to label %199 unwind label %225

199:                                              ; preds = %198
  %200 = invoke noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #11
          to label %201 unwind label %227

201:                                              ; preds = %199
  invoke void @_ZN4Glip7Modules11ImageBufferC1ERKNS_6CoreGL24HdlAbstractTextureFormatEi(ptr noundef nonnull align 8 dereferenceable(72) %200, ptr noundef nonnull align 8 dereferenceable(52) %29, i32 noundef %128)
          to label %202 unwind label %229

202:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) #9
  %203 = invoke { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %204 unwind label %231

204:                                              ; preds = %202
  %205 = extractvalue { i64, i64 } %203, 0
  store i64 %205, ptr %30, align 8
  %206 = getelementptr inbounds i8, ptr %30, i64 8
  %207 = extractvalue { i64, i64 } %203, 1
  store i64 %207, ptr %206, align 8
  %208 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %30)
  %209 = sub i64 %65, %208
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #9
  %210 = load ptr, ptr %200, align 8, !tbaa !11
  %211 = getelementptr inbounds i8, ptr %210, i64 24
  %212 = load ptr, ptr %211, align 8
  %213 = invoke noundef i64 %212(ptr noundef nonnull align 8 dereferenceable(52) %200)
          to label %214 unwind label %233

214:                                              ; preds = %204
  %.not121 = icmp eq i64 %209, %213
  br i1 %.not121, label %243, label %215

215:                                              ; preds = %214
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %3)
          to label %216 unwind label %233

216:                                              ; preds = %215
  %217 = load ptr, ptr %200, align 8, !tbaa !11
  %218 = getelementptr inbounds i8, ptr %217, i64 8
  %219 = load ptr, ptr %218, align 8
  call void %219(ptr noundef nonnull align 8 dereferenceable(72) %200) #9
  %220 = call ptr @__cxa_allocate_exception(i64 152) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %31) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %32) #9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %32, ptr noundef nonnull @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %221 unwind label %.thread174

221:                                              ; preds = %216
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %31, ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull @.str.21)
          to label %222 unwind label %.thread178

222:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %34) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %223 unwind label %237

223:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #9
  store i32 2, ptr %35, align 4, !tbaa !5
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %220, ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull %33, i32 noundef 687, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %224 unwind label %239

224:                                              ; preds = %223
  invoke void @__cxa_throw(ptr nonnull %220, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #10
          to label %255 unwind label %239

225:                                              ; preds = %198
  %226 = landingpad { ptr, i32 }
          cleanup
  br label %250

227:                                              ; preds = %199
  %228 = landingpad { ptr, i32 }
          cleanup
  br label %249

229:                                              ; preds = %201
  %230 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %200, i64 noundef 72) #12
  br label %249

231:                                              ; preds = %202
  %232 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #9
  br label %249

233:                                              ; preds = %247, %245, %243, %215, %204
  %234 = landingpad { ptr, i32 }
          cleanup
  br label %249

.thread174:                                       ; preds = %216
  %235 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %31) #9
  br label %242

.thread178:                                       ; preds = %221
  %236 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %31) #9
  br label %242

237:                                              ; preds = %222
  %238 = landingpad { ptr, i32 }
          cleanup
  br label %241

239:                                              ; preds = %224, %223
  %.0 = phi i1 [ false, %224 ], [ true, %223 ]
  %240 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #9
  br label %241

241:                                              ; preds = %237, %239
  %.pn122 = phi { ptr, i32 } [ %240, %239 ], [ %238, %237 ]
  %.1 = phi i1 [ %.0, %239 ], [ true, %237 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %34) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %31) #9
  br i1 %.1, label %242, label %249

242:                                              ; preds = %.thread178, %.thread174, %241
  %.pn122.pn.pn177 = phi { ptr, i32 } [ %235, %.thread174 ], [ %.pn122, %241 ], [ %236, %.thread178 ]
  call void @__cxa_free_exception(ptr %220) #9
  br label %249

243:                                              ; preds = %214
  %244 = invoke noundef ptr @_ZN4Glip7Modules11ImageBuffer6getPtrEv(ptr noundef nonnull align 8 dereferenceable(72) %200)
          to label %245 unwind label %233

245:                                              ; preds = %243
  %246 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %244, i64 noundef %209)
          to label %247 unwind label %233

247:                                              ; preds = %245
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264) %3)
          to label %248 unwind label %233

248:                                              ; preds = %247
  call void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %29) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %29) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #9
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264) %3) #9
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %3) #9
  ret ptr %200

249:                                              ; preds = %231, %233, %242, %241, %229, %227
  %.pn122.pn.pn.pn.pn = phi { ptr, i32 } [ %230, %229 ], [ %228, %227 ], [ %.pn122.pn.pn177, %242 ], [ %.pn122, %241 ], [ %234, %233 ], [ %232, %231 ]
  call void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %29) #9
  br label %250

250:                                              ; preds = %249, %225
  %.pn122.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn122.pn.pn.pn.pn, %249 ], [ %226, %225 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %29) #9
  br label %251

251:                                              ; preds = %173, %195, %250, %182, %181, %114, %115, %106
  %.pn134.pn.pn.pn = phi { ptr, i32 } [ %.pn134.pn.pn163, %115 ], [ %.pn134, %114 ], [ %107, %106 ], [ %.pn129.pn.pn170, %182 ], [ %.pn129, %181 ], [ %174, %173 ], [ %.pn122.pn.pn.pn.pn.pn, %250 ], [ %196, %195 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  br label %252

252:                                              ; preds = %251, %104
  %.pn134.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn134.pn.pn.pn, %251 ], [ %105, %104 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #9
  br label %253

253:                                              ; preds = %252, %102
  %.pn134.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn134.pn.pn.pn.pn, %252 ], [ %103, %102 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #9
  br label %254

254:                                              ; preds = %73, %100, %253, %82, %81, %55, %56, %47
  %.pn141.pn.pn.pn.pn = phi { ptr, i32 } [ %48, %47 ], [ %.pn.pn.pn149, %56 ], [ %.pn, %55 ], [ %.pn141.pn.pn156, %82 ], [ %.pn141, %81 ], [ %.pn134.pn.pn.pn.pn.pn, %253 ], [ %101, %100 ], [ %74, %73 ]
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264) %3) #9
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn141.pn.pn.pn.pn

255:                                              ; preds = %224, %172, %99, %72, %46
  unreachable
}

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(264)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i32 noundef) local_unnamed_addr #4

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgESt4fposI11__mbstate_tE(ptr noundef nonnull align 8 dereferenceable(16), i64, i64) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4fposI11__mbstate_tEC2El(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #3

declare void @_ZN4Glip6CoreGL16HdlTextureFormatC1Eiijjjjjjii(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #8

; Function Attrs: nounwind
declare void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #5

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint 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 #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nobuiltin allocsize(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 #9 = { nounwind }
attributes #10 = { noreturn }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin 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 = !{!"_ZTSN4Glip9Exception4TypeE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass