; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (particle_system_data2)

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

%"class.jet::ArrayAccessor" = type { i64, ptr }
%class.anon = type { ptr, ptr, ptr }
%class.anon.27 = type { ptr, ptr, ptr }
%class.anon.28 = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.2 = external hidden unnamed_addr constant [64 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet19ParticleSystemData26resizeEm(ptr noundef nonnull align 8 dereferenceable(144), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3jet19ParticleSystemData217numberOfParticlesEv(ptr noundef nonnull align 8 dereferenceable(144)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet19ParticleSystemData29positionsEv(ptr dead_on_unwind noalias writable sret(%"class.jet::ArrayAccessor") align 8, ptr noundef nonnull align 8 dereferenceable(144)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet19ParticleSystemData210velocitiesEv(ptr dead_on_unwind noalias writable sret(%"class.jet::ArrayAccessor") align 8, ptr noundef nonnull align 8 dereferenceable(144)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet19ParticleSystemData26forcesEv(ptr dead_on_unwind noalias writable sret(%"class.jet::ArrayAccessor") align 8, ptr noundef nonnull align 8 dereferenceable(144)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3jet19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES6_S6_(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.jet::ArrayAccessor", align 8
  %14 = alloca %"class.jet::ArrayAccessor", align 8
  %15 = alloca %"class.jet::ArrayAccessor", align 8
  %16 = alloca %class.anon, align 8
  %17 = alloca %class.anon.27, align 8
  %18 = alloca %class.anon.28, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
  %22 = icmp ugt i64 %21, 0
  br i1 %22, label %23, label %36

23:                                               ; preds = %4
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %24)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %28 = icmp ne i64 %25, %27
  br i1 %28, label %29, label %36

29:                                               ; preds = %23
  %30 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef @.str.1)
          to label %31 unwind label %32

31:                                               ; preds = %29
  call void @__cxa_throw(ptr %30, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #6
  unreachable

32:                                               ; preds = %29
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %9, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %10, align 4
  call void @__cxa_free_exception(ptr %30) #5
  br label %88

36:                                               ; preds = %23, %4
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %37)
  %39 = icmp ugt i64 %38, 0
  br i1 %39, label %40, label %53

40:                                               ; preds = %36
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %41)
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %43)
  %45 = icmp ne i64 %42, %44
  br i1 %45, label %46, label %53

46:                                               ; preds = %40
  %47 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef @.str.2)
          to label %48 unwind label %49

48:                                               ; preds = %46
  call void @__cxa_throw(ptr %47, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #6
  unreachable

49:                                               ; preds = %46
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %9, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %10, align 4
  call void @__cxa_free_exception(ptr %47) #5
  br label %88

53:                                               ; preds = %40, %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %54 = call noundef i64 @_ZNK3jet19ParticleSystemData217numberOfParticlesEv(ptr noundef nonnull align 8 dereferenceable(144) %19)
  store i64 %54, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %55 = load i64, ptr %11, align 8, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %56)
  %58 = add i64 %55, %57
  store i64 %58, ptr %12, align 8, !tbaa !9
  %59 = load i64, ptr %12, align 8, !tbaa !9
  call void @_ZN3jet19ParticleSystemData26resizeEm(ptr noundef nonnull align 8 dereferenceable(144) %19, i64 noundef %59)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  call void @_ZN3jet19ParticleSystemData29positionsEv(ptr dead_on_unwind writable sret(%"class.jet::ArrayAccessor") align 8 %13, ptr noundef nonnull align 8 dereferenceable(144) %19)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @_ZN3jet19ParticleSystemData210velocitiesEv(ptr dead_on_unwind writable sret(%"class.jet::ArrayAccessor") align 8 %14, ptr noundef nonnull align 8 dereferenceable(144) %19)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @_ZN3jet19ParticleSystemData26forcesEv(ptr dead_on_unwind writable sret(%"class.jet::ArrayAccessor") align 8 %15, ptr noundef nonnull align 8 dereferenceable(144) %19)
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %60)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %62 = getelementptr inbounds %class.anon, ptr %16, i32 0, i32 0
  store ptr %13, ptr %62, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.anon, ptr %16, i32 0, i32 1
  store ptr %11, ptr %63, align 8, !tbaa !5
  %64 = getelementptr inbounds %class.anon, ptr %16, i32 0, i32 2
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %65, ptr %64, align 8, !tbaa !5
  call void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_0EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef 0, i64 noundef %61, ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %66)
  %68 = icmp ugt i64 %67, 0
  br i1 %68, label %69, label %76

69:                                               ; preds = %53
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %70)
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %72 = getelementptr inbounds %class.anon.27, ptr %17, i32 0, i32 0
  store ptr %14, ptr %72, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.anon.27, ptr %17, i32 0, i32 1
  store ptr %11, ptr %73, align 8, !tbaa !5
  %74 = getelementptr inbounds %class.anon.27, ptr %17, i32 0, i32 2
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %75, ptr %74, align 8, !tbaa !5
  call void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_1EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef 0, i64 noundef %71, ptr noundef nonnull align 8 dereferenceable(24) %17, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  br label %76

76:                                               ; preds = %69, %53
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %77)
  %79 = icmp ugt i64 %78, 0
  br i1 %79, label %80, label %87

80:                                               ; preds = %76
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %81)
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  %83 = getelementptr inbounds %class.anon.28, ptr %18, i32 0, i32 0
  store ptr %15, ptr %83, align 8, !tbaa !5
  %84 = getelementptr inbounds %class.anon.28, ptr %18, i32 0, i32 1
  store ptr %11, ptr %84, align 8, !tbaa !5
  %85 = getelementptr inbounds %class.anon.28, ptr %18, i32 0, i32 2
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %86, ptr %85, align 8, !tbaa !5
  call void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_2EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef 0, i64 noundef %82, ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  br label %87

87:                                               ; preds = %80, %76
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret void

88:                                               ; preds = %49, %32
  %89 = load ptr, ptr %9, align 8
  %90 = load i32, ptr %10, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_0EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_1EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_2EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 "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 }
attributes #6 = { noreturn }

!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 = !{!"long", !7, i64 0}


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

%"class.jet::ArrayAccessor" = type { i64, ptr }
%class.anon = type { ptr, ptr, ptr }
%class.anon.27 = type { ptr, ptr, ptr }
%class.anon.28 = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.2 = external hidden unnamed_addr constant [64 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet19ParticleSystemData26resizeEm(ptr noundef nonnull align 8 dereferenceable(144), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3jet19ParticleSystemData217numberOfParticlesEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet19ParticleSystemData29positionsEv(ptr dead_on_unwind noalias writable sret(%"class.jet::ArrayAccessor") align 8, ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet19ParticleSystemData210velocitiesEv(ptr dead_on_unwind noalias writable sret(%"class.jet::ArrayAccessor") align 8, ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet19ParticleSystemData26forcesEv(ptr dead_on_unwind noalias writable sret(%"class.jet::ArrayAccessor") align 8, ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3jet19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES6_S6_(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i64, align 8
  %6 = alloca %"class.jet::ArrayAccessor", align 8
  %7 = alloca %"class.jet::ArrayAccessor", align 8
  %8 = alloca %"class.jet::ArrayAccessor", align 8
  %9 = alloca %class.anon, align 8
  %10 = alloca %class.anon.27, align 8
  %11 = alloca %class.anon.28, align 8
  %12 = tail call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %.not = icmp eq i64 %12, 0
  br i1 %.not, label %21, label %13

13:                                               ; preds = %4
  %14 = tail call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %15 = tail call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %.not19 = icmp eq i64 %14, %15
  br i1 %.not19, label %21, label %16

16:                                               ; preds = %13
  %17 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull @.str.1)
          to label %18 unwind label %19

18:                                               ; preds = %16
  tail call void @__cxa_throw(ptr nonnull %17, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #6
  unreachable

19:                                               ; preds = %16
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %50

21:                                               ; preds = %13, %4
  %22 = tail call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not20 = icmp eq i64 %22, 0
  br i1 %.not20, label %31, label %23

23:                                               ; preds = %21
  %24 = tail call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %25 = tail call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %.not21 = icmp eq i64 %24, %25
  br i1 %.not21, label %31, label %26

26:                                               ; preds = %23
  %27 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull @.str.2)
          to label %28 unwind label %29

28:                                               ; preds = %26
  tail call void @__cxa_throw(ptr nonnull %27, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #6
  unreachable

29:                                               ; preds = %26
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %50

31:                                               ; preds = %23, %21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %32 = tail call noundef i64 @_ZNK3jet19ParticleSystemData217numberOfParticlesEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  store i64 %32, ptr %5, align 8, !tbaa !5
  %33 = tail call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %34 = add i64 %33, %32
  tail call void @_ZN3jet19ParticleSystemData26resizeEm(ptr noundef nonnull align 8 dereferenceable(144) %0, i64 noundef %34)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @_ZN3jet19ParticleSystemData29positionsEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::ArrayAccessor") align 8 %6, ptr noundef nonnull align 8 dereferenceable(144) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  call void @_ZN3jet19ParticleSystemData210velocitiesEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::ArrayAccessor") align 8 %7, ptr noundef nonnull align 8 dereferenceable(144) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @_ZN3jet19ParticleSystemData26forcesEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::ArrayAccessor") align 8 %8, ptr noundef nonnull align 8 dereferenceable(144) %0)
  %35 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  store ptr %6, ptr %9, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %5, ptr %36, align 8, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %9, i64 16
  store ptr %1, ptr %37, align 8, !tbaa !9
  call void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_0EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef 0, i64 noundef %35, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  %38 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %.not22 = icmp eq i64 %38, 0
  br i1 %.not22, label %43, label %39

39:                                               ; preds = %31
  %40 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  store ptr %7, ptr %10, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %5, ptr %41, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %2, ptr %42, align 8, !tbaa !9
  call void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_1EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef 0, i64 noundef %40, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %43

43:                                               ; preds = %39, %31
  %44 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not23 = icmp eq i64 %44, 0
  br i1 %.not23, label %49, label %45

45:                                               ; preds = %43
  %46 = call noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #5
  store ptr %8, ptr %11, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %11, i64 8
  store ptr %5, ptr %47, align 8, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %11, i64 16
  store ptr %3, ptr %48, align 8, !tbaa !9
  call void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_2EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef 0, i64 noundef %46, ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #5
  br label %49

49:                                               ; preds = %45, %43
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  ret void

50:                                               ; preds = %29, %19
  %.sink = phi ptr [ %27, %29 ], [ %17, %19 ]
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %20, %19 ]
  tail call void @__cxa_free_exception(ptr %.sink) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3jet18ConstArrayAccessorINS_6VectorIdLm2EEELm1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_0EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_1EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN3jet11parallelForImZNS_19ParticleSystemData212addParticlesERKNS_18ConstArrayAccessorINS_6VectorIdLm2EEELm1EEES7_S7_E3$_2EEvT_S9_RKT0_NS_15ExecutionPolicyE"(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 "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 }
attributes #6 = { noreturn }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


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