; LLVM IR from LukeMcCulloch/cfd_solvers_cpp :: src/EulerUnsteady2D_basic_package.ll (ZN13EulerSolver2D10MainData2D17check_skewness_ncEv)

; 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.EulerSolver2D::MainData2D" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", double, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64, double, double, double, double, double, double, double, double, i64, ptr, i64, i64, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.EulerSolver2D::edge_type" = type { i32, i32, i32, i32, %class.Array2D.4, double, %class.Array2D.4, double, i32, i32 }
%class.Array2D.4 = type { i32, i32, i32, i32, i32, i32, i8, i8, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [54 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: 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) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13EulerSolver2D10MainData2D17check_skewness_ncEv(ptr noundef nonnull align 8 dereferenceable(512) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca i64, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !9
  store double 1.000000e+05, ptr %5, align 8, !tbaa !9
  store double -1.000000e+05, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %12

12:                                               ; preds = %61, %1
  %13 = load i64, ptr %8, align 8, !tbaa !11
  %14 = getelementptr inbounds %"class.EulerSolver2D::MainData2D", ptr %11, i32 0, i32 27
  %15 = load i64, ptr %14, align 8, !tbaa !13
  %16 = icmp ult i64 %13, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %64

18:                                               ; preds = %12
  %19 = getelementptr inbounds %"class.EulerSolver2D::MainData2D", ptr %11, i32 0, i32 28
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %21 = load i64, ptr %8, align 8, !tbaa !11
  %22 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %20, i64 %21
  %23 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %22, i32 0, i32 6
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Array2DIdEclEi(ptr noundef nonnull align 8 dereferenceable(40) %23, i32 noundef 0)
  %25 = load double, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds %"class.EulerSolver2D::MainData2D", ptr %11, i32 0, i32 28
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = load i64, ptr %8, align 8, !tbaa !11
  %29 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %27, i64 %28
  %30 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %29, i32 0, i32 4
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Array2DIdEclEi(ptr noundef nonnull align 8 dereferenceable(40) %30, i32 noundef 0)
  %32 = load double, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds %"class.EulerSolver2D::MainData2D", ptr %11, i32 0, i32 28
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  %35 = load i64, ptr %8, align 8, !tbaa !11
  %36 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %34, i64 %35
  %37 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %36, i32 0, i32 6
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Array2DIdEclEi(ptr noundef nonnull align 8 dereferenceable(40) %37, i32 noundef 1)
  %39 = load double, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds %"class.EulerSolver2D::MainData2D", ptr %11, i32 0, i32 28
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  %42 = load i64, ptr %8, align 8, !tbaa !11
  %43 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %41, i64 %42
  %44 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %43, i32 0, i32 4
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Array2DIdEclEi(ptr noundef nonnull align 8 dereferenceable(40) %44, i32 noundef 1)
  %46 = load double, ptr %45, align 8, !tbaa !9
  %47 = fmul double %39, %46
  %48 = call double @llvm.fmuladd.f64(double %25, double %32, double %47)
  store double %48, ptr %7, align 8, !tbaa !9
  %49 = load double, ptr %4, align 8, !tbaa !9
  %50 = load double, ptr %7, align 8, !tbaa !9
  %51 = call noundef double @_ZSt3absd(double noundef %50)
  %52 = fadd double %49, %51
  store double %52, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %53 = load double, ptr %7, align 8, !tbaa !9
  %54 = call noundef double @_ZSt3absd(double noundef %53)
  store double %54, ptr %9, align 8, !tbaa !9
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %56 = load double, ptr %55, align 8, !tbaa !9
  store double %56, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %57 = load double, ptr %7, align 8, !tbaa !9
  %58 = call noundef double @_ZSt3absd(double noundef %57)
  store double %58, ptr %10, align 8, !tbaa !9
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %60 = load double, ptr %59, align 8, !tbaa !9
  store double %60, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %61

61:                                               ; preds = %18
  %62 = load i64, ptr %8, align 8, !tbaa !11
  %63 = add i64 %62, 1
  store i64 %63, ptr %8, align 8, !tbaa !11
  br label %12, !llvm.loop !18

64:                                               ; preds = %17
  %65 = load double, ptr %4, align 8, !tbaa !9
  %66 = getelementptr inbounds %"class.EulerSolver2D::MainData2D", ptr %11, i32 0, i32 27
  %67 = load i64, ptr %66, align 8, !tbaa !13
  %68 = uitofp i64 %67 to double
  %69 = fdiv double %65, %68
  store double %69, ptr %4, align 8, !tbaa !9
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef @.str.14)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.121)
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.122)
  %74 = load double, ptr %4, align 8, !tbaa !9
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %73, double noundef %74)
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef @.str.14)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.123)
  %78 = load double, ptr %5, align 8, !tbaa !9
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %77, double noundef %78)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef @.str.14)
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.124)
  %82 = load double, ptr %6, align 8, !tbaa !9
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %81, double noundef %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @.str.14)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.125)
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 456}
!14 = !{!"_ZTSN13EulerSolver2D10MainData2DE", !15, i64 0, !15, i64 32, !15, i64 64, !15, i64 96, !15, i64 128, !15, i64 160, !12, i64 192, !15, i64 200, !15, i64 232, !10, i64 264, !15, i64 272, !15, i64 304, !12, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !12, i64 408, !6, i64 416, !12, i64 424, !12, i64 432, !12, i64 440, !6, i64 448, !12, i64 456, !6, i64 464, !12, i64 472, !6, i64 480, !12, i64 488, !6, i64 496, !12, i64 504}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !12, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!14, !6, i64 464}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; 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 }
%"class.EulerSolver2D::edge_type" = type { i32, i32, i32, i32, %class.Array2D.4, double, %class.Array2D.4, double, i32, i32 }
%class.Array2D.4 = type { i32, i32, i32, i32, i32, i32, i8, i8, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [54 x i8], align 1

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

; 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

; 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 #2 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13EulerSolver2D10MainData2D17check_skewness_ncEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(512) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store double 1.000000e+05, ptr %2, align 8, !tbaa !5
  store double -1.000000e+05, ptr %3, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 456
  %7 = load i64, ptr %6, align 8, !tbaa !9
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 464
  br label %28

._crit_edge.loopexit:                             ; preds = %28
  %9 = uitofp i64 %56 to double
  %10 = fdiv double %48, %9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %1
  %11 = phi double [ 0x7FF8000000000000, %1 ], [ %10, %._crit_edge.loopexit ]
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.7)
  %13 = 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.14)
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.121)
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.122)
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %15, double noundef %11)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str.14)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.123)
  %19 = load double, ptr %2, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %18, double noundef %19)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.14)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.124)
  %23 = load double, ptr %3, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %22, double noundef %23)
  %25 = 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.14)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.125)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret void

28:                                               ; preds = %.lr.ph, %28
  %.015 = phi i64 [ 0, %.lr.ph ], [ %55, %28 ]
  %.01214 = phi double [ 0.000000e+00, %.lr.ph ], [ %48, %28 ]
  %29 = load ptr, ptr %8, align 8, !tbaa !15
  %30 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %29, i64 %.015, i32 6
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Array2DIdEclEi(ptr noundef nonnull align 8 dereferenceable(40) %30, i32 noundef 0)
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !15
  %34 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %33, i64 %.015, i32 4
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Array2DIdEclEi(ptr noundef nonnull align 8 dereferenceable(40) %34, i32 noundef 0)
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = load ptr, ptr %8, align 8, !tbaa !15
  %38 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %37, i64 %.015, i32 6
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Array2DIdEclEi(ptr noundef nonnull align 8 dereferenceable(40) %38, i32 noundef 1)
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = load ptr, ptr %8, align 8, !tbaa !15
  %42 = getelementptr inbounds %"class.EulerSolver2D::edge_type", ptr %41, i64 %.015, i32 4
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Array2DIdEclEi(ptr noundef nonnull align 8 dereferenceable(40) %42, i32 noundef 1)
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = fmul double %40, %44
  %46 = call double @llvm.fmuladd.f64(double %32, double %36, double %45)
  %47 = call noundef double @_ZSt3absd(double noundef %46)
  %48 = fadd double %.01214, %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %49 = call noundef double @_ZSt3absd(double noundef %46)
  store double %49, ptr %4, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %51 = load double, ptr %50, align 8, !tbaa !5
  store double %51, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %52 = call noundef double @_ZSt3absd(double noundef %46)
  store double %52, ptr %5, align 8, !tbaa !5
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %54 = load double, ptr %53, align 8, !tbaa !5
  store double %54, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %55 = add nuw i64 %.015, 1
  %56 = load i64, ptr %6, align 8, !tbaa !9
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %28, label %._crit_edge.loopexit, !llvm.loop !16
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !14, i64 456}
!10 = !{!"_ZTSN13EulerSolver2D10MainData2DE", !11, i64 0, !11, i64 32, !11, i64 64, !11, i64 96, !11, i64 128, !11, i64 160, !14, i64 192, !11, i64 200, !11, i64 232, !6, i64 264, !11, i64 272, !11, i64 304, !14, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !14, i64 408, !13, i64 416, !14, i64 424, !14, i64 432, !14, i64 440, !13, i64 448, !14, i64 456, !13, i64 464, !14, i64 472, !13, i64 480, !14, i64 488, !13, i64 496, !14, i64 504}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!10, !13, i64 464}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass