; LLVM IR from DionysiosB/CodeForces :: 0001-0099 (17A-NoldbachProblem)

; 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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1
  %19 = sext i32 %18 to i64
  %20 = call noalias noundef nonnull ptr @_Znam(i64 noundef %19) #9
  store ptr %20, ptr %4, align 8, !tbaa !9
  %21 = load ptr, ptr %4, align 8, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %21, i64 1
  store i8 0, ptr %22, align 1, !tbaa !11
  %23 = load ptr, ptr %4, align 8, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %23, i64 0
  store i8 0, ptr %24, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %35, %0
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %38

30:                                               ; preds = %25
  %31 = load ptr, ptr %4, align 8, !tbaa !9
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i8, ptr %31, i64 %33
  store i8 1, ptr %34, align 1, !tbaa !11
  br label %35

35:                                               ; preds = %30
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %5, align 4, !tbaa !5
  br label %25, !llvm.loop !13

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

39:                                               ; preds = %74, %38
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = sitofp i32 %40 to double
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sitofp i32 %42 to double
  %44 = call double @sqrt(double noundef %43) #8
  %45 = fadd double %44, 1.000000e+00
  %46 = fcmp ole double %41, %45
  br i1 %46, label %48, label %47

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

48:                                               ; preds = %39
  %49 = load ptr, ptr %4, align 8, !tbaa !9
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %49, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !11, !range !15, !noundef !16
  %54 = trunc i8 %53 to i1
  br i1 %54, label %56, label %55

55:                                               ; preds = %48
  br label %74

56:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = mul nsw i32 2, %57
  store i32 %58, ptr %8, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %69, %56
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = icmp sle i32 %60, %61
  br i1 %62, label %64, label %63

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

64:                                               ; preds = %59
  %65 = load ptr, ptr %4, align 8, !tbaa !9
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %65, i64 %67
  store i8 0, ptr %68, align 1, !tbaa !11
  br label %69

69:                                               ; preds = %64
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = add nsw i32 %71, %70
  store i32 %72, ptr %8, align 4, !tbaa !5
  br label %59, !llvm.loop !17

73:                                               ; preds = %63
  br label %74

74:                                               ; preds = %73, %55
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %6, align 4, !tbaa !5
  br label %39, !llvm.loop !18

77:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 2, ptr %10, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %97, %77
  %79 = load i32, ptr %10, align 4, !tbaa !5
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = icmp sle i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %100

83:                                               ; preds = %78
  %84 = load ptr, ptr %4, align 8, !tbaa !9
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i8, ptr %84, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !11, !range !15, !noundef !16
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %96

90:                                               ; preds = %83
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %91 unwind label %92

91:                                               ; preds = %90
  br label %96

92:                                               ; preds = %90
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %11, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %162

96:                                               ; preds = %91, %83
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %10, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %10, align 4, !tbaa !5
  br label %78, !llvm.loop !19

100:                                              ; preds = %82
  %101 = load ptr, ptr %4, align 8, !tbaa !9
  %102 = icmp eq ptr %101, null
  br i1 %102, label %104, label %103

103:                                              ; preds = %100
  call void @_ZdaPv(ptr noundef %101) #10
  br label %104

104:                                              ; preds = %103, %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 2, ptr %14, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %143, %104
  %106 = load i32, ptr %14, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %109 = icmp ult i64 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %105
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %146

111:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %139, %111
  %113 = load i32, ptr %15, align 4, !tbaa !5
  %114 = load i32, ptr %14, align 4, !tbaa !5
  %115 = sub nsw i32 %114, 1
  %116 = icmp slt i32 %113, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %112
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %142

118:                                              ; preds = %112
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %120) #8
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %15, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %125) #8
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = add nsw i32 %122, %127
  %129 = add nsw i32 %128, 1
  %130 = load i32, ptr %14, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %131) #8
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = icmp eq i32 %129, %133
  br i1 %134, label %135, label %138

135:                                              ; preds = %118
  %136 = load i32, ptr %13, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %13, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %135, %118
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %15, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %15, align 4, !tbaa !5
  br label %112, !llvm.loop !20

142:                                              ; preds = %117
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %14, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %14, align 4, !tbaa !5
  br label %105, !llvm.loop !21

146:                                              ; preds = %110
  %147 = load i32, ptr %13, align 4, !tbaa !5
  %148 = load i32, ptr %3, align 4, !tbaa !5
  %149 = icmp sge i32 %147, %148
  br i1 %149, label %150, label %157

150:                                              ; preds = %146
  %151 = invoke i32 @puts(ptr noundef @.str.1)
          to label %152 unwind label %153

152:                                              ; preds = %150
  br label %160

153:                                              ; preds = %157, %150
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %11, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %162

157:                                              ; preds = %146
  %158 = invoke i32 @puts(ptr noundef @.str.2)
          to label %159 unwind label %153

159:                                              ; preds = %157
  br label %160

160:                                              ; preds = %159, %152
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %161 = load i32, ptr %1, align 4
  ret i32 %161

162:                                              ; preds = %153, %92
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %11, align 8
  %165 = load i32, ptr %12, align 4
  %166 = insertvalue { ptr, i32 } poison, ptr %164, 0
  %167 = insertvalue { ptr, i32 } %166, i32 %165, 1
  resume { ptr, i32 } %167
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #7

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

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

declare i32 @puts(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin allocsize(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 = { 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 = { 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 #6 = { 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 = { nobuiltin 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 }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!"bool", !7, 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 = distinct !{!20, !14}
!21 = distinct !{!21, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  store i32 0, ptr %2, align 4, !tbaa !5
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = add nsw i32 %6, 1
  %8 = sext i32 %7 to i64
  %9 = call noalias noundef nonnull ptr @_Znam(i64 noundef %8) #10
  %10 = getelementptr inbounds i8, ptr %9, i64 1
  store i8 0, ptr %10, align 1, !tbaa !9
  store i8 0, ptr %9, align 1, !tbaa !9
  %.not41 = icmp slt i32 %6, 2
  br i1 %.not41, label %.preheader40, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %scevgep = getelementptr i8, ptr %9, i64 2
  %11 = add nsw i32 %6, -1
  %12 = zext nneg i32 %11 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep, i8 1, i64 %12, i1 false), !tbaa !9
  br label %.preheader40

.preheader40:                                     ; preds = %.lr.ph.preheader, %0
  %13 = sitofp i32 %6 to double
  %14 = call double @sqrt(double noundef %13) #9
  %15 = fadd double %14, 1.000000e+00
  %16 = fcmp ult double %15, 2.000000e+00
  br i1 %16, label %._crit_edge, label %.lr.ph47

._crit_edge:                                      ; preds = %.loopexit, %.preheader40
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #9
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 2, ptr %4, align 4, !tbaa !5
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %.not3748 = icmp slt i32 %17, 2
  br i1 %.not3748, label %._crit_edge52, label %.lr.ph51

.lr.ph47:                                         ; preds = %.preheader40, %.loopexit
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %.loopexit ], [ 2, %.preheader40 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit ], [ 4, %.preheader40 ]
  %18 = getelementptr inbounds i8, ptr %9, i64 %indvars.iv62
  %19 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %20 = trunc nuw i8 %19 to i1
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %indvars.iv62.tr = trunc i64 %indvars.iv62 to i32
  %21 = shl i32 %indvars.iv62.tr, 1
  %.not3943 = icmp sle i32 %21, %.pre
  %or.cond.not = select i1 %20, i1 %.not3943, i1 false
  br i1 %or.cond.not, label %.lr.ph45, label %.loopexit

.lr.ph45:                                         ; preds = %.lr.ph47, %.lr.ph45
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %.lr.ph45 ], [ %indvars.iv, %.lr.ph47 ]
  %22 = getelementptr inbounds i8, ptr %9, i64 %indvars.iv64
  store i8 0, ptr %22, align 1, !tbaa !9
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, %indvars.iv62
  %23 = trunc nuw i64 %indvars.iv.next65 to i32
  %.not39 = icmp slt i32 %.pre, %23
  br i1 %.not39, label %.loopexit, label %.lr.ph45, !llvm.loop !13

.loopexit:                                        ; preds = %.lr.ph45, %.lr.ph47
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %24 = trunc nuw nsw i64 %indvars.iv.next63 to i32
  %25 = uitofp nneg i32 %24 to double
  %26 = sitofp i32 %.pre to double
  %27 = call double @sqrt(double noundef %26) #9
  %28 = fadd double %27, 1.000000e+00
  %29 = fcmp ult double %28, %25
  %indvars.iv.next = add i64 %indvars.iv, 2
  br i1 %29, label %._crit_edge, label %.lr.ph47, !llvm.loop !15

._crit_edge52:                                    ; preds = %40, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @_ZdaPv(ptr noundef nonnull %9) #11
  %30 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  %31 = icmp ugt i64 %30, 2
  br i1 %31, label %.lr.ph55.preheader, label %._crit_edge59

.lr.ph51:                                         ; preds = %._crit_edge, %40
  %32 = phi i32 [ %41, %40 ], [ %17, %._crit_edge ]
  %storemerge49 = phi i32 [ %43, %40 ], [ 2, %._crit_edge ]
  %33 = sext i32 %storemerge49 to i64
  %34 = getelementptr inbounds i8, ptr %9, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !9, !range !11, !noundef !12
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %37, label %40

37:                                               ; preds = %.lr.ph51
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %._crit_edge80 unwind label %38

._crit_edge80:                                    ; preds = %37
  %.pre81 = load i32, ptr %4, align 4, !tbaa !5
  %.pre82 = load i32, ptr %1, align 4, !tbaa !5
  br label %40

38:                                               ; preds = %37
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  resume { ptr, i32 } %39

40:                                               ; preds = %._crit_edge80, %.lr.ph51
  %41 = phi i32 [ %.pre82, %._crit_edge80 ], [ %32, %.lr.ph51 ]
  %42 = phi i32 [ %.pre81, %._crit_edge80 ], [ %storemerge49, %.lr.ph51 ]
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %4, align 4, !tbaa !5
  %.not37.not = icmp slt i32 %42, %41
  br i1 %.not37.not, label %.lr.ph51, label %._crit_edge52, !llvm.loop !16

.lr.ph55.preheader:                               ; preds = %._crit_edge52, %._crit_edge56
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %._crit_edge56 ], [ 2, %._crit_edge52 ]
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %._crit_edge56 ], [ 1, %._crit_edge52 ]
  %.03157 = phi i32 [ %spec.select, %._crit_edge56 ], [ 0, %._crit_edge52 ]
  br label %.lr.ph55

._crit_edge59:                                    ; preds = %._crit_edge56, %._crit_edge52
  %.031.lcssa = phi i32 [ 0, %._crit_edge52 ], [ %spec.select, %._crit_edge56 ]
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %.not38 = icmp slt i32 %.031.lcssa, %44
  %.str.2..str.1 = select i1 %.not38, ptr @.str.2, ptr @.str.1
  %45 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2..str.1)
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret i32 0

._crit_edge56:                                    ; preds = %.lr.ph55
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %46 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  %47 = icmp ugt i64 %46, %indvars.iv.next76
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  br i1 %47, label %.lr.ph55.preheader, label %._crit_edge59, !llvm.loop !17

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %.lr.ph55
  %indvars.iv68 = phi i64 [ 0, %.lr.ph55.preheader ], [ %indvars.iv.next69, %.lr.ph55 ]
  %.153 = phi i32 [ %.03157, %.lr.ph55.preheader ], [ %spec.select, %.lr.ph55 ]
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv68) #9
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv.next69) #9
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add i32 %49, 1
  %53 = add i32 %52, %51
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv75) #9
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = icmp eq i32 %53, %55
  %57 = zext i1 %56 to i32
  %spec.select = add nsw i32 %.153, %57
  %exitcond.not = icmp eq i64 %indvars.iv.next69, %indvars.iv73
  br i1 %exitcond.not, label %._crit_edge56, label %.lr.ph55, !llvm.loop !18
}

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

; 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 nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #7

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nobuiltin allocsize(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 = { 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 = { 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 #6 = { 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 = { nobuiltin 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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