; LLVM IR from StanfordVL/GibsonEnv :: gibson/core/channels/external/lodepng (lodepng)

; 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 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) #1

; 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) #1 {
  %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 i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i16, align 2
  %24 = alloca i16, align 2
  %25 = alloca i16, align 2
  %26 = alloca i16, align 2
  %27 = alloca i8, align 1
  %28 = alloca i8, align 1
  %29 = alloca i8, align 1
  %30 = alloca i8, align 1
  %31 = alloca i32, align 4
  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) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = load i32, ptr %13, align 4, !tbaa !9
  %34 = mul i32 %32, %33
  %35 = zext i32 %34 to i64
  store i64 %35, ptr %16, align 8, !tbaa !11
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = call noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef %36, ptr noundef %37)
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %61

40:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = call noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %41, i32 noundef %42, ptr noundef %43)
  store i64 %44, ptr %17, align 8, !tbaa !11
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %45

45:                                               ; preds = %57, %40
  %46 = load i64, ptr %14, align 8, !tbaa !11
  %47 = load i64, ptr %17, align 8, !tbaa !11
  %48 = icmp ne i64 %46, %47
  br i1 %48, label %49, label %60

49:                                               ; preds = %45
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load i64, ptr %14, align 8, !tbaa !11
  %52 = getelementptr inbounds i8, ptr %50, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !13
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = load i64, ptr %14, align 8, !tbaa !11
  %56 = getelementptr inbounds i8, ptr %54, i64 %55
  store i8 %53, ptr %56, align 1, !tbaa !13
  br label %57

57:                                               ; preds = %49
  %58 = load i64, ptr %14, align 8, !tbaa !11
  %59 = add i64 %58, 1
  store i64 %59, ptr %14, align 8, !tbaa !11
  br label %45, !llvm.loop !14

60:                                               ; preds = %45
  store i32 0, ptr %7, align 4
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br label %222

61:                                               ; preds = %6
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.LodePNGColorMode, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 8, !tbaa !16
  %65 = icmp eq i32 %64, 3
  br i1 %65, label %66, label %121

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.LodePNGColorMode, ptr %67, i32 0, i32 3
  %69 = load i64, ptr %68, align 8, !tbaa !19
  store i64 %69, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.LodePNGColorMode, ptr %70, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !20
  store ptr %72, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.LodePNGColorMode, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !21
  %76 = shl i32 1, %75
  %77 = zext i32 %76 to i64
  store i64 %77, ptr %21, align 8, !tbaa !11
  %78 = load i64, ptr %19, align 8, !tbaa !11
  %79 = icmp eq i64 %78, 0
  br i1 %79, label %80, label %87

80:                                               ; preds = %66
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.LodePNGColorMode, ptr %81, i32 0, i32 3
  %83 = load i64, ptr %82, align 8, !tbaa !19
  store i64 %83, ptr %19, align 8, !tbaa !11
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.LodePNGColorMode, ptr %84, i32 0, i32 2
  %86 = load ptr, ptr %85, align 8, !tbaa !20
  store ptr %86, ptr %20, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %80, %66
  %88 = load i64, ptr %19, align 8, !tbaa !11
  %89 = load i64, ptr %21, align 8, !tbaa !11
  %90 = icmp ult i64 %88, %89
  br i1 %90, label %91, label %93

91:                                               ; preds = %87
  %92 = load i64, ptr %19, align 8, !tbaa !11
  store i64 %92, ptr %21, align 8, !tbaa !11
  br label %93

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

94:                                               ; preds = %117, %93
  %95 = load i64, ptr %14, align 8, !tbaa !11
  %96 = load i64, ptr %21, align 8, !tbaa !11
  %97 = icmp ne i64 %95, %96
  br i1 %97, label %98, label %120

98:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = load i64, ptr %14, align 8, !tbaa !11
  %101 = mul i64 %100, 4
  %102 = getelementptr inbounds i8, ptr %99, i64 %101
  store ptr %102, ptr %22, align 8, !tbaa !5
  %103 = load ptr, ptr %22, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 0
  %105 = load i8, ptr %104, align 1, !tbaa !13
  %106 = load ptr, ptr %22, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 1
  %108 = load i8, ptr %107, align 1, !tbaa !13
  %109 = load ptr, ptr %22, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 2
  %111 = load i8, ptr %110, align 1, !tbaa !13
  %112 = load ptr, ptr %22, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i64 3
  %114 = load i8, ptr %113, align 1, !tbaa !13
  %115 = load i64, ptr %14, align 8, !tbaa !11
  %116 = trunc i64 %115 to i32
  call void @_ZL14color_tree_addP9ColorTreehhhhj(ptr noundef %15, i8 noundef zeroext %105, i8 noundef zeroext %108, i8 noundef zeroext %111, i8 noundef zeroext %114, i32 noundef %116)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  br label %117

117:                                              ; preds = %98
  %118 = load i64, ptr %14, align 8, !tbaa !11
  %119 = add i64 %118, 1
  store i64 %119, ptr %14, align 8, !tbaa !11
  br label %94, !llvm.loop !22

120:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  br label %121

121:                                              ; preds = %120, %61
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.LodePNGColorMode, ptr %122, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !21
  %125 = icmp eq i32 %124, 16
  br i1 %125, label %126, label %151

126:                                              ; preds = %121
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.LodePNGColorMode, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %128, align 4, !tbaa !21
  %130 = icmp eq i32 %129, 16
  br i1 %130, label %131, label %151

131:                                              ; preds = %126
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %132

132:                                              ; preds = %147, %131
  %133 = load i64, ptr %14, align 8, !tbaa !11
  %134 = load i64, ptr %16, align 8, !tbaa !11
  %135 = icmp ne i64 %133, %134
  br i1 %135, label %136, label %150

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

147:                                              ; preds = %136
  %148 = load i64, ptr %14, align 8, !tbaa !11
  %149 = add i64 %148, 1
  store i64 %149, ptr %14, align 8, !tbaa !11
  br label %132, !llvm.loop !25

150:                                              ; preds = %132
  br label %215

151:                                              ; preds = %126, %121
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.LodePNGColorMode, ptr %152, i32 0, i32 1
  %154 = load i32, ptr %153, align 4, !tbaa !21
  %155 = icmp eq i32 %154, 8
  br i1 %155, label %156, label %166

156:                                              ; preds = %151
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.LodePNGColorMode, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 8, !tbaa !16
  %160 = icmp eq i32 %159, 6
  br i1 %160, label %161, label %166

161:                                              ; preds = %156
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = load i64, ptr %16, align 8, !tbaa !11
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL19getPixelColorsRGBA8PhmjPKhPK16LodePNGColorMode(ptr noundef %162, i64 noundef %163, i32 noundef 1, ptr noundef %164, ptr noundef %165)
  br label %214

166:                                              ; preds = %156, %151
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.LodePNGColorMode, ptr %167, i32 0, i32 1
  %169 = load i32, ptr %168, align 4, !tbaa !21
  %170 = icmp eq i32 %169, 8
  br i1 %170, label %171, label %181

171:                                              ; preds = %166
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.LodePNGColorMode, ptr %172, i32 0, i32 0
  %174 = load i32, ptr %173, align 8, !tbaa !16
  %175 = icmp eq i32 %174, 2
  br i1 %175, label %176, label %181

176:                                              ; preds = %171
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = load i64, ptr %16, align 8, !tbaa !11
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL19getPixelColorsRGBA8PhmjPKhPK16LodePNGColorMode(ptr noundef %177, i64 noundef %178, i32 noundef 0, ptr noundef %179, ptr noundef %180)
  br label %213

181:                                              ; preds = %171, %166
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #3
  store i8 0, ptr %27, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #3
  store i8 0, ptr %28, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #3
  store i8 0, ptr %29, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #3
  store i8 0, ptr %30, align 1, !tbaa !13
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %182

182:                                              ; preds = %206, %181
  %183 = load i64, ptr %14, align 8, !tbaa !11
  %184 = load i64, ptr %16, align 8, !tbaa !11
  %185 = icmp ne i64 %183, %184
  br i1 %185, label %186, label %209

186:                                              ; preds = %182
  %187 = load ptr, ptr %9, align 8, !tbaa !5
  %188 = load i64, ptr %14, align 8, !tbaa !11
  %189 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZL18getPixelColorRGBA8PhS_S_S_PKhmPK16LodePNGColorMode(ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %187, i64 noundef %188, ptr noundef %189)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = load i64, ptr %14, align 8, !tbaa !11
  %192 = load ptr, ptr %10, align 8, !tbaa !5
  %193 = load i8, ptr %27, align 1, !tbaa !13
  %194 = load i8, ptr %28, align 1, !tbaa !13
  %195 = load i8, ptr %29, align 1, !tbaa !13
  %196 = load i8, ptr %30, align 1, !tbaa !13
  %197 = call noundef i32 @_ZL12rgba8ToPixelPhmPK16LodePNGColorModeP9ColorTreehhhh(ptr noundef %190, i64 noundef %191, ptr noundef %192, ptr noundef %15, i8 noundef zeroext %193, i8 noundef zeroext %194, i8 noundef zeroext %195, i8 noundef zeroext %196)
  store i32 %197, ptr %31, align 4, !tbaa !9
  %198 = load i32, ptr %31, align 4, !tbaa !9
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %202

200:                                              ; preds = %186
  %201 = load i32, ptr %31, align 4, !tbaa !9
  store i32 %201, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %203

202:                                              ; preds = %186
  store i32 0, ptr %18, align 4
  br label %203

203:                                              ; preds = %202, %200
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  %204 = load i32, ptr %18, align 4
  switch i32 %204, label %210 [
    i32 0, label %205
  ]

205:                                              ; preds = %203
  br label %206

206:                                              ; preds = %205
  %207 = load i64, ptr %14, align 8, !tbaa !11
  %208 = add i64 %207, 1
  store i64 %208, ptr %14, align 8, !tbaa !11
  br label %182, !llvm.loop !26

209:                                              ; preds = %182
  store i32 0, ptr %18, align 4
  br label %210

210:                                              ; preds = %209, %203
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #3
  %211 = load i32, ptr %18, align 4
  switch i32 %211, label %222 [
    i32 0, label %212
  ]

212:                                              ; preds = %210
  br label %213

213:                                              ; preds = %212, %176
  br label %214

214:                                              ; preds = %213, %161
  br label %215

215:                                              ; preds = %214, %150
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.LodePNGColorMode, ptr %216, i32 0, i32 0
  %218 = load i32, ptr %217, align 8, !tbaa !16
  %219 = icmp eq i32 %218, 3
  br i1 %219, label %220, label %221

220:                                              ; preds = %215
  call void @_ZL18color_tree_cleanupP9ColorTree(ptr noundef %15)
  br label %221

221:                                              ; preds = %220, %215
  store i32 0, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %222

222:                                              ; preds = %221, %210, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 136, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %223 = load i32, ptr %7, align 4
  ret i32 %223
}

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

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

; 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) #2

; 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) #2

; 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) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL19getPixelColorsRGBA8PhmjPKhPK16LodePNGColorMode(ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; 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) #1

; 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) #1

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

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


; 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 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 #1

; 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) local_unnamed_addr #1 {
  %7 = ptrtoint ptr %1 to i64
  %8 = ptrtoint ptr %0 to i64
  %9 = alloca %struct.ColorTree, align 8
  %10 = alloca i16, align 2
  %11 = alloca i16, align 2
  %12 = alloca i16, align 2
  %13 = alloca i16, align 2
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %9) #4
  %18 = mul i32 %5, %4
  %19 = zext i32 %18 to i64
  %20 = tail call noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef %2, ptr noundef %3)
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %54, label %21

21:                                               ; preds = %6
  %22 = tail call noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %4, i32 noundef %5, ptr noundef %3)
  %.not8893 = icmp eq i64 %22, 0
  br i1 %.not8893, label %.loopexit92, label %iter.check

iter.check:                                       ; preds = %21
  %min.iters.check = icmp ult i64 %22, 8
  %23 = sub i64 %8, %7
  %diff.check = icmp ult i64 %23, 32
  %or.cond115 = or i1 %min.iters.check, %diff.check
  br i1 %or.cond115, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check107 = icmp ult i64 %22, 32
  br i1 %min.iters.check107, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %22, -32
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %24 = getelementptr inbounds i8, ptr %1, i64 %index
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %wide.load = load <16 x i8>, ptr %24, align 1, !tbaa !5
  %wide.load108 = load <16 x i8>, ptr %25, align 1, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %0, i64 %index
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  store <16 x i8> %wide.load, ptr %26, align 1, !tbaa !5
  store <16 x i8> %wide.load108, ptr %27, align 1, !tbaa !5
  %index.next = add nuw i64 %index, 32
  %28 = icmp eq i64 %index.next, %n.vec
  br i1 %28, label %middle.block, label %vector.body, !llvm.loop !8

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %22, %n.vec
  br i1 %cmp.n, label %.loopexit92, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %22, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec110 = and i64 %22, -8
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index111 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next113, %vec.epilog.vector.body ]
  %29 = getelementptr inbounds i8, ptr %1, i64 %index111
  %wide.load112 = load <8 x i8>, ptr %29, align 1, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %0, i64 %index111
  store <8 x i8> %wide.load112, ptr %30, align 1, !tbaa !5
  %index.next113 = add nuw i64 %index111, 8
  %31 = icmp eq i64 %index.next113, %n.vec110
  br i1 %31, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !12

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n114 = icmp eq i64 %22, %n.vec110
  br i1 %cmp.n114, label %.loopexit92, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %.07294.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec110, %vec.epilog.middle.block ]
  %xtraiter = and i64 %22, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.07294.prol = phi i64 [ %35, %.lr.ph.prol ], [ %.07294.ph, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %32 = getelementptr inbounds i8, ptr %1, i64 %.07294.prol
  %33 = load i8, ptr %32, align 1, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %0, i64 %.07294.prol
  store i8 %33, ptr %34, align 1, !tbaa !5
  %35 = add nuw i64 %.07294.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !13

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.07294.unr = phi i64 [ %.07294.ph, %.lr.ph.preheader ], [ %35, %.lr.ph.prol ]
  %36 = sub i64 %.07294.ph, %22
  %37 = icmp ugt i64 %36, -4
  br i1 %37, label %.loopexit92, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.07294 = phi i64 [ %53, %.lr.ph ], [ %.07294.unr, %.lr.ph.prol.loopexit ]
  %38 = getelementptr inbounds i8, ptr %1, i64 %.07294
  %39 = load i8, ptr %38, align 1, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %0, i64 %.07294
  store i8 %39, ptr %40, align 1, !tbaa !5
  %41 = add nuw i64 %.07294, 1
  %42 = getelementptr inbounds i8, ptr %1, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %0, i64 %41
  store i8 %43, ptr %44, align 1, !tbaa !5
  %45 = add nuw i64 %.07294, 2
  %46 = getelementptr inbounds i8, ptr %1, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %0, i64 %45
  store i8 %47, ptr %48, align 1, !tbaa !5
  %49 = add nuw i64 %.07294, 3
  %50 = getelementptr inbounds i8, ptr %1, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %0, i64 %49
  store i8 %51, ptr %52, align 1, !tbaa !5
  %53 = add nuw i64 %.07294, 4
  %.not88.3 = icmp eq i64 %53, %22
  br i1 %.not88.3, label %.loopexit92, label %.lr.ph, !llvm.loop !15

54:                                               ; preds = %6
  %55 = load i32, ptr %2, align 8, !tbaa !16
  %56 = icmp eq i32 %55, 3
  br i1 %56, label %57, label %.loopexit91

57:                                               ; preds = %54
  %58 = getelementptr inbounds i8, ptr %2, i64 16
  %59 = load i64, ptr %58, align 8, !tbaa !22
  %60 = getelementptr inbounds i8, ptr %2, i64 4
  %61 = load i32, ptr %60, align 4, !tbaa !23
  %62 = shl nuw i32 1, %61
  %63 = zext i32 %62 to i64
  %64 = icmp eq i64 %59, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %57
  %66 = getelementptr inbounds i8, ptr %3, i64 16
  %67 = load i64, ptr %66, align 8, !tbaa !22
  br label %68

68:                                               ; preds = %65, %57
  %.078 = phi i64 [ %67, %65 ], [ %59, %57 ]
  %.pn = phi ptr [ %3, %65 ], [ %2, %57 ]
  %.077.in = getelementptr inbounds i8, ptr %.pn, i64 8
  %.077 = load ptr, ptr %.077.in, align 8, !tbaa !24
  %spec.select = tail call i64 @llvm.umin.i64(i64 %.078, i64 %63)
  call void @_ZL15color_tree_initP9ColorTree(ptr noundef nonnull %9)
  %.not8495 = icmp eq i64 %.078, 0
  br i1 %.not8495, label %.loopexit91, label %.lr.ph97

.lr.ph97:                                         ; preds = %68, %.lr.ph97
  %.17396 = phi i64 [ %79, %.lr.ph97 ], [ 0, %68 ]
  %69 = shl i64 %.17396, 2
  %70 = getelementptr inbounds i8, ptr %.077, i64 %69
  %71 = load i8, ptr %70, align 1, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %70, i64 1
  %73 = load i8, ptr %72, align 1, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %70, i64 2
  %75 = load i8, ptr %74, align 1, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %70, i64 3
  %77 = load i8, ptr %76, align 1, !tbaa !5
  %78 = trunc i64 %.17396 to i32
  call void @_ZL14color_tree_addP9ColorTreehhhhj(ptr noundef nonnull %9, i8 noundef zeroext %71, i8 noundef zeroext %73, i8 noundef zeroext %75, i8 noundef zeroext %77, i32 noundef %78)
  %79 = add i64 %.17396, 1
  %.not84 = icmp eq i64 %79, %spec.select
  br i1 %.not84, label %.loopexit91, label %.lr.ph97, !llvm.loop !25

.loopexit91:                                      ; preds = %.lr.ph97, %68, %54
  %80 = getelementptr inbounds i8, ptr %3, i64 4
  %81 = load i32, ptr %80, align 4, !tbaa !23
  %82 = icmp eq i32 %81, 16
  %83 = getelementptr inbounds i8, ptr %2, i64 4
  %84 = load i32, ptr %83, align 4, !tbaa !23
  %85 = icmp eq i32 %84, 16
  %or.cond = select i1 %82, i1 %85, i1 false
  br i1 %or.cond, label %.preheader, label %.loopexit91._crit_edge

.preheader:                                       ; preds = %.loopexit91
  %.not87101 = icmp eq i32 %18, 0
  br i1 %.not87101, label %.loopexit, label %.lr.ph103

.lr.ph103:                                        ; preds = %.preheader, %.lr.ph103
  %.274102 = phi i64 [ %90, %.lr.ph103 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %10) #4
  store i16 0, ptr %10, align 2, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %11) #4
  store i16 0, ptr %11, align 2, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %12) #4
  store i16 0, ptr %12, align 2, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %13) #4
  store i16 0, ptr %13, align 2, !tbaa !26
  call void @_ZL19getPixelColorRGBA16PtS_S_S_PKhmPK16LodePNGColorMode(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %1, i64 noundef %.274102, ptr noundef %3)
  %86 = load i16, ptr %10, align 2, !tbaa !26
  %87 = load i16, ptr %11, align 2, !tbaa !26
  %88 = load i16, ptr %12, align 2, !tbaa !26
  %89 = load i16, ptr %13, align 2, !tbaa !26
  call void @_ZL13rgba16ToPixelPhmPK16LodePNGColorModetttt(ptr noundef %0, i64 noundef %.274102, ptr noundef nonnull %2, i16 noundef zeroext %86, i16 noundef zeroext %87, i16 noundef zeroext %88, i16 noundef zeroext %89)
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #4
  %90 = add nuw nsw i64 %.274102, 1
  %.not87 = icmp eq i64 %90, %19
  br i1 %.not87, label %.loopexit, label %.lr.ph103, !llvm.loop !28

.loopexit91._crit_edge:                           ; preds = %.loopexit91
  %91 = icmp eq i32 %84, 8
  br i1 %91, label %92, label %96

92:                                               ; preds = %.loopexit91._crit_edge
  %93 = load i32, ptr %2, align 8, !tbaa !16
  switch i32 %93, label %96 [
    i32 6, label %94
    i32 2, label %95
  ]

94:                                               ; preds = %92
  call void @_ZL19getPixelColorsRGBA8PhmjPKhPK16LodePNGColorMode(ptr noundef %0, i64 noundef %19, i32 noundef 1, ptr noundef %1, ptr noundef nonnull %3)
  br label %.loopexit

95:                                               ; preds = %92
  call void @_ZL19getPixelColorsRGBA8PhmjPKhPK16LodePNGColorMode(ptr noundef %0, i64 noundef %19, i32 noundef 0, ptr noundef %1, ptr noundef nonnull %3)
  br label %.loopexit

96:                                               ; preds = %92, %.loopexit91._crit_edge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #4
  store i8 0, ptr %14, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  store i8 0, ptr %15, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #4
  store i8 0, ptr %16, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #4
  store i8 0, ptr %17, align 1, !tbaa !5
  %.not8598 = icmp eq i32 %18, 0
  br i1 %.not8598, label %.thread89, label %.lr.ph100

97:                                               ; preds = %.lr.ph100
  %98 = add nuw nsw i64 %.37599, 1
  %.not85 = icmp eq i64 %98, %19
  br i1 %.not85, label %.thread89, label %.lr.ph100, !llvm.loop !29

.thread89:                                        ; preds = %97, %96
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  br label %.loopexit

.lr.ph100:                                        ; preds = %96, %97
  %.37599 = phi i64 [ %98, %97 ], [ 0, %96 ]
  call void @_ZL18getPixelColorRGBA8PhS_S_S_PKhmPK16LodePNGColorMode(ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %1, i64 noundef %.37599, ptr noundef %3)
  %99 = load i8, ptr %14, align 1, !tbaa !5
  %100 = load i8, ptr %15, align 1, !tbaa !5
  %101 = load i8, ptr %16, align 1, !tbaa !5
  %102 = load i8, ptr %17, align 1, !tbaa !5
  %103 = call noundef i32 @_ZL12rgba8ToPixelPhmPK16LodePNGColorModeP9ColorTreehhhh(ptr noundef %0, i64 noundef %.37599, ptr noundef nonnull %2, ptr noundef nonnull %9, i8 noundef zeroext %99, i8 noundef zeroext %100, i8 noundef zeroext %101, i8 noundef zeroext %102)
  %.not86 = icmp eq i32 %103, 0
  br i1 %.not86, label %97, label %104

104:                                              ; preds = %.lr.ph100
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  br label %.loopexit92

.loopexit:                                        ; preds = %.lr.ph103, %.preheader, %.thread89, %94, %95
  %105 = load i32, ptr %2, align 8, !tbaa !16
  %106 = icmp eq i32 %105, 3
  br i1 %106, label %107, label %.loopexit92

107:                                              ; preds = %.loopexit
  call void @_ZL18color_tree_cleanupP9ColorTree(ptr noundef nonnull %9)
  br label %.loopexit92

.loopexit92:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %vec.epilog.middle.block, %21, %104, %.loopexit, %107
  %.3 = phi i32 [ %103, %104 ], [ 0, %107 ], [ 0, %.loopexit ], [ 0, %21 ], [ 0, %vec.epilog.middle.block ], [ 0, %middle.block ], [ 0, %.lr.ph ], [ 0, %.lr.ph.prol.loopexit ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %9) #4
  ret i32 %.3
}

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

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

; 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 #2

; 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 #2

; 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 #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL19getPixelColorsRGBA8PhmjPKhPK16LodePNGColorMode(ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; 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 #1

; 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 #1

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

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

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass