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

; 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._ZN42test_ZeroDevourer_insufficient_dst_decompr11runInternalERSoi.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 @_ZN42test_ZeroDevourer_insufficient_dst_decompr11runInternalERSoi(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._ZN42test_ZeroDevourer_insufficient_dst_decompr11runInternalERSoi.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 %161

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 = %155, %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 %160

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 %101

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 %105

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 %105

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 = %151, %84
  %98 = load i32, ptr %24, align 4, !tbaa !9
  %99 = icmp ule i32 %98, 8000
  br i1 %99, label %109, label %100

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

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

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

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

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

119:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %120 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %121 = load i32, ptr %22, align 4, !tbaa !9
  %122 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %123 = load i32, ptr %25, align 4, !tbaa !9
  %124 = call i32 @ECL_ZeroDevourer_Decompress(ptr noundef %120, i32 noundef %121, ptr noundef %122, i32 noundef %123)
  store i32 %124, ptr %26, align 4, !tbaa !9
  %125 = load i32, ptr %26, align 4, !tbaa !9
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %143

127:                                              ; preds = %119
  %128 = load i32, ptr %26, align 4, !tbaa !9
  %129 = load i32, ptr %25, align 4, !tbaa !9
  %130 = icmp eq i32 %128, %129
  %131 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %27, i1 noundef zeroext %130)
  %132 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %133 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %134 = load i32, ptr %25, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = call i32 @memcmp(ptr noundef %132, ptr noundef %133, i64 noundef %135) #8
  %137 = icmp eq i32 0, %136
  %138 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %27, i1 noundef zeroext %137)
  br label %143

139:                                              ; preds = %115, %109
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %12, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %13, align 4
  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 %158

143:                                              ; preds = %127, %119
  %144 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %145 = sub i64 %144, 1
  %146 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %145) #7
  %147 = load i8, ptr %146, align 1, !tbaa !11
  %148 = zext i8 %147 to i32
  %149 = icmp eq i32 %148, 57
  %150 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %27, i1 noundef zeroext %149)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %151

151:                                              ; preds = %143
  %152 = load i32, ptr %24, align 4, !tbaa !9
  %153 = add i32 %152, 1
  store i32 %153, ptr %24, align 4, !tbaa !9
  br label %97, !llvm.loop !17

154:                                              ; preds = %100
  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 %155

155:                                              ; preds = %154
  %156 = load ptr, ptr %16, align 8, !tbaa !5
  %157 = getelementptr inbounds i8, ptr %156, i32 1
  store ptr %157, ptr %16, align 8, !tbaa !5
  br label %53

158:                                              ; preds = %139, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %159

159:                                              ; preds = %158, %101
  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 %161

160:                                              ; 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

161:                                              ; preds = %159, %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 %162

162:                                              ; preds = %161
  %163 = load ptr, ptr %12, align 8
  %164 = load i32, ptr %13, align 4
  %165 = insertvalue { ptr, i32 } poison, ptr %163, 0
  %166 = insertvalue { ptr, i32 } %165, i32 %164, 1
  resume { ptr, i32 } %166
}

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._ZN42test_ZeroDevourer_insufficient_dst_decompr11runInternalERSoi.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 @_ZN42test_ZeroDevourer_insufficient_dst_decompr11runInternalERSoi(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._ZN42test_ZeroDevourer_insufficient_dst_decompr11runInternalERSoi.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 %67

.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 = %36
  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, %36
  %.034.idx46 = phi i64 [ %.034.add, %36 ], [ 0, %.preheader42 ]
  %.034.ptr = getelementptr inbounds i8, ptr %7, i64 %.034.idx46
  %15 = load i8, ptr %.034.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 %37

17:                                               ; preds = %.preheader, %17
  %indvars.iv48 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next49, %17 ]
  %18 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv48) #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.next49 = add nuw nsw i64 %indvars.iv48, 1
  %exitcond51.not = icmp eq i64 %indvars.iv.next49, 8000
  br i1 %exitcond51.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 %39

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

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)
  br label %41

36:                                               ; preds = %60
  %.034.add = add nuw nsw i64 %.034.idx46, 1
  %.not = icmp eq i64 %.034.add, 8
  br i1 %.not, label %14, label %.preheader

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

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

41:                                               ; preds = %26, %60
  %indvars.iv52 = phi i64 [ 1, %26 ], [ %indvars.iv.next53, %60 ]
  %42 = sub nuw nsw i64 8000, %indvars.iv52
  %43 = sub nuw nsw i64 8001, %indvars.iv52
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %43)
          to label %44 unwind label %58

44:                                               ; preds = %41
  %45 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %42) #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) %5) #6
  %47 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %48 = trunc nuw nsw i64 %42 to i32
  %49 = call i32 @ECL_ZeroDevourer_Decompress(ptr noundef %46, i32 noundef %24, ptr noundef %47, i32 noundef %48)
  %.not40 = icmp eq i32 %49, 0
  br i1 %.not40, label %60, label %50

50:                                               ; preds = %44
  %51 = zext i32 %49 to i64
  %52 = icmp eq i64 %42, %51
  %53 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %52)
  %54 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %55 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %bcmp41 = call i32 @bcmp(ptr %54, ptr %55, i64 %42)
  %56 = icmp eq i32 %bcmp41, 0
  %57 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %56)
  br label %60

58:                                               ; preds = %41
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %67

60:                                               ; preds = %50, %44
  %61 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %62 = add i64 %61, -1
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %62) #6
  %64 = load i8, ptr %63, align 1, !tbaa !5
  %65 = icmp eq i8 %64, 57
  %66 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %65)
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next53, 8001
  br i1 %exitcond55.not, label %36, label %41, !llvm.loop !11

67:                                               ; preds = %37, %58, %39, %9
  %.pn.pn.pn = phi { ptr, i32 } [ %10, %9 ], [ %38, %37 ], [ %59, %58 ], [ %40, %39 ]
  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
}

; 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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass