; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 11/2071. Juice Cocktails (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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@n = external dso_local global i32, align 4
@perm = external dso_local global [7 x i32], align 16
@cool = external dso_local global [7 x i32], align 16
@vec = external dso_local global [7 x %"class.std::vector"], align 16
@hasA = external dso_local global [7 x i8], align 1
@hasB = external dso_local global [7 x i8], align 1
@hasP = external dso_local global [7 x i8], align 1
@cnt = external dso_local global [7 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4gettv() #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %17

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

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

21:                                               ; preds = %17
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [7 x i32], ptr @cnt, i64 0, i64 %23
  store i32 0, ptr %24, align 4, !tbaa !5
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [7 x i8], ptr @hasA, i64 0, i64 %26
  store i8 0, ptr %27, align 1, !tbaa !9
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [7 x i8], ptr @hasB, i64 0, i64 %29
  store i8 0, ptr %30, align 1, !tbaa !9
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [7 x i8], ptr @hasP, i64 0, i64 %32
  store i8 0, ptr %33, align 1, !tbaa !9
  br label %34

34:                                               ; preds = %21
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !11

37:                                               ; preds = %20
  store i8 1, ptr @hasA, align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasB, i64 0, i64 1), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasP, i64 0, i64 2), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasA, i64 0, i64 3), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasB, i64 0, i64 3), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasA, i64 0, i64 4), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasP, i64 0, i64 4), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasB, i64 0, i64 5), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasP, i64 0, i64 5), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasA, i64 0, i64 6), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasB, i64 0, i64 6), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds ([7 x i8], ptr @hasP, i64 0, i64 6), align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %127, %37
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %130

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  %44 = 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) %4)
          to label %45 unwind label %51

45:                                               ; preds = %43
  %46 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str)
          to label %47 unwind label %51

47:                                               ; preds = %45
  br i1 %46, label %48, label %55

48:                                               ; preds = %47
  %49 = load i32, ptr @cnt, align 16, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr @cnt, align 16, !tbaa !5
  br label %55

51:                                               ; preds = %124, %121, %119, %116, %114, %111, %109, %106, %104, %101, %99, %96, %94, %91, %85, %79, %73, %67, %61, %55, %45, %43
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %5, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %227

55:                                               ; preds = %48, %47
  %56 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.2)
          to label %57 unwind label %51

57:                                               ; preds = %55
  br i1 %56, label %58, label %61

58:                                               ; preds = %57
  %59 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 1), align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 1), align 4, !tbaa !5
  br label %61

61:                                               ; preds = %58, %57
  %62 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.3)
          to label %63 unwind label %51

63:                                               ; preds = %61
  br i1 %62, label %64, label %67

64:                                               ; preds = %63
  %65 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 2), align 8, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 2), align 8, !tbaa !5
  br label %67

67:                                               ; preds = %64, %63
  %68 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.4)
          to label %69 unwind label %51

69:                                               ; preds = %67
  br i1 %68, label %70, label %73

70:                                               ; preds = %69
  %71 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 3), align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 3), align 4, !tbaa !5
  br label %73

73:                                               ; preds = %70, %69
  %74 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.5)
          to label %75 unwind label %51

75:                                               ; preds = %73
  br i1 %74, label %76, label %79

76:                                               ; preds = %75
  %77 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 4), align 16, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 4), align 16, !tbaa !5
  br label %79

79:                                               ; preds = %76, %75
  %80 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.6)
          to label %81 unwind label %51

81:                                               ; preds = %79
  br i1 %80, label %82, label %85

82:                                               ; preds = %81
  %83 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 5), align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 5), align 4, !tbaa !5
  br label %85

85:                                               ; preds = %82, %81
  %86 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.7)
          to label %87 unwind label %51

87:                                               ; preds = %85
  br i1 %86, label %88, label %91

88:                                               ; preds = %87
  %89 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 6), align 8, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr getelementptr inbounds ([7 x i32], ptr @cnt, i64 0, i64 6), align 8, !tbaa !5
  br label %91

91:                                               ; preds = %88, %87
  %92 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str)
          to label %93 unwind label %51

93:                                               ; preds = %91
  br i1 %92, label %94, label %96

94:                                               ; preds = %93
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @vec, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %95 unwind label %51

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95, %93
  %97 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.2)
          to label %98 unwind label %51

98:                                               ; preds = %96
  br i1 %97, label %99, label %101

99:                                               ; preds = %98
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([7 x %"class.std::vector"], ptr @vec, i64 0, i64 1), ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %100 unwind label %51

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100, %98
  %102 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.3)
          to label %103 unwind label %51

103:                                              ; preds = %101
  br i1 %102, label %104, label %106

104:                                              ; preds = %103
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([7 x %"class.std::vector"], ptr @vec, i64 0, i64 2), ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %105 unwind label %51

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105, %103
  %107 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.4)
          to label %108 unwind label %51

108:                                              ; preds = %106
  br i1 %107, label %109, label %111

109:                                              ; preds = %108
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([7 x %"class.std::vector"], ptr @vec, i64 0, i64 3), ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %110 unwind label %51

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110, %108
  %112 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.5)
          to label %113 unwind label %51

113:                                              ; preds = %111
  br i1 %112, label %114, label %116

114:                                              ; preds = %113
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([7 x %"class.std::vector"], ptr @vec, i64 0, i64 4), ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %115 unwind label %51

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115, %113
  %117 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.6)
          to label %118 unwind label %51

118:                                              ; preds = %116
  br i1 %117, label %119, label %121

119:                                              ; preds = %118
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([7 x %"class.std::vector"], ptr @vec, i64 0, i64 5), ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %120 unwind label %51

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120, %118
  %122 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.7)
          to label %123 unwind label %51

123:                                              ; preds = %121
  br i1 %122, label %124, label %126

124:                                              ; preds = %123
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([7 x %"class.std::vector"], ptr @vec, i64 0, i64 6), ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %125 unwind label %51

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125, %123
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %3, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %3, align 4, !tbaa !5
  br label %38, !llvm.loop !13

130:                                              ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1000000000, ptr %7, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %159, %130
  br label %132

132:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %133 = call noundef i32 @_Z4gettv()
  store i32 %133, ptr %8, align 4, !tbaa !5
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %135 = load i32, ptr %134, align 4, !tbaa !5
  store i32 %135, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %136 = load i32, ptr %7, align 4, !tbaa !5
  %137 = call noundef i32 @_Z4gettv()
  %138 = icmp eq i32 %136, %137
  br i1 %138, label %139, label %156

139:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %152, %139
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = icmp slt i32 %141, 7
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %155

144:                                              ; preds = %140
  %145 = load i32, ptr %9, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [7 x i32], ptr @perm, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [7 x i32], ptr @cool, i64 0, i64 %150
  store i32 %148, ptr %151, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %144
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %9, align 4, !tbaa !5
  br label %140, !llvm.loop !14

155:                                              ; preds = %143
  br label %156

156:                                              ; preds = %155, %132
  %157 = call noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef @perm, ptr noundef getelementptr inbounds (i32, ptr @perm, i64 7))
  br i1 %157, label %159, label %158

158:                                              ; preds = %156
  br label %160

159:                                              ; preds = %156
  br label %131, !llvm.loop !15

160:                                              ; preds = %158
  %161 = load i32, ptr %7, align 4, !tbaa !5
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %161)
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %198, %160
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = icmp slt i32 %165, 7
  br i1 %166, label %168, label %167

167:                                              ; preds = %164
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %201

168:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %169 = load i32, ptr %11, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [7 x i32], ptr @cool, i64 0, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !5
  store i32 %172, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %190, %168
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = load i32, ptr %13, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %177
  %179 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %178) #7
  %180 = icmp ult i64 %175, %179
  br i1 %180, label %182, label %181

181:                                              ; preds = %173
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %197

182:                                              ; preds = %173
  %183 = load i32, ptr %13, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %184
  %186 = load i32, ptr %14, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %185, i64 noundef %187) #7
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %188)
          to label %189 unwind label %193

189:                                              ; preds = %182
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %14, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %14, align 4, !tbaa !5
  br label %173, !llvm.loop !16

193:                                              ; preds = %182
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %5, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %226

197:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %198

198:                                              ; preds = %197
  %199 = load i32, ptr %11, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %11, align 4, !tbaa !5
  br label %164, !llvm.loop !17

201:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %202

202:                                              ; preds = %217, %201
  %203 = load i32, ptr %15, align 4, !tbaa !5
  %204 = load i32, ptr @n, align 4, !tbaa !5
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %202
  store i32 19, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %224

207:                                              ; preds = %202
  %208 = load i32, ptr %15, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %209) #7
  %211 = load i32, ptr %210, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %212)
          to label %214 unwind label %220

214:                                              ; preds = %207
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef @.str.8)
          to label %216 unwind label %220

216:                                              ; preds = %214
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %15, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %15, align 4, !tbaa !5
  br label %202, !llvm.loop !18

220:                                              ; preds = %214, %207
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %5, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %226

224:                                              ; preds = %206
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  %225 = load i32, ptr %1, align 4
  ret i32 %225

226:                                              ; preds = %220, %193
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %227

227:                                              ; preds = %226, %51
  %228 = load ptr, ptr %5, align 8
  %229 = load i32, ptr %6, align 4
  %230 = insertvalue { ptr, i32 } poison, ptr %228, 0
  %231 = insertvalue { ptr, i32 } %230, i32 %229, 1
  resume { ptr, i32 } %231
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 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)) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef, ptr noundef) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { inlinehint 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@n = external dso_local global i32, align 4
@perm = external dso_local global [7 x i32], align 16
@cool = external dso_local local_unnamed_addr global [7 x i32], align 16
@vec = external dso_local global [7 x %"class.std::vector"], align 16
@hasA = external dso_local local_unnamed_addr global [7 x i8], align 1
@hasB = external dso_local local_unnamed_addr global [7 x i8], align 1
@hasP = external dso_local local_unnamed_addr global [7 x i8], align 1
@cnt = external dso_local local_unnamed_addr global [7 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4gettv() local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) @cnt, i8 0, i64 28, i1 false), !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) getelementptr inbounds (i8, ptr @hasA, i64 1), i8 0, i64 5, i1 false), !tbaa !9
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) @hasB, i8 0, i64 5, i1 false), !tbaa !9
  store i32 0, ptr @hasP, align 1
  store i8 1, ptr @hasA, align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasB, i64 1), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasP, i64 2), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasA, i64 3), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasB, i64 3), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasA, i64 4), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasP, i64 4), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasB, i64 5), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasP, i64 5), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasA, i64 6), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasB, i64 6), align 1, !tbaa !9
  store i8 1, ptr getelementptr inbounds (i8, ptr @hasP, i64 6), align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  store i32 0, ptr %1, align 4, !tbaa !5
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %68, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 1000000000, ptr %3, align 4, !tbaa !5
  br label %73

.lr.ph:                                           ; preds = %0, %68
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  %9 = 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) %2)
          to label %10 unwind label %15

10:                                               ; preds = %.lr.ph
  %11 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str)
  br i1 %11, label %12, label %17

12:                                               ; preds = %10
  %13 = load i32, ptr @cnt, align 16, !tbaa !5
  %14 = add nsw i32 %13, 1
  store i32 %14, ptr @cnt, align 16, !tbaa !5
  br label %17

15:                                               ; preds = %67, %64, %61, %58, %55, %52, %49, %.lr.ph
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  br label %154

17:                                               ; preds = %12, %10
  %18 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.2)
  br i1 %18, label %19, label %22

19:                                               ; preds = %17
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 4), align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr getelementptr inbounds (i8, ptr @cnt, i64 4), align 4, !tbaa !5
  br label %22

22:                                               ; preds = %19, %17
  %23 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.3)
  br i1 %23, label %24, label %27

24:                                               ; preds = %22
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  br label %27

27:                                               ; preds = %24, %22
  %28 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.4)
  br i1 %28, label %29, label %32

29:                                               ; preds = %27
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  br label %32

32:                                               ; preds = %29, %27
  %33 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.5)
  br i1 %33, label %34, label %37

34:                                               ; preds = %32
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 16), align 16, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr getelementptr inbounds (i8, ptr @cnt, i64 16), align 16, !tbaa !5
  br label %37

37:                                               ; preds = %34, %32
  %38 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.6)
  br i1 %38, label %39, label %42

39:                                               ; preds = %37
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 20), align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr getelementptr inbounds (i8, ptr @cnt, i64 20), align 4, !tbaa !5
  br label %42

42:                                               ; preds = %39, %37
  %43 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.7)
  br i1 %43, label %44, label %47

44:                                               ; preds = %42
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 24), align 8, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr getelementptr inbounds (i8, ptr @cnt, i64 24), align 8, !tbaa !5
  br label %47

47:                                               ; preds = %44, %42
  %48 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str)
  br i1 %48, label %49, label %50

49:                                               ; preds = %47
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @vec, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %50 unwind label %15

50:                                               ; preds = %49, %47
  %51 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.2)
  br i1 %51, label %52, label %53

52:                                               ; preds = %50
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @vec, i64 24), ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %53 unwind label %15

53:                                               ; preds = %52, %50
  %54 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.3)
  br i1 %54, label %55, label %56

55:                                               ; preds = %53
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @vec, i64 48), ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %56 unwind label %15

56:                                               ; preds = %55, %53
  %57 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.4)
  br i1 %57, label %58, label %59

58:                                               ; preds = %56
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @vec, i64 72), ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %59 unwind label %15

59:                                               ; preds = %58, %56
  %60 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.5)
  br i1 %60, label %61, label %62

61:                                               ; preds = %59
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @vec, i64 96), ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %62 unwind label %15

62:                                               ; preds = %61, %59
  %63 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.6)
  br i1 %63, label %64, label %65

64:                                               ; preds = %62
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @vec, i64 120), ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %65 unwind label %15

65:                                               ; preds = %64, %62
  %66 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.7)
  br i1 %66, label %67, label %68

67:                                               ; preds = %65
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @vec, i64 144), ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %68 unwind label %15

68:                                               ; preds = %67, %65
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %1, align 4, !tbaa !5
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %.lr.ph, label %._crit_edge, !llvm.loop !11

73:                                               ; preds = %.loopexit, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %74 = call noundef i32 @_Z4gettv()
  store i32 %74, ptr %4, align 4, !tbaa !5
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  %77 = call noundef i32 @_Z4gettv()
  %78 = icmp eq i32 %76, %77
  br i1 %78, label %.preheader34.preheader, label %.loopexit

.preheader34.preheader:                           ; preds = %73
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) @cool, ptr noundef nonnull align 16 dereferenceable(28) @perm, i64 28, i1 false), !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader34.preheader, %73
  %79 = call noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef nonnull @perm, ptr noundef nonnull getelementptr inbounds (i8, ptr @perm, i64 28))
  br i1 %79, label %73, label %80, !llvm.loop !13

80:                                               ; preds = %.loopexit
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %81)
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #9
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  %84 = load i32, ptr @cool, align 16, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %85
  %87 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %86) #9
  %.not = icmp eq i64 %87, 0
  br i1 %.not, label %._crit_edge40, label %.lr.ph39

._crit_edge40:                                    ; preds = %139, %80
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @cool, i64 4), align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %89
  %91 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #9
  %.not.1 = icmp eq i64 %91, 0
  br i1 %.not.1, label %._crit_edge40.1, label %.lr.ph39.1

.lr.ph39.1:                                       ; preds = %._crit_edge40, %93
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %93 ], [ 0, %._crit_edge40 ]
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %indvars.iv.1) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %92)
          to label %93 unwind label %.loopexit.split-lp.loopexit

93:                                               ; preds = %.lr.ph39.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %94 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #9
  %95 = icmp ugt i64 %94, %indvars.iv.next.1
  br i1 %95, label %.lr.ph39.1, label %._crit_edge40.1, !llvm.loop !14

._crit_edge40.1:                                  ; preds = %93, %._crit_edge40
  %96 = load i32, ptr getelementptr inbounds (i8, ptr @cool, i64 8), align 8, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %97
  %99 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %98) #9
  %.not.2 = icmp eq i64 %99, 0
  br i1 %.not.2, label %._crit_edge40.2, label %.lr.ph39.2

.lr.ph39.2:                                       ; preds = %._crit_edge40.1, %101
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %101 ], [ 0, %._crit_edge40.1 ]
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %indvars.iv.2) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %100)
          to label %101 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

101:                                              ; preds = %.lr.ph39.2
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %102 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %98) #9
  %103 = icmp ugt i64 %102, %indvars.iv.next.2
  br i1 %103, label %.lr.ph39.2, label %._crit_edge40.2, !llvm.loop !14

._crit_edge40.2:                                  ; preds = %101, %._crit_edge40.1
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @cool, i64 12), align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %105
  %107 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #9
  %.not.3 = icmp eq i64 %107, 0
  br i1 %.not.3, label %._crit_edge40.3, label %.lr.ph39.3

.lr.ph39.3:                                       ; preds = %._crit_edge40.2, %109
  %indvars.iv.3 = phi i64 [ %indvars.iv.next.3, %109 ], [ 0, %._crit_edge40.2 ]
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %indvars.iv.3) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %108)
          to label %109 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

109:                                              ; preds = %.lr.ph39.3
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 1
  %110 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #9
  %111 = icmp ugt i64 %110, %indvars.iv.next.3
  br i1 %111, label %.lr.ph39.3, label %._crit_edge40.3, !llvm.loop !14

._crit_edge40.3:                                  ; preds = %109, %._crit_edge40.2
  %112 = load i32, ptr getelementptr inbounds (i8, ptr @cool, i64 16), align 16, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %113
  %115 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #9
  %.not.4 = icmp eq i64 %115, 0
  br i1 %.not.4, label %._crit_edge40.4, label %.lr.ph39.4

.lr.ph39.4:                                       ; preds = %._crit_edge40.3, %117
  %indvars.iv.4 = phi i64 [ %indvars.iv.next.4, %117 ], [ 0, %._crit_edge40.3 ]
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %indvars.iv.4) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %116)
          to label %117 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

117:                                              ; preds = %.lr.ph39.4
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.4, 1
  %118 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #9
  %119 = icmp ugt i64 %118, %indvars.iv.next.4
  br i1 %119, label %.lr.ph39.4, label %._crit_edge40.4, !llvm.loop !14

._crit_edge40.4:                                  ; preds = %117, %._crit_edge40.3
  %120 = load i32, ptr getelementptr inbounds (i8, ptr @cool, i64 20), align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %121
  %123 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %122) #9
  %.not.5 = icmp eq i64 %123, 0
  br i1 %.not.5, label %._crit_edge40.5, label %.lr.ph39.5

.lr.ph39.5:                                       ; preds = %._crit_edge40.4, %125
  %indvars.iv.5 = phi i64 [ %indvars.iv.next.5, %125 ], [ 0, %._crit_edge40.4 ]
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %indvars.iv.5) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %124)
          to label %125 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

125:                                              ; preds = %.lr.ph39.5
  %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.5, 1
  %126 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %122) #9
  %127 = icmp ugt i64 %126, %indvars.iv.next.5
  br i1 %127, label %.lr.ph39.5, label %._crit_edge40.5, !llvm.loop !14

._crit_edge40.5:                                  ; preds = %125, %._crit_edge40.4
  %128 = load i32, ptr getelementptr inbounds (i8, ptr @cool, i64 24), align 8, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [7 x %"class.std::vector"], ptr @vec, i64 0, i64 %129
  %131 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %130) #9
  %.not.6 = icmp eq i64 %131, 0
  br i1 %.not.6, label %._crit_edge40.6, label %.lr.ph39.6

.lr.ph39.6:                                       ; preds = %._crit_edge40.5, %133
  %indvars.iv.6 = phi i64 [ %indvars.iv.next.6, %133 ], [ 0, %._crit_edge40.5 ]
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef %indvars.iv.6) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %132)
          to label %133 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

133:                                              ; preds = %.lr.ph39.6
  %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.6, 1
  %134 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %130) #9
  %135 = icmp ugt i64 %134, %indvars.iv.next.6
  br i1 %135, label %.lr.ph39.6, label %._crit_edge40.6, !llvm.loop !14

._crit_edge40.6:                                  ; preds = %133, %._crit_edge40.5
  %136 = load i32, ptr @n, align 4, !tbaa !5
  %137 = icmp sgt i32 %136, 0
  br i1 %137, label %.lr.ph43, label %._crit_edge44

.lr.ph39:                                         ; preds = %80, %139
  %indvars.iv = phi i64 [ %indvars.iv.next, %139 ], [ 0, %80 ]
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %indvars.iv) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %138)
          to label %139 unwind label %.loopexit51

139:                                              ; preds = %.lr.ph39
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %140 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %86) #9
  %141 = icmp ugt i64 %140, %indvars.iv.next
  br i1 %141, label %.lr.ph39, label %._crit_edge40, !llvm.loop !14

.loopexit51:                                      ; preds = %.lr.ph39
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.lr.ph39.1
  %lpad.loopexit52 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %.lr.ph39.2
  %lpad.loopexit55 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %.lr.ph39.3
  %lpad.loopexit57 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %.lr.ph39.4
  %lpad.loopexit60 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %.lr.ph39.5
  %lpad.loopexit62 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %.lr.ph39.6
  %lpad.loopexit.split-lp63 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

._crit_edge44:                                    ; preds = %148, %._crit_edge40.6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  ret i32 0

.lr.ph43:                                         ; preds = %._crit_edge40.6, %148
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %148 ], [ 0, %._crit_edge40.6 ]
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv65) #9
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %144)
          to label %146 unwind label %152

146:                                              ; preds = %.lr.ph43
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef nonnull @.str.8)
          to label %148 unwind label %152

148:                                              ; preds = %146
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %149 = load i32, ptr @n, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = icmp slt i64 %indvars.iv.next66, %150
  br i1 %151, label %.lr.ph43, label %._crit_edge44, !llvm.loop !15

152:                                              ; preds = %146, %.lr.ph43
  %153 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit51, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit, %152
  %.pn = phi { ptr, i32 } [ %153, %152 ], [ %lpad.loopexit, %.loopexit51 ], [ %lpad.loopexit52, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit55, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit57, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit60, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit62, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp63, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  br label %154

154:                                              ; preds = %.loopexit.split-lp, %15
  %.pn32 = phi { ptr, i32 } [ %16, %15 ], [ %.pn, %.loopexit.split-lp ]
  resume { ptr, i32 } %.pn32
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 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 #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { inlinehint 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nounwind }

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

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass