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

; 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 }
%class.Array3d = type <{ i32, i32, i32, [4 x i8], ptr, i8, [3 x i8], float, i32, [4 x i8] }>
%class.ScalarField = type { i32, i32, i32, double, double, double, double, double, double, double, double, i8, [7 x i8], %class.Array3d, %class.Array3d.0, %class.Array3d, %class.Array3d.0, i8, %"class.vmath::vec3" }
%class.Array3d.0 = type { i32, i32, i32, ptr, i8, i8, i32 }
%"class.vmath::vec3" = type { float, float, float }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [108 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
@.str.8 = external hidden unnamed_addr constant [92 x i8], align 1
@__FUNCTION__._ZN11ScalarField14getScalarFieldER7Array3dIfE = external hidden unnamed_addr constant [15 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

; 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 noundef float @_ZN7Array3dIfEclEiii(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef) #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) #1 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() #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11ScalarField14getScalarFieldER7Array3dIfE(ptr noundef nonnull align 8 dereferenceable(248) %0, ptr noundef nonnull align 8 dereferenceable(36) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %class.Array3d, ptr %11, i32 0, i32 0
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = getelementptr inbounds %class.ScalarField, ptr %10, i32 0, i32 13
  %15 = getelementptr inbounds %class.Array3d, ptr %14, i32 0, i32 0
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = icmp eq i32 %13, %16
  br i1 %17, label %18, label %34

18:                                               ; preds = %2
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %class.Array3d, ptr %19, i32 0, i32 1
  %21 = load i32, ptr %20, align 4, !tbaa !19
  %22 = getelementptr inbounds %class.ScalarField, ptr %10, i32 0, i32 13
  %23 = getelementptr inbounds %class.Array3d, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !20
  %25 = icmp eq i32 %21, %24
  br i1 %25, label %26, label %34

26:                                               ; preds = %18
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %class.Array3d, ptr %27, i32 0, i32 2
  %29 = load i32, ptr %28, align 8, !tbaa !21
  %30 = getelementptr inbounds %class.ScalarField, ptr %10, i32 0, i32 13
  %31 = getelementptr inbounds %class.Array3d, ptr %30, i32 0, i32 2
  %32 = load i32, ptr %31, align 8, !tbaa !22
  %33 = icmp eq i32 %29, %32
  br i1 %33, label %44, label %34

34:                                               ; preds = %26, %18, %2
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef @.str.8)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @.str.2)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str.3)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef @.str.4)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef @__FUNCTION__._ZN11ScalarField14getScalarFieldER7Array3dIfE)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef @.str.5)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %41, i32 noundef 378)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @abort() #5
  unreachable

44:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !23
  br label %45

45:                                               ; preds = %103, %44
  %46 = load i32, ptr %6, align 4, !tbaa !23
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.Array3d, ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !21
  %50 = icmp slt i32 %46, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %45
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %106

52:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !23
  br label %53

53:                                               ; preds = %99, %52
  %54 = load i32, ptr %8, align 4, !tbaa !23
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %class.Array3d, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !19
  %58 = icmp slt i32 %54, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %53
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %102

60:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !23
  br label %61

61:                                               ; preds = %95, %60
  %62 = load i32, ptr %9, align 4, !tbaa !23
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %class.Array3d, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !9
  %66 = icmp slt i32 %62, %65
  br i1 %66, label %68, label %67

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

68:                                               ; preds = %61
  %69 = getelementptr inbounds %class.ScalarField, ptr %10, i32 0, i32 13
  %70 = load i32, ptr %9, align 4, !tbaa !23
  %71 = load i32, ptr %8, align 4, !tbaa !23
  %72 = load i32, ptr %6, align 4, !tbaa !23
  %73 = call noundef float @_ZN7Array3dIfEclEiii(ptr noundef nonnull align 8 dereferenceable(36) %69, i32 noundef %70, i32 noundef %71, i32 noundef %72)
  %74 = fpext float %73 to double
  store double %74, ptr %5, align 8, !tbaa !24
  %75 = getelementptr inbounds %class.ScalarField, ptr %10, i32 0, i32 14
  %76 = load i32, ptr %9, align 4, !tbaa !23
  %77 = load i32, ptr %8, align 4, !tbaa !23
  %78 = load i32, ptr %6, align 4, !tbaa !23
  %79 = call noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32) %75, i32 noundef %76, i32 noundef %77, i32 noundef %78)
  br i1 %79, label %80, label %88

80:                                               ; preds = %68
  %81 = load double, ptr %5, align 8, !tbaa !24
  %82 = getelementptr inbounds %class.ScalarField, ptr %10, i32 0, i32 9
  %83 = load double, ptr %82, align 8, !tbaa !25
  %84 = fcmp ogt double %81, %83
  br i1 %84, label %85, label %88

85:                                               ; preds = %80
  %86 = getelementptr inbounds %class.ScalarField, ptr %10, i32 0, i32 9
  %87 = load double, ptr %86, align 8, !tbaa !25
  store double %87, ptr %5, align 8, !tbaa !24
  br label %88

88:                                               ; preds = %85, %80, %68
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load i32, ptr %9, align 4, !tbaa !23
  %91 = load i32, ptr %8, align 4, !tbaa !23
  %92 = load i32, ptr %6, align 4, !tbaa !23
  %93 = load double, ptr %5, align 8, !tbaa !24
  %94 = fptrunc double %93 to float
  call void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36) %89, i32 noundef %90, i32 noundef %91, i32 noundef %92, float noundef %94)
  br label %95

95:                                               ; preds = %88
  %96 = load i32, ptr %9, align 4, !tbaa !23
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %9, align 4, !tbaa !23
  br label %61, !llvm.loop !26

98:                                               ; preds = %67
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %8, align 4, !tbaa !23
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %8, align 4, !tbaa !23
  br label %53, !llvm.loop !28

102:                                              ; preds = %59
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %6, align 4, !tbaa !23
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %6, align 4, !tbaa !23
  br label %45, !llvm.loop !29

106:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef) #1 align 2

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 = { 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 = { 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 = { noreturn nounwind }
attributes #6 = { 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, !11, i64 0}
!10 = !{!"_ZTS7Array3dIfE", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !12, i64 24, !13, i64 28, !11, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !11, i64 88}
!15 = !{!"_ZTS11ScalarField", !11, i64 0, !11, i64 4, !11, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !12, i64 80, !10, i64 88, !17, i64 128, !10, i64 160, !17, i64 200, !12, i64 232, !18, i64 236}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTS7Array3dIbE", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !12, i64 24, !12, i64 25, !11, i64 28}
!18 = !{!"_ZTSN5vmath4vec3E", !13, i64 0, !13, i64 4, !13, i64 8}
!19 = !{!10, !11, i64 4}
!20 = !{!15, !11, i64 92}
!21 = !{!10, !11, i64 8}
!22 = !{!15, !11, i64 96}
!23 = !{!11, !11, i64 0}
!24 = !{!16, !16, i64 0}
!25 = !{!15, !16, i64 64}
!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.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [108 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
@.str.8 = external hidden unnamed_addr constant [92 x i8], align 1
@__FUNCTION__._ZN11ScalarField14getScalarFieldER7Array3dIfE = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN7Array3dIfEclEiii(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef) 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 #0 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 #3

; 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 #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11ScalarField14getScalarFieldER7Array3dIfE(ptr noundef nonnull align 8 dereferenceable(248) %0, ptr noundef nonnull align 8 dereferenceable(36) %1) local_unnamed_addr #0 align 2 {
  %3 = load i32, ptr %1, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 88
  %5 = load i32, ptr %4, align 8, !tbaa !13
  %6 = icmp eq i32 %3, %5
  br i1 %6, label %7, label %23

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %1, i64 4
  %9 = load i32, ptr %8, align 4, !tbaa !18
  %10 = getelementptr inbounds i8, ptr %0, i64 92
  %11 = load i32, ptr %10, align 4, !tbaa !19
  %12 = icmp eq i32 %9, %11
  br i1 %12, label %13, label %23

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !20
  %16 = getelementptr inbounds i8, ptr %0, i64 96
  %17 = load i32, ptr %16, align 8, !tbaa !21
  %18 = icmp eq i32 %15, %17
  br i1 %18, label %.preheader30, label %23

.preheader30:                                     ; preds = %13
  %19 = icmp sgt i32 %15, 0
  br i1 %19, label %.preheader29.lr.ph, label %._crit_edge36

.preheader29.lr.ph:                               ; preds = %.preheader30
  %20 = getelementptr inbounds i8, ptr %0, i64 128
  %21 = getelementptr inbounds i8, ptr %0, i64 64
  %22 = icmp sgt i32 %9, 0
  br i1 %22, label %.preheader29, label %._crit_edge36

23:                                               ; preds = %13, %7, %2
  %24 = 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)
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @.str.8)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.2)
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @.str.3)
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull @.str.4)
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @__FUNCTION__._ZN11ScalarField14getScalarFieldER7Array3dIfE)
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull @.str.5)
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %30, i32 noundef 378)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  tail call void @abort() #4
  unreachable

.preheader29:                                     ; preds = %.preheader29.lr.ph, %._crit_edge33
  %33 = phi i32 [ %43, %._crit_edge33 ], [ %15, %.preheader29.lr.ph ]
  %34 = phi i32 [ %44, %._crit_edge33 ], [ %9, %.preheader29.lr.ph ]
  %35 = phi i32 [ %45, %._crit_edge33 ], [ %3, %.preheader29.lr.ph ]
  %36 = phi i32 [ %46, %._crit_edge33 ], [ %3, %.preheader29.lr.ph ]
  %37 = phi i32 [ %47, %._crit_edge33 ], [ %9, %.preheader29.lr.ph ]
  %.02534 = phi i32 [ %48, %._crit_edge33 ], [ 0, %.preheader29.lr.ph ]
  %38 = icmp sgt i32 %37, 0
  %39 = icmp sgt i32 %36, 0
  %or.cond = select i1 %38, i1 %39, i1 false
  br i1 %or.cond, label %.preheader, label %._crit_edge33

._crit_edge36:                                    ; preds = %._crit_edge33, %.preheader29.lr.ph, %.preheader30
  ret void

.preheader:                                       ; preds = %.preheader29, %._crit_edge
  %40 = phi i32 [ %50, %._crit_edge ], [ %34, %.preheader29 ]
  %41 = phi i32 [ %51, %._crit_edge ], [ %35, %.preheader29 ]
  %.02432 = phi i32 [ %52, %._crit_edge ], [ 0, %.preheader29 ]
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph, label %._crit_edge

._crit_edge33.loopexit:                           ; preds = %._crit_edge
  %.pre39 = load i32, ptr %14, align 8, !tbaa !20
  br label %._crit_edge33

._crit_edge33:                                    ; preds = %._crit_edge33.loopexit, %.preheader29
  %43 = phi i32 [ %.pre39, %._crit_edge33.loopexit ], [ %33, %.preheader29 ]
  %44 = phi i32 [ %50, %._crit_edge33.loopexit ], [ %34, %.preheader29 ]
  %45 = phi i32 [ %51, %._crit_edge33.loopexit ], [ %35, %.preheader29 ]
  %46 = phi i32 [ %51, %._crit_edge33.loopexit ], [ %36, %.preheader29 ]
  %47 = phi i32 [ %50, %._crit_edge33.loopexit ], [ %37, %.preheader29 ]
  %48 = add nuw nsw i32 %.02534, 1
  %49 = icmp slt i32 %48, %43
  br i1 %49, label %.preheader29, label %._crit_edge36, !llvm.loop !22

._crit_edge.loopexit:                             ; preds = %61
  %.pre = load i32, ptr %8, align 4, !tbaa !18
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %50 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %40, %.preheader ]
  %51 = phi i32 [ %64, %._crit_edge.loopexit ], [ %41, %.preheader ]
  %52 = add nuw nsw i32 %.02432, 1
  %53 = icmp slt i32 %52, %50
  br i1 %53, label %.preheader, label %._crit_edge33.loopexit, !llvm.loop !25

.lr.ph:                                           ; preds = %.preheader, %61
  %.031 = phi i32 [ %63, %61 ], [ 0, %.preheader ]
  %54 = tail call noundef float @_ZN7Array3dIfEclEiii(ptr noundef nonnull align 8 dereferenceable(36) %4, i32 noundef %.031, i32 noundef %.02432, i32 noundef %.02534)
  %55 = fpext float %54 to double
  %56 = tail call noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32) %20, i32 noundef %.031, i32 noundef %.02432, i32 noundef %.02534)
  br i1 %56, label %57, label %61

57:                                               ; preds = %.lr.ph
  %58 = load double, ptr %21, align 8, !tbaa !26
  %59 = fcmp olt double %58, %55
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  br label %61

61:                                               ; preds = %60, %57, %.lr.ph
  %.026 = phi double [ %58, %60 ], [ %55, %57 ], [ %55, %.lr.ph ]
  %62 = fptrunc double %.026 to float
  tail call void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36) %1, i32 noundef %.031, i32 noundef %.02432, i32 noundef %.02534, float noundef %62)
  %63 = add nuw nsw i32 %.031, 1
  %64 = load i32, ptr %1, align 8, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !27
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Array3dIbEclEiii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

attributes #0 = { 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 #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 = { 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 #4 = { 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 0}
!6 = !{!"_ZTS7Array3dIfE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !11, i64 24, !12, i64 28, !7, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!14, !7, i64 88}
!14 = !{!"_ZTS11ScalarField", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !11, i64 80, !6, i64 88, !16, i64 128, !6, i64 160, !16, i64 200, !11, i64 232, !17, i64 236}
!15 = !{!"double", !8, i64 0}
!16 = !{!"_ZTS7Array3dIbE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 25, !7, i64 28}
!17 = !{!"_ZTSN5vmath4vec3E", !12, i64 0, !12, i64 4, !12, i64 8}
!18 = !{!6, !7, i64 4}
!19 = !{!14, !7, i64 92}
!20 = !{!6, !7, i64 8}
!21 = !{!14, !7, i64 96}
!22 = distinct !{!22, !23, !24}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.unswitch.partial.disable"}
!25 = distinct !{!25, !23, !24}
!26 = !{!14, !15, i64 64}
!27 = distinct !{!27, !23}


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