; LLVM IR from DionysiosB/CodeForces :: 1000-1099 (1040A-PalindromeDance)

; 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 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 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 %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %14 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %14, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %15 unwind label %21

15:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %30, %15
  %17 = load i64, ptr %9, align 8, !tbaa !5
  %18 = load i64, ptr %2, align 8, !tbaa !5
  %19 = icmp slt i64 %17, %18
  br i1 %19, label %25, label %20

20:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %37

21:                                               ; preds = %0
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %7, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %177

25:                                               ; preds = %16
  %26 = load i64, ptr %9, align 8, !tbaa !5
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %26) #5
  %28 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %27)
          to label %29 unwind label %33

29:                                               ; preds = %25
  br label %30

30:                                               ; preds = %29
  %31 = load i64, ptr %9, align 8, !tbaa !5
  %32 = add nsw i64 %31, 1
  store i64 %32, ptr %9, align 8, !tbaa !5
  br label %16, !llvm.loop !9

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

37:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !5
  %38 = load i64, ptr %2, align 8, !tbaa !5
  %39 = srem i64 %38, 2
  %40 = icmp ne i64 %39, 0
  br i1 %40, label %41, label %59

41:                                               ; preds = %37
  %42 = load i64, ptr %2, align 8, !tbaa !5
  %43 = sdiv i64 %42, 2
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %43) #5
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = icmp eq i64 %45, 2
  br i1 %46, label %47, label %59

47:                                               ; preds = %41
  %48 = load i64, ptr %4, align 8, !tbaa !5
  %49 = load i64, ptr %3, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %51, label %53

51:                                               ; preds = %47
  %52 = load i64, ptr %4, align 8, !tbaa !5
  br label %55

53:                                               ; preds = %47
  %54 = load i64, ptr %3, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %53, %51
  %56 = phi i64 [ %52, %51 ], [ %54, %53 ]
  %57 = load i64, ptr %10, align 8, !tbaa !5
  %58 = add nsw i64 %57, %56
  store i64 %58, ptr %10, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %55, %41, %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %163, %59
  %61 = load i64, ptr %11, align 8, !tbaa !5
  %62 = load i64, ptr %2, align 8, !tbaa !5
  %63 = sdiv i64 %62, 2
  %64 = icmp slt i64 %61, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %60
  store i32 5, ptr %12, align 4
  br label %166

66:                                               ; preds = %60
  %67 = load i64, ptr %11, align 8, !tbaa !5
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %67) #5
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = icmp eq i64 %69, 2
  br i1 %70, label %71, label %92

71:                                               ; preds = %66
  %72 = load i64, ptr %2, align 8, !tbaa !5
  %73 = sub nsw i64 %72, 1
  %74 = load i64, ptr %11, align 8, !tbaa !5
  %75 = sub nsw i64 %73, %74
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %75) #5
  %77 = load i64, ptr %76, align 8, !tbaa !5
  %78 = icmp eq i64 %77, 2
  br i1 %78, label %79, label %92

79:                                               ; preds = %71
  %80 = load i64, ptr %3, align 8, !tbaa !5
  %81 = load i64, ptr %4, align 8, !tbaa !5
  %82 = icmp slt i64 %80, %81
  br i1 %82, label %83, label %85

83:                                               ; preds = %79
  %84 = load i64, ptr %3, align 8, !tbaa !5
  br label %87

85:                                               ; preds = %79
  %86 = load i64, ptr %4, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %85, %83
  %88 = phi i64 [ %84, %83 ], [ %86, %85 ]
  %89 = mul nsw i64 2, %88
  %90 = load i64, ptr %10, align 8, !tbaa !5
  %91 = add nsw i64 %90, %89
  store i64 %91, ptr %10, align 8, !tbaa !5
  br label %162

92:                                               ; preds = %71, %66
  %93 = load i64, ptr %11, align 8, !tbaa !5
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %93) #5
  %95 = load i64, ptr %94, align 8, !tbaa !5
  %96 = icmp eq i64 %95, 2
  br i1 %96, label %97, label %113

97:                                               ; preds = %92
  %98 = load i64, ptr %2, align 8, !tbaa !5
  %99 = sub nsw i64 %98, 1
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = sub nsw i64 %99, %100
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %101) #5
  %103 = load i64, ptr %102, align 8, !tbaa !5
  %104 = icmp ne i64 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %97
  %106 = load i64, ptr %4, align 8, !tbaa !5
  br label %109

107:                                              ; preds = %97
  %108 = load i64, ptr %3, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %107, %105
  %110 = phi i64 [ %106, %105 ], [ %108, %107 ]
  %111 = load i64, ptr %10, align 8, !tbaa !5
  %112 = add nsw i64 %111, %110
  store i64 %112, ptr %10, align 8, !tbaa !5
  br label %161

113:                                              ; preds = %92
  %114 = load i64, ptr %2, align 8, !tbaa !5
  %115 = sub nsw i64 %114, 1
  %116 = load i64, ptr %11, align 8, !tbaa !5
  %117 = sub nsw i64 %115, %116
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %117) #5
  %119 = load i64, ptr %118, align 8, !tbaa !5
  %120 = icmp eq i64 %119, 2
  br i1 %120, label %121, label %134

121:                                              ; preds = %113
  %122 = load i64, ptr %11, align 8, !tbaa !5
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %122) #5
  %124 = load i64, ptr %123, align 8, !tbaa !5
  %125 = icmp ne i64 %124, 0
  br i1 %125, label %126, label %128

126:                                              ; preds = %121
  %127 = load i64, ptr %4, align 8, !tbaa !5
  br label %130

128:                                              ; preds = %121
  %129 = load i64, ptr %3, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %128, %126
  %131 = phi i64 [ %127, %126 ], [ %129, %128 ]
  %132 = load i64, ptr %10, align 8, !tbaa !5
  %133 = add nsw i64 %132, %131
  store i64 %133, ptr %10, align 8, !tbaa !5
  br label %160

134:                                              ; preds = %113
  %135 = load i64, ptr %11, align 8, !tbaa !5
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %135) #5
  %137 = load i64, ptr %136, align 8, !tbaa !5
  %138 = icmp sle i64 %137, 1
  br i1 %138, label %139, label %159

139:                                              ; preds = %134
  %140 = load i64, ptr %2, align 8, !tbaa !5
  %141 = sub nsw i64 %140, 1
  %142 = load i64, ptr %11, align 8, !tbaa !5
  %143 = sub nsw i64 %141, %142
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %143) #5
  %145 = load i64, ptr %144, align 8, !tbaa !5
  %146 = icmp sle i64 %145, 1
  br i1 %146, label %147, label %159

147:                                              ; preds = %139
  %148 = load i64, ptr %11, align 8, !tbaa !5
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %148) #5
  %150 = load i64, ptr %149, align 8, !tbaa !5
  %151 = load i64, ptr %2, align 8, !tbaa !5
  %152 = sub nsw i64 %151, 1
  %153 = load i64, ptr %11, align 8, !tbaa !5
  %154 = sub nsw i64 %152, %153
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %154) #5
  %156 = load i64, ptr %155, align 8, !tbaa !5
  %157 = icmp ne i64 %150, %156
  br i1 %157, label %158, label %159

158:                                              ; preds = %147
  store i64 -1, ptr %10, align 8, !tbaa !5
  store i32 5, ptr %12, align 4
  br label %166

159:                                              ; preds = %147, %139, %134
  br label %160

160:                                              ; preds = %159, %130
  br label %161

161:                                              ; preds = %160, %109
  br label %162

162:                                              ; preds = %161, %87
  br label %163

163:                                              ; preds = %162
  %164 = load i64, ptr %11, align 8, !tbaa !5
  %165 = add nsw i64 %164, 1
  store i64 %165, ptr %11, align 8, !tbaa !5
  br label %60, !llvm.loop !11

166:                                              ; preds = %158, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %167

167:                                              ; preds = %166
  %168 = load i64, ptr %10, align 8, !tbaa !5
  %169 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %168)
          to label %170 unwind label %172

170:                                              ; preds = %167
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #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
  %171 = load i32, ptr %1, align 4
  ret i32 %171

172:                                              ; preds = %167
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %7, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %176

176:                                              ; preds = %172, %33
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %177

177:                                              ; preds = %176, %21
  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 %178

178:                                              ; preds = %177
  %179 = load ptr, ptr %7, align 8
  %180 = load i32, ptr %8, align 4
  %181 = insertvalue { ptr, i32 } poison, ptr %179, 0
  %182 = insertvalue { ptr, i32 } %181, i32 %180, 1
  resume { ptr, i32 } %182
}

; 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 @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; 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 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 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 i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %7 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %7, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %8 unwind label %12

8:                                                ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  %9 = load i64, ptr %1, align 8, !tbaa !5
  %10 = icmp sgt i64 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %8
  %.lcssa = phi i64 [ %9, %8 ], [ %17, %.lr.ph ]
  %11 = and i64 %.lcssa, 1
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %28, label %19

12:                                               ; preds = %0
  %13 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %13

.lr.ph:                                           ; preds = %8, %.lr.ph
  %.02328 = phi i64 [ %16, %.lr.ph ], [ 0, %8 ]
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.02328) #6
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %14)
  %16 = add nuw nsw i64 %.02328, 1
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %18 = icmp slt i64 %16, %17
  br i1 %18, label %.lr.ph, label %._crit_edge, !llvm.loop !9

19:                                               ; preds = %._crit_edge
  %20 = sdiv i64 %.lcssa, 2
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %20) #6
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = icmp eq i64 %22, 2
  br i1 %23, label %24, label %28

24:                                               ; preds = %19
  %25 = load i64, ptr %3, align 8
  %26 = load i64, ptr %2, align 8
  %27 = call i64 @llvm.smin.i64(i64 %25, i64 %26)
  br label %28

28:                                               ; preds = %24, %19, %._crit_edge
  %.022 = phi i64 [ %27, %24 ], [ 0, %19 ], [ 0, %._crit_edge ]
  %29 = load i64, ptr %1, align 8, !tbaa !5
  %30 = icmp sgt i64 %29, 1
  br i1 %30, label %.lr.ph32, label %._crit_edge33

.lr.ph32:                                         ; preds = %28, %85
  %.030 = phi i64 [ %86, %85 ], [ 0, %28 ]
  %.129 = phi i64 [ %.2, %85 ], [ %.022, %28 ]
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.030) #6
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = icmp eq i64 %32, 2
  br i1 %33, label %34, label %47

34:                                               ; preds = %.lr.ph32
  %35 = load i64, ptr %1, align 8, !tbaa !5
  %36 = xor i64 %.030, -1
  %37 = add i64 %35, %36
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %37) #6
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = icmp eq i64 %39, 2
  br i1 %40, label %41, label %47

41:                                               ; preds = %34
  %42 = load i64, ptr %2, align 8
  %43 = load i64, ptr %3, align 8
  %44 = call i64 @llvm.smin.i64(i64 %42, i64 %43)
  %45 = shl nsw i64 %44, 1
  %46 = add nsw i64 %45, %.129
  br label %85

47:                                               ; preds = %34, %.lr.ph32
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.030) #6
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %50 = icmp eq i64 %49, 2
  %51 = load i64, ptr %1, align 8, !tbaa !5
  %52 = xor i64 %.030, -1
  %53 = add i64 %51, %52
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %53) #6
  %55 = load i64, ptr %54, align 8, !tbaa !5
  br i1 %50, label %56, label %61

56:                                               ; preds = %47
  %.not27 = icmp eq i64 %55, 0
  %57 = load i64, ptr %3, align 8
  %58 = load i64, ptr %2, align 8
  %59 = select i1 %.not27, i64 %58, i64 %57
  %60 = add nsw i64 %59, %.129
  br label %85

61:                                               ; preds = %47
  %62 = icmp eq i64 %55, 2
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.030) #6
  %64 = load i64, ptr %63, align 8, !tbaa !5
  br i1 %62, label %65, label %70

65:                                               ; preds = %61
  %.not26 = icmp eq i64 %64, 0
  %66 = load i64, ptr %3, align 8
  %67 = load i64, ptr %2, align 8
  %68 = select i1 %.not26, i64 %67, i64 %66
  %69 = add nsw i64 %68, %.129
  br label %85

70:                                               ; preds = %61
  %71 = icmp slt i64 %64, 2
  br i1 %71, label %72, label %85

72:                                               ; preds = %70
  %73 = load i64, ptr %1, align 8, !tbaa !5
  %74 = add i64 %73, %52
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %74) #6
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = icmp slt i64 %76, 2
  br i1 %77, label %78, label %85

78:                                               ; preds = %72
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.030) #6
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = load i64, ptr %1, align 8, !tbaa !5
  %82 = add i64 %81, %52
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %82) #6
  %84 = load i64, ptr %83, align 8, !tbaa !5
  %.not25 = icmp eq i64 %80, %84
  br i1 %.not25, label %85, label %._crit_edge33

85:                                               ; preds = %41, %65, %78, %72, %70, %56
  %.2 = phi i64 [ %46, %41 ], [ %60, %56 ], [ %69, %65 ], [ %.129, %78 ], [ %.129, %72 ], [ %.129, %70 ]
  %86 = add nuw nsw i64 %.030, 1
  %87 = load i64, ptr %1, align 8, !tbaa !5
  %88 = sdiv i64 %87, 2
  %89 = icmp slt i64 %86, %88
  br i1 %89, label %.lr.ph32, label %._crit_edge33, !llvm.loop !11

._crit_edge33:                                    ; preds = %85, %78, %28
  %.3 = phi i64 [ %.022, %28 ], [ -1, %78 ], [ %.2, %85 ]
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.3)
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  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 @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) 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: 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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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}


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