; LLVM IR from team-charls/charls :: test/performance.ll (Z24encode_performance_testsi)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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::locale" = type { ptr }
%"struct.std::_Swallow_assign" = type { i8 }
%"class.charls_test::portable_anymap_file" = type { i32, i32, i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::byte, std::allocator<std::byte>>::_Vector_impl" }
%"struct.std::_Vector_base<std::byte, std::allocator<std::byte>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::byte, std::allocator<std::byte>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::byte, std::allocator<std::byte>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.charls_frame_info = type { i32, i32, i32, i32 }
%"class.charls::jpegls_encoder" = type { %"class.std::unique_ptr.5" }
%"class.std::unique_ptr.5" = type { %"struct.std::__uniq_ptr_data.6" }
%"struct.std::__uniq_ptr_data.6" = type { %"class.std::__uniq_ptr_impl.7" }
%"class.std::__uniq_ptr_impl.7" = type { %"class.std::tuple.8" }
%"class.std::tuple.8" = type { %"struct.std::_Tuple_impl.9" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Tuple_impl.10", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Head_base.11" }
%"struct.std::_Head_base.11" = type { ptr }
%"struct.std::_Head_base.12" = type { ptr }
%"class.std::allocator" = type { i8 }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.std::chrono::duration.4" = type { double }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZTINSt8ios_base7failureB5cxx11E = external constant ptr
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZTIN6charls12jpegls_errorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZSt6ignore = external dso_local constant %"struct.std::_Swallow_assign", align 1
@.str.28 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

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

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #4

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

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

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

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #7

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNSt6chronomiINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

; Function Attrs: mustprogress uwtable
define dso_local void @_Z24encode_performance_testsi(i32 noundef %0) #6 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.charls_test::portable_anymap_file", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.charls_frame_info, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.charls::jpegls_encoder", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::chrono::time_point", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.charls::jpegls_encoder", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::chrono::time_point", align 8
  %16 = alloca %"class.std::chrono::duration", align 8
  %17 = alloca %"class.std::chrono::duration.4", align 8
  %18 = alloca %"class.std::chrono::duration.4", align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.26)
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef %22)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef @.str.18)
  call void @llvm.lifetime.start.p0(i64 40, ptr %3) #9
  invoke void @_ZN11charls_test20portable_anymap_fileC2EPKc(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef @.str.27)
          to label %25 unwind label %55

25:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #9
  %26 = getelementptr inbounds %struct.charls_frame_info, ptr %6, i32 0, i32 0
  %27 = call noundef i32 @_ZNK11charls_test20portable_anymap_file5widthEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  store i32 %27, ptr %26, align 4, !tbaa !9
  %28 = getelementptr inbounds %struct.charls_frame_info, ptr %6, i32 0, i32 1
  %29 = call noundef i32 @_ZNK11charls_test20portable_anymap_file6heightEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  store i32 %29, ptr %28, align 4, !tbaa !11
  %30 = getelementptr inbounds %struct.charls_frame_info, ptr %6, i32 0, i32 2
  %31 = call noundef i32 @_ZNK11charls_test20portable_anymap_file15bits_per_sampleEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  store i32 %31, ptr %30, align 4, !tbaa !12
  %32 = getelementptr inbounds %struct.charls_frame_info, ptr %6, i32 0, i32 3
  %33 = call noundef i32 @_ZNK11charls_test20portable_anymap_file15component_countEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  store i32 %33, ptr %32, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  %34 = call noundef i32 @_ZNK11charls_test20portable_anymap_file15component_countEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  %35 = icmp sgt i32 %34, 1
  %36 = zext i1 %35 to i64
  %37 = select i1 %35, i32 2, i32 0
  store i32 %37, ptr %7, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  invoke void @_ZN6charls14jpegls_encoderC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %38 unwind label %59

38:                                               ; preds = %25
  %39 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder10frame_infoERK17charls_frame_info(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(16) %6)
          to label %40 unwind label %63

40:                                               ; preds = %38
  %41 = load i32, ptr %7, align 4, !tbaa !14
  %42 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder15interleave_modeENS_15interleave_modeE(ptr noundef nonnull align 8 dereferenceable(16) %39, i32 noundef %41)
          to label %43 unwind label %63

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #9
  %44 = invoke noundef i64 @_ZNK6charls14jpegls_encoder26estimated_destination_sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %45 unwind label %67

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  call void @_ZNSaISt4byteEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt6vectorISt4byteSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %44, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %46 unwind label %71

46:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %47 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  %48 = getelementptr inbounds %"class.std::chrono::time_point", ptr %11, i32 0, i32 0
  %49 = getelementptr inbounds %"class.std::chrono::duration", ptr %48, i32 0, i32 0
  store i64 %47, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %89, %46
  %51 = load i32, ptr %12, align 4, !tbaa !5
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = icmp ne i32 %51, %52
  br i1 %53, label %75, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %106

55:                                               ; preds = %1
  %56 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %4, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %5, align 4
  br label %151

59:                                               ; preds = %25
  %60 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %4, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %5, align 4
  br label %150

63:                                               ; preds = %40, %38
  %64 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %4, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %5, align 4
  br label %149

67:                                               ; preds = %43
  %68 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %4, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %5, align 4
  br label %148

71:                                               ; preds = %45
  %72 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %4, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %5, align 4
  call void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  br label %148

75:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  invoke void @_ZN6charls14jpegls_encoderC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %76 unwind label %92

76:                                               ; preds = %75
  %77 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder10frame_infoERK17charls_frame_info(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(16) %6)
          to label %78 unwind label %96

78:                                               ; preds = %76
  %79 = load i32, ptr %7, align 4, !tbaa !14
  %80 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder15interleave_modeENS_15interleave_modeE(ptr noundef nonnull align 8 dereferenceable(16) %77, i32 noundef %79)
          to label %81 unwind label %96

81:                                               ; preds = %78
  %82 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder11destinationISt6vectorISt4byteSaIS3_EES3_EERS0_RT_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %83 unwind label %96

83:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11charls_test20portable_anymap_file10image_dataEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  %85 = invoke noundef i64 @_ZN6charls14jpegls_encoder6encodeISt6vectorISt4byteSaIS3_EES3_EEmRKT_j(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(24) %84, i32 noundef 0)
          to label %86 unwind label %100

86:                                               ; preds = %83
  store i64 %85, ptr %14, align 8, !tbaa !16
  %87 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt15_Swallow_assignaSImEERKS_RKT_(ptr noundef nonnull align 1 dereferenceable(1) @_ZSt6ignore, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %88 unwind label %100

88:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %12, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %12, align 4, !tbaa !5
  br label %50, !llvm.loop !18

92:                                               ; preds = %75
  %93 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %4, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %5, align 4
  br label %105

96:                                               ; preds = %81, %78, %76
  %97 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %4, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %5, align 4
  br label %104

100:                                              ; preds = %86, %83
  %101 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %4, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %104

104:                                              ; preds = %100, %96
  call void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #9
  br label %105

105:                                              ; preds = %104, %92
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %147

106:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %107 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  %108 = getelementptr inbounds %"class.std::chrono::time_point", ptr %15, i32 0, i32 0
  %109 = getelementptr inbounds %"class.std::chrono::duration", ptr %108, i32 0, i32 0
  store i64 %107, ptr %109, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %110 = invoke i64 @_ZNSt6chronomiINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %111 unwind label %134

111:                                              ; preds = %106
  %112 = getelementptr inbounds %"class.std::chrono::duration", ptr %16, i32 0, i32 0
  store i64 %110, ptr %112, align 8
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.28)
          to label %114 unwind label %134

114:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  invoke void @_ZNSt6chrono8durationIdSt5ratioILl1ELl1000EEEC2IlS1_ILl1ELl1000000000EEvEERKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %115 unwind label %138

115:                                              ; preds = %114
  %116 = invoke noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %117 unwind label %138

117:                                              ; preds = %115
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %113, double noundef %116)
          to label %119 unwind label %138

119:                                              ; preds = %117
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef @.str.22)
          to label %121 unwind label %138

121:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.29)
          to label %123 unwind label %134

123:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  invoke void @_ZNSt6chrono8durationIdSt5ratioILl1ELl1000EEEC2IlS1_ILl1ELl1000000000EEvEERKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %124 unwind label %142

124:                                              ; preds = %123
  %125 = invoke noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %126 unwind label %142

126:                                              ; preds = %124
  %127 = load i32, ptr %2, align 4, !tbaa !5
  %128 = sitofp i32 %127 to double
  %129 = fdiv double %125, %128
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %122, double noundef %129)
          to label %131 unwind label %142

131:                                              ; preds = %126
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef @.str.22)
          to label %133 unwind label %142

133:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  call void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #9
  call void @_ZN11charls_test20portable_anymap_fileD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #9
  br label %167

134:                                              ; preds = %121, %111, %106
  %135 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %4, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %5, align 4
  br label %146

138:                                              ; preds = %119, %117, %115, %114
  %139 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %4, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %146

142:                                              ; preds = %131, %126, %124, %123
  %143 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %4, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %146

146:                                              ; preds = %142, %138, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %147

147:                                              ; preds = %146, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  br label %148

148:                                              ; preds = %147, %71, %67
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  br label %149

149:                                              ; preds = %148, %63
  call void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  br label %150

150:                                              ; preds = %149, %59
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #9
  call void @_ZN11charls_test20portable_anymap_fileD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  br label %151

151:                                              ; preds = %150, %55
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #9
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %5, align 4
  %154 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN6charls12jpegls_errorE) #9
  %155 = icmp eq i32 %153, %154
  br i1 %155, label %156, label %168

156:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %157 = load ptr, ptr %4, align 8
  %158 = call ptr @__cxa_begin_catch(ptr %157) #9
  store ptr %158, ptr %20, align 8
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.31)
          to label %160 unwind label %190

160:                                              ; preds = %156
  %161 = load ptr, ptr %20, align 8, !tbaa !20
  %162 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %161) #9
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef %162)
          to label %164 unwind label %190

164:                                              ; preds = %160
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef @.str.18)
          to label %166 unwind label %190

166:                                              ; preds = %164
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %167

167:                                              ; preds = %184, %166, %133
  ret void

168:                                              ; preds = %152
  %169 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTINSt8ios_base7failureB5cxx11E) #9
  %170 = icmp eq i32 %153, %169
  br i1 %170, label %171, label %195

171:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %172 = load ptr, ptr %4, align 8
  %173 = call ptr @__cxa_begin_catch(ptr %172) #9
  store ptr %173, ptr %19, align 8
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.30)
          to label %175 unwind label %185

175:                                              ; preds = %171
  %176 = load ptr, ptr %19, align 8, !tbaa !20
  %177 = load ptr, ptr %176, align 8, !tbaa !22
  %178 = getelementptr inbounds ptr, ptr %177, i64 2
  %179 = load ptr, ptr %178, align 8
  %180 = call noundef ptr %179(ptr noundef nonnull align 8 dereferenceable(32) %176) #9
  %181 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %174, ptr noundef %180)
          to label %182 unwind label %185

182:                                              ; preds = %175
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef @.str.18)
          to label %184 unwind label %185

184:                                              ; preds = %182
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %167

185:                                              ; preds = %182, %175, %171
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %4, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %5, align 4
  invoke void @__cxa_end_catch()
          to label %189 unwind label %200

189:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %195

190:                                              ; preds = %164, %160, %156
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %4, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %5, align 4
  invoke void @__cxa_end_catch()
          to label %194 unwind label %200

194:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %195

195:                                              ; preds = %194, %189, %168
  %196 = load ptr, ptr %4, align 8
  %197 = load i32, ptr %5, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199

200:                                              ; preds = %190, %185
  %201 = landingpad { ptr, i32 }
          catch ptr null
  %202 = extractvalue { ptr, i32 } %201, 0
  call void @__clang_call_terminate(ptr %202) #10
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11charls_test20portable_anymap_file5widthEv(ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11charls_test20portable_anymap_file6heightEv(ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11charls_test20portable_anymap_file15bits_per_sampleEv(ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11charls_test20portable_anymap_file15component_countEv(ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6charls14jpegls_encoderC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder10frame_infoERK17charls_frame_info(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder15interleave_modeENS_15interleave_modeE(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder11destinationISt6vectorISt4byteSaIS3_EES3_EERS0_RT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN6charls14jpegls_encoder6encodeISt6vectorISt4byteSaIS3_EES3_EEmRKT_j(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11charls_test20portable_anymap_file10image_dataEv(ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt15_Swallow_assignaSImEERKS_RKT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #8 align 2

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

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

attributes #0 = { 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 #1 = { "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 = { nounwind memory(none) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noinline noreturn nounwind uwtable "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress 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 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS17charls_frame_info", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !6, i64 12}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN6charls15interleave_modeE", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !21, i64 0}
!21 = !{!"any pointer", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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::locale" = type { ptr }
%"struct.std::_Swallow_assign" = type { i8 }
%"class.charls_test::portable_anymap_file" = type { i32, i32, i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::byte, std::allocator<std::byte>>::_Vector_impl" }
%"struct.std::_Vector_base<std::byte, std::allocator<std::byte>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::byte, std::allocator<std::byte>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::byte, std::allocator<std::byte>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.charls_frame_info = type { i32, i32, i32, i32 }
%"class.charls::jpegls_encoder" = type { %"class.std::unique_ptr.5" }
%"class.std::unique_ptr.5" = type { %"struct.std::__uniq_ptr_data.6" }
%"struct.std::__uniq_ptr_data.6" = type { %"class.std::__uniq_ptr_impl.7" }
%"class.std::__uniq_ptr_impl.7" = type { %"class.std::tuple.8" }
%"class.std::tuple.8" = type { %"struct.std::_Tuple_impl.9" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Tuple_impl.10", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Head_base.11" }
%"struct.std::_Head_base.11" = type { ptr }
%"struct.std::_Head_base.12" = type { ptr }
%"class.std::allocator" = type { i8 }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.std::chrono::duration.4" = type { double }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZTINSt8ios_base7failureB5cxx11E = external constant ptr
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZTIN6charls12jpegls_errorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZSt6ignore = external dso_local constant %"struct.std::_Swallow_assign", align 1
@.str.28 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #4

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

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

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

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212steady_clock3nowEv() local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNSt6chronomiINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

; Function Attrs: mustprogress uwtable
define dso_local void @_Z24encode_performance_testsi(i32 noundef %0) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.charls_test::portable_anymap_file", align 8
  %3 = alloca %struct.charls_frame_info, align 4
  %4 = alloca %"class.charls::jpegls_encoder", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::chrono::time_point", align 8
  %8 = alloca %"class.charls::jpegls_encoder", align 8
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::chrono::time_point", align 8
  %11 = alloca %"class.std::chrono::duration", align 8
  %12 = alloca %"class.std::chrono::duration.4", align 8
  %13 = alloca %"class.std::chrono::duration.4", align 8
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.26)
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef %0)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @.str.18)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #9
  invoke void @_ZN11charls_test20portable_anymap_fileC2EPKc(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull @.str.27)
          to label %17 unwind label %38

17:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #9
  %18 = call noundef i32 @_ZNK11charls_test20portable_anymap_file5widthEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  store i32 %18, ptr %3, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %3, i64 4
  %20 = call noundef i32 @_ZNK11charls_test20portable_anymap_file6heightEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  store i32 %20, ptr %19, align 4, !tbaa !10
  %21 = getelementptr inbounds i8, ptr %3, i64 8
  %22 = call noundef i32 @_ZNK11charls_test20portable_anymap_file15bits_per_sampleEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  store i32 %22, ptr %21, align 4, !tbaa !11
  %23 = getelementptr inbounds i8, ptr %3, i64 12
  %24 = call noundef i32 @_ZNK11charls_test20portable_anymap_file15component_countEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  store i32 %24, ptr %23, align 4, !tbaa !12
  %25 = call noundef i32 @_ZNK11charls_test20portable_anymap_file15component_countEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  %.inv = icmp slt i32 %25, 2
  %26 = select i1 %.inv, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  invoke void @_ZN6charls14jpegls_encoderC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %27 unwind label %40

27:                                               ; preds = %17
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder10frame_infoERK17charls_frame_info(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(16) %3)
          to label %29 unwind label %42

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder15interleave_modeENS_15interleave_modeE(ptr noundef nonnull align 8 dereferenceable(16) %28, i32 noundef %26)
          to label %31 unwind label %42

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #9
  %32 = invoke noundef i64 @_ZNK6charls14jpegls_encoder26estimated_destination_sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %33 unwind label %44

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #9
  call void @_ZNSaISt4byteEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  invoke void @_ZNSt6vectorISt4byteSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %32, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %34 unwind label %46

34:                                               ; preds = %33
  call void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %35 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  store i64 %35, ptr %7, align 8
  %.not33 = icmp eq i32 %0, 0
  br i1 %.not33, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %57, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  %36 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  store i64 %36, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %37 = invoke i64 @_ZNSt6chronomiINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %68 unwind label %87

38:                                               ; preds = %1
  %39 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %98

40:                                               ; preds = %17
  %41 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %97

42:                                               ; preds = %29, %27
  %43 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %96

44:                                               ; preds = %31
  %45 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %95

46:                                               ; preds = %33
  %47 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  call void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  br label %95

.lr.ph:                                           ; preds = %34, %57
  %.02234 = phi i32 [ %59, %57 ], [ 0, %34 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #9
  invoke void @_ZN6charls14jpegls_encoderC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %48 unwind label %60

48:                                               ; preds = %.lr.ph
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder10frame_infoERK17charls_frame_info(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(16) %3)
          to label %50 unwind label %62

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder15interleave_modeENS_15interleave_modeE(ptr noundef nonnull align 8 dereferenceable(16) %49, i32 noundef %26)
          to label %52 unwind label %62

52:                                               ; preds = %50
  %53 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder11destinationISt6vectorISt4byteSaIS3_EES3_EERS0_RT_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %54 unwind label %62

54:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11charls_test20portable_anymap_file10image_dataEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  %56 = invoke noundef i64 @_ZN6charls14jpegls_encoder6encodeISt6vectorISt4byteSaIS3_EES3_EEmRKT_j(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(24) %55, i32 noundef 0)
          to label %57 unwind label %64

57:                                               ; preds = %54
  store i64 %56, ptr %9, align 8, !tbaa !13
  %58 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt15_Swallow_assignaSImEERKS_RKT_(ptr noundef nonnull align 1 dereferenceable(1) @_ZSt6ignore, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  %59 = add nuw nsw i32 %.02234, 1
  %.not = icmp eq i32 %59, %0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !15

60:                                               ; preds = %.lr.ph
  %61 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %67

62:                                               ; preds = %52, %50, %48
  %63 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %66

64:                                               ; preds = %54
  %65 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  br label %66

66:                                               ; preds = %64, %62
  %.pn25 = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  br label %67

67:                                               ; preds = %66, %60
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %66 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  br label %94

68:                                               ; preds = %._crit_edge
  store i64 %37, ptr %11, align 8
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.28)
          to label %70 unwind label %87

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  invoke void @_ZNSt6chrono8durationIdSt5ratioILl1ELl1000EEEC2IlS1_ILl1ELl1000000000EEvEERKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %71 unwind label %89

71:                                               ; preds = %70
  %72 = call noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %69, double noundef %72)
          to label %74 unwind label %89

74:                                               ; preds = %71
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull @.str.22)
          to label %76 unwind label %89

76:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.29)
          to label %78 unwind label %87

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  invoke void @_ZNSt6chrono8durationIdSt5ratioILl1ELl1000EEEC2IlS1_ILl1ELl1000000000EEvEERKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %79 unwind label %91

79:                                               ; preds = %78
  %80 = call noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %81 = sitofp i32 %0 to double
  %82 = fdiv double %80, %81
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %77, double noundef %82)
          to label %84 unwind label %91

84:                                               ; preds = %79
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull @.str.22)
          to label %86 unwind label %91

86:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  call void @_ZN11charls_test20portable_anymap_fileD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #9
  br label %110

87:                                               ; preds = %76, %68, %._crit_edge
  %88 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %93

89:                                               ; preds = %74, %71, %70
  %90 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  br label %93

91:                                               ; preds = %84, %79, %78
  %92 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  br label %93

93:                                               ; preds = %91, %89, %87
  %.pn = phi { ptr, i32 } [ %92, %91 ], [ %88, %87 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  br label %94

94:                                               ; preds = %93, %67
  %.pn25.pn.pn = phi { ptr, i32 } [ %.pn25.pn, %67 ], [ %.pn, %93 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  br label %95

95:                                               ; preds = %94, %46, %44
  %.pn25.pn.pn.pn = phi { ptr, i32 } [ %.pn25.pn.pn, %94 ], [ %47, %46 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  br label %96

96:                                               ; preds = %95, %42
  %.pn25.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn25.pn.pn.pn, %95 ], [ %43, %42 ]
  call void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  br label %97

97:                                               ; preds = %96, %40
  %.pn25.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn25.pn.pn.pn.pn, %96 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  call void @_ZN11charls_test20portable_anymap_fileD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  br label %98

98:                                               ; preds = %97, %38
  %.pn25.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn25.pn.pn.pn.pn.pn, %97 ], [ %39, %38 ]
  %.7 = extractvalue { ptr, i32 } %.pn25.pn.pn.pn.pn.pn.pn, 0
  %.720 = extractvalue { ptr, i32 } %.pn25.pn.pn.pn.pn.pn.pn, 1
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #9
  %99 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN6charls12jpegls_errorE) #9
  %100 = icmp eq i32 %.720, %99
  br i1 %100, label %101, label %111

101:                                              ; preds = %98
  %102 = call ptr @__cxa_begin_catch(ptr %.7) #9
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.31)
          to label %104 unwind label %128

104:                                              ; preds = %101
  %105 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %102) #9
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef %105)
          to label %107 unwind label %128

107:                                              ; preds = %104
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull @.str.18)
          to label %109 unwind label %128

109:                                              ; preds = %107
  call void @__cxa_end_catch()
  br label %110

110:                                              ; preds = %125, %109, %86
  ret void

111:                                              ; preds = %98
  %112 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTINSt8ios_base7failureB5cxx11E) #9
  %113 = icmp eq i32 %.720, %112
  br i1 %113, label %114, label %130

114:                                              ; preds = %111
  %115 = call ptr @__cxa_begin_catch(ptr %.7) #9
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.30)
          to label %117 unwind label %126

117:                                              ; preds = %114
  %118 = load ptr, ptr %115, align 8, !tbaa !17
  %119 = getelementptr inbounds i8, ptr %118, i64 16
  %120 = load ptr, ptr %119, align 8
  %121 = call noundef ptr %120(ptr noundef nonnull align 8 dereferenceable(32) %115) #9
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef %121)
          to label %123 unwind label %126

123:                                              ; preds = %117
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef nonnull @.str.18)
          to label %125 unwind label %126

125:                                              ; preds = %123
  call void @__cxa_end_catch()
  br label %110

126:                                              ; preds = %123, %117, %114
  %127 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %130 unwind label %131

128:                                              ; preds = %107, %104, %101
  %129 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %130 unwind label %131

130:                                              ; preds = %128, %126, %111
  %.merged = phi { ptr, i32 } [ %.pn25.pn.pn.pn.pn.pn.pn, %111 ], [ %127, %126 ], [ %129, %128 ]
  resume { ptr, i32 } %.merged

131:                                              ; preds = %128, %126
  %132 = landingpad { ptr, i32 }
          catch ptr null
  %133 = extractvalue { ptr, i32 } %132, 0
  call void @__clang_call_terminate(ptr %133) #10
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11charls_test20portable_anymap_file5widthEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11charls_test20portable_anymap_file6heightEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11charls_test20portable_anymap_file15bits_per_sampleEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11charls_test20portable_anymap_file15component_countEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6charls14jpegls_encoderC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder10frame_infoERK17charls_frame_info(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder15interleave_modeENS_15interleave_modeE(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6charls14jpegls_encoder11destinationISt6vectorISt4byteSaIS3_EES3_EERS0_RT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN6charls14jpegls_encoder6encodeISt6vectorISt4byteSaIS3_EES3_EEmRKT_j(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt15_Swallow_assignaSImEERKS_RKT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6charls14jpegls_encoderD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #8 align 2

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass