; LLVM IR from DionysiosB/CodeForces :: 1000-1099 (1095C-PowersOfTwo)

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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  call void @_ZNSt6vectorIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 1, ptr %6, align 1, !tbaa !9
  %16 = load i64, ptr %2, align 8, !tbaa !5
  %17 = load i64, ptr %3, align 8, !tbaa !5
  %18 = icmp slt i64 %16, %17
  br i1 %18, label %19, label %20

19:                                               ; preds = %0
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %20

20:                                               ; preds = %19, %0
  br label %21

21:                                               ; preds = %27, %20
  %22 = load i64, ptr %2, align 8, !tbaa !5
  %23 = icmp ne i64 %22, 0
  br i1 %23, label %24, label %38

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %25 = load i64, ptr %2, align 8, !tbaa !5
  %26 = srem i64 %25, 2
  store i64 %26, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIlSaIlEE9push_backEOl(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %27 unwind label %34

27:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %28 = load i64, ptr %2, align 8, !tbaa !5
  %29 = srem i64 %28, 2
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = add nsw i64 %30, %29
  store i64 %31, ptr %4, align 8, !tbaa !5
  %32 = load i64, ptr %2, align 8, !tbaa !5
  %33 = sdiv i64 %32, 2
  store i64 %33, ptr %2, align 8, !tbaa !5
  br label %21, !llvm.loop !11

34:                                               ; preds = %24
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %8, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %137

38:                                               ; preds = %21
  %39 = load i64, ptr %4, align 8, !tbaa !5
  %40 = load i64, ptr %3, align 8, !tbaa !5
  %41 = icmp sgt i64 %39, %40
  br i1 %41, label %42, label %43

42:                                               ; preds = %38
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %43

43:                                               ; preds = %42, %38
  %44 = load i8, ptr %6, align 1, !tbaa !9, !range !13, !noundef !14
  %45 = trunc i8 %44 to i1
  br i1 %45, label %53, label %46

46:                                               ; preds = %43
  %47 = invoke i32 @puts(ptr noundef @.str.1)
          to label %48 unwind label %49

48:                                               ; preds = %46
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  br label %135

49:                                               ; preds = %53, %46
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %8, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %9, align 4
  br label %137

53:                                               ; preds = %43
  %54 = invoke i32 @puts(ptr noundef @.str.2)
          to label %55 unwind label %49

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %56 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %57 = sub i64 %56, 1
  store i64 %57, ptr %11, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %93, %55
  %59 = load i64, ptr %11, align 8, !tbaa !5
  %60 = icmp sgt i64 %59, 0
  br i1 %60, label %61, label %65

61:                                               ; preds = %58
  %62 = load i64, ptr %4, align 8, !tbaa !5
  %63 = load i64, ptr %3, align 8, !tbaa !5
  %64 = icmp slt i64 %62, %63
  br label %65

65:                                               ; preds = %61, %58
  %66 = phi i1 [ false, %58 ], [ %64, %61 ]
  br i1 %66, label %68, label %67

67:                                               ; preds = %65
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %96

68:                                               ; preds = %65
  br label %69

69:                                               ; preds = %80, %68
  %70 = load i64, ptr %11, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %70) #5
  %72 = load i64, ptr %71, align 8, !tbaa !5
  %73 = icmp ne i64 %72, 0
  br i1 %73, label %74, label %78

74:                                               ; preds = %69
  %75 = load i64, ptr %4, align 8, !tbaa !5
  %76 = load i64, ptr %3, align 8, !tbaa !5
  %77 = icmp slt i64 %75, %76
  br label %78

78:                                               ; preds = %74, %69
  %79 = phi i1 [ false, %69 ], [ %77, %74 ]
  br i1 %79, label %80, label %92

80:                                               ; preds = %78
  %81 = load i64, ptr %11, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %81) #5
  %83 = load i64, ptr %82, align 8, !tbaa !5
  %84 = add nsw i64 %83, -1
  store i64 %84, ptr %82, align 8, !tbaa !5
  %85 = load i64, ptr %11, align 8, !tbaa !5
  %86 = sub nsw i64 %85, 1
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %86) #5
  %88 = load i64, ptr %87, align 8, !tbaa !5
  %89 = add nsw i64 %88, 2
  store i64 %89, ptr %87, align 8, !tbaa !5
  %90 = load i64, ptr %4, align 8, !tbaa !5
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %4, align 8, !tbaa !5
  br label %69, !llvm.loop !15

92:                                               ; preds = %78
  br label %93

93:                                               ; preds = %92
  %94 = load i64, ptr %11, align 8, !tbaa !5
  %95 = add nsw i64 %94, -1
  store i64 %95, ptr %11, align 8, !tbaa !5
  br label %58, !llvm.loop !16

96:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 1, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %124, %96
  %98 = load i64, ptr %13, align 8, !tbaa !5
  %99 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %100 = icmp ult i64 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  store i32 9, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %127

102:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %114, %102
  %104 = load i64, ptr %14, align 8, !tbaa !5
  %105 = load i64, ptr %13, align 8, !tbaa !5
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %105) #5
  %107 = load i64, ptr %106, align 8, !tbaa !5
  %108 = icmp slt i64 %104, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %103
  store i32 12, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %121

110:                                              ; preds = %103
  %111 = load i64, ptr %12, align 8, !tbaa !5
  %112 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %111)
          to label %113 unwind label %117

113:                                              ; preds = %110
  br label %114

114:                                              ; preds = %113
  %115 = load i64, ptr %14, align 8, !tbaa !5
  %116 = add nsw i64 %115, 1
  store i64 %116, ptr %14, align 8, !tbaa !5
  br label %103, !llvm.loop !17

117:                                              ; preds = %110
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %8, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %134

121:                                              ; preds = %109
  %122 = load i64, ptr %12, align 8, !tbaa !5
  %123 = mul nsw i64 %122, 2
  store i64 %123, ptr %12, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %121
  %125 = load i64, ptr %13, align 8, !tbaa !5
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %13, align 8, !tbaa !5
  br label %97, !llvm.loop !18

127:                                              ; preds = %101
  %128 = invoke i32 @puts(ptr noundef @.str.4)
          to label %129 unwind label %130

129:                                              ; preds = %127
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %135

130:                                              ; preds = %127
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %8, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %9, align 4
  br label %134

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

135:                                              ; preds = %129, %48
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %136 = load i32, ptr %1, align 4
  ret i32 %136

137:                                              ; preds = %134, %49, %34
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %138

138:                                              ; preds = %137
  %139 = load ptr, ptr %8, align 8
  %140 = load i32, ptr %9, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142
}

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

declare i32 @puts(ptr noundef) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 = { 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 #4 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !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 = distinct !{!17, !12}
!18 = distinct !{!18, !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<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 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 i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = load i64, ptr %2, align 8, !tbaa !5
  %8 = icmp sge i64 %6, %7
  %.not29 = icmp eq i64 %6, 0
  br i1 %.not29, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %11
  %.02430 = phi i64 [ %14, %11 ], [ 0, %0 ]
  %9 = phi i64 [ %15, %11 ], [ %6, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %10 = srem i64 %9, 2
  store i64 %10, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIlSaIlEE9push_backEOl(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %11 unwind label %16

11:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %13 = srem i64 %12, 2
  %14 = add nsw i64 %13, %.02430
  %15 = sdiv i64 %12, 2
  store i64 %15, ptr %1, align 8, !tbaa !5
  %.off = add i64 %12, 1
  %.not = icmp ult i64 %.off, 3
  br i1 %.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !9

16:                                               ; preds = %.lr.ph
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %17

._crit_edge.loopexit:                             ; preds = %11
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %18 = phi i64 [ %7, %0 ], [ %.pre, %._crit_edge.loopexit ]
  %.024.lcssa = phi i64 [ 0, %0 ], [ %14, %._crit_edge.loopexit ]
  %19 = icmp sle i64 %.024.lcssa, %18
  %spec.select = select i1 %19, i1 %8, i1 false
  br i1 %spec.select, label %20, label %._crit_edge43

20:                                               ; preds = %._crit_edge
  %21 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  %22 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %.02234 = add i64 %22, -1
  %23 = icmp sgt i64 %.02234, 0
  %24 = load i64, ptr %2, align 8
  %25 = icmp slt i64 %.024.lcssa, %24
  %26 = select i1 %23, i1 %25, i1 false
  br i1 %26, label %.preheader27, label %.preheader26

.loopexit:                                        ; preds = %39, %.preheader27
  %27 = phi i64 [ %34, %.preheader27 ], [ %50, %39 ]
  %.2.lcssa = phi i64 [ %.135, %.preheader27 ], [ %46, %39 ]
  %.022 = add nsw i64 %.02237, -1
  %28 = icmp sgt i64 %.02237, 1
  %29 = icmp slt i64 %.2.lcssa, %27
  %30 = select i1 %28, i1 %29, i1 false
  br i1 %30, label %.preheader27, label %.preheader26, !llvm.loop !11

.preheader27:                                     ; preds = %20, %.loopexit
  %.02237 = phi i64 [ %.022, %.loopexit ], [ %.02234, %20 ]
  %.022.in36 = phi i64 [ %.02237, %.loopexit ], [ %22, %20 ]
  %.135 = phi i64 [ %.2.lcssa, %.loopexit ], [ %.024.lcssa, %20 ]
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02237) #5
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = icmp ne i64 %32, 0
  %34 = load i64, ptr %2, align 8
  %35 = icmp slt i64 %.135, %34
  %36 = select i1 %33, i1 %35, i1 false
  br i1 %36, label %.lr.ph32, label %.loopexit

.lr.ph32:                                         ; preds = %.preheader27
  %37 = add i64 %.022.in36, -2
  br label %39

.preheader26:                                     ; preds = %.loopexit, %20
  %38 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %.not44 = icmp eq i64 %38, 0
  br i1 %.not44, label %._crit_edge43, label %.preheader

39:                                               ; preds = %.lr.ph32, %39
  %.231 = phi i64 [ %.135, %.lr.ph32 ], [ %46, %39 ]
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02237) #5
  %41 = load i64, ptr %40, align 8, !tbaa !5
  %42 = add nsw i64 %41, -1
  store i64 %42, ptr %40, align 8, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %37) #5
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = add nsw i64 %44, 2
  store i64 %45, ptr %43, align 8, !tbaa !5
  %46 = add nsw i64 %.231, 1
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02237) #5
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = icmp ne i64 %48, 0
  %50 = load i64, ptr %2, align 8
  %51 = icmp slt i64 %46, %50
  %52 = select i1 %49, i1 %51, i1 false
  br i1 %52, label %39, label %.loopexit, !llvm.loop !12

.preheader:                                       ; preds = %.preheader26, %._crit_edge40
  %.02042 = phi i64 [ %57, %._crit_edge40 ], [ 0, %.preheader26 ]
  %.02141 = phi i64 [ %56, %._crit_edge40 ], [ 1, %.preheader26 ]
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02042) #5
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = icmp sgt i64 %54, 0
  br i1 %55, label %.lr.ph39, label %._crit_edge40

._crit_edge40:                                    ; preds = %.lr.ph39, %.preheader
  %56 = shl nsw i64 %.02141, 1
  %57 = add nuw nsw i64 %.02042, 1
  %58 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %.preheader, label %._crit_edge43, !llvm.loop !13

.lr.ph39:                                         ; preds = %.preheader, %.lr.ph39
  %.038 = phi i64 [ %61, %.lr.ph39 ], [ 0, %.preheader ]
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %.02141)
  %61 = add nuw nsw i64 %.038, 1
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02042) #5
  %63 = load i64, ptr %62, align 8, !tbaa !5
  %64 = icmp slt i64 %61, %63
  br i1 %64, label %.lr.ph39, label %._crit_edge40, !llvm.loop !14

._crit_edge43:                                    ; preds = %._crit_edge40, %.preheader26, %._crit_edge
  %.str.4.sink = phi ptr [ @.str.1, %._crit_edge ], [ @.str.4, %.preheader26 ], [ @.str.4, %._crit_edge40 ]
  %65 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.4.sink)
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 = { 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 = { 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 #4 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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