; LLVM IR from TheNachoBIT/GeoFenix-Engine :: Libraries/SOIL2/include (SOIL2)

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

@result_string_pointer = external dso_local global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @stbi_failure_reason() #0

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @SOIL_free_image_data(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @query_cubemap_capability() #0

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

21:                                               ; preds = %5
  store ptr @.str.17, ptr @result_string_pointer, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

22:                                               ; preds = %5
  %23 = load i32, ptr %11, align 4, !tbaa !9
  %24 = and i32 %23, 64
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %36

26:                                               ; preds = %22
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load i32, ptr %10, align 4, !tbaa !9
  %29 = load i32, ptr %11, align 4, !tbaa !9
  %30 = call i32 @SOIL_direct_load_DDS(ptr noundef %27, i32 noundef %28, i32 noundef %29, i32 noundef 1)
  store i32 %30, ptr %17, align 4, !tbaa !9
  %31 = load i32, ptr %17, align 4, !tbaa !9
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %35

33:                                               ; preds = %26
  %34 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %34, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

35:                                               ; preds = %26
  br label %36

36:                                               ; preds = %35, %22
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = and i32 %37, 1024
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %50

40:                                               ; preds = %36
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = load i32, ptr %11, align 4, !tbaa !9
  %44 = call i32 @SOIL_direct_load_PVR(ptr noundef %41, i32 noundef %42, i32 noundef %43, i32 noundef 1)
  store i32 %44, ptr %17, align 4, !tbaa !9
  %45 = load i32, ptr %17, align 4, !tbaa !9
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %49

47:                                               ; preds = %40
  %48 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %48, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

49:                                               ; preds = %40
  br label %50

50:                                               ; preds = %49, %36
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = and i32 %51, 2048
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

55:                                               ; preds = %50
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %109, %55
  %57 = load i32, ptr %16, align 4, !tbaa !9
  %58 = icmp slt i32 %57, 6
  br i1 %58, label %59, label %112

59:                                               ; preds = %56
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %60, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = sext i8 %64 to i32
  %66 = icmp ne i32 %65, 78
  br i1 %66, label %67, label %108

67:                                               ; preds = %59
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = load i32, ptr %16, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i8, ptr %68, i64 %70
  %72 = load i8, ptr %71, align 1, !tbaa !11
  %73 = sext i8 %72 to i32
  %74 = icmp ne i32 %73, 83
  br i1 %74, label %75, label %108

75:                                               ; preds = %67
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load i32, ptr %16, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %76, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = sext i8 %80 to i32
  %82 = icmp ne i32 %81, 87
  br i1 %82, label %83, label %108

83:                                               ; preds = %75
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = load i32, ptr %16, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i8, ptr %84, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = sext i8 %88 to i32
  %90 = icmp ne i32 %89, 69
  br i1 %90, label %91, label %108

91:                                               ; preds = %83
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load i32, ptr %16, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i8, ptr %92, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !11
  %97 = sext i8 %96 to i32
  %98 = icmp ne i32 %97, 85
  br i1 %98, label %99, label %108

99:                                               ; preds = %91
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = load i32, ptr %16, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i8, ptr %100, i64 %102
  %104 = load i8, ptr %103, align 1, !tbaa !11
  %105 = sext i8 %104 to i32
  %106 = icmp ne i32 %105, 68
  br i1 %106, label %107, label %108

107:                                              ; preds = %99
  store ptr @.str.18, ptr @result_string_pointer, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

108:                                              ; preds = %99, %91, %83, %75, %67, %59
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %16, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %16, align 4, !tbaa !9
  br label %56, !llvm.loop !12

112:                                              ; preds = %56
  %113 = call i32 @query_cubemap_capability()
  %114 = icmp ne i32 %113, 1
  br i1 %114, label %115, label %116

115:                                              ; preds = %112
  store ptr @.str.15, ptr @result_string_pointer, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

116:                                              ; preds = %112
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = call ptr @SOIL_load_image(ptr noundef %117, ptr noundef %13, ptr noundef %14, ptr noundef %15, i32 noundef %118)
  store ptr %119, ptr %12, align 8, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = icmp sge i32 %120, 1
  br i1 %121, label %122, label %127

122:                                              ; preds = %116
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = icmp sle i32 %123, 4
  br i1 %124, label %125, label %127

125:                                              ; preds = %122
  %126 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %126, ptr %15, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %125, %122, %116
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = icmp eq ptr null, %128
  br i1 %129, label %130, label %132

130:                                              ; preds = %127
  %131 = call ptr @stbi_failure_reason()
  store ptr %131, ptr @result_string_pointer, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

132:                                              ; preds = %127
  %133 = load i32, ptr %13, align 4, !tbaa !9
  %134 = load i32, ptr %14, align 4, !tbaa !9
  %135 = mul nsw i32 6, %134
  %136 = icmp ne i32 %133, %135
  br i1 %136, label %137, label %144

137:                                              ; preds = %132
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = mul nsw i32 6, %138
  %140 = load i32, ptr %14, align 4, !tbaa !9
  %141 = icmp ne i32 %139, %140
  br i1 %141, label %142, label %144

142:                                              ; preds = %137
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  call void @SOIL_free_image_data(ptr noundef %143)
  store ptr @.str.19, ptr @result_string_pointer, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

144:                                              ; preds = %137, %132
  %145 = load ptr, ptr %12, align 8, !tbaa !5
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = load i32, ptr %14, align 4, !tbaa !9
  %148 = load i32, ptr %15, align 4, !tbaa !9
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = load i32, ptr %10, align 4, !tbaa !9
  %151 = load i32, ptr %11, align 4, !tbaa !9
  %152 = call i32 @SOIL_create_OGL_single_cubemap(ptr noundef %145, i32 noundef %146, i32 noundef %147, i32 noundef %148, ptr noundef %149, i32 noundef %150, i32 noundef %151)
  store i32 %152, ptr %17, align 4, !tbaa !9
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  call void @SOIL_free_image_data(ptr noundef %153)
  %154 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %154, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %155

155:                                              ; preds = %144, %142, %130, %115, %107, %54, %47, %33, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  %156 = load i32, ptr %6, align 4
  ret i32 %156
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @SOIL_create_OGL_single_cubemap(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"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"

@result_string_pointer = external dso_local local_unnamed_addr global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @stbi_failure_reason() local_unnamed_addr #0

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @query_cubemap_capability() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @SOIL_load_OGL_single_cubemap(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #2
  %9 = icmp eq ptr %0, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %5
  store ptr @.str.17, ptr @result_string_pointer, align 8, !tbaa !5
  br label %53

11:                                               ; preds = %5
  %12 = and i32 %4, 64
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %15, label %13

13:                                               ; preds = %11
  %14 = tail call i32 @SOIL_direct_load_DDS(ptr noundef nonnull %0, i32 noundef %3, i32 noundef %4, i32 noundef 1)
  %.not50 = icmp eq i32 %14, 0
  br i1 %.not50, label %15, label %53

15:                                               ; preds = %13, %11
  %16 = and i32 %4, 1024
  %.not51 = icmp eq i32 %16, 0
  br i1 %.not51, label %19, label %17

17:                                               ; preds = %15
  %18 = tail call i32 @SOIL_direct_load_PVR(ptr noundef nonnull %0, i32 noundef %3, i32 noundef %4, i32 noundef 1)
  %.not52 = icmp eq i32 %18, 0
  br i1 %.not52, label %19, label %53

19:                                               ; preds = %17, %15
  %20 = and i32 %4, 2048
  %.not53 = icmp eq i32 %20, 0
  br i1 %.not53, label %.preheader.preheader, label %53

.preheader.preheader:                             ; preds = %19
  %21 = load i8, ptr %1, align 1, !tbaa !9
  switch i8 %21, label %22 [
    i8 78, label %.preheader.1
    i8 83, label %.preheader.1
    i8 87, label %.preheader.1
    i8 69, label %.preheader.1
    i8 85, label %.preheader.1
    i8 68, label %.preheader.1
  ]

22:                                               ; preds = %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  store ptr @.str.18, ptr @result_string_pointer, align 8, !tbaa !5
  br label %53

.preheader.1:                                     ; preds = %.preheader.preheader, %.preheader.preheader, %.preheader.preheader, %.preheader.preheader, %.preheader.preheader, %.preheader.preheader
  %23 = getelementptr inbounds i8, ptr %1, i64 1
  %24 = load i8, ptr %23, align 1, !tbaa !9
  switch i8 %24, label %22 [
    i8 78, label %.preheader.2
    i8 83, label %.preheader.2
    i8 87, label %.preheader.2
    i8 69, label %.preheader.2
    i8 85, label %.preheader.2
    i8 68, label %.preheader.2
  ]

.preheader.2:                                     ; preds = %.preheader.1, %.preheader.1, %.preheader.1, %.preheader.1, %.preheader.1, %.preheader.1
  %25 = getelementptr inbounds i8, ptr %1, i64 2
  %26 = load i8, ptr %25, align 1, !tbaa !9
  switch i8 %26, label %22 [
    i8 78, label %.preheader.3
    i8 83, label %.preheader.3
    i8 87, label %.preheader.3
    i8 69, label %.preheader.3
    i8 85, label %.preheader.3
    i8 68, label %.preheader.3
  ]

.preheader.3:                                     ; preds = %.preheader.2, %.preheader.2, %.preheader.2, %.preheader.2, %.preheader.2, %.preheader.2
  %27 = getelementptr inbounds i8, ptr %1, i64 3
  %28 = load i8, ptr %27, align 1, !tbaa !9
  switch i8 %28, label %22 [
    i8 78, label %.preheader.4
    i8 83, label %.preheader.4
    i8 87, label %.preheader.4
    i8 69, label %.preheader.4
    i8 85, label %.preheader.4
    i8 68, label %.preheader.4
  ]

.preheader.4:                                     ; preds = %.preheader.3, %.preheader.3, %.preheader.3, %.preheader.3, %.preheader.3, %.preheader.3
  %29 = getelementptr inbounds i8, ptr %1, i64 4
  %30 = load i8, ptr %29, align 1, !tbaa !9
  switch i8 %30, label %22 [
    i8 78, label %.preheader.5
    i8 83, label %.preheader.5
    i8 87, label %.preheader.5
    i8 69, label %.preheader.5
    i8 85, label %.preheader.5
    i8 68, label %.preheader.5
  ]

.preheader.5:                                     ; preds = %.preheader.4, %.preheader.4, %.preheader.4, %.preheader.4, %.preheader.4, %.preheader.4
  %31 = getelementptr inbounds i8, ptr %1, i64 5
  %32 = load i8, ptr %31, align 1, !tbaa !9
  switch i8 %32, label %22 [
    i8 78, label %33
    i8 83, label %33
    i8 87, label %33
    i8 69, label %33
    i8 85, label %33
    i8 68, label %33
  ]

33:                                               ; preds = %.preheader.5, %.preheader.5, %.preheader.5, %.preheader.5, %.preheader.5, %.preheader.5
  %34 = tail call i32 @query_cubemap_capability()
  %.not54 = icmp eq i32 %34, 1
  br i1 %.not54, label %36, label %35

35:                                               ; preds = %33
  store ptr @.str.15, ptr @result_string_pointer, align 8, !tbaa !5
  br label %53

36:                                               ; preds = %33
  %37 = call ptr @SOIL_load_image(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, i32 noundef %2)
  %38 = add i32 %2, -1
  %or.cond = icmp ult i32 %38, 4
  br i1 %or.cond, label %39, label %40

39:                                               ; preds = %36
  store i32 %2, ptr %8, align 4, !tbaa !10
  br label %40

40:                                               ; preds = %39, %36
  %41 = icmp eq ptr %37, null
  br i1 %41, label %42, label %44

42:                                               ; preds = %40
  %43 = call ptr @stbi_failure_reason()
  store ptr %43, ptr @result_string_pointer, align 8, !tbaa !5
  br label %53

44:                                               ; preds = %40
  %45 = load i32, ptr %6, align 4, !tbaa !10
  %46 = load i32, ptr %7, align 4, !tbaa !10
  %47 = mul nsw i32 %46, 6
  %.not55 = icmp eq i32 %45, %47
  %48 = mul nsw i32 %45, 6
  %.not56 = icmp eq i32 %48, %46
  %or.cond63 = select i1 %.not55, i1 true, i1 %.not56
  br i1 %or.cond63, label %50, label %49

49:                                               ; preds = %44
  call void @SOIL_free_image_data(ptr noundef nonnull %37)
  store ptr @.str.19, ptr @result_string_pointer, align 8, !tbaa !5
  br label %53

50:                                               ; preds = %44
  %51 = load i32, ptr %8, align 4, !tbaa !10
  %52 = call i32 @SOIL_create_OGL_single_cubemap(ptr noundef nonnull %37, i32 noundef %45, i32 noundef %46, i32 noundef %51, ptr noundef nonnull %1, i32 noundef %3, i32 noundef %4)
  call void @SOIL_free_image_data(ptr noundef nonnull %37)
  br label %53

53:                                               ; preds = %19, %17, %13, %50, %49, %42, %35, %22, %10
  %.042 = phi i32 [ 0, %10 ], [ 0, %22 ], [ 0, %35 ], [ 0, %42 ], [ 0, %49 ], [ %52, %50 ], [ %14, %13 ], [ %18, %17 ], [ 0, %19 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #2
  ret i32 %.042
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @SOIL_create_OGL_single_cubemap(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass