; LLVM IR from paroj/gltut :: glsdk/glimg/source (stb_image)

; 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.stbi_loader = type { ptr, ptr, ptr, ptr }

@loaders = external dso_local global [32 x ptr], align 16
@max_loaders = external hidden global i32, align 4
@.str.2 = external hidden unnamed_addr constant [19 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: nounwind uwtable
declare hidden i32 @e(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @stbi_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = call i32 @stbi_jpeg_test_file(ptr noundef %15)
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %25

18:                                               ; preds = %5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = load i32, ptr %11, align 4, !tbaa !9
  %24 = call ptr @stbi_jpeg_load_from_file(ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, i32 noundef %23)
  store ptr %24, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

25:                                               ; preds = %5
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = call i32 @stbi_png_test_file(ptr noundef %26)
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %36

29:                                               ; preds = %25
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = call ptr @stbi_png_load_from_file(ptr noundef %30, ptr noundef %31, ptr noundef %32, ptr noundef %33, i32 noundef %34)
  store ptr %35, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

36:                                               ; preds = %25
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = call i32 @stbi_bmp_test_file(ptr noundef %37)
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %47

40:                                               ; preds = %36
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = call ptr @stbi_bmp_load_from_file(ptr noundef %41, ptr noundef %42, ptr noundef %43, ptr noundef %44, i32 noundef %45)
  store ptr %46, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

47:                                               ; preds = %36
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call i32 @stbi_gif_test_file(ptr noundef %48)
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %58

51:                                               ; preds = %47
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = call ptr @stbi_gif_load_from_file(ptr noundef %52, ptr noundef %53, ptr noundef %54, ptr noundef %55, i32 noundef %56)
  store ptr %57, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

58:                                               ; preds = %47
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = call i32 @stbi_psd_test_file(ptr noundef %59)
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %69

62:                                               ; preds = %58
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = call ptr @stbi_psd_load_from_file(ptr noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef %66, i32 noundef %67)
  store ptr %68, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

69:                                               ; preds = %58
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = call i32 @stbi_pic_test_file(ptr noundef %70)
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %80

73:                                               ; preds = %69
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = call ptr @stbi_pic_load_from_file(ptr noundef %74, ptr noundef %75, ptr noundef %76, ptr noundef %77, i32 noundef %78)
  store ptr %79, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

80:                                               ; preds = %69
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = call i32 @stbi_hdr_test_file(ptr noundef %81)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %106

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #2
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = call ptr @stbi_hdr_load_from_file(ptr noundef %85, ptr noundef %86, ptr noundef %87, ptr noundef %88, i32 noundef %89)
  store ptr %90, ptr %14, align 8, !tbaa !5
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %84
  %99 = load i32, ptr %11, align 4, !tbaa !9
  br label %103

100:                                              ; preds = %84
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = load i32, ptr %101, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %100, %98
  %104 = phi i32 [ %99, %98 ], [ %102, %100 ]
  %105 = call ptr @hdr_to_ldr(ptr noundef %91, i32 noundef %93, i32 noundef %95, i32 noundef %104)
  store ptr %105, ptr %6, align 8
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #2
  br label %154

106:                                              ; preds = %80
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %135, %106
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = load i32, ptr @max_loaders, align 4, !tbaa !9
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %111, label %138

111:                                              ; preds = %107
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.stbi_loader, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = call i32 %117(ptr noundef %118)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %134

121:                                              ; preds = %111
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.stbi_loader, ptr %125, i32 0, i32 3
  %127 = load ptr, ptr %126, align 8, !tbaa !13
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = call ptr %127(ptr noundef %128, ptr noundef %129, ptr noundef %130, ptr noundef %131, i32 noundef %132)
  store ptr %133, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

134:                                              ; preds = %111
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %12, align 4, !tbaa !9
  br label %107, !llvm.loop !14

138:                                              ; preds = %107
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = call i32 @stbi_tga_test_file(ptr noundef %139)
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %149

142:                                              ; preds = %138
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = call ptr @stbi_tga_load_from_file(ptr noundef %143, ptr noundef %144, ptr noundef %145, ptr noundef %146, i32 noundef %147)
  store ptr %148, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

149:                                              ; preds = %138
  %150 = call i32 @e(ptr noundef @.str.2)
  %151 = icmp ne i32 %150, 0
  %152 = zext i1 %151 to i64
  %153 = select i1 %151, ptr null, ptr null
  store ptr %153, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %154

154:                                              ; preds = %149, %142, %121, %103, %73, %62, %51, %40, %29, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  %155 = load ptr, ptr %6, align 8
  ret ptr %155
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!12, !6, i64 24}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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

@loaders = external dso_local local_unnamed_addr global [32 x ptr], align 16
@max_loaders = external hidden local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @stbi_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = tail call i32 @stbi_jpeg_test_file(ptr noundef %0)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %9, label %7

7:                                                ; preds = %5
  %8 = tail call ptr @stbi_jpeg_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  br label %62

9:                                                ; preds = %5
  %10 = tail call i32 @stbi_png_test_file(ptr noundef %0)
  %.not66 = icmp eq i32 %10, 0
  br i1 %.not66, label %13, label %11

11:                                               ; preds = %9
  %12 = tail call ptr @stbi_png_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  br label %62

13:                                               ; preds = %9
  %14 = tail call i32 @stbi_bmp_test_file(ptr noundef %0)
  %.not67 = icmp eq i32 %14, 0
  br i1 %.not67, label %17, label %15

15:                                               ; preds = %13
  %16 = tail call ptr @stbi_bmp_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  br label %62

17:                                               ; preds = %13
  %18 = tail call i32 @stbi_gif_test_file(ptr noundef %0)
  %.not68 = icmp eq i32 %18, 0
  br i1 %.not68, label %21, label %19

19:                                               ; preds = %17
  %20 = tail call ptr @stbi_gif_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  br label %62

21:                                               ; preds = %17
  %22 = tail call i32 @stbi_psd_test_file(ptr noundef %0)
  %.not69 = icmp eq i32 %22, 0
  br i1 %.not69, label %25, label %23

23:                                               ; preds = %21
  %24 = tail call ptr @stbi_psd_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  br label %62

25:                                               ; preds = %21
  %26 = tail call i32 @stbi_pic_test_file(ptr noundef %0)
  %.not70 = icmp eq i32 %26, 0
  br i1 %.not70, label %29, label %27

27:                                               ; preds = %25
  %28 = tail call ptr @stbi_pic_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  br label %62

29:                                               ; preds = %25
  %30 = tail call i32 @stbi_hdr_test_file(ptr noundef %0)
  %.not71 = icmp eq i32 %30, 0
  br i1 %.not71, label %.preheader, label %33

.preheader:                                       ; preds = %29
  %31 = load i32, ptr @max_loaders, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph, label %._crit_edge

33:                                               ; preds = %29
  %34 = tail call ptr @stbi_hdr_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %.not74 = icmp eq i32 %4, 0
  br i1 %.not74, label %37, label %39

37:                                               ; preds = %33
  %38 = load i32, ptr %3, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %33, %37
  %40 = phi i32 [ %38, %37 ], [ %4, %33 ]
  %41 = tail call ptr @hdr_to_ldr(ptr noundef %34, i32 noundef %35, i32 noundef %36, i32 noundef %40)
  br label %62

42:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %43 = load i32, ptr @max_loaders, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv.next, %44
  br i1 %45, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader, %42
  %indvars.iv = phi i64 [ %indvars.iv.next, %42 ], [ 0, %.preheader ]
  %46 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %indvars.iv
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = tail call i32 %49(ptr noundef %0) #1
  %.not73 = icmp eq i32 %50, 0
  br i1 %.not73, label %42, label %51

51:                                               ; preds = %.lr.ph
  %52 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %indvars.iv
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds i8, ptr %53, i64 24
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = tail call ptr %55(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #1
  br label %62

._crit_edge:                                      ; preds = %42, %.preheader
  %57 = tail call i32 @stbi_tga_test_file(ptr noundef %0)
  %.not72 = icmp eq i32 %57, 0
  br i1 %.not72, label %60, label %58

58:                                               ; preds = %._crit_edge
  %59 = tail call ptr @stbi_tga_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  br label %62

60:                                               ; preds = %._crit_edge
  %61 = tail call i32 @e(ptr noundef nonnull @.str.2)
  br label %62

62:                                               ; preds = %60, %58, %51, %39, %27, %23, %19, %15, %11, %7
  %.0 = phi ptr [ %8, %7 ], [ %12, %11 ], [ %16, %15 ], [ %20, %19 ], [ %24, %23 ], [ %28, %27 ], [ %41, %39 ], [ %56, %51 ], [ %59, %58 ], [ null, %60 ]
  ret ptr %.0
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass