; LLVM IR from fhanau/Efficient-Compression-Tool :: src/lodepng/lodepng.ll (Z15lodepng_convertPhPKhPK16LodePNGColorModeS4_jj)

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

%struct.ColorTree = type { [16 x ptr], i32 }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15lodepng_convertPhPKhPK16LodePNGColorModeS4_jj(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) #2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %struct.ColorTree, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i16, align 2
  %25 = alloca i16, align 2
  %26 = alloca i16, align 2
  %27 = alloca i16, align 2
  %28 = alloca i32, align 4
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i8, align 1
  %33 = alloca i8, align 1
  %34 = alloca i8, align 1
  %35 = alloca i8, align 1
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %36 = load i32, ptr %12, align 4, !tbaa !9
  %37 = zext i32 %36 to i64
  %38 = load i32, ptr %13, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = mul i64 %37, %39
  store i64 %40, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.LodePNGColorMode, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !13
  %44 = icmp eq i32 %43, 3
  br i1 %44, label %45, label %51

45:                                               ; preds = %6
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.LodePNGColorMode, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = icmp ne ptr %48, null
  br i1 %49, label %51, label %50

50:                                               ; preds = %45
  store i32 107, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %290

51:                                               ; preds = %45, %6
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = call noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef %52, ptr noundef %53)
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %64

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = call noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %57, i32 noundef %58, ptr noundef %59)
  store i64 %60, ptr %19, align 8, !tbaa !11
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = load i64, ptr %19, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %61, ptr align 1 %62, i64 %63, i1 false)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %290

64:                                               ; preds = %51
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.LodePNGColorMode, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !13
  %68 = icmp eq i32 %67, 3
  br i1 %68, label %69, label %114

69:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.LodePNGColorMode, ptr %70, i32 0, i32 3
  %72 = load i64, ptr %71, align 8, !tbaa !17
  store i64 %72, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.LodePNGColorMode, ptr %73, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !16
  store ptr %75, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.LodePNGColorMode, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !18
  %79 = zext i32 %78 to i64
  %80 = shl i64 1, %79
  store i64 %80, ptr %22, align 8, !tbaa !11
  %81 = load i64, ptr %20, align 8, !tbaa !11
  %82 = load i64, ptr %22, align 8, !tbaa !11
  %83 = icmp ult i64 %81, %82
  br i1 %83, label %84, label %86

84:                                               ; preds = %69
  %85 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %85, ptr %22, align 8, !tbaa !11
  br label %86

86:                                               ; preds = %84, %69
  call void @_ZL15color_tree_initP9ColorTree(ptr noundef %15)
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %87

87:                                               ; preds = %110, %86
  %88 = load i64, ptr %14, align 8, !tbaa !11
  %89 = load i64, ptr %22, align 8, !tbaa !11
  %90 = icmp ne i64 %88, %89
  br i1 %90, label %91, label %113

91:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %92 = load ptr, ptr %21, align 8, !tbaa !5
  %93 = load i64, ptr %14, align 8, !tbaa !11
  %94 = mul i64 %93, 4
  %95 = getelementptr inbounds i8, ptr %92, i64 %94
  store ptr %95, ptr %23, align 8, !tbaa !5
  %96 = load ptr, ptr %23, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i64 0
  %98 = load i8, ptr %97, align 1, !tbaa !19
  %99 = load ptr, ptr %23, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 1
  %101 = load i8, ptr %100, align 1, !tbaa !19
  %102 = load ptr, ptr %23, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i64 2
  %104 = load i8, ptr %103, align 1, !tbaa !19
  %105 = load ptr, ptr %23, align 8, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %105, i64 3
  %107 = load i8, ptr %106, align 1, !tbaa !19
  %108 = load i64, ptr %14, align 8, !tbaa !11
  %109 = trunc i64 %108 to i32
  call void @_ZL14color_tree_addP9ColorTreehhhhj(ptr noundef %15, i8 noundef zeroext %98, i8 noundef zeroext %101, i8 noundef zeroext %104, i8 noundef zeroext %107, i32 noundef %109)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %110

110:                                              ; preds = %91
  %111 = load i64, ptr %14, align 8, !tbaa !11
  %112 = add i64 %111, 1
  store i64 %112, ptr %14, align 8, !tbaa !11
  br label %87, !llvm.loop !20

113:                                              ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %114

114:                                              ; preds = %113, %64
  %115 = load i32, ptr %17, align 4, !tbaa !9
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %282, label %117

117:                                              ; preds = %114
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.LodePNGColorMode, ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 4, !tbaa !18
  %121 = icmp eq i32 %120, 16
  br i1 %121, label %122, label %147

122:                                              ; preds = %117
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.LodePNGColorMode, ptr %123, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !18
  %126 = icmp eq i32 %125, 16
  br i1 %126, label %127, label %147

127:                                              ; preds = %122
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %128

128:                                              ; preds = %143, %127
  %129 = load i64, ptr %14, align 8, !tbaa !11
  %130 = load i64, ptr %16, align 8, !tbaa !11
  %131 = icmp ne i64 %129, %130
  br i1 %131, label %132, label %146

132:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #4
  store i16 0, ptr %24, align 2, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 2, ptr %25) #4
  store i16 0, ptr %25, align 2, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 2, ptr %26) #4
  store i16 0, ptr %26, align 2, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 2, ptr %27) #4
  store i16 0, ptr %27, align 2, !tbaa !22
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = load i64, ptr %14, align 8, !tbaa !11
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL19getPixelColorRGBA16PtS_S_S_PKhmPK16LodePNGColorMode(ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %133, i64 noundef %134, ptr noundef %135)
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = load i64, ptr %14, align 8, !tbaa !11
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = load i16, ptr %24, align 2, !tbaa !22
  %140 = load i16, ptr %25, align 2, !tbaa !22
  %141 = load i16, ptr %26, align 2, !tbaa !22
  %142 = load i16, ptr %27, align 2, !tbaa !22
  call void @_ZL13rgba16ToPixelPhmPK16LodePNGColorModetttt(ptr noundef %136, i64 noundef %137, ptr noundef %138, i16 noundef zeroext %139, i16 noundef zeroext %140, i16 noundef zeroext %141, i16 noundef zeroext %142)
  call void @llvm.lifetime.end.p0(i64 2, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #4
  br label %143

143:                                              ; preds = %132
  %144 = load i64, ptr %14, align 8, !tbaa !11
  %145 = add i64 %144, 1
  store i64 %145, ptr %14, align 8, !tbaa !11
  br label %128, !llvm.loop !24

146:                                              ; preds = %128
  br label %281

147:                                              ; preds = %122, %117
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.LodePNGColorMode, ptr %148, i32 0, i32 1
  %150 = load i32, ptr %149, align 4, !tbaa !18
  %151 = icmp eq i32 %150, 8
  br i1 %151, label %152, label %162

152:                                              ; preds = %147
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.LodePNGColorMode, ptr %153, i32 0, i32 0
  %155 = load i32, ptr %154, align 8, !tbaa !13
  %156 = icmp eq i32 %155, 6
  br i1 %156, label %157, label %162

157:                                              ; preds = %152
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = load i64, ptr %16, align 8, !tbaa !11
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL19getPixelColorsRGBA8PhmPKhPK16LodePNGColorMode(ptr noundef %158, i64 noundef %159, ptr noundef %160, ptr noundef %161)
  br label %280

162:                                              ; preds = %152, %147
  %163 = load ptr, ptr %10, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.LodePNGColorMode, ptr %163, i32 0, i32 1
  %165 = load i32, ptr %164, align 4, !tbaa !18
  %166 = icmp eq i32 %165, 8
  br i1 %166, label %167, label %177

167:                                              ; preds = %162
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.LodePNGColorMode, ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 8, !tbaa !13
  %171 = icmp eq i32 %170, 2
  br i1 %171, label %172, label %177

172:                                              ; preds = %167
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = load i64, ptr %16, align 8, !tbaa !11
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL18getPixelColorsRGB8PhmPKhPK16LodePNGColorMode(ptr noundef %173, i64 noundef %174, ptr noundef %175, ptr noundef %176)
  br label %279

177:                                              ; preds = %167, %162
  %178 = load ptr, ptr %10, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.LodePNGColorMode, ptr %178, i32 0, i32 1
  %180 = load i32, ptr %179, align 4, !tbaa !18
  %181 = icmp eq i32 %180, 8
  br i1 %181, label %182, label %257

182:                                              ; preds = %177
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.LodePNGColorMode, ptr %183, i32 0, i32 0
  %185 = load i32, ptr %184, align 8, !tbaa !13
  %186 = icmp eq i32 %185, 3
  br i1 %186, label %187, label %257

187:                                              ; preds = %182
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.LodePNGColorMode, ptr %188, i32 0, i32 1
  %190 = load i32, ptr %189, align 4, !tbaa !18
  %191 = icmp eq i32 %190, 8
  br i1 %191, label %192, label %257

192:                                              ; preds = %187
  %193 = load ptr, ptr %11, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.LodePNGColorMode, ptr %193, i32 0, i32 0
  %195 = load i32, ptr %194, align 8, !tbaa !13
  %196 = icmp eq i32 %195, 6
  br i1 %196, label %197, label %257

197:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = add i32 %199, 1
  store i32 %200, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #4
  store i8 0, ptr %29, align 1, !tbaa !19
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %201

201:                                              ; preds = %253, %197
  %202 = load i64, ptr %14, align 8, !tbaa !11
  %203 = load i64, ptr %16, align 8, !tbaa !11
  %204 = icmp ne i64 %202, %203
  br i1 %204, label %205, label %256

205:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %206 = load ptr, ptr %9, align 8, !tbaa !5
  %207 = load i64, ptr %14, align 8, !tbaa !11
  %208 = mul i64 4, %207
  %209 = getelementptr inbounds i8, ptr %206, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !9
  store i32 %210, ptr %30, align 4, !tbaa !9
  %211 = load i32, ptr %30, align 4, !tbaa !9
  %212 = load i32, ptr %28, align 4, !tbaa !9
  %213 = icmp eq i32 %211, %212
  br i1 %213, label %214, label %219

214:                                              ; preds = %205
  %215 = load i8, ptr %29, align 1, !tbaa !19
  %216 = load ptr, ptr %8, align 8, !tbaa !5
  %217 = load i64, ptr %14, align 8, !tbaa !11
  %218 = getelementptr inbounds i8, ptr %216, i64 %217
  store i8 %215, ptr %218, align 1, !tbaa !19
  br label %252

219:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  %221 = load i64, ptr %14, align 8, !tbaa !11
  %222 = mul i64 %221, 4
  %223 = getelementptr inbounds i8, ptr %220, i64 %222
  %224 = load i8, ptr %223, align 1, !tbaa !19
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = load i64, ptr %14, align 8, !tbaa !11
  %227 = mul i64 %226, 4
  %228 = add i64 %227, 1
  %229 = getelementptr inbounds i8, ptr %225, i64 %228
  %230 = load i8, ptr %229, align 1, !tbaa !19
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = load i64, ptr %14, align 8, !tbaa !11
  %233 = mul i64 %232, 4
  %234 = add i64 %233, 2
  %235 = getelementptr inbounds i8, ptr %231, i64 %234
  %236 = load i8, ptr %235, align 1, !tbaa !19
  %237 = load ptr, ptr %9, align 8, !tbaa !5
  %238 = load i64, ptr %14, align 8, !tbaa !11
  %239 = mul i64 %238, 4
  %240 = add i64 %239, 3
  %241 = getelementptr inbounds i8, ptr %237, i64 %240
  %242 = load i8, ptr %241, align 1, !tbaa !19
  %243 = call noundef i32 @_ZL14color_tree_getP9ColorTreehhhh(ptr noundef %15, i8 noundef zeroext %224, i8 noundef zeroext %230, i8 noundef zeroext %236, i8 noundef zeroext %242)
  store i32 %243, ptr %31, align 4, !tbaa !9
  %244 = load i32, ptr %31, align 4, !tbaa !9
  %245 = trunc i32 %244 to i8
  %246 = load ptr, ptr %8, align 8, !tbaa !5
  %247 = load i64, ptr %14, align 8, !tbaa !11
  %248 = getelementptr inbounds i8, ptr %246, i64 %247
  store i8 %245, ptr %248, align 1, !tbaa !19
  %249 = load i32, ptr %30, align 4, !tbaa !9
  store i32 %249, ptr %28, align 4, !tbaa !9
  %250 = load i32, ptr %31, align 4, !tbaa !9
  %251 = trunc i32 %250 to i8
  store i8 %251, ptr %29, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  br label %252

252:                                              ; preds = %219, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  br label %253

253:                                              ; preds = %252
  %254 = load i64, ptr %14, align 8, !tbaa !11
  %255 = add i64 %254, 1
  store i64 %255, ptr %14, align 8, !tbaa !11
  br label %201, !llvm.loop !25

256:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  br label %278

257:                                              ; preds = %192, %187, %182, %177
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #4
  store i8 0, ptr %32, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #4
  store i8 0, ptr %33, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #4
  store i8 0, ptr %34, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #4
  store i8 0, ptr %35, align 1, !tbaa !19
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %258

258:                                              ; preds = %274, %257
  %259 = load i64, ptr %14, align 8, !tbaa !11
  %260 = load i64, ptr %16, align 8, !tbaa !11
  %261 = icmp ne i64 %259, %260
  br i1 %261, label %262, label %277

262:                                              ; preds = %258
  %263 = load ptr, ptr %9, align 8, !tbaa !5
  %264 = load i64, ptr %14, align 8, !tbaa !11
  %265 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL18getPixelColorRGBA8PhS_S_S_PKhmPK16LodePNGColorMode(ptr noundef %32, ptr noundef %33, ptr noundef %34, ptr noundef %35, ptr noundef %263, i64 noundef %264, ptr noundef %265)
  %266 = load ptr, ptr %8, align 8, !tbaa !5
  %267 = load i64, ptr %14, align 8, !tbaa !11
  %268 = load ptr, ptr %10, align 8, !tbaa !5
  %269 = load i8, ptr %32, align 1, !tbaa !19
  %270 = load i8, ptr %33, align 1, !tbaa !19
  %271 = load i8, ptr %34, align 1, !tbaa !19
  %272 = load i8, ptr %35, align 1, !tbaa !19
  %273 = call noundef i32 @_ZL12rgba8ToPixelPhmPK16LodePNGColorModeP9ColorTreehhhh(ptr noundef %266, i64 noundef %267, ptr noundef %268, ptr noundef %15, i8 noundef zeroext %269, i8 noundef zeroext %270, i8 noundef zeroext %271, i8 noundef zeroext %272)
  br label %274

274:                                              ; preds = %262
  %275 = load i64, ptr %14, align 8, !tbaa !11
  %276 = add i64 %275, 1
  store i64 %276, ptr %14, align 8, !tbaa !11
  br label %258, !llvm.loop !26

277:                                              ; preds = %258
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #4
  br label %278

278:                                              ; preds = %277, %256
  br label %279

279:                                              ; preds = %278, %172
  br label %280

280:                                              ; preds = %279, %157
  br label %281

281:                                              ; preds = %280, %146
  br label %282

282:                                              ; preds = %281, %114
  %283 = load ptr, ptr %10, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.LodePNGColorMode, ptr %283, i32 0, i32 0
  %285 = load i32, ptr %284, align 8, !tbaa !13
  %286 = icmp eq i32 %285, 3
  br i1 %286, label %287, label %288

287:                                              ; preds = %282
  call void @_ZL18color_tree_cleanupP9ColorTree(ptr noundef %15)
  br label %288

288:                                              ; preds = %287, %282
  %289 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %289, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %290

290:                                              ; preds = %288, %56, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 136, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %291 = load i32, ptr %7, align 4
  ret i32 %291
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15color_tree_initP9ColorTree(ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL14color_tree_addP9ColorTreehhhhj(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL19getPixelColorRGBA16PtS_S_S_PKhmPK16LodePNGColorMode(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL13rgba16ToPixelPhmPK16LodePNGColorModetttt(ptr noundef, i64 noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL19getPixelColorsRGBA8PhmPKhPK16LodePNGColorMode(ptr noalias noundef, i64 noundef, ptr noalias noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL18getPixelColorsRGB8PhmPKhPK16LodePNGColorMode(ptr noalias noundef, i64 noundef, ptr noalias noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14color_tree_getP9ColorTreehhhh(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL18getPixelColorRGBA8PhS_S_S_PKhmPK16LodePNGColorMode(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12rgba8ToPixelPhmPK16LodePNGColorModeP9ColorTreehhhh(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL18color_tree_cleanupP9ColorTree(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS16LodePNGColorMode", !15, i64 0, !10, i64 4, !6, i64 8, !12, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!15 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!16 = !{!14, !6, i64 8}
!17 = !{!14, !12, i64 16}
!18 = !{!14, !10, i64 4}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !23, i64 0}
!23 = !{!"short", !7, i64 0}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21}
!26 = distinct !{!26, !21}


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

%struct.ColorTree = type { [16 x ptr], i32 }

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 108) i32 @_Z15lodepng_convertPhPKhPK16LodePNGColorModeS4_jj(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #2 {
  %7 = alloca %struct.ColorTree, align 8
  %8 = alloca i16, align 2
  %9 = alloca i16, align 2
  %10 = alloca i16, align 2
  %11 = alloca i16, align 2
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %7) #5
  %16 = zext i32 %4 to i64
  %17 = zext i32 %5 to i64
  %18 = mul nuw i64 %17, %16
  %19 = load i32, ptr %3, align 8, !tbaa !5
  %20 = icmp eq i32 %19, 3
  br i1 %20, label %21, label %24

21:                                               ; preds = %6
  %22 = getelementptr inbounds i8, ptr %3, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %.not = icmp eq ptr %23, null
  br i1 %.not, label %106, label %24

24:                                               ; preds = %21, %6
  %25 = tail call noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef %2, ptr noundef nonnull %3)
  %.not101 = icmp eq i32 %25, 0
  br i1 %.not101, label %28, label %26

26:                                               ; preds = %24
  %27 = tail call noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %4, i32 noundef %5, ptr noundef nonnull %3)
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 %27, i1 false)
  br label %106

28:                                               ; preds = %24
  %29 = load i32, ptr %2, align 8, !tbaa !5
  %30 = icmp eq i32 %29, 3
  br i1 %30, label %31, label %.loopexit108

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %2, i64 16
  %33 = load i64, ptr %32, align 8, !tbaa !14
  %34 = getelementptr inbounds i8, ptr %2, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = getelementptr inbounds i8, ptr %2, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !15
  %38 = zext nneg i32 %37 to i64
  %39 = shl nuw i64 1, %38
  %spec.select = tail call i64 @llvm.umin.i64(i64 %33, i64 %39)
  call void @_ZL15color_tree_initP9ColorTree(ptr noundef nonnull %7)
  %.not102109 = icmp eq i64 %33, 0
  br i1 %.not102109, label %.loopexit108, label %.lr.ph

.lr.ph:                                           ; preds = %31, %.lr.ph
  %.092110 = phi i64 [ %50, %.lr.ph ], [ 0, %31 ]
  %40 = shl i64 %.092110, 2
  %41 = getelementptr inbounds i8, ptr %35, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !16
  %43 = getelementptr inbounds i8, ptr %41, i64 1
  %44 = load i8, ptr %43, align 1, !tbaa !16
  %45 = getelementptr inbounds i8, ptr %41, i64 2
  %46 = load i8, ptr %45, align 1, !tbaa !16
  %47 = getelementptr inbounds i8, ptr %41, i64 3
  %48 = load i8, ptr %47, align 1, !tbaa !16
  %49 = trunc i64 %.092110 to i32
  call void @_ZL14color_tree_addP9ColorTreehhhhj(ptr noundef nonnull %7, i8 noundef zeroext %42, i8 noundef zeroext %44, i8 noundef zeroext %46, i8 noundef zeroext %48, i32 noundef %49)
  %50 = add i64 %.092110, 1
  %.not102 = icmp eq i64 %50, %spec.select
  br i1 %.not102, label %.loopexit108, label %.lr.ph, !llvm.loop !17

.loopexit108:                                     ; preds = %.lr.ph, %31, %28
  %51 = getelementptr inbounds i8, ptr %3, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = icmp eq i32 %52, 16
  %54 = getelementptr inbounds i8, ptr %2, i64 4
  %55 = load i32, ptr %54, align 4, !tbaa !15
  %56 = icmp eq i32 %55, 16
  %or.cond125 = select i1 %53, i1 %56, i1 false
  br i1 %or.cond125, label %.preheader, label %.loopexit108._crit_edge

.preheader:                                       ; preds = %.loopexit108
  %.not105120 = icmp eq i64 %18, 0
  br i1 %.not105120, label %.loopexit, label %.lr.ph122

.lr.ph122:                                        ; preds = %.preheader, %.lr.ph122
  %.1121 = phi i64 [ %61, %.lr.ph122 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %8) #5
  store i16 0, ptr %8, align 2, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %9) #5
  store i16 0, ptr %9, align 2, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %10) #5
  store i16 0, ptr %10, align 2, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %11) #5
  store i16 0, ptr %11, align 2, !tbaa !19
  call void @_ZL19getPixelColorRGBA16PtS_S_S_PKhmPK16LodePNGColorMode(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %1, i64 noundef %.1121, ptr noundef nonnull %3)
  %57 = load i16, ptr %8, align 2, !tbaa !19
  %58 = load i16, ptr %9, align 2, !tbaa !19
  %59 = load i16, ptr %10, align 2, !tbaa !19
  %60 = load i16, ptr %11, align 2, !tbaa !19
  call void @_ZL13rgba16ToPixelPhmPK16LodePNGColorModetttt(ptr noundef %0, i64 noundef %.1121, ptr noundef nonnull %2, i16 noundef zeroext %57, i16 noundef zeroext %58, i16 noundef zeroext %59, i16 noundef zeroext %60)
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #5
  %61 = add nuw i64 %.1121, 1
  %.not105 = icmp eq i64 %61, %18
  br i1 %.not105, label %.loopexit, label %.lr.ph122, !llvm.loop !21

.loopexit108._crit_edge:                          ; preds = %.loopexit108
  %62 = icmp eq i32 %55, 8
  br i1 %62, label %63, label %96

63:                                               ; preds = %.loopexit108._crit_edge
  %64 = load i32, ptr %2, align 8, !tbaa !5
  switch i32 %64, label %67 [
    i32 6, label %65
    i32 2, label %66
  ]

65:                                               ; preds = %63
  call void @_ZL19getPixelColorsRGBA8PhmPKhPK16LodePNGColorMode(ptr noundef %0, i64 noundef %18, ptr noundef %1, ptr noundef nonnull %3)
  br label %.loopexit

66:                                               ; preds = %63
  call void @_ZL18getPixelColorsRGB8PhmPKhPK16LodePNGColorMode(ptr noundef %0, i64 noundef %18, ptr noundef %1, ptr noundef nonnull %3)
  br label %.loopexit

67:                                               ; preds = %63
  %68 = icmp eq i32 %64, 3
  %69 = icmp eq i32 %52, 8
  %or.cond = and i1 %69, %68
  br i1 %or.cond, label %70, label %96

70:                                               ; preds = %67
  %71 = load i32, ptr %3, align 8, !tbaa !5
  %72 = icmp eq i32 %71, 6
  br i1 %72, label %73, label %96

73:                                               ; preds = %70
  %.not104114 = icmp eq i64 %18, 0
  br i1 %.not104114, label %.loopexit, label %.lr.ph119.preheader

.lr.ph119.preheader:                              ; preds = %73
  %74 = load i32, ptr %1, align 4, !tbaa !22
  %75 = add i32 %74, 1
  br label %.lr.ph119

.lr.ph119:                                        ; preds = %.lr.ph119.preheader, %93
  %.2117 = phi i64 [ %95, %93 ], [ 0, %.lr.ph119.preheader ]
  %.093116 = phi i8 [ %.sink, %93 ], [ 0, %.lr.ph119.preheader ]
  %.095115 = phi i32 [ %.196, %93 ], [ %75, %.lr.ph119.preheader ]
  %76 = shl i64 %.2117, 2
  %77 = getelementptr inbounds i8, ptr %1, i64 %76
  %78 = load i32, ptr %77, align 4
  %79 = icmp eq i32 %78, %.095115
  br i1 %79, label %93, label %80

80:                                               ; preds = %.lr.ph119
  %81 = trunc i32 %78 to i8
  %82 = or disjoint i64 %76, 1
  %83 = getelementptr inbounds i8, ptr %1, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !16
  %85 = or disjoint i64 %76, 2
  %86 = getelementptr inbounds i8, ptr %1, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !16
  %88 = or disjoint i64 %76, 3
  %89 = getelementptr inbounds i8, ptr %1, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !16
  %91 = call noundef i32 @_ZL14color_tree_getP9ColorTreehhhh(ptr noundef nonnull %7, i8 noundef zeroext %81, i8 noundef zeroext %84, i8 noundef zeroext %87, i8 noundef zeroext %90)
  %92 = trunc i32 %91 to i8
  br label %93

93:                                               ; preds = %.lr.ph119, %80
  %.sink = phi i8 [ %92, %80 ], [ %.093116, %.lr.ph119 ]
  %.196 = phi i32 [ %78, %80 ], [ %.095115, %.lr.ph119 ]
  %94 = getelementptr inbounds i8, ptr %0, i64 %.2117
  store i8 %.sink, ptr %94, align 1
  %95 = add nuw i64 %.2117, 1
  %.not104 = icmp eq i64 %95, %18
  br i1 %.not104, label %.loopexit, label %.lr.ph119, !llvm.loop !23

96:                                               ; preds = %.loopexit108._crit_edge, %70, %67
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  store i8 0, ptr %12, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #5
  store i8 0, ptr %13, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #5
  store i8 0, ptr %14, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #5
  store i8 0, ptr %15, align 1, !tbaa !16
  %.not103111 = icmp eq i64 %18, 0
  br i1 %.not103111, label %._crit_edge, label %.lr.ph113

.lr.ph113:                                        ; preds = %96, %.lr.ph113
  %.3112 = phi i64 [ %102, %.lr.ph113 ], [ 0, %96 ]
  call void @_ZL18getPixelColorRGBA8PhS_S_S_PKhmPK16LodePNGColorMode(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %1, i64 noundef %.3112, ptr noundef nonnull %3)
  %97 = load i8, ptr %12, align 1, !tbaa !16
  %98 = load i8, ptr %13, align 1, !tbaa !16
  %99 = load i8, ptr %14, align 1, !tbaa !16
  %100 = load i8, ptr %15, align 1, !tbaa !16
  %101 = call noundef i32 @_ZL12rgba8ToPixelPhmPK16LodePNGColorModeP9ColorTreehhhh(ptr noundef %0, i64 noundef %.3112, ptr noundef nonnull %2, ptr noundef nonnull %7, i8 noundef zeroext %97, i8 noundef zeroext %98, i8 noundef zeroext %99, i8 noundef zeroext %100)
  %102 = add nuw i64 %.3112, 1
  %.not103 = icmp eq i64 %102, %18
  br i1 %.not103, label %._crit_edge, label %.lr.ph113, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph113, %96
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %.loopexit

.loopexit:                                        ; preds = %93, %.lr.ph122, %73, %.preheader, %66, %._crit_edge, %65
  %103 = load i32, ptr %2, align 8, !tbaa !5
  %104 = icmp eq i32 %103, 3
  br i1 %104, label %105, label %106

105:                                              ; preds = %.loopexit
  call void @_ZL18color_tree_cleanupP9ColorTree(ptr noundef nonnull %7)
  br label %106

106:                                              ; preds = %.loopexit, %105, %21, %26
  %.0 = phi i32 [ 0, %26 ], [ 107, %21 ], [ 0, %105 ], [ 0, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %7) #5
  ret i32 %.0
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15color_tree_initP9ColorTree(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL14color_tree_addP9ColorTreehhhhj(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL19getPixelColorRGBA16PtS_S_S_PKhmPK16LodePNGColorMode(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL13rgba16ToPixelPhmPK16LodePNGColorModetttt(ptr noundef, i64 noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL19getPixelColorsRGBA8PhmPKhPK16LodePNGColorMode(ptr noalias noundef, i64 noundef, ptr noalias noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL18getPixelColorsRGB8PhmPKhPK16LodePNGColorMode(ptr noalias noundef, i64 noundef, ptr noalias noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14color_tree_getP9ColorTreehhhh(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL18getPixelColorRGBA8PhS_S_S_PKhmPK16LodePNGColorMode(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12rgba8ToPixelPhmPK16LodePNGColorModeP9ColorTreehhhh(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 8}
!14 = !{!6, !12, i64 16}
!15 = !{!6, !10, i64 4}
!16 = !{!8, !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !8, i64 0}
!21 = distinct !{!21, !18}
!22 = !{!10, !10, i64 0}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass