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

; 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.b2Contact = type { i32, i32, i32, [2 x %struct.b2ContactEdge], i32, i32, i32, i32, i32, i32, i32, i8 }
%struct.b2ContactEdge = type { i32, 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.b2Island = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2UnlinkContact(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.b2Contact, ptr %10, i32 0, i32 8
  %12 = load i32, ptr %11, align 4, !tbaa !9
  %13 = icmp ne i32 %12, -1
  br i1 %13, label %18, label %14

14:                                               ; preds = %9
  %15 = call i32 @b2InternalAssertFcn(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 223)
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %17, label %18

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

18:                                               ; preds = %17, %14, %9
  br label %19

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.b2Contact, ptr %20, i32 0, i32 8
  %22 = load i32, ptr %21, align 4, !tbaa !9
  store i32 %22, ptr %5, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.b2World, ptr %23, i32 0, i32 12
  %25 = load i32, ptr %5, align 4, !tbaa !13
  %26 = call ptr @b2IslandArray_Get(ptr noundef %24, i32 noundef %25)
  store ptr %26, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.b2Contact, ptr %27, i32 0, i32 6
  %29 = load i32, ptr %28, align 4, !tbaa !14
  %30 = icmp ne i32 %29, -1
  br i1 %30, label %31, label %58

31:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.b2World, ptr %32, i32 0, i32 10
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.b2Contact, ptr %34, i32 0, i32 6
  %36 = load i32, ptr %35, align 4, !tbaa !14
  %37 = call ptr @b2ContactArray_Get(ptr noundef %33, i32 noundef %36)
  store ptr %37, ptr %7, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %31
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.b2Contact, ptr %39, i32 0, i32 7
  %41 = load i32, ptr %40, align 4, !tbaa !15
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.b2Contact, ptr %42, i32 0, i32 9
  %44 = load i32, ptr %43, align 4, !tbaa !16
  %45 = icmp eq i32 %41, %44
  br i1 %45, label %50, label %46

46:                                               ; preds = %38
  %47 = call i32 @b2InternalAssertFcn(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 232)
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  call void @llvm.trap()
  br label %50

50:                                               ; preds = %49, %46, %38
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.b2Contact, ptr %53, i32 0, i32 7
  %55 = load i32, ptr %54, align 4, !tbaa !15
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.b2Contact, ptr %56, i32 0, i32 7
  store i32 %55, ptr %57, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %58

58:                                               ; preds = %52, %19
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.b2Contact, ptr %59, i32 0, i32 7
  %61 = load i32, ptr %60, align 4, !tbaa !15
  %62 = icmp ne i32 %61, -1
  br i1 %62, label %63, label %90

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.b2World, ptr %64, i32 0, i32 10
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.b2Contact, ptr %66, i32 0, i32 7
  %68 = load i32, ptr %67, align 4, !tbaa !15
  %69 = call ptr @b2ContactArray_Get(ptr noundef %65, i32 noundef %68)
  store ptr %69, ptr %8, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %63
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.b2Contact, ptr %71, i32 0, i32 6
  %73 = load i32, ptr %72, align 4, !tbaa !14
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.b2Contact, ptr %74, i32 0, i32 9
  %76 = load i32, ptr %75, align 4, !tbaa !16
  %77 = icmp eq i32 %73, %76
  br i1 %77, label %82, label %78

78:                                               ; preds = %70
  %79 = call i32 @b2InternalAssertFcn(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 239)
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %78
  call void @llvm.trap()
  br label %82

82:                                               ; preds = %81, %78, %70
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.b2Contact, ptr %85, i32 0, i32 6
  %87 = load i32, ptr %86, align 4, !tbaa !14
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.b2Contact, ptr %88, i32 0, i32 6
  store i32 %87, ptr %89, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %90

90:                                               ; preds = %84, %58
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.b2Island, ptr %91, i32 0, i32 6
  %93 = load i32, ptr %92, align 4, !tbaa !17
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.b2Contact, ptr %94, i32 0, i32 9
  %96 = load i32, ptr %95, align 4, !tbaa !16
  %97 = icmp eq i32 %93, %96
  br i1 %97, label %98, label %104

98:                                               ; preds = %90
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.b2Contact, ptr %99, i32 0, i32 7
  %101 = load i32, ptr %100, align 4, !tbaa !15
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.b2Island, ptr %102, i32 0, i32 6
  store i32 %101, ptr %103, align 4, !tbaa !17
  br label %104

104:                                              ; preds = %98, %90
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.b2Island, ptr %105, i32 0, i32 7
  %107 = load i32, ptr %106, align 4, !tbaa !19
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.b2Contact, ptr %108, i32 0, i32 9
  %110 = load i32, ptr %109, align 4, !tbaa !16
  %111 = icmp eq i32 %107, %110
  br i1 %111, label %112, label %118

112:                                              ; preds = %104
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.b2Contact, ptr %113, i32 0, i32 6
  %115 = load i32, ptr %114, align 4, !tbaa !14
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.b2Island, ptr %116, i32 0, i32 7
  store i32 %115, ptr %117, align 4, !tbaa !19
  br label %118

118:                                              ; preds = %112, %104
  br label %119

119:                                              ; preds = %118
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.b2Island, ptr %120, i32 0, i32 8
  %122 = load i32, ptr %121, align 4, !tbaa !20
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %128, label %124

124:                                              ; preds = %119
  %125 = call i32 @b2InternalAssertFcn(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 253)
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %128

127:                                              ; preds = %124
  call void @llvm.trap()
  br label %128

128:                                              ; preds = %127, %124, %119
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.b2Island, ptr %131, i32 0, i32 8
  %133 = load i32, ptr %132, align 4, !tbaa !20
  %134 = sub nsw i32 %133, 1
  store i32 %134, ptr %132, align 4, !tbaa !20
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.b2Island, ptr %135, i32 0, i32 13
  %137 = load i32, ptr %136, align 4, !tbaa !21
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %136, align 4, !tbaa !21
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.b2Contact, ptr %139, i32 0, i32 8
  store i32 -1, ptr %140, align 4, !tbaa !9
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.b2Contact, ptr %141, i32 0, i32 6
  store i32 -1, ptr %142, align 4, !tbaa !14
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.b2Contact, ptr %143, i32 0, i32 7
  store i32 -1, ptr %144, align 4, !tbaa !15
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = load i32, ptr %5, align 4, !tbaa !13
  call void @b2ValidateIsland(ptr noundef %145, i32 noundef %146)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @b2ValidateIsland(ptr noundef, i32 noundef) #4

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 52}
!10 = !{!"b2Contact", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 12, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !12, i64 64}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 44}
!15 = !{!10, !11, i64 48}
!16 = !{!10, !11, i64 56}
!17 = !{!18, !11, i64 24}
!18 = !{!"b2Island", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52}
!19 = !{!18, !11, i64 28}
!20 = !{!18, !11, i64 32}
!21 = !{!18, !11, i64 52}


; 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 [62 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

._crit_edge:                                      ; preds = %5
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %8

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

8:                                                ; preds = %._crit_edge, %2
  %9 = phi i32 [ %.pre, %._crit_edge ], [ %4, %2 ]
  %10 = getelementptr inbounds i8, ptr %0, i64 1192
  %11 = tail call ptr @b2IslandArray_Get(ptr noundef nonnull %10, i32 noundef %9)
  %12 = getelementptr inbounds i8, ptr %1, i64 44
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %.not35 = icmp eq i32 %13, -1
  br i1 %.not35, label %._crit_edge40, label %14

._crit_edge40:                                    ; preds = %8
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 48
  %.pre41 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !12
  br label %28

14:                                               ; preds = %8
  %15 = getelementptr inbounds i8, ptr %0, i64 1152
  %16 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %15, i32 noundef %13)
  %17 = getelementptr inbounds i8, ptr %16, i64 48
  %18 = load i32, ptr %17, align 4, !tbaa !12
  %19 = getelementptr inbounds i8, ptr %1, i64 56
  %20 = load i32, ptr %19, align 4, !tbaa !13
  %21 = icmp eq i32 %18, %20
  br i1 %21, label %25, label %22

22:                                               ; preds = %14
  %23 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 232) #4
  %.not36 = icmp eq i32 %23, 0
  br i1 %.not36, label %25, label %24

24:                                               ; preds = %22
  tail call void @llvm.trap()
  unreachable

25:                                               ; preds = %22, %14
  %26 = getelementptr inbounds i8, ptr %1, i64 48
  %27 = load i32, ptr %26, align 4, !tbaa !12
  store i32 %27, ptr %17, align 4, !tbaa !12
  br label %28

28:                                               ; preds = %._crit_edge40, %25
  %29 = phi i32 [ %.pre41, %._crit_edge40 ], [ %27, %25 ]
  %30 = getelementptr inbounds i8, ptr %1, i64 48
  %.not37 = icmp eq i32 %29, -1
  br i1 %.not37, label %44, label %31

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %0, i64 1152
  %33 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %32, i32 noundef %29)
  %34 = getelementptr inbounds i8, ptr %33, i64 44
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = getelementptr inbounds i8, ptr %1, i64 56
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = icmp eq i32 %35, %37
  br i1 %38, label %42, label %39

39:                                               ; preds = %31
  %40 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 239) #4
  %.not38 = icmp eq i32 %40, 0
  br i1 %.not38, label %42, label %41

41:                                               ; preds = %39
  tail call void @llvm.trap()
  unreachable

42:                                               ; preds = %39, %31
  %43 = load i32, ptr %12, align 4, !tbaa !11
  store i32 %43, ptr %34, align 4, !tbaa !11
  br label %44

44:                                               ; preds = %42, %28
  %45 = getelementptr inbounds i8, ptr %11, i64 24
  %46 = load i32, ptr %45, align 4, !tbaa !14
  %47 = getelementptr inbounds i8, ptr %1, i64 56
  %48 = load i32, ptr %47, align 4, !tbaa !13
  %49 = icmp eq i32 %46, %48
  br i1 %49, label %50, label %52

50:                                               ; preds = %44
  %51 = load i32, ptr %30, align 4, !tbaa !12
  store i32 %51, ptr %45, align 4, !tbaa !14
  br label %52

52:                                               ; preds = %50, %44
  %53 = getelementptr inbounds i8, ptr %11, i64 28
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = icmp eq i32 %54, %48
  br i1 %55, label %56, label %58

56:                                               ; preds = %52
  %57 = load i32, ptr %12, align 4, !tbaa !11
  store i32 %57, ptr %53, align 4, !tbaa !16
  br label %58

58:                                               ; preds = %52, %56
  %59 = getelementptr inbounds i8, ptr %11, i64 32
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %65, label %62

62:                                               ; preds = %58
  %63 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 253) #4
  %.not39 = icmp eq i32 %63, 0
  br i1 %.not39, label %._crit_edge42, label %64

._crit_edge42:                                    ; preds = %62
  %.pre43 = load i32, ptr %59, align 4, !tbaa !17
  br label %65

64:                                               ; preds = %62
  tail call void @llvm.trap()
  unreachable

65:                                               ; preds = %._crit_edge42, %58
  %66 = phi i32 [ %.pre43, %._crit_edge42 ], [ %60, %58 ]
  %67 = add nsw i32 %66, -1
  store i32 %67, ptr %59, align 4, !tbaa !17
  %68 = getelementptr inbounds i8, ptr %11, i64 52
  %69 = load i32, ptr %68, align 4, !tbaa !18
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %68, align 4, !tbaa !18
  store i32 -1, ptr %3, align 4, !tbaa !5
  store i32 -1, ptr %12, align 4, !tbaa !11
  store i32 -1, ptr %30, align 4, !tbaa !12
  tail call void @b2ValidateIsland(ptr noundef %0, i32 noundef %9)
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @b2ValidateIsland(ptr noundef, i32 noundef) local_unnamed_addr #3

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 = { 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 #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 }

!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 52}
!6 = !{!"b2Contact", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !10, i64 64}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_Bool", !8, i64 0}
!11 = !{!6, !7, i64 44}
!12 = !{!6, !7, i64 48}
!13 = !{!6, !7, i64 56}
!14 = !{!15, !7, i64 24}
!15 = !{!"b2Island", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52}
!16 = !{!15, !7, i64 28}
!17 = !{!15, !7, i64 32}
!18 = !{!15, !7, i64 52}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass