; LLVM IR from mtsamis/box2d-optimized :: src/particle/b2_particle_system.ll (ZN16b2ParticleSystem12RotateBufferEiii)

; 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.NewIndices = type { i32, i32, i32 }
%class.b2ParticleSystem = type { i8, i32, i32, i8, i32, i8, i8, i32, float, float, float, float, i32, i32, %class.b2SlabAllocator, %"struct.b2ParticleSystem::UserOverridableBuffer", %"struct.b2ParticleSystem::UserOverridableBuffer.0", %"struct.b2ParticleSystem::UserOverridableBuffer.2", %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr, ptr, ptr, ptr, ptr, ptr, %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr, %"struct.b2ParticleSystem::UserOverridableBuffer.6", i32, [4 x i8], %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", %class.b2GrowableBuffer, %class.b2GrowableBuffer.10, %class.b2GrowableBuffer.11, %class.b2GrowableBuffer.12, %class.b2GrowableBuffer.13, %class.b2GrowableBuffer.14, %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", i64, i8, i32, ptr, %struct.b2ParticleSystemDef, ptr, ptr, ptr }
%class.b2SlabAllocator = type { %class.b2TrackedBlockAllocator, i32, %class.b2TypedFreeList }
%class.b2TrackedBlockAllocator = type { %class.b2TypedIntrusiveListNode }
%class.b2TypedIntrusiveListNode = type { %class.b2IntrusiveListNode }
%class.b2IntrusiveListNode = type { ptr, ptr }
%class.b2TypedFreeList = type { %class.b2FreeList }
%class.b2FreeList = type { %class.b2IntrusiveListNode, %class.b2IntrusiveListNode }
%"struct.b2ParticleSystem::UserOverridableBuffer" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.0" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.2" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.4" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.6" = type <{ ptr, i32, [4 x i8] }>
%class.b2GrowableBuffer = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.10 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.11 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.12 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.13 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.14 = type { ptr, i32, i32, ptr }
%"struct.b2ParticleSystem::UserOverridableBuffer.8" = type <{ ptr, i32, [4 x i8] }>
%struct.b2ParticleSystemDef = type { i8, float, float, float, i32, float, float, float, float, float, float, float, float, float, float, float, float, i32, float, i8, float }
%struct.b2Vec2 = type { float, float }
%class.b2ParticleColor = type { i8, i8, i8, i8 }
%"struct.b2ParticleSystem::Proxy" = type { i32, i32 }
%struct.b2ParticleBodyContact = type { i32, ptr, ptr, float, %struct.b2Vec2, float }
%struct.b2ParticlePair = type { i32, i32, i32, float, float }
%struct.b2ParticleTriad = type { i32, i32, i32, i32, float, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float }
%class.b2ParticleGroup = type { ptr, i32, i32, i32, float, ptr, ptr, i32, float, float, %struct.b2Vec2, %struct.b2Vec2, float, %struct.b2Transform, ptr }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._ZN16b2ParticleSystem12RotateBufferEiii = external hidden unnamed_addr constant [57 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem12RotateBufferEiii(ptr noundef nonnull align 8 dereferenceable(632) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.NewIndices, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %26 = load ptr, ptr %5, align 8
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = icmp eq i32 %27, %28
  br i1 %29, label %34, label %30

30:                                               ; preds = %4
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = icmp eq i32 %31, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %30, %4
  br label %562

35:                                               ; preds = %30
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = icmp sge i32 %36, %37
  br i1 %38, label %39, label %43

39:                                               ; preds = %35
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = icmp sle i32 %40, %41
  br label %43

43:                                               ; preds = %39, %35
  %44 = phi i1 [ false, %35 ], [ %42, %39 ]
  br i1 %44, label %45, label %46

45:                                               ; preds = %43
  br label %48

46:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.1, i32 noundef 3850, ptr noundef @__PRETTY_FUNCTION__._ZN16b2ParticleSystem12RotateBufferEiii) #6
  unreachable

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %45
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #7
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = getelementptr inbounds %struct.NewIndices, ptr %9, i32 0, i32 0
  store i32 %49, ptr %50, align 4, !tbaa !11
  %51 = load i32, ptr %7, align 4, !tbaa !9
  %52 = getelementptr inbounds %struct.NewIndices, ptr %9, i32 0, i32 1
  store i32 %51, ptr %52, align 4, !tbaa !13
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = getelementptr inbounds %struct.NewIndices, ptr %9, i32 0, i32 2
  store i32 %53, ptr %54, align 4, !tbaa !14
  %55 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 16
  %56 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i32, ptr %57, i64 %59
  %61 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 16
  %62 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr %63, i64 %65
  %67 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 16
  %68 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %69, i64 %71
  %73 = call noundef ptr @_ZNSt3_V26rotateIPjEET_S2_S2_S2_(ptr noundef %60, ptr noundef %66, ptr noundef %72)
  %74 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 30
  %75 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !39
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %98

78:                                               ; preds = %48
  %79 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 30
  %80 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !39
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %81, i64 %83
  %85 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 30
  %86 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !39
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %87, i64 %89
  %91 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 30
  %92 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !39
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i32, ptr %93, i64 %95
  %97 = call noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef %84, ptr noundef %90, ptr noundef %96)
  br label %98

98:                                               ; preds = %78, %48
  %99 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 31
  %100 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !40
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %123

103:                                              ; preds = %98
  %104 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 31
  %105 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !40
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %106, i64 %108
  %110 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 31
  %111 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !40
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i32, ptr %112, i64 %114
  %116 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 31
  %117 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !40
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i32, ptr %118, i64 %120
  %122 = call noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef %109, ptr noundef %115, ptr noundef %121)
  br label %123

123:                                              ; preds = %103, %98
  %124 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 32
  %125 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !41
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %148

128:                                              ; preds = %123
  %129 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 32
  %130 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !41
  %132 = load i32, ptr %6, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %131, i64 %133
  %135 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 32
  %136 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !41
  %138 = load i32, ptr %7, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  %141 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 32
  %142 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !41
  %144 = load i32, ptr %8, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i32, ptr %143, i64 %145
  %147 = call noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef %134, ptr noundef %140, ptr noundef %146)
  br label %148

148:                                              ; preds = %128, %123
  %149 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 17
  %150 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !42
  %152 = load i32, ptr %6, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds %struct.b2Vec2, ptr %151, i64 %153
  %155 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 17
  %156 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !42
  %158 = load i32, ptr %7, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds %struct.b2Vec2, ptr %157, i64 %159
  %161 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 17
  %162 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !42
  %164 = load i32, ptr %8, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds %struct.b2Vec2, ptr %163, i64 %165
  %167 = call noundef ptr @_ZNSt3_V26rotateIP6b2Vec2EET_S3_S3_S3_(ptr noundef %154, ptr noundef %160, ptr noundef %166)
  %168 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 18
  %169 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !43
  %171 = load i32, ptr %6, align 4, !tbaa !9
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds %struct.b2Vec2, ptr %170, i64 %172
  %174 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 18
  %175 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !43
  %177 = load i32, ptr %7, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds %struct.b2Vec2, ptr %176, i64 %178
  %180 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 18
  %181 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %180, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8, !tbaa !43
  %183 = load i32, ptr %8, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.b2Vec2, ptr %182, i64 %184
  %186 = call noundef ptr @_ZNSt3_V26rotateIP6b2Vec2EET_S3_S3_S3_(ptr noundef %173, ptr noundef %179, ptr noundef %185)
  %187 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 26
  %188 = load ptr, ptr %187, align 8, !tbaa !44
  %189 = load i32, ptr %6, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds ptr, ptr %188, i64 %190
  %192 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 26
  %193 = load ptr, ptr %192, align 8, !tbaa !44
  %194 = load i32, ptr %7, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds ptr, ptr %193, i64 %195
  %197 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 26
  %198 = load ptr, ptr %197, align 8, !tbaa !44
  %199 = load i32, ptr %8, align 4, !tbaa !9
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds ptr, ptr %198, i64 %200
  %202 = call noundef ptr @_ZNSt3_V26rotateIPP15b2ParticleGroupEET_S4_S4_S4_(ptr noundef %191, ptr noundef %196, ptr noundef %201)
  %203 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 6
  %204 = load i8, ptr %203, align 1, !tbaa !45, !range !46, !noundef !47
  %205 = trunc i8 %204 to i1
  br i1 %205, label %206, label %223

206:                                              ; preds = %148
  %207 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 19
  %208 = load ptr, ptr %207, align 8, !tbaa !48
  %209 = load i32, ptr %6, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds %struct.b2Vec2, ptr %208, i64 %210
  %212 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 19
  %213 = load ptr, ptr %212, align 8, !tbaa !48
  %214 = load i32, ptr %7, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds %struct.b2Vec2, ptr %213, i64 %215
  %217 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 19
  %218 = load ptr, ptr %217, align 8, !tbaa !48
  %219 = load i32, ptr %8, align 4, !tbaa !9
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds %struct.b2Vec2, ptr %218, i64 %220
  %222 = call noundef ptr @_ZNSt3_V26rotateIP6b2Vec2EET_S3_S3_S3_(ptr noundef %211, ptr noundef %216, ptr noundef %221)
  br label %223

223:                                              ; preds = %206, %148
  %224 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 21
  %225 = load ptr, ptr %224, align 8, !tbaa !49
  %226 = icmp ne ptr %225, null
  br i1 %226, label %227, label %244

227:                                              ; preds = %223
  %228 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 21
  %229 = load ptr, ptr %228, align 8, !tbaa !49
  %230 = load i32, ptr %6, align 4, !tbaa !9
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds float, ptr %229, i64 %231
  %233 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 21
  %234 = load ptr, ptr %233, align 8, !tbaa !49
  %235 = load i32, ptr %7, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds float, ptr %234, i64 %236
  %238 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 21
  %239 = load ptr, ptr %238, align 8, !tbaa !49
  %240 = load i32, ptr %8, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds float, ptr %239, i64 %241
  %243 = call noundef ptr @_ZNSt3_V26rotateIPfEET_S2_S2_S2_(ptr noundef %232, ptr noundef %237, ptr noundef %242)
  br label %244

244:                                              ; preds = %227, %223
  %245 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 24
  %246 = load ptr, ptr %245, align 8, !tbaa !50
  %247 = icmp ne ptr %246, null
  br i1 %247, label %248, label %265

248:                                              ; preds = %244
  %249 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 24
  %250 = load ptr, ptr %249, align 8, !tbaa !50
  %251 = load i32, ptr %6, align 4, !tbaa !9
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds float, ptr %250, i64 %252
  %254 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 24
  %255 = load ptr, ptr %254, align 8, !tbaa !50
  %256 = load i32, ptr %7, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds float, ptr %255, i64 %257
  %259 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 24
  %260 = load ptr, ptr %259, align 8, !tbaa !50
  %261 = load i32, ptr %8, align 4, !tbaa !9
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds float, ptr %260, i64 %262
  %264 = call noundef ptr @_ZNSt3_V26rotateIPfEET_S2_S2_S2_(ptr noundef %253, ptr noundef %258, ptr noundef %263)
  br label %265

265:                                              ; preds = %248, %244
  %266 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 25
  %267 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr %266, i32 0, i32 0
  %268 = load ptr, ptr %267, align 8, !tbaa !51
  %269 = icmp ne ptr %268, null
  br i1 %269, label %270, label %290

270:                                              ; preds = %265
  %271 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 25
  %272 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr %271, i32 0, i32 0
  %273 = load ptr, ptr %272, align 8, !tbaa !51
  %274 = load i32, ptr %6, align 4, !tbaa !9
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds %class.b2ParticleColor, ptr %273, i64 %275
  %277 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 25
  %278 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr %277, i32 0, i32 0
  %279 = load ptr, ptr %278, align 8, !tbaa !51
  %280 = load i32, ptr %7, align 4, !tbaa !9
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds %class.b2ParticleColor, ptr %279, i64 %281
  %283 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 25
  %284 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr %283, i32 0, i32 0
  %285 = load ptr, ptr %284, align 8, !tbaa !51
  %286 = load i32, ptr %8, align 4, !tbaa !9
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds %class.b2ParticleColor, ptr %285, i64 %287
  %289 = call noundef ptr @_ZNSt3_V26rotateIP15b2ParticleColorEET_S3_S3_S3_(ptr noundef %276, ptr noundef %282, ptr noundef %288)
  br label %290

290:                                              ; preds = %270, %265
  %291 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 27
  %292 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.6", ptr %291, i32 0, i32 0
  %293 = load ptr, ptr %292, align 8, !tbaa !52
  %294 = icmp ne ptr %293, null
  br i1 %294, label %295, label %315

295:                                              ; preds = %290
  %296 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 27
  %297 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.6", ptr %296, i32 0, i32 0
  %298 = load ptr, ptr %297, align 8, !tbaa !52
  %299 = load i32, ptr %6, align 4, !tbaa !9
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds ptr, ptr %298, i64 %300
  %302 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 27
  %303 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.6", ptr %302, i32 0, i32 0
  %304 = load ptr, ptr %303, align 8, !tbaa !52
  %305 = load i32, ptr %7, align 4, !tbaa !9
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds ptr, ptr %304, i64 %306
  %308 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 27
  %309 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.6", ptr %308, i32 0, i32 0
  %310 = load ptr, ptr %309, align 8, !tbaa !52
  %311 = load i32, ptr %8, align 4, !tbaa !9
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds ptr, ptr %310, i64 %312
  %314 = call noundef ptr @_ZNSt3_V26rotateIPPvEET_S3_S3_S3_(ptr noundef %301, ptr noundef %307, ptr noundef %313)
  br label %315

315:                                              ; preds = %295, %290
  %316 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 15
  %317 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %316, i32 0, i32 0
  %318 = load ptr, ptr %317, align 8, !tbaa !53
  %319 = icmp ne ptr %318, null
  br i1 %319, label %320, label %366

320:                                              ; preds = %315
  %321 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 15
  %322 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %321, i32 0, i32 0
  %323 = load ptr, ptr %322, align 8, !tbaa !53
  %324 = load i32, ptr %6, align 4, !tbaa !9
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds ptr, ptr %323, i64 %325
  %327 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 15
  %328 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %327, i32 0, i32 0
  %329 = load ptr, ptr %328, align 8, !tbaa !53
  %330 = load i32, ptr %7, align 4, !tbaa !9
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds ptr, ptr %329, i64 %331
  %333 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 15
  %334 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %333, i32 0, i32 0
  %335 = load ptr, ptr %334, align 8, !tbaa !53
  %336 = load i32, ptr %8, align 4, !tbaa !9
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds ptr, ptr %335, i64 %337
  %339 = call noundef ptr @_ZNSt3_V26rotateIPP16b2ParticleHandleEET_S4_S4_S4_(ptr noundef %326, ptr noundef %332, ptr noundef %338)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %340 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %340, ptr %10, align 4, !tbaa !9
  br label %341

341:                                              ; preds = %362, %320
  %342 = load i32, ptr %10, align 4, !tbaa !9
  %343 = load i32, ptr %8, align 4, !tbaa !9
  %344 = icmp slt i32 %342, %343
  br i1 %344, label %346, label %345

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

346:                                              ; preds = %341
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %347 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 15
  %348 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %347, i32 0, i32 0
  %349 = load ptr, ptr %348, align 8, !tbaa !53
  %350 = load i32, ptr %10, align 4, !tbaa !9
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds ptr, ptr %349, i64 %351
  %353 = load ptr, ptr %352, align 8, !tbaa !5
  store ptr %353, ptr %11, align 8, !tbaa !5
  %354 = load ptr, ptr %11, align 8, !tbaa !5
  %355 = icmp ne ptr %354, null
  br i1 %355, label %356, label %361

356:                                              ; preds = %346
  %357 = load ptr, ptr %11, align 8, !tbaa !5
  %358 = load ptr, ptr %11, align 8, !tbaa !5
  %359 = call noundef i32 @_ZNK16b2ParticleHandle8GetIndexEv(ptr noundef nonnull align 8 dereferenceable(20) %358)
  %360 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %359)
  call void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20) %357, i32 noundef %360)
  br label %361

361:                                              ; preds = %356, %346
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %362

362:                                              ; preds = %361
  %363 = load i32, ptr %10, align 4, !tbaa !9
  %364 = add nsw i32 %363, 1
  store i32 %364, ptr %10, align 4, !tbaa !9
  br label %341, !llvm.loop !54

365:                                              ; preds = %345
  br label %366

366:                                              ; preds = %365, %315
  %367 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 39
  %368 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %367, i32 0, i32 0
  %369 = load ptr, ptr %368, align 8, !tbaa !56
  %370 = icmp ne ptr %369, null
  br i1 %370, label %371, label %415

371:                                              ; preds = %366
  %372 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 39
  %373 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %372, i32 0, i32 0
  %374 = load ptr, ptr %373, align 8, !tbaa !56
  %375 = load i32, ptr %6, align 4, !tbaa !9
  %376 = sext i32 %375 to i64
  %377 = getelementptr inbounds i32, ptr %374, i64 %376
  %378 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 39
  %379 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %378, i32 0, i32 0
  %380 = load ptr, ptr %379, align 8, !tbaa !56
  %381 = load i32, ptr %7, align 4, !tbaa !9
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds i32, ptr %380, i64 %382
  %384 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 39
  %385 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %384, i32 0, i32 0
  %386 = load ptr, ptr %385, align 8, !tbaa !56
  %387 = load i32, ptr %8, align 4, !tbaa !9
  %388 = sext i32 %387 to i64
  %389 = getelementptr inbounds i32, ptr %386, i64 %388
  %390 = call noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef %377, ptr noundef %383, ptr noundef %389)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %391 = call noundef i32 @_ZNK16b2ParticleSystem16GetParticleCountEv(ptr noundef nonnull align 8 dereferenceable(632) %26)
  store i32 %391, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %392 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 40
  %393 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %392, i32 0, i32 0
  %394 = load ptr, ptr %393, align 8, !tbaa !57
  store ptr %394, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %395

395:                                              ; preds = %411, %371
  %396 = load i32, ptr %14, align 4, !tbaa !9
  %397 = load i32, ptr %12, align 4, !tbaa !9
  %398 = icmp slt i32 %396, %397
  br i1 %398, label %400, label %399

399:                                              ; preds = %395
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %414

400:                                              ; preds = %395
  %401 = load ptr, ptr %13, align 8, !tbaa !5
  %402 = load i32, ptr %14, align 4, !tbaa !9
  %403 = sext i32 %402 to i64
  %404 = getelementptr inbounds i32, ptr %401, i64 %403
  %405 = load i32, ptr %404, align 4, !tbaa !9
  %406 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %405)
  %407 = load ptr, ptr %13, align 8, !tbaa !5
  %408 = load i32, ptr %14, align 4, !tbaa !9
  %409 = sext i32 %408 to i64
  %410 = getelementptr inbounds i32, ptr %407, i64 %409
  store i32 %406, ptr %410, align 4, !tbaa !9
  br label %411

411:                                              ; preds = %400
  %412 = load i32, ptr %14, align 4, !tbaa !9
  %413 = add nsw i32 %412, 1
  store i32 %413, ptr %14, align 4, !tbaa !9
  br label %395, !llvm.loop !58

414:                                              ; preds = %399
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %415

415:                                              ; preds = %414, %366
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %416

416:                                              ; preds = %434, %415
  %417 = load i32, ptr %15, align 4, !tbaa !9
  %418 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 34
  %419 = call noundef i32 @_ZNK16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %418)
  %420 = icmp slt i32 %417, %419
  br i1 %420, label %422, label %421

421:                                              ; preds = %416
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %437

422:                                              ; preds = %416
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %423 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 34
  %424 = call noundef ptr @_ZN16b2GrowableBufferIN16b2ParticleSystem5ProxyEE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24) %423)
  %425 = load i32, ptr %15, align 4, !tbaa !9
  %426 = sext i32 %425 to i64
  %427 = getelementptr inbounds %"struct.b2ParticleSystem::Proxy", ptr %424, i64 %426
  store ptr %427, ptr %16, align 8, !tbaa !5
  %428 = load ptr, ptr %16, align 8, !tbaa !5
  %429 = getelementptr inbounds %"struct.b2ParticleSystem::Proxy", ptr %428, i32 0, i32 0
  %430 = load i32, ptr %429, align 4, !tbaa !59
  %431 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %430)
  %432 = load ptr, ptr %16, align 8, !tbaa !5
  %433 = getelementptr inbounds %"struct.b2ParticleSystem::Proxy", ptr %432, i32 0, i32 0
  store i32 %431, ptr %433, align 4, !tbaa !59
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %434

434:                                              ; preds = %422
  %435 = load i32, ptr %15, align 4, !tbaa !9
  %436 = add nsw i32 %435, 1
  store i32 %436, ptr %15, align 4, !tbaa !9
  br label %416, !llvm.loop !61

437:                                              ; preds = %421
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %438

438:                                              ; preds = %455, %437
  %439 = load i32, ptr %17, align 4, !tbaa !9
  %440 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 35
  %441 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %440)
  %442 = icmp slt i32 %439, %441
  br i1 %442, label %444, label %443

443:                                              ; preds = %438
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %458

444:                                              ; preds = %438
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %445 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 35
  %446 = load i32, ptr %17, align 4, !tbaa !9
  %447 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %445, i32 noundef %446)
  store ptr %447, ptr %18, align 8, !tbaa !5
  %448 = load ptr, ptr %18, align 8, !tbaa !5
  %449 = load ptr, ptr %18, align 8, !tbaa !5
  %450 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %449)
  %451 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %450)
  %452 = load ptr, ptr %18, align 8, !tbaa !5
  %453 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %452)
  %454 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %453)
  call void @_ZN17b2ParticleContact10SetIndicesEii(ptr noundef nonnull align 4 dereferenceable(24) %448, i32 noundef %451, i32 noundef %454)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %455

455:                                              ; preds = %444
  %456 = load i32, ptr %17, align 4, !tbaa !9
  %457 = add nsw i32 %456, 1
  store i32 %457, ptr %17, align 4, !tbaa !9
  br label %438, !llvm.loop !62

458:                                              ; preds = %443
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %459

459:                                              ; preds = %475, %458
  %460 = load i32, ptr %19, align 4, !tbaa !9
  %461 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 36
  %462 = call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %461)
  %463 = icmp slt i32 %460, %462
  br i1 %463, label %465, label %464

464:                                              ; preds = %459
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %478

465:                                              ; preds = %459
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %466 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 36
  %467 = load i32, ptr %19, align 4, !tbaa !9
  %468 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %466, i32 noundef %467)
  store ptr %468, ptr %20, align 8, !tbaa !5
  %469 = load ptr, ptr %20, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.b2ParticleBodyContact, ptr %469, i32 0, i32 0
  %471 = load i32, ptr %470, align 8, !tbaa !63
  %472 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %471)
  %473 = load ptr, ptr %20, align 8, !tbaa !5
  %474 = getelementptr inbounds %struct.b2ParticleBodyContact, ptr %473, i32 0, i32 0
  store i32 %472, ptr %474, align 8, !tbaa !63
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %475

475:                                              ; preds = %465
  %476 = load i32, ptr %19, align 4, !tbaa !9
  %477 = add nsw i32 %476, 1
  store i32 %477, ptr %19, align 4, !tbaa !9
  br label %459, !llvm.loop !66

478:                                              ; preds = %464
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %479

479:                                              ; preds = %501, %478
  %480 = load i32, ptr %21, align 4, !tbaa !9
  %481 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 37
  %482 = call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %481)
  %483 = icmp slt i32 %480, %482
  br i1 %483, label %485, label %484

484:                                              ; preds = %479
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %504

485:                                              ; preds = %479
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %486 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 37
  %487 = load i32, ptr %21, align 4, !tbaa !9
  %488 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairEixEi(ptr noundef nonnull align 8 dereferenceable(24) %486, i32 noundef %487)
  store ptr %488, ptr %22, align 8, !tbaa !5
  %489 = load ptr, ptr %22, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.b2ParticlePair, ptr %489, i32 0, i32 0
  %491 = load i32, ptr %490, align 4, !tbaa !67
  %492 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %491)
  %493 = load ptr, ptr %22, align 8, !tbaa !5
  %494 = getelementptr inbounds %struct.b2ParticlePair, ptr %493, i32 0, i32 0
  store i32 %492, ptr %494, align 4, !tbaa !67
  %495 = load ptr, ptr %22, align 8, !tbaa !5
  %496 = getelementptr inbounds %struct.b2ParticlePair, ptr %495, i32 0, i32 1
  %497 = load i32, ptr %496, align 4, !tbaa !69
  %498 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %497)
  %499 = load ptr, ptr %22, align 8, !tbaa !5
  %500 = getelementptr inbounds %struct.b2ParticlePair, ptr %499, i32 0, i32 1
  store i32 %498, ptr %500, align 4, !tbaa !69
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %501

501:                                              ; preds = %485
  %502 = load i32, ptr %21, align 4, !tbaa !9
  %503 = add nsw i32 %502, 1
  store i32 %503, ptr %21, align 4, !tbaa !9
  br label %479, !llvm.loop !70

504:                                              ; preds = %484
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %505

505:                                              ; preds = %533, %504
  %506 = load i32, ptr %23, align 4, !tbaa !9
  %507 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 38
  %508 = call noundef i32 @_ZNK16b2GrowableBufferI15b2ParticleTriadE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %507)
  %509 = icmp slt i32 %506, %508
  br i1 %509, label %511, label %510

510:                                              ; preds = %505
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %536

511:                                              ; preds = %505
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %512 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 38
  %513 = load i32, ptr %23, align 4, !tbaa !9
  %514 = call noundef nonnull align 4 dereferenceable(60) ptr @_ZN16b2GrowableBufferI15b2ParticleTriadEixEi(ptr noundef nonnull align 8 dereferenceable(24) %512, i32 noundef %513)
  store ptr %514, ptr %24, align 8, !tbaa !5
  %515 = load ptr, ptr %24, align 8, !tbaa !5
  %516 = getelementptr inbounds %struct.b2ParticleTriad, ptr %515, i32 0, i32 0
  %517 = load i32, ptr %516, align 4, !tbaa !71
  %518 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %517)
  %519 = load ptr, ptr %24, align 8, !tbaa !5
  %520 = getelementptr inbounds %struct.b2ParticleTriad, ptr %519, i32 0, i32 0
  store i32 %518, ptr %520, align 4, !tbaa !71
  %521 = load ptr, ptr %24, align 8, !tbaa !5
  %522 = getelementptr inbounds %struct.b2ParticleTriad, ptr %521, i32 0, i32 1
  %523 = load i32, ptr %522, align 4, !tbaa !73
  %524 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %523)
  %525 = load ptr, ptr %24, align 8, !tbaa !5
  %526 = getelementptr inbounds %struct.b2ParticleTriad, ptr %525, i32 0, i32 1
  store i32 %524, ptr %526, align 4, !tbaa !73
  %527 = load ptr, ptr %24, align 8, !tbaa !5
  %528 = getelementptr inbounds %struct.b2ParticleTriad, ptr %527, i32 0, i32 2
  %529 = load i32, ptr %528, align 4, !tbaa !74
  %530 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %529)
  %531 = load ptr, ptr %24, align 8, !tbaa !5
  %532 = getelementptr inbounds %struct.b2ParticleTriad, ptr %531, i32 0, i32 2
  store i32 %530, ptr %532, align 4, !tbaa !74
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %533

533:                                              ; preds = %511
  %534 = load i32, ptr %23, align 4, !tbaa !9
  %535 = add nsw i32 %534, 1
  store i32 %535, ptr %23, align 4, !tbaa !9
  br label %505, !llvm.loop !75

536:                                              ; preds = %510
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %537 = getelementptr inbounds %class.b2ParticleSystem, ptr %26, i32 0, i32 44
  %538 = load ptr, ptr %537, align 8, !tbaa !76
  store ptr %538, ptr %25, align 8, !tbaa !5
  br label %539

539:                                              ; preds = %558, %536
  %540 = load ptr, ptr %25, align 8, !tbaa !5
  %541 = icmp ne ptr %540, null
  br i1 %541, label %543, label %542

542:                                              ; preds = %539
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %561

543:                                              ; preds = %539
  %544 = load ptr, ptr %25, align 8, !tbaa !5
  %545 = getelementptr inbounds %class.b2ParticleGroup, ptr %544, i32 0, i32 1
  %546 = load i32, ptr %545, align 8, !tbaa !77
  %547 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %546)
  %548 = load ptr, ptr %25, align 8, !tbaa !5
  %549 = getelementptr inbounds %class.b2ParticleGroup, ptr %548, i32 0, i32 1
  store i32 %547, ptr %549, align 8, !tbaa !77
  %550 = load ptr, ptr %25, align 8, !tbaa !5
  %551 = getelementptr inbounds %class.b2ParticleGroup, ptr %550, i32 0, i32 2
  %552 = load i32, ptr %551, align 4, !tbaa !81
  %553 = sub nsw i32 %552, 1
  %554 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %553)
  %555 = add nsw i32 %554, 1
  %556 = load ptr, ptr %25, align 8, !tbaa !5
  %557 = getelementptr inbounds %class.b2ParticleGroup, ptr %556, i32 0, i32 2
  store i32 %555, ptr %557, align 4, !tbaa !81
  br label %558

558:                                              ; preds = %543
  %559 = load ptr, ptr %25, align 8, !tbaa !5
  %560 = call noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96) %559)
  store ptr %560, ptr %25, align 8, !tbaa !5
  br label %539, !llvm.loop !82

561:                                              ; preds = %542
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #7
  br label %562

562:                                              ; preds = %561, %34
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2ParticleSystem16GetParticleCountEv(ptr noundef nonnull align 8 dereferenceable(632)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI15b2ParticleTriadE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(60) ptr @_ZN16b2GrowableBufferI15b2ParticleTriadEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN16b2GrowableBufferIN16b2ParticleSystem5ProxyEE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN17b2ParticleContact10SetIndicesEii(ptr noundef nonnull align 4 dereferenceable(24), i32 noundef, i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPjEET_S2_S2_S2_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIP6b2Vec2EET_S3_S3_S3_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPP15b2ParticleGroupEET_S4_S4_S4_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPfEET_S2_S2_S2_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIP15b2ParticleColorEET_S3_S3_S3_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPPvEET_S3_S3_S3_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPP16b2ParticleHandleEET_S4_S4_S4_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2ParticleHandle8GetIndexEv(ptr noundef nonnull align 8 dereferenceable(20)) #4 align 2

attributes #0 = { noreturn nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 mustprogress 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 = { mustprogress 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 = { inlinehint mustprogress 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 #6 = { noreturn nounwind }
attributes #7 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSZN16b2ParticleSystem12RotateBufferEiiiE10NewIndices", !10, i64 0, !10, i64 4, !10, i64 8}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 8}
!15 = !{!16, !6, i64 128}
!16 = !{!"_ZTS16b2ParticleSystem", !17, i64 0, !10, i64 4, !10, i64 8, !17, i64 12, !10, i64 16, !17, i64 20, !17, i64 21, !10, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !18, i64 40, !10, i64 44, !10, i64 48, !19, i64 56, !25, i64 112, !26, i64 128, !27, i64 144, !27, i64 160, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !28, i64 224, !6, i64 240, !29, i64 248, !10, i64 264, !30, i64 272, !30, i64 288, !30, i64 304, !31, i64 320, !32, i64 344, !33, i64 368, !34, i64 392, !35, i64 416, !36, i64 440, !30, i64 464, !30, i64 480, !37, i64 496, !17, i64 504, !10, i64 508, !6, i64 512, !38, i64 520, !6, i64 608, !6, i64 616, !6, i64 624}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTS15b2SlabAllocatorI16b2ParticleHandleE", !20, i64 0, !10, i64 16, !23, i64 24}
!20 = !{!"_ZTS23b2TrackedBlockAllocator", !21, i64 0}
!21 = !{!"_ZTS24b2TypedIntrusiveListNodeI14b2TrackedBlockE", !22, i64 0}
!22 = !{!"_ZTS19b2IntrusiveListNode", !6, i64 0, !6, i64 8}
!23 = !{!"_ZTS15b2TypedFreeListI16b2ParticleHandleE", !24, i64 0}
!24 = !{!"_ZTS10b2FreeList", !22, i64 0, !22, i64 16}
!25 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIP16b2ParticleHandleEE", !6, i64 0, !10, i64 8}
!26 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIjEE", !6, i64 0, !10, i64 8}
!27 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI6b2Vec2EE", !6, i64 0, !10, i64 8}
!28 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI15b2ParticleColorEE", !6, i64 0, !10, i64 8}
!29 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIPvEE", !6, i64 0, !10, i64 8}
!30 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIiEE", !6, i64 0, !10, i64 8}
!31 = !{!"_ZTS16b2GrowableBufferIiE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!32 = !{!"_ZTS16b2GrowableBufferIN16b2ParticleSystem5ProxyEE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!33 = !{!"_ZTS16b2GrowableBufferI17b2ParticleContactE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!34 = !{!"_ZTS16b2GrowableBufferI21b2ParticleBodyContactE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!35 = !{!"_ZTS16b2GrowableBufferI14b2ParticlePairE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!36 = !{!"_ZTS16b2GrowableBufferI15b2ParticleTriadE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!37 = !{!"long long", !7, i64 0}
!38 = !{!"_ZTS19b2ParticleSystemDef", !17, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !10, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !18, i64 40, !18, i64 44, !18, i64 48, !18, i64 52, !18, i64 56, !18, i64 60, !18, i64 64, !10, i64 68, !18, i64 72, !17, i64 76, !18, i64 80}
!39 = !{!16, !6, i64 272}
!40 = !{!16, !6, i64 288}
!41 = !{!16, !6, i64 304}
!42 = !{!16, !6, i64 144}
!43 = !{!16, !6, i64 160}
!44 = !{!16, !6, i64 240}
!45 = !{!16, !17, i64 21}
!46 = !{i8 0, i8 2}
!47 = !{}
!48 = !{!16, !6, i64 176}
!49 = !{!16, !6, i64 192}
!50 = !{!16, !6, i64 216}
!51 = !{!16, !6, i64 224}
!52 = !{!16, !6, i64 248}
!53 = !{!16, !6, i64 112}
!54 = distinct !{!54, !55}
!55 = !{!"llvm.loop.mustprogress"}
!56 = !{!16, !6, i64 464}
!57 = !{!16, !6, i64 480}
!58 = distinct !{!58, !55}
!59 = !{!60, !10, i64 0}
!60 = !{!"_ZTSN16b2ParticleSystem5ProxyE", !10, i64 0, !10, i64 4}
!61 = distinct !{!61, !55}
!62 = distinct !{!62, !55}
!63 = !{!64, !10, i64 0}
!64 = !{!"_ZTS21b2ParticleBodyContact", !10, i64 0, !6, i64 8, !6, i64 16, !18, i64 24, !65, i64 28, !18, i64 36}
!65 = !{!"_ZTS6b2Vec2", !18, i64 0, !18, i64 4}
!66 = distinct !{!66, !55}
!67 = !{!68, !10, i64 0}
!68 = !{!"_ZTS14b2ParticlePair", !10, i64 0, !10, i64 4, !10, i64 8, !18, i64 12, !18, i64 16}
!69 = !{!68, !10, i64 4}
!70 = distinct !{!70, !55}
!71 = !{!72, !10, i64 0}
!72 = !{!"_ZTS15b2ParticleTriad", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !18, i64 16, !65, i64 20, !65, i64 28, !65, i64 36, !18, i64 44, !18, i64 48, !18, i64 52, !18, i64 56}
!73 = !{!72, !10, i64 4}
!74 = !{!72, !10, i64 8}
!75 = distinct !{!75, !55}
!76 = !{!16, !6, i64 512}
!77 = !{!78, !10, i64 8}
!78 = !{!"_ZTS15b2ParticleGroup", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !18, i64 20, !6, i64 24, !6, i64 32, !10, i64 40, !18, i64 44, !18, i64 48, !65, i64 52, !65, i64 60, !18, i64 68, !79, i64 72, !6, i64 88}
!79 = !{!"_ZTS11b2Transform", !65, i64 0, !80, i64 8}
!80 = !{!"_ZTS5b2Rot", !18, i64 0, !18, i64 4}
!81 = !{!78, !10, i64 12}
!82 = distinct !{!82, !55}


; 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.NewIndices = type { i32, i32, i32 }
%struct.b2Vec2 = type { float, float }
%class.b2ParticleColor = type { i8, i8, i8, i8 }
%"struct.b2ParticleSystem::Proxy" = type { i32, i32 }

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._ZN16b2ParticleSystem12RotateBufferEiii = external hidden unnamed_addr constant [57 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem12RotateBufferEiii(ptr noundef nonnull align 8 dereferenceable(632) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 align 2 {
  %5 = alloca %struct.NewIndices, align 4
  %6 = icmp eq i32 %1, %2
  %7 = icmp eq i32 %2, %3
  %or.cond = or i1 %6, %7
  br i1 %or.cond, label %207, label %8

8:                                                ; preds = %4
  %9 = icmp sge i32 %2, %1
  %10 = icmp sle i32 %2, %3
  %11 = and i1 %9, %10
  br i1 %11, label %13, label %12

12:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.1, i32 noundef 3850, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16b2ParticleSystem12RotateBufferEiii) #6
  unreachable

13:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  store i32 %1, ptr %5, align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %2, ptr %14, align 4, !tbaa !10
  %15 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 %3, ptr %15, align 4, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %0, i64 128
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = sext i32 %1 to i64
  %19 = getelementptr inbounds i32, ptr %17, i64 %18
  %20 = sext i32 %2 to i64
  %21 = getelementptr inbounds i32, ptr %17, i64 %20
  %22 = sext i32 %3 to i64
  %23 = getelementptr inbounds i32, ptr %17, i64 %22
  %24 = tail call noundef ptr @_ZNSt3_V26rotateIPjEET_S2_S2_S2_(ptr noundef %19, ptr noundef %21, ptr noundef %23)
  %25 = getelementptr inbounds i8, ptr %0, i64 272
  %26 = load ptr, ptr %25, align 8, !tbaa !37
  %.not = icmp eq ptr %26, null
  br i1 %.not, label %32, label %27

27:                                               ; preds = %13
  %28 = getelementptr inbounds i32, ptr %26, i64 %18
  %29 = getelementptr inbounds i32, ptr %26, i64 %20
  %30 = getelementptr inbounds i32, ptr %26, i64 %22
  %31 = tail call noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef nonnull %30)
  br label %32

32:                                               ; preds = %27, %13
  %33 = getelementptr inbounds i8, ptr %0, i64 288
  %34 = load ptr, ptr %33, align 8, !tbaa !38
  %.not126 = icmp eq ptr %34, null
  br i1 %.not126, label %40, label %35

35:                                               ; preds = %32
  %36 = getelementptr inbounds i32, ptr %34, i64 %18
  %37 = getelementptr inbounds i32, ptr %34, i64 %20
  %38 = getelementptr inbounds i32, ptr %34, i64 %22
  %39 = tail call noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef nonnull %36, ptr noundef nonnull %37, ptr noundef nonnull %38)
  br label %40

40:                                               ; preds = %35, %32
  %41 = getelementptr inbounds i8, ptr %0, i64 304
  %42 = load ptr, ptr %41, align 8, !tbaa !39
  %.not127 = icmp eq ptr %42, null
  br i1 %.not127, label %48, label %43

43:                                               ; preds = %40
  %44 = getelementptr inbounds i32, ptr %42, i64 %18
  %45 = getelementptr inbounds i32, ptr %42, i64 %20
  %46 = getelementptr inbounds i32, ptr %42, i64 %22
  %47 = tail call noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef nonnull %44, ptr noundef nonnull %45, ptr noundef nonnull %46)
  br label %48

48:                                               ; preds = %43, %40
  %49 = getelementptr inbounds i8, ptr %0, i64 144
  %50 = load ptr, ptr %49, align 8, !tbaa !40
  %51 = getelementptr inbounds %struct.b2Vec2, ptr %50, i64 %18
  %52 = getelementptr inbounds %struct.b2Vec2, ptr %50, i64 %20
  %53 = getelementptr inbounds %struct.b2Vec2, ptr %50, i64 %22
  %54 = tail call noundef ptr @_ZNSt3_V26rotateIP6b2Vec2EET_S3_S3_S3_(ptr noundef %51, ptr noundef %52, ptr noundef %53)
  %55 = getelementptr inbounds i8, ptr %0, i64 160
  %56 = load ptr, ptr %55, align 8, !tbaa !41
  %57 = getelementptr inbounds %struct.b2Vec2, ptr %56, i64 %18
  %58 = getelementptr inbounds %struct.b2Vec2, ptr %56, i64 %20
  %59 = getelementptr inbounds %struct.b2Vec2, ptr %56, i64 %22
  %60 = tail call noundef ptr @_ZNSt3_V26rotateIP6b2Vec2EET_S3_S3_S3_(ptr noundef %57, ptr noundef %58, ptr noundef %59)
  %61 = getelementptr inbounds i8, ptr %0, i64 240
  %62 = load ptr, ptr %61, align 8, !tbaa !42
  %63 = getelementptr inbounds ptr, ptr %62, i64 %18
  %64 = getelementptr inbounds ptr, ptr %62, i64 %20
  %65 = getelementptr inbounds ptr, ptr %62, i64 %22
  %66 = tail call noundef ptr @_ZNSt3_V26rotateIPP15b2ParticleGroupEET_S4_S4_S4_(ptr noundef %63, ptr noundef %64, ptr noundef %65)
  %67 = getelementptr inbounds i8, ptr %0, i64 21
  %68 = load i8, ptr %67, align 1, !tbaa !43, !range !44, !noundef !45
  %69 = trunc nuw i8 %68 to i1
  br i1 %69, label %70, label %77

70:                                               ; preds = %48
  %71 = getelementptr inbounds i8, ptr %0, i64 176
  %72 = load ptr, ptr %71, align 8, !tbaa !46
  %73 = getelementptr inbounds %struct.b2Vec2, ptr %72, i64 %18
  %74 = getelementptr inbounds %struct.b2Vec2, ptr %72, i64 %20
  %75 = getelementptr inbounds %struct.b2Vec2, ptr %72, i64 %22
  %76 = tail call noundef ptr @_ZNSt3_V26rotateIP6b2Vec2EET_S3_S3_S3_(ptr noundef %73, ptr noundef %74, ptr noundef %75)
  br label %77

77:                                               ; preds = %70, %48
  %78 = getelementptr inbounds i8, ptr %0, i64 192
  %79 = load ptr, ptr %78, align 8, !tbaa !47
  %.not128 = icmp eq ptr %79, null
  br i1 %.not128, label %85, label %80

80:                                               ; preds = %77
  %81 = getelementptr inbounds float, ptr %79, i64 %18
  %82 = getelementptr inbounds float, ptr %79, i64 %20
  %83 = getelementptr inbounds float, ptr %79, i64 %22
  %84 = tail call noundef ptr @_ZNSt3_V26rotateIPfEET_S2_S2_S2_(ptr noundef nonnull %81, ptr noundef nonnull %82, ptr noundef nonnull %83)
  br label %85

85:                                               ; preds = %80, %77
  %86 = getelementptr inbounds i8, ptr %0, i64 216
  %87 = load ptr, ptr %86, align 8, !tbaa !48
  %.not129 = icmp eq ptr %87, null
  br i1 %.not129, label %93, label %88

88:                                               ; preds = %85
  %89 = getelementptr inbounds float, ptr %87, i64 %18
  %90 = getelementptr inbounds float, ptr %87, i64 %20
  %91 = getelementptr inbounds float, ptr %87, i64 %22
  %92 = tail call noundef ptr @_ZNSt3_V26rotateIPfEET_S2_S2_S2_(ptr noundef nonnull %89, ptr noundef nonnull %90, ptr noundef nonnull %91)
  br label %93

93:                                               ; preds = %88, %85
  %94 = getelementptr inbounds i8, ptr %0, i64 224
  %95 = load ptr, ptr %94, align 8, !tbaa !49
  %.not130 = icmp eq ptr %95, null
  br i1 %.not130, label %101, label %96

96:                                               ; preds = %93
  %97 = getelementptr inbounds %class.b2ParticleColor, ptr %95, i64 %18
  %98 = getelementptr inbounds %class.b2ParticleColor, ptr %95, i64 %20
  %99 = getelementptr inbounds %class.b2ParticleColor, ptr %95, i64 %22
  %100 = tail call noundef ptr @_ZNSt3_V26rotateIP15b2ParticleColorEET_S3_S3_S3_(ptr noundef nonnull %97, ptr noundef nonnull %98, ptr noundef nonnull %99)
  br label %101

101:                                              ; preds = %96, %93
  %102 = getelementptr inbounds i8, ptr %0, i64 248
  %103 = load ptr, ptr %102, align 8, !tbaa !50
  %.not131 = icmp eq ptr %103, null
  br i1 %.not131, label %109, label %104

104:                                              ; preds = %101
  %105 = getelementptr inbounds ptr, ptr %103, i64 %18
  %106 = getelementptr inbounds ptr, ptr %103, i64 %20
  %107 = getelementptr inbounds ptr, ptr %103, i64 %22
  %108 = tail call noundef ptr @_ZNSt3_V26rotateIPPvEET_S3_S3_S3_(ptr noundef nonnull %105, ptr noundef nonnull %106, ptr noundef nonnull %107)
  br label %109

109:                                              ; preds = %104, %101
  %110 = getelementptr inbounds i8, ptr %0, i64 112
  %111 = load ptr, ptr %110, align 8, !tbaa !51
  %.not132 = icmp eq ptr %111, null
  br i1 %.not132, label %.loopexit139, label %112

112:                                              ; preds = %109
  %113 = getelementptr inbounds ptr, ptr %111, i64 %18
  %114 = getelementptr inbounds ptr, ptr %111, i64 %20
  %115 = getelementptr inbounds ptr, ptr %111, i64 %22
  %116 = tail call noundef ptr @_ZNSt3_V26rotateIPP16b2ParticleHandleEET_S4_S4_S4_(ptr noundef nonnull %113, ptr noundef nonnull %114, ptr noundef nonnull %115)
  %117 = icmp slt i32 %1, %3
  br i1 %117, label %.lr.ph, label %.loopexit139

.lr.ph:                                           ; preds = %112, %124
  %indvars.iv = phi i64 [ %indvars.iv.next, %124 ], [ %18, %112 ]
  %118 = load ptr, ptr %110, align 8, !tbaa !51
  %119 = getelementptr inbounds ptr, ptr %118, i64 %indvars.iv
  %120 = load ptr, ptr %119, align 8, !tbaa !52
  %.not135 = icmp eq ptr %120, null
  br i1 %.not135, label %124, label %121

121:                                              ; preds = %.lr.ph
  %122 = call noundef i32 @_ZNK16b2ParticleHandle8GetIndexEv(ptr noundef nonnull align 8 dereferenceable(20) %120)
  %123 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %122)
  call void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20) %120, i32 noundef %123)
  br label %124

124:                                              ; preds = %121, %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %lftr.wideiv, %3
  br i1 %exitcond.not, label %.loopexit139, label %.lr.ph, !llvm.loop !53

.loopexit139:                                     ; preds = %124, %112, %109
  %125 = getelementptr inbounds i8, ptr %0, i64 464
  %126 = load ptr, ptr %125, align 8, !tbaa !55
  %.not133 = icmp eq ptr %126, null
  br i1 %.not133, label %.loopexit, label %127

127:                                              ; preds = %.loopexit139
  %128 = getelementptr inbounds i32, ptr %126, i64 %18
  %129 = getelementptr inbounds i32, ptr %126, i64 %20
  %130 = getelementptr inbounds i32, ptr %126, i64 %22
  %131 = call noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef nonnull %128, ptr noundef nonnull %129, ptr noundef nonnull %130)
  %132 = call noundef i32 @_ZNK16b2ParticleSystem16GetParticleCountEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  %133 = getelementptr inbounds i8, ptr %0, i64 480
  %134 = load ptr, ptr %133, align 8, !tbaa !56
  %135 = icmp sgt i32 %132, 0
  br i1 %135, label %.lr.ph142.preheader, label %.loopexit

.lr.ph142.preheader:                              ; preds = %127
  %wide.trip.count = zext nneg i32 %132 to i64
  br label %.lr.ph142

.lr.ph142:                                        ; preds = %.lr.ph142.preheader, %.lr.ph142
  %indvars.iv159 = phi i64 [ 0, %.lr.ph142.preheader ], [ %indvars.iv.next160, %.lr.ph142 ]
  %136 = getelementptr inbounds i32, ptr %134, i64 %indvars.iv159
  %137 = load i32, ptr %136, align 4, !tbaa !57
  %138 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %137)
  store i32 %138, ptr %136, align 4, !tbaa !57
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %exitcond162.not = icmp eq i64 %indvars.iv.next160, %wide.trip.count
  br i1 %exitcond162.not, label %.loopexit, label %.lr.ph142, !llvm.loop !58

.loopexit:                                        ; preds = %.lr.ph142, %127, %.loopexit139
  %139 = getelementptr inbounds i8, ptr %0, i64 344
  %140 = call noundef i32 @_ZNK16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %139)
  %141 = icmp sgt i32 %140, 0
  br i1 %141, label %.lr.ph144, label %.preheader138

.preheader138:                                    ; preds = %.lr.ph144, %.loopexit
  %142 = getelementptr inbounds i8, ptr %0, i64 368
  %143 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %142)
  %144 = icmp sgt i32 %143, 0
  br i1 %144, label %.lr.ph146, label %.preheader137

.lr.ph144:                                        ; preds = %.loopexit, %.lr.ph144
  %indvars.iv163 = phi i64 [ %indvars.iv.next164, %.lr.ph144 ], [ 0, %.loopexit ]
  %145 = call noundef ptr @_ZN16b2GrowableBufferIN16b2ParticleSystem5ProxyEE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24) %139)
  %146 = getelementptr inbounds %"struct.b2ParticleSystem::Proxy", ptr %145, i64 %indvars.iv163
  %147 = load i32, ptr %146, align 4, !tbaa !59
  %148 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %147)
  store i32 %148, ptr %146, align 4, !tbaa !59
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %149 = call noundef i32 @_ZNK16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %139)
  %150 = sext i32 %149 to i64
  %151 = icmp slt i64 %indvars.iv.next164, %150
  br i1 %151, label %.lr.ph144, label %.preheader138, !llvm.loop !61

.preheader137:                                    ; preds = %.lr.ph146, %.preheader138
  %152 = getelementptr inbounds i8, ptr %0, i64 392
  %153 = call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %152)
  %154 = icmp sgt i32 %153, 0
  br i1 %154, label %.lr.ph148, label %.preheader136

.lr.ph146:                                        ; preds = %.preheader138, %.lr.ph146
  %.0112145 = phi i32 [ %160, %.lr.ph146 ], [ 0, %.preheader138 ]
  %155 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %142, i32 noundef %.0112145)
  %156 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %155)
  %157 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %156)
  %158 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %155)
  %159 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %158)
  call void @_ZN17b2ParticleContact10SetIndicesEii(ptr noundef nonnull align 4 dereferenceable(24) %155, i32 noundef %157, i32 noundef %159)
  %160 = add nuw nsw i32 %.0112145, 1
  %161 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %142)
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %.lr.ph146, label %.preheader137, !llvm.loop !62

.preheader136:                                    ; preds = %.lr.ph148, %.preheader137
  %163 = getelementptr inbounds i8, ptr %0, i64 416
  %164 = call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %163)
  %165 = icmp sgt i32 %164, 0
  br i1 %165, label %.lr.ph150, label %.preheader

.lr.ph148:                                        ; preds = %.preheader137, %.lr.ph148
  %.0111147 = phi i32 [ %169, %.lr.ph148 ], [ 0, %.preheader137 ]
  %166 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %152, i32 noundef %.0111147)
  %167 = load i32, ptr %166, align 8, !tbaa !63
  %168 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %167)
  store i32 %168, ptr %166, align 8, !tbaa !63
  %169 = add nuw nsw i32 %.0111147, 1
  %170 = call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %152)
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %.lr.ph148, label %.preheader136, !llvm.loop !66

.preheader:                                       ; preds = %.lr.ph150, %.preheader136
  %172 = getelementptr inbounds i8, ptr %0, i64 440
  %173 = call noundef i32 @_ZNK16b2GrowableBufferI15b2ParticleTriadE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %172)
  %174 = icmp sgt i32 %173, 0
  br i1 %174, label %.lr.ph152, label %._crit_edge

.lr.ph150:                                        ; preds = %.preheader136, %.lr.ph150
  %.0109149 = phi i32 [ %181, %.lr.ph150 ], [ 0, %.preheader136 ]
  %175 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairEixEi(ptr noundef nonnull align 8 dereferenceable(24) %163, i32 noundef %.0109149)
  %176 = load i32, ptr %175, align 4, !tbaa !67
  %177 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %176)
  store i32 %177, ptr %175, align 4, !tbaa !67
  %178 = getelementptr inbounds i8, ptr %175, i64 4
  %179 = load i32, ptr %178, align 4, !tbaa !69
  %180 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %179)
  store i32 %180, ptr %178, align 4, !tbaa !69
  %181 = add nuw nsw i32 %.0109149, 1
  %182 = call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %163)
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %.lr.ph150, label %.preheader, !llvm.loop !70

._crit_edge:                                      ; preds = %.lr.ph152, %.preheader
  %184 = getelementptr inbounds i8, ptr %0, i64 512
  %185 = load ptr, ptr %184, align 8, !tbaa !71
  %.not134153 = icmp eq ptr %185, null
  br i1 %.not134153, label %._crit_edge157, label %.lr.ph156

.lr.ph152:                                        ; preds = %.preheader, %.lr.ph152
  %.0107151 = phi i32 [ %195, %.lr.ph152 ], [ 0, %.preheader ]
  %186 = call noundef nonnull align 4 dereferenceable(60) ptr @_ZN16b2GrowableBufferI15b2ParticleTriadEixEi(ptr noundef nonnull align 8 dereferenceable(24) %172, i32 noundef %.0107151)
  %187 = load i32, ptr %186, align 4, !tbaa !72
  %188 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %187)
  store i32 %188, ptr %186, align 4, !tbaa !72
  %189 = getelementptr inbounds i8, ptr %186, i64 4
  %190 = load i32, ptr %189, align 4, !tbaa !74
  %191 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %190)
  store i32 %191, ptr %189, align 4, !tbaa !74
  %192 = getelementptr inbounds i8, ptr %186, i64 8
  %193 = load i32, ptr %192, align 4, !tbaa !75
  %194 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %193)
  store i32 %194, ptr %192, align 4, !tbaa !75
  %195 = add nuw nsw i32 %.0107151, 1
  %196 = call noundef i32 @_ZNK16b2GrowableBufferI15b2ParticleTriadE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %172)
  %197 = icmp slt i32 %195, %196
  br i1 %197, label %.lr.ph152, label %._crit_edge, !llvm.loop !76

._crit_edge157:                                   ; preds = %.lr.ph156, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  br label %207

.lr.ph156:                                        ; preds = %._crit_edge, %.lr.ph156
  %.0154 = phi ptr [ %206, %.lr.ph156 ], [ %185, %._crit_edge ]
  %198 = getelementptr inbounds i8, ptr %.0154, i64 8
  %199 = load i32, ptr %198, align 8, !tbaa !77
  %200 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %199)
  store i32 %200, ptr %198, align 8, !tbaa !77
  %201 = getelementptr inbounds i8, ptr %.0154, i64 12
  %202 = load i32, ptr %201, align 4, !tbaa !81
  %203 = add nsw i32 %202, -1
  %204 = call noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef %203)
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %201, align 4, !tbaa !81
  %206 = call noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96) %.0154)
  %.not134 = icmp eq ptr %206, null
  br i1 %.not134, label %._crit_edge157, label %.lr.ph156, !llvm.loop !82

207:                                              ; preds = %4, %._crit_edge157
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2ParticleSystem16GetParticleCountEv(ptr noundef nonnull align 8 dereferenceable(632)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI15b2ParticleTriadE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(60) ptr @_ZN16b2GrowableBufferI15b2ParticleTriadEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN16b2GrowableBufferIN16b2ParticleSystem5ProxyEE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN17b2ParticleContact10SetIndicesEii(ptr noundef nonnull align 4 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPjEET_S2_S2_S2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPiEET_S2_S2_S2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIP6b2Vec2EET_S3_S3_S3_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPP15b2ParticleGroupEET_S4_S4_S4_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPfEET_S2_S2_S2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIP15b2ParticleColorEET_S3_S3_S3_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPPvEET_S3_S3_S3_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPP16b2ParticleHandleEET_S4_S4_S4_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZZN16b2ParticleSystem12RotateBufferEiiiENK10NewIndicesixEi(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2ParticleHandle8GetIndexEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #4 align 2

attributes #0 = { noreturn nounwind "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 mustprogress 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 = { mustprogress 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 = { inlinehint mustprogress 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 #6 = { noreturn nounwind }
attributes #7 = { 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 0}
!6 = !{!"_ZTSZN16b2ParticleSystem12RotateBufferEiiiE10NewIndices", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!6, !7, i64 8}
!12 = !{!13, !20, i64 128}
!13 = !{!"_ZTS16b2ParticleSystem", !14, i64 0, !7, i64 4, !7, i64 8, !14, i64 12, !7, i64 16, !14, i64 20, !14, i64 21, !7, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !7, i64 44, !7, i64 48, !16, i64 56, !23, i64 112, !24, i64 128, !25, i64 144, !25, i64 160, !20, i64 176, !20, i64 184, !20, i64 192, !20, i64 200, !20, i64 208, !20, i64 216, !26, i64 224, !20, i64 240, !27, i64 248, !7, i64 264, !28, i64 272, !28, i64 288, !28, i64 304, !29, i64 320, !30, i64 344, !31, i64 368, !32, i64 392, !33, i64 416, !34, i64 440, !28, i64 464, !28, i64 480, !35, i64 496, !14, i64 504, !7, i64 508, !20, i64 512, !36, i64 520, !20, i64 608, !20, i64 616, !20, i64 624}
!14 = !{!"bool", !8, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = !{!"_ZTS15b2SlabAllocatorI16b2ParticleHandleE", !17, i64 0, !7, i64 16, !21, i64 24}
!17 = !{!"_ZTS23b2TrackedBlockAllocator", !18, i64 0}
!18 = !{!"_ZTS24b2TypedIntrusiveListNodeI14b2TrackedBlockE", !19, i64 0}
!19 = !{!"_ZTS19b2IntrusiveListNode", !20, i64 0, !20, i64 8}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!"_ZTS15b2TypedFreeListI16b2ParticleHandleE", !22, i64 0}
!22 = !{!"_ZTS10b2FreeList", !19, i64 0, !19, i64 16}
!23 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIP16b2ParticleHandleEE", !20, i64 0, !7, i64 8}
!24 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIjEE", !20, i64 0, !7, i64 8}
!25 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI6b2Vec2EE", !20, i64 0, !7, i64 8}
!26 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI15b2ParticleColorEE", !20, i64 0, !7, i64 8}
!27 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIPvEE", !20, i64 0, !7, i64 8}
!28 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIiEE", !20, i64 0, !7, i64 8}
!29 = !{!"_ZTS16b2GrowableBufferIiE", !20, i64 0, !7, i64 8, !7, i64 12, !20, i64 16}
!30 = !{!"_ZTS16b2GrowableBufferIN16b2ParticleSystem5ProxyEE", !20, i64 0, !7, i64 8, !7, i64 12, !20, i64 16}
!31 = !{!"_ZTS16b2GrowableBufferI17b2ParticleContactE", !20, i64 0, !7, i64 8, !7, i64 12, !20, i64 16}
!32 = !{!"_ZTS16b2GrowableBufferI21b2ParticleBodyContactE", !20, i64 0, !7, i64 8, !7, i64 12, !20, i64 16}
!33 = !{!"_ZTS16b2GrowableBufferI14b2ParticlePairE", !20, i64 0, !7, i64 8, !7, i64 12, !20, i64 16}
!34 = !{!"_ZTS16b2GrowableBufferI15b2ParticleTriadE", !20, i64 0, !7, i64 8, !7, i64 12, !20, i64 16}
!35 = !{!"long long", !8, i64 0}
!36 = !{!"_ZTS19b2ParticleSystemDef", !14, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !7, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56, !15, i64 60, !15, i64 64, !7, i64 68, !15, i64 72, !14, i64 76, !15, i64 80}
!37 = !{!13, !20, i64 272}
!38 = !{!13, !20, i64 288}
!39 = !{!13, !20, i64 304}
!40 = !{!13, !20, i64 144}
!41 = !{!13, !20, i64 160}
!42 = !{!13, !20, i64 240}
!43 = !{!13, !14, i64 21}
!44 = !{i8 0, i8 2}
!45 = !{}
!46 = !{!13, !20, i64 176}
!47 = !{!13, !20, i64 192}
!48 = !{!13, !20, i64 216}
!49 = !{!13, !20, i64 224}
!50 = !{!13, !20, i64 248}
!51 = !{!13, !20, i64 112}
!52 = !{!20, !20, i64 0}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}
!55 = !{!13, !20, i64 464}
!56 = !{!13, !20, i64 480}
!57 = !{!7, !7, i64 0}
!58 = distinct !{!58, !54}
!59 = !{!60, !7, i64 0}
!60 = !{!"_ZTSN16b2ParticleSystem5ProxyE", !7, i64 0, !7, i64 4}
!61 = distinct !{!61, !54}
!62 = distinct !{!62, !54}
!63 = !{!64, !7, i64 0}
!64 = !{!"_ZTS21b2ParticleBodyContact", !7, i64 0, !20, i64 8, !20, i64 16, !15, i64 24, !65, i64 28, !15, i64 36}
!65 = !{!"_ZTS6b2Vec2", !15, i64 0, !15, i64 4}
!66 = distinct !{!66, !54}
!67 = !{!68, !7, i64 0}
!68 = !{!"_ZTS14b2ParticlePair", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 12, !15, i64 16}
!69 = !{!68, !7, i64 4}
!70 = distinct !{!70, !54}
!71 = !{!13, !20, i64 512}
!72 = !{!73, !7, i64 0}
!73 = !{!"_ZTS15b2ParticleTriad", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !15, i64 16, !65, i64 20, !65, i64 28, !65, i64 36, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56}
!74 = !{!73, !7, i64 4}
!75 = !{!73, !7, i64 8}
!76 = distinct !{!76, !54}
!77 = !{!78, !7, i64 8}
!78 = !{!"_ZTS15b2ParticleGroup", !20, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !15, i64 20, !20, i64 24, !20, i64 32, !7, i64 40, !15, i64 44, !15, i64 48, !65, i64 52, !65, i64 60, !15, i64 68, !79, i64 72, !20, i64 88}
!79 = !{!"_ZTS11b2Transform", !65, i64 0, !80, i64 8}
!80 = !{!"_ZTS5b2Rot", !15, i64 0, !15, i64 4}
!81 = !{!78, !7, i64 12}
!82 = distinct !{!82, !54}


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