; LLVM IR from DionysiosB/CodeForces :: 2082A-BinaryMatrix (main)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = 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
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %19 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %21

21:                                               ; preds = %140, %0
  %22 = load i64, ptr %2, align 8, !tbaa !5
  %23 = add nsw i64 %22, -1
  store i64 %23, ptr %2, align 8, !tbaa !5
  %24 = icmp ne i64 %22, 0
  br i1 %24, label %25, label %149

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %28 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %29 unwind label %35

29:                                               ; preds = %25
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(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 %30

30:                                               ; preds = %44, %29
  %31 = load i64, ptr %9, align 8, !tbaa !5
  %32 = load i64, ptr %3, align 8, !tbaa !5
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %39, label %34

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

35:                                               ; preds = %25
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %7, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %8, align 4
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %148

39:                                               ; preds = %30
  %40 = load i64, ptr %9, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40) #5
  %42 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %41)
          to label %43 unwind label %47

43:                                               ; preds = %39
  br label %44

44:                                               ; preds = %43
  %45 = load i64, ptr %9, align 8, !tbaa !5
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr %9, align 8, !tbaa !5
  br label %30, !llvm.loop !9

47:                                               ; preds = %39
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %147

51:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %87, %51
  %53 = load i64, ptr %11, align 8, !tbaa !5
  %54 = load i64, ptr %3, align 8, !tbaa !5
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %90

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

58:                                               ; preds = %75, %57
  %59 = load i64, ptr %14, align 8, !tbaa !5
  %60 = load i64, ptr %4, align 8, !tbaa !5
  %61 = icmp slt i64 %59, %60
  br i1 %61, label %63, label %62

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

63:                                               ; preds = %58
  %64 = load i64, ptr %11, align 8, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %64) #5
  %66 = load i64, ptr %14, align 8, !tbaa !5
  %67 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %65, i64 noundef %66)
          to label %68 unwind label %78

68:                                               ; preds = %63
  %69 = load i8, ptr %67, align 1, !tbaa !11
  %70 = sext i8 %69 to i32
  %71 = sub nsw i32 %70, 48
  %72 = sext i32 %71 to i64
  %73 = load i64, ptr %13, align 8, !tbaa !5
  %74 = add nsw i64 %73, %72
  store i64 %74, ptr %13, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %68
  %76 = load i64, ptr %14, align 8, !tbaa !5
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %14, align 8, !tbaa !5
  br label %58, !llvm.loop !12

78:                                               ; preds = %63
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %7, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %146

82:                                               ; preds = %62
  %83 = load i64, ptr %13, align 8, !tbaa !5
  %84 = srem i64 %83, 2
  %85 = load i64, ptr %10, align 8, !tbaa !5
  %86 = add nsw i64 %85, %84
  store i64 %86, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %87

87:                                               ; preds = %82
  %88 = load i64, ptr %11, align 8, !tbaa !5
  %89 = add nsw i64 %88, 1
  store i64 %89, ptr %11, align 8, !tbaa !5
  br label %52, !llvm.loop !13

90:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %126, %90
  %92 = load i64, ptr %16, align 8, !tbaa !5
  %93 = load i64, ptr %4, align 8, !tbaa !5
  %94 = icmp slt i64 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %129

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

97:                                               ; preds = %114, %96
  %98 = load i64, ptr %18, align 8, !tbaa !5
  %99 = load i64, ptr %3, align 8, !tbaa !5
  %100 = icmp slt i64 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %121

102:                                              ; preds = %97
  %103 = load i64, ptr %18, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %103) #5
  %105 = load i64, ptr %16, align 8, !tbaa !5
  %106 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %104, i64 noundef %105)
          to label %107 unwind label %117

107:                                              ; preds = %102
  %108 = load i8, ptr %106, align 1, !tbaa !11
  %109 = sext i8 %108 to i32
  %110 = sub nsw i32 %109, 48
  %111 = sext i32 %110 to i64
  %112 = load i64, ptr %17, align 8, !tbaa !5
  %113 = add nsw i64 %112, %111
  store i64 %113, ptr %17, align 8, !tbaa !5
  br label %114

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

117:                                              ; preds = %102
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %7, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %145

121:                                              ; preds = %101
  %122 = load i64, ptr %17, align 8, !tbaa !5
  %123 = srem i64 %122, 2
  %124 = load i64, ptr %15, align 8, !tbaa !5
  %125 = add nsw i64 %124, %123
  store i64 %125, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %126

126:                                              ; preds = %121
  %127 = load i64, ptr %16, align 8, !tbaa !5
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %16, align 8, !tbaa !5
  br label %91, !llvm.loop !15

129:                                              ; preds = %95
  %130 = load i64, ptr %10, align 8, !tbaa !5
  %131 = load i64, ptr %15, align 8, !tbaa !5
  %132 = icmp sgt i64 %130, %131
  br i1 %132, label %133, label %135

133:                                              ; preds = %129
  %134 = load i64, ptr %10, align 8, !tbaa !5
  br label %137

135:                                              ; preds = %129
  %136 = load i64, ptr %15, align 8, !tbaa !5
  br label %137

137:                                              ; preds = %135, %133
  %138 = phi i64 [ %134, %133 ], [ %136, %135 ]
  %139 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i64 noundef %138)
          to label %140 unwind label %141

140:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(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
  br label %21, !llvm.loop !16

141:                                              ; preds = %137
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %7, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %8, align 4
  br label %145

145:                                              ; preds = %141, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %146

146:                                              ; preds = %145, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %147

147:                                              ; preds = %146, %47
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %148

148:                                              ; preds = %147, %35
  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 %151

149:                                              ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %150 = load i32, ptr %1, align 4
  ret i32 %150

151:                                              ; preds = %148
  %152 = load ptr, ptr %7, align 8
  %153 = load i32, ptr %8, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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::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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = 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
  %6 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %8 = load i64, ptr %1, align 8, !tbaa !5
  %9 = add nsw i64 %8, -1
  store i64 %9, ptr %1, align 8, !tbaa !5
  %.not66 = icmp eq i64 %8, 0
  br i1 %.not66, label %._crit_edge69, label %.lr.ph68

.lr.ph68:                                         ; preds = %0, %._crit_edge64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %12 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %13 unwind label %18

13:                                               ; preds = %.lr.ph68
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph, label %.preheader45.thread

.preheader45.thread:                              ; preds = %13
  %.pre7476 = load i64, ptr %3, align 8, !tbaa !5
  br label %.preheader44

.preheader45:                                     ; preds = %22
  %16 = icmp sgt i64 %24, 0
  %.pre74 = load i64, ptr %3, align 8, !tbaa !5
  br i1 %16, label %.preheader43.lr.ph, label %.preheader44

.preheader43.lr.ph:                               ; preds = %.preheader45
  %17 = icmp sgt i64 %.pre74, 0
  br i1 %17, label %.preheader43, label %._crit_edge64

18:                                               ; preds = %.lr.ph68
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  br label %78

.lr.ph:                                           ; preds = %13, %22
  %.03450 = phi i64 [ %23, %22 ], [ 0, %13 ]
  %20 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.03450) #7
  %21 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %22 unwind label %26

22:                                               ; preds = %.lr.ph
  %23 = add nuw nsw i64 %.03450, 1
  %24 = load i64, ptr %2, align 8, !tbaa !5
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %.lr.ph, label %.preheader45, !llvm.loop !9

26:                                               ; preds = %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %77

.preheader44:                                     ; preds = %._crit_edge, %.preheader45.thread, %.preheader45
  %28 = phi i64 [ %24, %.preheader45 ], [ %14, %.preheader45.thread ], [ %34, %._crit_edge ]
  %29 = phi i64 [ %.pre74, %.preheader45 ], [ %.pre7476, %.preheader45.thread ], [ %35, %._crit_edge ]
  %.033.lcssa = phi i64 [ 0, %.preheader45 ], [ 0, %.preheader45.thread ], [ %37, %._crit_edge ]
  %30 = icmp sgt i64 %29, 0
  br i1 %30, label %.preheader, label %._crit_edge64

.preheader43:                                     ; preds = %.preheader43.lr.ph, %._crit_edge
  %31 = phi i64 [ %34, %._crit_edge ], [ %24, %.preheader43.lr.ph ]
  %32 = phi i64 [ %35, %._crit_edge ], [ %.pre74, %.preheader43.lr.ph ]
  %.03255 = phi i64 [ %38, %._crit_edge ], [ 0, %.preheader43.lr.ph ]
  %.03354 = phi i64 [ %37, %._crit_edge ], [ 0, %.preheader43.lr.ph ]
  %33 = icmp sgt i64 %32, 0
  br i1 %33, label %.lr.ph53, label %._crit_edge

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader43
  %34 = phi i64 [ %31, %.preheader43 ], [ %.pre, %._crit_edge.loopexit ]
  %35 = phi i64 [ %32, %.preheader43 ], [ %48, %._crit_edge.loopexit ]
  %.031.lcssa = phi i64 [ 0, %.preheader43 ], [ %46, %._crit_edge.loopexit ]
  %36 = srem i64 %.031.lcssa, 2
  %37 = add nsw i64 %36, %.03354
  %38 = add nuw nsw i64 %.03255, 1
  %39 = icmp slt i64 %38, %34
  br i1 %39, label %.preheader43, label %.preheader44, !llvm.loop !11

.lr.ph53:                                         ; preds = %.preheader43, %42
  %.03052 = phi i64 [ %47, %42 ], [ 0, %.preheader43 ]
  %.03151 = phi i64 [ %46, %42 ], [ 0, %.preheader43 ]
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.03255) #7
  %41 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %40, i64 noundef %.03052)
          to label %42 unwind label %50

42:                                               ; preds = %.lr.ph53
  %43 = load i8, ptr %41, align 1, !tbaa !13
  %44 = sext i8 %43 to i64
  %45 = add i64 %.03151, -48
  %46 = add i64 %45, %44
  %47 = add nuw nsw i64 %.03052, 1
  %48 = load i64, ptr %3, align 8, !tbaa !5
  %49 = icmp slt i64 %47, %48
  br i1 %49, label %.lr.ph53, label %._crit_edge.loopexit, !llvm.loop !14

50:                                               ; preds = %.lr.ph53
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %77

.preheader:                                       ; preds = %.preheader44, %._crit_edge60
  %52 = phi i64 [ %59, %._crit_edge60 ], [ %29, %.preheader44 ]
  %53 = phi i64 [ %60, %._crit_edge60 ], [ %28, %.preheader44 ]
  %.02863 = phi i64 [ %63, %._crit_edge60 ], [ 0, %.preheader44 ]
  %.02962 = phi i64 [ %62, %._crit_edge60 ], [ 0, %.preheader44 ]
  %54 = icmp sgt i64 %53, 0
  br i1 %54, label %.lr.ph59, label %._crit_edge60

._crit_edge64:                                    ; preds = %._crit_edge60, %.preheader43.lr.ph, %.preheader44
  %.033.lcssa78 = phi i64 [ %.033.lcssa, %.preheader44 ], [ 0, %.preheader43.lr.ph ], [ %.033.lcssa, %._crit_edge60 ]
  %.029.lcssa = phi i64 [ 0, %.preheader44 ], [ 0, %.preheader43.lr.ph ], [ %62, %._crit_edge60 ]
  %55 = call i64 @llvm.smax.i64(i64 %.033.lcssa78, i64 %.029.lcssa)
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %55)
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %57 = load i64, ptr %1, align 8, !tbaa !5
  %58 = add nsw i64 %57, -1
  store i64 %58, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %57, 0
  br i1 %.not, label %._crit_edge69, label %.lr.ph68, !llvm.loop !15

._crit_edge60.loopexit:                           ; preds = %67
  %.pre75 = load i64, ptr %3, align 8, !tbaa !5
  br label %._crit_edge60

._crit_edge60:                                    ; preds = %._crit_edge60.loopexit, %.preheader
  %59 = phi i64 [ %52, %.preheader ], [ %.pre75, %._crit_edge60.loopexit ]
  %60 = phi i64 [ %53, %.preheader ], [ %73, %._crit_edge60.loopexit ]
  %.027.lcssa = phi i64 [ 0, %.preheader ], [ %71, %._crit_edge60.loopexit ]
  %61 = srem i64 %.027.lcssa, 2
  %62 = add nsw i64 %61, %.02962
  %63 = add nuw nsw i64 %.02863, 1
  %64 = icmp slt i64 %63, %59
  br i1 %64, label %.preheader, label %._crit_edge64, !llvm.loop !16

.lr.ph59:                                         ; preds = %.preheader, %67
  %.058 = phi i64 [ %72, %67 ], [ 0, %.preheader ]
  %.02757 = phi i64 [ %71, %67 ], [ 0, %.preheader ]
  %65 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.058) #7
  %66 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %65, i64 noundef %.02863)
          to label %67 unwind label %75

67:                                               ; preds = %.lr.ph59
  %68 = load i8, ptr %66, align 1, !tbaa !13
  %69 = sext i8 %68 to i64
  %70 = add i64 %.02757, -48
  %71 = add i64 %70, %69
  %72 = add nuw nsw i64 %.058, 1
  %73 = load i64, ptr %2, align 8, !tbaa !5
  %74 = icmp slt i64 %72, %73
  br i1 %74, label %.lr.ph59, label %._crit_edge60.loopexit, !llvm.loop !17

75:                                               ; preds = %.lr.ph59
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %77

77:                                               ; preds = %50, %75, %26
  %.pn40 = phi { ptr, i32 } [ %27, %26 ], [ %51, %50 ], [ %76, %75 ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %78

78:                                               ; preds = %77, %18
  %.pn40.pn = phi { ptr, i32 } [ %.pn40, %77 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn40.pn

._crit_edge69:                                    ; preds = %._crit_edge64, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0
}

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #6

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 = { "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass