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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL14lodepng_mallocm(i64 noundef) #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 nounwind uwtable
declare hidden void @_ZL12lodepng_freePv(ptr noundef) #1

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z14lodepng_decodePPhPjS1_P12LodePNGStatePKhm(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 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 ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = 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 ptr %4, ptr %12, align 8, !tbaa !5
  store i64 %5, ptr %13, align 8, !tbaa !9
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr null, ptr %17, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  %21 = load ptr, ptr %11, align 8, !tbaa !5
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  %23 = load i64, ptr %13, align 8, !tbaa !9
  call void @_ZL13decodeGenericPPhPjS1_P12LodePNGStatePKhm(ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, i64 noundef %23)
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.LodePNGState, ptr %24, i32 0, i32 5
  %26 = load i32, ptr %25, align 8, !tbaa !11
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %32

28:                                               ; preds = %6
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.LodePNGState, ptr %29, i32 0, i32 5
  %31 = load i32, ptr %30, align 8, !tbaa !11
  store i32 %31, ptr %7, align 4
  br label %134

32:                                               ; preds = %6
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.LodePNGState, ptr %33, i32 0, i32 1
  %35 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %34, i32 0, i32 4
  %36 = load i32, ptr %35, align 4, !tbaa !23
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %46

38:                                               ; preds = %32
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.LodePNGState, ptr %39, i32 0, i32 3
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.LodePNGState, ptr %41, i32 0, i32 4
  %43 = getelementptr inbounds %struct.LodePNGInfo, ptr %42, i32 0, i32 3
  %44 = call noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef %40, ptr noundef %43)
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %71

46:                                               ; preds = %38, %32
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.LodePNGState, ptr %47, i32 0, i32 1
  %49 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %48, i32 0, i32 4
  %50 = load i32, ptr %49, align 4, !tbaa !23
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %70, label %52

52:                                               ; preds = %46
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.LodePNGState, ptr %53, i32 0, i32 3
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.LodePNGState, ptr %55, i32 0, i32 4
  %57 = getelementptr inbounds %struct.LodePNGInfo, ptr %56, i32 0, i32 3
  %58 = call noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef %54, ptr noundef %57)
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.LodePNGState, ptr %59, i32 0, i32 5
  store i32 %58, ptr %60, align 8, !tbaa !11
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.LodePNGState, ptr %61, i32 0, i32 5
  %63 = load i32, ptr %62, align 8, !tbaa !11
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %69

65:                                               ; preds = %52
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.LodePNGState, ptr %66, i32 0, i32 5
  %68 = load i32, ptr %67, align 8, !tbaa !11
  store i32 %68, ptr %7, align 4
  br label %134

69:                                               ; preds = %52
  br label %70

70:                                               ; preds = %69, %46
  br label %130

71:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  store ptr %73, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.LodePNGState, ptr %74, i32 0, i32 3
  %76 = getelementptr inbounds %struct.LodePNGColorMode, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !24
  %78 = icmp eq i32 %77, 2
  br i1 %78, label %92, label %79

79:                                               ; preds = %71
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.LodePNGState, ptr %80, i32 0, i32 3
  %82 = getelementptr inbounds %struct.LodePNGColorMode, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !24
  %84 = icmp eq i32 %83, 6
  br i1 %84, label %92, label %85

85:                                               ; preds = %79
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.LodePNGState, ptr %86, i32 0, i32 3
  %88 = getelementptr inbounds %struct.LodePNGColorMode, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !25
  %90 = icmp eq i32 %89, 8
  br i1 %90, label %92, label %91

91:                                               ; preds = %85
  store i32 56, ptr %7, align 4
  store i32 1, ptr %16, align 4
  br label %127

92:                                               ; preds = %85, %79, %71
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = load i32, ptr %93, align 4, !tbaa !26
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = load i32, ptr %95, align 4, !tbaa !26
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.LodePNGState, ptr %97, i32 0, i32 3
  %99 = call noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %94, i32 noundef %96, ptr noundef %98)
  store i64 %99, ptr %15, align 8, !tbaa !9
  %100 = load i64, ptr %15, align 8, !tbaa !9
  %101 = call noundef ptr @_ZL14lodepng_mallocm(i64 noundef %100)
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %101, ptr %102, align 8, !tbaa !5
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = icmp ne ptr %104, null
  br i1 %105, label %109, label %106

106:                                              ; preds = %92
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.LodePNGState, ptr %107, i32 0, i32 5
  store i32 83, ptr %108, align 8, !tbaa !11
  br label %125

109:                                              ; preds = %92
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.LodePNGState, ptr %113, i32 0, i32 3
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.LodePNGState, ptr %115, i32 0, i32 4
  %117 = getelementptr inbounds %struct.LodePNGInfo, ptr %116, i32 0, i32 3
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = load i32, ptr %118, align 4, !tbaa !26
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = load i32, ptr %120, align 4, !tbaa !26
  %122 = call noundef i32 @_Z15lodepng_convertPhPKhPK16LodePNGColorModeS4_jj(ptr noundef %111, ptr noundef %112, ptr noundef %114, ptr noundef %117, i32 noundef %119, i32 noundef %121)
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.LodePNGState, ptr %123, i32 0, i32 5
  store i32 %122, ptr %124, align 8, !tbaa !11
  br label %125

125:                                              ; preds = %109, %106
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZL12lodepng_freePv(ptr noundef %126)
  store i32 0, ptr %16, align 4
  br label %127

127:                                              ; preds = %125, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %128 = load i32, ptr %16, align 4
  switch i32 %128, label %136 [
    i32 0, label %129
    i32 1, label %134
  ]

129:                                              ; preds = %127
  br label %130

130:                                              ; preds = %129, %70
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.LodePNGState, ptr %131, i32 0, i32 5
  %133 = load i32, ptr %132, align 8, !tbaa !11
  store i32 %133, ptr %7, align 4
  br label %134

134:                                              ; preds = %130, %127, %65, %28
  %135 = load i32, ptr %7, align 4
  ret i32 %135

136:                                              ; preds = %127
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13decodeGenericPPhPjS1_P12LodePNGStatePKhm(ptr noundef, ptr noundef, 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, !15, i64 504}
!12 = !{!"_ZTS12LodePNGState", !13, i64 8, !16, i64 64, !19, i64 152, !21, i64 192, !15, i64 504}
!13 = !{!"_ZTS22LodePNGDecoderSettings", !14, i64 0, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !15, i64 52}
!14 = !{!"_ZTS25LodePNGDecompressSettings", !15, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS22LodePNGEncoderSettings", !17, i64 0, !15, i64 48, !15, i64 52, !18, i64 56, !6, i64 64, !15, i64 72, !15, i64 76, !15, i64 80}
!17 = !{!"_ZTS23LodePNGCompressSettings", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!19 = !{!"_ZTS16LodePNGColorMode", !20, i64 0, !15, i64 4, !6, i64 8, !10, i64 16, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36}
!20 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!21 = !{!"_ZTS11LodePNGInfo", !15, i64 0, !15, i64 4, !15, i64 8, !19, i64 16, !15, i64 56, !15, i64 60, !15, i64 64, !15, 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, !15, i64 136, !22, i64 140, !15, i64 164, !15, i64 168, !15, i64 172, !15, i64 176, !15, i64 180, !15, i64 184, !15, i64 188, !15, i64 192, !15, i64 196, !15, i64 200, !15, i64 204, !15, i64 208, !15, i64 212, !15, i64 216, !15, i64 220, !15, i64 224, !15, i64 228, !15, i64 232, !6, i64 240, !6, i64 248, !15, i64 256, !7, i64 264, !7, i64 288}
!22 = !{!"_ZTS11LodePNGTime", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20}
!23 = !{!12, !15, i64 52}
!24 = !{!12, !20, i64 152}
!25 = !{!12, !15, i64 156}
!26 = !{!15, !15, i64 0}


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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef, ptr noundef) local_unnamed_addr #1

; 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
declare dso_local noundef i32 @_Z15lodepng_convertPhPKhPK16LodePNGColorModeS4_jj(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z14lodepng_decodePPhPjS1_P12LodePNGStatePKhm(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5) local_unnamed_addr #1 {
  store ptr null, ptr %0, align 8, !tbaa !5
  tail call void @_ZL13decodeGenericPPhPjS1_P12LodePNGStatePKhm(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5)
  %7 = getelementptr inbounds i8, ptr %3, i64 504
  %8 = load i32, ptr %7, align 8, !tbaa !9
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %38

9:                                                ; preds = %6
  %10 = getelementptr inbounds i8, ptr %3, i64 52
  %11 = load i32, ptr %10, align 4, !tbaa !22
  %.not44 = icmp eq i32 %11, 0
  br i1 %.not44, label %.thread, label %12

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %3, i64 152
  %14 = getelementptr inbounds i8, ptr %3, i64 208
  %15 = tail call noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef nonnull %13, ptr noundef nonnull %14)
  %.not45 = icmp eq i32 %15, 0
  br i1 %.not45, label %20, label %16

16:                                               ; preds = %12
  %.pr = load i32, ptr %10, align 4, !tbaa !22
  %.not47 = icmp eq i32 %.pr, 0
  br i1 %.not47, label %.thread, label %36

.thread:                                          ; preds = %9, %16
  %17 = getelementptr inbounds i8, ptr %3, i64 152
  %18 = getelementptr inbounds i8, ptr %3, i64 208
  %19 = tail call noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef nonnull %17, ptr noundef nonnull %18)
  store i32 %19, ptr %7, align 8, !tbaa !9
  %.not48 = icmp eq i32 %19, 0
  br i1 %.not48, label %36, label %38

20:                                               ; preds = %12
  %21 = load ptr, ptr %0, align 8, !tbaa !5
  %22 = load i32, ptr %13, align 8, !tbaa !23
  switch i32 %22, label %23 [
    i32 2, label %27
    i32 6, label %27
  ]

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %3, i64 156
  %25 = load i32, ptr %24, align 4, !tbaa !24
  %26 = icmp eq i32 %25, 8
  br i1 %26, label %27, label %38

27:                                               ; preds = %20, %20, %23
  %28 = load i32, ptr %1, align 4, !tbaa !25
  %29 = load i32, ptr %2, align 4, !tbaa !25
  %30 = tail call noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %28, i32 noundef %29, ptr noundef nonnull %13)
  %31 = tail call noundef ptr @_ZL14lodepng_mallocm(i64 noundef %30)
  store ptr %31, ptr %0, align 8, !tbaa !5
  %.not46 = icmp eq ptr %31, null
  br i1 %.not46, label %.thread50, label %32

32:                                               ; preds = %27
  %33 = load i32, ptr %1, align 4, !tbaa !25
  %34 = load i32, ptr %2, align 4, !tbaa !25
  %35 = tail call noundef i32 @_Z15lodepng_convertPhPKhPK16LodePNGColorModeS4_jj(ptr noundef nonnull %31, ptr noundef %21, ptr noundef nonnull %13, ptr noundef nonnull %14, i32 noundef %33, i32 noundef %34)
  br label %.thread50

.thread50:                                        ; preds = %32, %27
  %storemerge = phi i32 [ %35, %32 ], [ 83, %27 ]
  store i32 %storemerge, ptr %7, align 8, !tbaa !9
  tail call void @_ZL12lodepng_freePv(ptr noundef %21)
  br label %36

36:                                               ; preds = %.thread50, %16, %.thread
  %37 = load i32, ptr %7, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %23, %.thread, %6, %36
  %.1 = phi i32 [ %37, %36 ], [ %8, %6 ], [ %19, %.thread ], [ 56, %23 ]
  ret i32 %.1
}

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


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