; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2015.12 (cardgame)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [25000 x i32], align 16
  %4 = alloca [25000 x i32], align 16
  %5 = alloca [25000 x i32], align 16
  %6 = alloca [25000 x i32], align 16
  %7 = alloca [100010 x i8], align 16
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::greater", align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = load ptr, ptr @stdin, align 8, !tbaa !8
  %25 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %24)
  %26 = load ptr, ptr @stdout, align 8, !tbaa !8
  %27 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 100000, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 100000, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 100000, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 100000, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 100010, ptr %7) #6
  %29 = getelementptr inbounds [100010 x i8], ptr %7, i64 0, i64 0
  %30 = getelementptr inbounds [100010 x i8], ptr %7, i64 0, i64 0
  %31 = getelementptr inbounds i8, ptr %30, i64 100010
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  store i8 0, ptr %8, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %29, ptr noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !13
  br label %32

32:                                               ; preds = %49, %0
  %33 = load i32, ptr %9, align 4, !tbaa !13
  %34 = load i32, ptr %2, align 4, !tbaa !13
  %35 = sdiv i32 %34, 2
  %36 = icmp slt i32 %33, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %32
  %39 = load i32, ptr %9, align 4, !tbaa !13
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 %40
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %43 = load i32, ptr %9, align 4, !tbaa !13
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !13
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100010 x i8], ptr %7, i64 0, i64 %47
  store i8 1, ptr %48, align 1, !tbaa !11
  br label %49

49:                                               ; preds = %38
  %50 = load i32, ptr %9, align 4, !tbaa !13
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %9, align 4, !tbaa !13
  br label %32, !llvm.loop !15

52:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !13
  br label %53

53:                                               ; preds = %70, %52
  %54 = load i32, ptr %10, align 4, !tbaa !13
  %55 = load i32, ptr %2, align 4, !tbaa !13
  %56 = sdiv i32 %55, 2
  %57 = icmp slt i32 %54, %56
  br i1 %57, label %59, label %58

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

59:                                               ; preds = %53
  %60 = load i32, ptr %10, align 4, !tbaa !13
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %61
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %62)
  %64 = load i32, ptr %10, align 4, !tbaa !13
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100010 x i8], ptr %7, i64 0, i64 %68
  store i8 1, ptr %69, align 1, !tbaa !11
  br label %70

70:                                               ; preds = %59
  %71 = load i32, ptr %10, align 4, !tbaa !13
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %10, align 4, !tbaa !13
  br label %53, !llvm.loop !17

73:                                               ; preds = %58
  %74 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 0
  %75 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 0
  %76 = load i32, ptr %2, align 4, !tbaa !13
  %77 = sdiv i32 %76, 2
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr %75, i64 %78
  call void @_ZSt4sortIPiSt7greaterIiEEvT_S3_T0_(ptr noundef %74, ptr noundef %79)
  %80 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 0
  %81 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 0
  %82 = load i32, ptr %2, align 4, !tbaa !13
  %83 = sdiv i32 %82, 2
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %81, i64 %84
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef %80, ptr noundef %85)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %86

86:                                               ; preds = %109, %73
  %87 = load i32, ptr %13, align 4, !tbaa !13
  %88 = load i32, ptr %2, align 4, !tbaa !13
  %89 = sdiv i32 %88, 2
  %90 = icmp slt i32 %87, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %112

92:                                               ; preds = %86
  br label %93

93:                                               ; preds = %99, %92
  %94 = load i32, ptr %12, align 4, !tbaa !13
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100010 x i8], ptr %7, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !11, !range !18, !noundef !19
  %98 = trunc i8 %97 to i1
  br i1 %98, label %99, label %102

99:                                               ; preds = %93
  %100 = load i32, ptr %12, align 4, !tbaa !13
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %12, align 4, !tbaa !13
  br label %93, !llvm.loop !20

102:                                              ; preds = %93
  %103 = load i32, ptr %12, align 4, !tbaa !13
  %104 = load i32, ptr %13, align 4, !tbaa !13
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [25000 x i32], ptr %6, i64 0, i64 %105
  store i32 %103, ptr %106, align 4, !tbaa !13
  %107 = load i32, ptr %12, align 4, !tbaa !13
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %12, align 4, !tbaa !13
  br label %109

109:                                              ; preds = %102
  %110 = load i32, ptr %13, align 4, !tbaa !13
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %13, align 4, !tbaa !13
  br label %86, !llvm.loop !21

112:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !13
  br label %113

113:                                              ; preds = %136, %112
  %114 = load i32, ptr %14, align 4, !tbaa !13
  %115 = load i32, ptr %2, align 4, !tbaa !13
  %116 = sdiv i32 %115, 2
  %117 = icmp slt i32 %114, %116
  br i1 %117, label %119, label %118

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

119:                                              ; preds = %113
  br label %120

120:                                              ; preds = %126, %119
  %121 = load i32, ptr %12, align 4, !tbaa !13
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100010 x i8], ptr %7, i64 0, i64 %122
  %124 = load i8, ptr %123, align 1, !tbaa !11, !range !18, !noundef !19
  %125 = trunc i8 %124 to i1
  br i1 %125, label %126, label %129

126:                                              ; preds = %120
  %127 = load i32, ptr %12, align 4, !tbaa !13
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %12, align 4, !tbaa !13
  br label %120, !llvm.loop !22

129:                                              ; preds = %120
  %130 = load i32, ptr %12, align 4, !tbaa !13
  %131 = load i32, ptr %14, align 4, !tbaa !13
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 %132
  store i32 %130, ptr %133, align 4, !tbaa !13
  %134 = load i32, ptr %12, align 4, !tbaa !13
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %12, align 4, !tbaa !13
  br label %136

136:                                              ; preds = %129
  %137 = load i32, ptr %14, align 4, !tbaa !13
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %14, align 4, !tbaa !13
  br label %113, !llvm.loop !23

139:                                              ; preds = %118
  %140 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 0
  %141 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 0
  %142 = load i32, ptr %2, align 4, !tbaa !13
  %143 = sdiv i32 %142, 2
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i32, ptr %141, i64 %144
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef %140, ptr noundef %145)
  store i32 0, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !13
  br label %146

146:                                              ; preds = %168, %139
  %147 = load i32, ptr %16, align 4, !tbaa !13
  %148 = load i32, ptr %2, align 4, !tbaa !13
  %149 = sdiv i32 %148, 2
  %150 = icmp slt i32 %147, %149
  br i1 %150, label %152, label %151

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

152:                                              ; preds = %146
  %153 = load i32, ptr %16, align 4, !tbaa !13
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !13
  %157 = load i32, ptr %12, align 4, !tbaa !13
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !13
  %161 = icmp sgt i32 %156, %160
  br i1 %161, label %162, label %163

162:                                              ; preds = %152
  br label %168

163:                                              ; preds = %152
  %164 = load i32, ptr %15, align 4, !tbaa !13
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %15, align 4, !tbaa !13
  %166 = load i32, ptr %12, align 4, !tbaa !13
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %12, align 4, !tbaa !13
  br label %168

168:                                              ; preds = %163, %162
  %169 = load i32, ptr %16, align 4, !tbaa !13
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %16, align 4, !tbaa !13
  br label %146, !llvm.loop !24

171:                                              ; preds = %151
  store i32 0, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !13
  br label %172

172:                                              ; preds = %194, %171
  %173 = load i32, ptr %17, align 4, !tbaa !13
  %174 = load i32, ptr %2, align 4, !tbaa !13
  %175 = sdiv i32 %174, 2
  %176 = icmp slt i32 %173, %175
  br i1 %176, label %178, label %177

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

178:                                              ; preds = %172
  %179 = load i32, ptr %17, align 4, !tbaa !13
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !13
  %183 = load i32, ptr %12, align 4, !tbaa !13
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [25000 x i32], ptr %6, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !13
  %187 = icmp slt i32 %182, %186
  br i1 %187, label %188, label %189

188:                                              ; preds = %178
  br label %194

189:                                              ; preds = %178
  %190 = load i32, ptr %15, align 4, !tbaa !13
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %15, align 4, !tbaa !13
  %192 = load i32, ptr %12, align 4, !tbaa !13
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %12, align 4, !tbaa !13
  br label %194

194:                                              ; preds = %189, %188
  %195 = load i32, ptr %17, align 4, !tbaa !13
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %17, align 4, !tbaa !13
  br label %172, !llvm.loop !25

197:                                              ; preds = %177
  %198 = load i32, ptr %15, align 4, !tbaa !13
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %198)
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %199, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 100010, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #4

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

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

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

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

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

; 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)) #4

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !10, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}


; 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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca [25000 x i32], align 16
  %3 = alloca [25000 x i32], align 16
  %4 = alloca [25000 x i32], align 16
  %5 = alloca [25000 x i32], align 16
  %6 = alloca [100010 x i8], align 16
  %7 = alloca i8, align 1
  %8 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  %14 = load ptr, ptr @stdin, align 8, !tbaa !8
  %15 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %14)
  %16 = load ptr, ptr @stdout, align 8, !tbaa !8
  %17 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 100000, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 100000, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 100000, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 100000, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 100010, ptr nonnull %6) #6
  %19 = getelementptr inbounds i8, ptr %6, i64 100010
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  store i8 0, ptr %7, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %6, ptr noundef nonnull %19, ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  %20 = load i32, ptr %1, align 4, !tbaa !13
  %21 = icmp sgt i32 %20, 1
  br i1 %21, label %.lr.ph, label %.preheader50.thread

.preheader50.thread:                              ; preds = %0
  %.pre = sdiv i32 %20, 2
  br label %.preheader50.._crit_edge_crit_edge

.preheader50:                                     ; preds = %.lr.ph
  %22 = icmp sgt i32 %28, 1
  br i1 %22, label %.lr.ph55, label %.preheader50.._crit_edge_crit_edge

.preheader50.._crit_edge_crit_edge:               ; preds = %.preheader50.thread, %.preheader50
  %.pre-phi108 = phi i32 [ %.pre, %.preheader50.thread ], [ %29, %.preheader50 ]
  %.pre105 = sext i32 %.pre-phi108 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %23 = getelementptr inbounds [25000 x i32], ptr %2, i64 0, i64 %indvars.iv
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %25 = load i32, ptr %23, align 4, !tbaa !13
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100010 x i8], ptr %6, i64 0, i64 %26
  store i8 1, ptr %27, align 1, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = load i32, ptr %1, align 4, !tbaa !13
  %29 = sdiv i32 %28, 2
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next, %30
  br i1 %31, label %.lr.ph, label %.preheader50, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph55, %.preheader50.._crit_edge_crit_edge
  %.pre-phi106 = phi i64 [ %.pre105, %.preheader50.._crit_edge_crit_edge ], [ %49, %.lr.ph55 ]
  %32 = getelementptr inbounds i32, ptr %2, i64 %.pre-phi106
  call void @_ZSt4sortIPiSt7greaterIiEEvT_S3_T0_(ptr noundef nonnull %2, ptr noundef nonnull %32)
  %33 = load i32, ptr %1, align 4, !tbaa !13
  %34 = sdiv i32 %33, 2
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %3, i64 %35
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull %3, ptr noundef nonnull %36)
  %37 = load i32, ptr %1, align 4, !tbaa !13
  %38 = sdiv i32 %37, 2
  %39 = icmp sgt i32 %37, 1
  br i1 %39, label %.preheader49.preheader, label %._crit_edge62

.preheader49.preheader:                           ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %38 to i64
  %40 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 1
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %.preheader48.unr-lcssa, label %.preheader49.preheader.new

.preheader49.preheader.new:                       ; preds = %.preheader49.preheader
  %unroll_iter = and i64 %wide.trip.count, 1073741822
  br label %.preheader49

.lr.ph55:                                         ; preds = %.preheader50, %.lr.ph55
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %.lr.ph55 ], [ 0, %.preheader50 ]
  %42 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 %indvars.iv78
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %44 = load i32, ptr %42, align 4, !tbaa !13
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100010 x i8], ptr %6, i64 0, i64 %45
  store i8 1, ptr %46, align 1, !tbaa !11
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %47 = load i32, ptr %1, align 4, !tbaa !13
  %48 = sdiv i32 %47, 2
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next79, %49
  br i1 %50, label %.lr.ph55, label %._crit_edge, !llvm.loop !17

.preheader49:                                     ; preds = %73, %.preheader49.preheader.new
  %indvars.iv84 = phi i64 [ 0, %.preheader49.preheader.new ], [ %indvars.iv.next85.1, %73 ]
  %.03956 = phi i32 [ 1, %.preheader49.preheader.new ], [ %76, %73 ]
  %niter = phi i64 [ 0, %.preheader49.preheader.new ], [ %niter.next.1, %73 ]
  %51 = sext i32 %.03956 to i64
  br label %61

.preheader48.unr-lcssa:                           ; preds = %73, %.preheader49.preheader
  %.lcssa.ph = phi i32 [ poison, %.preheader49.preheader ], [ %76, %73 ]
  %indvars.iv84.unr = phi i64 [ 0, %.preheader49.preheader ], [ %indvars.iv.next85.1, %73 ]
  %.03956.unr = phi i32 [ 1, %.preheader49.preheader ], [ %76, %73 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader48, label %.preheader49.epil

.preheader49.epil:                                ; preds = %.preheader48.unr-lcssa
  %52 = sext i32 %.03956.unr to i64
  br label %53

53:                                               ; preds = %53, %.preheader49.epil
  %indvars.iv81.epil = phi i64 [ %indvars.iv.next82.epil, %53 ], [ %52, %.preheader49.epil ]
  %54 = getelementptr inbounds [100010 x i8], ptr %6, i64 0, i64 %indvars.iv81.epil
  %55 = load i8, ptr %54, align 1, !tbaa !11, !range !18, !noundef !19
  %56 = trunc nuw i8 %55 to i1
  %indvars.iv.next82.epil = add nsw i64 %indvars.iv81.epil, 1
  br i1 %56, label %53, label %.preheader48.epilog-lcssa, !llvm.loop !20

.preheader48.epilog-lcssa:                        ; preds = %53
  %57 = trunc nsw i64 %indvars.iv81.epil to i32
  %58 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 %indvars.iv84.unr
  store i32 %57, ptr %58, align 4, !tbaa !13
  %59 = add nsw i32 %57, 1
  br label %.preheader48

.preheader48:                                     ; preds = %.preheader48.unr-lcssa, %.preheader48.epilog-lcssa
  %.lcssa = phi i32 [ %.lcssa.ph, %.preheader48.unr-lcssa ], [ %59, %.preheader48.epilog-lcssa ]
  br i1 %39, label %.preheader47.preheader, label %._crit_edge62

.preheader47.preheader:                           ; preds = %.preheader48
  %xtraiter121 = and i64 %wide.trip.count, 1
  %60 = icmp eq i64 %40, 0
  br i1 %60, label %._crit_edge62.loopexit.unr-lcssa, label %.preheader47.preheader.new

.preheader47.preheader.new:                       ; preds = %.preheader47.preheader
  %unroll_iter123 = and i64 %wide.trip.count, 1073741822
  br label %.preheader47

61:                                               ; preds = %61, %.preheader49
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %61 ], [ %51, %.preheader49 ]
  %62 = getelementptr inbounds [100010 x i8], ptr %6, i64 0, i64 %indvars.iv81
  %63 = load i8, ptr %62, align 1, !tbaa !11, !range !18, !noundef !19
  %64 = trunc nuw i8 %63 to i1
  %indvars.iv.next82 = add nsw i64 %indvars.iv81, 1
  br i1 %64, label %61, label %.preheader49.1, !llvm.loop !20

.preheader49.1:                                   ; preds = %61
  %65 = trunc nsw i64 %indvars.iv81 to i32
  %66 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 %indvars.iv84
  store i32 %65, ptr %66, align 8, !tbaa !13
  %indvars.iv.next85 = or disjoint i64 %indvars.iv84, 1
  %67 = shl i64 %indvars.iv81, 32
  %sext = add i64 %67, 4294967296
  %68 = ashr exact i64 %sext, 32
  br label %69

69:                                               ; preds = %69, %.preheader49.1
  %indvars.iv81.1 = phi i64 [ %indvars.iv.next82.1, %69 ], [ %68, %.preheader49.1 ]
  %70 = getelementptr inbounds [100010 x i8], ptr %6, i64 0, i64 %indvars.iv81.1
  %71 = load i8, ptr %70, align 1, !tbaa !11, !range !18, !noundef !19
  %72 = trunc nuw i8 %71 to i1
  %indvars.iv.next82.1 = add nsw i64 %indvars.iv81.1, 1
  br i1 %72, label %69, label %73, !llvm.loop !20

73:                                               ; preds = %69
  %74 = trunc nsw i64 %indvars.iv81.1 to i32
  %75 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 %indvars.iv.next85
  store i32 %74, ptr %75, align 4, !tbaa !13
  %76 = add nsw i32 %74, 1
  %indvars.iv.next85.1 = add nuw nsw i64 %indvars.iv84, 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 %.preheader48.unr-lcssa, label %.preheader49, !llvm.loop !21

.preheader47:                                     ; preds = %104, %.preheader47.preheader.new
  %indvars.iv90 = phi i64 [ 0, %.preheader47.preheader.new ], [ %indvars.iv.next91.1, %104 ]
  %.24160 = phi i32 [ %.lcssa, %.preheader47.preheader.new ], [ %107, %104 ]
  %niter124 = phi i64 [ 0, %.preheader47.preheader.new ], [ %niter124.next.1, %104 ]
  %77 = sext i32 %.24160 to i64
  br label %92

._crit_edge62.loopexit.unr-lcssa:                 ; preds = %104, %.preheader47.preheader
  %indvars.iv90.unr = phi i64 [ 0, %.preheader47.preheader ], [ %indvars.iv.next91.1, %104 ]
  %.24160.unr = phi i32 [ %.lcssa, %.preheader47.preheader ], [ %107, %104 ]
  %lcmp.mod122.not = icmp eq i64 %xtraiter121, 0
  br i1 %lcmp.mod122.not, label %._crit_edge62, label %.preheader47.epil

.preheader47.epil:                                ; preds = %._crit_edge62.loopexit.unr-lcssa
  %78 = sext i32 %.24160.unr to i64
  br label %79

79:                                               ; preds = %79, %.preheader47.epil
  %indvars.iv87.epil = phi i64 [ %indvars.iv.next88.epil, %79 ], [ %78, %.preheader47.epil ]
  %80 = getelementptr inbounds [100010 x i8], ptr %6, i64 0, i64 %indvars.iv87.epil
  %81 = load i8, ptr %80, align 1, !tbaa !11, !range !18, !noundef !19
  %82 = trunc nuw i8 %81 to i1
  %indvars.iv.next88.epil = add nsw i64 %indvars.iv87.epil, 1
  br i1 %82, label %79, label %._crit_edge62.loopexit.epilog-lcssa, !llvm.loop !22

._crit_edge62.loopexit.epilog-lcssa:              ; preds = %79
  %83 = trunc nsw i64 %indvars.iv87.epil to i32
  %84 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %indvars.iv90.unr
  store i32 %83, ptr %84, align 4, !tbaa !13
  br label %._crit_edge62

._crit_edge62:                                    ; preds = %._crit_edge62.loopexit.epilog-lcssa, %._crit_edge62.loopexit.unr-lcssa, %._crit_edge, %.preheader48
  %85 = sext i32 %38 to i64
  %86 = getelementptr inbounds i32, ptr %4, i64 %85
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull %4, ptr noundef nonnull %86)
  %87 = load i32, ptr %1, align 4, !tbaa !13
  %88 = sdiv i32 %87, 2
  %89 = icmp sgt i32 %87, 1
  br i1 %89, label %.lr.ph67.preheader, label %._crit_edge74

.lr.ph67.preheader:                               ; preds = %._crit_edge62
  %wide.trip.count98 = zext nneg i32 %88 to i64
  %90 = add nsw i64 %wide.trip.count98, -1
  %xtraiter125 = and i64 %wide.trip.count98, 1
  %91 = icmp eq i64 %90, 0
  br i1 %91, label %.preheader.unr-lcssa, label %.lr.ph67.preheader.new

.lr.ph67.preheader.new:                           ; preds = %.lr.ph67.preheader
  %unroll_iter128 = and i64 %wide.trip.count98, 1073741822
  br label %.lr.ph67

92:                                               ; preds = %92, %.preheader47
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %92 ], [ %77, %.preheader47 ]
  %93 = getelementptr inbounds [100010 x i8], ptr %6, i64 0, i64 %indvars.iv87
  %94 = load i8, ptr %93, align 1, !tbaa !11, !range !18, !noundef !19
  %95 = trunc nuw i8 %94 to i1
  %indvars.iv.next88 = add nsw i64 %indvars.iv87, 1
  br i1 %95, label %92, label %.preheader47.1, !llvm.loop !22

.preheader47.1:                                   ; preds = %92
  %96 = trunc nsw i64 %indvars.iv87 to i32
  %97 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %indvars.iv90
  store i32 %96, ptr %97, align 8, !tbaa !13
  %indvars.iv.next91 = or disjoint i64 %indvars.iv90, 1
  %98 = shl i64 %indvars.iv87, 32
  %sext135 = add i64 %98, 4294967296
  %99 = ashr exact i64 %sext135, 32
  br label %100

100:                                              ; preds = %100, %.preheader47.1
  %indvars.iv87.1 = phi i64 [ %indvars.iv.next88.1, %100 ], [ %99, %.preheader47.1 ]
  %101 = getelementptr inbounds [100010 x i8], ptr %6, i64 0, i64 %indvars.iv87.1
  %102 = load i8, ptr %101, align 1, !tbaa !11, !range !18, !noundef !19
  %103 = trunc nuw i8 %102 to i1
  %indvars.iv.next88.1 = add nsw i64 %indvars.iv87.1, 1
  br i1 %103, label %100, label %104, !llvm.loop !22

104:                                              ; preds = %100
  %105 = trunc nsw i64 %indvars.iv87.1 to i32
  %106 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %indvars.iv.next91
  store i32 %105, ptr %106, align 4, !tbaa !13
  %107 = add nsw i32 %105, 1
  %indvars.iv.next91.1 = add nuw nsw i64 %indvars.iv90, 2
  %niter124.next.1 = add i64 %niter124, 2
  %niter124.ncmp.1 = icmp eq i64 %niter124.next.1, %unroll_iter123
  br i1 %niter124.ncmp.1, label %._crit_edge62.loopexit.unr-lcssa, label %.preheader47, !llvm.loop !23

.preheader.unr-lcssa.loopexit:                    ; preds = %.lr.ph67
  %108 = zext nneg i32 %.5.1 to i64
  br label %.preheader.unr-lcssa

.preheader.unr-lcssa:                             ; preds = %.preheader.unr-lcssa.loopexit, %.lr.ph67.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph67.preheader ], [ %.1.1, %.preheader.unr-lcssa.loopexit ]
  %indvars.iv95.unr = phi i64 [ 0, %.lr.ph67.preheader ], [ %indvars.iv.next96.1, %.preheader.unr-lcssa.loopexit ]
  %.03664.unr = phi i32 [ 0, %.lr.ph67.preheader ], [ %.1.1, %.preheader.unr-lcssa.loopexit ]
  %.463.unr = phi i64 [ 0, %.lr.ph67.preheader ], [ %108, %.preheader.unr-lcssa.loopexit ]
  %lcmp.mod126.not = icmp eq i64 %xtraiter125, 0
  br i1 %lcmp.mod126.not, label %.preheader, label %.lr.ph67.epil

.lr.ph67.epil:                                    ; preds = %.preheader.unr-lcssa
  %109 = getelementptr inbounds [25000 x i32], ptr %2, i64 0, i64 %indvars.iv95.unr
  %110 = load i32, ptr %109, align 4, !tbaa !13
  %111 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %.463.unr
  %112 = load i32, ptr %111, align 4, !tbaa !13
  %113 = icmp sle i32 %110, %112
  %114 = zext i1 %113 to i32
  %.1.epil = add nuw nsw i32 %.03664.unr, %114
  br label %.preheader

.preheader:                                       ; preds = %.preheader.unr-lcssa, %.lr.ph67.epil
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %.preheader.unr-lcssa ], [ %.1.epil, %.lr.ph67.epil ]
  br i1 %89, label %.lr.ph73.preheader, label %._crit_edge74

.lr.ph73.preheader:                               ; preds = %.preheader
  %wide.trip.count103 = zext nneg i32 %88 to i64
  %xtraiter130 = and i64 %wide.trip.count103, 1
  %115 = icmp eq i64 %90, 0
  br i1 %115, label %._crit_edge74.loopexit.unr-lcssa, label %.lr.ph73.preheader.new

.lr.ph73.preheader.new:                           ; preds = %.lr.ph73.preheader
  %unroll_iter133 = and i64 %wide.trip.count103, 1073741822
  br label %.lr.ph73

.lr.ph67:                                         ; preds = %.lr.ph67, %.lr.ph67.preheader.new
  %indvars.iv95 = phi i64 [ 0, %.lr.ph67.preheader.new ], [ %indvars.iv.next96.1, %.lr.ph67 ]
  %.03664 = phi i32 [ 0, %.lr.ph67.preheader.new ], [ %.1.1, %.lr.ph67 ]
  %.463 = phi i32 [ 0, %.lr.ph67.preheader.new ], [ %.5.1, %.lr.ph67 ]
  %niter129 = phi i64 [ 0, %.lr.ph67.preheader.new ], [ %niter129.next.1, %.lr.ph67 ]
  %116 = getelementptr inbounds [25000 x i32], ptr %2, i64 0, i64 %indvars.iv95
  %117 = load i32, ptr %116, align 8, !tbaa !13
  %118 = zext nneg i32 %.463 to i64
  %119 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !13
  %121 = icmp sle i32 %117, %120
  %122 = zext i1 %121 to i32
  %.5 = add nuw nsw i32 %.463, %122
  %.1 = add nuw nsw i32 %.03664, %122
  %indvars.iv.next96 = or disjoint i64 %indvars.iv95, 1
  %123 = getelementptr inbounds [25000 x i32], ptr %2, i64 0, i64 %indvars.iv.next96
  %124 = load i32, ptr %123, align 4, !tbaa !13
  %125 = zext nneg i32 %.5 to i64
  %126 = getelementptr inbounds [25000 x i32], ptr %4, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !13
  %128 = icmp sle i32 %124, %127
  %129 = zext i1 %128 to i32
  %.5.1 = add nuw nsw i32 %.5, %129
  %.1.1 = add nuw nsw i32 %.1, %129
  %indvars.iv.next96.1 = add nuw nsw i64 %indvars.iv95, 2
  %niter129.next.1 = add i64 %niter129, 2
  %niter129.ncmp.1 = icmp eq i64 %niter129.next.1, %unroll_iter128
  br i1 %niter129.ncmp.1, label %.preheader.unr-lcssa.loopexit, label %.lr.ph67, !llvm.loop !24

._crit_edge74.loopexit.unr-lcssa.loopexit:        ; preds = %.lr.ph73
  %130 = zext nneg i32 %.7.1 to i64
  br label %._crit_edge74.loopexit.unr-lcssa

._crit_edge74.loopexit.unr-lcssa:                 ; preds = %._crit_edge74.loopexit.unr-lcssa.loopexit, %.lr.ph73.preheader
  %.3.lcssa.ph = phi i32 [ poison, %.lr.ph73.preheader ], [ %.3.1, %._crit_edge74.loopexit.unr-lcssa.loopexit ]
  %indvars.iv100.unr = phi i64 [ 0, %.lr.ph73.preheader ], [ %indvars.iv.next101.1, %._crit_edge74.loopexit.unr-lcssa.loopexit ]
  %.271.unr = phi i32 [ %.1.lcssa, %.lr.ph73.preheader ], [ %.3.1, %._crit_edge74.loopexit.unr-lcssa.loopexit ]
  %.670.unr = phi i64 [ 0, %.lr.ph73.preheader ], [ %130, %._crit_edge74.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod131.not = icmp eq i64 %xtraiter130, 0
  br i1 %lcmp.mod131.not, label %._crit_edge74, label %.lr.ph73.epil

.lr.ph73.epil:                                    ; preds = %._crit_edge74.loopexit.unr-lcssa
  %131 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 %indvars.iv100.unr
  %132 = load i32, ptr %131, align 4, !tbaa !13
  %133 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 %.670.unr
  %134 = load i32, ptr %133, align 4, !tbaa !13
  %135 = icmp sge i32 %132, %134
  %136 = zext i1 %135 to i32
  %.3.epil = add nuw nsw i32 %.271.unr, %136
  br label %._crit_edge74

._crit_edge74:                                    ; preds = %.lr.ph73.epil, %._crit_edge74.loopexit.unr-lcssa, %._crit_edge62, %.preheader
  %.2.lcssa = phi i32 [ %.1.lcssa, %.preheader ], [ 0, %._crit_edge62 ], [ %.3.lcssa.ph, %._crit_edge74.loopexit.unr-lcssa ], [ %.3.epil, %.lr.ph73.epil ]
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.2.lcssa)
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 100010, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph73:                                         ; preds = %.lr.ph73, %.lr.ph73.preheader.new
  %indvars.iv100 = phi i64 [ 0, %.lr.ph73.preheader.new ], [ %indvars.iv.next101.1, %.lr.ph73 ]
  %.271 = phi i32 [ %.1.lcssa, %.lr.ph73.preheader.new ], [ %.3.1, %.lr.ph73 ]
  %.670 = phi i32 [ 0, %.lr.ph73.preheader.new ], [ %.7.1, %.lr.ph73 ]
  %niter134 = phi i64 [ 0, %.lr.ph73.preheader.new ], [ %niter134.next.1, %.lr.ph73 ]
  %139 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 %indvars.iv100
  %140 = load i32, ptr %139, align 8, !tbaa !13
  %141 = zext nneg i32 %.670 to i64
  %142 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !13
  %144 = icmp sge i32 %140, %143
  %145 = zext i1 %144 to i32
  %.7 = add nuw nsw i32 %.670, %145
  %.3 = add nuw nsw i32 %.271, %145
  %indvars.iv.next101 = or disjoint i64 %indvars.iv100, 1
  %146 = getelementptr inbounds [25000 x i32], ptr %3, i64 0, i64 %indvars.iv.next101
  %147 = load i32, ptr %146, align 4, !tbaa !13
  %148 = zext nneg i32 %.7 to i64
  %149 = getelementptr inbounds [25000 x i32], ptr %5, i64 0, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !13
  %151 = icmp sge i32 %147, %150
  %152 = zext i1 %151 to i32
  %.7.1 = add nuw nsw i32 %.7, %152
  %.3.1 = add nuw nsw i32 %.3, %152
  %indvars.iv.next101.1 = add nuw nsw i64 %indvars.iv100, 2
  %niter134.next.1 = add i64 %niter134, 2
  %niter134.ncmp.1 = icmp eq i64 %niter134.next.1, %unroll_iter133
  br i1 %niter134.ncmp.1, label %._crit_edge74.loopexit.unr-lcssa.loopexit, label %.lr.ph73, !llvm.loop !25
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr 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) #3

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 @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

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

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

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

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !10, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}


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