; LLVM IR from pentilm/StellarSolver :: BarnesHutParticleSystem.ll (ZN23BarnesHutParticleSystemaSERKS_)

; 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.BarnesHutParticleSystem = type { %struct.SimulationParameters, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.SimulationParameters = type { i32, i8, i8, i8, i8, float, float, float, float }

@.str = external hidden unnamed_addr constant [83 x i8], align 1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef, ptr noundef, i32 noundef, i1 noundef zeroext) #3

declare i32 @cudaMalloc(ptr noundef, i64 noundef) #4

declare i32 @cudaMemset(ptr noundef, i32 noundef, i64 noundef) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(328) ptr @_ZN23BarnesHutParticleSystemaSERKS_(ptr noundef nonnull align 8 dereferenceable(328) %0, ptr noundef nonnull align 8 dereferenceable(328) %1) #6 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %3, align 8
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = icmp ne ptr %6, %7
  br i1 %8, label %9, label %394

9:                                                ; preds = %2
  %10 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 4
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = icmp eq ptr %11, null
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  call void @_ZdlPvm(ptr noundef %11, i64 noundef 4) #8
  br label %14

14:                                               ; preds = %13, %9
  %15 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 5
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = icmp eq ptr %16, null
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @_ZdlPvm(ptr noundef %16, i64 noundef 4) #8
  br label %19

19:                                               ; preds = %18, %14
  %20 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 6
  %21 = load ptr, ptr %20, align 8, !tbaa !17
  %22 = icmp eq ptr %21, null
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @_ZdlPvm(ptr noundef %21, i64 noundef 4) #8
  br label %24

24:                                               ; preds = %23, %19
  %25 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 7
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %27 = icmp eq ptr %26, null
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @_ZdlPvm(ptr noundef %26, i64 noundef 4) #8
  br label %29

29:                                               ; preds = %28, %24
  %30 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 8
  %31 = load ptr, ptr %30, align 8, !tbaa !19
  %32 = icmp eq ptr %31, null
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @_ZdaPv(ptr noundef %31) #8
  br label %34

34:                                               ; preds = %33, %29
  %35 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 9
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %37 = icmp eq ptr %36, null
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @_ZdaPv(ptr noundef %36) #8
  br label %39

39:                                               ; preds = %38, %34
  %40 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 10
  %41 = load ptr, ptr %40, align 8, !tbaa !21
  %42 = icmp eq ptr %41, null
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @_ZdaPv(ptr noundef %41) #8
  br label %44

44:                                               ; preds = %43, %39
  %45 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 11
  %46 = load ptr, ptr %45, align 8, !tbaa !22
  %47 = icmp eq ptr %46, null
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @_ZdaPv(ptr noundef %46) #8
  br label %49

49:                                               ; preds = %48, %44
  %50 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 12
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  %52 = icmp eq ptr %51, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  call void @_ZdaPv(ptr noundef %51) #8
  br label %54

54:                                               ; preds = %53, %49
  %55 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 13
  %56 = load ptr, ptr %55, align 8, !tbaa !24
  %57 = icmp eq ptr %56, null
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @_ZdaPv(ptr noundef %56) #8
  br label %59

59:                                               ; preds = %58, %54
  %60 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 14
  %61 = load ptr, ptr %60, align 8, !tbaa !25
  %62 = icmp eq ptr %61, null
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @_ZdaPv(ptr noundef %61) #8
  br label %64

64:                                               ; preds = %63, %59
  %65 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 15
  %66 = load ptr, ptr %65, align 8, !tbaa !26
  %67 = icmp eq ptr %66, null
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  call void @_ZdaPv(ptr noundef %66) #8
  br label %69

69:                                               ; preds = %68, %64
  %70 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 16
  %71 = load ptr, ptr %70, align 8, !tbaa !27
  %72 = icmp eq ptr %71, null
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  call void @_ZdaPv(ptr noundef %71) #8
  br label %74

74:                                               ; preds = %73, %69
  %75 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 17
  %76 = load ptr, ptr %75, align 8, !tbaa !28
  %77 = icmp eq ptr %76, null
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  call void @_ZdaPv(ptr noundef %76) #8
  br label %79

79:                                               ; preds = %78, %74
  %80 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 18
  %81 = load ptr, ptr %80, align 8, !tbaa !29
  %82 = icmp eq ptr %81, null
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  call void @_ZdaPv(ptr noundef %81) #8
  br label %84

84:                                               ; preds = %83, %79
  %85 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 38
  %86 = load ptr, ptr %85, align 8, !tbaa !30
  %87 = icmp eq ptr %86, null
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  call void @_ZdaPv(ptr noundef %86) #8
  br label %89

89:                                               ; preds = %88, %84
  %90 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 19
  %91 = load ptr, ptr %90, align 8, !tbaa !31
  %92 = call i32 @cudaFree(ptr noundef %91)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %92, ptr noundef @.str, i32 noundef 166, i1 noundef zeroext true)
  %93 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 20
  %94 = load ptr, ptr %93, align 8, !tbaa !32
  %95 = call i32 @cudaFree(ptr noundef %94)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %95, ptr noundef @.str, i32 noundef 167, i1 noundef zeroext true)
  %96 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 21
  %97 = load ptr, ptr %96, align 8, !tbaa !33
  %98 = call i32 @cudaFree(ptr noundef %97)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %98, ptr noundef @.str, i32 noundef 168, i1 noundef zeroext true)
  %99 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 22
  %100 = load ptr, ptr %99, align 8, !tbaa !34
  %101 = call i32 @cudaFree(ptr noundef %100)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %101, ptr noundef @.str, i32 noundef 169, i1 noundef zeroext true)
  %102 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 23
  %103 = load ptr, ptr %102, align 8, !tbaa !35
  %104 = call i32 @cudaFree(ptr noundef %103)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %104, ptr noundef @.str, i32 noundef 171, i1 noundef zeroext true)
  %105 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 24
  %106 = load ptr, ptr %105, align 8, !tbaa !36
  %107 = call i32 @cudaFree(ptr noundef %106)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %107, ptr noundef @.str, i32 noundef 172, i1 noundef zeroext true)
  %108 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 25
  %109 = load ptr, ptr %108, align 8, !tbaa !37
  %110 = call i32 @cudaFree(ptr noundef %109)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %110, ptr noundef @.str, i32 noundef 173, i1 noundef zeroext true)
  %111 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 26
  %112 = load ptr, ptr %111, align 8, !tbaa !38
  %113 = call i32 @cudaFree(ptr noundef %112)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %113, ptr noundef @.str, i32 noundef 174, i1 noundef zeroext true)
  %114 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 27
  %115 = load ptr, ptr %114, align 8, !tbaa !39
  %116 = call i32 @cudaFree(ptr noundef %115)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %116, ptr noundef @.str, i32 noundef 175, i1 noundef zeroext true)
  %117 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 28
  %118 = load ptr, ptr %117, align 8, !tbaa !40
  %119 = call i32 @cudaFree(ptr noundef %118)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %119, ptr noundef @.str, i32 noundef 176, i1 noundef zeroext true)
  %120 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 29
  %121 = load ptr, ptr %120, align 8, !tbaa !41
  %122 = call i32 @cudaFree(ptr noundef %121)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %122, ptr noundef @.str, i32 noundef 177, i1 noundef zeroext true)
  %123 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 30
  %124 = load ptr, ptr %123, align 8, !tbaa !42
  %125 = call i32 @cudaFree(ptr noundef %124)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %125, ptr noundef @.str, i32 noundef 179, i1 noundef zeroext true)
  %126 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 31
  %127 = load ptr, ptr %126, align 8, !tbaa !43
  %128 = call i32 @cudaFree(ptr noundef %127)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %128, ptr noundef @.str, i32 noundef 180, i1 noundef zeroext true)
  %129 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 32
  %130 = load ptr, ptr %129, align 8, !tbaa !44
  %131 = call i32 @cudaFree(ptr noundef %130)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %131, ptr noundef @.str, i32 noundef 181, i1 noundef zeroext true)
  %132 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 33
  %133 = load ptr, ptr %132, align 8, !tbaa !45
  %134 = call i32 @cudaFree(ptr noundef %133)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %134, ptr noundef @.str, i32 noundef 182, i1 noundef zeroext true)
  %135 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 34
  %136 = load ptr, ptr %135, align 8, !tbaa !46
  %137 = call i32 @cudaFree(ptr noundef %136)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %137, ptr noundef @.str, i32 noundef 183, i1 noundef zeroext true)
  %138 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 35
  %139 = load ptr, ptr %138, align 8, !tbaa !47
  %140 = call i32 @cudaFree(ptr noundef %139)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %140, ptr noundef @.str, i32 noundef 185, i1 noundef zeroext true)
  %141 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 39
  %142 = load ptr, ptr %141, align 8, !tbaa !48
  %143 = call i32 @cudaFree(ptr noundef %142)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %143, ptr noundef @.str, i32 noundef 187, i1 noundef zeroext true)
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %144, i32 0, i32 0
  %146 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %146, ptr align 8 %145, i64 24, i1 false), !tbaa.struct !49
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %147, i32 0, i32 1
  %149 = load i32, ptr %148, align 8, !tbaa !53
  %150 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 1
  store i32 %149, ptr %150, align 8, !tbaa !53
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %151, i32 0, i32 2
  %153 = load i32, ptr %152, align 4, !tbaa !54
  %154 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 2
  store i32 %153, ptr %154, align 4, !tbaa !54
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %155, i32 0, i32 3
  %157 = load i32, ptr %156, align 8, !tbaa !55
  %158 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  store i32 %157, ptr %158, align 8, !tbaa !55
  %159 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #9
  %160 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 4
  store ptr %159, ptr %160, align 8, !tbaa !9
  %161 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #9
  %162 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 5
  store ptr %161, ptr %162, align 8, !tbaa !16
  %163 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #9
  %164 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 6
  store ptr %163, ptr %164, align 8, !tbaa !17
  %165 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #9
  %166 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 7
  store ptr %165, ptr %166, align 8, !tbaa !18
  %167 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %168 = load i32, ptr %167, align 8, !tbaa !55
  %169 = sext i32 %168 to i64
  %170 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %169, i64 4)
  %171 = extractvalue { i64, i1 } %170, 1
  %172 = extractvalue { i64, i1 } %170, 0
  %173 = select i1 %171, i64 -1, i64 %172
  %174 = call noalias noundef nonnull ptr @_Znam(i64 noundef %173) #9
  %175 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 8
  store ptr %174, ptr %175, align 8, !tbaa !19
  %176 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %177 = load i32, ptr %176, align 8, !tbaa !55
  %178 = sext i32 %177 to i64
  %179 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %178, i64 4)
  %180 = extractvalue { i64, i1 } %179, 1
  %181 = extractvalue { i64, i1 } %179, 0
  %182 = select i1 %180, i64 -1, i64 %181
  %183 = call noalias noundef nonnull ptr @_Znam(i64 noundef %182) #9
  %184 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 9
  store ptr %183, ptr %184, align 8, !tbaa !20
  %185 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %186 = load i32, ptr %185, align 8, !tbaa !55
  %187 = sext i32 %186 to i64
  %188 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %187, i64 4)
  %189 = extractvalue { i64, i1 } %188, 1
  %190 = extractvalue { i64, i1 } %188, 0
  %191 = select i1 %189, i64 -1, i64 %190
  %192 = call noalias noundef nonnull ptr @_Znam(i64 noundef %191) #9
  %193 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 10
  store ptr %192, ptr %193, align 8, !tbaa !21
  %194 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %195 = load i32, ptr %194, align 8, !tbaa !55
  %196 = sext i32 %195 to i64
  %197 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %196, i64 4)
  %198 = extractvalue { i64, i1 } %197, 1
  %199 = extractvalue { i64, i1 } %197, 0
  %200 = select i1 %198, i64 -1, i64 %199
  %201 = call noalias noundef nonnull ptr @_Znam(i64 noundef %200) #9
  %202 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 11
  store ptr %201, ptr %202, align 8, !tbaa !22
  %203 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %204 = load i32, ptr %203, align 8, !tbaa !55
  %205 = sext i32 %204 to i64
  %206 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %205, i64 4)
  %207 = extractvalue { i64, i1 } %206, 1
  %208 = extractvalue { i64, i1 } %206, 0
  %209 = select i1 %207, i64 -1, i64 %208
  %210 = call noalias noundef nonnull ptr @_Znam(i64 noundef %209) #9
  %211 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 12
  store ptr %210, ptr %211, align 8, !tbaa !23
  %212 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %213 = load i32, ptr %212, align 8, !tbaa !55
  %214 = sext i32 %213 to i64
  %215 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %214, i64 4)
  %216 = extractvalue { i64, i1 } %215, 1
  %217 = extractvalue { i64, i1 } %215, 0
  %218 = select i1 %216, i64 -1, i64 %217
  %219 = call noalias noundef nonnull ptr @_Znam(i64 noundef %218) #9
  %220 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 13
  store ptr %219, ptr %220, align 8, !tbaa !24
  %221 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %222 = load i32, ptr %221, align 8, !tbaa !55
  %223 = sext i32 %222 to i64
  %224 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %223, i64 4)
  %225 = extractvalue { i64, i1 } %224, 1
  %226 = extractvalue { i64, i1 } %224, 0
  %227 = select i1 %225, i64 -1, i64 %226
  %228 = call noalias noundef nonnull ptr @_Znam(i64 noundef %227) #9
  %229 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 14
  store ptr %228, ptr %229, align 8, !tbaa !25
  %230 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %231 = load i32, ptr %230, align 8, !tbaa !55
  %232 = mul nsw i32 4, %231
  %233 = sext i32 %232 to i64
  %234 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %233, i64 4)
  %235 = extractvalue { i64, i1 } %234, 1
  %236 = extractvalue { i64, i1 } %234, 0
  %237 = select i1 %235, i64 -1, i64 %236
  %238 = call noalias noundef nonnull ptr @_Znam(i64 noundef %237) #9
  %239 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 15
  store ptr %238, ptr %239, align 8, !tbaa !26
  %240 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %241 = load i32, ptr %240, align 8, !tbaa !55
  %242 = sext i32 %241 to i64
  %243 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %242, i64 4)
  %244 = extractvalue { i64, i1 } %243, 1
  %245 = extractvalue { i64, i1 } %243, 0
  %246 = select i1 %244, i64 -1, i64 %245
  %247 = call noalias noundef nonnull ptr @_Znam(i64 noundef %246) #9
  %248 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 16
  store ptr %247, ptr %248, align 8, !tbaa !27
  %249 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %250 = load i32, ptr %249, align 8, !tbaa !55
  %251 = sext i32 %250 to i64
  %252 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %251, i64 4)
  %253 = extractvalue { i64, i1 } %252, 1
  %254 = extractvalue { i64, i1 } %252, 0
  %255 = select i1 %253, i64 -1, i64 %254
  %256 = call noalias noundef nonnull ptr @_Znam(i64 noundef %255) #9
  %257 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 17
  store ptr %256, ptr %257, align 8, !tbaa !28
  %258 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %259 = load i32, ptr %258, align 8, !tbaa !55
  %260 = sext i32 %259 to i64
  %261 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %260, i64 4)
  %262 = extractvalue { i64, i1 } %261, 1
  %263 = extractvalue { i64, i1 } %261, 0
  %264 = select i1 %262, i64 -1, i64 %263
  %265 = call noalias noundef nonnull ptr @_Znam(i64 noundef %264) #9
  %266 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 18
  store ptr %265, ptr %266, align 8, !tbaa !29
  %267 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %268 = load i32, ptr %267, align 8, !tbaa !55
  %269 = mul nsw i32 2, %268
  %270 = sext i32 %269 to i64
  %271 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %270, i64 4)
  %272 = extractvalue { i64, i1 } %271, 1
  %273 = extractvalue { i64, i1 } %271, 0
  %274 = select i1 %272, i64 -1, i64 %273
  %275 = call noalias noundef nonnull ptr @_Znam(i64 noundef %274) #9
  %276 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 38
  store ptr %275, ptr %276, align 8, !tbaa !30
  %277 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 19
  %278 = call i32 @cudaMalloc(ptr noundef %277, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %278, ptr noundef @.str, i32 noundef 213, i1 noundef zeroext true)
  %279 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 20
  %280 = call i32 @cudaMalloc(ptr noundef %279, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %280, ptr noundef @.str, i32 noundef 214, i1 noundef zeroext true)
  %281 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 21
  %282 = call i32 @cudaMalloc(ptr noundef %281, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %282, ptr noundef @.str, i32 noundef 215, i1 noundef zeroext true)
  %283 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 22
  %284 = call i32 @cudaMalloc(ptr noundef %283, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %284, ptr noundef @.str, i32 noundef 216, i1 noundef zeroext true)
  %285 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 19
  %286 = load ptr, ptr %285, align 8, !tbaa !31
  %287 = call i32 @cudaMemset(ptr noundef %286, i32 noundef 0, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %287, ptr noundef @.str, i32 noundef 217, i1 noundef zeroext true)
  %288 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 20
  %289 = load ptr, ptr %288, align 8, !tbaa !32
  %290 = call i32 @cudaMemset(ptr noundef %289, i32 noundef 0, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %290, ptr noundef @.str, i32 noundef 218, i1 noundef zeroext true)
  %291 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 21
  %292 = load ptr, ptr %291, align 8, !tbaa !33
  %293 = call i32 @cudaMemset(ptr noundef %292, i32 noundef 0, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %293, ptr noundef @.str, i32 noundef 219, i1 noundef zeroext true)
  %294 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 22
  %295 = load ptr, ptr %294, align 8, !tbaa !34
  %296 = call i32 @cudaMemset(ptr noundef %295, i32 noundef 0, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %296, ptr noundef @.str, i32 noundef 220, i1 noundef zeroext true)
  %297 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 23
  %298 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %299 = load i32, ptr %298, align 8, !tbaa !55
  %300 = sext i32 %299 to i64
  %301 = mul i64 %300, 4
  %302 = call i32 @cudaMalloc(ptr noundef %297, i64 noundef %301)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %302, ptr noundef @.str, i32 noundef 222, i1 noundef zeroext true)
  %303 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 24
  %304 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %305 = load i32, ptr %304, align 8, !tbaa !55
  %306 = sext i32 %305 to i64
  %307 = mul i64 %306, 4
  %308 = call i32 @cudaMalloc(ptr noundef %303, i64 noundef %307)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %308, ptr noundef @.str, i32 noundef 223, i1 noundef zeroext true)
  %309 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 25
  %310 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %311 = load i32, ptr %310, align 8, !tbaa !55
  %312 = sext i32 %311 to i64
  %313 = mul i64 %312, 4
  %314 = call i32 @cudaMalloc(ptr noundef %309, i64 noundef %313)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %314, ptr noundef @.str, i32 noundef 224, i1 noundef zeroext true)
  %315 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 26
  %316 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %317 = load i32, ptr %316, align 8, !tbaa !55
  %318 = sext i32 %317 to i64
  %319 = mul i64 %318, 4
  %320 = call i32 @cudaMalloc(ptr noundef %315, i64 noundef %319)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %320, ptr noundef @.str, i32 noundef 225, i1 noundef zeroext true)
  %321 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 27
  %322 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %323 = load i32, ptr %322, align 8, !tbaa !55
  %324 = sext i32 %323 to i64
  %325 = mul i64 %324, 4
  %326 = call i32 @cudaMalloc(ptr noundef %321, i64 noundef %325)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %326, ptr noundef @.str, i32 noundef 226, i1 noundef zeroext true)
  %327 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 28
  %328 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %329 = load i32, ptr %328, align 8, !tbaa !55
  %330 = sext i32 %329 to i64
  %331 = mul i64 %330, 4
  %332 = call i32 @cudaMalloc(ptr noundef %327, i64 noundef %331)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %332, ptr noundef @.str, i32 noundef 227, i1 noundef zeroext true)
  %333 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 29
  %334 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %335 = load i32, ptr %334, align 8, !tbaa !55
  %336 = sext i32 %335 to i64
  %337 = mul i64 %336, 4
  %338 = call i32 @cudaMalloc(ptr noundef %333, i64 noundef %337)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %338, ptr noundef @.str, i32 noundef 228, i1 noundef zeroext true)
  %339 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 30
  %340 = call i32 @cudaMalloc(ptr noundef %339, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %340, ptr noundef @.str, i32 noundef 230, i1 noundef zeroext true)
  %341 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 31
  %342 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %343 = load i32, ptr %342, align 8, !tbaa !55
  %344 = mul nsw i32 4, %343
  %345 = sext i32 %344 to i64
  %346 = mul i64 %345, 4
  %347 = call i32 @cudaMalloc(ptr noundef %341, i64 noundef %346)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %347, ptr noundef @.str, i32 noundef 231, i1 noundef zeroext true)
  %348 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 32
  %349 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %350 = load i32, ptr %349, align 8, !tbaa !55
  %351 = sext i32 %350 to i64
  %352 = mul i64 %351, 4
  %353 = call i32 @cudaMalloc(ptr noundef %348, i64 noundef %352)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %353, ptr noundef @.str, i32 noundef 232, i1 noundef zeroext true)
  %354 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 33
  %355 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %356 = load i32, ptr %355, align 8, !tbaa !55
  %357 = sext i32 %356 to i64
  %358 = mul i64 %357, 4
  %359 = call i32 @cudaMalloc(ptr noundef %354, i64 noundef %358)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %359, ptr noundef @.str, i32 noundef 233, i1 noundef zeroext true)
  %360 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 34
  %361 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %362 = load i32, ptr %361, align 8, !tbaa !55
  %363 = sext i32 %362 to i64
  %364 = mul i64 %363, 4
  %365 = call i32 @cudaMalloc(ptr noundef %360, i64 noundef %364)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %365, ptr noundef @.str, i32 noundef 234, i1 noundef zeroext true)
  %366 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 35
  %367 = call i32 @cudaMalloc(ptr noundef %366, i64 noundef 4)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %367, ptr noundef @.str, i32 noundef 235, i1 noundef zeroext true)
  %368 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 32
  %369 = load ptr, ptr %368, align 8, !tbaa !44
  %370 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %371 = load i32, ptr %370, align 8, !tbaa !55
  %372 = sext i32 %371 to i64
  %373 = mul i64 %372, 4
  %374 = call i32 @cudaMemset(ptr noundef %369, i32 noundef -1, i64 noundef %373)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %374, ptr noundef @.str, i32 noundef 237, i1 noundef zeroext true)
  %375 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 33
  %376 = load ptr, ptr %375, align 8, !tbaa !45
  %377 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %378 = load i32, ptr %377, align 8, !tbaa !55
  %379 = sext i32 %378 to i64
  %380 = mul i64 %379, 4
  %381 = call i32 @cudaMemset(ptr noundef %376, i32 noundef 0, i64 noundef %380)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %381, ptr noundef @.str, i32 noundef 238, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #10
  %382 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 2
  %383 = load i32, ptr %382, align 4, !tbaa !54
  %384 = sext i32 %383 to i64
  %385 = mul i64 8, %384
  %386 = trunc i64 %385 to i32
  store i32 %386, ptr %5, align 4, !tbaa !56
  %387 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 39
  %388 = getelementptr inbounds %class.BarnesHutParticleSystem, ptr %6, i32 0, i32 3
  %389 = load i32, ptr %388, align 8, !tbaa !55
  %390 = mul nsw i32 2, %389
  %391 = sext i32 %390 to i64
  %392 = mul i64 %391, 4
  %393 = call i32 @cudaMalloc(ptr noundef %387, i64 noundef %392)
  call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %393, ptr noundef @.str, i32 noundef 242, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  br label %394

394:                                              ; preds = %89, %2
  ret ptr %6
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #7

declare i32 @cudaFree(ptr noundef) #4

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nobuiltin 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 #8 = { builtin nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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, !6, i64 40}
!10 = !{!"_ZTS23BarnesHutParticleSystem", !11, i64 0, !15, i64 24, !15, i64 28, !15, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320}
!11 = !{!"_ZTS20SimulationParameters", !12, i64 0, !13, i64 4, !13, i64 5, !13, i64 6, !13, i64 7, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!12 = !{!"_ZTS5Model", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!10, !6, i64 48}
!17 = !{!10, !6, i64 56}
!18 = !{!10, !6, i64 64}
!19 = !{!10, !6, i64 72}
!20 = !{!10, !6, i64 80}
!21 = !{!10, !6, i64 88}
!22 = !{!10, !6, i64 96}
!23 = !{!10, !6, i64 104}
!24 = !{!10, !6, i64 112}
!25 = !{!10, !6, i64 120}
!26 = !{!10, !6, i64 128}
!27 = !{!10, !6, i64 136}
!28 = !{!10, !6, i64 144}
!29 = !{!10, !6, i64 152}
!30 = !{!10, !6, i64 312}
!31 = !{!10, !6, i64 160}
!32 = !{!10, !6, i64 168}
!33 = !{!10, !6, i64 176}
!34 = !{!10, !6, i64 184}
!35 = !{!10, !6, i64 192}
!36 = !{!10, !6, i64 200}
!37 = !{!10, !6, i64 208}
!38 = !{!10, !6, i64 216}
!39 = !{!10, !6, i64 224}
!40 = !{!10, !6, i64 232}
!41 = !{!10, !6, i64 240}
!42 = !{!10, !6, i64 248}
!43 = !{!10, !6, i64 256}
!44 = !{!10, !6, i64 264}
!45 = !{!10, !6, i64 272}
!46 = !{!10, !6, i64 280}
!47 = !{!10, !6, i64 288}
!48 = !{!10, !6, i64 320}
!49 = !{i64 0, i64 4, !50, i64 4, i64 1, !51, i64 5, i64 1, !51, i64 6, i64 1, !51, i64 7, i64 1, !51, i64 8, i64 4, !52, i64 12, i64 4, !52, i64 16, i64 4, !52, i64 20, i64 4, !52}
!50 = !{!12, !12, i64 0}
!51 = !{!13, !13, i64 0}
!52 = !{!14, !14, i64 0}
!53 = !{!10, !15, i64 24}
!54 = !{!10, !15, i64 28}
!55 = !{!10, !15, i64 32}
!56 = !{!15, !15, 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"

@.str = external hidden unnamed_addr constant [83 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef, ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #2

declare i32 @cudaMalloc(ptr noundef, i64 noundef) local_unnamed_addr #3

declare i32 @cudaMemset(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(328) ptr @_ZN23BarnesHutParticleSystemaSERKS_(ptr noundef nonnull returned align 8 dereferenceable(328) %0, ptr noundef nonnull readonly align 8 dereferenceable(328) %1) local_unnamed_addr #4 align 2 {
  %.not = icmp eq ptr %0, %1
  br i1 %.not, label %246, label %3

3:                                                ; preds = %2
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %8, label %7

7:                                                ; preds = %3
  tail call void @_ZdlPvm(ptr noundef nonnull %5, i64 noundef 4) #6
  br label %8

8:                                                ; preds = %7, %3
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  %10 = load ptr, ptr %9, align 8, !tbaa !15
  %11 = icmp eq ptr %10, null
  br i1 %11, label %13, label %12

12:                                               ; preds = %8
  tail call void @_ZdlPvm(ptr noundef nonnull %10, i64 noundef 4) #6
  br label %13

13:                                               ; preds = %12, %8
  %14 = getelementptr inbounds i8, ptr %0, i64 56
  %15 = load ptr, ptr %14, align 8, !tbaa !16
  %16 = icmp eq ptr %15, null
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  tail call void @_ZdlPvm(ptr noundef nonnull %15, i64 noundef 4) #6
  br label %18

18:                                               ; preds = %17, %13
  %19 = getelementptr inbounds i8, ptr %0, i64 64
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %21 = icmp eq ptr %20, null
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  tail call void @_ZdlPvm(ptr noundef nonnull %20, i64 noundef 4) #6
  br label %23

23:                                               ; preds = %22, %18
  %24 = getelementptr inbounds i8, ptr %0, i64 72
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %26 = icmp eq ptr %25, null
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  tail call void @_ZdaPv(ptr noundef nonnull %25) #6
  br label %28

28:                                               ; preds = %27, %23
  %29 = getelementptr inbounds i8, ptr %0, i64 80
  %30 = load ptr, ptr %29, align 8, !tbaa !19
  %31 = icmp eq ptr %30, null
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  tail call void @_ZdaPv(ptr noundef nonnull %30) #6
  br label %33

33:                                               ; preds = %32, %28
  %34 = getelementptr inbounds i8, ptr %0, i64 88
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = icmp eq ptr %35, null
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  tail call void @_ZdaPv(ptr noundef nonnull %35) #6
  br label %38

38:                                               ; preds = %37, %33
  %39 = getelementptr inbounds i8, ptr %0, i64 96
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = icmp eq ptr %40, null
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  tail call void @_ZdaPv(ptr noundef nonnull %40) #6
  br label %43

43:                                               ; preds = %42, %38
  %44 = getelementptr inbounds i8, ptr %0, i64 104
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = icmp eq ptr %45, null
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  tail call void @_ZdaPv(ptr noundef nonnull %45) #6
  br label %48

48:                                               ; preds = %47, %43
  %49 = getelementptr inbounds i8, ptr %0, i64 112
  %50 = load ptr, ptr %49, align 8, !tbaa !23
  %51 = icmp eq ptr %50, null
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  tail call void @_ZdaPv(ptr noundef nonnull %50) #6
  br label %53

53:                                               ; preds = %52, %48
  %54 = getelementptr inbounds i8, ptr %0, i64 120
  %55 = load ptr, ptr %54, align 8, !tbaa !24
  %56 = icmp eq ptr %55, null
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  tail call void @_ZdaPv(ptr noundef nonnull %55) #6
  br label %58

58:                                               ; preds = %57, %53
  %59 = getelementptr inbounds i8, ptr %0, i64 128
  %60 = load ptr, ptr %59, align 8, !tbaa !25
  %61 = icmp eq ptr %60, null
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  tail call void @_ZdaPv(ptr noundef nonnull %60) #6
  br label %63

63:                                               ; preds = %62, %58
  %64 = getelementptr inbounds i8, ptr %0, i64 136
  %65 = load ptr, ptr %64, align 8, !tbaa !26
  %66 = icmp eq ptr %65, null
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  tail call void @_ZdaPv(ptr noundef nonnull %65) #6
  br label %68

68:                                               ; preds = %67, %63
  %69 = getelementptr inbounds i8, ptr %0, i64 144
  %70 = load ptr, ptr %69, align 8, !tbaa !27
  %71 = icmp eq ptr %70, null
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  tail call void @_ZdaPv(ptr noundef nonnull %70) #6
  br label %73

73:                                               ; preds = %72, %68
  %74 = getelementptr inbounds i8, ptr %0, i64 152
  %75 = load ptr, ptr %74, align 8, !tbaa !28
  %76 = icmp eq ptr %75, null
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  tail call void @_ZdaPv(ptr noundef nonnull %75) #6
  br label %78

78:                                               ; preds = %77, %73
  %79 = getelementptr inbounds i8, ptr %0, i64 312
  %80 = load ptr, ptr %79, align 8, !tbaa !29
  %81 = icmp eq ptr %80, null
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  tail call void @_ZdaPv(ptr noundef nonnull %80) #6
  br label %83

83:                                               ; preds = %82, %78
  %84 = getelementptr inbounds i8, ptr %0, i64 160
  %85 = load ptr, ptr %84, align 8, !tbaa !30
  %86 = tail call i32 @cudaFree(ptr noundef %85)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %86, ptr noundef nonnull @.str, i32 noundef 166, i1 noundef zeroext true)
  %87 = getelementptr inbounds i8, ptr %0, i64 168
  %88 = load ptr, ptr %87, align 8, !tbaa !31
  %89 = tail call i32 @cudaFree(ptr noundef %88)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %89, ptr noundef nonnull @.str, i32 noundef 167, i1 noundef zeroext true)
  %90 = getelementptr inbounds i8, ptr %0, i64 176
  %91 = load ptr, ptr %90, align 8, !tbaa !32
  %92 = tail call i32 @cudaFree(ptr noundef %91)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %92, ptr noundef nonnull @.str, i32 noundef 168, i1 noundef zeroext true)
  %93 = getelementptr inbounds i8, ptr %0, i64 184
  %94 = load ptr, ptr %93, align 8, !tbaa !33
  %95 = tail call i32 @cudaFree(ptr noundef %94)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %95, ptr noundef nonnull @.str, i32 noundef 169, i1 noundef zeroext true)
  %96 = getelementptr inbounds i8, ptr %0, i64 192
  %97 = load ptr, ptr %96, align 8, !tbaa !34
  %98 = tail call i32 @cudaFree(ptr noundef %97)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %98, ptr noundef nonnull @.str, i32 noundef 171, i1 noundef zeroext true)
  %99 = getelementptr inbounds i8, ptr %0, i64 200
  %100 = load ptr, ptr %99, align 8, !tbaa !35
  %101 = tail call i32 @cudaFree(ptr noundef %100)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %101, ptr noundef nonnull @.str, i32 noundef 172, i1 noundef zeroext true)
  %102 = getelementptr inbounds i8, ptr %0, i64 208
  %103 = load ptr, ptr %102, align 8, !tbaa !36
  %104 = tail call i32 @cudaFree(ptr noundef %103)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %104, ptr noundef nonnull @.str, i32 noundef 173, i1 noundef zeroext true)
  %105 = getelementptr inbounds i8, ptr %0, i64 216
  %106 = load ptr, ptr %105, align 8, !tbaa !37
  %107 = tail call i32 @cudaFree(ptr noundef %106)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %107, ptr noundef nonnull @.str, i32 noundef 174, i1 noundef zeroext true)
  %108 = getelementptr inbounds i8, ptr %0, i64 224
  %109 = load ptr, ptr %108, align 8, !tbaa !38
  %110 = tail call i32 @cudaFree(ptr noundef %109)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %110, ptr noundef nonnull @.str, i32 noundef 175, i1 noundef zeroext true)
  %111 = getelementptr inbounds i8, ptr %0, i64 232
  %112 = load ptr, ptr %111, align 8, !tbaa !39
  %113 = tail call i32 @cudaFree(ptr noundef %112)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %113, ptr noundef nonnull @.str, i32 noundef 176, i1 noundef zeroext true)
  %114 = getelementptr inbounds i8, ptr %0, i64 240
  %115 = load ptr, ptr %114, align 8, !tbaa !40
  %116 = tail call i32 @cudaFree(ptr noundef %115)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %116, ptr noundef nonnull @.str, i32 noundef 177, i1 noundef zeroext true)
  %117 = getelementptr inbounds i8, ptr %0, i64 248
  %118 = load ptr, ptr %117, align 8, !tbaa !41
  %119 = tail call i32 @cudaFree(ptr noundef %118)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %119, ptr noundef nonnull @.str, i32 noundef 179, i1 noundef zeroext true)
  %120 = getelementptr inbounds i8, ptr %0, i64 256
  %121 = load ptr, ptr %120, align 8, !tbaa !42
  %122 = tail call i32 @cudaFree(ptr noundef %121)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %122, ptr noundef nonnull @.str, i32 noundef 180, i1 noundef zeroext true)
  %123 = getelementptr inbounds i8, ptr %0, i64 264
  %124 = load ptr, ptr %123, align 8, !tbaa !43
  %125 = tail call i32 @cudaFree(ptr noundef %124)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %125, ptr noundef nonnull @.str, i32 noundef 181, i1 noundef zeroext true)
  %126 = getelementptr inbounds i8, ptr %0, i64 272
  %127 = load ptr, ptr %126, align 8, !tbaa !44
  %128 = tail call i32 @cudaFree(ptr noundef %127)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %128, ptr noundef nonnull @.str, i32 noundef 182, i1 noundef zeroext true)
  %129 = getelementptr inbounds i8, ptr %0, i64 280
  %130 = load ptr, ptr %129, align 8, !tbaa !45
  %131 = tail call i32 @cudaFree(ptr noundef %130)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %131, ptr noundef nonnull @.str, i32 noundef 183, i1 noundef zeroext true)
  %132 = getelementptr inbounds i8, ptr %0, i64 288
  %133 = load ptr, ptr %132, align 8, !tbaa !46
  %134 = tail call i32 @cudaFree(ptr noundef %133)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %134, ptr noundef nonnull @.str, i32 noundef 185, i1 noundef zeroext true)
  %135 = getelementptr inbounds i8, ptr %0, i64 320
  %136 = load ptr, ptr %135, align 8, !tbaa !47
  %137 = tail call i32 @cudaFree(ptr noundef %136)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %137, ptr noundef nonnull @.str, i32 noundef 187, i1 noundef zeroext true)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i64 24, i1 false), !tbaa.struct !48
  %138 = getelementptr inbounds i8, ptr %1, i64 24
  %139 = getelementptr inbounds i8, ptr %0, i64 24
  %140 = load <2 x i32>, ptr %138, align 8, !tbaa !52
  store <2 x i32> %140, ptr %139, align 8, !tbaa !52
  %141 = getelementptr inbounds i8, ptr %1, i64 32
  %142 = load i32, ptr %141, align 8, !tbaa !53
  %143 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %142, ptr %143, align 8, !tbaa !53
  %144 = tail call noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #7
  store ptr %144, ptr %4, align 8, !tbaa !5
  %145 = tail call noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #7
  store ptr %145, ptr %9, align 8, !tbaa !15
  %146 = tail call noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #7
  store ptr %146, ptr %14, align 8, !tbaa !16
  %147 = tail call noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #7
  store ptr %147, ptr %19, align 8, !tbaa !17
  %148 = sext i32 %142 to i64
  %149 = icmp slt i32 %142, 0
  %150 = shl nsw i64 %148, 2
  %151 = select i1 %149, i64 -1, i64 %150
  %152 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %152, ptr %24, align 8, !tbaa !18
  %153 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %153, ptr %29, align 8, !tbaa !19
  %154 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %154, ptr %34, align 8, !tbaa !20
  %155 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %155, ptr %39, align 8, !tbaa !21
  %156 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %156, ptr %44, align 8, !tbaa !22
  %157 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %157, ptr %49, align 8, !tbaa !23
  %158 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %158, ptr %54, align 8, !tbaa !24
  %159 = shl nsw i32 %142, 2
  %160 = sext i32 %159 to i64
  %161 = shl nsw i64 %160, 2
  %162 = select i1 %149, i64 -1, i64 %161
  %163 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %162) #7
  store ptr %163, ptr %59, align 8, !tbaa !25
  %164 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %164, ptr %64, align 8, !tbaa !26
  %165 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %165, ptr %69, align 8, !tbaa !27
  %166 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %151) #7
  store ptr %166, ptr %74, align 8, !tbaa !28
  %167 = shl nsw i32 %142, 1
  %168 = sext i32 %167 to i64
  %169 = shl nsw i64 %168, 2
  %170 = select i1 %149, i64 -1, i64 %169
  %171 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %170) #7
  store ptr %171, ptr %79, align 8, !tbaa !29
  %172 = tail call i32 @cudaMalloc(ptr noundef nonnull %84, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %172, ptr noundef nonnull @.str, i32 noundef 213, i1 noundef zeroext true)
  %173 = tail call i32 @cudaMalloc(ptr noundef nonnull %87, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %173, ptr noundef nonnull @.str, i32 noundef 214, i1 noundef zeroext true)
  %174 = tail call i32 @cudaMalloc(ptr noundef nonnull %90, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %174, ptr noundef nonnull @.str, i32 noundef 215, i1 noundef zeroext true)
  %175 = tail call i32 @cudaMalloc(ptr noundef nonnull %93, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %175, ptr noundef nonnull @.str, i32 noundef 216, i1 noundef zeroext true)
  %176 = load ptr, ptr %84, align 8, !tbaa !30
  %177 = tail call i32 @cudaMemset(ptr noundef %176, i32 noundef 0, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %177, ptr noundef nonnull @.str, i32 noundef 217, i1 noundef zeroext true)
  %178 = load ptr, ptr %87, align 8, !tbaa !31
  %179 = tail call i32 @cudaMemset(ptr noundef %178, i32 noundef 0, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %179, ptr noundef nonnull @.str, i32 noundef 218, i1 noundef zeroext true)
  %180 = load ptr, ptr %90, align 8, !tbaa !32
  %181 = tail call i32 @cudaMemset(ptr noundef %180, i32 noundef 0, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %181, ptr noundef nonnull @.str, i32 noundef 219, i1 noundef zeroext true)
  %182 = load ptr, ptr %93, align 8, !tbaa !33
  %183 = tail call i32 @cudaMemset(ptr noundef %182, i32 noundef 0, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %183, ptr noundef nonnull @.str, i32 noundef 220, i1 noundef zeroext true)
  %184 = load i32, ptr %143, align 8, !tbaa !53
  %185 = sext i32 %184 to i64
  %186 = shl nsw i64 %185, 2
  %187 = tail call i32 @cudaMalloc(ptr noundef nonnull %96, i64 noundef %186)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %187, ptr noundef nonnull @.str, i32 noundef 222, i1 noundef zeroext true)
  %188 = load i32, ptr %143, align 8, !tbaa !53
  %189 = sext i32 %188 to i64
  %190 = shl nsw i64 %189, 2
  %191 = tail call i32 @cudaMalloc(ptr noundef nonnull %99, i64 noundef %190)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %191, ptr noundef nonnull @.str, i32 noundef 223, i1 noundef zeroext true)
  %192 = load i32, ptr %143, align 8, !tbaa !53
  %193 = sext i32 %192 to i64
  %194 = shl nsw i64 %193, 2
  %195 = tail call i32 @cudaMalloc(ptr noundef nonnull %102, i64 noundef %194)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %195, ptr noundef nonnull @.str, i32 noundef 224, i1 noundef zeroext true)
  %196 = load i32, ptr %143, align 8, !tbaa !53
  %197 = sext i32 %196 to i64
  %198 = shl nsw i64 %197, 2
  %199 = tail call i32 @cudaMalloc(ptr noundef nonnull %105, i64 noundef %198)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %199, ptr noundef nonnull @.str, i32 noundef 225, i1 noundef zeroext true)
  %200 = load i32, ptr %143, align 8, !tbaa !53
  %201 = sext i32 %200 to i64
  %202 = shl nsw i64 %201, 2
  %203 = tail call i32 @cudaMalloc(ptr noundef nonnull %108, i64 noundef %202)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %203, ptr noundef nonnull @.str, i32 noundef 226, i1 noundef zeroext true)
  %204 = load i32, ptr %143, align 8, !tbaa !53
  %205 = sext i32 %204 to i64
  %206 = shl nsw i64 %205, 2
  %207 = tail call i32 @cudaMalloc(ptr noundef nonnull %111, i64 noundef %206)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %207, ptr noundef nonnull @.str, i32 noundef 227, i1 noundef zeroext true)
  %208 = load i32, ptr %143, align 8, !tbaa !53
  %209 = sext i32 %208 to i64
  %210 = shl nsw i64 %209, 2
  %211 = tail call i32 @cudaMalloc(ptr noundef nonnull %114, i64 noundef %210)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %211, ptr noundef nonnull @.str, i32 noundef 228, i1 noundef zeroext true)
  %212 = tail call i32 @cudaMalloc(ptr noundef nonnull %117, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %212, ptr noundef nonnull @.str, i32 noundef 230, i1 noundef zeroext true)
  %213 = load i32, ptr %143, align 8, !tbaa !53
  %214 = shl nsw i32 %213, 2
  %215 = sext i32 %214 to i64
  %216 = shl nsw i64 %215, 2
  %217 = tail call i32 @cudaMalloc(ptr noundef nonnull %120, i64 noundef %216)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %217, ptr noundef nonnull @.str, i32 noundef 231, i1 noundef zeroext true)
  %218 = load i32, ptr %143, align 8, !tbaa !53
  %219 = sext i32 %218 to i64
  %220 = shl nsw i64 %219, 2
  %221 = tail call i32 @cudaMalloc(ptr noundef nonnull %123, i64 noundef %220)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %221, ptr noundef nonnull @.str, i32 noundef 232, i1 noundef zeroext true)
  %222 = load i32, ptr %143, align 8, !tbaa !53
  %223 = sext i32 %222 to i64
  %224 = shl nsw i64 %223, 2
  %225 = tail call i32 @cudaMalloc(ptr noundef nonnull %126, i64 noundef %224)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %225, ptr noundef nonnull @.str, i32 noundef 233, i1 noundef zeroext true)
  %226 = load i32, ptr %143, align 8, !tbaa !53
  %227 = sext i32 %226 to i64
  %228 = shl nsw i64 %227, 2
  %229 = tail call i32 @cudaMalloc(ptr noundef nonnull %129, i64 noundef %228)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %229, ptr noundef nonnull @.str, i32 noundef 234, i1 noundef zeroext true)
  %230 = tail call i32 @cudaMalloc(ptr noundef nonnull %132, i64 noundef 4)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %230, ptr noundef nonnull @.str, i32 noundef 235, i1 noundef zeroext true)
  %231 = load ptr, ptr %123, align 8, !tbaa !43
  %232 = load i32, ptr %143, align 8, !tbaa !53
  %233 = sext i32 %232 to i64
  %234 = shl nsw i64 %233, 2
  %235 = tail call i32 @cudaMemset(ptr noundef %231, i32 noundef -1, i64 noundef %234)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %235, ptr noundef nonnull @.str, i32 noundef 237, i1 noundef zeroext true)
  %236 = load ptr, ptr %126, align 8, !tbaa !44
  %237 = load i32, ptr %143, align 8, !tbaa !53
  %238 = sext i32 %237 to i64
  %239 = shl nsw i64 %238, 2
  %240 = tail call i32 @cudaMemset(ptr noundef %236, i32 noundef 0, i64 noundef %239)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %240, ptr noundef nonnull @.str, i32 noundef 238, i1 noundef zeroext true)
  %241 = load i32, ptr %143, align 8, !tbaa !53
  %242 = shl nsw i32 %241, 1
  %243 = sext i32 %242 to i64
  %244 = shl nsw i64 %243, 2
  %245 = tail call i32 @cudaMalloc(ptr noundef nonnull %135, i64 noundef %244)
  tail call void @_Z9gpuAssert9cudaErrorPKcib(i32 noundef %245, ptr noundef nonnull @.str, i32 noundef 242, i1 noundef zeroext true)
  br label %246

246:                                              ; preds = %83, %2
  ret ptr %0
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #5

declare i32 @cudaFree(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 = { 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 #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 = { 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 #5 = { nobuiltin 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 #6 = { builtin nounwind }
attributes #7 = { builtin allocsize(0) }

!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, !14, i64 40}
!6 = !{!"_ZTS23BarnesHutParticleSystem", !7, i64 0, !13, i64 24, !13, i64 28, !13, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224, !14, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !14, i64 264, !14, i64 272, !14, i64 280, !14, i64 288, !14, i64 296, !14, i64 304, !14, i64 312, !14, i64 320}
!7 = !{!"_ZTS20SimulationParameters", !8, i64 0, !11, i64 4, !11, i64 5, !11, i64 6, !11, i64 7, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!8 = !{!"_ZTS5Model", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"float", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"any pointer", !9, i64 0}
!15 = !{!6, !14, i64 48}
!16 = !{!6, !14, i64 56}
!17 = !{!6, !14, i64 64}
!18 = !{!6, !14, i64 72}
!19 = !{!6, !14, i64 80}
!20 = !{!6, !14, i64 88}
!21 = !{!6, !14, i64 96}
!22 = !{!6, !14, i64 104}
!23 = !{!6, !14, i64 112}
!24 = !{!6, !14, i64 120}
!25 = !{!6, !14, i64 128}
!26 = !{!6, !14, i64 136}
!27 = !{!6, !14, i64 144}
!28 = !{!6, !14, i64 152}
!29 = !{!6, !14, i64 312}
!30 = !{!6, !14, i64 160}
!31 = !{!6, !14, i64 168}
!32 = !{!6, !14, i64 176}
!33 = !{!6, !14, i64 184}
!34 = !{!6, !14, i64 192}
!35 = !{!6, !14, i64 200}
!36 = !{!6, !14, i64 208}
!37 = !{!6, !14, i64 216}
!38 = !{!6, !14, i64 224}
!39 = !{!6, !14, i64 232}
!40 = !{!6, !14, i64 240}
!41 = !{!6, !14, i64 248}
!42 = !{!6, !14, i64 256}
!43 = !{!6, !14, i64 264}
!44 = !{!6, !14, i64 272}
!45 = !{!6, !14, i64 280}
!46 = !{!6, !14, i64 288}
!47 = !{!6, !14, i64 320}
!48 = !{i64 0, i64 4, !49, i64 4, i64 1, !50, i64 5, i64 1, !50, i64 6, i64 1, !50, i64 7, i64 1, !50, i64 8, i64 4, !51, i64 12, i64 4, !51, i64 16, i64 4, !51, i64 20, i64 4, !51}
!49 = !{!8, !8, i64 0}
!50 = !{!11, !11, i64 0}
!51 = !{!12, !12, i64 0}
!52 = !{!13, !13, i64 0}
!53 = !{!6, !13, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass