; 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.16 = external hidden unnamed_addr constant [47 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_SetFriction(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 %17, label %20

17:                                               ; preds = %14
  %18 = load float, ptr %4, align 4, !tbaa !5
  %19 = fcmp oge float %18, 0.000000e+00
  br i1 %19, label %24, label %20

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

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

24:                                               ; preds = %23, %20, %17
  br label %25

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

32:                                               ; preds = %25
  store i32 1, ptr %6, align 4
  br label %85

33:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %34 = load ptr, ptr %5, align 8, !tbaa !13
  %35 = load i64, ptr %3, align 4
  %36 = call ptr @b2GetChainShape(ptr noundef %34, i64 %35)
  store ptr %36, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %37 = load ptr, ptr %7, align 8, !tbaa !13
  %38 = getelementptr inbounds %struct.b2ChainShape, ptr %37, i32 0, i32 4
  %39 = load i32, ptr %38, align 8, !tbaa !15
  store i32 %39, 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 %40

40:                                               ; preds = %54, %33
  %41 = load i32, ptr %9, align 4, !tbaa !17
  %42 = load i32, ptr %8, align 4, !tbaa !17
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

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

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

54:                                               ; preds = %45
  %55 = load i32, ptr %9, align 4, !tbaa !17
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %9, align 4, !tbaa !17
  br label %40, !llvm.loop !21

57:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %58 = load ptr, ptr %7, align 8, !tbaa !13
  %59 = getelementptr inbounds %struct.b2ChainShape, ptr %58, i32 0, i32 3
  %60 = load i32, ptr %59, align 4, !tbaa !23
  store i32 %60, 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 %61

61:                                               ; preds = %81, %57
  %62 = load i32, ptr %11, align 4, !tbaa !17
  %63 = load i32, ptr %10, align 4, !tbaa !17
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %67 = load ptr, ptr %7, align 8, !tbaa !13
  %68 = getelementptr inbounds %struct.b2ChainShape, ptr %67, i32 0, i32 5
  %69 = load ptr, ptr %68, align 8, !tbaa !24
  %70 = load i32, ptr %11, align 4, !tbaa !17
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %69, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !17
  store i32 %73, ptr %12, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %74 = load ptr, ptr %5, align 8, !tbaa !13
  %75 = getelementptr inbounds %struct.b2World, ptr %74, i32 0, i32 15
  %76 = load i32, ptr %12, align 4, !tbaa !17
  %77 = call ptr @b2ShapeArray_Get(ptr noundef %75, i32 noundef %76)
  store ptr %77, ptr %13, align 8, !tbaa !13
  %78 = load float, ptr %4, align 4, !tbaa !5
  %79 = load ptr, ptr %13, align 8, !tbaa !13
  %80 = getelementptr inbounds %struct.b2Shape, ptr %79, i32 0, i32 7
  store float %78, ptr %80, align 4, !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 %81

81:                                               ; preds = %66
  %82 = load i32, ptr %11, align 4, !tbaa !17
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %11, align 4, !tbaa !17
  br label %61, !llvm.loop !32

84:                                               ; preds = %65
  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 %85

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

87:                                               ; preds = %85, %85
  ret void

88:                                               ; preds = %85
  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 0}
!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 28}
!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.16 = external hidden unnamed_addr constant [47 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_SetFriction(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
  %4 = fcmp oge float %1, 0.000000e+00
  %or.cond = and i1 %4, %3
  br i1 %or.cond, label %8, label %5

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

7:                                                ; preds = %5
  tail call void @llvm.trap()
  unreachable

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

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

.lr.ph:                                           ; preds = %13
  %18 = getelementptr inbounds i8, ptr %14, i64 32
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  %wide.trip.count = zext nneg i32 %16 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %20 = icmp ult i32 %16, 4
  br i1 %20, 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 %27

._crit_edge.loopexit.unr-lcssa:                   ; preds = %27, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %27 ]
  %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 ]
  %21 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %19, i64 %indvars.iv.epil
  store float %1, ptr %21, 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, %13
  %22 = getelementptr inbounds i8, ptr %14, i64 12
  %23 = load i32, ptr %22, align 4, !tbaa !18
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph26, label %.loopexit

.lr.ph26:                                         ; preds = %._crit_edge
  %25 = getelementptr inbounds i8, ptr %14, i64 24
  %26 = getelementptr inbounds i8, ptr %11, i64 1256
  %wide.trip.count31 = zext nneg i32 %23 to i64
  br label %32

27:                                               ; preds = %27, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %27 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %27 ]
  %28 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %19, i64 %indvars.iv
  store float %1, ptr %28, align 4, !tbaa !13
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %29 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %19, i64 %indvars.iv.next
  store float %1, ptr %29, align 4, !tbaa !13
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %30 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %19, i64 %indvars.iv.next.1
  store float %1, ptr %30, align 4, !tbaa !13
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %31 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %19, i64 %indvars.iv.next.2
  store float %1, ptr %31, 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 %27, !llvm.loop !19

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

.loopexit:                                        ; preds = %32, %._crit_edge, %8
  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 0}
!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 28}
!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,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass