; LLVM IR from ShahjalalShohag/code-library :: Data Structures (4D MO)

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

%struct.query = type { i32, i32, i32, i32, i32 }
%"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 }
%struct.ST = type { [200009 x i32], [202 x [200009 x i32]], [202 x i32] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@Q = external dso_local global [200009 x %struct.query], align 16
@st = external dso_local global [200009 x i32], align 16
@en = external dso_local global [200009 x i32], align 16
@b = external dso_local global [200009 x i32], align 16
@g = external dso_local global [200009 x %"class.std::vector"], align 16
@t = external dso_local global %struct.ST, align 4
@ans = external dso_local global [200009 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3addi(i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3deli(i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.query, 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 %struct.query, align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %23 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %24 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %25 = getelementptr i8, ptr %24, i64 -24
  %26 = load i64, ptr %25, align 8
  %27 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %26
  %28 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %27, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %30

30:                                               ; preds = %40, %0
  %31 = load i32, ptr %3, align 4, !tbaa !8
  %32 = load i32, ptr %2, align 4, !tbaa !8
  %33 = icmp sle i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %43

35:                                               ; preds = %30
  %36 = load i32, ptr %3, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [200009 x i32], ptr @b, i64 0, i64 %37
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %38)
  br label %40

40:                                               ; preds = %35
  %41 = load i32, ptr %3, align 4, !tbaa !8
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %3, align 4, !tbaa !8
  br label %30, !llvm.loop !11

43:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %44

44:                                               ; preds = %58, %43
  %45 = load i32, ptr %4, align 4, !tbaa !8
  %46 = load i32, ptr %2, align 4, !tbaa !8
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %61

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %52 = load i32, ptr %5, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200009 x %"class.std::vector"], ptr @g, i64 0, i64 %53
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %55 = load i32, ptr %6, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [200009 x %"class.std::vector"], ptr @g, i64 0, i64 %56
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %58

58:                                               ; preds = %49
  %59 = load i32, ptr %4, align 4, !tbaa !8
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %4, align 4, !tbaa !8
  br label %44, !llvm.loop !13

61:                                               ; preds = %48
  call void @_Z3dfsii(i32 noundef 1, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !8
  br label %63

63:                                               ; preds = %100, %61
  %64 = load i32, ptr %8, align 4, !tbaa !8
  %65 = load i32, ptr %7, align 4, !tbaa !8
  %66 = icmp sle i32 %64, %65
  br i1 %66, label %68, label %67

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

68:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %71 = load i32, ptr %9, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [200009 x i32], ptr @st, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !8
  store i32 %74, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %75 = load i32, ptr %9, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [200009 x i32], ptr @en, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !8
  store i32 %78, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %79 = load i32, ptr %10, align 4, !tbaa !8
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [200009 x i32], ptr @st, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !8
  store i32 %82, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %83 = load i32, ptr %10, align 4, !tbaa !8
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [200009 x i32], ptr @en, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !8
  store i32 %86, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 20, ptr %15) #7
  %87 = getelementptr inbounds %struct.query, ptr %15, i32 0, i32 0
  %88 = load i32, ptr %11, align 4, !tbaa !8
  store i32 %88, ptr %87, align 4, !tbaa !14
  %89 = getelementptr inbounds %struct.query, ptr %15, i32 0, i32 1
  %90 = load i32, ptr %12, align 4, !tbaa !8
  store i32 %90, ptr %89, align 4, !tbaa !16
  %91 = getelementptr inbounds %struct.query, ptr %15, i32 0, i32 2
  %92 = load i32, ptr %13, align 4, !tbaa !8
  store i32 %92, ptr %91, align 4, !tbaa !17
  %93 = getelementptr inbounds %struct.query, ptr %15, i32 0, i32 3
  %94 = load i32, ptr %14, align 4, !tbaa !8
  store i32 %94, ptr %93, align 4, !tbaa !18
  %95 = getelementptr inbounds %struct.query, ptr %15, i32 0, i32 4
  %96 = load i32, ptr %8, align 4, !tbaa !8
  store i32 %96, ptr %95, align 4, !tbaa !19
  %97 = load i32, ptr %8, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %98
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %99, ptr align 4 %15, i64 20, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 20, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %100

100:                                              ; preds = %68
  %101 = load i32, ptr %8, align 4, !tbaa !8
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %8, align 4, !tbaa !8
  br label %63, !llvm.loop !21

103:                                              ; preds = %67
  %104 = load i32, ptr %7, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %struct.query, ptr @Q, i64 %105
  %107 = getelementptr inbounds %struct.query, ptr %106, i64 1
  call void @_ZSt4sortIP5queryEvT_S2_(ptr noundef getelementptr inbounds (%struct.query, ptr @Q, i64 1), ptr noundef %107)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 1, ptr %19, align 4, !tbaa !8
  %108 = load i32, ptr %16, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %108)
  %109 = load i32, ptr %18, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %109)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 1, ptr %20, align 4, !tbaa !8
  br label %110

110:                                              ; preds = %204, %103
  %111 = load i32, ptr %20, align 4, !tbaa !8
  %112 = load i32, ptr %7, align 4, !tbaa !8
  %113 = icmp sle i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %207

115:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 20, ptr %21) #7
  %116 = load i32, ptr %20, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %117
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %118, i64 20, i1 false), !tbaa.struct !20
  br label %119

119:                                              ; preds = %124, %115
  %120 = load i32, ptr %17, align 4, !tbaa !8
  %121 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 1
  %122 = load i32, ptr %121, align 4, !tbaa !16
  %123 = icmp slt i32 %120, %122
  br i1 %123, label %124, label %128

124:                                              ; preds = %119
  %125 = load i32, ptr %17, align 4, !tbaa !8
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %17, align 4, !tbaa !8
  %127 = load i32, ptr %17, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %127)
  br label %119, !llvm.loop !22

128:                                              ; preds = %119
  br label %129

129:                                              ; preds = %134, %128
  %130 = load i32, ptr %16, align 4, !tbaa !8
  %131 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 0
  %132 = load i32, ptr %131, align 4, !tbaa !14
  %133 = icmp sgt i32 %130, %132
  br i1 %133, label %134, label %138

134:                                              ; preds = %129
  %135 = load i32, ptr %16, align 4, !tbaa !8
  %136 = add nsw i32 %135, -1
  store i32 %136, ptr %16, align 4, !tbaa !8
  %137 = load i32, ptr %16, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %137)
  br label %129, !llvm.loop !23

138:                                              ; preds = %129
  br label %139

139:                                              ; preds = %144, %138
  %140 = load i32, ptr %17, align 4, !tbaa !8
  %141 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 1
  %142 = load i32, ptr %141, align 4, !tbaa !16
  %143 = icmp sgt i32 %140, %142
  br i1 %143, label %144, label %148

144:                                              ; preds = %139
  %145 = load i32, ptr %17, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %145)
  %146 = load i32, ptr %17, align 4, !tbaa !8
  %147 = add nsw i32 %146, -1
  store i32 %147, ptr %17, align 4, !tbaa !8
  br label %139, !llvm.loop !24

148:                                              ; preds = %139
  br label %149

149:                                              ; preds = %154, %148
  %150 = load i32, ptr %16, align 4, !tbaa !8
  %151 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 0
  %152 = load i32, ptr %151, align 4, !tbaa !14
  %153 = icmp slt i32 %150, %152
  br i1 %153, label %154, label %158

154:                                              ; preds = %149
  %155 = load i32, ptr %16, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %155)
  %156 = load i32, ptr %16, align 4, !tbaa !8
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %16, align 4, !tbaa !8
  br label %149, !llvm.loop !25

158:                                              ; preds = %149
  br label %159

159:                                              ; preds = %164, %158
  %160 = load i32, ptr %19, align 4, !tbaa !8
  %161 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 3
  %162 = load i32, ptr %161, align 4, !tbaa !18
  %163 = icmp slt i32 %160, %162
  br i1 %163, label %164, label %168

164:                                              ; preds = %159
  %165 = load i32, ptr %19, align 4, !tbaa !8
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %19, align 4, !tbaa !8
  %167 = load i32, ptr %19, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %167)
  br label %159, !llvm.loop !26

168:                                              ; preds = %159
  br label %169

169:                                              ; preds = %174, %168
  %170 = load i32, ptr %18, align 4, !tbaa !8
  %171 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 2
  %172 = load i32, ptr %171, align 4, !tbaa !17
  %173 = icmp sgt i32 %170, %172
  br i1 %173, label %174, label %178

174:                                              ; preds = %169
  %175 = load i32, ptr %18, align 4, !tbaa !8
  %176 = add nsw i32 %175, -1
  store i32 %176, ptr %18, align 4, !tbaa !8
  %177 = load i32, ptr %18, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %177)
  br label %169, !llvm.loop !27

178:                                              ; preds = %169
  br label %179

179:                                              ; preds = %184, %178
  %180 = load i32, ptr %19, align 4, !tbaa !8
  %181 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 3
  %182 = load i32, ptr %181, align 4, !tbaa !18
  %183 = icmp sgt i32 %180, %182
  br i1 %183, label %184, label %188

184:                                              ; preds = %179
  %185 = load i32, ptr %19, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %185)
  %186 = load i32, ptr %19, align 4, !tbaa !8
  %187 = add nsw i32 %186, -1
  store i32 %187, ptr %19, align 4, !tbaa !8
  br label %179, !llvm.loop !28

188:                                              ; preds = %179
  br label %189

189:                                              ; preds = %194, %188
  %190 = load i32, ptr %18, align 4, !tbaa !8
  %191 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 2
  %192 = load i32, ptr %191, align 4, !tbaa !17
  %193 = icmp slt i32 %190, %192
  br i1 %193, label %194, label %198

194:                                              ; preds = %189
  %195 = load i32, ptr %18, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %195)
  %196 = load i32, ptr %18, align 4, !tbaa !8
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %18, align 4, !tbaa !8
  br label %189, !llvm.loop !29

198:                                              ; preds = %189
  %199 = call noundef i32 @_ZN2ST5queryEv(ptr noundef nonnull align 4 dereferenceable(162408116) @t)
  %200 = getelementptr inbounds %struct.query, ptr %21, i32 0, i32 4
  %201 = load i32, ptr %200, align 4, !tbaa !19
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %202
  store i32 %199, ptr %203, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 20, ptr %21) #7
  br label %204

204:                                              ; preds = %198
  %205 = load i32, ptr %20, align 4, !tbaa !8
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %20, align 4, !tbaa !8
  br label %110, !llvm.loop !30

207:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 1, ptr %22, align 4, !tbaa !8
  br label %208

208:                                              ; preds = %220, %207
  %209 = load i32, ptr %22, align 4, !tbaa !8
  %210 = load i32, ptr %7, align 4, !tbaa !8
  %211 = icmp sle i32 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %223

213:                                              ; preds = %208
  %214 = load i32, ptr %22, align 4, !tbaa !8
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !8
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %217)
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %218, i8 noundef signext 10)
  br label %220

220:                                              ; preds = %213
  %221 = load i32, ptr %22, align 4, !tbaa !8
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %22, align 4, !tbaa !8
  br label %208, !llvm.loop !31

223:                                              ; preds = %212
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #4 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)) #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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN2ST5queryEv(ptr noundef nonnull align 4 dereferenceable(162408116)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !9, i64 0}
!15 = !{!"_ZTS5query", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16}
!16 = !{!15, !9, i64 4}
!17 = !{!15, !9, i64 8}
!18 = !{!15, !9, i64 12}
!19 = !{!15, !9, i64 16}
!20 = !{i64 0, i64 4, !8, i64 4, i64 4, !8, i64 8, i64 4, !8, i64 12, i64 4, !8, i64 16, i64 4, !8}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !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"

%struct.query = type { i32, i32, i32, i32, i32 }
%"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 }
%struct.ST = type { [200009 x i32], [202 x [200009 x i32]], [202 x i32] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@Q = external dso_local global [200009 x %struct.query], align 16
@st = external dso_local local_unnamed_addr global [200009 x i32], align 16
@en = external dso_local local_unnamed_addr global [200009 x i32], align 16
@b = external dso_local global [200009 x i32], align 16
@g = external dso_local global [200009 x %"class.std::vector"], align 16
@t = external dso_local global %struct.ST, align 4
@ans = external dso_local local_unnamed_addr global [200009 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3addi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3deli(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %14 = load i32, ptr %1, align 4, !tbaa !8
  %.not78 = icmp slt i32 %14, 1
  br i1 %.not78, label %._crit_edge, label %.lr.ph

.preheader77:                                     ; preds = %.lr.ph
  %15 = icmp sgt i32 %18, 1
  br i1 %15, label %.lr.ph81, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %16 = getelementptr inbounds [200009 x i32], ptr @b, i64 0, i64 %indvars.iv
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr %1, align 4, !tbaa !8
  %19 = sext i32 %18 to i64
  %.not.not = icmp slt i64 %indvars.iv, %19
  br i1 %.not.not, label %.lr.ph, label %.preheader77, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph81, %0, %.preheader77
  call void @_Z3dfsii(i32 noundef 1, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %21 = load i32, ptr %4, align 4, !tbaa !8
  %.not6782 = icmp slt i32 %21, 1
  br i1 %.not6782, label %._crit_edge.._crit_edge86_crit_edge, label %.lr.ph85

._crit_edge.._crit_edge86_crit_edge:              ; preds = %._crit_edge
  %.pre = sext i32 %21 to i64
  br label %._crit_edge86

.lr.ph81:                                         ; preds = %.preheader77, %.lr.ph81
  %.05380 = phi i32 [ %30, %.lr.ph81 ], [ 1, %.preheader77 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [200009 x %"class.std::vector"], ptr @g, i64 0, i64 %25
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %27 = load i32, ptr %3, align 4, !tbaa !8
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [200009 x %"class.std::vector"], ptr @g, i64 0, i64 %28
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %30 = add nuw nsw i32 %.05380, 1
  %31 = load i32, ptr %1, align 4, !tbaa !8
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %.lr.ph81, label %._crit_edge, !llvm.loop !13

._crit_edge86:                                    ; preds = %.lr.ph85, %._crit_edge.._crit_edge86_crit_edge
  %.pre-phi = phi i64 [ %.pre, %._crit_edge.._crit_edge86_crit_edge ], [ %53, %.lr.ph85 ]
  %33 = getelementptr inbounds %struct.query, ptr @Q, i64 %.pre-phi
  %34 = getelementptr inbounds i8, ptr %33, i64 20
  call void @_ZSt4sortIP5queryEvT_S2_(ptr noundef nonnull getelementptr inbounds (i8, ptr @Q, i64 20), ptr noundef nonnull %34)
  call void @_Z3addi(i32 noundef 1)
  call void @_Z3addi(i32 noundef 1)
  %35 = load i32, ptr %4, align 4, !tbaa !8
  %.not68113 = icmp slt i32 %35, 1
  br i1 %.not68113, label %._crit_edge124, label %.lr.ph120

.lr.ph85:                                         ; preds = %._crit_edge, %.lr.ph85
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %.lr.ph85 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %38 = load i32, ptr %5, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200009 x i32], ptr @st, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !8
  %42 = getelementptr inbounds [200009 x i32], ptr @en, i64 0, i64 %39
  %43 = load i32, ptr %42, align 4, !tbaa !8
  %44 = load i32, ptr %6, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [200009 x i32], ptr @st, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !8
  %48 = getelementptr inbounds [200009 x i32], ptr @en, i64 0, i64 %45
  %49 = load i32, ptr %48, align 4, !tbaa !8
  %50 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %indvars.iv135
  store i32 %41, ptr %50, align 4, !tbaa !8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 4
  store i32 %43, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !8
  %.sroa.537.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 8
  store i32 %47, ptr %.sroa.537.0..sroa_idx, align 4, !tbaa !8
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 12
  store i32 %49, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !8
  %.sroa.738.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 16
  %51 = trunc nuw nsw i64 %indvars.iv135 to i32
  store i32 %51, ptr %.sroa.738.0..sroa_idx, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %52 = load i32, ptr %4, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %.not67.not = icmp slt i64 %indvars.iv135, %53
  br i1 %.not67.not, label %.lr.ph85, label %._crit_edge86, !llvm.loop !14

.preheader:                                       ; preds = %._crit_edge111
  %54 = icmp slt i32 %79, 1
  br i1 %54, label %._crit_edge124, label %.lr.ph123

.lr.ph120:                                        ; preds = %._crit_edge86, %._crit_edge111
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %._crit_edge111 ], [ 1, %._crit_edge86 ]
  %.055118 = phi i32 [ %.2.lcssa, %._crit_edge111 ], [ 1, %._crit_edge86 ]
  %.056117 = phi i32 [ %.258.lcssa, %._crit_edge111 ], [ 1, %._crit_edge86 ]
  %.060115 = phi i32 [ %.262.lcssa, %._crit_edge111 ], [ 1, %._crit_edge86 ]
  %.063114 = phi i32 [ %.265.lcssa, %._crit_edge111 ], [ 1, %._crit_edge86 ]
  %55 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %indvars.iv141
  %.sroa.0.0.copyload = load i32, ptr %55, align 4, !tbaa !8
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %55, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !8
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %55, i64 8
  %.sroa.7.0.copyload = load i32, ptr %.sroa.7.0..sroa_idx, align 4, !tbaa !8
  %.sroa.9.0..sroa_idx = getelementptr inbounds i8, ptr %55, i64 12
  %.sroa.9.0.copyload = load i32, ptr %.sroa.9.0..sroa_idx, align 4, !tbaa !8
  %.sroa.11.0..sroa_idx = getelementptr inbounds i8, ptr %55, i64 16
  %.sroa.11.0.copyload = load i32, ptr %.sroa.11.0..sroa_idx, align 4, !tbaa !8
  %56 = icmp slt i32 %.056117, %.sroa.5.0.copyload
  br i1 %56, label %.lr.ph89, label %.preheader76

.preheader76:                                     ; preds = %.lr.ph89, %.lr.ph120
  %.157.lcssa = phi i32 [ %.056117, %.lr.ph120 ], [ %.sroa.5.0.copyload, %.lr.ph89 ]
  %57 = icmp sgt i32 %.055118, %.sroa.0.0.copyload
  br i1 %57, label %.lr.ph92, label %.preheader75

.lr.ph89:                                         ; preds = %.lr.ph120, %.lr.ph89
  %.15787 = phi i32 [ %58, %.lr.ph89 ], [ %.056117, %.lr.ph120 ]
  %58 = add nsw i32 %.15787, 1
  call void @_Z3addi(i32 noundef %58)
  %exitcond.not = icmp eq i32 %58, %.sroa.5.0.copyload
  br i1 %exitcond.not, label %.preheader76, label %.lr.ph89, !llvm.loop !15

.preheader75:                                     ; preds = %.lr.ph92, %.preheader76
  %.1.lcssa = phi i32 [ %.055118, %.preheader76 ], [ %.sroa.0.0.copyload, %.lr.ph92 ]
  %59 = icmp sgt i32 %.157.lcssa, %.sroa.5.0.copyload
  br i1 %59, label %.lr.ph95, label %.preheader74

.lr.ph92:                                         ; preds = %.preheader76, %.lr.ph92
  %.191 = phi i32 [ %60, %.lr.ph92 ], [ %.055118, %.preheader76 ]
  %60 = add nsw i32 %.191, -1
  call void @_Z3addi(i32 noundef %60)
  %61 = icmp sgt i32 %60, %.sroa.0.0.copyload
  br i1 %61, label %.lr.ph92, label %.preheader75, !llvm.loop !16

.preheader74:                                     ; preds = %.lr.ph95, %.preheader75
  %.258.lcssa = phi i32 [ %.157.lcssa, %.preheader75 ], [ %.sroa.5.0.copyload, %.lr.ph95 ]
  %62 = icmp slt i32 %.1.lcssa, %.sroa.0.0.copyload
  br i1 %62, label %.lr.ph98, label %.preheader73

.lr.ph95:                                         ; preds = %.preheader75, %.lr.ph95
  %.25894 = phi i32 [ %63, %.lr.ph95 ], [ %.157.lcssa, %.preheader75 ]
  call void @_Z3deli(i32 noundef %.25894)
  %63 = add nsw i32 %.25894, -1
  %64 = icmp sgt i32 %63, %.sroa.5.0.copyload
  br i1 %64, label %.lr.ph95, label %.preheader74, !llvm.loop !17

.preheader73:                                     ; preds = %.lr.ph98, %.preheader74
  %.2.lcssa = phi i32 [ %.1.lcssa, %.preheader74 ], [ %.sroa.0.0.copyload, %.lr.ph98 ]
  %65 = icmp slt i32 %.060115, %.sroa.9.0.copyload
  br i1 %65, label %.lr.ph101, label %.preheader72

.lr.ph98:                                         ; preds = %.preheader74, %.lr.ph98
  %.297 = phi i32 [ %66, %.lr.ph98 ], [ %.1.lcssa, %.preheader74 ]
  call void @_Z3deli(i32 noundef %.297)
  %66 = add i32 %.297, 1
  %exitcond138.not = icmp eq i32 %66, %.sroa.0.0.copyload
  br i1 %exitcond138.not, label %.preheader73, label %.lr.ph98, !llvm.loop !18

.preheader72:                                     ; preds = %.lr.ph101, %.preheader73
  %.161.lcssa = phi i32 [ %.060115, %.preheader73 ], [ %.sroa.9.0.copyload, %.lr.ph101 ]
  %67 = icmp sgt i32 %.063114, %.sroa.7.0.copyload
  br i1 %67, label %.lr.ph104, label %.preheader71

.lr.ph101:                                        ; preds = %.preheader73, %.lr.ph101
  %.161100 = phi i32 [ %68, %.lr.ph101 ], [ %.060115, %.preheader73 ]
  %68 = add nsw i32 %.161100, 1
  call void @_Z3addi(i32 noundef %68)
  %exitcond139.not = icmp eq i32 %68, %.sroa.9.0.copyload
  br i1 %exitcond139.not, label %.preheader72, label %.lr.ph101, !llvm.loop !19

.preheader71:                                     ; preds = %.lr.ph104, %.preheader72
  %.164.lcssa = phi i32 [ %.063114, %.preheader72 ], [ %.sroa.7.0.copyload, %.lr.ph104 ]
  %69 = icmp sgt i32 %.161.lcssa, %.sroa.9.0.copyload
  br i1 %69, label %.lr.ph107, label %.preheader70

.lr.ph104:                                        ; preds = %.preheader72, %.lr.ph104
  %.164103 = phi i32 [ %70, %.lr.ph104 ], [ %.063114, %.preheader72 ]
  %70 = add nsw i32 %.164103, -1
  call void @_Z3addi(i32 noundef %70)
  %71 = icmp sgt i32 %70, %.sroa.7.0.copyload
  br i1 %71, label %.lr.ph104, label %.preheader71, !llvm.loop !20

.preheader70:                                     ; preds = %.lr.ph107, %.preheader71
  %.262.lcssa = phi i32 [ %.161.lcssa, %.preheader71 ], [ %.sroa.9.0.copyload, %.lr.ph107 ]
  %72 = icmp slt i32 %.164.lcssa, %.sroa.7.0.copyload
  br i1 %72, label %.lr.ph110, label %._crit_edge111

.lr.ph107:                                        ; preds = %.preheader71, %.lr.ph107
  %.262106 = phi i32 [ %73, %.lr.ph107 ], [ %.161.lcssa, %.preheader71 ]
  call void @_Z3deli(i32 noundef %.262106)
  %73 = add nsw i32 %.262106, -1
  %74 = icmp sgt i32 %73, %.sroa.9.0.copyload
  br i1 %74, label %.lr.ph107, label %.preheader70, !llvm.loop !21

.lr.ph110:                                        ; preds = %.preheader70, %.lr.ph110
  %.265109 = phi i32 [ %75, %.lr.ph110 ], [ %.164.lcssa, %.preheader70 ]
  call void @_Z3deli(i32 noundef %.265109)
  %75 = add i32 %.265109, 1
  %exitcond140.not = icmp eq i32 %75, %.sroa.7.0.copyload
  br i1 %exitcond140.not, label %._crit_edge111, label %.lr.ph110, !llvm.loop !22

._crit_edge111:                                   ; preds = %.lr.ph110, %.preheader70
  %.265.lcssa = phi i32 [ %.164.lcssa, %.preheader70 ], [ %.sroa.7.0.copyload, %.lr.ph110 ]
  %76 = call noundef i32 @_ZN2ST5queryEv(ptr noundef nonnull align 4 dereferenceable(162408116) @t)
  %77 = sext i32 %.sroa.11.0.copyload to i64
  %78 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %77
  store i32 %76, ptr %78, align 4, !tbaa !8
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %79 = load i32, ptr %4, align 4, !tbaa !8
  %80 = sext i32 %79 to i64
  %.not68.not = icmp slt i64 %indvars.iv141, %80
  br i1 %.not68.not, label %.lr.ph120, label %.preheader, !llvm.loop !23

._crit_edge124:                                   ; preds = %.lr.ph123, %._crit_edge86, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph123:                                        ; preds = %.preheader, %.lr.ph123
  %indvars.iv144 = phi i64 [ %indvars.iv.next145, %.lr.ph123 ], [ 1, %.preheader ]
  %81 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %indvars.iv144
  %82 = load i32, ptr %81, align 4, !tbaa !8
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %83, i8 noundef signext 10)
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %85 = load i32, ptr %4, align 4, !tbaa !8
  %86 = sext i32 %85 to i64
  %.not69.not = icmp slt i64 %indvars.iv144, %86
  br i1 %.not69.not, label %.lr.ph123, label %._crit_edge124, !llvm.loop !24
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #4 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 #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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP5queryEvT_S2_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN2ST5queryEv(ptr noundef nonnull align 4 dereferenceable(162408116)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) 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

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

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

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


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