; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2018.01 (lifeguards)

; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"struct.std::array" = type { [100000 x %"struct.std::pair"] }
%"struct.std::pair" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::basic_ifstream", align 8
  %3 = alloca %"class.std::basic_ofstream", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::array", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::pair", align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i8, align 1
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr %2) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %2, ptr noundef @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr %3) #8
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef @.str.1, i32 noundef 16)
          to label %35 unwind label %44

35:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 800000, ptr %7) #8
  invoke void @_ZNSt5arrayISt4pairIiiELm100000EEC2Ev(ptr noundef nonnull align 4 dereferenceable(800000) %7)
          to label %36 unwind label %48

36:                                               ; preds = %35
  %37 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %38 unwind label %48

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %63, %38
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %52, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %75

44:                                               ; preds = %0
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %4, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %5, align 4
  br label %317

48:                                               ; preds = %75, %36, %35
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %4, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %5, align 4
  br label %316

52:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %53 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %54 unwind label %66

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %56 unwind label %66

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %57 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %58 unwind label %70

58:                                               ; preds = %56
  store i64 %57, ptr %11, align 4
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %60) #8
  %62 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %61, ptr noundef nonnull align 4 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %63

63:                                               ; preds = %58
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %8, align 4, !tbaa !5
  br label %39, !llvm.loop !9

66:                                               ; preds = %54, %52
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %4, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %5, align 4
  br label %74

70:                                               ; preds = %56
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %4, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %74

74:                                               ; preds = %70, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %316

75:                                               ; preds = %43
  %76 = call noundef ptr @_ZNSt5arrayISt4pairIiiELm100000EE5beginEv(ptr noundef nonnull align 4 dereferenceable(800000) %7) #9
  %77 = call noundef ptr @_ZNSt5arrayISt4pairIiiELm100000EE5beginEv(ptr noundef nonnull align 4 dereferenceable(800000) %7) #9
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %"struct.std::pair", ptr %77, i64 %79
  invoke void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef %76, ptr noundef %80)
          to label %81 unwind label %48

81:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #8
  store i8 0, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %113, %81
  %83 = load i32, ptr %13, align 4, !tbaa !5
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 1
  %86 = icmp slt i32 %83, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %116

88:                                               ; preds = %82
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %90) #8
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %91) #8
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = load i32, ptr %13, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %96) #8
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %97) #8
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = icmp eq i32 %93, %99
  br i1 %100, label %101, label %112

101:                                              ; preds = %88
  store i8 1, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 -1, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 -1, ptr %16, align 4, !tbaa !5
  %102 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %103 unwind label %108

103:                                              ; preds = %101
  store i64 %102, ptr %14, align 4
  %104 = load i32, ptr %13, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %105) #8
  %107 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %106, ptr noundef nonnull align 4 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %112

108:                                              ; preds = %101
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %4, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %315

112:                                              ; preds = %103, %88
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %13, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %13, align 4, !tbaa !5
  br label %82, !llvm.loop !13

116:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %175, %116
  %118 = load i32, ptr %19, align 4, !tbaa !5
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %178

122:                                              ; preds = %117
  %123 = load i32, ptr %19, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %124) #8
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %125) #8
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = icmp eq i32 %127, -1
  br i1 %128, label %129, label %130

129:                                              ; preds = %122
  br label %175

130:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %131 = load i32, ptr %19, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %132) #8
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %133) #8
  %135 = load i32, ptr %134, align 4, !tbaa !5
  store i32 %135, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %136 = load i32, ptr %19, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %137) #8
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %138) #8
  %140 = load i32, ptr %139, align 4, !tbaa !5
  store i32 %140, ptr %21, align 4, !tbaa !5
  %141 = load i32, ptr %20, align 4, !tbaa !5
  %142 = load i32, ptr %17, align 4, !tbaa !5
  %143 = icmp sle i32 %141, %142
  br i1 %143, label %144, label %167

144:                                              ; preds = %130
  %145 = load i32, ptr %21, align 4, !tbaa !5
  %146 = load i32, ptr %17, align 4, !tbaa !5
  %147 = icmp sgt i32 %145, %146
  br i1 %147, label %148, label %155

148:                                              ; preds = %144
  %149 = load i32, ptr %21, align 4, !tbaa !5
  %150 = load i32, ptr %17, align 4, !tbaa !5
  %151 = sub nsw i32 %149, %150
  %152 = load i32, ptr %18, align 4, !tbaa !5
  %153 = add nsw i32 %152, %151
  store i32 %153, ptr %18, align 4, !tbaa !5
  %154 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %154, ptr %17, align 4, !tbaa !5
  br label %166

155:                                              ; preds = %144
  store i8 1, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 -1, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 -1, ptr %24, align 4, !tbaa !5
  %156 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %157 unwind label %162

157:                                              ; preds = %155
  store i64 %156, ptr %22, align 4
  %158 = load i32, ptr %19, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %159) #8
  %161 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %160, ptr noundef nonnull align 4 dereferenceable(8) %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %166

162:                                              ; preds = %155
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %4, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %314

166:                                              ; preds = %157, %148
  br label %174

167:                                              ; preds = %130
  %168 = load i32, ptr %21, align 4, !tbaa !5
  %169 = load i32, ptr %20, align 4, !tbaa !5
  %170 = sub nsw i32 %168, %169
  %171 = load i32, ptr %18, align 4, !tbaa !5
  %172 = add nsw i32 %171, %170
  store i32 %172, ptr %18, align 4, !tbaa !5
  %173 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %173, ptr %17, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %167, %166
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %175

175:                                              ; preds = %174, %129
  %176 = load i32, ptr %19, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %19, align 4, !tbaa !5
  br label %117, !llvm.loop !14

178:                                              ; preds = %121
  %179 = load i8, ptr %12, align 1, !tbaa !11, !range !15, !noundef !16
  %180 = trunc i8 %179 to i1
  br i1 %180, label %181, label %191

181:                                              ; preds = %178
  %182 = load i32, ptr %18, align 4, !tbaa !5
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %182)
          to label %184 unwind label %187

184:                                              ; preds = %181
  %185 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %183, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %186 unwind label %187

186:                                              ; preds = %184
  store i32 0, ptr %1, align 4
  store i32 1, ptr %25, align 4
  br label %312

187:                                              ; preds = %184, %181
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %4, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %5, align 4
  br label %314

191:                                              ; preds = %178
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 1000000000, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #8
  store i8 0, ptr %27, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %295, %191
  %193 = load i32, ptr %28, align 4, !tbaa !5
  %194 = load i32, ptr %6, align 4, !tbaa !5
  %195 = sub nsw i32 %194, 1
  %196 = icmp slt i32 %193, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %192
  store i32 11, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %299

198:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %199 = load i32, ptr %28, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %200) #8
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %201) #8
  %203 = load i32, ptr %202, align 4, !tbaa !5
  store i32 %203, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %204 = load i32, ptr %28, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %205) #8
  %207 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %206) #8
  %208 = load i32, ptr %207, align 4, !tbaa !5
  store i32 %208, ptr %30, align 4, !tbaa !5
  %209 = load i32, ptr %29, align 4, !tbaa !5
  %210 = load i32, ptr %17, align 4, !tbaa !5
  %211 = icmp sge i32 %209, %210
  br i1 %211, label %212, label %249

212:                                              ; preds = %198
  %213 = load i32, ptr %30, align 4, !tbaa !5
  %214 = load i32, ptr %28, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  %216 = sext i32 %215 to i64
  %217 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %216) #8
  %218 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %217) #8
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = icmp sle i32 %213, %219
  br i1 %220, label %221, label %232

221:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %222 = load i32, ptr %30, align 4, !tbaa !5
  %223 = load i32, ptr %29, align 4, !tbaa !5
  %224 = sub nsw i32 %222, %223
  store i32 %224, ptr %31, align 4, !tbaa !5
  %225 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %226 unwind label %228

226:                                              ; preds = %221
  %227 = load i32, ptr %225, align 4, !tbaa !5
  store i32 %227, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %248

228:                                              ; preds = %221
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %4, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %298

232:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %233 = load i32, ptr %28, align 4, !tbaa !5
  %234 = add nsw i32 %233, 1
  %235 = sext i32 %234 to i64
  %236 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %235) #8
  %237 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %236) #8
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = load i32, ptr %29, align 4, !tbaa !5
  %240 = sub nsw i32 %238, %239
  store i32 %240, ptr %32, align 4, !tbaa !5
  %241 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %242 unwind label %244

242:                                              ; preds = %232
  %243 = load i32, ptr %241, align 4, !tbaa !5
  store i32 %243, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %248

244:                                              ; preds = %232
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %4, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %298

248:                                              ; preds = %242, %226
  br label %286

249:                                              ; preds = %198
  %250 = load i32, ptr %30, align 4, !tbaa !5
  %251 = load i32, ptr %28, align 4, !tbaa !5
  %252 = add nsw i32 %251, 1
  %253 = sext i32 %252 to i64
  %254 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %253) #8
  %255 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %254) #8
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = icmp sle i32 %250, %256
  br i1 %257, label %258, label %269

258:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %259 = load i32, ptr %30, align 4, !tbaa !5
  %260 = load i32, ptr %17, align 4, !tbaa !5
  %261 = sub nsw i32 %259, %260
  store i32 %261, ptr %33, align 4, !tbaa !5
  %262 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %263 unwind label %265

263:                                              ; preds = %258
  %264 = load i32, ptr %262, align 4, !tbaa !5
  store i32 %264, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %285

265:                                              ; preds = %258
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %4, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %298

269:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %270 = load i32, ptr %28, align 4, !tbaa !5
  %271 = add nsw i32 %270, 1
  %272 = sext i32 %271 to i64
  %273 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %7, i64 noundef %272) #8
  %274 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %273) #8
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = load i32, ptr %17, align 4, !tbaa !5
  %277 = sub nsw i32 %275, %276
  store i32 %277, ptr %34, align 4, !tbaa !5
  %278 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %279 unwind label %281

279:                                              ; preds = %269
  %280 = load i32, ptr %278, align 4, !tbaa !5
  store i32 %280, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %285

281:                                              ; preds = %269
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %4, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %298

285:                                              ; preds = %279, %263
  br label %286

286:                                              ; preds = %285, %248
  %287 = load i32, ptr %26, align 4, !tbaa !5
  %288 = icmp slt i32 %287, 0
  br i1 %288, label %289, label %293

289:                                              ; preds = %286
  %290 = load i8, ptr %27, align 1, !tbaa !11, !range !15, !noundef !16
  %291 = trunc i8 %290 to i1
  br i1 %291, label %293, label %292

292:                                              ; preds = %289
  store i8 1, ptr %27, align 1, !tbaa !11
  br label %293

293:                                              ; preds = %292, %289, %286
  %294 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %294, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %295

295:                                              ; preds = %293
  %296 = load i32, ptr %28, align 4, !tbaa !5
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %28, align 4, !tbaa !5
  br label %192, !llvm.loop !17

298:                                              ; preds = %281, %265, %244, %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %311

299:                                              ; preds = %197
  %300 = load i32, ptr %18, align 4, !tbaa !5
  %301 = load i32, ptr %26, align 4, !tbaa !5
  %302 = sub nsw i32 %300, %301
  %303 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %302)
          to label %304 unwind label %307

304:                                              ; preds = %299
  %305 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %303, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %306 unwind label %307

306:                                              ; preds = %304
  store i32 0, ptr %1, align 4
  store i32 1, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %312

307:                                              ; preds = %304, %299
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %4, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %5, align 4
  br label %311

311:                                              ; preds = %307, %298
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %314

312:                                              ; preds = %306, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 800000, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #8
  %313 = load i32, ptr %1, align 4
  ret i32 %313

314:                                              ; preds = %311, %187, %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %315

315:                                              ; preds = %314, %108
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  br label %316

316:                                              ; preds = %315, %74, %48
  call void @llvm.lifetime.end.p0(i64 800000, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #8
  br label %317

317:                                              ; preds = %316, %44
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #8
  br label %318

318:                                              ; preds = %317
  %319 = load ptr, ptr %4, align 8
  %320 = load i32, ptr %5, align 4
  %321 = insertvalue { ptr, i32 } poison, ptr %319, 0
  %322 = insertvalue { ptr, i32 } %321, i32 %320, 1
  resume { ptr, i32 } %322
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt5arrayISt4pairIiiELm100000EEC2Ev(ptr noundef nonnull align 4 dereferenceable(800000)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000), i64 noundef) #5 align 2

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

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

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

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayISt4pairIiiELm100000EE5beginEv(ptr noundef nonnull align 4 dereferenceable(800000)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) #5

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { "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 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 #6 = { mustprogress nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind 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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"struct.std::array" = type { [100000 x %"struct.std::pair"] }
%"struct.std::pair" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::basic_ifstream", align 8
  %2 = alloca %"class.std::basic_ofstream", align 8
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::array", align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %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
  %18 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %1) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #8
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.1, i32 noundef 16)
          to label %19 unwind label %28

19:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %4) #8
  invoke void @_ZNSt5arrayISt4pairIiiELm100000EEC2Ev(ptr noundef nonnull align 4 dereferenceable(800000) %4)
          to label %20 unwind label %30

20:                                               ; preds = %19
  %21 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %.preheader91 unwind label %30

.preheader91:                                     ; preds = %20
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph, label %.preheader91.._crit_edge_crit_edge

.preheader91.._crit_edge_crit_edge:               ; preds = %.preheader91
  %.pre = sext i32 %22 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %37, %.preheader91.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader91.._crit_edge_crit_edge ], [ %41, %37 ]
  %24 = call noundef ptr @_ZNSt5arrayISt4pairIiiELm100000EE5beginEv(ptr noundef nonnull align 4 dereferenceable(800000) %4) #9
  %25 = getelementptr inbounds %"struct.std::pair", ptr %24, i64 %.pre-phi
  invoke void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef %24, ptr noundef %25)
          to label %.preheader90 unwind label %30

.preheader90:                                     ; preds = %._crit_edge
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 1
  br i1 %27, label %.lr.ph100, label %.preheader

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %174

30:                                               ; preds = %._crit_edge, %20, %19
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %173

.lr.ph:                                           ; preds = %.preheader91, %37
  %indvars.iv = phi i64 [ %indvars.iv.next, %37 ], [ 0, %.preheader91 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %33 unwind label %43

33:                                               ; preds = %.lr.ph
  %34 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %35 unwind label %43

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %36 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %37 unwind label %45

37:                                               ; preds = %35
  store i64 %36, ptr %7, align 8
  %38 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv) #8
  %39 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %38, ptr noundef nonnull align 4 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !9

43:                                               ; preds = %33, %.lr.ph
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %47

45:                                               ; preds = %35
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %47

47:                                               ; preds = %45, %43
  %.pn86 = phi { ptr, i32 } [ %46, %45 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %173

.preheader:                                       ; preds = %64, %.preheader90
  %48 = phi i32 [ %26, %.preheader90 ], [ %65, %64 ]
  %.070.lcssa = phi i1 [ false, %.preheader90 ], [ %.171, %64 ]
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph106.outer, label %._crit_edge107

.lr.ph100:                                        ; preds = %.preheader90, %64
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %64 ], [ 0, %.preheader90 ]
  %.07098 = phi i1 [ %.171, %64 ], [ false, %.preheader90 ]
  %50 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv118) #8
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %50) #8
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %53 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv.next119) #8
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %53) #8
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = icmp eq i32 %52, %55
  br i1 %56, label %57, label %64

57:                                               ; preds = %.lr.ph100
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 -1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 -1, ptr %10, align 4, !tbaa !5
  %58 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %59 unwind label %62

59:                                               ; preds = %57
  store i64 %58, ptr %8, align 8
  %60 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv118) #8
  %61 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %60, ptr noundef nonnull align 4 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %64

62:                                               ; preds = %57
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %173

64:                                               ; preds = %.lr.ph100, %59
  %.171 = phi i1 [ true, %59 ], [ %.07098, %.lr.ph100 ]
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = add nsw i32 %65, -1
  %67 = sext i32 %66 to i64
  %68 = icmp slt i64 %indvars.iv.next119, %67
  br i1 %68, label %.lr.ph100, label %.preheader, !llvm.loop !11

._crit_edge107.loopexit:                          ; preds = %.loopexit
  br i1 %.272102187, label %._crit_edge107.loopexit.thread, label %122

._crit_edge107:                                   ; preds = %.preheader
  br i1 %.070.lcssa, label %._crit_edge107.loopexit.thread, label %.thread

.thread:                                          ; preds = %._crit_edge107
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  store i32 1000000000, ptr %14, align 4, !tbaa !5
  br label %._crit_edge115

.lr.ph106:                                        ; preds = %.thread128.peel, %.thread128
  %indvars.iv120 = phi i64 [ %indvars.iv.next121132, %.thread128 ], [ %indvars.iv.next121132.peel, %.thread128.peel ]
  %69 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv120) #8
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %69) #8
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp eq i32 %71, -1
  br i1 %72, label %.loopexit, label %73

73:                                               ; preds = %.lr.ph106
  %74 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv120) #8
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %74) #8
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv120) #8
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %77) #8
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %.not82 = icmp sgt i32 %76, %.065103.ph
  br i1 %.not82, label %.loopexit207, label %80

80:                                               ; preds = %73
  %81 = icmp sgt i32 %79, %.065103.ph
  br i1 %81, label %.loopexit208, label %84

.loopexit208:                                     ; preds = %80, %103
  %.lcssa194 = phi i32 [ %102, %103 ], [ %79, %80 ]
  %indvars.iv120.lcssa189 = phi i64 [ %indvars.iv120.ph, %103 ], [ %indvars.iv120, %80 ]
  %.272102.lcssa184 = phi i1 [ %.272102.ph, %103 ], [ true, %80 ]
  %82 = sub i32 %.062104.ph, %.065103.ph
  %83 = add i32 %82, %.lcssa194
  br label %.loopexit

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 -1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  store i32 -1, ptr %13, align 4, !tbaa !5
  %85 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %.thread128 unwind label %.loopexit209

.loopexit209:                                     ; preds = %84
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %86

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

86:                                               ; preds = %.loopexit.split-lp, %.loopexit209
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit209 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %173

.loopexit207:                                     ; preds = %73, %96
  %.lcssa197 = phi i32 [ %99, %96 ], [ %76, %73 ]
  %.lcssa193 = phi i32 [ %102, %96 ], [ %79, %73 ]
  %indvars.iv120.lcssa188 = phi i64 [ %indvars.iv120.ph, %96 ], [ %indvars.iv120, %73 ]
  %.272102.lcssa183 = phi i1 [ %.272102.ph, %96 ], [ true, %73 ]
  %87 = sub i32 %.062104.ph, %.lcssa197
  %88 = add i32 %87, %.lcssa193
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph106.outer, %.lr.ph106, %.loopexit207, %.loopexit208
  %indvars.iv120192 = phi i64 [ %indvars.iv120.lcssa189, %.loopexit208 ], [ %indvars.iv120.lcssa188, %.loopexit207 ], [ %indvars.iv120.ph, %.lr.ph106.outer ], [ %indvars.iv120, %.lr.ph106 ]
  %.272102187 = phi i1 [ %.272102.lcssa184, %.loopexit208 ], [ %.272102.lcssa183, %.loopexit207 ], [ %.272102.ph, %.lr.ph106.outer ], [ true, %.lr.ph106 ]
  %.267 = phi i32 [ %.lcssa194, %.loopexit208 ], [ %.lcssa193, %.loopexit207 ], [ %.065103.ph, %.lr.ph106 ], [ %.065103.ph, %.lr.ph106.outer ]
  %.264 = phi i32 [ %83, %.loopexit208 ], [ %88, %.loopexit207 ], [ %.062104.ph, %.lr.ph106 ], [ %.062104.ph, %.lr.ph106.outer ]
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120192, 1
  %89 = load i32, ptr %3, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = icmp slt i64 %indvars.iv.next121, %90
  br i1 %91, label %.lr.ph106.outer, label %._crit_edge107.loopexit, !llvm.loop !12

.lr.ph106.outer:                                  ; preds = %.preheader, %.loopexit
  %indvars.iv120.ph = phi i64 [ %indvars.iv.next121, %.loopexit ], [ 0, %.preheader ]
  %.062104.ph = phi i32 [ %.264, %.loopexit ], [ 0, %.preheader ]
  %.065103.ph = phi i32 [ %.267, %.loopexit ], [ 0, %.preheader ]
  %.272102.ph = phi i1 [ %.272102187, %.loopexit ], [ %.070.lcssa, %.preheader ]
  %92 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv120.ph) #8
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %92) #8
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = icmp eq i32 %94, -1
  br i1 %95, label %.loopexit, label %96

96:                                               ; preds = %.lr.ph106.outer
  %97 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv120.ph) #8
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %97) #8
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv120.ph) #8
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %100) #8
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %.not82.peel = icmp sgt i32 %99, %.065103.ph
  br i1 %.not82.peel, label %.loopexit207, label %103

103:                                              ; preds = %96
  %104 = icmp sgt i32 %102, %.065103.ph
  br i1 %104, label %.loopexit208, label %105

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 -1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  store i32 -1, ptr %13, align 4, !tbaa !5
  %106 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %.thread128.peel unwind label %.loopexit.split-lp

.thread128.peel:                                  ; preds = %105
  store i64 %106, ptr %11, align 8
  %107 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv120.ph) #8
  %108 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %107, ptr noundef nonnull align 4 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  %indvars.iv.next121132.peel = add nuw nsw i64 %indvars.iv120.ph, 1
  %109 = load i32, ptr %3, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = icmp slt i64 %indvars.iv.next121132.peel, %110
  br i1 %111, label %.lr.ph106, label %._crit_edge107.loopexit.thread

.thread128:                                       ; preds = %84
  store i64 %85, ptr %11, align 8
  %112 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv120) #8
  %113 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %112, ptr noundef nonnull align 4 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  %indvars.iv.next121132 = add nuw nsw i64 %indvars.iv120, 1
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next121132, %115
  br i1 %116, label %.lr.ph106, label %._crit_edge107.loopexit.thread, !llvm.loop !13

._crit_edge107.loopexit.thread:                   ; preds = %.thread128, %.thread128.peel, %._crit_edge107.loopexit, %._crit_edge107
  %.062.lcssa125 = phi i32 [ %.264, %._crit_edge107.loopexit ], [ 0, %._crit_edge107 ], [ %.062104.ph, %.thread128.peel ], [ %.062104.ph, %.thread128 ]
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %.062.lcssa125)
          to label %118 unwind label %120

118:                                              ; preds = %._crit_edge107.loopexit.thread
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %172 unwind label %120

120:                                              ; preds = %118, %._crit_edge107.loopexit.thread
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %173

122:                                              ; preds = %._crit_edge107.loopexit
  %123 = icmp sgt i32 %89, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  store i32 1000000000, ptr %14, align 4, !tbaa !5
  br i1 %123, label %.lr.ph114, label %._crit_edge115

._crit_edge115:                                   ; preds = %161, %.thread, %122
  %.062.lcssa124127 = phi i32 [ %.264, %122 ], [ 0, %.thread ], [ %.264, %161 ]
  %124 = phi i32 [ 1000000000, %122 ], [ 1000000000, %.thread ], [ %162, %161 ]
  %125 = sub nsw i32 %.062.lcssa124127, %124
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %125)
          to label %167 unwind label %170

.lr.ph114:                                        ; preds = %122, %161
  %indvars.iv122 = phi i64 [ %133, %161 ], [ 0, %122 ]
  %.368110 = phi i32 [ %132, %161 ], [ 0, %122 ]
  %127 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv122) #8
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %127) #8
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %indvars.iv122) #8
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %130) #8
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %.not = icmp slt i32 %129, %.368110
  %133 = add nuw nsw i64 %indvars.iv122, 1
  %134 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %133) #8
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %134) #8
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %.not80 = icmp sgt i32 %132, %136
  br i1 %.not, label %149, label %137

137:                                              ; preds = %.lr.ph114
  br i1 %.not80, label %142, label %138

138:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  %139 = sub nsw i32 %132, %129
  store i32 %139, ptr %15, align 4, !tbaa !5
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %141 = load i32, ptr %140, align 4, !tbaa !5
  store i32 %141, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %161

142:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  %143 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %133) #8
  %144 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %143) #8
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = sub nsw i32 %145, %129
  store i32 %146, ptr %16, align 4, !tbaa !5
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %148 = load i32, ptr %147, align 4, !tbaa !5
  store i32 %148, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  br label %161

149:                                              ; preds = %.lr.ph114
  br i1 %.not80, label %154, label %150

150:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #8
  %151 = sub nsw i32 %132, %.368110
  store i32 %151, ptr %17, align 4, !tbaa !5
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %153 = load i32, ptr %152, align 4, !tbaa !5
  store i32 %153, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  br label %161

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  %155 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm100000EEixEm(ptr noundef nonnull align 4 dereferenceable(800000) %4, i64 noundef %133) #8
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %155) #8
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = sub nsw i32 %157, %.368110
  store i32 %158, ptr %18, align 4, !tbaa !5
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %160 = load i32, ptr %159, align 4, !tbaa !5
  store i32 %160, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  br label %161

161:                                              ; preds = %150, %154, %138, %142
  %162 = phi i32 [ %153, %150 ], [ %160, %154 ], [ %141, %138 ], [ %148, %142 ]
  %163 = load i32, ptr %3, align 4, !tbaa !5
  %164 = add nsw i32 %163, -1
  %165 = sext i32 %164 to i64
  %166 = icmp slt i64 %133, %165
  br i1 %166, label %.lr.ph114, label %._crit_edge115, !llvm.loop !15

167:                                              ; preds = %._crit_edge115
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %169 unwind label %170

169:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br label %172

170:                                              ; preds = %167, %._crit_edge115
  %171 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br label %173

172:                                              ; preds = %118, %169
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #8
  ret i32 0

173:                                              ; preds = %62, %170, %120, %86, %47, %30
  %.pn86.pn = phi { ptr, i32 } [ %.pn86, %47 ], [ %31, %30 ], [ %63, %62 ], [ %lpad.phi, %86 ], [ %121, %120 ], [ %171, %170 ]
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #8
  br label %174

174:                                              ; preds = %173, %28
  %.pn86.pn.pn = phi { ptr, i32 } [ %.pn86.pn, %173 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn86.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt5arrayISt4pairIiiELm100000EEC2Ev(ptr noundef nonnull align 4 dereferenceable(800000)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayISt4pairIiiELm100000EE5beginEv(ptr noundef nonnull align 4 dereferenceable(800000)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

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

; 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 #2 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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #5 align 2

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


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