; 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
declare hidden ptr @hdr_to_ldr(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @stbi_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #1 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  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 i32 %5, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = load i32, ptr %9, align 4, !tbaa !9
  %19 = call i32 @stbi_jpeg_test_memory(ptr noundef %17, i32 noundef %18)
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %29

21:                                               ; preds = %6
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = load i32, ptr %9, align 4, !tbaa !9
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = load i32, ptr %13, align 4, !tbaa !9
  %28 = call ptr @stbi_jpeg_load_from_memory(ptr noundef %22, i32 noundef %23, ptr noundef %24, ptr noundef %25, ptr noundef %26, i32 noundef %27)
  store ptr %28, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %161

29:                                               ; preds = %6
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = call i32 @stbi_png_test_memory(ptr noundef %30, i32 noundef %31)
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %42

34:                                               ; preds = %29
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = call ptr @stbi_png_load_from_memory(ptr noundef %35, i32 noundef %36, ptr noundef %37, ptr noundef %38, ptr noundef %39, i32 noundef %40)
  store ptr %41, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %161

42:                                               ; preds = %29
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = call i32 @stbi_bmp_test_memory(ptr noundef %43, i32 noundef %44)
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %55

47:                                               ; preds = %42
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = call ptr @stbi_bmp_load_from_memory(ptr noundef %48, i32 noundef %49, ptr noundef %50, ptr noundef %51, ptr noundef %52, i32 noundef %53)
  store ptr %54, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %161

55:                                               ; preds = %42
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = call i32 @stbi_psd_test_memory(ptr noundef %56, i32 noundef %57)
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %68

60:                                               ; preds = %55
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = call ptr @stbi_psd_load_from_memory(ptr noundef %61, i32 noundef %62, ptr noundef %63, ptr noundef %64, ptr noundef %65, i32 noundef %66)
  store ptr %67, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %161

68:                                               ; preds = %55
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = call i32 @stbi_dds_test_memory(ptr noundef %69, i32 noundef %70)
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %81

73:                                               ; preds = %68
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = call ptr @stbi_dds_load_from_memory(ptr noundef %74, i32 noundef %75, ptr noundef %76, ptr noundef %77, ptr noundef %78, i32 noundef %79)
  store ptr %80, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %161

81:                                               ; preds = %68
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = call i32 @stbi_hdr_test_memory(ptr noundef %82, i32 noundef %83)
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %109

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #2
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load i32, ptr %9, align 4, !tbaa !9
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = call ptr @stbi_hdr_load_from_memory(ptr noundef %87, i32 noundef %88, ptr noundef %89, ptr noundef %90, ptr noundef %91, i32 noundef %92)
  store ptr %93, ptr %16, align 8, !tbaa !5
  %94 = load ptr, ptr %16, align 8, !tbaa !5
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %103

101:                                              ; preds = %86
  %102 = load i32, ptr %13, align 4, !tbaa !9
  br label %106

103:                                              ; preds = %86
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = load i32, ptr %104, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %103, %101
  %107 = phi i32 [ %102, %101 ], [ %105, %103 ]
  %108 = call ptr @hdr_to_ldr(ptr noundef %94, i32 noundef %96, i32 noundef %98, i32 noundef %107)
  store ptr %108, ptr %7, align 8
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #2
  br label %161

109:                                              ; preds = %81
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %140, %109
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = load i32, ptr @max_loaders, align 4, !tbaa !9
  %113 = icmp slt i32 %111, %112
  br i1 %113, label %114, label %143

114:                                              ; preds = %110
  %115 = load i32, ptr %14, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %116
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.stbi_loader, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !11
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load i32, ptr %9, align 4, !tbaa !9
  %123 = call i32 %120(ptr noundef %121, i32 noundef %122)
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %139

125:                                              ; preds = %114
  %126 = load i32, ptr %14, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.stbi_loader, ptr %129, i32 0, i32 1
  %131 = load ptr, ptr %130, align 8, !tbaa !13
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = load i32, ptr %9, align 4, !tbaa !9
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  %137 = load i32, ptr %13, align 4, !tbaa !9
  %138 = call ptr %131(ptr noundef %132, i32 noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136, i32 noundef %137)
  store ptr %138, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %161

139:                                              ; preds = %114
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %14, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %14, align 4, !tbaa !9
  br label %110, !llvm.loop !14

143:                                              ; preds = %110
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = load i32, ptr %9, align 4, !tbaa !9
  %146 = call i32 @stbi_tga_test_memory(ptr noundef %144, i32 noundef %145)
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %156

148:                                              ; preds = %143
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = load i32, ptr %9, align 4, !tbaa !9
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = load i32, ptr %13, align 4, !tbaa !9
  %155 = call ptr @stbi_tga_load_from_memory(ptr noundef %149, i32 noundef %150, ptr noundef %151, ptr noundef %152, ptr noundef %153, i32 noundef %154)
  store ptr %155, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %161

156:                                              ; preds = %143
  %157 = call i32 @e(ptr noundef @.str.2)
  %158 = icmp ne i32 %157, 0
  %159 = zext i1 %158 to i64
  %160 = select i1 %158, ptr null, ptr null
  store ptr %160, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %161

161:                                              ; preds = %156, %148, %125, %106, %73, %60, %47, %34, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  %162 = load ptr, ptr %7, align 8
  ret ptr %162
}

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @stbi_tga_load_from_memory(ptr noundef, i32 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 0}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!12, !6, i64 8}
!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
declare hidden ptr @hdr_to_ldr(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @stbi_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #0 {
  %7 = tail call i32 @stbi_jpeg_test_memory(ptr noundef %0, i32 noundef %1)
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %10, label %8

8:                                                ; preds = %6
  %9 = tail call ptr @stbi_jpeg_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5)
  br label %58

10:                                               ; preds = %6
  %11 = tail call i32 @stbi_png_test_memory(ptr noundef %0, i32 noundef %1)
  %.not76 = icmp eq i32 %11, 0
  br i1 %.not76, label %14, label %12

12:                                               ; preds = %10
  %13 = tail call ptr @stbi_png_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5)
  br label %58

14:                                               ; preds = %10
  %15 = tail call i32 @stbi_bmp_test_memory(ptr noundef %0, i32 noundef %1)
  %.not77 = icmp eq i32 %15, 0
  br i1 %.not77, label %18, label %16

16:                                               ; preds = %14
  %17 = tail call ptr @stbi_bmp_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5)
  br label %58

18:                                               ; preds = %14
  %19 = tail call i32 @stbi_psd_test_memory(ptr noundef %0, i32 noundef %1)
  %.not78 = icmp eq i32 %19, 0
  br i1 %.not78, label %22, label %20

20:                                               ; preds = %18
  %21 = tail call ptr @stbi_psd_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5)
  br label %58

22:                                               ; preds = %18
  %23 = tail call i32 @stbi_dds_test_memory(ptr noundef %0, i32 noundef %1)
  %.not79 = icmp eq i32 %23, 0
  br i1 %.not79, label %26, label %24

24:                                               ; preds = %22
  %25 = tail call ptr @stbi_dds_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5)
  br label %58

26:                                               ; preds = %22
  %27 = tail call i32 @stbi_hdr_test_memory(ptr noundef %0, i32 noundef %1)
  %.not80 = icmp eq i32 %27, 0
  br i1 %.not80, label %.preheader, label %30

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

30:                                               ; preds = %26
  %31 = tail call ptr @stbi_hdr_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5)
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %.not83 = icmp eq i32 %5, 0
  br i1 %.not83, label %34, label %36

34:                                               ; preds = %30
  %35 = load i32, ptr %4, align 4, !tbaa !5
  br label %36

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

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

.lr.ph:                                           ; preds = %.preheader, %39
  %indvars.iv = phi i64 [ %indvars.iv.next, %39 ], [ 0, %.preheader ]
  %43 = getelementptr inbounds [32 x ptr], ptr @loaders, i64 0, i64 %indvars.iv
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = tail call i32 %45(ptr noundef %0, i32 noundef %1) #1
  %.not82 = icmp eq i32 %46, 0
  br i1 %.not82, label %39, 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 8
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = tail call ptr %51(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #1
  br label %58

._crit_edge:                                      ; preds = %39, %.preheader
  %53 = tail call i32 @stbi_tga_test_memory(ptr noundef %0, i32 noundef %1)
  %.not81 = icmp eq i32 %53, 0
  br i1 %.not81, label %56, label %54

54:                                               ; preds = %._crit_edge
  %55 = tail call ptr @stbi_tga_load_from_memory(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5)
  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, %36, %24, %20, %16, %12, %8
  %.0 = phi ptr [ %9, %8 ], [ %13, %12 ], [ %17, %16 ], [ %21, %20 ], [ %25, %24 ], [ %38, %36 ], [ %52, %47 ], [ %55, %54 ], [ null, %56 ]
  ret ptr %.0
}

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @stbi_tga_load_from_memory(ptr noundef, i32 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 0}
!14 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!15 = !{!14, !12, i64 8}


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