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

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

@__const._ZN40test_ZeroDevourer_insufficient_dst_compr11runInternalERSoi.masks = external hidden unnamed_addr constant [8 x i8], align 1

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

; Function Attrs: 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @ECL_ZeroDevourer_Decompress(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #1

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

; 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 uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 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) #5

; 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 nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: nounwind
declare i32 @rand() #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN40test_ZeroDevourer_insufficient_dst_compr11runInternalERSoi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) unnamed_addr #3 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 %"class.std::vector.1", align 8
  %10 = alloca [8 x i8], align 1
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = 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
  %27 = load ptr, ptr %4, align 8
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN13ntest_for_ecl10ntest_noopEv()
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %10, ptr align 1 @__const._ZN40test_ZeroDevourer_insufficient_dst_compr11runInternalERSoi.masks, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 8000, ptr %11, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 8000)
          to label %29 unwind label %34

29:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %44, %29
  %31 = load i32, ptr %14, align 4, !tbaa !9
  %32 = icmp ult i32 %31, 8000
  br i1 %32, label %38, label %33

33:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %47

34:                                               ; preds = %3
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %12, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %13, align 4
  br label %157

38:                                               ; preds = %30
  %39 = call i32 @rand() #7
  %40 = trunc i32 %39 to i8
  %41 = load i32, ptr %14, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %42) #7
  store i8 %40, ptr %43, align 1, !tbaa !11
  br label %44

44:                                               ; preds = %38
  %45 = load i32, ptr %14, align 4, !tbaa !9
  %46 = add i32 %45, 1
  store i32 %46, ptr %14, align 4, !tbaa !9
  br label %30, !llvm.loop !12

47:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr %10, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = getelementptr inbounds [8 x i8], ptr %48, i64 0, i64 0
  store ptr %49, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %50 = load ptr, ptr %15, align 8, !tbaa !5
  %51 = getelementptr inbounds [8 x i8], ptr %50, i64 0, i64 0
  %52 = getelementptr inbounds i8, ptr %51, i64 8
  store ptr %52, ptr %17, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %151, %47
  %54 = load ptr, ptr %16, align 8, !tbaa !5
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  %56 = icmp ne ptr %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %156

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = load i8, ptr %59, align 1, !tbaa !11
  store i8 %60, ptr %19, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %75, %58
  %62 = load i32, ptr %20, align 4, !tbaa !9
  %63 = icmp ult i32 %62, 8000
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  store i32 7, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %78

65:                                               ; preds = %61
  %66 = load i8, ptr %19, align 1, !tbaa !11
  %67 = zext i8 %66 to i32
  %68 = load i32, ptr %20, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %69) #7
  %71 = load i8, ptr %70, align 1, !tbaa !11
  %72 = zext i8 %71 to i32
  %73 = and i32 %72, %67
  %74 = trunc i32 %73 to i8
  store i8 %74, ptr %70, align 1, !tbaa !11
  br label %75

75:                                               ; preds = %65
  %76 = load i32, ptr %20, align 4, !tbaa !9
  %77 = add i32 %76, 1
  store i32 %77, ptr %20, align 4, !tbaa !9
  br label %61, !llvm.loop !14

78:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 8008, ptr %21, align 8, !tbaa !15
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 8008)
          to label %79 unwind label %102

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %80 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %81 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %82 = invoke i32 @ECL_ZeroDevourer_Compress(ptr noundef %80, i32 noundef 8000, ptr noundef %81, i32 noundef 8008)
          to label %83 unwind label %106

83:                                               ; preds = %79
  store i32 %82, ptr %22, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 8000)
          to label %84 unwind label %106

84:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %85 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %86 = load i32, ptr %22, align 4, !tbaa !9
  %87 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %88 = call i32 @ECL_ZeroDevourer_Decompress(ptr noundef %85, i32 noundef %86, ptr noundef %87, i32 noundef 8000)
  store i32 %88, ptr %23, align 4, !tbaa !9
  %89 = load i32, ptr %23, align 4, !tbaa !9
  %90 = icmp eq i32 %89, 8000
  %91 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %27, i1 noundef zeroext %90)
  %92 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %93 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %94 = call i32 @memcmp(ptr noundef %92, ptr noundef %93, i64 noundef 8000) #8
  %95 = icmp eq i32 0, %94
  %96 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %27, i1 noundef zeroext %95)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 1, ptr %24, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %138, %84
  %98 = load i32, ptr %24, align 4, !tbaa !9
  %99 = load i32, ptr %22, align 4, !tbaa !9
  %100 = icmp ule i32 %98, %99
  br i1 %100, label %110, label %101

101:                                              ; preds = %97
  store i32 10, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %150

102:                                              ; preds = %78
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %12, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %13, align 4
  br label %155

106:                                              ; preds = %83, %79
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %12, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %13, align 4
  br label %154

110:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %111 = load i32, ptr %22, align 4, !tbaa !9
  %112 = load i32, ptr %24, align 4, !tbaa !9
  %113 = sub i32 %111, %112
  store i32 %113, ptr %25, align 4, !tbaa !9
  %114 = load i32, ptr %25, align 4, !tbaa !9
  %115 = add i32 %114, 1
  %116 = zext i32 %115 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %116)
          to label %117 unwind label %141

117:                                              ; preds = %110
  %118 = load i32, ptr %25, align 4, !tbaa !9
  %119 = zext i32 %118 to i64
  %120 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %119) #7
  store i8 57, ptr %120, align 1, !tbaa !11
  invoke void @_ZN13ntest_for_ecl10ntest_noopEv()
          to label %121 unwind label %141

121:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %122 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %123 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %124 = load i32, ptr %25, align 4, !tbaa !9
  %125 = invoke i32 @ECL_ZeroDevourer_Compress(ptr noundef %122, i32 noundef 8000, ptr noundef %123, i32 noundef %124)
          to label %126 unwind label %145

126:                                              ; preds = %121
  store i32 %125, ptr %26, align 4, !tbaa !9
  %127 = load i32, ptr %26, align 4, !tbaa !9
  %128 = icmp ne i32 %127, 0
  %129 = xor i1 %128, true
  %130 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %27, i1 noundef zeroext %129)
  %131 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %132 = sub i64 %131, 1
  %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %132) #7
  %134 = load i8, ptr %133, align 1, !tbaa !11
  %135 = zext i8 %134 to i32
  %136 = icmp eq i32 %135, 57
  %137 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %27, i1 noundef zeroext %136)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %138

138:                                              ; preds = %126
  %139 = load i32, ptr %24, align 4, !tbaa !9
  %140 = add i32 %139, 1
  store i32 %140, ptr %24, align 4, !tbaa !9
  br label %97, !llvm.loop !17

141:                                              ; preds = %117, %110
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %12, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %13, align 4
  br label %149

145:                                              ; preds = %121
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %12, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %149

149:                                              ; preds = %145, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %154

150:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = getelementptr inbounds i8, ptr %152, i32 1
  store ptr %153, ptr %16, align 8, !tbaa !5
  br label %53

154:                                              ; preds = %149, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %155

155:                                              ; preds = %154, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %157

156:                                              ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  ret void

157:                                              ; preds = %155, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  br label %158

158:                                              ; preds = %157
  %159 = load ptr, ptr %12, align 8
  %160 = load i32, ptr %13, align 4
  %161 = insertvalue { ptr, i32 } poison, ptr %159, 0
  %162 = insertvalue { ptr, i32 } %161, i32 %160, 1
  resume { ptr, i32 } %162
}

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = distinct !{!17, !13}


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

@__const._ZN40test_ZeroDevourer_insufficient_dst_compr11runInternalERSoi.masks = external hidden unnamed_addr constant [8 x i8], align 1

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

; Function Attrs: mustprogress 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 i32 @ECL_ZeroDevourer_Compress(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @ECL_ZeroDevourer_Decompress(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; 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 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 void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN40test_ZeroDevourer_insufficient_dst_compr11runInternalERSoi(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 %"class.std::vector.1", align 8
  %7 = alloca [8 x i8], align 8
  tail call void @_ZN13ntest_for_ecl10ntest_noopEv()
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %8 = load i64, ptr @__const._ZN40test_ZeroDevourer_insufficient_dst_compr11runInternalERSoi.masks, align 1
  store i64 %8, ptr %7, align 8
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 8000)
          to label %.preheader42 unwind label %9

9:                                                ; preds = %3
  %10 = landingpad { ptr, i32 }
          cleanup
  br label %62

.preheader42:                                     ; preds = %3, %.preheader42
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader42 ], [ 0, %3 ]
  %11 = call i32 @rand() #6
  %12 = trunc i32 %11 to i8
  %13 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #6
  store i8 %12, ptr %13, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 8000
  br i1 %exitcond.not, label %.preheader, label %.preheader42, !llvm.loop !8

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

.preheader:                                       ; preds = %.preheader42, %._crit_edge
  %.033.idx47 = phi i64 [ %.033.add, %._crit_edge ], [ 0, %.preheader42 ]
  %.033.ptr = getelementptr inbounds i8, ptr %7, i64 %.033.idx47
  %15 = load i8, ptr %.033.ptr, align 1, !tbaa !5
  br label %17

16:                                               ; preds = %17
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 8008)
          to label %21 unwind label %36

17:                                               ; preds = %.preheader, %17
  %indvars.iv49 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next50, %17 ]
  %18 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv49) #6
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = and i8 %19, %15
  store i8 %20, ptr %18, align 1, !tbaa !5
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %exitcond52.not = icmp eq i64 %indvars.iv.next50, 8000
  br i1 %exitcond52.not, label %16, label %17, !llvm.loop !10

21:                                               ; preds = %16
  %22 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %23 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %24 = invoke i32 @ECL_ZeroDevourer_Compress(ptr noundef %22, i32 noundef 8000, ptr noundef %23, i32 noundef 8008)
          to label %25 unwind label %38

25:                                               ; preds = %21
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 8000)
          to label %26 unwind label %38

26:                                               ; preds = %25
  %27 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %28 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %29 = call i32 @ECL_ZeroDevourer_Decompress(ptr noundef %27, i32 noundef %24, ptr noundef %28, i32 noundef 8000)
  %30 = icmp eq i32 %29, 8000
  %31 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %30)
  %32 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %33 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(8000) %32, ptr noundef nonnull dereferenceable(8000) %33, i64 8000)
  %34 = icmp eq i32 %bcmp, 0
  %35 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %34)
  %.not3645 = icmp eq i32 %24, 0
  br i1 %.not3645, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %49, %26
  %.033.add = add nuw nsw i64 %.033.idx47, 1
  %.not = icmp eq i64 %.033.add, 8
  br i1 %.not, label %14, label %.preheader

36:                                               ; preds = %16
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %62

38:                                               ; preds = %25, %21
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %62

.lr.ph:                                           ; preds = %26, %49
  %.03146 = phi i32 [ %57, %49 ], [ 1, %26 ]
  %40 = sub i32 %24, %.03146
  %41 = add i32 %40, 1
  %42 = zext i32 %41 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %42)
          to label %43 unwind label %58

43:                                               ; preds = %.lr.ph
  %44 = zext i32 %40 to i64
  %45 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %44) #6
  store i8 57, ptr %45, align 1, !tbaa !5
  call void @_ZN13ntest_for_ecl10ntest_noopEv()
  %46 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %47 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %48 = invoke i32 @ECL_ZeroDevourer_Compress(ptr noundef %46, i32 noundef 8000, ptr noundef %47, i32 noundef %40)
          to label %49 unwind label %60

49:                                               ; preds = %43
  %.not41 = icmp eq i32 %48, 0
  %50 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %.not41)
  %51 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %52 = add i64 %51, -1
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %52) #6
  %54 = load i8, ptr %53, align 1, !tbaa !5
  %55 = icmp eq i8 %54, 57
  %56 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %55)
  %57 = add i32 %.03146, 1
  %.not36 = icmp ugt i32 %57, %24
  br i1 %.not36, label %._crit_edge, label %.lr.ph, !llvm.loop !11

58:                                               ; preds = %.lr.ph
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

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

62:                                               ; preds = %36, %58, %60, %38, %9
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %10, %9 ], [ %37, %36 ], [ %39, %38 ], [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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 = { 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 #5 = { nofree nounwind willreturn memory(argmem: read) }
attributes #6 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}


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