; LLVM IR from facebookresearch/habitat-sim :: src/deps/basis-universal/encoder (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.LodePNGState = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32, [4 x i8] }>
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32 }
%struct.LodePNGDecompressSettings = type { i32, ptr, ptr, ptr }
%struct.LodePNGEncoderSettings = type { %struct.LodePNGCompressSettings, i32, i32, i32, ptr, i32, i32, i32 }
%struct.LodePNGCompressSettings = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%struct.LodePNGInfo = type { i32, i32, i32, %struct.LodePNGColorMode, i32, i32, i32, i32, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, %struct.LodePNGTime, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }

@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef, ptr noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z21lodepng_inspect_chunkP12LodePNGStatemPKhm(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = load i64, ptr %7, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %16, i64 %17
  store ptr %18, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !11
  %19 = load i64, ptr %7, align 8, !tbaa !9
  %20 = add i64 %19, 4
  %21 = load i64, ptr %9, align 8, !tbaa !9
  %22 = icmp ugt i64 %20, %21
  br i1 %22, label %23, label %24

23:                                               ; preds = %4
  store i32 30, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %218

24:                                               ; preds = %4
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = call noundef i32 @_Z20lodepng_chunk_lengthPKh(ptr noundef %25)
  store i32 %26, ptr %11, align 4, !tbaa !11
  %27 = load i32, ptr %11, align 4, !tbaa !11
  %28 = icmp ugt i32 %27, 2147483647
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  store i32 63, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %218

30:                                               ; preds = %24
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = call noundef ptr @_Z24lodepng_chunk_data_constPKh(ptr noundef %31)
  store ptr %32, ptr %12, align 8, !tbaa !5
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = load i32, ptr %11, align 4, !tbaa !11
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds i8, ptr %33, i64 %35
  %37 = getelementptr inbounds i8, ptr %36, i64 4
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = load i64, ptr %9, align 8, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %38, i64 %39
  %41 = icmp ugt ptr %37, %40
  br i1 %41, label %42, label %43

42:                                               ; preds = %30
  store i32 30, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %218

43:                                               ; preds = %30
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %44, ptr noundef @.str.3)
  %46 = icmp ne i8 %45, 0
  br i1 %46, label %47, label %55

47:                                               ; preds = %43
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.LodePNGState, ptr %48, i32 0, i32 4
  %50 = getelementptr inbounds %struct.LodePNGInfo, ptr %49, i32 0, i32 3
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = load i32, ptr %11, align 4, !tbaa !11
  %53 = zext i32 %52 to i64
  %54 = call noundef i32 @_ZL14readChunk_PLTEP16LodePNGColorModePKhm(ptr noundef %50, ptr noundef %51, i64 noundef %53)
  store i32 %54, ptr %14, align 4, !tbaa !11
  br label %198

55:                                               ; preds = %43
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %56, ptr noundef @.str.4)
  %58 = icmp ne i8 %57, 0
  br i1 %58, label %59, label %67

59:                                               ; preds = %55
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.LodePNGState, ptr %60, i32 0, i32 4
  %62 = getelementptr inbounds %struct.LodePNGInfo, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = load i32, ptr %11, align 4, !tbaa !11
  %65 = zext i32 %64 to i64
  %66 = call noundef i32 @_ZL14readChunk_tRNSP16LodePNGColorModePKhm(ptr noundef %62, ptr noundef %63, i64 noundef %65)
  store i32 %66, ptr %14, align 4, !tbaa !11
  br label %197

67:                                               ; preds = %55
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %68, ptr noundef @.str.5)
  %70 = icmp ne i8 %69, 0
  br i1 %70, label %71, label %78

71:                                               ; preds = %67
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.LodePNGState, ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  %75 = load i32, ptr %11, align 4, !tbaa !11
  %76 = zext i32 %75 to i64
  %77 = call noundef i32 @_ZL14readChunk_bKGDP11LodePNGInfoPKhm(ptr noundef %73, ptr noundef %74, i64 noundef %76)
  store i32 %77, ptr %14, align 4, !tbaa !11
  br label %196

78:                                               ; preds = %67
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %79, ptr noundef @.str.6)
  %81 = icmp ne i8 %80, 0
  br i1 %81, label %82, label %89

82:                                               ; preds = %78
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.LodePNGState, ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = load i32, ptr %11, align 4, !tbaa !11
  %87 = zext i32 %86 to i64
  %88 = call noundef i32 @_ZL14readChunk_tEXtP11LodePNGInfoPKhm(ptr noundef %84, ptr noundef %85, i64 noundef %87)
  store i32 %88, ptr %14, align 4, !tbaa !11
  br label %195

89:                                               ; preds = %78
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %90, ptr noundef @.str.7)
  %92 = icmp ne i8 %91, 0
  br i1 %92, label %93, label %103

93:                                               ; preds = %89
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.LodePNGState, ptr %94, i32 0, i32 4
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.LodePNGState, ptr %96, i32 0, i32 1
  %98 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = load i32, ptr %11, align 4, !tbaa !11
  %101 = zext i32 %100 to i64
  %102 = call noundef i32 @_ZL14readChunk_zTXtP11LodePNGInfoPK25LodePNGDecompressSettingsPKhm(ptr noundef %95, ptr noundef %98, ptr noundef %99, i64 noundef %101)
  store i32 %102, ptr %14, align 4, !tbaa !11
  br label %194

103:                                              ; preds = %89
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %104, ptr noundef @.str.8)
  %106 = icmp ne i8 %105, 0
  br i1 %106, label %107, label %117

107:                                              ; preds = %103
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.LodePNGState, ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.LodePNGState, ptr %110, i32 0, i32 1
  %112 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = load i32, ptr %11, align 4, !tbaa !11
  %115 = zext i32 %114 to i64
  %116 = call noundef i32 @_ZL14readChunk_iTXtP11LodePNGInfoPK25LodePNGDecompressSettingsPKhm(ptr noundef %109, ptr noundef %112, ptr noundef %113, i64 noundef %115)
  store i32 %116, ptr %14, align 4, !tbaa !11
  br label %193

117:                                              ; preds = %103
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %118, ptr noundef @.str.9)
  %120 = icmp ne i8 %119, 0
  br i1 %120, label %121, label %128

121:                                              ; preds = %117
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.LodePNGState, ptr %122, i32 0, i32 4
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !11
  %126 = zext i32 %125 to i64
  %127 = call noundef i32 @_ZL14readChunk_tIMEP11LodePNGInfoPKhm(ptr noundef %123, ptr noundef %124, i64 noundef %126)
  store i32 %127, ptr %14, align 4, !tbaa !11
  br label %192

128:                                              ; preds = %117
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %129, ptr noundef @.str.10)
  %131 = icmp ne i8 %130, 0
  br i1 %131, label %132, label %139

132:                                              ; preds = %128
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.LodePNGState, ptr %133, i32 0, i32 4
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = load i32, ptr %11, align 4, !tbaa !11
  %137 = zext i32 %136 to i64
  %138 = call noundef i32 @_ZL14readChunk_pHYsP11LodePNGInfoPKhm(ptr noundef %134, ptr noundef %135, i64 noundef %137)
  store i32 %138, ptr %14, align 4, !tbaa !11
  br label %191

139:                                              ; preds = %128
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %140, ptr noundef @.str.11)
  %142 = icmp ne i8 %141, 0
  br i1 %142, label %143, label %150

143:                                              ; preds = %139
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.LodePNGState, ptr %144, i32 0, i32 4
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = load i32, ptr %11, align 4, !tbaa !11
  %148 = zext i32 %147 to i64
  %149 = call noundef i32 @_ZL14readChunk_gAMAP11LodePNGInfoPKhm(ptr noundef %145, ptr noundef %146, i64 noundef %148)
  store i32 %149, ptr %14, align 4, !tbaa !11
  br label %190

150:                                              ; preds = %139
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %151, ptr noundef @.str.12)
  %153 = icmp ne i8 %152, 0
  br i1 %153, label %154, label %161

154:                                              ; preds = %150
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.LodePNGState, ptr %155, i32 0, i32 4
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  %158 = load i32, ptr %11, align 4, !tbaa !11
  %159 = zext i32 %158 to i64
  %160 = call noundef i32 @_ZL14readChunk_cHRMP11LodePNGInfoPKhm(ptr noundef %156, ptr noundef %157, i64 noundef %159)
  store i32 %160, ptr %14, align 4, !tbaa !11
  br label %189

161:                                              ; preds = %150
  %162 = load ptr, ptr %10, align 8, !tbaa !5
  %163 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %162, ptr noundef @.str.13)
  %164 = icmp ne i8 %163, 0
  br i1 %164, label %165, label %172

165:                                              ; preds = %161
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.LodePNGState, ptr %166, i32 0, i32 4
  %168 = load ptr, ptr %12, align 8, !tbaa !5
  %169 = load i32, ptr %11, align 4, !tbaa !11
  %170 = zext i32 %169 to i64
  %171 = call noundef i32 @_ZL14readChunk_sRGBP11LodePNGInfoPKhm(ptr noundef %167, ptr noundef %168, i64 noundef %170)
  store i32 %171, ptr %14, align 4, !tbaa !11
  br label %188

172:                                              ; preds = %161
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  %174 = call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %173, ptr noundef @.str.14)
  %175 = icmp ne i8 %174, 0
  br i1 %175, label %176, label %186

176:                                              ; preds = %172
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.LodePNGState, ptr %177, i32 0, i32 4
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.LodePNGState, ptr %179, i32 0, i32 1
  %181 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %180, i32 0, i32 0
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = load i32, ptr %11, align 4, !tbaa !11
  %184 = zext i32 %183 to i64
  %185 = call noundef i32 @_ZL14readChunk_iCCPP11LodePNGInfoPK25LodePNGDecompressSettingsPKhm(ptr noundef %178, ptr noundef %181, ptr noundef %182, i64 noundef %184)
  store i32 %185, ptr %14, align 4, !tbaa !11
  br label %187

186:                                              ; preds = %172
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %187

187:                                              ; preds = %186, %176
  br label %188

188:                                              ; preds = %187, %165
  br label %189

189:                                              ; preds = %188, %154
  br label %190

190:                                              ; preds = %189, %143
  br label %191

191:                                              ; preds = %190, %132
  br label %192

192:                                              ; preds = %191, %121
  br label %193

193:                                              ; preds = %192, %107
  br label %194

194:                                              ; preds = %193, %93
  br label %195

195:                                              ; preds = %194, %82
  br label %196

196:                                              ; preds = %195, %71
  br label %197

197:                                              ; preds = %196, %59
  br label %198

198:                                              ; preds = %197, %47
  %199 = load i32, ptr %14, align 4, !tbaa !11
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %216, label %201

201:                                              ; preds = %198
  %202 = load i32, ptr %13, align 4, !tbaa !11
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %216, label %204

204:                                              ; preds = %201
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.LodePNGState, ptr %205, i32 0, i32 1
  %207 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %206, i32 0, i32 1
  %208 = load i32, ptr %207, align 8, !tbaa !13
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %216, label %210

210:                                              ; preds = %204
  %211 = load ptr, ptr %10, align 8, !tbaa !5
  %212 = call noundef i32 @_Z23lodepng_chunk_check_crcPKh(ptr noundef %211)
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %215

214:                                              ; preds = %210
  store i32 57, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %218

215:                                              ; preds = %210
  br label %216

216:                                              ; preds = %215, %204, %201, %198
  %217 = load i32, ptr %14, align 4, !tbaa !11
  store i32 %217, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %218

218:                                              ; preds = %216, %214, %42, %29, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %219 = load i32, ptr %5, align 4
  ret i32 %219
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 40}
!14 = !{!"_ZTS12LodePNGState", !15, i64 8, !17, i64 64, !20, i64 152, !22, i64 192, !12, i64 504}
!15 = !{!"_ZTS22LodePNGDecoderSettings", !16, i64 0, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52}
!16 = !{!"_ZTS25LodePNGDecompressSettings", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTS22LodePNGEncoderSettings", !18, i64 0, !12, i64 48, !12, i64 52, !19, i64 56, !6, i64 64, !12, i64 72, !12, i64 76, !12, i64 80}
!18 = !{!"_ZTS23LodePNGCompressSettings", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!19 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!20 = !{!"_ZTS16LodePNGColorMode", !21, i64 0, !12, i64 4, !6, i64 8, !10, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36}
!21 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!22 = !{!"_ZTS11LodePNGInfo", !12, i64 0, !12, i64 4, !12, i64 8, !20, i64 16, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !10, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !12, i64 136, !23, i64 140, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !12, i64 212, !12, i64 216, !12, i64 220, !12, i64 224, !12, i64 228, !12, i64 232, !6, i64 240, !6, i64 248, !12, i64 256, !7, i64 264, !7, i64 288}
!23 = !{!"_ZTS11LodePNGTime", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}


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

@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z20lodepng_chunk_lengthPKh(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z24lodepng_chunk_data_constPKh(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z23lodepng_chunk_check_crcPKh(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z21lodepng_inspect_chunkP12LodePNGStatemPKhm(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %2, i64 %1
  %6 = add i64 %1, 4
  %7 = icmp ugt i64 %6, %3
  br i1 %7, label %.thread, label %8

8:                                                ; preds = %4
  %9 = tail call noundef i32 @_Z20lodepng_chunk_lengthPKh(ptr noundef %5)
  %10 = icmp slt i32 %9, 0
  br i1 %10, label %.thread, label %11

11:                                               ; preds = %8
  %12 = tail call noundef ptr @_Z24lodepng_chunk_data_constPKh(ptr noundef %5)
  %13 = zext nneg i32 %9 to i64
  %14 = getelementptr inbounds i8, ptr %12, i64 %13
  %15 = getelementptr inbounds i8, ptr %14, i64 4
  %16 = getelementptr inbounds i8, ptr %2, i64 %3
  %17 = icmp ugt ptr %15, %16
  br i1 %17, label %.thread, label %18

18:                                               ; preds = %11
  %19 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.3)
  %.not = icmp eq i8 %19, 0
  br i1 %.not, label %23, label %20

20:                                               ; preds = %18
  %21 = getelementptr inbounds i8, ptr %0, i64 208
  %22 = tail call noundef i32 @_ZL14readChunk_PLTEP16LodePNGColorModePKhm(ptr noundef nonnull %21, ptr noundef %12, i64 noundef %13)
  br label %81

23:                                               ; preds = %18
  %24 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.4)
  %.not72 = icmp eq i8 %24, 0
  br i1 %.not72, label %28, label %25

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %0, i64 208
  %27 = tail call noundef i32 @_ZL14readChunk_tRNSP16LodePNGColorModePKhm(ptr noundef nonnull %26, ptr noundef %12, i64 noundef %13)
  br label %81

28:                                               ; preds = %23
  %29 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.5)
  %.not73 = icmp eq i8 %29, 0
  br i1 %.not73, label %33, label %30

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %0, i64 192
  %32 = tail call noundef i32 @_ZL14readChunk_bKGDP11LodePNGInfoPKhm(ptr noundef nonnull %31, ptr noundef %12, i64 noundef %13)
  br label %81

33:                                               ; preds = %28
  %34 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.6)
  %.not74 = icmp eq i8 %34, 0
  br i1 %.not74, label %38, label %35

35:                                               ; preds = %33
  %36 = getelementptr inbounds i8, ptr %0, i64 192
  %37 = tail call noundef i32 @_ZL14readChunk_tEXtP11LodePNGInfoPKhm(ptr noundef nonnull %36, ptr noundef %12, i64 noundef %13)
  br label %81

38:                                               ; preds = %33
  %39 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.7)
  %.not75 = icmp eq i8 %39, 0
  br i1 %.not75, label %44, label %40

40:                                               ; preds = %38
  %41 = getelementptr inbounds i8, ptr %0, i64 192
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  %43 = tail call noundef i32 @_ZL14readChunk_zTXtP11LodePNGInfoPK25LodePNGDecompressSettingsPKhm(ptr noundef nonnull %41, ptr noundef nonnull %42, ptr noundef %12, i64 noundef %13)
  br label %81

44:                                               ; preds = %38
  %45 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.8)
  %.not76 = icmp eq i8 %45, 0
  br i1 %.not76, label %50, label %46

46:                                               ; preds = %44
  %47 = getelementptr inbounds i8, ptr %0, i64 192
  %48 = getelementptr inbounds i8, ptr %0, i64 8
  %49 = tail call noundef i32 @_ZL14readChunk_iTXtP11LodePNGInfoPK25LodePNGDecompressSettingsPKhm(ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef %12, i64 noundef %13)
  br label %81

50:                                               ; preds = %44
  %51 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.9)
  %.not77 = icmp eq i8 %51, 0
  br i1 %.not77, label %55, label %52

52:                                               ; preds = %50
  %53 = getelementptr inbounds i8, ptr %0, i64 192
  %54 = tail call noundef i32 @_ZL14readChunk_tIMEP11LodePNGInfoPKhm(ptr noundef nonnull %53, ptr noundef %12, i64 noundef %13)
  br label %81

55:                                               ; preds = %50
  %56 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.10)
  %.not78 = icmp eq i8 %56, 0
  br i1 %.not78, label %60, label %57

57:                                               ; preds = %55
  %58 = getelementptr inbounds i8, ptr %0, i64 192
  %59 = tail call noundef i32 @_ZL14readChunk_pHYsP11LodePNGInfoPKhm(ptr noundef nonnull %58, ptr noundef %12, i64 noundef %13)
  br label %81

60:                                               ; preds = %55
  %61 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.11)
  %.not79 = icmp eq i8 %61, 0
  br i1 %.not79, label %65, label %62

62:                                               ; preds = %60
  %63 = getelementptr inbounds i8, ptr %0, i64 192
  %64 = tail call noundef i32 @_ZL14readChunk_gAMAP11LodePNGInfoPKhm(ptr noundef nonnull %63, ptr noundef %12, i64 noundef %13)
  br label %81

65:                                               ; preds = %60
  %66 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.12)
  %.not80 = icmp eq i8 %66, 0
  br i1 %.not80, label %70, label %67

67:                                               ; preds = %65
  %68 = getelementptr inbounds i8, ptr %0, i64 192
  %69 = tail call noundef i32 @_ZL14readChunk_cHRMP11LodePNGInfoPKhm(ptr noundef nonnull %68, ptr noundef %12, i64 noundef %13)
  br label %81

70:                                               ; preds = %65
  %71 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.13)
  %.not81 = icmp eq i8 %71, 0
  br i1 %.not81, label %75, label %72

72:                                               ; preds = %70
  %73 = getelementptr inbounds i8, ptr %0, i64 192
  %74 = tail call noundef i32 @_ZL14readChunk_sRGBP11LodePNGInfoPKhm(ptr noundef nonnull %73, ptr noundef %12, i64 noundef %13)
  br label %81

75:                                               ; preds = %70
  %76 = tail call noundef zeroext i8 @_Z25lodepng_chunk_type_equalsPKhPKc(ptr noundef %5, ptr noundef nonnull @.str.14)
  %.not82 = icmp eq i8 %76, 0
  br i1 %.not82, label %.thread, label %77

77:                                               ; preds = %75
  %78 = getelementptr inbounds i8, ptr %0, i64 192
  %79 = getelementptr inbounds i8, ptr %0, i64 8
  %80 = tail call noundef i32 @_ZL14readChunk_iCCPP11LodePNGInfoPK25LodePNGDecompressSettingsPKhm(ptr noundef nonnull %78, ptr noundef nonnull %79, ptr noundef %12, i64 noundef %13)
  br label %81

81:                                               ; preds = %25, %35, %46, %57, %67, %77, %72, %62, %52, %40, %30, %20
  %.0 = phi i32 [ %22, %20 ], [ %27, %25 ], [ %32, %30 ], [ %37, %35 ], [ %43, %40 ], [ %49, %46 ], [ %54, %52 ], [ %59, %57 ], [ %64, %62 ], [ %69, %67 ], [ %74, %72 ], [ %80, %77 ]
  %.not88 = icmp eq i32 %.0, 0
  br i1 %.not88, label %82, label %.thread

82:                                               ; preds = %81
  %83 = getelementptr inbounds i8, ptr %0, i64 40
  %84 = load i32, ptr %83, align 8, !tbaa !5
  %.not83 = icmp eq i32 %84, 0
  br i1 %.not83, label %85, label %.thread

85:                                               ; preds = %82
  %86 = tail call noundef i32 @_Z23lodepng_chunk_check_crcPKh(ptr noundef %5)
  %.not84 = icmp eq i32 %86, 0
  %spec.select = select i1 %.not84, i32 0, i32 57
  br label %.thread

.thread:                                          ; preds = %85, %75, %81, %82, %11, %8, %4
  %.069 = phi i32 [ 30, %4 ], [ 63, %8 ], [ 30, %11 ], [ 0, %82 ], [ %.0, %81 ], [ 0, %75 ], [ %spec.select, %85 ]
  ret i32 %.069
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14readChunk_PLTEP16LodePNGColorModePKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14readChunk_tRNSP16LodePNGColorModePKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14readChunk_bKGDP11LodePNGInfoPKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14readChunk_tIMEP11LodePNGInfoPKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14readChunk_pHYsP11LodePNGInfoPKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14readChunk_gAMAP11LodePNGInfoPKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14readChunk_cHRMP11LodePNGInfoPKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14readChunk_sRGBP11LodePNGInfoPKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

attributes #0 = { 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 #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" }

!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, !9, i64 40}
!6 = !{!"_ZTS12LodePNGState", !7, i64 8, !13, i64 64, !16, i64 152, !19, i64 192, !9, i64 504}
!7 = !{!"_ZTS22LodePNGDecoderSettings", !8, i64 0, !9, i64 32, !9, i64 36, !9, i64 40, !9, i64 44, !9, i64 48, !9, i64 52}
!8 = !{!"_ZTS25LodePNGDecompressSettings", !9, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!"_ZTS22LodePNGEncoderSettings", !14, i64 0, !9, i64 48, !9, i64 52, !15, i64 56, !12, i64 64, !9, i64 72, !9, i64 76, !9, i64 80}
!14 = !{!"_ZTS23LodePNGCompressSettings", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !12, i64 24, !12, i64 32, !12, i64 40}
!15 = !{!"_ZTS21LodePNGFilterStrategy", !10, i64 0}
!16 = !{!"_ZTS16LodePNGColorMode", !17, i64 0, !9, i64 4, !12, i64 8, !18, i64 16, !9, i64 24, !9, i64 28, !9, i64 32, !9, i64 36}
!17 = !{!"_ZTS16LodePNGColorType", !10, i64 0}
!18 = !{!"long", !10, i64 0}
!19 = !{!"_ZTS11LodePNGInfo", !9, i64 0, !9, i64 4, !9, i64 8, !16, i64 16, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68, !18, i64 72, !12, i64 80, !12, i64 88, !18, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !9, i64 136, !20, i64 140, !9, i64 164, !9, i64 168, !9, i64 172, !9, i64 176, !9, i64 180, !9, i64 184, !9, i64 188, !9, i64 192, !9, i64 196, !9, i64 200, !9, i64 204, !9, i64 208, !9, i64 212, !9, i64 216, !9, i64 220, !9, i64 224, !9, i64 228, !9, i64 232, !12, i64 240, !12, i64 248, !9, i64 256, !10, i64 264, !10, i64 288}
!20 = !{!"_ZTS11LodePNGTime", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass