; LLVM IR from yettabaa/cub3D :: bonus (utils_bonus)

; 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.s_data = type { double, double, double, double, double, double, double, double, double, double, i32, double, double, ptr, %struct.s_sprites, %struct.s_minimap, %struct.s_door, %struct.s_textures, %struct.s_hook, %struct.s_map_result, %struct.s_rycast, %struct.s_mlx, ptr }
%struct.s_sprites = type { ptr, i32, i32, i32, i32, i32, i32 }
%struct.s_minimap = type { double, double, double, double, double }
%struct.s_door = type { ptr, i32, i32, i32 }
%struct.s_textures = type { i32, ptr, i32, i32, i32, ptr, i32, i32, i32, ptr, i32, i32, i32, ptr, i32, i32, i32, ptr, i32, i32, i32 }
%struct.s_hook = type { double, i32, double, double, double }
%struct.s_map_result = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i8 }
%struct.s_rycast = type { double, double, double, double, double, double, double, double, double }
%struct.s_mlx = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 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: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

declare void @my_exit(ptr noundef, ptr noundef, i32 noundef) #2

; 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
define dso_local void @checker_bonus(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 -1, ptr %3, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.s_data, ptr %6, i32 0, i32 14
  %8 = getelementptr inbounds %struct.s_sprites, ptr %7, i32 0, i32 4
  %9 = load i32, ptr %8, align 4, !tbaa !11
  %10 = icmp ne i32 %9, 0
  br i1 %10, label %11, label %28

11:                                               ; preds = %1
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.s_data, ptr %12, i32 0, i32 14
  %14 = getelementptr inbounds %struct.s_sprites, ptr %13, i32 0, i32 4
  %15 = load i32, ptr %14, align 4, !tbaa !11
  %16 = sext i32 %15 to i64
  %17 = mul i64 24, %16
  %18 = call noalias ptr @malloc(i64 noundef %17) #5
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.s_data, ptr %19, i32 0, i32 13
  store ptr %18, ptr %20, align 8, !tbaa !22
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.s_data, ptr %21, i32 0, i32 13
  %23 = load ptr, ptr %22, align 8, !tbaa !22
  %24 = icmp ne ptr %23, null
  br i1 %24, label %27, label %25

25:                                               ; preds = %11
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  call void @my_exit(ptr noundef %26, ptr noundef @.str.1, i32 noundef 1)
  br label %27

27:                                               ; preds = %25, %11
  br label %28

28:                                               ; preds = %27, %1
  br label %29

29:                                               ; preds = %178, %28
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.s_data, ptr %30, i32 0, i32 19
  %32 = getelementptr inbounds %struct.s_map_result, ptr %31, i32 0, i32 7
  %33 = load ptr, ptr %32, align 8, !tbaa !23
  %34 = load i32, ptr %3, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %3, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %33, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %179

40:                                               ; preds = %29
  store i32 -1, ptr %4, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %175, %40
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.s_data, ptr %42, i32 0, i32 19
  %44 = getelementptr inbounds %struct.s_map_result, ptr %43, i32 0, i32 7
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds ptr, ptr %45, i64 %47
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = load i32, ptr %4, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %4, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %49, i64 %52
  %54 = load i8, ptr %53, align 1, !tbaa !24
  %55 = icmp ne i8 %54, 0
  br i1 %55, label %56, label %178

56:                                               ; preds = %41
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.s_data, ptr %57, i32 0, i32 19
  %59 = getelementptr inbounds %struct.s_map_result, ptr %58, i32 0, i32 7
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = load i32, ptr %3, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %60, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = load i32, ptr %4, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i8, ptr %64, i64 %66
  %68 = load i8, ptr %67, align 1, !tbaa !24
  %69 = sext i8 %68 to i32
  %70 = icmp eq i32 %69, 50
  br i1 %70, label %71, label %152

71:                                               ; preds = %56
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.s_data, ptr %72, i32 0, i32 19
  %74 = getelementptr inbounds %struct.s_map_result, ptr %73, i32 0, i32 7
  %75 = load ptr, ptr %74, align 8, !tbaa !23
  %76 = load i32, ptr %3, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %75, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load i32, ptr %4, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i8, ptr %80, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !24
  %85 = sext i8 %84 to i32
  %86 = icmp ne i32 %85, 49
  br i1 %86, label %103, label %87

87:                                               ; preds = %71
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.s_data, ptr %88, i32 0, i32 19
  %90 = getelementptr inbounds %struct.s_map_result, ptr %89, i32 0, i32 7
  %91 = load ptr, ptr %90, align 8, !tbaa !23
  %92 = load i32, ptr %3, align 4, !tbaa !9
  %93 = sub nsw i32 %92, 1
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %91, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i32, ptr %4, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i8, ptr %96, i64 %98
  %100 = load i8, ptr %99, align 1, !tbaa !24
  %101 = sext i8 %100 to i32
  %102 = icmp ne i32 %101, 49
  br i1 %102, label %103, label %152

103:                                              ; preds = %87, %71
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.s_data, ptr %104, i32 0, i32 19
  %106 = getelementptr inbounds %struct.s_map_result, ptr %105, i32 0, i32 7
  %107 = load ptr, ptr %106, align 8, !tbaa !23
  %108 = load i32, ptr %3, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds ptr, ptr %107, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = load i32, ptr %4, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i8, ptr %111, i64 %113
  %115 = load i8, ptr %114, align 1, !tbaa !24
  %116 = sext i8 %115 to i32
  %117 = icmp eq i32 %116, 50
  br i1 %117, label %118, label %152

118:                                              ; preds = %103
  %119 = load ptr, ptr %2, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.s_data, ptr %119, i32 0, i32 19
  %121 = getelementptr inbounds %struct.s_map_result, ptr %120, i32 0, i32 7
  %122 = load ptr, ptr %121, align 8, !tbaa !23
  %123 = load i32, ptr %3, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds ptr, ptr %122, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = load i32, ptr %4, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %126, i64 %129
  %131 = load i8, ptr %130, align 1, !tbaa !24
  %132 = sext i8 %131 to i32
  %133 = icmp ne i32 %132, 49
  br i1 %133, label %150, label %134

134:                                              ; preds = %118
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.s_data, ptr %135, i32 0, i32 19
  %137 = getelementptr inbounds %struct.s_map_result, ptr %136, i32 0, i32 7
  %138 = load ptr, ptr %137, align 8, !tbaa !23
  %139 = load i32, ptr %3, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds ptr, ptr %138, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = load i32, ptr %4, align 4, !tbaa !9
  %144 = sub nsw i32 %143, 1
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %142, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !24
  %148 = sext i8 %147 to i32
  %149 = icmp ne i32 %148, 49
  br i1 %149, label %150, label %152

150:                                              ; preds = %134, %118
  %151 = load ptr, ptr %2, align 8, !tbaa !5
  call void @my_exit(ptr noundef %151, ptr noundef @.str.2, i32 noundef 1)
  br label %152

152:                                              ; preds = %150, %134, %103, %87, %56
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.s_data, ptr %153, i32 0, i32 19
  %155 = getelementptr inbounds %struct.s_map_result, ptr %154, i32 0, i32 7
  %156 = load ptr, ptr %155, align 8, !tbaa !23
  %157 = load i32, ptr %3, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds ptr, ptr %156, i64 %158
  %160 = load ptr, ptr %159, align 8, !tbaa !5
  %161 = load i32, ptr %4, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %160, i64 %162
  %164 = load i8, ptr %163, align 1, !tbaa !24
  %165 = sext i8 %164 to i32
  %166 = icmp eq i32 %165, 51
  br i1 %166, label %167, label %175

167:                                              ; preds = %152
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = load i32, ptr %5, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %5, align 4, !tbaa !9
  %171 = load i32, ptr %4, align 4, !tbaa !9
  %172 = load i32, ptr %3, align 4, !tbaa !9
  %173 = call i32 @_sprites(ptr noundef %168, i32 noundef %169, i32 noundef %171, i32 noundef %172)
  %174 = icmp ne i32 %173, 0
  br label %175

175:                                              ; preds = %167, %152
  %176 = phi i1 [ false, %152 ], [ %174, %167 ]
  %177 = zext i1 %176 to i32
  br label %41, !llvm.loop !25

178:                                              ; preds = %41
  br label %29, !llvm.loop !27

179:                                              ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret void
}

declare i32 @_sprites(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind 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 #4 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

!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, !10, i64 132}
!12 = !{!"s_data", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !10, i64 80, !13, i64 88, !13, i64 96, !6, i64 104, !14, i64 112, !15, i64 144, !16, i64 184, !17, i64 208, !18, i64 336, !19, i64 376, !20, i64 456, !21, i64 528, !6, i64 584}
!13 = !{!"double", !7, i64 0}
!14 = !{!"s_sprites", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!15 = !{!"s_minimap", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!16 = !{!"s_door", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!17 = !{!"s_textures", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !6, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !6, i64 104, !10, i64 112, !10, i64 116, !10, i64 120}
!18 = !{!"s_hook", !13, i64 0, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!19 = !{!"s_map_result", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !7, i64 72}
!20 = !{!"s_rycast", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64}
!21 = !{!"s_mlx", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48}
!22 = !{!12, !6, i64 104}
!23 = !{!12, !6, i64 424}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}


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

@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

declare void @my_exit(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @checker_bonus(ptr noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 132
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %10, label %4

4:                                                ; preds = %1
  %5 = sext i32 %3 to i64
  %6 = mul nsw i64 %5, 24
  %7 = tail call noalias ptr @malloc(i64 noundef %6) #3
  %8 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %7, ptr %8, align 8, !tbaa !20
  %.not39 = icmp eq ptr %7, null
  br i1 %.not39, label %9, label %10

9:                                                ; preds = %4
  tail call void @my_exit(ptr noundef nonnull %0, ptr noundef nonnull @.str.1, i32 noundef 1) #4
  br label %10

10:                                               ; preds = %4, %9, %1
  %11 = getelementptr inbounds i8, ptr %0, i64 424
  %12 = load ptr, ptr %11, align 8, !tbaa !21
  %13 = load ptr, ptr %12, align 8, !tbaa !22
  %.not4046 = icmp eq ptr %13, null
  br i1 %.not4046, label %._crit_edge, label %.preheader

.loopexit:                                        ; preds = %.thread.outer, %.thread
  %.lcssa73 = phi ptr [ %.pre60.ph, %.thread ], [ %.ph, %.thread.outer ]
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %14 = getelementptr inbounds ptr, ptr %.lcssa73, i64 %indvars.iv.next51
  %15 = load ptr, ptr %14, align 8, !tbaa !22
  %.not40 = icmp eq ptr %15, null
  %indvars.iv.next53 = add nsw i64 %indvars.iv52, 1
  br i1 %.not40, label %._crit_edge, label %.preheader

.preheader:                                       ; preds = %10, %.loopexit
  %.pre58 = phi ptr [ %.pre60.ph, %.loopexit ], [ %12, %10 ]
  %16 = phi ptr [ %.lcssa73, %.loopexit ], [ %12, %10 ]
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %.loopexit ], [ -1, %10 ]
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %.loopexit ], [ 0, %10 ]
  %.048 = phi i32 [ %.1.ph.ph, %.loopexit ], [ 0, %10 ]
  %17 = trunc nuw nsw i64 %indvars.iv50 to i32
  br label %.thread.outer.outer

.thread.outer.outer:                              ; preds = %.preheader, %60
  %.pre60.ph.ph = phi ptr [ %.pre58, %.preheader ], [ %.pre.pre, %60 ]
  %.ph.ph = phi ptr [ %16, %.preheader ], [ %.pre.pre, %60 ]
  %indvars.iv.ph.ph = phi i64 [ -1, %.preheader ], [ %indvars.iv.next71, %60 ]
  %.1.ph.ph = phi i32 [ %.048, %.preheader ], [ %61, %60 ]
  br label %.thread.outer

.thread.outer:                                    ; preds = %.thread.outer.outer, %.loopexit66
  %.pre60.ph = phi ptr [ %.pre59, %.loopexit66 ], [ %.pre60.ph.ph, %.thread.outer.outer ]
  %.ph = phi ptr [ %.pre59, %.loopexit66 ], [ %.ph.ph, %.thread.outer.outer ]
  %indvars.iv.ph = phi i64 [ %indvars.iv.next71, %.loopexit66 ], [ %indvars.iv.ph.ph, %.thread.outer.outer ]
  %18 = getelementptr inbounds ptr, ptr %.ph, i64 %indvars.iv50
  %19 = load ptr, ptr %18, align 8, !tbaa !22
  %indvars.iv.next.peel = add nsw i64 %indvars.iv.ph, 1
  %20 = getelementptr inbounds i8, ptr %19, i64 %indvars.iv.next.peel
  %21 = load i8, ptr %20, align 1, !tbaa !23
  switch i8 %21, label %.loopexit66 [
    i8 0, label %.loopexit
    i8 50, label %22
  ]

22:                                               ; preds = %.thread.outer
  %23 = getelementptr ptr, ptr %.ph, i64 %indvars.iv52
  %24 = getelementptr i8, ptr %23, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %25, i64 %indvars.iv.next.peel
  %27 = load i8, ptr %26, align 1, !tbaa !23
  %.not42.peel = icmp eq i8 %27, 49
  br i1 %.not42.peel, label %28, label %32

28:                                               ; preds = %22
  %29 = load ptr, ptr %23, align 8, !tbaa !22
  %30 = getelementptr inbounds i8, ptr %29, i64 %indvars.iv.next.peel
  %31 = load i8, ptr %30, align 1, !tbaa !23
  %.not43.peel = icmp eq i8 %31, 49
  br i1 %.not43.peel, label %.thread.outer.peel.newph, label %32

32:                                               ; preds = %28, %22
  %33 = getelementptr i8, ptr %19, i64 %indvars.iv.ph
  %34 = getelementptr i8, ptr %33, i64 2
  %35 = load i8, ptr %34, align 1, !tbaa !23
  %.not44.peel = icmp eq i8 %35, 49
  br i1 %.not44.peel, label %36, label %.loopexit77

36:                                               ; preds = %32
  %37 = load i8, ptr %33, align 1, !tbaa !23
  %.not45.peel = icmp eq i8 %37, 49
  br i1 %.not45.peel, label %.thread.outer.peel.newph, label %.loopexit77

.thread.outer.peel.newph:                         ; preds = %28, %36
  %38 = getelementptr inbounds ptr, ptr %.pre60.ph, i64 %indvars.iv50
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  %40 = getelementptr ptr, ptr %.pre60.ph, i64 %indvars.iv52
  %41 = getelementptr i8, ptr %40, i64 16
  br label %.thread

.thread:                                          ; preds = %.thread.backedge, %.thread.outer.peel.newph
  %indvars.iv = phi i64 [ %indvars.iv.next.peel, %.thread.outer.peel.newph ], [ %indvars.iv.next, %.thread.backedge ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %42 = getelementptr inbounds i8, ptr %39, i64 %indvars.iv.next
  %43 = load i8, ptr %42, align 1, !tbaa !23
  switch i8 %43, label %.loopexit66 [
    i8 0, label %.loopexit
    i8 50, label %44
  ]

44:                                               ; preds = %.thread
  %45 = load ptr, ptr %41, align 8, !tbaa !22
  %46 = getelementptr inbounds i8, ptr %45, i64 %indvars.iv.next
  %47 = load i8, ptr %46, align 1, !tbaa !23
  %.not42 = icmp eq i8 %47, 49
  br i1 %.not42, label %48, label %52

48:                                               ; preds = %44
  %49 = load ptr, ptr %40, align 8, !tbaa !22
  %50 = getelementptr inbounds i8, ptr %49, i64 %indvars.iv.next
  %51 = load i8, ptr %50, align 1, !tbaa !23
  %.not43 = icmp eq i8 %51, 49
  br i1 %.not43, label %.thread.backedge, label %52

.thread.backedge:                                 ; preds = %48, %56
  br label %.thread, !llvm.loop !24

52:                                               ; preds = %44, %48
  %53 = getelementptr i8, ptr %39, i64 %indvars.iv
  %54 = getelementptr i8, ptr %53, i64 2
  %55 = load i8, ptr %54, align 1, !tbaa !23
  %.not44 = icmp eq i8 %55, 49
  br i1 %.not44, label %56, label %.loopexit77

56:                                               ; preds = %52
  %57 = load i8, ptr %53, align 1, !tbaa !23
  %.not45 = icmp eq i8 %57, 49
  br i1 %.not45, label %.thread.backedge, label %.loopexit77

.loopexit77:                                      ; preds = %56, %52, %36, %32
  %indvars.iv.next.lcssa70 = phi i64 [ %indvars.iv.next.peel, %32 ], [ %indvars.iv.next.peel, %36 ], [ %indvars.iv.next, %52 ], [ %indvars.iv.next, %56 ]
  tail call void @my_exit(ptr noundef nonnull %0, ptr noundef nonnull @.str.2, i32 noundef 1) #4
  %.pre57 = load ptr, ptr %11, align 8, !tbaa !21
  %.phi.trans.insert = getelementptr inbounds ptr, ptr %.pre57, i64 %indvars.iv50
  %.pre62 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !22
  %.phi.trans.insert63 = getelementptr inbounds i8, ptr %.pre62, i64 %indvars.iv.next.lcssa70
  %.pre64 = load i8, ptr %.phi.trans.insert63, align 1, !tbaa !23
  br label %.loopexit66

.loopexit66:                                      ; preds = %.thread.outer, %.thread, %.loopexit77
  %indvars.iv.next71 = phi i64 [ %indvars.iv.next.lcssa70, %.loopexit77 ], [ %indvars.iv.next.peel, %.thread.outer ], [ %indvars.iv.next, %.thread ]
  %58 = phi i8 [ %.pre64, %.loopexit77 ], [ %21, %.thread.outer ], [ %43, %.thread ]
  %.pre59 = phi ptr [ %.pre57, %.loopexit77 ], [ %.pre60.ph, %.thread ], [ %.pre60.ph, %.thread.outer ]
  %59 = icmp eq i8 %58, 51
  br i1 %59, label %60, label %.thread.outer, !llvm.loop !27

60:                                               ; preds = %.loopexit66
  %61 = add nsw i32 %.1.ph.ph, 1
  %62 = trunc nuw nsw i64 %indvars.iv.next71 to i32
  %63 = tail call i32 @_sprites(ptr noundef nonnull %0, i32 noundef %.1.ph.ph, i32 noundef %62, i32 noundef %17) #4
  %.pre.pre = load ptr, ptr %11, align 8, !tbaa !21
  br label %.thread.outer.outer, !llvm.loop !27

._crit_edge:                                      ; preds = %.loopexit, %10
  ret void
}

declare i32 @_sprites(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind allocsize(0) }
attributes #4 = { 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, !10, i64 132}
!6 = !{!"s_data", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !10, i64 80, !7, i64 88, !7, i64 96, !11, i64 104, !12, i64 112, !13, i64 144, !14, i64 184, !15, i64 208, !16, i64 336, !17, i64 376, !18, i64 456, !19, i64 528, !11, i64 584}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"s_sprites", !11, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!"s_minimap", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!14 = !{!"s_door", !11, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!15 = !{!"s_textures", !10, i64 0, !11, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !11, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !11, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !11, i64 104, !10, i64 112, !10, i64 116, !10, i64 120}
!16 = !{!"s_hook", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!17 = !{!"s_map_result", !10, i64 0, !10, i64 4, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !8, i64 72}
!18 = !{!"s_rycast", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!19 = !{!"s_mlx", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !10, i64 48}
!20 = !{!6, !11, i64 104}
!21 = !{!6, !11, i64 424}
!22 = !{!11, !11, i64 0}
!23 = !{!8, !8, i64 0}
!24 = distinct !{!24, !25, !26}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!"llvm.loop.peeled.count", i32 1}
!27 = distinct !{!27, !25}


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