; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SHORT/COOK72/Problem E (setter)

; 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<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }
%"class.std::allocator.2" = type { i8 }

@p = external dso_local global [510 x i32], align 16
@was = external dso_local global [510 x i32], align 16
@m = external dso_local global i32, align 4
@mat = external dso_local global [510 x [510 x fp128]], align 16
@f = external dso_local global [510 x fp128], align 16
@all = external dso_local global %"class.std::vector", align 8
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 uwtable
declare dso_local void @_Z6genAllii(i32 noundef, i32 noundef) #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 dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solvev() #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15makePermutationSt6vectorIiSaIiEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8, ptr noundef) #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::vector.0", align 8
  %20 = alloca %"class.std::vector.0", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::allocator.2", align 1
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::vector.0", align 8
  %25 = alloca %"class.std::vector.0", align 8
  %26 = alloca %"class.std::vector.0", align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %"class.std::vector.0", align 8
  %30 = alloca %"class.std::allocator.2", align 1
  %31 = alloca %"class.std::vector.0", align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %37 = alloca %"class.std::vector.0", align 8
  %38 = alloca %"class.std::vector.0", align 8
  %39 = alloca %"class.std::vector.0", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %2)
  br label %41

41:                                               ; preds = %381, %0
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, -1
  store i32 %43, ptr %2, align 4, !tbaa !5
  %44 = icmp sgt i32 %42, 0
  br i1 %44, label %45, label %387

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %60, %45
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = icmp sle i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %63

52:                                               ; preds = %47
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [510 x i32], ptr @p, i64 0, i64 %54
  %56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %55)
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [510 x i32], ptr @was, i64 0, i64 %58
  store i32 0, ptr %59, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %52
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %4, align 4, !tbaa !5
  br label %47, !llvm.loop !9

63:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %94, %63
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %101

69:                                               ; preds = %64
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [510 x i32], ptr @was, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = icmp eq i32 %73, 1
  br i1 %74, label %75, label %76

75:                                               ; preds = %69
  br label %94

76:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %77 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %77, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %88, %76
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [510 x i32], ptr @was, i64 0, i64 %80
  store i32 1, ptr %81, align 4, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [510 x i32], ptr @p, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  store i32 %85, ptr %7, align 4, !tbaa !5
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %8, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %78
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = icmp ne i32 %89, %90
  br i1 %91, label %78, label %92, !llvm.loop !11

92:                                               ; preds = %88
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %93 unwind label %97

93:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %94

94:                                               ; preds = %93, %75
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %6, align 4, !tbaa !5
  br label %64, !llvm.loop !12

97:                                               ; preds = %92
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %9, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %386

101:                                              ; preds = %68
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #7
  store i32 0, ptr @m, align 4, !tbaa !5
  %102 = load i32, ptr %3, align 4, !tbaa !5
  invoke void @_Z6genAllii(i32 noundef %102, i32 noundef 1)
          to label %103 unwind label %127

103:                                              ; preds = %101
  %104 = call ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #7
  %105 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %104, ptr %105, align 8
  %106 = call ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #7
  %107 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %106, ptr %107, align 8
  %108 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8
  %110 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt6vectorIiSaIiEES2_IS4_SaIS4_EEEEEvT_S9_(ptr %109, ptr %111)
          to label %112 unwind label %127

112:                                              ; preds = %103
  %113 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %13, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  %115 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %116 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %14, i32 0, i32 0
  store ptr %115, ptr %116, align 8
  %117 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %13, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8
  %119 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %14, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %118, ptr %120)
          to label %121 unwind label %127

121:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %151, %121
  %123 = load i32, ptr %15, align 4, !tbaa !5
  %124 = load i32, ptr @m, align 4, !tbaa !5
  %125 = icmp sle i32 %123, %124
  br i1 %125, label %131, label %126

126:                                              ; preds = %122
  store i32 12, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %154

127:                                              ; preds = %369, %367, %361, %360, %112, %103, %101
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %9, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %10, align 4
  br label %386

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

132:                                              ; preds = %144, %131
  %133 = load i32, ptr %17, align 4, !tbaa !5
  %134 = load i32, ptr @m, align 4, !tbaa !5
  %135 = icmp sle i32 %133, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %132
  store i32 15, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %147

137:                                              ; preds = %132
  %138 = load i32, ptr %15, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [510 x [510 x fp128]], ptr @mat, i64 0, i64 %139
  %141 = load i32, ptr %17, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [510 x fp128], ptr %140, i64 0, i64 %142
  store fp128 0xL00000000000000000000000000000000, ptr %143, align 16, !tbaa !13
  br label %144

144:                                              ; preds = %137
  %145 = load i32, ptr %17, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %17, align 4, !tbaa !5
  br label %132, !llvm.loop !15

147:                                              ; preds = %136
  %148 = load i32, ptr %15, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %149
  store fp128 0xL00000000000000000000000000000000, ptr %150, align 16, !tbaa !13
  br label %151

151:                                              ; preds = %147
  %152 = load i32, ptr %15, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %15, align 4, !tbaa !5
  br label %122, !llvm.loop !16

154:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %170, %154
  %156 = load i32, ptr %18, align 4, !tbaa !5
  %157 = load i32, ptr @m, align 4, !tbaa !5
  %158 = icmp sle i32 %156, %157
  br i1 %158, label %160, label %159

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

160:                                              ; preds = %155
  %161 = load i32, ptr %18, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %162
  store fp128 0xL00000000000000003FFF000000000000, ptr %163, align 16, !tbaa !13
  %164 = load i32, ptr %18, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [510 x [510 x fp128]], ptr @mat, i64 0, i64 %165
  %167 = load i32, ptr %18, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [510 x fp128], ptr %166, i64 0, i64 %168
  store fp128 0xL00000000000000003FFF000000000000, ptr %169, align 16, !tbaa !13
  br label %170

170:                                              ; preds = %160
  %171 = load i32, ptr %18, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %18, align 4, !tbaa !5
  br label %155, !llvm.loop !17

173:                                              ; preds = %159
  %174 = load i32, ptr %3, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 1, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %175, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %176 unwind label %188

176:                                              ; preds = %173
  invoke void @_Z15makePermutationSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %19, ptr noundef %20)
          to label %177 unwind label %192

177:                                              ; preds = %176
  %178 = invoke noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef %19)
          to label %179 unwind label %196

179:                                              ; preds = %177
  %180 = sext i32 %178 to i64
  %181 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %180
  store fp128 0xL00000000000000000000000000000000, ptr %181, align 16, !tbaa !13
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %182

182:                                              ; preds = %355, %179
  %183 = load i32, ptr %23, align 4, !tbaa !5
  %184 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #7
  %185 = trunc i64 %184 to i32
  %186 = icmp slt i32 %183, %185
  br i1 %186, label %202, label %187

187:                                              ; preds = %182
  store i32 21, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %360

188:                                              ; preds = %173
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %9, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %10, align 4
  br label %201

192:                                              ; preds = %176
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %9, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %10, align 4
  br label %200

196:                                              ; preds = %177
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %9, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %10, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  br label %200

200:                                              ; preds = %196, %192
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  br label %201

201:                                              ; preds = %200, %188
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %386

202:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #7
  %203 = load i32, ptr %23, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @all, i64 noundef %204) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %205)
          to label %206 unwind label %212

206:                                              ; preds = %202
  %207 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %208 = load i32, ptr %3, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = icmp eq i64 %207, %209
  br i1 %210, label %211, label %216

211:                                              ; preds = %206
  store i32 23, ptr %16, align 4
  br label %352

212:                                              ; preds = %202
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %9, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %10, align 4
  br label %359

216:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %217 unwind label %225

217:                                              ; preds = %216
  invoke void @_Z15makePermutationSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %25, ptr noundef %26)
          to label %218 unwind label %229

218:                                              ; preds = %217
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %348, %218
  %220 = load i32, ptr %27, align 4, !tbaa !5
  %221 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  %222 = trunc i64 %221 to i32
  %223 = icmp slt i32 %220, %222
  br i1 %223, label %233, label %224

224:                                              ; preds = %219
  store i32 24, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %351

225:                                              ; preds = %216
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %9, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %10, align 4
  br label %358

229:                                              ; preds = %217
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %9, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %10, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  br label %358

233:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %234 = load i32, ptr %27, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %28, align 4, !tbaa !5
  br label %236

236:                                              ; preds = %329, %233
  %237 = load i32, ptr %28, align 4, !tbaa !5
  %238 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  %239 = trunc i64 %238 to i32
  %240 = icmp slt i32 %237, %239
  br i1 %240, label %242, label %241

241:                                              ; preds = %236
  store i32 27, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %347

242:                                              ; preds = %236
  %243 = load i32, ptr %27, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %244) #7
  %246 = load i32, ptr %28, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %247) #7
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %245, ptr noundef nonnull align 4 dereferenceable(4) %248) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #7
  %249 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %249, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %250 unwind label %257

250:                                              ; preds = %242
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %251

251:                                              ; preds = %286, %250
  %252 = load i32, ptr %32, align 4, !tbaa !5
  %253 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #7
  %254 = trunc i64 %253 to i32
  %255 = icmp slt i32 %252, %254
  br i1 %255, label %261, label %256

256:                                              ; preds = %251
  store i32 30, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %293

257:                                              ; preds = %242
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %9, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  br label %346

261:                                              ; preds = %251
  %262 = load i32, ptr %32, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %263) #7
  %265 = load i32, ptr %264, align 4, !tbaa !5
  %266 = icmp eq i32 %265, 1
  br i1 %266, label %267, label %268

267:                                              ; preds = %261
  br label %286

268:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %269 = load i32, ptr %32, align 4, !tbaa !5
  store i32 %269, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  store i32 0, ptr %34, align 4, !tbaa !5
  br label %270

270:                                              ; preds = %280, %268
  %271 = load i32, ptr %33, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %272) #7
  store i32 1, ptr %273, align 4, !tbaa !5
  %274 = load i32, ptr %33, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %275) #7
  %277 = load i32, ptr %276, align 4, !tbaa !5
  store i32 %277, ptr %33, align 4, !tbaa !5
  %278 = load i32, ptr %34, align 4, !tbaa !5
  %279 = add nsw i32 %278, 1
  store i32 %279, ptr %34, align 4, !tbaa !5
  br label %280

280:                                              ; preds = %270
  %281 = load i32, ptr %33, align 4, !tbaa !5
  %282 = load i32, ptr %32, align 4, !tbaa !5
  %283 = icmp ne i32 %281, %282
  br i1 %283, label %270, label %284, !llvm.loop !18

284:                                              ; preds = %280
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %285 unwind label %289

285:                                              ; preds = %284
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %286

286:                                              ; preds = %285, %267
  %287 = load i32, ptr %32, align 4, !tbaa !5
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %32, align 4, !tbaa !5
  br label %251, !llvm.loop !19

289:                                              ; preds = %284
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %9, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %345

293:                                              ; preds = %256
  %294 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  %295 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %35, i32 0, i32 0
  store ptr %294, ptr %295, align 8
  %296 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  %297 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %36, i32 0, i32 0
  store ptr %296, ptr %297, align 8
  %298 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %35, i32 0, i32 0
  %299 = load ptr, ptr %298, align 8
  %300 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %36, i32 0, i32 0
  %301 = load ptr, ptr %300, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %299, ptr %301)
          to label %302 unwind label %332

302:                                              ; preds = %293
  %303 = load i32, ptr %3, align 4, !tbaa !5
  %304 = sitofp i32 %303 to double
  %305 = fdiv double -2.000000e+00, %304
  %306 = load i32, ptr %3, align 4, !tbaa !5
  %307 = sub nsw i32 %306, 1
  %308 = sitofp i32 %307 to double
  %309 = fdiv double %305, %308
  %310 = fpext double %309 to fp128
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %311 unwind label %332

311:                                              ; preds = %302
  %312 = invoke noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef %37)
          to label %313 unwind label %336

313:                                              ; preds = %311
  %314 = sext i32 %312 to i64
  %315 = getelementptr inbounds [510 x [510 x fp128]], ptr @mat, i64 0, i64 %314
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %316 unwind label %336

316:                                              ; preds = %313
  %317 = invoke noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef %38)
          to label %318 unwind label %340

318:                                              ; preds = %316
  %319 = sext i32 %317 to i64
  %320 = getelementptr inbounds [510 x fp128], ptr %315, i64 0, i64 %319
  %321 = load fp128, ptr %320, align 16, !tbaa !13
  %322 = fadd fp128 %321, %310
  store fp128 %322, ptr %320, align 16, !tbaa !13
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %38) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #7
  %323 = load i32, ptr %27, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %324) #7
  %326 = load i32, ptr %28, align 4, !tbaa !5
  %327 = sext i32 %326 to i64
  %328 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %327) #7
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %325, ptr noundef nonnull align 4 dereferenceable(4) %328) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #7
  br label %329

329:                                              ; preds = %318
  %330 = load i32, ptr %28, align 4, !tbaa !5
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr %28, align 4, !tbaa !5
  br label %236, !llvm.loop !20

332:                                              ; preds = %302, %293
  %333 = landingpad { ptr, i32 }
          cleanup
  %334 = extractvalue { ptr, i32 } %333, 0
  store ptr %334, ptr %9, align 8
  %335 = extractvalue { ptr, i32 } %333, 1
  store i32 %335, ptr %10, align 4
  br label %345

336:                                              ; preds = %313, %311
  %337 = landingpad { ptr, i32 }
          cleanup
  %338 = extractvalue { ptr, i32 } %337, 0
  store ptr %338, ptr %9, align 8
  %339 = extractvalue { ptr, i32 } %337, 1
  store i32 %339, ptr %10, align 4
  br label %344

340:                                              ; preds = %316
  %341 = landingpad { ptr, i32 }
          cleanup
  %342 = extractvalue { ptr, i32 } %341, 0
  store ptr %342, ptr %9, align 8
  %343 = extractvalue { ptr, i32 } %341, 1
  store i32 %343, ptr %10, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %38) #7
  br label %344

344:                                              ; preds = %340, %336
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #7
  br label %345

345:                                              ; preds = %344, %332, %289
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #7
  br label %346

346:                                              ; preds = %345, %257
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  br label %358

347:                                              ; preds = %241
  br label %348

348:                                              ; preds = %347
  %349 = load i32, ptr %27, align 4, !tbaa !5
  %350 = add nsw i32 %349, 1
  store i32 %350, ptr %27, align 4, !tbaa !5
  br label %219, !llvm.loop !21

351:                                              ; preds = %224
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  store i32 0, ptr %16, align 4
  br label %352

352:                                              ; preds = %351, %211
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #7
  %353 = load i32, ptr %16, align 4
  switch i32 %353, label %394 [
    i32 0, label %354
    i32 23, label %355
  ]

354:                                              ; preds = %352
  br label %355

355:                                              ; preds = %354, %352
  %356 = load i32, ptr %23, align 4, !tbaa !5
  %357 = add nsw i32 %356, 1
  store i32 %357, ptr %23, align 4, !tbaa !5
  br label %182, !llvm.loop !22

358:                                              ; preds = %346, %229, %225
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  br label %359

359:                                              ; preds = %358, %212
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %386

360:                                              ; preds = %187
  invoke void @_Z5solvev()
          to label %361 unwind label %127

361:                                              ; preds = %360
  %362 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !23
  %363 = getelementptr i8, ptr %362, i64 -24
  %364 = load i64, ptr %363, align 8
  %365 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %364
  %366 = invoke noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %365, i64 noundef 7)
          to label %367 unwind label %127

367:                                              ; preds = %361
  %368 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
          to label %369 unwind label %127

369:                                              ; preds = %367
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %370 unwind label %127

370:                                              ; preds = %369
  %371 = invoke noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef %39)
          to label %372 unwind label %382

372:                                              ; preds = %370
  %373 = sext i32 %371 to i64
  %374 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %373
  %375 = load fp128, ptr %374, align 16, !tbaa !13
  %376 = fptrunc fp128 %375 to x86_fp80
  %377 = fadd x86_fp80 %376, 0xK3FDAAFEBFF0BCB24A800
  %378 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %368, x86_fp80 noundef %377)
          to label %379 unwind label %382

379:                                              ; preds = %372
  %380 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %378, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %381 unwind label %382

381:                                              ; preds = %379
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %41, !llvm.loop !25

382:                                              ; preds = %379, %372, %370
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %9, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %10, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  br label %386

386:                                              ; preds = %382, %359, %201, %127, %97
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %389

387:                                              ; preds = %41
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %388 = load i32, ptr %1, align 4
  ret i32 %388

389:                                              ; preds = %386
  %390 = load ptr, ptr %9, align 8
  %391 = load i32, ptr %10, align 4
  %392 = insertvalue { ptr, i32 } poison, ptr %390, 0
  %393 = insertvalue { ptr, i32 } %392, i32 %391, 1
  resume { ptr, i32 } %393

394:                                              ; preds = %352
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt6vectorIiSaIiEES2_IS4_SaIS4_EEEEEvT_S9_(ptr, ptr) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) #5

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8), x86_fp80 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 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)) #5

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

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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { "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 = { 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 #6 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"__float128", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = distinct !{!25, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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::allocator.2" = type { i8 }

@p = external dso_local global [510 x i32], align 16
@was = external dso_local local_unnamed_addr global [510 x i32], align 16
@m = external dso_local local_unnamed_addr global i32, align 4
@mat = external dso_local local_unnamed_addr global [510 x [510 x fp128]], align 16
@f = external dso_local local_unnamed_addr global [510 x fp128], align 16
@all = external dso_local global %"class.std::vector", align 8
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 uwtable
declare dso_local void @_Z6genAllii(i32 noundef, i32 noundef) 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 dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solvev() local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15makePermutationSt6vectorIiSaIiEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8, ptr noundef) local_unnamed_addr #1

; 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: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca %"class.std::vector.0", align 8
  %13 = alloca %"class.std::allocator.2", align 1
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::vector.0", align 8
  %17 = alloca %"class.std::vector.0", align 8
  %18 = alloca %"class.std::vector.0", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %1)
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = add nsw i32 %20, -1
  store i32 %21, ptr %1, align 4, !tbaa !5
  %22 = icmp sgt i32 %20, 0
  br i1 %22, label %.lr.ph123, label %._crit_edge124

.lr.ph123:                                        ; preds = %0, %216
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %2)
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %.not89 = icmp slt i32 %24, 1
  br i1 %.not89, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph123
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %.not7092 = icmp slt i32 %25, 1
  br i1 %.not7092, label %._crit_edge96, label %.lr.ph95

.lr.ph:                                           ; preds = %.lr.ph123, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph123 ]
  %26 = getelementptr inbounds [510 x i32], ptr @p, i64 0, i64 %indvars.iv
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %26)
  %28 = getelementptr inbounds [510 x i32], ptr @was, i64 0, i64 %indvars.iv
  store i32 0, ptr %28, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %.not.not = icmp slt i64 %indvars.iv, %30
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge96:                                    ; preds = %48, %._crit_edge
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #8
  store i32 0, ptr @m, align 4, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !5
  invoke void @_Z6genAllii(i32 noundef %31, i32 noundef 1)
          to label %53 unwind label %74

.lr.ph95:                                         ; preds = %._crit_edge, %48
  %32 = phi i32 [ %49, %48 ], [ %25, %._crit_edge ]
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %48 ], [ 1, %._crit_edge ]
  %33 = getelementptr inbounds [510 x i32], ptr @was, i64 0, i64 %indvars.iv126
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 1
  br i1 %35, label %48, label %36

36:                                               ; preds = %.lr.ph95
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %37 = trunc nuw nsw i64 %indvars.iv126 to i32
  br label %38

38:                                               ; preds = %38, %36
  %39 = phi i32 [ 0, %36 ], [ %44, %38 ]
  %.060 = phi i32 [ %37, %36 ], [ %43, %38 ]
  %40 = sext i32 %.060 to i64
  %41 = getelementptr inbounds [510 x i32], ptr @was, i64 0, i64 %40
  store i32 1, ptr %41, align 4, !tbaa !5
  %42 = getelementptr inbounds [510 x i32], ptr @p, i64 0, i64 %40
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = add nuw nsw i32 %39, 1
  %45 = zext i32 %43 to i64
  %.not84 = icmp eq i64 %indvars.iv126, %45
  br i1 %.not84, label %46, label %38, !llvm.loop !11

46:                                               ; preds = %38
  store i32 %44, ptr %4, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %47 unwind label %51

47:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %.lr.ph95, %47
  %49 = phi i32 [ %32, %.lr.ph95 ], [ %.pre, %47 ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %50 = sext i32 %49 to i64
  %.not70.not = icmp slt i64 %indvars.iv126, %50
  br i1 %.not70.not, label %.lr.ph95, label %._crit_edge96, !llvm.loop !12

51:                                               ; preds = %46
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %222

53:                                               ; preds = %._crit_edge96
  %54 = call ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #8
  %55 = call ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt6vectorIiSaIiEES2_IS4_SaIS4_EEEEEvT_S9_(ptr %54, ptr %55)
          to label %56 unwind label %74

56:                                               ; preds = %53
  %57 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %58 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %57, ptr %58)
          to label %.preheader88 unwind label %74

.preheader88:                                     ; preds = %56
  %59 = load i32, ptr @m, align 4, !tbaa !5
  %.not71101 = icmp slt i32 %59, 1
  br i1 %.not71101, label %._crit_edge106, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader88
  %60 = zext nneg i32 %59 to i64
  %61 = shl nuw nsw i64 %60, 4
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @f, i64 16), i8 0, i64 %61, i1 false), !tbaa !13
  %xtraiter = and i64 %60, 7
  %62 = icmp ult i32 %59, 8
  br i1 %62, label %.preheader87.unr-lcssa, label %.preheader.preheader.new

.preheader.preheader.new:                         ; preds = %.preheader.preheader
  %unroll_iter = and i64 %60, 2147483640
  br label %.preheader

.preheader87.unr-lcssa:                           ; preds = %.preheader, %.preheader.preheader
  %indvar.unr = phi i64 [ 0, %.preheader.preheader ], [ %indvar.next.7, %.preheader ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader87, label %.preheader.epil

.preheader.epil:                                  ; preds = %.preheader87.unr-lcssa, %.preheader.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader.epil ], [ %indvar.unr, %.preheader87.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader.epil ], [ 0, %.preheader87.unr-lcssa ]
  %63 = mul nuw nsw i64 %indvar.epil, 8160
  %gep.epil = getelementptr i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 %63
  call void @llvm.memset.p0.i64(ptr align 16 %gep.epil, i8 0, i64 %61, i1 false), !tbaa !13
  %indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader87, label %.preheader.epil, !llvm.loop !15

.preheader87:                                     ; preds = %.preheader.epil, %.preheader87.unr-lcssa
  br i1 %.not71101, label %._crit_edge106, label %.lr.ph105.preheader

.lr.ph105.preheader:                              ; preds = %.preheader87
  %64 = zext nneg i32 %59 to i64
  %xtraiter157 = and i64 %64, 1
  %65 = icmp eq i32 %59, 1
  br i1 %65, label %._crit_edge106.loopexit.unr-lcssa, label %.lr.ph105.preheader.new

.lr.ph105.preheader.new:                          ; preds = %.lr.ph105.preheader
  %unroll_iter160 = and i64 %64, 2147483646
  br label %.lr.ph105

.preheader:                                       ; preds = %.preheader, %.preheader.preheader.new
  %indvar = phi i64 [ 0, %.preheader.preheader.new ], [ %indvar.next.7, %.preheader ]
  %niter = phi i64 [ 0, %.preheader.preheader.new ], [ %niter.next.7, %.preheader ]
  %66 = mul nuw nsw i64 %indvar, 8160
  %gep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 %66
  call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %61, i1 false), !tbaa !13
  %67 = mul nuw i64 %indvar, 8160
  %gep162 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 8160), i64 %67
  call void @llvm.memset.p0.i64(ptr align 16 %gep162, i8 0, i64 %61, i1 false), !tbaa !13
  %68 = mul nuw i64 %indvar, 8160
  %gep163 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 16320), i64 %68
  call void @llvm.memset.p0.i64(ptr align 16 %gep163, i8 0, i64 %61, i1 false), !tbaa !13
  %69 = mul nuw i64 %indvar, 8160
  %gep164 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 24480), i64 %69
  call void @llvm.memset.p0.i64(ptr align 16 %gep164, i8 0, i64 %61, i1 false), !tbaa !13
  %70 = mul nuw i64 %indvar, 8160
  %gep165 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 32640), i64 %70
  call void @llvm.memset.p0.i64(ptr align 16 %gep165, i8 0, i64 %61, i1 false), !tbaa !13
  %71 = mul nuw i64 %indvar, 8160
  %gep166 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 40800), i64 %71
  call void @llvm.memset.p0.i64(ptr align 16 %gep166, i8 0, i64 %61, i1 false), !tbaa !13
  %72 = mul nuw i64 %indvar, 8160
  %gep167 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 48960), i64 %72
  call void @llvm.memset.p0.i64(ptr align 16 %gep167, i8 0, i64 %61, i1 false), !tbaa !13
  %73 = mul nuw i64 %indvar, 8160
  %gep168 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @mat, i64 8176), i64 57120), i64 %73
  call void @llvm.memset.p0.i64(ptr align 16 %gep168, i8 0, i64 %61, i1 false), !tbaa !13
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader87.unr-lcssa, label %.preheader, !llvm.loop !17

74:                                               ; preds = %204, %197, %._crit_edge121, %56, %53, %._crit_edge96
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %222

._crit_edge106.loopexit.unr-lcssa:                ; preds = %.lr.ph105, %.lr.ph105.preheader
  %indvars.iv135.unr = phi i64 [ 1, %.lr.ph105.preheader ], [ %indvars.iv.next136.1, %.lr.ph105 ]
  %lcmp.mod159.not = icmp eq i64 %xtraiter157, 0
  br i1 %lcmp.mod159.not, label %._crit_edge106, label %.lr.ph105.epil

.lr.ph105.epil:                                   ; preds = %._crit_edge106.loopexit.unr-lcssa
  %76 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %indvars.iv135.unr
  store fp128 0xL00000000000000003FFF000000000000, ptr %76, align 16, !tbaa !13
  %77 = getelementptr inbounds [510 x [510 x fp128]], ptr @mat, i64 0, i64 %indvars.iv135.unr, i64 %indvars.iv135.unr
  store fp128 0xL00000000000000003FFF000000000000, ptr %77, align 16, !tbaa !13
  br label %._crit_edge106

._crit_edge106:                                   ; preds = %.lr.ph105.epil, %._crit_edge106.loopexit.unr-lcssa, %.preheader88, %.preheader87
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %79, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %84 unwind label %93

.lr.ph105:                                        ; preds = %.lr.ph105, %.lr.ph105.preheader.new
  %indvars.iv135 = phi i64 [ 1, %.lr.ph105.preheader.new ], [ %indvars.iv.next136.1, %.lr.ph105 ]
  %niter161 = phi i64 [ 0, %.lr.ph105.preheader.new ], [ %niter161.next.1, %.lr.ph105 ]
  %80 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %indvars.iv135
  store fp128 0xL00000000000000003FFF000000000000, ptr %80, align 16, !tbaa !13
  %81 = getelementptr inbounds [510 x [510 x fp128]], ptr @mat, i64 0, i64 %indvars.iv135, i64 %indvars.iv135
  store fp128 0xL00000000000000003FFF000000000000, ptr %81, align 16, !tbaa !13
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %82 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %indvars.iv.next136
  store fp128 0xL00000000000000003FFF000000000000, ptr %82, align 16, !tbaa !13
  %83 = getelementptr inbounds [510 x [510 x fp128]], ptr @mat, i64 0, i64 %indvars.iv.next136, i64 %indvars.iv.next136
  store fp128 0xL00000000000000003FFF000000000000, ptr %83, align 16, !tbaa !13
  %indvars.iv.next136.1 = add nuw nsw i64 %indvars.iv135, 2
  %niter161.next.1 = add i64 %niter161, 2
  %niter161.ncmp.1 = icmp eq i64 %niter161.next.1, %unroll_iter160
  br i1 %niter161.ncmp.1, label %._crit_edge106.loopexit.unr-lcssa, label %.lr.ph105, !llvm.loop !18

84:                                               ; preds = %._crit_edge106
  invoke void @_Z15makePermutationSt6vectorIiSaIiEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %5, ptr noundef nonnull %6)
          to label %85 unwind label %95

85:                                               ; preds = %84
  %86 = invoke noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef nonnull %5)
          to label %87 unwind label %97

87:                                               ; preds = %85
  %88 = sext i32 %86 to i64
  %89 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %88
  store fp128 0xL00000000000000000000000000000000, ptr %89, align 16, !tbaa !13
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %90 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #8
  %91 = trunc i64 %90 to i32
  %92 = icmp sgt i32 %91, 0
  br i1 %92, label %.lr.ph120, label %._crit_edge121

._crit_edge121:                                   ; preds = %191, %87
  invoke void @_Z5solvev()
          to label %197 unwind label %74

93:                                               ; preds = %._crit_edge106
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %100

95:                                               ; preds = %84
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %99

97:                                               ; preds = %85
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  br label %99

99:                                               ; preds = %97, %95
  %.pn = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  br label %100

100:                                              ; preds = %99, %93
  %.pn.pn = phi { ptr, i32 } [ %.pn, %99 ], [ %94, %93 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %222

.lr.ph120:                                        ; preds = %87, %191
  %indvars.iv151 = phi i64 [ %indvars.iv.next152, %191 ], [ 0, %87 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  %101 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @all, i64 noundef %indvars.iv151) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %101)
          to label %102 unwind label %107

102:                                              ; preds = %.lr.ph120
  %103 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %104 = load i32, ptr %2, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = icmp eq i64 %103, %105
  br i1 %106, label %191, label %109

107:                                              ; preds = %.lr.ph120
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %196

109:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %110 unwind label %118

110:                                              ; preds = %109
  invoke void @_Z15makePermutationSt6vectorIiSaIiEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %10, ptr noundef nonnull %11)
          to label %111 unwind label %120

111:                                              ; preds = %110
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  %112 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %113 = trunc i64 %112 to i32
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %.lr.ph116, label %._crit_edge117

.loopexit:                                        ; preds = %171, %.lr.ph116
  %115 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %sext155 = shl i64 %115, 32
  %116 = ashr exact i64 %sext155, 32
  %117 = icmp slt i64 %indvars.iv.next149, %116
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  br i1 %117, label %.lr.ph116, label %._crit_edge117, !llvm.loop !19

._crit_edge117:                                   ; preds = %.loopexit, %111
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  br label %191

118:                                              ; preds = %109
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %195

120:                                              ; preds = %110
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  br label %195

.lr.ph116:                                        ; preds = %111, %.loopexit
  %indvars.iv148 = phi i64 [ %indvars.iv.next149, %.loopexit ], [ 0, %111 ]
  %indvars.iv143 = phi i64 [ %indvars.iv.next144, %.loopexit ], [ 1, %111 ]
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %122 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %sext = shl i64 %122, 32
  %123 = ashr exact i64 %sext, 32
  %124 = icmp slt i64 %indvars.iv.next149, %123
  br i1 %124, label %.lr.ph113, label %.loopexit

.lr.ph113:                                        ; preds = %.lr.ph116, %171
  %indvars.iv145 = phi i64 [ %indvars.iv.next146, %171 ], [ %indvars.iv143, %.lr.ph116 ]
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv148) #8
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv145) #8
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %125, ptr noundef nonnull align 4 dereferenceable(4) %126) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  %127 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %127, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %128 unwind label %134

128:                                              ; preds = %.lr.ph113
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %129 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %130 = trunc i64 %129 to i32
  %131 = icmp sgt i32 %130, 0
  br i1 %131, label %.lr.ph109, label %._crit_edge110

._crit_edge110:                                   ; preds = %151, %128
  %132 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %133 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %132, ptr %133)
          to label %157 unwind label %182

134:                                              ; preds = %.lr.ph113
  %135 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #8
  br label %190

.lr.ph109:                                        ; preds = %128, %151
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %151 ], [ 0, %128 ]
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv140) #8
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %151, label %139

139:                                              ; preds = %.lr.ph109
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  %140 = trunc nuw nsw i64 %indvars.iv140 to i32
  br label %141

141:                                              ; preds = %141, %139
  %.051 = phi i32 [ %140, %139 ], [ %145, %141 ]
  %142 = sext i32 %.051 to i64
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %142) #8
  store i32 1, ptr %143, align 4, !tbaa !5
  %144 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %142) #8
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = load i32, ptr %15, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %15, align 4, !tbaa !5
  %148 = zext i32 %145 to i64
  %.not77 = icmp eq i64 %indvars.iv140, %148
  br i1 %.not77, label %149, label %141, !llvm.loop !20

149:                                              ; preds = %141
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %150 unwind label %155

150:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %151

151:                                              ; preds = %.lr.ph109, %150
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %152 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %sext154 = shl i64 %152, 32
  %153 = ashr exact i64 %sext154, 32
  %154 = icmp slt i64 %indvars.iv.next141, %153
  br i1 %154, label %.lr.ph109, label %._crit_edge110, !llvm.loop !21

155:                                              ; preds = %149
  %156 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %189

157:                                              ; preds = %._crit_edge110
  %158 = load i32, ptr %2, align 4, !tbaa !5
  %159 = sitofp i32 %158 to double
  %160 = fdiv double -2.000000e+00, %159
  %161 = add nsw i32 %158, -1
  %162 = sitofp i32 %161 to double
  %163 = fdiv double %160, %162
  %164 = fpext double %163 to fp128
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %165 unwind label %182

165:                                              ; preds = %157
  %166 = invoke noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef nonnull %16)
          to label %167 unwind label %184

167:                                              ; preds = %165
  %168 = sext i32 %166 to i64
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %169 unwind label %184

169:                                              ; preds = %167
  %170 = invoke noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef nonnull %17)
          to label %171 unwind label %186

171:                                              ; preds = %169
  %172 = sext i32 %170 to i64
  %173 = getelementptr inbounds [510 x [510 x fp128]], ptr @mat, i64 0, i64 %168, i64 %172
  %174 = load fp128, ptr %173, align 16, !tbaa !13
  %175 = fadd fp128 %174, %164
  store fp128 %175, ptr %173, align 16, !tbaa !13
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv148) #8
  %177 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv145) #8
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %176, ptr noundef nonnull align 4 dereferenceable(4) %177) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %178 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %179 = trunc i64 %178 to i32
  %180 = trunc nuw i64 %indvars.iv.next146 to i32
  %181 = icmp slt i32 %180, %179
  br i1 %181, label %.lr.ph113, label %.loopexit, !llvm.loop !22

182:                                              ; preds = %157, %._crit_edge110
  %183 = landingpad { ptr, i32 }
          cleanup
  br label %189

184:                                              ; preds = %167, %165
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %188

186:                                              ; preds = %169
  %187 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  br label %188

188:                                              ; preds = %186, %184
  %.pn75 = phi { ptr, i32 } [ %187, %186 ], [ %185, %184 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  br label %189

189:                                              ; preds = %188, %182, %155
  %.pn78 = phi { ptr, i32 } [ %156, %155 ], [ %.pn75, %188 ], [ %183, %182 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  br label %190

190:                                              ; preds = %189, %134
  %.pn78.pn = phi { ptr, i32 } [ %.pn78, %189 ], [ %135, %134 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  br label %195

191:                                              ; preds = %102, %._crit_edge117
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %192 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @all) #8
  %sext156 = shl i64 %192, 32
  %193 = ashr exact i64 %sext156, 32
  %194 = icmp slt i64 %indvars.iv.next152, %193
  br i1 %194, label %.lr.ph120, label %._crit_edge121, !llvm.loop !23

195:                                              ; preds = %190, %120, %118
  %.pn78.pn.pn = phi { ptr, i32 } [ %.pn78.pn, %190 ], [ %121, %120 ], [ %119, %118 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br label %196

196:                                              ; preds = %195, %107
  %.pn78.pn.pn.pn = phi { ptr, i32 } [ %.pn78.pn.pn, %195 ], [ %108, %107 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  br label %222

197:                                              ; preds = %._crit_edge121
  %198 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !24
  %199 = getelementptr i8, ptr %198, i64 -24
  %200 = load i64, ptr %199, align 8
  %201 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %200
  %202 = call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %201, i64 noundef 7)
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
          to label %204 unwind label %74

204:                                              ; preds = %197
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %205 unwind label %74

205:                                              ; preds = %204
  %206 = invoke noundef i32 @_Z8getIndexSt6vectorIiSaIiEE(ptr noundef nonnull %18)
          to label %207 unwind label %220

207:                                              ; preds = %205
  %208 = sext i32 %206 to i64
  %209 = getelementptr inbounds [510 x fp128], ptr @f, i64 0, i64 %208
  %210 = load fp128, ptr %209, align 16, !tbaa !13
  %211 = fptrunc fp128 %210 to x86_fp80
  %212 = fadd x86_fp80 %211, 0xK3FDAAFEBFF0BCB24A800
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %203, x86_fp80 noundef %212)
          to label %214 unwind label %220

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

216:                                              ; preds = %214
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %217 = load i32, ptr %1, align 4, !tbaa !5
  %218 = add nsw i32 %217, -1
  store i32 %218, ptr %1, align 4, !tbaa !5
  %219 = icmp sgt i32 %217, 0
  br i1 %219, label %.lr.ph123, label %._crit_edge124, !llvm.loop !26

220:                                              ; preds = %214, %207, %205
  %221 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  br label %222

222:                                              ; preds = %220, %196, %100, %74, %51
  %.pn85 = phi { ptr, i32 } [ %52, %51 ], [ %.pn78.pn.pn.pn, %196 ], [ %221, %220 ], [ %75, %74 ], [ %.pn.pn, %100 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn85

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt6vectorIiSaIiEES2_IS4_SaIS4_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #5

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #5

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

; 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 #1 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)) #5

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

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

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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"__float128", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !8, i64 0}
!26 = distinct !{!26, !10}


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