; LLVM IR from team-charls/charls :: test/performance.ll (Z24decode_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 }
%"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 }
%"class.charls::jpegls_decoder" = type { %"class.std::unique_ptr", i8, %struct.charls_spiff_header, %struct.charls_frame_info, %"class.std::function", %"class.std::function.2" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.1" = type { ptr }
%struct.charls_spiff_header = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.charls_frame_info = type { i32, i32, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.2" = type { %"class.std::_Function_base", 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
@.str.19 = external hidden unnamed_addr constant [41 x i8], align 1
@_ZTIN6charls12jpegls_errorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.20 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [17 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 uwtable
define dso_local void @_Z24decode_performance_testsi(i32 noundef %0) #5 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.charls::jpegls_decoder", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::chrono::time_point", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.charls::jpegls_decoder", align 8
  %12 = alloca %"class.std::chrono::time_point", align 8
  %13 = alloca %"class.std::chrono::duration", align 8
  %14 = alloca %"class.std::chrono::duration.4", align 8
  %15 = alloca %"class.std::chrono::duration.4", align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.19)
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %19)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef @.str.18)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #9
  invoke void @_Z9read_filePKclm(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %3, ptr noundef @.str.20, i64 noundef 0, i64 noundef 0)
          to label %22 unwind label %35

22:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 144, ptr %7) #9
  invoke void @_ZN6charls14jpegls_decoderC2ISt6vectorISt4byteSaIS3_EES3_EERKT_b(ptr noundef nonnull align 8 dereferenceable(144) %7, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext true)
          to label %23 unwind label %39

23:                                               ; preds = %22
  %24 = invoke noundef i64 @_ZNK6charls14jpegls_decoder20get_destination_sizeEj(ptr noundef nonnull align 8 dereferenceable(144) %7, i32 noundef 0)
          to label %25 unwind label %43

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #9
  call void @_ZNSaISt4byteEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt6vectorISt4byteSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %24, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %26 unwind label %47

26:                                               ; preds = %25
  call void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #9
  call void @_ZN6charls14jpegls_decoderD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %7) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %27 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  %28 = getelementptr inbounds %"class.std::chrono::time_point", ptr %9, i32 0, i32 0
  %29 = getelementptr inbounds %"class.std::chrono::duration", ptr %28, i32 0, i32 0
  store i64 %27, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %56, %26
  %31 = load i32, ptr %10, align 4, !tbaa !5
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = icmp ne i32 %31, %32
  br i1 %33, label %53, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %68

35:                                               ; preds = %1
  %36 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %4, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %5, align 4
  br label %111

39:                                               ; preds = %22
  %40 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %4, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %5, align 4
  br label %52

43:                                               ; preds = %23
  %44 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %4, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %5, align 4
  br label %51

47:                                               ; preds = %25
  %48 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %4, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %5, align 4
  call void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #9
  br label %51

51:                                               ; preds = %47, %43
  call void @_ZN6charls14jpegls_decoderD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %7) #9
  br label %52

52:                                               ; preds = %51, %39
  call void @llvm.lifetime.end.p0(i64 144, ptr %7) #9
  br label %110

53:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 144, ptr %11) #9
  invoke void @_ZN6charls14jpegls_decoderC2ISt6vectorISt4byteSaIS3_EES3_EERKT_b(ptr noundef nonnull align 8 dereferenceable(144) %11, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext true)
          to label %54 unwind label %59

54:                                               ; preds = %53
  invoke void @_ZN6charls14jpegls_decoder6decodeISt6vectorISt4byteSaIS3_EES3_EEvRT_j(ptr noundef nonnull align 8 dereferenceable(144) %11, ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 0)
          to label %55 unwind label %63

55:                                               ; preds = %54
  call void @_ZN6charls14jpegls_decoderD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %11) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr %11) #9
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %10, align 4, !tbaa !5
  br label %30, !llvm.loop !9

59:                                               ; preds = %53
  %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 %67

63:                                               ; preds = %54
  %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
  call void @_ZN6charls14jpegls_decoderD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %11) #9
  br label %67

67:                                               ; preds = %63, %59
  call void @llvm.lifetime.end.p0(i64 144, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %109

68:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %69 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  %70 = getelementptr inbounds %"class.std::chrono::time_point", ptr %12, i32 0, i32 0
  %71 = getelementptr inbounds %"class.std::chrono::duration", ptr %70, i32 0, i32 0
  store i64 %69, ptr %71, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %72 = 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) %12, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %73 unwind label %96

73:                                               ; preds = %68
  %74 = getelementptr inbounds %"class.std::chrono::duration", ptr %13, i32 0, i32 0
  store i64 %72, ptr %74, align 8
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.21)
          to label %76 unwind label %96

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

77:                                               ; preds = %76
  %78 = invoke noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %79 unwind label %100

79:                                               ; preds = %77
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %75, double noundef %78)
          to label %81 unwind label %100

81:                                               ; preds = %79
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef @.str.22)
          to label %83 unwind label %100

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.23)
          to label %85 unwind label %96

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  invoke void @_ZNSt6chrono8durationIdSt5ratioILl1ELl1000EEEC2IlS1_ILl1ELl1000000000EEvEERKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %86 unwind label %104

86:                                               ; preds = %85
  %87 = invoke noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %88 unwind label %104

88:                                               ; preds = %86
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = sitofp i32 %89 to double
  %91 = fdiv double %87, %90
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %84, double noundef %91)
          to label %93 unwind label %104

93:                                               ; preds = %88
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef @.str.22)
          to label %95 unwind label %104

95:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #9
  br label %127

96:                                               ; preds = %83, %73, %68
  %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 %108

100:                                              ; preds = %81, %79, %77, %76
  %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 %108

104:                                              ; preds = %93, %88, %86, %85
  %105 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %4, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %108

108:                                              ; preds = %104, %100, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %109

109:                                              ; preds = %108, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  br label %110

110:                                              ; preds = %109, %52
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  br label %111

111:                                              ; preds = %110, %35
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #9
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %5, align 4
  %114 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN6charls12jpegls_errorE) #9
  %115 = icmp eq i32 %113, %114
  br i1 %115, label %116, label %128

116:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %117 = load ptr, ptr %4, align 8
  %118 = call ptr @__cxa_begin_catch(ptr %117) #9
  store ptr %118, ptr %17, align 8
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.25)
          to label %120 unwind label %150

120:                                              ; preds = %116
  %121 = load ptr, ptr %17, align 8, !tbaa !11
  %122 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %121) #9
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef %122)
          to label %124 unwind label %150

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

126:                                              ; preds = %124
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %127

127:                                              ; preds = %144, %126, %95
  ret void

128:                                              ; preds = %112
  %129 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTINSt8ios_base7failureB5cxx11E) #9
  %130 = icmp eq i32 %113, %129
  br i1 %130, label %131, label %155

131:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %132 = load ptr, ptr %4, align 8
  %133 = call ptr @__cxa_begin_catch(ptr %132) #9
  store ptr %133, ptr %16, align 8
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.24)
          to label %135 unwind label %145

135:                                              ; preds = %131
  %136 = load ptr, ptr %16, align 8, !tbaa !11
  %137 = load ptr, ptr %136, align 8, !tbaa !13
  %138 = getelementptr inbounds ptr, ptr %137, i64 2
  %139 = load ptr, ptr %138, align 8
  %140 = call noundef ptr %139(ptr noundef nonnull align 8 dereferenceable(32) %136) #9
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef %140)
          to label %142 unwind label %145

142:                                              ; preds = %135
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef @.str.18)
          to label %144 unwind label %145

144:                                              ; preds = %142
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %127

145:                                              ; preds = %142, %135, %131
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %4, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %5, align 4
  invoke void @__cxa_end_catch()
          to label %149 unwind label %160

149:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %155

150:                                              ; preds = %124, %120, %116
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %4, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %5, align 4
  invoke void @__cxa_end_catch()
          to label %154 unwind label %160

154:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %155

155:                                              ; preds = %154, %149, %128
  %156 = load ptr, ptr %4, align 8
  %157 = load i32, ptr %5, align 4
  %158 = insertvalue { ptr, i32 } poison, ptr %156, 0
  %159 = insertvalue { ptr, i32 } %158, i32 %157, 1
  resume { ptr, i32 } %159

160:                                              ; preds = %150, %145
  %161 = landingpad { ptr, i32 }
          catch ptr null
  %162 = extractvalue { ptr, i32 } %161, 0
  call void @__clang_call_terminate(ptr %162) #10
  unreachable
}

declare void @_Z9read_filePKclm(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef, i64 noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6charls14jpegls_decoderC2ISt6vectorISt4byteSaIS3_EES3_EERKT_b(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK6charls14jpegls_decoder20get_destination_sizeEj(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef) #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6charls14jpegls_decoder6decodeISt6vectorISt4byteSaIS3_EES3_EEvRT_j(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #5 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 #5 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 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 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 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 #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 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"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 }
%"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 }
%"class.charls::jpegls_decoder" = type { %"class.std::unique_ptr", i8, %struct.charls_spiff_header, %struct.charls_frame_info, %"class.std::function", %"class.std::function.2" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.1" = type { ptr }
%struct.charls_spiff_header = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.charls_frame_info = type { i32, i32, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.2" = type { %"class.std::_Function_base", 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
@.str.19 = external hidden unnamed_addr constant [41 x i8], align 1
@_ZTIN6charls12jpegls_errorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.20 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [17 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 uwtable
define dso_local void @_Z24decode_performance_testsi(i32 noundef %0) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.charls::jpegls_decoder", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::chrono::time_point", align 8
  %7 = alloca %"class.charls::jpegls_decoder", align 8
  %8 = alloca %"class.std::chrono::time_point", align 8
  %9 = alloca %"class.std::chrono::duration", align 8
  %10 = alloca %"class.std::chrono::duration.4", align 8
  %11 = alloca %"class.std::chrono::duration.4", align 8
  %12 = 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.19)
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef %0)
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.18)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #9
  invoke void @_Z9read_filePKclm(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %2, ptr noundef nonnull @.str.20, i64 noundef 0, i64 noundef 0)
          to label %15 unwind label %23

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %4) #9
  invoke void @_ZN6charls14jpegls_decoderC2ISt6vectorISt4byteSaIS3_EES3_EERKT_b(ptr noundef nonnull align 8 dereferenceable(144) %4, ptr noundef nonnull align 8 dereferenceable(24) %2, i1 noundef zeroext true)
          to label %16 unwind label %25

16:                                               ; preds = %15
  %17 = invoke noundef i64 @_ZNK6charls14jpegls_decoder20get_destination_sizeEj(ptr noundef nonnull align 8 dereferenceable(144) %4, i32 noundef 0)
          to label %18 unwind label %27

18:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #9
  call void @_ZNSaISt4byteEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  invoke void @_ZNSt6vectorISt4byteSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %17, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %19 unwind label %29

19:                                               ; preds = %18
  call void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  call void @_ZN6charls14jpegls_decoderD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %4) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %20 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  store i64 %20, ptr %6, align 8
  %.not30 = icmp eq i32 %0, 0
  br i1 %.not30, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %34, %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %21 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  store i64 %21, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %22 = 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) %8, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %41 unwind label %60

23:                                               ; preds = %1
  %24 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %69

25:                                               ; preds = %15
  %26 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %32

27:                                               ; preds = %16
  %28 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %31

29:                                               ; preds = %18
  %30 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  call void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  br label %31

31:                                               ; preds = %29, %27
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %28, %27 ]
  call void @_ZN6charls14jpegls_decoderD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %4) #9
  br label %32

32:                                               ; preds = %31, %25
  %.pn.pn = phi { ptr, i32 } [ %.pn, %31 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #9
  br label %68

.lr.ph:                                           ; preds = %19, %34
  %.01931 = phi i32 [ %35, %34 ], [ 0, %19 ]
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %7) #9
  invoke void @_ZN6charls14jpegls_decoderC2ISt6vectorISt4byteSaIS3_EES3_EERKT_b(ptr noundef nonnull align 8 dereferenceable(144) %7, ptr noundef nonnull align 8 dereferenceable(24) %2, i1 noundef zeroext true)
          to label %33 unwind label %36

33:                                               ; preds = %.lr.ph
  invoke void @_ZN6charls14jpegls_decoder6decodeISt6vectorISt4byteSaIS3_EES3_EEvRT_j(ptr noundef nonnull align 8 dereferenceable(144) %7, ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef 0)
          to label %34 unwind label %38

34:                                               ; preds = %33
  call void @_ZN6charls14jpegls_decoderD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %7) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %7) #9
  %35 = add nuw nsw i32 %.01931, 1
  %.not = icmp eq i32 %35, %0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !5

36:                                               ; preds = %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %40

38:                                               ; preds = %33
  %39 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  call void @_ZN6charls14jpegls_decoderD2Ev(ptr noundef nonnull align 8 dereferenceable(144) %7) #9
  br label %40

40:                                               ; preds = %38, %36
  %.pn25 = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %7) #9
  br label %67

41:                                               ; preds = %._crit_edge
  store i64 %22, ptr %9, align 8
  %42 = 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.21)
          to label %43 unwind label %60

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  invoke void @_ZNSt6chrono8durationIdSt5ratioILl1ELl1000EEEC2IlS1_ILl1ELl1000000000EEvEERKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %44 unwind label %62

44:                                               ; preds = %43
  %45 = call noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %42, double noundef %45)
          to label %47 unwind label %62

47:                                               ; preds = %44
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @.str.22)
          to label %49 unwind label %62

49:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  %50 = 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.23)
          to label %51 unwind label %60

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  invoke void @_ZNSt6chrono8durationIdSt5ratioILl1ELl1000EEEC2IlS1_ILl1ELl1000000000EEvEERKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %52 unwind label %64

52:                                               ; preds = %51
  %53 = call noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %54 = sitofp i32 %0 to double
  %55 = fdiv double %53, %54
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %50, double noundef %55)
          to label %57 unwind label %64

57:                                               ; preds = %52
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull @.str.22)
          to label %59 unwind label %64

59:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  br label %81

60:                                               ; preds = %49, %41, %._crit_edge
  %61 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  br label %66

62:                                               ; preds = %47, %44, %43
  %63 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6charls12jpegls_errorE
          catch ptr @_ZTINSt8ios_base7failureB5cxx11E
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  br label %66

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

66:                                               ; preds = %64, %62, %60
  %.pn23 = phi { ptr, i32 } [ %65, %64 ], [ %61, %60 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %67

67:                                               ; preds = %66, %40
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %40 ], [ %.pn23, %66 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  br label %68

68:                                               ; preds = %67, %32
  %.pn25.pn.pn = phi { ptr, i32 } [ %.pn25.pn, %67 ], [ %.pn.pn, %32 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #9
  call void @_ZNSt6vectorISt4byteSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  br label %69

69:                                               ; preds = %68, %23
  %.pn25.pn.pn.pn = phi { ptr, i32 } [ %.pn25.pn.pn, %68 ], [ %24, %23 ]
  %.6 = extractvalue { ptr, i32 } %.pn25.pn.pn.pn, 0
  %.617 = extractvalue { ptr, i32 } %.pn25.pn.pn.pn, 1
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  %70 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN6charls12jpegls_errorE) #9
  %71 = icmp eq i32 %.617, %70
  br i1 %71, label %72, label %82

72:                                               ; preds = %69
  %73 = call ptr @__cxa_begin_catch(ptr %.6) #9
  %74 = 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.25)
          to label %75 unwind label %99

75:                                               ; preds = %72
  %76 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %73) #9
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef %76)
          to label %78 unwind label %99

78:                                               ; preds = %75
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @.str.18)
          to label %80 unwind label %99

80:                                               ; preds = %78
  call void @__cxa_end_catch()
  br label %81

81:                                               ; preds = %96, %80, %59
  ret void

82:                                               ; preds = %69
  %83 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTINSt8ios_base7failureB5cxx11E) #9
  %84 = icmp eq i32 %.617, %83
  br i1 %84, label %85, label %101

85:                                               ; preds = %82
  %86 = call ptr @__cxa_begin_catch(ptr %.6) #9
  %87 = 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.24)
          to label %88 unwind label %97

88:                                               ; preds = %85
  %89 = load ptr, ptr %86, align 8, !tbaa !7
  %90 = getelementptr inbounds i8, ptr %89, i64 16
  %91 = load ptr, ptr %90, align 8
  %92 = call noundef ptr %91(ptr noundef nonnull align 8 dereferenceable(32) %86) #9
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef %92)
          to label %94 unwind label %97

94:                                               ; preds = %88
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @.str.18)
          to label %96 unwind label %97

96:                                               ; preds = %94
  call void @__cxa_end_catch()
  br label %81

97:                                               ; preds = %94, %88, %85
  %98 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %101 unwind label %102

99:                                               ; preds = %78, %75, %72
  %100 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %101 unwind label %102

101:                                              ; preds = %99, %97, %82
  %.merged = phi { ptr, i32 } [ %.pn25.pn.pn.pn, %82 ], [ %98, %97 ], [ %100, %99 ]
  resume { ptr, i32 } %.merged

102:                                              ; preds = %99, %97
  %103 = landingpad { ptr, i32 }
          catch ptr null
  %104 = extractvalue { ptr, i32 } %103, 0
  call void @__clang_call_terminate(ptr %104) #10
  unreachable
}

declare void @_Z9read_filePKclm(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6charls14jpegls_decoderC2ISt6vectorISt4byteSaIS3_EES3_EERKT_b(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK6charls14jpegls_decoder20get_destination_sizeEj(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6charls14jpegls_decoder6decodeISt6vectorISt4byteSaIS3_EES3_EEvRT_j(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #5 align 2

; 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 #5

; 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 #5 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 #5 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4byteED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 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 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 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 #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 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"vtable pointer", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


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