; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x05-排序/105. 七夕祭 (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@a = external dso_local global [100010 x i32], align 16
@b = external dso_local global [100010 x i32], align 16
@s = external dso_local global [100010 x i32], align 16
@nOk = external dso_local global i32, align 4
@mOk = external dso_local global i32, align 4
@nAvg = external dso_local global i32, align 4
@mAvg = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

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

14:                                               ; preds = %32, %0
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr @t, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %35

19:                                               ; preds = %14
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) @y)
  %22 = load i32, ptr @x, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %24, align 4, !tbaa !5
  %27 = load i32, ptr @y, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %29, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %19
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !5
  br label %14, !llvm.loop !9

35:                                               ; preds = %18
  %36 = load i32, ptr @t, align 4, !tbaa !5
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %38 = srem i32 %36, %37
  %39 = icmp eq i32 %38, 0
  %40 = zext i1 %39 to i32
  store i32 %40, ptr @nOk, align 4, !tbaa !5
  %41 = load i32, ptr @t, align 4, !tbaa !5
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = srem i32 %41, %42
  %44 = icmp eq i32 %43, 0
  %45 = zext i1 %44 to i32
  store i32 %45, ptr @mOk, align 4, !tbaa !5
  %46 = load i32, ptr @t, align 4, !tbaa !5
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = sdiv i32 %46, %47
  store i32 %48, ptr @nAvg, align 4, !tbaa !5
  %49 = load i32, ptr @t, align 4, !tbaa !5
  %50 = load i32, ptr @m, align 4, !tbaa !5
  %51 = sdiv i32 %49, %50
  store i32 %51, ptr @mAvg, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !11
  %52 = load i32, ptr @nOk, align 4, !tbaa !5
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %114

54:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %80, %54
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %83

60:                                               ; preds = %55
  %61 = load i32, ptr @nAvg, align 4, !tbaa !5
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sub nsw i32 %65, %61
  store i32 %66, ptr %64, align 4, !tbaa !5
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = add nsw i32 %71, %75
  %77 = load i32, ptr %5, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %78
  store i32 %76, ptr %79, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %60
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %5, align 4, !tbaa !5
  br label %55, !llvm.loop !13

83:                                               ; preds = %59
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr @s, i64 %85
  %87 = getelementptr inbounds i32, ptr %86, i64 1
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef getelementptr inbounds (i32, ptr @s, i64 1), ptr noundef %87)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %88 = load i32, ptr @n, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  %90 = sdiv i32 %89, 2
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  store i32 %93, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %110, %83
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = icmp sle i32 %95, %96
  br i1 %97, label %99, label %98

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

99:                                               ; preds = %94
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sub nsw i32 %100, %104
  %106 = call i32 @llvm.abs.i32(i32 %105, i1 true)
  %107 = sext i32 %106 to i64
  %108 = load i64, ptr %3, align 8, !tbaa !11
  %109 = add nsw i64 %108, %107
  store i64 %109, ptr %3, align 8, !tbaa !11
  br label %110

110:                                              ; preds = %99
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %7, align 4, !tbaa !5
  br label %94, !llvm.loop !14

113:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %114

114:                                              ; preds = %113, %35
  %115 = load i32, ptr @mOk, align 4, !tbaa !5
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %177

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %143, %117
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = load i32, ptr @m, align 4, !tbaa !5
  %121 = icmp sle i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %146

123:                                              ; preds = %118
  %124 = load i32, ptr @mAvg, align 4, !tbaa !5
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = sub nsw i32 %128, %124
  store i32 %129, ptr %127, align 4, !tbaa !5
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = load i32, ptr %8, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = add nsw i32 %134, %138
  %140 = load i32, ptr %8, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %141
  store i32 %139, ptr %142, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %123
  %144 = load i32, ptr %8, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %8, align 4, !tbaa !5
  br label %118, !llvm.loop !15

146:                                              ; preds = %122
  %147 = load i32, ptr @m, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr @s, i64 %148
  %150 = getelementptr inbounds i32, ptr %149, i64 1
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef getelementptr inbounds (i32, ptr @s, i64 1), ptr noundef %150)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %151 = load i32, ptr @m, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  %153 = sdiv i32 %152, 2
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  store i32 %156, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %173, %146
  %158 = load i32, ptr %10, align 4, !tbaa !5
  %159 = load i32, ptr @m, align 4, !tbaa !5
  %160 = icmp sle i32 %158, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %176

162:                                              ; preds = %157
  %163 = load i32, ptr %9, align 4, !tbaa !5
  %164 = load i32, ptr %10, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = sub nsw i32 %163, %167
  %169 = call i32 @llvm.abs.i32(i32 %168, i1 true)
  %170 = sext i32 %169 to i64
  %171 = load i64, ptr %3, align 8, !tbaa !11
  %172 = add nsw i64 %171, %170
  store i64 %172, ptr %3, align 8, !tbaa !11
  br label %173

173:                                              ; preds = %162
  %174 = load i32, ptr %10, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %10, align 4, !tbaa !5
  br label %157, !llvm.loop !16

176:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %177

177:                                              ; preds = %176, %114
  %178 = load i32, ptr @nOk, align 4, !tbaa !5
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %183, label %180

180:                                              ; preds = %177
  %181 = load i32, ptr @mOk, align 4, !tbaa !5
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %206

183:                                              ; preds = %180, %177
  %184 = load i32, ptr @nOk, align 4, !tbaa !5
  %185 = icmp ne i32 %184, 0
  br i1 %185, label %186, label %191

186:                                              ; preds = %183
  %187 = load i32, ptr @mOk, align 4, !tbaa !5
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %191

189:                                              ; preds = %186
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %199

191:                                              ; preds = %186, %183
  %192 = load i32, ptr @nOk, align 4, !tbaa !5
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %196

194:                                              ; preds = %191
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  br label %198

196:                                              ; preds = %191
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %198

198:                                              ; preds = %196, %194
  br label %199

199:                                              ; preds = %198, %189
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %201 = load i64, ptr %3, align 8, !tbaa !11
  %202 = load i64, ptr %4, align 8, !tbaa !11
  %203 = add nsw i64 %201, %202
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %200, i64 noundef %203)
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %204, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %209

206:                                              ; preds = %180
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %207, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %209

209:                                              ; preds = %206, %199
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@a = external dso_local local_unnamed_addr global [100010 x i32], align 16
@b = external dso_local local_unnamed_addr global [100010 x i32], align 16
@s = external dso_local global [100010 x i32], align 16
@nOk = external dso_local local_unnamed_addr global i32, align 4
@mOk = external dso_local local_unnamed_addr global i32, align 4
@nAvg = external dso_local local_unnamed_addr global i32, align 4
@mAvg = external dso_local local_unnamed_addr global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @t)
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa44 = phi i32 [ %4, %0 ], [ %31, %.lr.ph ]
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %7 = srem i32 %.lcssa44, %6
  %8 = icmp eq i32 %7, 0
  %9 = zext i1 %8 to i32
  store i32 %9, ptr @nOk, align 4, !tbaa !5
  %10 = load i32, ptr @m, align 4, !tbaa !5
  %11 = srem i32 %.lcssa44, %10
  %12 = icmp eq i32 %11, 0
  %13 = zext i1 %12 to i32
  store i32 %13, ptr @mOk, align 4, !tbaa !5
  %14 = sdiv i32 %.lcssa44, %6
  store i32 %14, ptr @nAvg, align 4, !tbaa !5
  %15 = sdiv i32 %.lcssa44, %10
  store i32 %15, ptr @mAvg, align 4, !tbaa !5
  br i1 %8, label %.preheader43, label %.loopexit42

.preheader43:                                     ; preds = %._crit_edge
  %.not3746 = icmp slt i32 %6, 1
  br i1 %.not3746, label %._crit_edge49, label %.lr.ph48.preheader

.lr.ph48.preheader:                               ; preds = %.preheader43
  %.pre = load i32, ptr @s, align 16, !tbaa !5
  %16 = zext nneg i32 %6 to i64
  %xtraiter = and i64 %16, 1
  %17 = icmp eq i32 %6, 1
  br i1 %17, label %._crit_edge49.loopexit.unr-lcssa, label %.lr.ph48.preheader.new

.lr.ph48.preheader.new:                           ; preds = %.lr.ph48.preheader
  %unroll_iter = and i64 %16, 2147483646
  br label %.lr.ph48

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02945 = phi i32 [ %30, %.lr.ph ], [ 0, %0 ]
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) @y)
  %20 = load i32, ptr @x, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 4, !tbaa !5
  %25 = load i32, ptr @y, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %27, align 4, !tbaa !5
  %30 = add nuw nsw i32 %.02945, 1
  %31 = load i32, ptr @t, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge49.loopexit.unr-lcssa:                 ; preds = %.lr.ph48, %.lr.ph48.preheader
  %.unr = phi i32 [ %.pre, %.lr.ph48.preheader ], [ %69, %.lr.ph48 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph48.preheader ], [ %indvars.iv.next.1, %.lr.ph48 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge49, label %.lr.ph48.epil

.lr.ph48.epil:                                    ; preds = %._crit_edge49.loopexit.unr-lcssa
  %33 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv.unr
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = sub nsw i32 %34, %14
  store i32 %35, ptr %33, align 4, !tbaa !5
  %36 = add nsw i32 %.unr, %35
  %37 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %indvars.iv.unr
  store i32 %36, ptr %37, align 4, !tbaa !5
  br label %._crit_edge49

._crit_edge49:                                    ; preds = %.lr.ph48.epil, %._crit_edge49.loopexit.unr-lcssa, %.preheader43
  %38 = sext i32 %6 to i64
  %39 = getelementptr inbounds i32, ptr @s, i64 %38
  %40 = getelementptr inbounds i8, ptr %39, i64 4
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @s, i64 4), ptr noundef nonnull %40)
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  %43 = sdiv i32 %42, 2
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %.not3850 = icmp slt i32 %41, 1
  br i1 %.not3850, label %.loopexit42thread-pre-split, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %._crit_edge49
  %wide.trip.count73 = zext nneg i32 %42 to i64
  %47 = add nsw i64 %wide.trip.count73, -1
  %min.iters.check = icmp ult i32 %42, 5
  br i1 %min.iters.check, label %.lr.ph54.preheader116, label %vector.ph

.lr.ph54.preheader116:                            ; preds = %middle.block, %.lr.ph54.preheader
  %indvars.iv70.ph = phi i64 [ 1, %.lr.ph54.preheader ], [ %ind.end, %middle.block ]
  %.03251.ph = phi i64 [ 0, %.lr.ph54.preheader ], [ %59, %middle.block ]
  br label %.lr.ph54

vector.ph:                                        ; preds = %.lr.ph54.preheader
  %n.vec = and i64 %47, -4
  %ind.end = or disjoint i64 %n.vec, 1
  %broadcast.splatinsert = insertelement <2 x i32> poison, i32 %46, i64 0
  %broadcast.splat = shufflevector <2 x i32> %broadcast.splatinsert, <2 x i32> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %56, %vector.body ]
  %vec.phi90 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %57, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %48 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %offset.idx
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %wide.load = load <2 x i32>, ptr %48, align 4, !tbaa !5
  %wide.load91 = load <2 x i32>, ptr %49, align 4, !tbaa !5
  %50 = sub nsw <2 x i32> %broadcast.splat, %wide.load
  %51 = sub nsw <2 x i32> %broadcast.splat, %wide.load91
  %52 = tail call <2 x i32> @llvm.abs.v2i32(<2 x i32> %50, i1 true)
  %53 = tail call <2 x i32> @llvm.abs.v2i32(<2 x i32> %51, i1 true)
  %54 = zext nneg <2 x i32> %52 to <2 x i64>
  %55 = zext nneg <2 x i32> %53 to <2 x i64>
  %56 = add <2 x i64> %vec.phi, %54
  %57 = add <2 x i64> %vec.phi90, %55
  %index.next = add nuw i64 %index, 4
  %58 = icmp eq i64 %index.next, %n.vec
  br i1 %58, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %57, %56
  %59 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %47, %n.vec
  br i1 %cmp.n, label %.loopexit42thread-pre-split, label %.lr.ph54.preheader116

.lr.ph48:                                         ; preds = %.lr.ph48, %.lr.ph48.preheader.new
  %60 = phi i32 [ %.pre, %.lr.ph48.preheader.new ], [ %69, %.lr.ph48 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph48.preheader.new ], [ %indvars.iv.next.1, %.lr.ph48 ]
  %niter = phi i64 [ 0, %.lr.ph48.preheader.new ], [ %niter.next.1, %.lr.ph48 ]
  %61 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = sub nsw i32 %62, %14
  store i32 %63, ptr %61, align 4, !tbaa !5
  %64 = add nsw i32 %60, %63
  %65 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %indvars.iv
  store i32 %64, ptr %65, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %66 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv.next
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sub nsw i32 %67, %14
  store i32 %68, ptr %66, align 4, !tbaa !5
  %69 = add nsw i32 %64, %68
  %70 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %indvars.iv.next
  store i32 %69, ptr %70, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge49.loopexit.unr-lcssa, label %.lr.ph48, !llvm.loop !14

.lr.ph54:                                         ; preds = %.lr.ph54.preheader116, %.lr.ph54
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph54 ], [ %indvars.iv70.ph, %.lr.ph54.preheader116 ]
  %.03251 = phi i64 [ %76, %.lr.ph54 ], [ %.03251.ph, %.lr.ph54.preheader116 ]
  %71 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %indvars.iv70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = sub nsw i32 %46, %72
  %74 = tail call i32 @llvm.abs.i32(i32 %73, i1 true)
  %75 = zext nneg i32 %74 to i64
  %76 = add nuw nsw i64 %.03251, %75
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %.loopexit42thread-pre-split, label %.lr.ph54, !llvm.loop !15

.loopexit42thread-pre-split:                      ; preds = %.lr.ph54, %middle.block, %._crit_edge49
  %.1.ph = phi i64 [ 0, %._crit_edge49 ], [ %59, %middle.block ], [ %76, %.lr.ph54 ]
  %.pr = load i32, ptr @mOk, align 4, !tbaa !5
  br label %.loopexit42

.loopexit42:                                      ; preds = %.loopexit42thread-pre-split, %._crit_edge
  %77 = phi i32 [ %.pr, %.loopexit42thread-pre-split ], [ %13, %._crit_edge ]
  %.1 = phi i64 [ %.1.ph, %.loopexit42thread-pre-split ], [ 0, %._crit_edge ]
  %.not39 = icmp eq i32 %77, 0
  br i1 %.not39, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.loopexit42
  %78 = load i32, ptr @m, align 4, !tbaa !5
  %.not4056 = icmp slt i32 %78, 1
  br i1 %.not4056, label %._crit_edge59, label %.lr.ph58

.lr.ph58:                                         ; preds = %.preheader
  %79 = load i32, ptr @mAvg, align 4, !tbaa !5
  %.pre85 = load i32, ptr @s, align 16, !tbaa !5
  %80 = zext nneg i32 %78 to i64
  %xtraiter121 = and i64 %80, 1
  %81 = icmp eq i32 %78, 1
  br i1 %81, label %._crit_edge59.loopexit.unr-lcssa, label %.lr.ph58.new

.lr.ph58.new:                                     ; preds = %.lr.ph58
  %unroll_iter124 = and i64 %80, 2147483646
  br label %110

._crit_edge59.loopexit.unr-lcssa:                 ; preds = %110, %.lr.ph58
  %.unr122 = phi i32 [ %.pre85, %.lr.ph58 ], [ %120, %110 ]
  %indvars.iv75.unr = phi i64 [ 1, %.lr.ph58 ], [ %indvars.iv.next76.1, %110 ]
  %lcmp.mod123.not = icmp eq i64 %xtraiter121, 0
  br i1 %lcmp.mod123.not, label %._crit_edge59, label %._crit_edge59.loopexit.epilog-lcssa

._crit_edge59.loopexit.epilog-lcssa:              ; preds = %._crit_edge59.loopexit.unr-lcssa
  %82 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %indvars.iv75.unr
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sub nsw i32 %83, %79
  store i32 %84, ptr %82, align 4, !tbaa !5
  %85 = add nsw i32 %.unr122, %84
  %86 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %indvars.iv75.unr
  store i32 %85, ptr %86, align 4, !tbaa !5
  br label %._crit_edge59

._crit_edge59:                                    ; preds = %._crit_edge59.loopexit.epilog-lcssa, %._crit_edge59.loopexit.unr-lcssa, %.preheader
  %87 = sext i32 %78 to i64
  %88 = getelementptr inbounds i32, ptr @s, i64 %87
  %89 = getelementptr inbounds i8, ptr %88, i64 4
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @s, i64 4), ptr noundef nonnull %89)
  %90 = load i32, ptr @m, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  %92 = sdiv i32 %91, 2
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %.not4161 = icmp slt i32 %90, 1
  br i1 %.not4161, label %.loopexit, label %.lr.ph65.preheader

.lr.ph65.preheader:                               ; preds = %._crit_edge59
  %wide.trip.count83 = zext nneg i32 %91 to i64
  %96 = add nsw i64 %wide.trip.count83, -1
  %min.iters.check94 = icmp ult i32 %91, 5
  br i1 %min.iters.check94, label %.lr.ph65.preheader113, label %vector.ph95

.lr.ph65.preheader113:                            ; preds = %middle.block92, %.lr.ph65.preheader
  %indvars.iv80.ph = phi i64 [ 1, %.lr.ph65.preheader ], [ %ind.end98, %middle.block92 ]
  %.262.ph = phi i64 [ %.1, %.lr.ph65.preheader ], [ %109, %middle.block92 ]
  br label %.lr.ph65

vector.ph95:                                      ; preds = %.lr.ph65.preheader
  %n.vec97 = and i64 %96, -4
  %ind.end98 = or disjoint i64 %n.vec97, 1
  %97 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %.1, i64 0
  %broadcast.splatinsert107 = insertelement <2 x i32> poison, i32 %95, i64 0
  %broadcast.splat108 = shufflevector <2 x i32> %broadcast.splatinsert107, <2 x i32> poison, <2 x i32> zeroinitializer
  br label %vector.body100

vector.body100:                                   ; preds = %vector.body100, %vector.ph95
  %index101 = phi i64 [ 0, %vector.ph95 ], [ %index.next109, %vector.body100 ]
  %vec.phi102 = phi <2 x i64> [ %97, %vector.ph95 ], [ %106, %vector.body100 ]
  %vec.phi103 = phi <2 x i64> [ zeroinitializer, %vector.ph95 ], [ %107, %vector.body100 ]
  %offset.idx104 = or disjoint i64 %index101, 1
  %98 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %offset.idx104
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  %wide.load105 = load <2 x i32>, ptr %98, align 4, !tbaa !5
  %wide.load106 = load <2 x i32>, ptr %99, align 4, !tbaa !5
  %100 = sub nsw <2 x i32> %broadcast.splat108, %wide.load105
  %101 = sub nsw <2 x i32> %broadcast.splat108, %wide.load106
  %102 = tail call <2 x i32> @llvm.abs.v2i32(<2 x i32> %100, i1 true)
  %103 = tail call <2 x i32> @llvm.abs.v2i32(<2 x i32> %101, i1 true)
  %104 = zext nneg <2 x i32> %102 to <2 x i64>
  %105 = zext nneg <2 x i32> %103 to <2 x i64>
  %106 = add <2 x i64> %vec.phi102, %104
  %107 = add <2 x i64> %vec.phi103, %105
  %index.next109 = add nuw i64 %index101, 4
  %108 = icmp eq i64 %index.next109, %n.vec97
  br i1 %108, label %middle.block92, label %vector.body100, !llvm.loop !16

middle.block92:                                   ; preds = %vector.body100
  %bin.rdx110 = add <2 x i64> %107, %106
  %109 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx110)
  %cmp.n111 = icmp eq i64 %96, %n.vec97
  br i1 %cmp.n111, label %.loopexit, label %.lr.ph65.preheader113

110:                                              ; preds = %110, %.lr.ph58.new
  %111 = phi i32 [ %.pre85, %.lr.ph58.new ], [ %120, %110 ]
  %indvars.iv75 = phi i64 [ 1, %.lr.ph58.new ], [ %indvars.iv.next76.1, %110 ]
  %niter125 = phi i64 [ 0, %.lr.ph58.new ], [ %niter125.next.1, %110 ]
  %112 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %indvars.iv75
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = sub nsw i32 %113, %79
  store i32 %114, ptr %112, align 4, !tbaa !5
  %115 = add nsw i32 %111, %114
  %116 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %indvars.iv75
  store i32 %115, ptr %116, align 4, !tbaa !5
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %117 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %indvars.iv.next76
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sub nsw i32 %118, %79
  store i32 %119, ptr %117, align 4, !tbaa !5
  %120 = add nsw i32 %115, %119
  %121 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %indvars.iv.next76
  store i32 %120, ptr %121, align 4, !tbaa !5
  %indvars.iv.next76.1 = add nuw nsw i64 %indvars.iv75, 2
  %niter125.next.1 = add i64 %niter125, 2
  %niter125.ncmp.1 = icmp eq i64 %niter125.next.1, %unroll_iter124
  br i1 %niter125.ncmp.1, label %._crit_edge59.loopexit.unr-lcssa, label %110, !llvm.loop !17

.lr.ph65:                                         ; preds = %.lr.ph65.preheader113, %.lr.ph65
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph65 ], [ %indvars.iv80.ph, %.lr.ph65.preheader113 ]
  %.262 = phi i64 [ %127, %.lr.ph65 ], [ %.262.ph, %.lr.ph65.preheader113 ]
  %122 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %indvars.iv80
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = sub nsw i32 %95, %123
  %125 = tail call i32 @llvm.abs.i32(i32 %124, i1 true)
  %126 = zext nneg i32 %125 to i64
  %127 = add nsw i64 %.262, %126
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83
  br i1 %exitcond84.not, label %.loopexit, label %.lr.ph65, !llvm.loop !18

.loopexit:                                        ; preds = %.lr.ph65, %middle.block92, %._crit_edge59, %.loopexit42
  %.3 = phi i64 [ %.1, %.loopexit42 ], [ %.1, %._crit_edge59 ], [ %109, %middle.block92 ], [ %127, %.lr.ph65 ]
  %128 = load i32, ptr @nOk, align 4, !tbaa !5
  %129 = icmp ne i32 %128, 0
  %130 = load i32, ptr @mOk, align 4
  %131 = icmp ne i32 %130, 0
  %or.cond = select i1 %129, i1 true, i1 %131
  br i1 %or.cond, label %132, label %136

132:                                              ; preds = %.loopexit
  %.str.1..str.2 = select i1 %131, ptr @.str, ptr @.str.1
  %.str.1.sink = select i1 %129, ptr %.str.1..str.2, ptr @.str.2
  %133 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.1.sink)
  %134 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %135 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %134, i64 noundef %.3)
  br label %138

136:                                              ; preds = %.loopexit
  %137 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  br label %138

138:                                              ; preds = %136, %132
  %.sink = phi ptr [ %137, %136 ], [ %135, %132 ]
  %139 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #4 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 #4 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)) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x i32> @llvm.abs.v2i32(<2 x i32>, i1 immarg) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #5

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

!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, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !13, !12}
!16 = distinct !{!16, !10, !12, !13}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !13, !12}


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