; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src/fluidbrickgrid.ll (ZN14FluidBrickGrid28getDensityGridVelocityValuesER7Array3dIfE)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.FluidBrickGrid::DensityNode" = type { float, float, float }
%class.FluidBrickGrid = type <{ i32, i32, i32, [4 x i8], double, %class.AABB, %class.Array3d, %class.Array3d.0, [3 x %class.Array3d.0], i32, [4 x i8], %class.Array3d.0, i8, [3 x i8], i32, i32, float, float, float, i32, i32, i8, [7 x i8] }>
%class.AABB = type { %"class.vmath::vec3", double, double, double }
%"class.vmath::vec3" = type { float, float, float }
%class.Array3d = type <{ i32, i32, i32, [4 x i8], ptr, i8, [3 x i8], %"struct.FluidBrickGrid::DensityNode", i32, [4 x i8] }>
%class.Array3d.0 = type { i32, i32, i32, ptr, i8, [3 x i8], %struct.Brick, i32 }
%struct.Brick = type <{ float, i8, [3 x i8] }>

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@__FUNCTION__._ZN14FluidBrickGrid28getDensityGridVelocityValuesER7Array3dIfE = external hidden unnamed_addr constant [29 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: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN14FluidBrickGrid13isInitializedEv(ptr noundef nonnull align 8 dereferenceable(353)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: noreturn nounwind
declare void @abort() #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN7Array3dIN14FluidBrickGrid11DensityNodeEEclEiii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef, float noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14FluidBrickGrid28getDensityGridVelocityValuesER7Array3dIfE(ptr noundef nonnull align 8 dereferenceable(353) %0, ptr noundef nonnull align 8 dereferenceable(36) %1) #7 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca %"struct.FluidBrickGrid::DensityNode", align 4
  %11 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  %13 = call noundef zeroext i1 @_ZN14FluidBrickGrid13isInitializedEv(ptr noundef nonnull align 8 dereferenceable(353) %12)
  br i1 %13, label %24, label %14

14:                                               ; preds = %2
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef @.str.1)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef @.str.2)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef @.str.3)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef @.str.4)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef @__FUNCTION__._ZN14FluidBrickGrid28getDensityGridVelocityValuesER7Array3dIfE)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef @.str.5)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef 155)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @abort() #8
  unreachable

24:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %66, %24
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = getelementptr inbounds %class.FluidBrickGrid, ptr %12, i32 0, i32 2
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = icmp slt i32 %26, %28
  br i1 %29, label %31, label %30

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

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

32:                                               ; preds = %62, %31
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = getelementptr inbounds %class.FluidBrickGrid, ptr %12, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !22
  %36 = icmp slt i32 %33, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %58, %38
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = getelementptr inbounds %class.FluidBrickGrid, ptr %12, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !23
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #9
  %46 = getelementptr inbounds %class.FluidBrickGrid, ptr %12, i32 0, i32 6
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = load i32, ptr %5, align 4, !tbaa !9
  %50 = call { <2 x float>, float } @_ZN7Array3dIN14FluidBrickGrid11DensityNodeEEclEiii(ptr noundef nonnull align 8 dereferenceable(44) %46, i32 noundef %47, i32 noundef %48, i32 noundef %49)
  store { <2 x float>, float } %50, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %11, i64 12, i1 false)
  %51 = getelementptr inbounds %"struct.FluidBrickGrid::DensityNode", ptr %10, i32 0, i32 2
  %52 = load float, ptr %51, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #9
  store float %52, ptr %9, align 4, !tbaa !25
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = load float, ptr %9, align 4, !tbaa !25
  call void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36) %53, i32 noundef %54, i32 noundef %55, i32 noundef %56, float noundef %57)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %58

58:                                               ; preds = %45
  %59 = load i32, ptr %8, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %8, align 4, !tbaa !9
  br label %39, !llvm.loop !26

61:                                               ; preds = %44
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %7, align 4, !tbaa !9
  br label %32, !llvm.loop !28

65:                                               ; preds = %37
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %5, align 4, !tbaa !9
  br label %25, !llvm.loop !29

69:                                               ; preds = %30
  ret void
}

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { noreturn nounwind }
attributes #9 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS14FluidBrickGrid", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !14, i64 24, !17, i64 64, !20, i64 112, !7, i64 152, !10, i64 272, !20, i64 280, !18, i64 320, !10, i64 324, !10, i64 328, !16, i64 332, !16, i64 336, !16, i64 340, !10, i64 344, !10, i64 348, !18, i64 352}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTS4AABB", !15, i64 0, !13, i64 16, !13, i64 24, !13, i64 32}
!15 = !{!"_ZTSN5vmath4vec3E", !16, i64 0, !16, i64 4, !16, i64 8}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS7Array3dIN14FluidBrickGrid11DensityNodeEE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !18, i64 24, !19, i64 28, !10, i64 40}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN14FluidBrickGrid11DensityNodeE", !16, i64 0, !16, i64 4, !16, i64 8}
!20 = !{!"_ZTS7Array3dI5BrickE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !18, i64 24, !21, i64 28, !10, i64 36}
!21 = !{!"_ZTS5Brick", !16, i64 0, !18, i64 4}
!22 = !{!12, !10, i64 4}
!23 = !{!12, !10, i64 0}
!24 = !{!19, !16, i64 8}
!25 = !{!16, !16, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}


; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@__FUNCTION__._ZN14FluidBrickGrid28getDensityGridVelocityValuesER7Array3dIfE = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN14FluidBrickGrid13isInitializedEv(ptr noundef nonnull align 8 dereferenceable(353)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN7Array3dIN14FluidBrickGrid11DensityNodeEEclEiii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14FluidBrickGrid28getDensityGridVelocityValuesER7Array3dIfE(ptr noundef nonnull align 8 dereferenceable(353) %0, ptr noundef nonnull align 8 dereferenceable(36) %1) local_unnamed_addr #5 align 2 {
  %3 = tail call noundef zeroext i1 @_ZN14FluidBrickGrid13isInitializedEv(ptr noundef nonnull align 8 dereferenceable(353) %0)
  br i1 %3, label %.preheader18, label %11

.preheader18:                                     ; preds = %2
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.preheader17.lr.ph, label %._crit_edge24

.preheader17.lr.ph:                               ; preds = %.preheader18
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = getelementptr inbounds i8, ptr %0, i64 64
  %9 = load i32, ptr %7, align 4, !tbaa !20
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.preheader17, label %._crit_edge24

11:                                               ; preds = %2
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @.str.1)
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.2)
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @.str.3)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @.str.4)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @__FUNCTION__._ZN14FluidBrickGrid28getDensityGridVelocityValuesER7Array3dIfE)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @.str.5)
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef 155)
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  tail call void @abort() #6
  unreachable

.preheader17:                                     ; preds = %.preheader17.lr.ph, %._crit_edge21
  %21 = phi i32 [ %30, %._crit_edge21 ], [ %5, %.preheader17.lr.ph ]
  %22 = phi i32 [ %31, %._crit_edge21 ], [ %9, %.preheader17.lr.ph ]
  %23 = phi i32 [ %32, %._crit_edge21 ], [ %9, %.preheader17.lr.ph ]
  %.022 = phi i32 [ %33, %._crit_edge21 ], [ 0, %.preheader17.lr.ph ]
  %24 = icmp sgt i32 %23, 0
  %25 = load i32, ptr %0, align 8
  %26 = icmp sgt i32 %25, 0
  %or.cond = select i1 %24, i1 %26, i1 false
  br i1 %or.cond, label %.preheader, label %._crit_edge21

._crit_edge24:                                    ; preds = %._crit_edge21, %.preheader17.lr.ph, %.preheader18
  ret void

.preheader:                                       ; preds = %.preheader17, %._crit_edge
  %27 = phi i32 [ %35, %._crit_edge ], [ %22, %.preheader17 ]
  %28 = phi i32 [ %36, %._crit_edge ], [ %25, %.preheader17 ]
  %.01520 = phi i32 [ %37, %._crit_edge ], [ 0, %.preheader17 ]
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph, label %._crit_edge

._crit_edge21.loopexit:                           ; preds = %._crit_edge
  %.pre27 = load i32, ptr %4, align 8, !tbaa !5
  br label %._crit_edge21

._crit_edge21:                                    ; preds = %._crit_edge21.loopexit, %.preheader17
  %30 = phi i32 [ %.pre27, %._crit_edge21.loopexit ], [ %21, %.preheader17 ]
  %31 = phi i32 [ %35, %._crit_edge21.loopexit ], [ %22, %.preheader17 ]
  %32 = phi i32 [ %35, %._crit_edge21.loopexit ], [ %23, %.preheader17 ]
  %33 = add nuw nsw i32 %.022, 1
  %34 = icmp slt i32 %33, %30
  br i1 %34, label %.preheader17, label %._crit_edge24, !llvm.loop !21

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %7, align 4, !tbaa !20
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %35 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %27, %.preheader ]
  %36 = phi i32 [ %41, %._crit_edge.loopexit ], [ %28, %.preheader ]
  %37 = add nuw nsw i32 %.01520, 1
  %38 = icmp slt i32 %37, %35
  br i1 %38, label %.preheader, label %._crit_edge21.loopexit, !llvm.loop !24

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.01619 = phi i32 [ %40, %.lr.ph ], [ 0, %.preheader ]
  %39 = tail call { <2 x float>, float } @_ZN7Array3dIN14FluidBrickGrid11DensityNodeEEclEiii(ptr noundef nonnull align 8 dereferenceable(44) %8, i32 noundef %.01619, i32 noundef %.01520, i32 noundef %.022)
  %.fca.1.extract = extractvalue { <2 x float>, float } %39, 1
  tail call void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36) %1, i32 noundef %.01619, i32 noundef %.01520, i32 noundef %.022, float noundef %.fca.1.extract)
  %40 = add nuw nsw i32 %.01619, 1
  %41 = load i32, ptr %0, align 8, !tbaa !25
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !26
}

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTS14FluidBrickGrid", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !11, i64 24, !14, i64 64, !18, i64 112, !8, i64 152, !7, i64 272, !18, i64 280, !16, i64 320, !7, i64 324, !7, i64 328, !13, i64 332, !13, i64 336, !13, i64 340, !7, i64 344, !7, i64 348, !16, i64 352}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"_ZTS4AABB", !12, i64 0, !10, i64 16, !10, i64 24, !10, i64 32}
!12 = !{!"_ZTSN5vmath4vec3E", !13, i64 0, !13, i64 4, !13, i64 8}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTS7Array3dIN14FluidBrickGrid11DensityNodeEE", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 16, !16, i64 24, !17, i64 28, !7, i64 40}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTSN14FluidBrickGrid11DensityNodeE", !13, i64 0, !13, i64 4, !13, i64 8}
!18 = !{!"_ZTS7Array3dI5BrickE", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 16, !16, i64 24, !19, i64 28, !7, i64 36}
!19 = !{!"_ZTS5Brick", !13, i64 0, !16, i64 4}
!20 = !{!6, !7, i64 4}
!21 = distinct !{!21, !22, !23}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.unswitch.partial.disable"}
!24 = distinct !{!24, !22, !23}
!25 = !{!6, !7, i64 0}
!26 = distinct !{!26, !22}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass