; LLVM IR from Mithreindeir/VelocityRaptor :: VelocityRaptor/src (vrRigidBody)

; 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.vrOrientedBoundingBox = type { %struct.vrVec2, %struct.vrVec2 }
%struct.vrVec2 = type { float, float }
%struct.vrRigidBody = type { %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, float, float, float, float, %struct.vrCollisionGroup, %struct.vrMaterial, ptr, %struct.vrColor, %struct.vrVec2, %struct.vrOrientedBoundingBox, ptr, i32 }
%struct.vrCollisionGroup = type { i32, i32 }
%struct.vrMaterial = type { float, float, float, float, float, float, float, float }
%struct.vrColor = type { float, float, float }
%struct.vrArray = type { ptr, i32, i32, i32, i32 }
%struct.vrShape = type { ptr, i32, ptr, ptr, ptr, ptr, %struct.vrOrientedBoundingBox }

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; 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 @vrBodyUpdateOBB(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %struct.vrOrientedBoundingBox, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %165, %1
  %11 = load i32, ptr %7, align 4, !tbaa !9
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.vrRigidBody, ptr %12, i32 0, i32 10
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %struct.vrArray, ptr %14, i32 0, i32 1
  %16 = load i32, ptr %15, align 8, !tbaa !19
  %17 = icmp slt i32 %11, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %168

19:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.vrRigidBody, ptr %20, i32 0, i32 10
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds %struct.vrArray, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !21
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds ptr, ptr %24, i64 %26
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %28, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.vrShape, ptr %29, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.vrShape, ptr %31, i32 0, i32 5
  %33 = load ptr, ptr %32, align 8, !tbaa !22
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.vrShape, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !24
  %37 = call { <2 x float>, <2 x float> } %33(ptr noundef %36)
  %38 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %39 = extractvalue { <2 x float>, <2 x float> } %37, 0
  store <2 x float> %39, ptr %38, align 4
  %40 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %41 = extractvalue { <2 x float>, <2 x float> } %37, 1
  store <2 x float> %41, ptr %40, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 4 %9, i64 16, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %75

44:                                               ; preds = %19
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.vrShape, ptr %45, i32 0, i32 6
  %47 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds %struct.vrVec2, ptr %47, i32 0, i32 0
  %49 = load float, ptr %48, align 8, !tbaa !27
  %50 = fptosi float %49 to i32
  store i32 %50, ptr %3, align 4, !tbaa !9
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = sitofp i32 %51 to float
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.vrShape, ptr %53, i32 0, i32 6
  %55 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %54, i32 0, i32 1
  %56 = getelementptr inbounds %struct.vrVec2, ptr %55, i32 0, i32 0
  %57 = load float, ptr %56, align 8, !tbaa !28
  %58 = fadd float %52, %57
  %59 = fptosi float %58 to i32
  store i32 %59, ptr %4, align 4, !tbaa !9
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.vrShape, ptr %60, i32 0, i32 6
  %62 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds %struct.vrVec2, ptr %62, i32 0, i32 1
  %64 = load float, ptr %63, align 4, !tbaa !29
  %65 = fptosi float %64 to i32
  store i32 %65, ptr %5, align 4, !tbaa !9
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = sitofp i32 %66 to float
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.vrShape, ptr %68, i32 0, i32 6
  %70 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %69, i32 0, i32 1
  %71 = getelementptr inbounds %struct.vrVec2, ptr %70, i32 0, i32 1
  %72 = load float, ptr %71, align 4, !tbaa !30
  %73 = fadd float %67, %72
  %74 = fptosi float %73 to i32
  store i32 %74, ptr %6, align 4, !tbaa !9
  br label %164

75:                                               ; preds = %19
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.vrShape, ptr %76, i32 0, i32 6
  %78 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %struct.vrVec2, ptr %78, i32 0, i32 0
  %80 = load float, ptr %79, align 8, !tbaa !27
  %81 = load i32, ptr %3, align 4, !tbaa !9
  %82 = sitofp i32 %81 to float
  %83 = fcmp olt float %80, %82
  br i1 %83, label %84, label %91

84:                                               ; preds = %75
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.vrShape, ptr %85, i32 0, i32 6
  %87 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %86, i32 0, i32 0
  %88 = getelementptr inbounds %struct.vrVec2, ptr %87, i32 0, i32 0
  %89 = load float, ptr %88, align 8, !tbaa !27
  %90 = fptosi float %89 to i32
  store i32 %90, ptr %3, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %84, %75
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.vrShape, ptr %92, i32 0, i32 6
  %94 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds %struct.vrVec2, ptr %94, i32 0, i32 0
  %96 = load float, ptr %95, align 8, !tbaa !27
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.vrShape, ptr %97, i32 0, i32 6
  %99 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %98, i32 0, i32 1
  %100 = getelementptr inbounds %struct.vrVec2, ptr %99, i32 0, i32 0
  %101 = load float, ptr %100, align 8, !tbaa !28
  %102 = fadd float %96, %101
  %103 = load i32, ptr %4, align 4, !tbaa !9
  %104 = sitofp i32 %103 to float
  %105 = fcmp ogt float %102, %104
  br i1 %105, label %106, label %119

106:                                              ; preds = %91
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.vrShape, ptr %107, i32 0, i32 6
  %109 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %struct.vrVec2, ptr %109, i32 0, i32 0
  %111 = load float, ptr %110, align 8, !tbaa !27
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.vrShape, ptr %112, i32 0, i32 6
  %114 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %113, i32 0, i32 1
  %115 = getelementptr inbounds %struct.vrVec2, ptr %114, i32 0, i32 0
  %116 = load float, ptr %115, align 8, !tbaa !28
  %117 = fadd float %111, %116
  %118 = fptosi float %117 to i32
  store i32 %118, ptr %4, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %106, %91
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.vrShape, ptr %120, i32 0, i32 6
  %122 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %121, i32 0, i32 0
  %123 = getelementptr inbounds %struct.vrVec2, ptr %122, i32 0, i32 1
  %124 = load float, ptr %123, align 4, !tbaa !29
  %125 = load i32, ptr %5, align 4, !tbaa !9
  %126 = sitofp i32 %125 to float
  %127 = fcmp olt float %124, %126
  br i1 %127, label %128, label %135

128:                                              ; preds = %119
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.vrShape, ptr %129, i32 0, i32 6
  %131 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %130, i32 0, i32 0
  %132 = getelementptr inbounds %struct.vrVec2, ptr %131, i32 0, i32 1
  %133 = load float, ptr %132, align 4, !tbaa !29
  %134 = fptosi float %133 to i32
  store i32 %134, ptr %5, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %128, %119
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.vrShape, ptr %136, i32 0, i32 6
  %138 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %137, i32 0, i32 0
  %139 = getelementptr inbounds %struct.vrVec2, ptr %138, i32 0, i32 1
  %140 = load float, ptr %139, align 4, !tbaa !29
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.vrShape, ptr %141, i32 0, i32 6
  %143 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %142, i32 0, i32 1
  %144 = getelementptr inbounds %struct.vrVec2, ptr %143, i32 0, i32 1
  %145 = load float, ptr %144, align 4, !tbaa !30
  %146 = fadd float %140, %145
  %147 = load i32, ptr %6, align 4, !tbaa !9
  %148 = sitofp i32 %147 to float
  %149 = fcmp ogt float %146, %148
  br i1 %149, label %150, label %163

150:                                              ; preds = %135
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.vrShape, ptr %151, i32 0, i32 6
  %153 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %struct.vrVec2, ptr %153, i32 0, i32 1
  %155 = load float, ptr %154, align 4, !tbaa !29
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.vrShape, ptr %156, i32 0, i32 6
  %158 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %157, i32 0, i32 1
  %159 = getelementptr inbounds %struct.vrVec2, ptr %158, i32 0, i32 1
  %160 = load float, ptr %159, align 4, !tbaa !30
  %161 = fadd float %155, %160
  %162 = fptosi float %161 to i32
  store i32 %162, ptr %6, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %150, %135
  br label %164

164:                                              ; preds = %163, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %7, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %7, align 4, !tbaa !9
  br label %10, !llvm.loop !31

168:                                              ; preds = %18
  %169 = load i32, ptr %3, align 4, !tbaa !9
  %170 = sitofp i32 %169 to float
  %171 = load ptr, ptr %2, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.vrRigidBody, ptr %171, i32 0, i32 13
  %173 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %172, i32 0, i32 0
  %174 = getelementptr inbounds %struct.vrVec2, ptr %173, i32 0, i32 0
  store float %170, ptr %174, align 4, !tbaa !33
  %175 = load i32, ptr %5, align 4, !tbaa !9
  %176 = sitofp i32 %175 to float
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.vrRigidBody, ptr %177, i32 0, i32 13
  %179 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %178, i32 0, i32 0
  %180 = getelementptr inbounds %struct.vrVec2, ptr %179, i32 0, i32 1
  store float %176, ptr %180, align 4, !tbaa !34
  %181 = load i32, ptr %4, align 4, !tbaa !9
  %182 = load i32, ptr %3, align 4, !tbaa !9
  %183 = sub nsw i32 %181, %182
  %184 = sitofp i32 %183 to float
  %185 = load ptr, ptr %2, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.vrRigidBody, ptr %185, i32 0, i32 13
  %187 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %186, i32 0, i32 1
  %188 = getelementptr inbounds %struct.vrVec2, ptr %187, i32 0, i32 0
  store float %184, ptr %188, align 4, !tbaa !35
  %189 = load i32, ptr %6, align 4, !tbaa !9
  %190 = load i32, ptr %5, align 4, !tbaa !9
  %191 = sub nsw i32 %189, %190
  %192 = sitofp i32 %191 to float
  %193 = load ptr, ptr %2, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.vrRigidBody, ptr %193, i32 0, i32 13
  %195 = getelementptr inbounds %struct.vrOrientedBoundingBox, ptr %194, i32 0, i32 1
  %196 = getelementptr inbounds %struct.vrVec2, ptr %195, i32 0, i32 1
  store float %192, ptr %196, align 4, !tbaa !36
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="64" "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 }

!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 88}
!12 = !{!"vrRigidBody", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !15, i64 48, !16, i64 56, !6, i64 88, !17, i64 96, !13, i64 108, !18, i64 116, !6, i64 136, !10, i64 144}
!13 = !{!"vrVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!"vrCollisionGroup", !10, i64 0, !10, i64 4}
!16 = !{!"vrMaterial", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28}
!17 = !{!"vrColor", !14, i64 0, !14, i64 4, !14, i64 8}
!18 = !{!"vrOrientedBoundingBox", !13, i64 0, !13, i64 8}
!19 = !{!20, !10, i64 8}
!20 = !{!"vrArray", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!21 = !{!20, !6, i64 0}
!22 = !{!23, !6, i64 40}
!23 = !{!"vrShape", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !18, i64 48}
!24 = !{!23, !6, i64 0}
!25 = !{i64 0, i64 4, !26, i64 4, i64 4, !26, i64 8, i64 4, !26, i64 12, i64 4, !26}
!26 = !{!14, !14, i64 0}
!27 = !{!23, !14, i64 48}
!28 = !{!23, !14, i64 56}
!29 = !{!23, !14, i64 52}
!30 = !{!23, !14, i64 60}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!12, !14, i64 116}
!34 = !{!12, !14, i64 120}
!35 = !{!12, !14, i64 124}
!36 = !{!12, !14, i64 128}


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

; Function Attrs: nounwind uwtable
define dso_local void @vrBodyUpdateOBB(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 88
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !17
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %7, label %._crit_edge

7:                                                ; preds = %1
  %8 = load ptr, ptr %3, align 8, !tbaa !19
  %9 = load ptr, ptr %8, align 8, !tbaa !20
  %10 = getelementptr inbounds i8, ptr %9, i64 48
  %11 = getelementptr inbounds i8, ptr %9, i64 40
  %12 = load ptr, ptr %11, align 8, !tbaa !21
  %13 = load ptr, ptr %9, align 8, !tbaa !23
  %14 = tail call { <2 x float>, <2 x float> } %12(ptr noundef %13) #1
  %15 = extractvalue { <2 x float>, <2 x float> } %14, 0
  %16 = extractvalue { <2 x float>, <2 x float> } %14, 1
  store <2 x float> %15, ptr %10, align 8
  %.sroa.4.0..sroa_idx.peel = getelementptr inbounds i8, ptr %9, i64 56
  store <2 x float> %16, ptr %.sroa.4.0..sroa_idx.peel, align 8
  %17 = extractelement <2 x float> %16, i64 1
  %18 = extractelement <2 x float> %16, i64 0
  %19 = extractelement <2 x float> %15, i64 0
  %20 = fptosi float %19 to i32
  %21 = sitofp i32 %20 to float
  %22 = fadd float %18, %21
  %23 = shufflevector <2 x float> %15, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %24 = insertelement <2 x float> %23, float %22, i64 1
  %25 = fptosi <2 x float> %24 to <2 x i32>
  %26 = extractelement <2 x i32> %25, i64 0
  %27 = sitofp i32 %26 to float
  %28 = fadd float %17, %27
  %29 = fptosi float %28 to i32
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  %32 = load i32, ptr %31, align 8, !tbaa !17
  %33 = icmp sgt i32 %32, 1
  %34 = insertelement <4 x i32> poison, i32 %29, i64 0
  %35 = shufflevector <2 x i32> %25, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %36 = shufflevector <4 x i32> %34, <4 x i32> %35, <4 x i32> <i32 0, i32 4, i32 5, i32 poison>
  %37 = insertelement <4 x i32> %36, i32 %20, i64 3
  br i1 %33, label %.lr.ph.peel.next, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.peel.next, %7, %1
  %38 = phi <4 x i32> [ undef, %1 ], [ %37, %7 ], [ %66, %.lr.ph.peel.next ]
  %39 = getelementptr inbounds i8, ptr %0, i64 116
  %40 = shufflevector <4 x i32> %38, <4 x i32> poison, <2 x i32> <i32 2, i32 0>
  %41 = shufflevector <4 x i32> %38, <4 x i32> poison, <2 x i32> <i32 3, i32 1>
  %42 = sub nsw <2 x i32> %40, %41
  %43 = shufflevector <4 x i32> %38, <4 x i32> poison, <4 x i32> <i32 3, i32 1, i32 poison, i32 poison>
  %44 = shufflevector <2 x i32> %42, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %45 = shufflevector <4 x i32> %43, <4 x i32> %44, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
  %46 = sitofp <4 x i32> %45 to <4 x float>
  store <4 x float> %46, ptr %39, align 4, !tbaa !24
  ret void

.lr.ph.peel.next:                                 ; preds = %7, %.lr.ph.peel.next
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.peel.next ], [ 1, %7 ]
  %47 = phi ptr [ %67, %.lr.ph.peel.next ], [ %30, %7 ]
  %48 = phi <4 x i32> [ %66, %.lr.ph.peel.next ], [ %37, %7 ]
  %49 = load ptr, ptr %47, align 8, !tbaa !19
  %50 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv
  %51 = load ptr, ptr %50, align 8, !tbaa !20
  %52 = getelementptr inbounds i8, ptr %51, i64 48
  %53 = getelementptr inbounds i8, ptr %51, i64 40
  %54 = load ptr, ptr %53, align 8, !tbaa !21
  %55 = load ptr, ptr %51, align 8, !tbaa !23
  %56 = tail call { <2 x float>, <2 x float> } %54(ptr noundef %55) #1
  %57 = extractvalue { <2 x float>, <2 x float> } %56, 0
  %58 = extractvalue { <2 x float>, <2 x float> } %56, 1
  store <2 x float> %57, ptr %52, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %51, i64 56
  store <2 x float> %58, ptr %.sroa.4.0..sroa_idx, align 8
  %59 = sitofp <4 x i32> %48 to <4 x float>
  %60 = fadd <2 x float> %57, %58
  %61 = shufflevector <2 x float> %57, <2 x float> %60, <4 x i32> <i32 3, i32 1, i32 2, i32 0>
  %62 = fcmp ogt <4 x float> %61, %59
  %63 = fcmp olt <4 x float> %61, %59
  %64 = shufflevector <4 x i1> %62, <4 x i1> %63, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
  %65 = fptosi <4 x float> %61 to <4 x i32>
  %66 = select <4 x i1> %64, <4 x i32> %65, <4 x i32> %48
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !17
  %70 = sext i32 %69 to i64
  %71 = icmp slt i64 %indvars.iv.next, %70
  br i1 %71, label %.lr.ph.peel.next, label %._crit_edge, !llvm.loop !25
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "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, !14, i64 88}
!6 = !{!"vrRigidBody", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !8, i64 32, !8, i64 36, !8, i64 40, !8, i64 44, !11, i64 48, !13, i64 56, !14, i64 88, !15, i64 96, !7, i64 108, !16, i64 116, !14, i64 136, !12, i64 144}
!7 = !{!"vrVec2", !8, i64 0, !8, i64 4}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"vrCollisionGroup", !12, i64 0, !12, i64 4}
!12 = !{!"int", !9, i64 0}
!13 = !{!"vrMaterial", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28}
!14 = !{!"any pointer", !9, i64 0}
!15 = !{!"vrColor", !8, i64 0, !8, i64 4, !8, i64 8}
!16 = !{!"vrOrientedBoundingBox", !7, i64 0, !7, i64 8}
!17 = !{!18, !12, i64 8}
!18 = !{!"vrArray", !14, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!19 = !{!18, !14, i64 0}
!20 = !{!14, !14, i64 0}
!21 = !{!22, !14, i64 40}
!22 = !{!"vrShape", !14, i64 0, !12, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !16, i64 48}
!23 = !{!22, !14, i64 0}
!24 = !{!8, !8, i64 0}
!25 = distinct !{!25, !26, !27}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass