; LLVM IR from lzyrapx/Competitive-Programming :: Retired_code/Simplex (POJ1275)

; 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_istream" = type { ptr, i64, %"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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@a = external dso_local global [1010 x [100 x double]], align 16
@b = external dso_local global [1010 x double], align 16
@c = external dso_local global [100 x double], align 16
@ans = external dso_local global double, align 8
@sum = external dso_local global [100 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z7simplexv() #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5checkv() #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  br label %13

13:                                               ; preds = %80, %77, %2
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr %6, align 4, !tbaa !5
  %16 = icmp ne i32 %14, 0
  br i1 %16, label %17, label %85

17:                                               ; preds = %13
  store i32 24, ptr @N, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @a, i8 0, i64 808000, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @sum, i8 0, i64 400, i1 false)
  store double 0.000000e+00, ptr @ans, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %28, %17
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = load i32, ptr @N, align 4, !tbaa !5
  %21 = icmp sle i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %31

23:                                               ; preds = %18
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100 x double], ptr @c, i64 0, i64 %25
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %26)
  br label %28

28:                                               ; preds = %23
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %7, align 4, !tbaa !5
  br label %18, !llvm.loop !13

31:                                               ; preds = %22
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @M)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %71, %31
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = load i32, ptr @M, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %40 = load i32, ptr %10, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %64, %38
  %43 = load i32, ptr %11, align 4, !tbaa !5
  %44 = icmp sle i32 %43, 8
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 10, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %67

46:                                               ; preds = %42
  %47 = load i32, ptr %10, align 4, !tbaa !5
  %48 = icmp eq i32 %47, 25
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %49, %46
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %52
  %54 = load i32, ptr %10, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100 x double], ptr %53, i64 0, i64 %55
  store double 1.000000e+00, ptr %56, align 8, !tbaa !11
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %59, align 4, !tbaa !5
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %10, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %50
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %11, align 4, !tbaa !5
  br label %42, !llvm.loop !15

67:                                               ; preds = %45
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [1010 x double], ptr @b, i64 0, i64 %69
  store double 1.000000e+00, ptr %70, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %71

71:                                               ; preds = %67
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %8, align 4, !tbaa !5
  br label %33, !llvm.loop !16

74:                                               ; preds = %37
  %75 = call noundef i32 @_Z5checkv()
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %74
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %78, i8 noundef signext 10)
  br label %13, !llvm.loop !17

80:                                               ; preds = %74
  %81 = call noundef double @_Z7simplexv()
  %82 = fadd double %81, 5.000000e-01
  %83 = fptosi double %82 to i32
  %84 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %83)
  br label %13, !llvm.loop !17

85:                                               ; preds = %13
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %86 = load i32, ptr %3, align 4
  ret i32 %86
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

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

declare i32 @printf(ptr noundef, ...) #4

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


; 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_istream" = type { ptr, i64, %"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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local local_unnamed_addr global i32, align 4
@M = external dso_local global i32, align 4
@a = external dso_local local_unnamed_addr global [1010 x [100 x double]], align 16
@b = external dso_local local_unnamed_addr global [1010 x double], align 16
@c = external dso_local global [100 x double], align 16
@ans = external dso_local local_unnamed_addr global double, align 8
@sum = external dso_local local_unnamed_addr global [100 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z7simplexv() local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5checkv() local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %6 = load i32, ptr %3, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr %3, align 4, !tbaa !5
  %.not22 = icmp eq i32 %6, 0
  br i1 %.not22, label %._crit_edge25, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %2, %.backedge
  store i32 24, ptr @N, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(808000) @a, i8 0, i64 808000, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) @sum, i8 0, i64 400, i1 false)
  store double 0.000000e+00, ptr @ans, align 8, !tbaa !9
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @M)
  %9 = load i32, ptr @M, align 4, !tbaa !5
  %.not1317 = icmp slt i32 %9, 1
  br i1 %.not1317, label %._crit_edge21, label %.lr.ph20

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %10 = getelementptr inbounds [100 x double], ptr @c, i64 0, i64 %indvars.iv
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %.not12.not = icmp slt i64 %indvars.iv, %13
  br i1 %.not12.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge21:                                    ; preds = %.lr.ph20, %._crit_edge
  %14 = call noundef i32 @_Z5checkv()
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %77, label %82

.lr.ph20:                                         ; preds = %._crit_edge, %.lr.ph20
  %indvars.iv27 = phi i64 [ %indvars.iv.next28, %.lr.ph20 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1
  %19 = icmp eq i32 %18, 25
  %spec.select = select i1 %19, i32 1, i32 %18
  %20 = sext i32 %spec.select to i64
  %21 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %indvars.iv27, i64 %20
  store double 1.000000e+00, ptr %21, align 8, !tbaa !9
  %22 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %20
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 4, !tbaa !5
  %25 = add nsw i32 %spec.select, 1
  %26 = icmp eq i32 %25, 25
  %spec.select.1 = select i1 %26, i32 1, i32 %25
  %27 = sext i32 %spec.select.1 to i64
  %28 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %indvars.iv27, i64 %27
  store double 1.000000e+00, ptr %28, align 8, !tbaa !9
  %29 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %27
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %29, align 4, !tbaa !5
  %32 = add nsw i32 %spec.select.1, 1
  %33 = icmp eq i32 %32, 25
  %spec.select.2 = select i1 %33, i32 1, i32 %32
  %34 = sext i32 %spec.select.2 to i64
  %35 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %indvars.iv27, i64 %34
  store double 1.000000e+00, ptr %35, align 8, !tbaa !9
  %36 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %34
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %36, align 4, !tbaa !5
  %39 = add nsw i32 %spec.select.2, 1
  %40 = icmp eq i32 %39, 25
  %spec.select.3 = select i1 %40, i32 1, i32 %39
  %41 = sext i32 %spec.select.3 to i64
  %42 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %indvars.iv27, i64 %41
  store double 1.000000e+00, ptr %42, align 8, !tbaa !9
  %43 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %41
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %43, align 4, !tbaa !5
  %46 = add nsw i32 %spec.select.3, 1
  %47 = icmp eq i32 %46, 25
  %spec.select.4 = select i1 %47, i32 1, i32 %46
  %48 = sext i32 %spec.select.4 to i64
  %49 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %indvars.iv27, i64 %48
  store double 1.000000e+00, ptr %49, align 8, !tbaa !9
  %50 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %48
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %50, align 4, !tbaa !5
  %53 = add nsw i32 %spec.select.4, 1
  %54 = icmp eq i32 %53, 25
  %spec.select.5 = select i1 %54, i32 1, i32 %53
  %55 = sext i32 %spec.select.5 to i64
  %56 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %indvars.iv27, i64 %55
  store double 1.000000e+00, ptr %56, align 8, !tbaa !9
  %57 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %55
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %57, align 4, !tbaa !5
  %60 = add nsw i32 %spec.select.5, 1
  %61 = icmp eq i32 %60, 25
  %spec.select.6 = select i1 %61, i32 1, i32 %60
  %62 = sext i32 %spec.select.6 to i64
  %63 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %indvars.iv27, i64 %62
  store double 1.000000e+00, ptr %63, align 8, !tbaa !9
  %64 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %62
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %64, align 4, !tbaa !5
  %67 = add nsw i32 %spec.select.6, 1
  %68 = icmp eq i32 %67, 25
  %spec.select.7 = select i1 %68, i32 1, i32 %67
  %69 = sext i32 %spec.select.7 to i64
  %70 = getelementptr inbounds [1010 x [100 x double]], ptr @a, i64 0, i64 %indvars.iv27, i64 %69
  store double 1.000000e+00, ptr %70, align 8, !tbaa !9
  %71 = getelementptr inbounds [100 x i32], ptr @sum, i64 0, i64 %69
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %71, align 4, !tbaa !5
  %74 = getelementptr inbounds [1010 x double], ptr @b, i64 0, i64 %indvars.iv27
  store double 1.000000e+00, ptr %74, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1
  %75 = load i32, ptr @M, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %.not13.not = icmp slt i64 %indvars.iv27, %76
  br i1 %.not13.not, label %.lr.ph20, label %._crit_edge21, !llvm.loop !13

77:                                               ; preds = %._crit_edge21
  %78 = 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)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %78, i8 noundef signext 10)
  br label %.backedge

.backedge:                                        ; preds = %77, %82
  %80 = load i32, ptr %3, align 4, !tbaa !5
  %81 = add nsw i32 %80, -1
  store i32 %81, ptr %3, align 4, !tbaa !5
  %.not = icmp eq i32 %80, 0
  br i1 %.not, label %._crit_edge25, label %.lr.ph.preheader, !llvm.loop !14

82:                                               ; preds = %._crit_edge21
  %83 = call noundef double @_Z7simplexv()
  %84 = fadd double %83, 5.000000e-01
  %85 = fptosi double %84 to i32
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %85)
  br label %.backedge

._crit_edge25:                                    ; preds = %.backedge, %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

; 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 #6

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass