; LLVM IR from kazunetakahashi/atcoder :: 2018/0415_s8pc-5/B.ll (Z2okd)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::tuple<double, double>, std::allocator<std::tuple<double, double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<double, double>, std::allocator<std::tuple<double, double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<double, double>, std::allocator<std::tuple<double, double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<double, double>, std::allocator<std::tuple<double, double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.5", %"struct.std::_Head_base.6" }
%"struct.std::_Tuple_impl.5" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { double }
%"struct.std::_Head_base.6" = type { double }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@V = external dso_local global %"class.std::vector", align 8
@W = external dso_local global %"class.std::vector", align 8
@D = external dso_local global %"class.std::vector.0", align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z2okd(double noundef %0) #0 {
  %2 = alloca i1, align 1
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::tuple", align 8
  %8 = alloca %"class.std::tuple", align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::tuple", align 8
  %15 = alloca %"class.std::tuple", align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  store double %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %74, %1
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = load i32, ptr @N, align 4, !tbaa !9
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  store i32 2, ptr %5, align 4
  br label %77

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

25:                                               ; preds = %68, %24
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = load i32, ptr @M, align 4, !tbaa !9
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 5, ptr %5, align 4
  br label %71

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJddEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @V, i64 noundef %32) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %33, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJddEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %35) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %36, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @D, i64 noundef %38) #4
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = load double, ptr %3, align 8, !tbaa !5
  %42 = fadd double %40, %41
  store double %42, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  %46 = load double, ptr %45, align 8, !tbaa !5
  %47 = fsub double %44, %46
  store double %47, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %49 = load double, ptr %48, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = fsub double %49, %51
  store double %52, ptr %11, align 8, !tbaa !5
  %53 = load double, ptr %10, align 8, !tbaa !5
  %54 = load double, ptr %10, align 8, !tbaa !5
  %55 = load double, ptr %11, align 8, !tbaa !5
  %56 = load double, ptr %11, align 8, !tbaa !5
  %57 = fmul double %55, %56
  %58 = call double @llvm.fmuladd.f64(double %53, double %54, double %57)
  %59 = load double, ptr %9, align 8, !tbaa !5
  %60 = load double, ptr %9, align 8, !tbaa !5
  %61 = fmul double %59, %60
  %62 = fcmp olt double %58, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %30
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %65

64:                                               ; preds = %30
  store i32 0, ptr %5, align 4
  br label %65

65:                                               ; preds = %64, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  %66 = load i32, ptr %5, align 4
  switch i32 %66, label %71 [
    i32 0, label %67
  ]

67:                                               ; preds = %65
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %6, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %6, align 4, !tbaa !9
  br label %25, !llvm.loop !11

71:                                               ; preds = %65, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %72 = load i32, ptr %5, align 4
  switch i32 %72, label %77 [
    i32 5, label %73
  ]

73:                                               ; preds = %71
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %4, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %4, align 4, !tbaa !9
  br label %19, !llvm.loop !13

77:                                               ; preds = %71, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %78 = load i32, ptr %5, align 4
  switch i32 %78, label %145 [
    i32 2, label %79
    i32 1, label %143
  ]

79:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %137, %79
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = load i32, ptr @M, align 4, !tbaa !9
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  store i32 8, ptr %5, align 4
  br label %140

85:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %131, %85
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = load i32, ptr @M, align 4, !tbaa !9
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  store i32 11, ptr %5, align 4
  br label %134

91:                                               ; preds = %86
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = icmp eq i32 %92, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %91
  br label %131

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJddEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %98) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %99, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJddEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %101) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %102, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %103 = load double, ptr %3, align 8, !tbaa !5
  %104 = load double, ptr %3, align 8, !tbaa !5
  %105 = fadd double %103, %104
  store double %105, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  %107 = load double, ptr %106, align 8, !tbaa !5
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %15) #4
  %109 = load double, ptr %108, align 8, !tbaa !5
  %110 = fsub double %107, %109
  store double %110, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  %112 = load double, ptr %111, align 8, !tbaa !5
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %15) #4
  %114 = load double, ptr %113, align 8, !tbaa !5
  %115 = fsub double %112, %114
  store double %115, ptr %18, align 8, !tbaa !5
  %116 = load double, ptr %17, align 8, !tbaa !5
  %117 = load double, ptr %17, align 8, !tbaa !5
  %118 = load double, ptr %18, align 8, !tbaa !5
  %119 = load double, ptr %18, align 8, !tbaa !5
  %120 = fmul double %118, %119
  %121 = call double @llvm.fmuladd.f64(double %116, double %117, double %120)
  %122 = load double, ptr %16, align 8, !tbaa !5
  %123 = load double, ptr %16, align 8, !tbaa !5
  %124 = fmul double %122, %123
  %125 = fcmp olt double %121, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %96
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %128

127:                                              ; preds = %96
  store i32 0, ptr %5, align 4
  br label %128

128:                                              ; preds = %127, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  %129 = load i32, ptr %5, align 4
  switch i32 %129, label %134 [
    i32 0, label %130
  ]

130:                                              ; preds = %128
  br label %131

131:                                              ; preds = %130, %95
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %13, align 4, !tbaa !9
  br label %86, !llvm.loop !14

134:                                              ; preds = %128, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %135 = load i32, ptr %5, align 4
  switch i32 %135, label %140 [
    i32 11, label %136
  ]

136:                                              ; preds = %134
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %12, align 4, !tbaa !9
  br label %80, !llvm.loop !15

140:                                              ; preds = %134, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %141 = load i32, ptr %5, align 4
  switch i32 %141, label %145 [
    i32 8, label %142
    i32 1, label %143
  ]

142:                                              ; preds = %140
  store i1 true, ptr %2, align 1
  br label %143

143:                                              ; preds = %142, %140, %77
  %144 = load i1, ptr %2, align 1
  ret i1 %144

145:                                              ; preds = %140, %77
  unreachable
}

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

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

; 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) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::tuple<double, double>, std::allocator<std::tuple<double, double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<double, double>, std::allocator<std::tuple<double, double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<double, double>, std::allocator<std::tuple<double, double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<double, double>, std::allocator<std::tuple<double, double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.5", %"struct.std::_Head_base.6" }
%"struct.std::_Tuple_impl.5" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { double }
%"struct.std::_Head_base.6" = type { double }

@N = external dso_local local_unnamed_addr global i32, align 4
@M = external dso_local local_unnamed_addr global i32, align 4
@V = external dso_local global %"class.std::vector", align 8
@W = external dso_local global %"class.std::vector", align 8
@D = external dso_local global %"class.std::vector.0", align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z2okd(double noundef %0) local_unnamed_addr #0 {
  %2 = alloca %"class.std::tuple", align 8
  %3 = alloca %"class.std::tuple", align 8
  %4 = alloca %"class.std::tuple", align 8
  %5 = alloca %"class.std::tuple", align 8
  %6 = load i32, ptr @N, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  %.pre87 = load i32, ptr @M, align 4, !tbaa !5
  br i1 %7, label %.preheader61.lr.ph, label %.preheader59

.preheader61.lr.ph:                               ; preds = %1
  %8 = icmp sgt i32 %.pre87, 0
  br i1 %8, label %.preheader61, label %.thread53

.preheader61:                                     ; preds = %.preheader61.lr.ph, %._crit_edge
  %9 = phi i32 [ %37, %._crit_edge ], [ %6, %.preheader61.lr.ph ]
  %10 = phi i32 [ %38, %._crit_edge ], [ %.pre87, %.preheader61.lr.ph ]
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %._crit_edge ], [ 0, %.preheader61.lr.ph ]
  %.not64 = icmp sgt i32 %10, 0
  br i1 %.not64, label %.lr.ph, label %._crit_edge

.preheader59:                                     ; preds = %._crit_edge, %1
  %11 = phi i32 [ %.pre87, %1 ], [ %38, %._crit_edge ]
  %12 = icmp slt i32 %11, 1
  br i1 %12, label %.thread53, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader59
  %13 = fadd double %0, %0
  %14 = fmul double %13, %13
  br label %.preheader

15:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr @M, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %.not = icmp slt i64 %indvars.iv.next, %17
  br i1 %.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader61, %15
  %indvars.iv = phi i64 [ %indvars.iv.next, %15 ], [ 0, %.preheader61 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJddEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @V, i64 noundef %indvars.iv78) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %18, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJddEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %indvars.iv) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %19, i64 16, i1 false)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @D, i64 noundef %indvars.iv78) #4
  %21 = load double, ptr %20, align 8, !tbaa !11
  %22 = fadd double %21, %0
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %2) #4
  %24 = load double, ptr %23, align 8, !tbaa !11
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  %26 = load double, ptr %25, align 8, !tbaa !11
  %27 = fsub double %24, %26
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %2) #4
  %29 = load double, ptr %28, align 8, !tbaa !11
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  %31 = load double, ptr %30, align 8, !tbaa !11
  %32 = fsub double %29, %31
  %33 = fmul double %32, %32
  %34 = call double @llvm.fmuladd.f64(double %27, double %27, double %33)
  %35 = fmul double %22, %22
  %36 = fcmp uge double %34, %35
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  br i1 %36, label %15, label %.thread53

._crit_edge.loopexit:                             ; preds = %15
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader61
  %37 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %9, %.preheader61 ]
  %38 = phi i32 [ %16, %._crit_edge.loopexit ], [ %10, %.preheader61 ]
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %39 = sext i32 %37 to i64
  %40 = icmp slt i64 %indvars.iv.next79, %39
  br i1 %40, label %.preheader61, label %.preheader59, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge70
  %41 = phi i32 [ %11, %.preheader.preheader ], [ %65, %._crit_edge70 ]
  %indvars.iv84 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next85, %._crit_edge70 ]
  %.not4967 = icmp sgt i32 %41, 0
  br i1 %.not4967, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %.preheader, %61
  %42 = phi i32 [ %62, %61 ], [ %41, %.preheader ]
  %43 = phi i32 [ %63, %61 ], [ %41, %.preheader ]
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %61 ], [ 0, %.preheader ]
  %44 = icmp eq i64 %indvars.iv84, %indvars.iv81
  br i1 %44, label %61, label %45

45:                                               ; preds = %.lr.ph69
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJddEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %indvars.iv84) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %46, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJddEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %indvars.iv81) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %47, i64 16, i1 false)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  %49 = load double, ptr %48, align 8, !tbaa !11
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  %51 = load double, ptr %50, align 8, !tbaa !11
  %52 = fsub double %49, %51
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  %56 = load double, ptr %55, align 8, !tbaa !11
  %57 = fsub double %54, %56
  %58 = fmul double %57, %57
  %59 = call double @llvm.fmuladd.f64(double %52, double %52, double %58)
  %60 = fcmp uge double %59, %14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br i1 %60, label %._crit_edge88, label %.thread53

._crit_edge88:                                    ; preds = %45
  %.pre89 = load i32, ptr @M, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %._crit_edge88, %.lr.ph69
  %62 = phi i32 [ %.pre89, %._crit_edge88 ], [ %42, %.lr.ph69 ]
  %63 = phi i32 [ %.pre89, %._crit_edge88 ], [ %43, %.lr.ph69 ]
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %64 = sext i32 %63 to i64
  %.not49 = icmp slt i64 %indvars.iv.next82, %64
  br i1 %.not49, label %.lr.ph69, label %._crit_edge70, !llvm.loop !15

._crit_edge70:                                    ; preds = %61, %.preheader
  %65 = phi i32 [ %41, %.preheader ], [ %62, %61 ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %66 = sext i32 %65 to i64
  %.not90 = icmp slt i64 %indvars.iv.next85, %66
  br i1 %.not90, label %.preheader, label %.thread53, !llvm.loop !16

.thread53:                                        ; preds = %.lr.ph, %._crit_edge70, %45, %.preheader61.lr.ph, %.preheader59
  %.11 = phi i1 [ true, %.preheader59 ], [ true, %.preheader61.lr.ph ], [ false, %45 ], [ true, %._crit_edge70 ], [ false, %.lr.ph ]
  ret i1 %.11
}

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

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

; 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) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !10, !14}
!14 = !{!"llvm.loop.unswitch.partial.disable"}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !14}


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