; LLVM IR from steps3d/graphics-book :: Code/Libs/SOIL (stb_image_aug)

; 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 [40 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 %143

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 %143

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 %143

47:                                               ; preds = %36
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call i32 @stbi_psd_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_psd_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 %143

58:                                               ; preds = %47
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = call i32 @stbi_dds_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_dds_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 %143

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

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #2
  %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_hdr_load_from_file(ptr noundef %74, ptr noundef %75, ptr noundef %76, ptr noundef %77, i32 noundef %78)
  store ptr %79, ptr %14, align 8, !tbaa !5
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %89

87:                                               ; preds = %73
  %88 = load i32, ptr %11, align 4, !tbaa !9
  br label %92

89:                                               ; preds = %73
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = load i32, ptr %90, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %89, %87
  %93 = phi i32 [ %88, %87 ], [ %91, %89 ]
  %94 = call ptr @hdr_to_ldr(ptr noundef %80, i32 noundef %82, i32 noundef %84, i32 noundef %93)
  store ptr %94, ptr %6, align 8
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #2
  br label %143

95:                                               ; preds = %69
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %124, %95
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = load i32, ptr @max_loaders, align 4, !tbaa !9
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %100, label %127

100:                                              ; preds = %96
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.stbi_loader, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !11
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = call i32 %106(ptr noundef %107)
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %123

110:                                              ; preds = %100
  %111 = load i32, ptr %12, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.stbi_loader, ptr %114, i32 0, i32 3
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = call ptr %116(ptr noundef %117, ptr noundef %118, ptr noundef %119, ptr noundef %120, i32 noundef %121)
  store ptr %122, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %143

123:                                              ; preds = %100
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %12, align 4, !tbaa !9
  br label %96, !llvm.loop !14

127:                                              ; preds = %96
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = call i32 @stbi_tga_test_file(ptr noundef %128)
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %138

131:                                              ; preds = %127
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = load i32, ptr %11, align 4, !tbaa !9
  %137 = call ptr @stbi_tga_load_from_file(ptr noundef %132, ptr noundef %133, ptr noundef %134, ptr noundef %135, i32 noundef %136)
  store ptr %137, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %143

138:                                              ; preds = %127
  %139 = call i32 @e(ptr noundef @.str.2)
  %140 = icmp ne i32 %139, 0
  %141 = zext i1 %140 to i64
  %142 = select i1 %140, ptr null, ptr null
  store ptr %142, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %143

143:                                              ; preds = %138, %131, %110, %92, %62, %51, %40, %29, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  %144 = load ptr, ptr %6, align 8
  ret ptr %144
}

; 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_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_dds_test_file(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @stbi_dds_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 [40 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 %58

9:                                                ; preds = %5
  %10 = tail call i32 @stbi_png_test_file(ptr noundef %0)
  %.not60 = icmp eq i32 %10, 0
  br i1 %.not60, 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 %58

13:                                               ; preds = %9
  %14 = tail call i32 @stbi_bmp_test_file(ptr noundef %0)
  %.not61 = icmp eq i32 %14, 0
  br i1 %.not61, 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 %58

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

19:                                               ; preds = %17
  %20 = 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 %58

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

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

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

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

29:                                               ; preds = %25
  %30 = tail call ptr @stbi_hdr_load_from_file(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4)
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %.not67 = icmp eq i32 %4, 0
  br i1 %.not67, label %33, label %35

33:                                               ; preds = %29
  %34 = load i32, ptr %3, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %29, %33
  %36 = phi i32 [ %34, %33 ], [ %4, %29 ]
  %37 = tail call ptr @hdr_to_ldr(ptr noundef %30, i32 noundef %31, i32 noundef %32, i32 noundef %36)
  br label %58

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

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

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

._crit_edge:                                      ; preds = %38, %.preheader
  %53 = tail call i32 @stbi_tga_test_file(ptr noundef %0)
  %.not65 = icmp eq i32 %53, 0
  br i1 %.not65, label %56, label %54

54:                                               ; preds = %._crit_edge
  %55 = 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 %58

56:                                               ; preds = %._crit_edge
  %57 = tail call i32 @e(ptr noundef nonnull @.str.2)
  br label %58

58:                                               ; preds = %56, %54, %47, %35, %23, %19, %15, %11, %7
  %.0 = phi ptr [ %8, %7 ], [ %12, %11 ], [ %16, %15 ], [ %20, %19 ], [ %24, %23 ], [ %37, %35 ], [ %52, %47 ], [ %55, %54 ], [ null, %56 ]
  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_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_dds_test_file(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @stbi_dds_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