; LLVM IR from Nonoum/ECL :: tests/tests.ll (ZN26test_NanoLZ_fast1_datasets11runInternalERSoi)

; 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::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ECL_NanoLZ_FastParams = type { ptr, ptr, i32 }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%struct.ECLDatasetRecord = type { ptr, i32 }

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local zeroext i1 @ECL_NanoLZ_FastParams_Alloc1(ptr noundef, i8 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @ECL_NanoLZ_FastParams_Destroy(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ECL_NanoLZ_Compress_fast1(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ECL_NanoLZ_Decompress(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13ntest_for_ecl10ntest_noopEv() #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(24) ptr @_ZL17GetDatasetRecordsv() #1

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

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

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #4

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN26test_NanoLZ_fast1_datasets11runInternalERSoi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.1", align 8
  %8 = alloca %"class.std::vector.1", align 8
  %9 = alloca %struct.ECL_NanoLZ_FastParams, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.std::initializer_list", align 8
  %22 = alloca [1 x i32], align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %28 = load ptr, ptr %4, align 8
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN13ntest_for_ecl10ntest_noopEv()
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  %30 = invoke zeroext i1 @ECL_NanoLZ_FastParams_Alloc1(ptr noundef %9, i8 noundef zeroext 10)
          to label %31 unwind label %43

31:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %32 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZL17GetDatasetRecordsv()
          to label %33 unwind label %47

33:                                               ; preds = %31
  store ptr %32, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  %35 = call ptr @_ZNSt6vectorI16ECLDatasetRecordSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %13, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = call ptr @_ZNSt6vectorI16ECLDatasetRecordSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #5
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %14, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  br label %40

40:                                               ; preds = %132, %33
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP16ECLDatasetRecordSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %41, label %51, label %42

42:                                               ; preds = %40
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %136

43:                                               ; preds = %136, %3
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %10, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %11, align 4
  br label %138

47:                                               ; preds = %31
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %10, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %11, align 4
  br label %135

51:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP16ECLDatasetRecordSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  store ptr %52, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ECLDatasetRecord, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !11
  store ptr %55, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %56 = load ptr, ptr %16, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ECLDatasetRecord, ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 8, !tbaa !13
  store i32 %58, ptr %18, align 4, !tbaa !9
  %59 = load ptr, ptr %17, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  %61 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %28, i1 noundef zeroext %60)
  %62 = load i32, ptr %18, align 4, !tbaa !9
  %63 = icmp ne i32 %62, 0
  %64 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %28, i1 noundef zeroext %63)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %65 = load i32, ptr %18, align 4, !tbaa !9
  %66 = add i32 %65, 2
  %67 = zext i32 %66 to i64
  %68 = add i64 %67, 4
  %69 = add i64 %68, 1
  store i64 %69, ptr %19, align 8, !tbaa !14
  %70 = load i64, ptr %19, align 8, !tbaa !14
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %70)
          to label %71 unwind label %83

71:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !16
  %72 = getelementptr inbounds %"class.std::initializer_list", ptr %21, i32 0, i32 0
  store ptr %22, ptr %72, align 8, !tbaa !18
  %73 = getelementptr inbounds %"class.std::initializer_list", ptr %21, i32 0, i32 1
  store i64 1, ptr %73, align 8, !tbaa !20
  store ptr %21, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %74 = load ptr, ptr %20, align 8, !tbaa !5
  %75 = call noundef ptr @_ZNKSt16initializer_listI17ECL_NanoLZ_SchemeE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %74) #5
  store ptr %75, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %76 = load ptr, ptr %20, align 8, !tbaa !5
  %77 = call noundef ptr @_ZNKSt16initializer_listI17ECL_NanoLZ_SchemeE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %76) #5
  store ptr %77, ptr %24, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %119, %71
  %79 = load ptr, ptr %23, align 8, !tbaa !5
  %80 = load ptr, ptr %24, align 8, !tbaa !5
  %81 = icmp ne ptr %79, %80
  br i1 %81, label %87, label %82

82:                                               ; preds = %78
  store i32 4, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %131

83:                                               ; preds = %51
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %10, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %11, align 4
  br label %134

87:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %88 = load ptr, ptr %23, align 8, !tbaa !5
  %89 = load i32, ptr %88, align 4, !tbaa !16
  store i32 %89, ptr %25, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %90 = load i32, ptr %25, align 4, !tbaa !16
  %91 = load ptr, ptr %17, align 8, !tbaa !5
  %92 = load i32, ptr %18, align 4, !tbaa !9
  %93 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %94 = load i64, ptr %19, align 8, !tbaa !14
  %95 = trunc i64 %94 to i32
  %96 = invoke i32 @ECL_NanoLZ_Compress_fast1(i32 noundef %90, ptr noundef %91, i32 noundef %92, ptr noundef %93, i32 noundef %95, i32 noundef -1, ptr noundef %9)
          to label %97 unwind label %122

97:                                               ; preds = %87
  store i32 %96, ptr %26, align 4, !tbaa !9
  %98 = load i32, ptr %18, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %99)
          to label %100 unwind label %122

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %101 = load i32, ptr %25, align 4, !tbaa !16
  %102 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %103 = load i32, ptr %26, align 4, !tbaa !9
  %104 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %105 = load i32, ptr %18, align 4, !tbaa !9
  %106 = invoke i32 @ECL_NanoLZ_Decompress(i32 noundef %101, ptr noundef %102, i32 noundef %103, ptr noundef %104, i32 noundef %105)
          to label %107 unwind label %126

107:                                              ; preds = %100
  store i32 %106, ptr %27, align 4, !tbaa !9
  %108 = load i32, ptr %27, align 4, !tbaa !9
  %109 = load i32, ptr %18, align 4, !tbaa !9
  %110 = icmp eq i32 %108, %109
  %111 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %28, i1 noundef zeroext %110)
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  %113 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %114 = load i32, ptr %18, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = call i32 @memcmp(ptr noundef %112, ptr noundef %113, i64 noundef %115) #6
  %117 = icmp eq i32 0, %116
  %118 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %28, i1 noundef zeroext %117)
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %119

119:                                              ; preds = %107
  %120 = load ptr, ptr %23, align 8, !tbaa !5
  %121 = getelementptr inbounds i32, ptr %120, i32 1
  store ptr %121, ptr %23, align 8, !tbaa !5
  br label %78

122:                                              ; preds = %97, %87
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %10, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %11, align 4
  br label %130

126:                                              ; preds = %100
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %10, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %130

130:                                              ; preds = %126, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %134

131:                                              ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %132

132:                                              ; preds = %131
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP16ECLDatasetRecordSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %40

134:                                              ; preds = %130, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %135

135:                                              ; preds = %134, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %138

136:                                              ; preds = %42
  invoke void @ECL_NanoLZ_FastParams_Destroy(ptr noundef %9)
          to label %137 unwind label %43

137:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  ret void

138:                                              ; preds = %135, %43
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  br label %139

139:                                              ; preds = %138
  %140 = load ptr, ptr %10, align 8
  %141 = load i32, ptr %11, align 4
  %142 = insertvalue { ptr, i32 } poison, ptr %140, 0
  %143 = insertvalue { ptr, i32 } %142, i32 %141, 1
  resume { ptr, i32 } %143
}

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

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

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


; 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::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ECL_NanoLZ_FastParams = type { ptr, ptr, i32 }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }
%"class.std::initializer_list" = type { ptr, i64 }

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local zeroext i1 @ECL_NanoLZ_FastParams_Alloc1(ptr noundef, i8 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @ECL_NanoLZ_FastParams_Destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ECL_NanoLZ_Compress_fast1(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ECL_NanoLZ_Decompress(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13ntest_for_ecl10ntest_noopEv() local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(24) ptr @_ZL17GetDatasetRecordsv() local_unnamed_addr #1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN26test_NanoLZ_fast1_datasets11runInternalERSoi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.1", align 8
  %5 = alloca %"class.std::vector.1", align 8
  %6 = alloca %struct.ECL_NanoLZ_FastParams, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %9 = alloca %"class.std::initializer_list", align 8
  %10 = alloca [1 x i32], align 4
  tail call void @_ZN13ntest_for_ecl10ntest_noopEv()
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  %11 = invoke zeroext i1 @ECL_NanoLZ_FastParams_Alloc1(ptr noundef nonnull %6, i8 noundef zeroext 10)
          to label %12 unwind label %18

12:                                               ; preds = %3
  %13 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZL17GetDatasetRecordsv()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %14 = call ptr @_ZNSt6vectorI16ECLDatasetRecordSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  store ptr %14, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %15 = call ptr @_ZNSt6vectorI16ECLDatasetRecordSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  store ptr %15, ptr %8, align 8
  %16 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP16ECLDatasetRecordSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %16, label %.lr.ph39, label %._crit_edge40

.lr.ph39:                                         ; preds = %12
  %17 = getelementptr inbounds i8, ptr %9, i64 8
  br label %20

._crit_edge40:                                    ; preds = %._crit_edge, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  invoke void @ECL_NanoLZ_FastParams_Destroy(ptr noundef nonnull %6)
          to label %63 unwind label %18

18:                                               ; preds = %._crit_edge40, %3
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %64

20:                                               ; preds = %.lr.ph39, %._crit_edge
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP16ECLDatasetRecordSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %21, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = icmp ne ptr %22, null
  %26 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %25)
  %27 = icmp ne i32 %24, 0
  %28 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %27)
  %29 = add i32 %24, 2
  %30 = zext i32 %29 to i64
  %31 = add nuw nsw i64 %30, 5
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %31)
          to label %32 unwind label %39

32:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store i32 0, ptr %10, align 4, !tbaa !12
  store ptr %10, ptr %9, align 8, !tbaa !14
  store i64 1, ptr %17, align 8, !tbaa !17
  %33 = call noundef ptr @_ZNKSt16initializer_listI17ECL_NanoLZ_SchemeE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  %34 = call noundef ptr @_ZNKSt16initializer_listI17ECL_NanoLZ_SchemeE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  %.not36 = icmp eq ptr %33, %34
  br i1 %.not36, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %32
  %35 = trunc i64 %31 to i32
  %36 = zext i32 %24 to i64
  br label %41

._crit_edge:                                      ; preds = %50, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP16ECLDatasetRecordSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP16ECLDatasetRecordSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %38, label %20, label %._crit_edge40

39:                                               ; preds = %20
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %62

41:                                               ; preds = %.lr.ph, %50
  %.03237 = phi ptr [ %33, %.lr.ph ], [ %56, %50 ]
  %42 = load i32, ptr %.03237, align 4, !tbaa !12
  %43 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %44 = invoke i32 @ECL_NanoLZ_Compress_fast1(i32 noundef %42, ptr noundef %22, i32 noundef %24, ptr noundef %43, i32 noundef %35, i32 noundef -1, ptr noundef nonnull %6)
          to label %45 unwind label %57

45:                                               ; preds = %41
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %36)
          to label %46 unwind label %57

46:                                               ; preds = %45
  %47 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %48 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %49 = invoke i32 @ECL_NanoLZ_Decompress(i32 noundef %42, ptr noundef %47, i32 noundef %44, ptr noundef %48, i32 noundef %24)
          to label %50 unwind label %59

50:                                               ; preds = %46
  %51 = icmp eq i32 %49, %24
  %52 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %51)
  %53 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %bcmp = call i32 @bcmp(ptr %22, ptr %53, i64 %36)
  %54 = icmp eq i32 %bcmp, 0
  %55 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %54)
  %56 = getelementptr inbounds i8, ptr %.03237, i64 4
  %.not = icmp eq ptr %56, %34
  br i1 %.not, label %._crit_edge, label %41

57:                                               ; preds = %45, %41
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %61

59:                                               ; preds = %46
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %61

61:                                               ; preds = %59, %57
  %.pn = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %62

62:                                               ; preds = %61, %39
  %.pn.pn = phi { ptr, i32 } [ %.pn, %61 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %64

63:                                               ; preds = %._crit_edge40
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  ret void

64:                                               ; preds = %62, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %62 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4

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

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

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


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