; LLVM IR from erincatto/box2d :: src (shape)

; 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.b2ChainId = type { i32, i16, i16 }
%struct.b2ChainShape = type { i32, i32, i32, i32, i32, ptr, ptr, i16 }
%struct.b2SurfaceMaterial = type { float, float, float, float, i32, i32 }
%struct.b2World = type { %struct.b2ArenaAllocator, %struct.b2BroadPhase, %struct.b2ConstraintGraph, %struct.b2IdPool, %struct.b2BodyArray, %struct.b2IdPool, %struct.b2SolverSetArray, %struct.b2IdPool, %struct.b2JointArray, %struct.b2IdPool, %struct.b2ContactArray, %struct.b2IdPool, %struct.b2IslandArray, %struct.b2IdPool, %struct.b2IdPool, %struct.b2ShapeArray, %struct.b2ChainShapeArray, %struct.b2SensorArray, %struct.b2TaskContextArray, %struct.b2SensorTaskContextArray, %struct.b2BodyMoveEventArray, %struct.b2SensorBeginTouchEventArray, %struct.b2ContactBeginTouchEventArray, [2 x %struct.b2SensorEndTouchEventArray], [2 x %struct.b2ContactEndTouchEventArray], i32, %struct.b2ContactHitEventArray, %struct.b2BitSet, %struct.b2BitSet, %struct.b2BitSet, %struct.b2BitSet, i64, i32, %struct.b2Vec2, float, float, float, float, float, float, float, float, ptr, ptr, i16, %struct.b2Profile, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, float, i32, i32, i16, i8, i8, i8, i8, i8, i8 }
%struct.b2ArenaAllocator = type { ptr, i32, i32, i32, i32, %struct.b2ArenaEntryArray }
%struct.b2ArenaEntryArray = type { ptr, i32, i32 }
%struct.b2BroadPhase = type { [3 x %struct.b2DynamicTree], i32, %struct.b2HashSet, %struct.b2IntArray, ptr, ptr, i32, %struct.b2AtomicInt, %struct.b2HashSet }
%struct.b2DynamicTree = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32 }
%struct.b2IntArray = type { ptr, i32, i32 }
%struct.b2AtomicInt = type { i32 }
%struct.b2HashSet = type { ptr, i32, i32 }
%struct.b2ConstraintGraph = type { [12 x %struct.b2GraphColor] }
%struct.b2GraphColor = type { %struct.b2BitSet, %struct.b2ContactSimArray, %struct.b2JointSimArray, %union.anon }
%struct.b2ContactSimArray = type { ptr, i32, i32 }
%struct.b2JointSimArray = type { ptr, i32, i32 }
%union.anon = type { ptr }
%struct.b2BodyArray = type { ptr, i32, i32 }
%struct.b2SolverSetArray = type { ptr, i32, i32 }
%struct.b2JointArray = type { ptr, i32, i32 }
%struct.b2ContactArray = type { ptr, i32, i32 }
%struct.b2IslandArray = type { ptr, i32, i32 }
%struct.b2IdPool = type { %struct.b2IntArray, i32 }
%struct.b2ShapeArray = type { ptr, i32, i32 }
%struct.b2ChainShapeArray = type { ptr, i32, i32 }
%struct.b2SensorArray = type { ptr, i32, i32 }
%struct.b2TaskContextArray = type { ptr, i32, i32 }
%struct.b2SensorTaskContextArray = type { ptr, i32, i32 }
%struct.b2BodyMoveEventArray = type { ptr, i32, i32 }
%struct.b2SensorBeginTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactBeginTouchEventArray = type { ptr, i32, i32 }
%struct.b2SensorEndTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactEndTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactHitEventArray = type { ptr, i32, i32 }
%struct.b2BitSet = type { ptr, i32, i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2Profile = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%struct.b2Shape = type { i32, i32, i32, i32, i32, i32, float, float, float, float, float, i32, %struct.b2AABB, %struct.b2AABB, %struct.b2Vec2, i32, %struct.b2Filter, ptr, i32, %union.anon.0, i16, i8, i8, i8, i8, i8 }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2Filter = type { i64, i64, i32 }
%union.anon.0 = type { %struct.b2Polygon }
%struct.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, i32 }

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [30 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

declare zeroext i1 @b2IsValidFloat(float noundef) #1

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #2

declare ptr @b2GetWorldLocked(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @b2GetChainShape(ptr noundef, i64) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2ShapeArray_Get(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @b2Chain_SetRestitution(i64 %0, float noundef %1) #3 {
  %3 = alloca %struct.b2ChainId, align 4
  %4 = alloca float, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  store i64 %0, ptr %3, align 4
  store float %1, ptr %4, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %2
  %15 = load float, ptr %4, align 4, !tbaa !5
  %16 = call zeroext i1 @b2IsValidFloat(float noundef %15)
  br i1 %16, label %21, label %17

17:                                               ; preds = %14
  %18 = call i32 @b2InternalAssertFcn(ptr noundef @.str.24, ptr noundef @.str.1, i32 noundef 1487)
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %17
  call void @llvm.trap()
  br label %21

21:                                               ; preds = %20, %17, %14
  br label %22

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %23 = getelementptr inbounds %struct.b2ChainId, ptr %3, i32 0, i32 1
  %24 = load i16, ptr %23, align 4, !tbaa !9
  %25 = zext i16 %24 to i32
  %26 = call ptr @b2GetWorldLocked(i32 noundef %25)
  store ptr %26, ptr %5, align 8, !tbaa !13
  %27 = load ptr, ptr %5, align 8, !tbaa !13
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %22
  store i32 1, ptr %6, align 4
  br label %82

30:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %31 = load ptr, ptr %5, align 8, !tbaa !13
  %32 = load i64, ptr %3, align 4
  %33 = call ptr @b2GetChainShape(ptr noundef %31, i64 %32)
  store ptr %33, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %34 = load ptr, ptr %7, align 8, !tbaa !13
  %35 = getelementptr inbounds %struct.b2ChainShape, ptr %34, i32 0, i32 4
  %36 = load i32, ptr %35, align 8, !tbaa !15
  store i32 %36, ptr %8, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !17
  br label %37

37:                                               ; preds = %51, %30
  %38 = load i32, ptr %9, align 4, !tbaa !17
  %39 = load i32, ptr %8, align 4, !tbaa !17
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 4, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %54

42:                                               ; preds = %37
  %43 = load float, ptr %4, align 4, !tbaa !5
  %44 = load ptr, ptr %7, align 8, !tbaa !13
  %45 = getelementptr inbounds %struct.b2ChainShape, ptr %44, i32 0, i32 6
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = load i32, ptr %9, align 4, !tbaa !17
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %46, i64 %48
  %50 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %49, i32 0, i32 1
  store float %43, ptr %50, align 4, !tbaa !19
  br label %51

51:                                               ; preds = %42
  %52 = load i32, ptr %9, align 4, !tbaa !17
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %9, align 4, !tbaa !17
  br label %37, !llvm.loop !21

54:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %55 = load ptr, ptr %7, align 8, !tbaa !13
  %56 = getelementptr inbounds %struct.b2ChainShape, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !23
  store i32 %57, ptr %10, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !17
  br label %58

58:                                               ; preds = %78, %54
  %59 = load i32, ptr %11, align 4, !tbaa !17
  %60 = load i32, ptr %10, align 4, !tbaa !17
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  store i32 7, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %81

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %64 = load ptr, ptr %7, align 8, !tbaa !13
  %65 = getelementptr inbounds %struct.b2ChainShape, ptr %64, i32 0, i32 5
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = load i32, ptr %11, align 4, !tbaa !17
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %66, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !17
  store i32 %70, ptr %12, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %71 = load ptr, ptr %5, align 8, !tbaa !13
  %72 = getelementptr inbounds %struct.b2World, ptr %71, i32 0, i32 15
  %73 = load i32, ptr %12, align 4, !tbaa !17
  %74 = call ptr @b2ShapeArray_Get(ptr noundef %72, i32 noundef %73)
  store ptr %74, ptr %13, align 8, !tbaa !13
  %75 = load float, ptr %4, align 4, !tbaa !5
  %76 = load ptr, ptr %13, align 8, !tbaa !13
  %77 = getelementptr inbounds %struct.b2Shape, ptr %76, i32 0, i32 8
  store float %75, ptr %77, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %78

78:                                               ; preds = %63
  %79 = load i32, ptr %11, align 4, !tbaa !17
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %11, align 4, !tbaa !17
  br label %58, !llvm.loop !32

81:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  store i32 0, ptr %6, align 4
  br label %82

82:                                               ; preds = %81, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %83 = load i32, ptr %6, align 4
  switch i32 %83, label %85 [
    i32 0, label %84
    i32 1, label %84
  ]

84:                                               ; preds = %82, %82
  ret void

85:                                               ; preds = %82
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { cold noreturn nounwind memory(inaccessiblemem: write) }
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 = { inlinehint 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 #5 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 4}
!10 = !{!"b2ChainId", !11, i64 0, !12, i64 4, !12, i64 6}
!11 = !{!"int", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !11, i64 16}
!16 = !{!"b2ChainShape", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !14, i64 24, !14, i64 32, !12, i64 40}
!17 = !{!11, !11, i64 0}
!18 = !{!16, !14, i64 32}
!19 = !{!20, !6, i64 4}
!20 = !{!"b2SurfaceMaterial", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !11, i64 16, !11, i64 20}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!16, !11, i64 12}
!24 = !{!16, !14, i64 24}
!25 = !{!26, !6, i64 32}
!26 = !{!"b2Shape", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !11, i64 44, !27, i64 48, !27, i64 64, !28, i64 80, !11, i64 88, !29, i64 96, !14, i64 120, !11, i64 128, !7, i64 132, !12, i64 276, !31, i64 278, !31, i64 279, !31, i64 280, !31, i64 281, !31, i64 282}
!27 = !{!"b2AABB", !28, i64 0, !28, i64 8}
!28 = !{!"b2Vec2", !6, i64 0, !6, i64 4}
!29 = !{!"b2Filter", !30, i64 0, !30, i64 8, !11, i64 16}
!30 = !{!"long", !7, i64 0}
!31 = !{!"_Bool", !7, i64 0}
!32 = distinct !{!32, !22}


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

%struct.b2SurfaceMaterial = type { float, float, float, float, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [30 x i8], align 1

declare zeroext i1 @b2IsValidFloat(float noundef) local_unnamed_addr #0

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #1

declare ptr @b2GetWorldLocked(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden ptr @b2GetChainShape(ptr noundef, i64) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2ShapeArray_Get(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @b2Chain_SetRestitution(i64 %0, float noundef %1) local_unnamed_addr #2 {
  %.sroa.2.0.extract.shift = lshr i64 %0, 32
  %3 = tail call zeroext i1 @b2IsValidFloat(float noundef %1) #4
  br i1 %3, label %7, label %4

4:                                                ; preds = %2
  %5 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, i32 noundef 1487) #4
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %7, label %6

6:                                                ; preds = %4
  tail call void @llvm.trap()
  unreachable

7:                                                ; preds = %2, %4
  %8 = trunc nuw i64 %.sroa.2.0.extract.shift to i32
  %9 = and i32 %8, 65535
  %10 = tail call ptr @b2GetWorldLocked(i32 noundef %9) #4
  %11 = icmp eq ptr %10, null
  br i1 %11, label %.loopexit, label %12

12:                                               ; preds = %7
  %13 = tail call ptr @b2GetChainShape(ptr noundef nonnull %10, i64 %0)
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %12
  %17 = getelementptr inbounds i8, ptr %13, i64 32
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %wide.trip.count = zext nneg i32 %15 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %19 = icmp ult i32 %15, 4
  br i1 %19, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %26

._crit_edge.loopexit.unr-lcssa:                   ; preds = %26, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %26 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %20 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %18, i64 %indvars.iv.epil, i32 1
  store float %1, ptr %20, align 4, !tbaa !13
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !16

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %12
  %21 = getelementptr inbounds i8, ptr %13, i64 12
  %22 = load i32, ptr %21, align 4, !tbaa !18
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph24, label %.loopexit

.lr.ph24:                                         ; preds = %._crit_edge
  %24 = getelementptr inbounds i8, ptr %13, i64 24
  %25 = getelementptr inbounds i8, ptr %10, i64 1256
  %wide.trip.count29 = zext nneg i32 %22 to i64
  br label %31

26:                                               ; preds = %26, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %26 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %26 ]
  %27 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %18, i64 %indvars.iv, i32 1
  store float %1, ptr %27, align 4, !tbaa !13
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %28 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %18, i64 %indvars.iv.next, i32 1
  store float %1, ptr %28, align 4, !tbaa !13
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %29 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %18, i64 %indvars.iv.next.1, i32 1
  store float %1, ptr %29, align 4, !tbaa !13
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %30 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %18, i64 %indvars.iv.next.2, i32 1
  store float %1, ptr %30, align 4, !tbaa !13
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %26, !llvm.loop !19

31:                                               ; preds = %.lr.ph24, %31
  %indvars.iv26 = phi i64 [ 0, %.lr.ph24 ], [ %indvars.iv.next27, %31 ]
  %32 = load ptr, ptr %24, align 8, !tbaa !21
  %33 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv26
  %34 = load i32, ptr %33, align 4, !tbaa !22
  %35 = tail call ptr @b2ShapeArray_Get(ptr noundef nonnull %25, i32 noundef %34)
  %36 = getelementptr inbounds i8, ptr %35, i64 32
  store float %1, ptr %36, align 8, !tbaa !23
  %indvars.iv.next27 = add nuw nsw i64 %indvars.iv26, 1
  %exitcond30.not = icmp eq i64 %indvars.iv.next27, %wide.trip.count29
  br i1 %exitcond30.not, label %.loopexit, label %31, !llvm.loop !30

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

attributes #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 = { cold noreturn nounwind memory(inaccessiblemem: write) }
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 = { inlinehint 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 }

!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, !7, i64 16}
!6 = !{!"b2ChainShape", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !10, i64 32, !11, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"short", !8, i64 0}
!12 = !{!6, !10, i64 32}
!13 = !{!14, !15, i64 4}
!14 = !{!"b2SurfaceMaterial", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !7, i64 16, !7, i64 20}
!15 = !{!"float", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = !{!6, !7, i64 12}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !10, i64 24}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !15, i64 32}
!24 = !{!"b2Shape", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !7, i64 44, !25, i64 48, !25, i64 64, !26, i64 80, !7, i64 88, !27, i64 96, !10, i64 120, !7, i64 128, !8, i64 132, !11, i64 276, !29, i64 278, !29, i64 279, !29, i64 280, !29, i64 281, !29, i64 282}
!25 = !{!"b2AABB", !26, i64 0, !26, i64 8}
!26 = !{!"b2Vec2", !15, i64 0, !15, i64 4}
!27 = !{!"b2Filter", !28, i64 0, !28, i64 8, !7, i64 16}
!28 = !{!"long", !8, i64 0}
!29 = !{!"_Bool", !8, i64 0}
!30 = distinct !{!30, !20}


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