; LLVM IR from abeaumont/competitive-programming :: aceptaelreto (107)

; 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" }

@composite = external dso_local global [100000 x i8], align 16
@pi = external dso_local global [100000 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 4, ptr %2, align 4, !tbaa !8
  br label %17

17:                                               ; preds = %25, %0
  %18 = load i32, ptr %2, align 4, !tbaa !8
  %19 = icmp slt i32 %18, 100000
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %28

21:                                               ; preds = %17
  %22 = load i32, ptr %2, align 4, !tbaa !8
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %23
  store i8 1, ptr %24, align 1, !tbaa !11
  br label %25

25:                                               ; preds = %21
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = add nsw i32 %26, 2
  store i32 %27, ptr %2, align 4, !tbaa !8
  br label %17, !llvm.loop !13

28:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 3, ptr %3, align 4, !tbaa !8
  br label %29

29:                                               ; preds = %56, %28
  %30 = load i32, ptr %3, align 4, !tbaa !8
  %31 = icmp slt i32 %30, 100000
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %29
  %34 = load i32, ptr %3, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !11, !range !15, !noundef !16
  %38 = trunc i8 %37 to i1
  br i1 %38, label %55, label %39

39:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %40 = load i32, ptr %3, align 4, !tbaa !8
  %41 = mul nsw i32 %40, 2
  store i32 %41, ptr %5, align 4, !tbaa !8
  br label %42

42:                                               ; preds = %50, %39
  %43 = load i32, ptr %5, align 4, !tbaa !8
  %44 = icmp slt i32 %43, 100000
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %42
  %47 = load i32, ptr %5, align 4, !tbaa !8
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %48
  store i8 1, ptr %49, align 1, !tbaa !11
  br label %50

50:                                               ; preds = %46
  %51 = load i32, ptr %3, align 4, !tbaa !8
  %52 = load i32, ptr %5, align 4, !tbaa !8
  %53 = add nsw i32 %52, %51
  store i32 %53, ptr %5, align 4, !tbaa !8
  br label %42, !llvm.loop !17

54:                                               ; preds = %45
  br label %55

55:                                               ; preds = %54, %33
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %3, align 4, !tbaa !8
  %58 = add nsw i32 %57, 2
  store i32 %58, ptr %3, align 4, !tbaa !8
  br label %29, !llvm.loop !18

59:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 2, ptr %6, align 4, !tbaa !8
  br label %60

60:                                               ; preds = %81, %59
  %61 = load i32, ptr %6, align 4, !tbaa !8
  %62 = icmp slt i32 %61, 100000
  br i1 %62, label %64, label %63

63:                                               ; preds = %60
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %84

64:                                               ; preds = %60
  %65 = load i32, ptr %6, align 4, !tbaa !8
  %66 = sub nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100000 x i32], ptr @pi, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !8
  %70 = load i32, ptr %6, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !11, !range !15, !noundef !16
  %74 = trunc i8 %73 to i1
  %75 = xor i1 %74, true
  %76 = zext i1 %75 to i32
  %77 = add nsw i32 %69, %76
  %78 = load i32, ptr %6, align 4, !tbaa !8
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100000 x i32], ptr @pi, i64 0, i64 %79
  store i32 %77, ptr %80, align 4, !tbaa !8
  br label %81

81:                                               ; preds = %64
  %82 = load i32, ptr %6, align 4, !tbaa !8
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %6, align 4, !tbaa !8
  br label %60, !llvm.loop !19

84:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  br label %85

85:                                               ; preds = %139, %84
  br label %86

86:                                               ; preds = %85
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %89 = load i32, ptr %7, align 4, !tbaa !8
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %95, label %91

91:                                               ; preds = %86
  %92 = load i32, ptr %8, align 4, !tbaa !8
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %95, label %94

94:                                               ; preds = %91
  br label %140

95:                                               ; preds = %91, %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %96 = load i32, ptr %7, align 4, !tbaa !8
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100000 x i32], ptr @pi, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !8
  %100 = sitofp i32 %99 to double
  %101 = load i32, ptr %7, align 4, !tbaa !8
  %102 = sitofp i32 %101 to double
  %103 = fdiv double %100, %102
  %104 = load i32, ptr %7, align 4, !tbaa !8
  %105 = sitofp i32 %104 to double
  %106 = call double @log(double noundef %105) #6
  %107 = fdiv double 1.000000e+00, %106
  %108 = fsub double %103, %107
  store double %108, ptr %9, align 8, !tbaa !20
  %109 = load double, ptr %9, align 8, !tbaa !20
  %110 = fcmp olt double %109, 0.000000e+00
  br i1 %110, label %111, label %114

111:                                              ; preds = %95
  %112 = load double, ptr %9, align 8, !tbaa !20
  %113 = fneg double %112
  store double %113, ptr %9, align 8, !tbaa !20
  br label %114

114:                                              ; preds = %111, %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %115

115:                                              ; preds = %123, %114
  %116 = load i32, ptr %10, align 4, !tbaa !8
  %117 = load i32, ptr %8, align 4, !tbaa !8
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %126

120:                                              ; preds = %115
  %121 = load double, ptr %9, align 8, !tbaa !20
  %122 = fmul double %121, 1.000000e+01
  store double %122, ptr %9, align 8, !tbaa !20
  br label %123

123:                                              ; preds = %120
  %124 = load i32, ptr %10, align 4, !tbaa !8
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %10, align 4, !tbaa !8
  br label %115, !llvm.loop !22

126:                                              ; preds = %119
  %127 = load double, ptr %9, align 8, !tbaa !20
  %128 = fcmp oeq double %127, 1.000000e+00
  br i1 %128, label %129, label %131

129:                                              ; preds = %126
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %139

131:                                              ; preds = %126
  %132 = load double, ptr %9, align 8, !tbaa !20
  %133 = fcmp olt double %132, 1.000000e+00
  br i1 %133, label %134, label %136

134:                                              ; preds = %131
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  br label %138

136:                                              ; preds = %131
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %138

138:                                              ; preds = %136, %134
  br label %139

139:                                              ; preds = %138, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %85, !llvm.loop !23

140:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %141 = load i32, ptr %1, align 4
  ret i32 %141
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

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

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

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

; Function Attrs: nounwind
declare double @log(double noundef) #4

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

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !10, i64 0}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !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" }

@composite = external dso_local local_unnamed_addr global [100000 x i8], align 16
@pi = external dso_local local_unnamed_addr global [100000 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  br label %9

9:                                                ; preds = %9, %0
  %indvars.iv = phi i64 [ 4, %0 ], [ %indvars.iv.next.5, %9 ]
  %10 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv
  store i8 1, ptr %10, align 4, !tbaa !8
  %indvars.iv.next = or disjoint i64 %indvars.iv, 2
  %11 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv.next
  store i8 1, ptr %11, align 2, !tbaa !8
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 4
  %12 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv.next.1
  store i8 1, ptr %12, align 4, !tbaa !8
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 6
  %13 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv.next.2
  store i8 1, ptr %13, align 2, !tbaa !8
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 8
  %14 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv.next.3
  store i8 1, ptr %14, align 4, !tbaa !8
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 10
  %15 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv.next.4
  store i8 1, ptr %15, align 2, !tbaa !8
  %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 12
  %16 = icmp ult i64 %indvars.iv, 99988
  br i1 %16, label %9, label %.preheader31, !llvm.loop !11

.preheader31:                                     ; preds = %9, %.loopexit.1
  %indvars.iv49 = phi i64 [ %indvars.iv.next50.1, %.loopexit.1 ], [ 3, %9 ]
  %indvars.iv47 = phi i64 [ %indvars.iv.next48.1, %.loopexit.1 ], [ 6, %9 ]
  %17 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv49
  %18 = load i8, ptr %17, align 1, !tbaa !8, !range !13, !noundef !14
  %19 = trunc nuw i8 %18 to i1
  %20 = icmp ugt i64 %indvars.iv49, 49999
  %or.cond44.not = or i1 %20, %19
  br i1 %or.cond44.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader31, %.lr.ph
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph ], [ %indvars.iv47, %.preheader31 ]
  %21 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv51
  store i8 1, ptr %21, align 1, !tbaa !8
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, %indvars.iv49
  %22 = icmp ult i64 %indvars.iv.next52, 100000
  br i1 %22, label %.lr.ph, label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %.lr.ph, %.preheader31
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 2
  %23 = icmp ult i64 %indvars.iv49, 99998
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 4
  br i1 %23, label %.preheader31.1, label %.preheader.preheader, !llvm.loop !16

.preheader31.1:                                   ; preds = %.loopexit
  %24 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv.next50
  %25 = load i8, ptr %24, align 1, !tbaa !8, !range !13, !noundef !14
  %26 = trunc nuw i8 %25 to i1
  %27 = icmp ugt i64 %indvars.iv49, 49997
  %or.cond44.not.1 = or i1 %27, %26
  br i1 %or.cond44.not.1, label %.loopexit.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.preheader31.1, %.lr.ph.1
  %indvars.iv51.1 = phi i64 [ %indvars.iv.next52.1, %.lr.ph.1 ], [ %indvars.iv.next48, %.preheader31.1 ]
  %28 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv51.1
  store i8 1, ptr %28, align 1, !tbaa !8
  %indvars.iv.next52.1 = add nuw nsw i64 %indvars.iv51.1, %indvars.iv.next50
  %29 = icmp ult i64 %indvars.iv.next52.1, 100000
  br i1 %29, label %.lr.ph.1, label %.loopexit.1, !llvm.loop !15

.loopexit.1:                                      ; preds = %.lr.ph.1, %.preheader31.1
  %indvars.iv.next50.1 = add nuw nsw i64 %indvars.iv49, 4
  %indvars.iv.next48.1 = add nuw nsw i64 %indvars.iv47, 8
  br label %.preheader31

.preheader.preheader:                             ; preds = %.loopexit
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @pi, i64 4), align 4, !tbaa !17
  br label %.preheader

30:                                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %33 = load i32, ptr %1, align 4, !tbaa !17
  %34 = icmp ne i32 %33, 0
  %35 = load i32, ptr %2, align 4
  %36 = icmp ne i32 %35, 0
  %or.cond39 = select i1 %34, i1 true, i1 %36
  br i1 %or.cond39, label %.lr.ph41, label %._crit_edge42

.preheader:                                       ; preds = %.preheader, %.preheader.preheader
  %37 = phi i32 [ %.pre, %.preheader.preheader ], [ %48, %.preheader ]
  %indvars.iv55 = phi i64 [ 2, %.preheader.preheader ], [ %indvars.iv.next56.1, %.preheader ]
  %38 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv55
  %39 = load i8, ptr %38, align 2, !tbaa !8, !range !13, !noundef !14
  %40 = xor i8 %39, 1
  %41 = zext nneg i8 %40 to i32
  %42 = add nsw i32 %37, %41
  %43 = getelementptr inbounds [100000 x i32], ptr @pi, i64 0, i64 %indvars.iv55
  store i32 %42, ptr %43, align 8, !tbaa !17
  %indvars.iv.next56 = or disjoint i64 %indvars.iv55, 1
  %44 = getelementptr inbounds [100000 x i8], ptr @composite, i64 0, i64 %indvars.iv.next56
  %45 = load i8, ptr %44, align 1, !tbaa !8, !range !13, !noundef !14
  %46 = xor i8 %45, 1
  %47 = zext nneg i8 %46 to i32
  %48 = add nsw i32 %42, %47
  %49 = getelementptr inbounds [100000 x i32], ptr @pi, i64 0, i64 %indvars.iv.next56
  store i32 %48, ptr %49, align 4, !tbaa !17
  %indvars.iv.next56.1 = add nuw nsw i64 %indvars.iv55, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next56.1, 100000
  br i1 %exitcond.not.1, label %30, label %.preheader, !llvm.loop !19

.lr.ph41:                                         ; preds = %30, %._crit_edge
  %50 = phi i32 [ %74, %._crit_edge ], [ %33, %30 ]
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100000 x i32], ptr @pi, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !17
  %54 = sitofp i32 %53 to double
  %55 = sitofp i32 %50 to double
  %56 = call double @log(double noundef %55) #6
  %57 = insertelement <2 x double> <double poison, double 1.000000e+00>, double %54, i64 0
  %58 = insertelement <2 x double> poison, double %55, i64 0
  %59 = insertelement <2 x double> %58, double %56, i64 1
  %60 = fdiv <2 x double> %57, %59
  %shift = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %61 = fsub <2 x double> %60, %shift
  %62 = extractelement <2 x double> %61, i64 0
  %63 = fcmp olt double %62, 0.000000e+00
  %64 = fneg double %62
  %.024 = select i1 %63, double %64, double %62
  %65 = load i32, ptr %2, align 4, !tbaa !17
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %.lr.ph38.preheader, label %._crit_edge

.lr.ph38.preheader:                               ; preds = %.lr.ph41
  %xtraiter = and i32 %65, 7
  %67 = icmp ult i32 %65, 8
  br i1 %67, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph38.preheader.new

.lr.ph38.preheader.new:                           ; preds = %.lr.ph38.preheader
  %unroll_iter = and i32 %65, 2147483640
  br label %.lr.ph38

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph38, %.lr.ph38.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph38.preheader ], [ %85, %.lr.ph38 ]
  %.136.unr = phi double [ %.024, %.lr.ph38.preheader ], [ %85, %.lr.ph38 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph38.epil

.lr.ph38.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph38.epil
  %.136.epil = phi double [ %68, %.lr.ph38.epil ], [ %.136.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph38.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %68 = fmul double %.136.epil, 1.000000e+01
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph38.epil, !llvm.loop !20

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph38.epil, %.lr.ph41
  %.1.lcssa = phi double [ %.024, %.lr.ph41 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %68, %.lr.ph38.epil ]
  %69 = fcmp oeq double %.1.lcssa, 1.000000e+00
  %70 = fcmp olt double %.1.lcssa, 1.000000e+00
  %.str.1..str.2 = select i1 %70, ptr @.str.1, ptr @.str.2
  %.str.1.sink = select i1 %69, ptr @.str, ptr %.str.1..str.2
  %71 = 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.1.sink)
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %74 = load i32, ptr %1, align 4, !tbaa !17
  %75 = icmp ne i32 %74, 0
  %76 = load i32, ptr %2, align 4
  %77 = icmp ne i32 %76, 0
  %or.cond = select i1 %75, i1 true, i1 %77
  br i1 %or.cond, label %.lr.ph41, label %._crit_edge42, !llvm.loop !22

.lr.ph38:                                         ; preds = %.lr.ph38, %.lr.ph38.preheader.new
  %.136 = phi double [ %.024, %.lr.ph38.preheader.new ], [ %85, %.lr.ph38 ]
  %niter = phi i32 [ 0, %.lr.ph38.preheader.new ], [ %niter.next.7, %.lr.ph38 ]
  %78 = fmul double %.136, 1.000000e+01
  %79 = fmul double %78, 1.000000e+01
  %80 = fmul double %79, 1.000000e+01
  %81 = fmul double %80, 1.000000e+01
  %82 = fmul double %81, 1.000000e+01
  %83 = fmul double %82, 1.000000e+01
  %84 = fmul double %83, 1.000000e+01
  %85 = fmul double %84, 1.000000e+01
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph38, !llvm.loop !23

._crit_edge42:                                    ; preds = %._crit_edge, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #4

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

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"bool", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !10, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass