; LLVM IR from venumb/ZSPACE :: cpp/depends/lodePNG/lodepng_unittest.ll (Z13testBkgdChunkv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"class.std::allocator.0" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.526 = external hidden unnamed_addr constant [14 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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

declare void @_Z23lodepng_color_mode_initP16LodePNGColorMode(ptr noundef) #4

declare void @_Z26lodepng_color_mode_cleanupP16LodePNGColorMode(ptr noundef) #4

declare noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), i1 noundef zeroext, i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13testBkgdChunkv() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.LodePNGColorMode, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator.0", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca %"class.std::allocator.0", align 1
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca %"class.std::allocator.0", align 1
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.526)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 6, i32 noundef 8, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 1, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 1, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 3, i32 noundef 3, i32 noundef 3, i32 noundef 0, i32 noundef 2, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 15, i32 noundef 15, i32 noundef 15, i32 noundef 0, i32 noundef 4, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 0, i32 noundef 8, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 65535, i32 noundef 65535, i32 noundef 65535, i32 noundef 0, i32 noundef 16, i32 noundef 2, i32 noundef 16, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 123, i32 noundef 0, i32 noundef 0, i32 noundef 123, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 170, i32 noundef 170, i32 noundef 170, i32 noundef 2, i32 noundef 2, i32 noundef 2, i32 noundef 0, i32 noundef 1, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i1 noundef zeroext false, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 60000, i32 noundef 0, i32 noundef 0, i32 noundef 60000, i32 noundef 0, i32 noundef 0, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 16, i1 noundef zeroext false, i1 noundef zeroext false)
  call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 128, i32 noundef 128, i32 noundef 128, i32 noundef 128, i32 noundef 128, i32 noundef 128, i32 noundef 0, i32 noundef 8, i32 noundef 6, i32 noundef 8, i32 noundef 0, i32 noundef 8, i1 noundef zeroext false, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %1) #5
  call void @_Z23lodepng_color_mode_initP16LodePNGColorMode(ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %31, %0
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 200
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %34

24:                                               ; preds = %20
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = trunc i32 %25 to i8
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sdiv i32 %27, 2
  %29 = trunc i32 %28 to i8
  %30 = call noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef %1, i8 noundef zeroext %26, i8 noundef zeroext %29, i8 noundef zeroext 0, i8 noundef zeroext -1)
  br label %31

31:                                               ; preds = %24
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %2, align 4, !tbaa !5
  br label %20, !llvm.loop !9

34:                                               ; preds = %23
  %35 = getelementptr inbounds %struct.LodePNGColorMode, ptr %1, i32 0, i32 0
  store i32 3, ptr %35, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.LodePNGColorMode, ptr %1, i32 0, i32 1
  store i32 8, ptr %36, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 200, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 200, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = mul i32 %37, %38
  %40 = zext i32 %39 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %41 unwind label %47

41:                                               ; preds = %34
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %71, %41
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = icmp ult i32 %43, %44
  br i1 %45, label %51, label %46

46:                                               ; preds = %42
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %74

47:                                               ; preds = %34
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %153

51:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %67, %51
  %53 = load i32, ptr %11, align 4, !tbaa !5
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = icmp ult i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %70

57:                                               ; preds = %52
  %58 = load i32, ptr %11, align 4, !tbaa !5
  %59 = trunc i32 %58 to i8
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = mul i32 %60, %61
  %63 = load i32, ptr %11, align 4, !tbaa !5
  %64 = add i32 %62, %63
  %65 = zext i32 %64 to i64
  %66 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %65) #5
  store i8 %59, ptr %66, align 1, !tbaa !17
  br label %67

67:                                               ; preds = %57
  %68 = load i32, ptr %11, align 4, !tbaa !5
  %69 = add i32 %68, 1
  store i32 %69, ptr %11, align 4, !tbaa !5
  br label %52, !llvm.loop !18

70:                                               ; preds = %56
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = add i32 %72, 1
  store i32 %73, ptr %9, align 4, !tbaa !5
  br label %42, !llvm.loop !19

74:                                               ; preds = %46
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 100, i32 noundef 100, i32 noundef 100, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %75, i32 noundef %76, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %77 unwind label %94

77:                                               ; preds = %74
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 100, i32 noundef 100, i32 noundef 100, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %78, i32 noundef %79, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %80 unwind label %94

80:                                               ; preds = %77
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 250, i32 noundef 0, i32 noundef 0, i32 noundef 250, i32 noundef 250, i32 noundef 250, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %81, i32 noundef %82, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext true, i1 noundef zeroext true)
          to label %83 unwind label %94

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  %84 = load i32, ptr %3, align 4, !tbaa !5
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = mul i32 %84, %85
  %87 = zext i32 %86 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %87, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %88 unwind label %98

88:                                               ; preds = %83
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %123, %88
  %90 = load i32, ptr %14, align 4, !tbaa !5
  %91 = load i32, ptr %4, align 4, !tbaa !5
  %92 = icmp ult i32 %90, %91
  br i1 %92, label %102, label %93

93:                                               ; preds = %89
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %126

94:                                               ; preds = %80, %77, %74
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  br label %152

98:                                               ; preds = %83
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %7, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  br label %151

102:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %119, %102
  %104 = load i32, ptr %15, align 4, !tbaa !5
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = icmp ult i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %122

108:                                              ; preds = %103
  %109 = load i32, ptr %15, align 4, !tbaa !5
  %110 = and i32 %109, 3
  %111 = trunc i32 %110 to i8
  %112 = load i32, ptr %14, align 4, !tbaa !5
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = mul i32 %112, %113
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = add i32 %114, %115
  %117 = zext i32 %116 to i64
  %118 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %117) #5
  store i8 %111, ptr %118, align 1, !tbaa !17
  br label %119

119:                                              ; preds = %108
  %120 = load i32, ptr %15, align 4, !tbaa !5
  %121 = add i32 %120, 1
  store i32 %121, ptr %15, align 4, !tbaa !5
  br label %103, !llvm.loop !20

122:                                              ; preds = %107
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %14, align 4, !tbaa !5
  %125 = add i32 %124, 1
  store i32 %125, ptr %14, align 4, !tbaa !5
  br label %89, !llvm.loop !21

126:                                              ; preds = %93
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 4, i32 noundef 4, i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef %127, i32 noundef %128, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %129 unwind label %137

129:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %130 unwind label %141

130:                                              ; preds = %129
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  %131 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 0) #5
  store i8 1, ptr %131, align 1, !tbaa !17
  %132 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 1) #5
  store i8 2, ptr %132, align 1, !tbaa !17
  %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 2) #5
  store i8 3, ptr %133, align 1, !tbaa !17
  %134 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 3) #5
  store i8 4, ptr %134, align 1, !tbaa !17
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 100, i32 noundef 50, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 2, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %135 unwind label %145

135:                                              ; preds = %130
  invoke void @_Z26lodepng_color_mode_cleanupP16LodePNGColorMode(ptr noundef %1)
          to label %136 unwind label %145

136:                                              ; preds = %135
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %1) #5
  ret void

137:                                              ; preds = %126
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %7, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %8, align 4
  br label %150

141:                                              ; preds = %129
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %7, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %149

145:                                              ; preds = %135, %130
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %7, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %8, align 4
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  br label %149

149:                                              ; preds = %145, %141
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  br label %150

150:                                              ; preds = %149, %137
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br label %151

151:                                              ; preds = %150, %98
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %152

152:                                              ; preds = %151, %94
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %153

153:                                              ; preds = %152, %47
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %1) #5
  br label %154

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

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"class.std::allocator.0" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.526 = external hidden unnamed_addr constant [14 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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

declare void @_Z23lodepng_color_mode_initP16LodePNGColorMode(ptr noundef) local_unnamed_addr #4

declare void @_Z26lodepng_color_mode_cleanupP16LodePNGColorMode(ptr noundef) local_unnamed_addr #4

declare noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13testBkgdChunkv() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.LodePNGColorMode, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.526)
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 6, i32 noundef 8, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 1, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 1, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 3, i32 noundef 3, i32 noundef 3, i32 noundef 0, i32 noundef 2, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 15, i32 noundef 15, i32 noundef 15, i32 noundef 0, i32 noundef 4, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 0, i32 noundef 8, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 255, i32 noundef 255, i32 noundef 65535, i32 noundef 65535, i32 noundef 65535, i32 noundef 0, i32 noundef 16, i32 noundef 2, i32 noundef 16, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 123, i32 noundef 0, i32 noundef 0, i32 noundef 123, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 170, i32 noundef 170, i32 noundef 170, i32 noundef 2, i32 noundef 2, i32 noundef 2, i32 noundef 0, i32 noundef 1, i32 noundef 2, i32 noundef 8, i32 noundef 2, i32 noundef 8, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i1 noundef zeroext false, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 60000, i32 noundef 0, i32 noundef 0, i32 noundef 60000, i32 noundef 0, i32 noundef 0, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 8, i32 noundef 6, i32 noundef 16, i1 noundef zeroext false, i1 noundef zeroext false)
  tail call void @_Z13testBkgdChunkjjjjjj16LodePNGColorTypejS_jS_jbb(i32 noundef 128, i32 noundef 128, i32 noundef 128, i32 noundef 128, i32 noundef 128, i32 noundef 128, i32 noundef 0, i32 noundef 8, i32 noundef 6, i32 noundef 8, i32 noundef 0, i32 noundef 8, i1 noundef zeroext false, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #5
  call void @_Z23lodepng_color_mode_initP16LodePNGColorMode(ptr noundef nonnull %1)
  br label %12

10:                                               ; preds = %12
  store i32 3, ptr %1, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %1, i64 4
  store i32 8, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 40000, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %18 unwind label %21

12:                                               ; preds = %0, %12
  %.04653 = phi i32 [ 0, %0 ], [ %17, %12 ]
  %13 = trunc nuw i32 %.04653 to i8
  %14 = lshr i32 %.04653, 1
  %15 = trunc nuw i32 %14 to i8
  %16 = call noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef nonnull %1, i8 noundef zeroext %13, i8 noundef zeroext %15, i8 noundef zeroext 0, i8 noundef zeroext -1)
  %17 = add nuw nsw i32 %.04653, 1
  %exitcond.not = icmp eq i32 %17, 200
  br i1 %exitcond.not, label %10, label %12, !llvm.loop !14

18:                                               ; preds = %10
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %.preheader52

.preheader52:                                     ; preds = %18, %23
  %indvars.iv60 = phi i64 [ 0, %18 ], [ %indvars.iv.next61, %23 ]
  %19 = mul nuw nsw i64 %indvars.iv60, 200
  br label %24

20:                                               ; preds = %23
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 100, i32 noundef 100, i32 noundef 100, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 200, i32 noundef 200, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %28 unwind label %34

21:                                               ; preds = %10
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %62

23:                                               ; preds = %24
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond63.not = icmp eq i64 %indvars.iv.next61, 200
  br i1 %exitcond63.not, label %20, label %.preheader52, !llvm.loop !16

24:                                               ; preds = %.preheader52, %24
  %indvars.iv = phi i64 [ 0, %.preheader52 ], [ %indvars.iv.next, %24 ]
  %25 = trunc i64 %indvars.iv to i8
  %26 = add nuw nsw i64 %indvars.iv, %19
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %26) #5
  store i8 %25, ptr %27, align 1, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next, 200
  br i1 %exitcond59.not, label %23, label %24, !llvm.loop !18

28:                                               ; preds = %20
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 100, i32 noundef 100, i32 noundef 100, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 200, i32 noundef 200, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %29 unwind label %34

29:                                               ; preds = %28
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 250, i32 noundef 0, i32 noundef 0, i32 noundef 250, i32 noundef 250, i32 noundef 250, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 200, i32 noundef 200, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext true, i1 noundef zeroext true)
          to label %30 unwind label %34

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 40000, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %31 unwind label %36

31:                                               ; preds = %30
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %.preheader

.preheader:                                       ; preds = %31, %38
  %indvars.iv68 = phi i64 [ 0, %31 ], [ %indvars.iv.next69, %38 ]
  %32 = mul nuw nsw i64 %indvars.iv68, 200
  br label %39

33:                                               ; preds = %38
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 4, i32 noundef 4, i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 200, i32 noundef 200, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %44 unwind label %52

34:                                               ; preds = %29, %28, %20
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %61

36:                                               ; preds = %30
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %60

38:                                               ; preds = %39
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %exitcond71.not = icmp eq i64 %indvars.iv.next69, 200
  br i1 %exitcond71.not, label %33, label %.preheader, !llvm.loop !19

39:                                               ; preds = %.preheader, %39
  %indvars.iv64 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next65, %39 ]
  %40 = trunc i64 %indvars.iv64 to i8
  %41 = and i8 %40, 3
  %42 = add nuw nsw i64 %indvars.iv64, %32
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %42) #5
  store i8 %41, ptr %43, align 1, !tbaa !17
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next65, 200
  br i1 %exitcond67.not, label %38, label %39, !llvm.loop !20

44:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %45 unwind label %54

45:                                               ; preds = %44
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  %46 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #5
  store i8 1, ptr %46, align 1, !tbaa !17
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 1) #5
  store i8 2, ptr %47, align 1, !tbaa !17
  %48 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 2) #5
  store i8 3, ptr %48, align 1, !tbaa !17
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 3) #5
  store i8 4, ptr %49, align 1, !tbaa !17
  invoke void @_Z13testBkgdChunkjjjjjjRKSt6vectorIhSaIhEEjjRK16LodePNGColorModeS6_bb(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 100, i32 noundef 50, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 2, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %1, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %50 unwind label %56

50:                                               ; preds = %45
  invoke void @_Z26lodepng_color_mode_cleanupP16LodePNGColorMode(ptr noundef nonnull %1)
          to label %51 unwind label %56

51:                                               ; preds = %50
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #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
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #5
  ret void

52:                                               ; preds = %33
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %59

54:                                               ; preds = %44
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  br label %58

56:                                               ; preds = %50, %45
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %58

58:                                               ; preds = %56, %54
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %59

59:                                               ; preds = %58, %52
  %.pn.pn = phi { ptr, i32 } [ %.pn, %58 ], [ %53, %52 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %60

60:                                               ; preds = %59, %36
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %59 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %61

61:                                               ; preds = %60, %34
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %60 ], [ %35, %34 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br label %62

62:                                               ; preds = %61, %21
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %61 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

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

!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 = !{!"_ZTS16LodePNGColorMode", !7, i64 0, !10, i64 4, !11, i64 8, !12, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!7 = !{!"_ZTS16LodePNGColorType", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !10, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!8, !8, i64 0}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass