; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2015-16/Dec 2015/Plat (15 Dec P2 (SegTree))

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

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

@high = external dso_local global [262144 x [3 x i32]], align 16
@low = external dso_local global [262144 x [3 x i32]], align 16
@N = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@used = external dso_local global [100001 x i8], align 16
@b = external dso_local global %"class.std::vector", align 8
@e = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4modhiiiibi(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4modliiiibi(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr %2) #6
  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) #6
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef @.str.2, i32 noundef 16)
          to label %13 unwind label %23

13:                                               ; preds = %0
  %14 = invoke noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
          to label %15 unwind label %27

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @N)
          to label %17 unwind label %27

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

18:                                               ; preds = %38, %17
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = load i32, ptr @N, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %31, label %22

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

23:                                               ; preds = %0
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %4, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %5, align 4
  br label %166

27:                                               ; preds = %160, %15, %13
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %4, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %5, align 4
  br label %165

31:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %33 unwind label %41

33:                                               ; preds = %31
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100001 x i8], ptr @used, i64 0, i64 %35
  store i8 1, ptr %36, align 1, !tbaa !9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %37 unwind label %41

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

38:                                               ; preds = %37
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %6, align 4, !tbaa !5
  br label %18, !llvm.loop !11

41:                                               ; preds = %33, %31
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %4, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %165

45:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %46 = load i32, ptr @N, align 4, !tbaa !5
  %47 = mul nsw i32 2, %46
  store i32 %47, ptr %8, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %65, %45
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %52, label %51

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

52:                                               ; preds = %48
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100001 x i8], ptr @used, i64 0, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !9, !range !13, !noundef !14
  %57 = trunc i8 %56 to i1
  br i1 %57, label %64, label %58

58:                                               ; preds = %52
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %59 unwind label %60

59:                                               ; preds = %58
  br label %64

60:                                               ; preds = %58
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %4, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %165

64:                                               ; preds = %59, %52
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = add nsw i32 %66, -1
  store i32 %67, ptr %8, align 4, !tbaa !5
  br label %48, !llvm.loop !15

68:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %89, %68
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = load i32, ptr @N, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %69
  %75 = load i32, ptr @N, align 4, !tbaa !5
  %76 = mul nsw i32 2, %75
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %78) #6
  %80 = load i32, ptr %79, align 4, !tbaa !5
  invoke void @_Z4modhiiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %76, i32 noundef %80, i1 noundef zeroext true, i32 noundef 1)
          to label %81 unwind label %92

81:                                               ; preds = %74
  %82 = load i32, ptr @N, align 4, !tbaa !5
  %83 = mul nsw i32 2, %82
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %85) #6
  %87 = load i32, ptr %86, align 4, !tbaa !5
  invoke void @_Z4modhiiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %83, i32 noundef %87, i1 noundef zeroext false, i32 noundef 1)
          to label %88 unwind label %92

88:                                               ; preds = %81
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %9, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %9, align 4, !tbaa !5
  br label %69, !llvm.loop !16

92:                                               ; preds = %81, %74
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %4, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %165

96:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %97 = load i32, ptr getelementptr inbounds ([3 x i32], ptr getelementptr inbounds ([262144 x [3 x i32]], ptr @high, i64 0, i64 1), i64 0, i64 2), align 4, !tbaa !5
  %98 = load i32, ptr getelementptr inbounds ([3 x i32], ptr getelementptr inbounds ([262144 x [3 x i32]], ptr @low, i64 0, i64 1), i64 0, i64 2), align 4, !tbaa !5
  %99 = add nsw i32 %97, %98
  store i32 %99, ptr %10, align 4, !tbaa !5
  %100 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %101 unwind label %109

101:                                              ; preds = %96
  %102 = load i32, ptr %100, align 4, !tbaa !5
  store i32 %102, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %103 = load i32, ptr @N, align 4, !tbaa !5
  %104 = sub nsw i32 %103, 1
  store i32 %104, ptr %11, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %148, %101
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = icmp sge i32 %106, 0
  br i1 %107, label %113, label %108

108:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %160

109:                                              ; preds = %96
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %4, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %165

113:                                              ; preds = %105
  %114 = load i32, ptr @N, align 4, !tbaa !5
  %115 = mul nsw i32 2, %114
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %117) #6
  %119 = load i32, ptr %118, align 4, !tbaa !5
  invoke void @_Z4modhiiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %115, i32 noundef %119, i1 noundef zeroext true, i32 noundef -1)
          to label %120 unwind label %151

120:                                              ; preds = %113
  %121 = load i32, ptr @N, align 4, !tbaa !5
  %122 = mul nsw i32 2, %121
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %124) #6
  %126 = load i32, ptr %125, align 4, !tbaa !5
  invoke void @_Z4modhiiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %122, i32 noundef %126, i1 noundef zeroext false, i32 noundef -1)
          to label %127 unwind label %151

127:                                              ; preds = %120
  %128 = load i32, ptr @N, align 4, !tbaa !5
  %129 = mul nsw i32 2, %128
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %131) #6
  %133 = load i32, ptr %132, align 4, !tbaa !5
  invoke void @_Z4modliiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %129, i32 noundef %133, i1 noundef zeroext true, i32 noundef 1)
          to label %134 unwind label %151

134:                                              ; preds = %127
  %135 = load i32, ptr @N, align 4, !tbaa !5
  %136 = mul nsw i32 2, %135
  %137 = load i32, ptr %11, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %138) #6
  %140 = load i32, ptr %139, align 4, !tbaa !5
  invoke void @_Z4modliiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %136, i32 noundef %140, i1 noundef zeroext false, i32 noundef 1)
          to label %141 unwind label %151

141:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %142 = load i32, ptr getelementptr inbounds ([3 x i32], ptr getelementptr inbounds ([262144 x [3 x i32]], ptr @high, i64 0, i64 1), i64 0, i64 2), align 4, !tbaa !5
  %143 = load i32, ptr getelementptr inbounds ([3 x i32], ptr getelementptr inbounds ([262144 x [3 x i32]], ptr @low, i64 0, i64 1), i64 0, i64 2), align 4, !tbaa !5
  %144 = add nsw i32 %142, %143
  store i32 %144, ptr %12, align 4, !tbaa !5
  %145 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %146 unwind label %155

146:                                              ; preds = %141
  %147 = load i32, ptr %145, align 4, !tbaa !5
  store i32 %147, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %148

148:                                              ; preds = %146
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = add nsw i32 %149, -1
  store i32 %150, ptr %11, align 4, !tbaa !5
  br label %105, !llvm.loop !17

151:                                              ; preds = %134, %127, %120, %113
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %4, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %5, align 4
  br label %159

155:                                              ; preds = %141
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %4, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %159

159:                                              ; preds = %155, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %165

160:                                              ; preds = %108
  %161 = load i32, ptr @ans, align 4, !tbaa !5
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %161)
          to label %163 unwind label %27

163:                                              ; preds = %160
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #6
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #6
  %164 = load i32, ptr %1, align 4
  ret i32 %164

165:                                              ; preds = %159, %109, %92, %60, %41, %27
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  br label %166

166:                                              ; preds = %165, %23
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #6
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #6
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %4, align 8
  %169 = load i32, ptr %5, align 4
  %170 = insertvalue { ptr, i32 } poison, ptr %168, 0
  %171 = insertvalue { ptr, i32 } %170, i32 %169, 1
  resume { ptr, i32 } %171
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #0 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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


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

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

@high = external dso_local local_unnamed_addr global [262144 x [3 x i32]], align 16
@low = external dso_local local_unnamed_addr global [262144 x [3 x i32]], align 16
@N = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@used = external dso_local local_unnamed_addr global [100001 x i8], align 16
@b = external dso_local global %"class.std::vector", align 8
@e = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4modhiiiibi(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4modliiiibi(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 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 i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %1) #6
  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) #6
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.2, i32 noundef 16)
          to label %7 unwind label %15

7:                                                ; preds = %0
  %8 = invoke noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
          to label %9 unwind label %17

9:                                                ; preds = %7
  %10 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) @N)
          to label %.preheader unwind label %17

.preheader:                                       ; preds = %9
  %11 = load i32, ptr @N, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  br label %._crit_edge28.thread

._crit_edge:                                      ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %13 = shl nsw i32 %26, 1
  store i32 %13, ptr %4, align 4, !tbaa !5
  %14 = icmp sgt i32 %26, 0
  br i1 %14, label %.lr.ph27, label %._crit_edge28.thread

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %97

17:                                               ; preds = %._crit_edge37, %9, %7
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %96

.lr.ph:                                           ; preds = %.preheader, %24
  %.01524 = phi i32 [ %25, %24 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %19 = 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 %20 unwind label %28

20:                                               ; preds = %.lr.ph
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [100001 x i8], ptr @used, i64 0, i64 %22
  store i8 1, ptr %23, align 1, !tbaa !9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %24 unwind label %28

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %25 = add nuw nsw i32 %.01524, 1
  %26 = load i32, ptr @N, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !11

28:                                               ; preds = %20, %.lr.ph
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %96

._crit_edge28.thread:                             ; preds = %._crit_edge, %._crit_edge.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %._crit_edge32

._crit_edge28:                                    ; preds = %38
  %.pre44 = load i32, ptr @N, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  %30 = icmp sgt i32 %.pre44, 0
  br i1 %30, label %.lr.ph31, label %._crit_edge32

.lr.ph27:                                         ; preds = %._crit_edge, %38
  %storemerge25 = phi i32 [ %40, %38 ], [ %13, %._crit_edge ]
  %31 = zext nneg i32 %storemerge25 to i64
  %32 = getelementptr inbounds [100001 x i8], ptr @used, i64 0, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !9, !range !13, !noundef !14
  %34 = trunc nuw i8 %33 to i1
  br i1 %34, label %38, label %35

35:                                               ; preds = %.lr.ph27
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %._crit_edge43 unwind label %36

._crit_edge43:                                    ; preds = %35
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  br label %38

36:                                               ; preds = %35
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %96

38:                                               ; preds = %._crit_edge43, %.lr.ph27
  %39 = phi i32 [ %.pre, %._crit_edge43 ], [ %storemerge25, %.lr.ph27 ]
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr %4, align 4, !tbaa !5
  %41 = icmp sgt i32 %39, 1
  br i1 %41, label %.lr.ph27, label %._crit_edge28, !llvm.loop !15

._crit_edge32:                                    ; preds = %59, %._crit_edge28.thread, %._crit_edge28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @high, i64 20), align 4, !tbaa !5
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @low, i64 20), align 4, !tbaa !5
  %44 = add nsw i32 %43, %42
  store i32 %44, ptr %5, align 4, !tbaa !5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %46 = load i32, ptr %45, align 4, !tbaa !5
  store i32 %46, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %47 = load i32, ptr @N, align 4, !tbaa !5
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph36.preheader, label %._crit_edge37

.lr.ph36.preheader:                               ; preds = %._crit_edge32
  %49 = zext nneg i32 %47 to i64
  br label %.lr.ph36

.lr.ph31:                                         ; preds = %._crit_edge28, %59
  %indvars.iv = phi i64 [ %indvars.iv.next, %59 ], [ 0, %._crit_edge28 ]
  %50 = phi i32 [ %60, %59 ], [ %.pre44, %._crit_edge28 ]
  %51 = shl nsw i32 %50, 1
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %indvars.iv) #6
  %53 = load i32, ptr %52, align 4, !tbaa !5
  invoke void @_Z4modhiiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %51, i32 noundef %53, i1 noundef zeroext true, i32 noundef 1)
          to label %54 unwind label %63

54:                                               ; preds = %.lr.ph31
  %55 = load i32, ptr @N, align 4, !tbaa !5
  %56 = shl nsw i32 %55, 1
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv) #6
  %58 = load i32, ptr %57, align 4, !tbaa !5
  invoke void @_Z4modhiiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %56, i32 noundef %58, i1 noundef zeroext false, i32 noundef 1)
          to label %59 unwind label %63

59:                                               ; preds = %54
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = load i32, ptr @N, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  br i1 %62, label %.lr.ph31, label %._crit_edge32, !llvm.loop !16

63:                                               ; preds = %54, %.lr.ph31
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %96

._crit_edge37:                                    ; preds = %86, %._crit_edge32
  %65 = phi i32 [ %46, %._crit_edge32 ], [ %91, %86 ]
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %65)
          to label %95 unwind label %17

.lr.ph36:                                         ; preds = %.lr.ph36.preheader, %86
  %indvars.iv40 = phi i64 [ %49, %.lr.ph36.preheader ], [ %indvars.iv.next41, %86 ]
  %indvars.iv.next41 = add nsw i64 %indvars.iv40, -1
  %67 = load i32, ptr @N, align 4, !tbaa !5
  %68 = shl nsw i32 %67, 1
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %indvars.iv.next41) #6
  %70 = load i32, ptr %69, align 4, !tbaa !5
  invoke void @_Z4modhiiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %68, i32 noundef %70, i1 noundef zeroext true, i32 noundef -1)
          to label %71 unwind label %93

71:                                               ; preds = %.lr.ph36
  %72 = load i32, ptr @N, align 4, !tbaa !5
  %73 = shl nsw i32 %72, 1
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv.next41) #6
  %75 = load i32, ptr %74, align 4, !tbaa !5
  invoke void @_Z4modhiiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %73, i32 noundef %75, i1 noundef zeroext false, i32 noundef -1)
          to label %76 unwind label %93

76:                                               ; preds = %71
  %77 = load i32, ptr @N, align 4, !tbaa !5
  %78 = shl nsw i32 %77, 1
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %indvars.iv.next41) #6
  %80 = load i32, ptr %79, align 4, !tbaa !5
  invoke void @_Z4modliiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %78, i32 noundef %80, i1 noundef zeroext true, i32 noundef 1)
          to label %81 unwind label %93

81:                                               ; preds = %76
  %82 = load i32, ptr @N, align 4, !tbaa !5
  %83 = shl nsw i32 %82, 1
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv.next41) #6
  %85 = load i32, ptr %84, align 4, !tbaa !5
  invoke void @_Z4modliiiibi(i32 noundef 1, i32 noundef 1, i32 noundef %83, i32 noundef %85, i1 noundef zeroext false, i32 noundef 1)
          to label %86 unwind label %93

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %87 = load i32, ptr getelementptr inbounds (i8, ptr @high, i64 20), align 4, !tbaa !5
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @low, i64 20), align 4, !tbaa !5
  %89 = add nsw i32 %88, %87
  store i32 %89, ptr %6, align 4, !tbaa !5
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  store i32 %91, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %92 = icmp ugt i64 %indvars.iv40, 1
  br i1 %92, label %.lr.ph36, label %._crit_edge37, !llvm.loop !17

93:                                               ; preds = %81, %76, %71, %.lr.ph36
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %96

95:                                               ; preds = %._crit_edge37
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #6
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #6
  ret i32 0

96:                                               ; preds = %93, %63, %36, %28, %17
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %37, %36 ], [ %64, %63 ], [ %94, %93 ], [ %18, %17 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #6
  br label %97

97:                                               ; preds = %96, %15
  %.pn.pn = phi { ptr, i32 } [ %.pn, %96 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #6
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #0 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #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 #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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 #3

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

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

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

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

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


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