; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x13-链表与邻接表/136. 邻值查找 (main)

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

%struct.Node = type { i32, i32, i32, i32 }
%"struct.std::pair" = type { i32, 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" }

@node = external dso_local global [100010 x %struct.Node], align 16
@n = external dso_local global i32, align 4
@b = external dso_local global [100010 x i32], align 16
@ans = external dso_local global [100010 x %"struct.std::pair"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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 %"struct.std::pair", align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %32, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %23
  %25 = getelementptr inbounds %struct.Node, ptr %24, i32 0, i32 0
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %29
  %31 = getelementptr inbounds %struct.Node, ptr %30, i32 0, i32 1
  store i32 %27, ptr %31, align 4, !tbaa !9
  br label %32

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

35:                                               ; preds = %20
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds %struct.Node, ptr @node, i64 %37
  %39 = getelementptr inbounds %struct.Node, ptr %38, i64 1
  call void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef getelementptr inbounds (%struct.Node, ptr @node, i64 1), ptr noundef %39)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %75, %35
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  %44 = icmp sle i32 %41, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %78

46:                                               ; preds = %40
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = sub nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %50
  %52 = getelementptr inbounds %struct.Node, ptr %51, i32 0, i32 3
  store i32 %47, ptr %52, align 4, !tbaa !13
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sub nsw i32 %53, 1
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.Node, ptr %57, i32 0, i32 2
  store i32 %54, ptr %58, align 8, !tbaa !14
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = icmp sge i32 %59, 1
  br i1 %60, label %61, label %74

61:                                               ; preds = %46
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %65, label %74

65:                                               ; preds = %61
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %68
  %70 = getelementptr inbounds %struct.Node, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %72
  store i32 %66, ptr %73, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %65, %61, %46
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %3, align 4, !tbaa !5
  br label %40, !llvm.loop !15

78:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %79 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %79, ptr %4, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %168, %78
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = icmp sge i32 %81, 2
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %171

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  store i32 %88, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %90
  %92 = getelementptr inbounds %struct.Node, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 8, !tbaa !14
  store i32 %93, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %95
  %97 = getelementptr inbounds %struct.Node, ptr %96, i32 0, i32 3
  %98 = load i32, ptr %97, align 4, !tbaa !13
  store i32 %98, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %100
  %102 = getelementptr inbounds %struct.Node, ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 16, !tbaa !16
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %105
  %107 = getelementptr inbounds %struct.Node, ptr %106, i32 0, i32 0
  %108 = load i32, ptr %107, align 16, !tbaa !16
  %109 = sub nsw i32 %103, %108
  %110 = call i32 @llvm.abs.i32(i32 %109, i1 true)
  store i32 %110, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %112
  %114 = getelementptr inbounds %struct.Node, ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 16, !tbaa !16
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %117
  %119 = getelementptr inbounds %struct.Node, ptr %118, i32 0, i32 0
  %120 = load i32, ptr %119, align 16, !tbaa !16
  %121 = sub nsw i32 %115, %120
  %122 = call i32 @llvm.abs.i32(i32 %121, i1 true)
  store i32 %122, ptr %9, align 4, !tbaa !5
  %123 = load i32, ptr %6, align 4, !tbaa !5
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %134

125:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %127
  %129 = getelementptr inbounds %struct.Node, ptr %128, i32 0, i32 1
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %129)
  %130 = load i32, ptr %4, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %131
  %133 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %132, ptr noundef nonnull align 4 dereferenceable(8) %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %166

134:                                              ; preds = %84
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = load i32, ptr @n, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  %138 = icmp eq i32 %135, %137
  br i1 %138, label %139, label %148

139:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %140 = load i32, ptr %6, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %141
  %143 = getelementptr inbounds %struct.Node, ptr %142, i32 0, i32 1
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %143)
  %144 = load i32, ptr %4, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %145
  %147 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %146, ptr noundef nonnull align 4 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %165

148:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %149 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %149, ptr %12, align 4, !tbaa !5
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = load i32, ptr %8, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %153, label %155

153:                                              ; preds = %148
  %154 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %154, ptr %12, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %153, %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %157 = load i32, ptr %12, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %158
  %160 = getelementptr inbounds %struct.Node, ptr %159, i32 0, i32 1
  call void @_ZNSt4pairIiiEC2IRKiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %156, ptr noundef nonnull align 4 dereferenceable(4) %160)
  %161 = load i32, ptr %4, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %162
  %164 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %163, ptr noundef nonnull align 4 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %165

165:                                              ; preds = %155, %139
  br label %166

166:                                              ; preds = %165, %125
  %167 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z6removei(i32 noundef %167)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %168

168:                                              ; preds = %166
  %169 = load i32, ptr %4, align 4, !tbaa !5
  %170 = add nsw i32 %169, -1
  store i32 %170, ptr %4, align 4, !tbaa !5
  br label %80, !llvm.loop !17

171:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 2, ptr %14, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %192, %171
  %173 = load i32, ptr %14, align 4, !tbaa !5
  %174 = load i32, ptr @n, align 4, !tbaa !5
  %175 = icmp sle i32 %173, %174
  br i1 %175, label %177, label %176

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

177:                                              ; preds = %172
  %178 = load i32, ptr %14, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %179
  %181 = getelementptr inbounds %"struct.std::pair", ptr %180, i32 0, i32 0
  %182 = load i32, ptr %181, align 8, !tbaa !18
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %182)
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %183, ptr noundef @.str)
  %185 = load i32, ptr %14, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %186
  %188 = getelementptr inbounds %"struct.std::pair", ptr %187, i32 0, i32 1
  %189 = load i32, ptr %188, align 4, !tbaa !20
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %184, i32 noundef %189)
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %190, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %192

192:                                              ; preds = %177
  %193 = load i32, ptr %14, align 4, !tbaa !5
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %14, align 4, !tbaa !5
  br label %172, !llvm.loop !21

195:                                              ; preds = %176
  ret i32 0
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { 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 #8 = { 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, !6, i64 4}
!10 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !6, i64 12}
!14 = !{!10, !6, i64 8}
!15 = distinct !{!15, !12}
!16 = !{!10, !6, i64 0}
!17 = distinct !{!17, !12}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!20 = !{!19, !6, i64 4}
!21 = distinct !{!21, !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.Node = type { i32, i32, i32, i32 }
%"struct.std::pair" = type { i32, 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" }

@node = external dso_local global [100010 x %struct.Node], align 16
@n = external dso_local global i32, align 4
@b = external dso_local local_unnamed_addr global [100010 x i32], align 16
@ans = external dso_local global [100010 x %"struct.std::pair"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 4
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca %"struct.std::pair", align 4
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %.not51 = icmp slt i32 %7, 1
  br i1 %.not51, label %.._crit_edge_crit_edge, label %.lr.ph

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre74 = sext i32 %7 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre74, %.._crit_edge_crit_edge ], [ %20, %.lr.ph ]
  %8 = getelementptr inbounds %struct.Node, ptr @node, i64 %.pre-phi
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  tail call void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef nonnull getelementptr inbounds (i8, ptr @node, i64 16), ptr noundef nonnull %9)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %.not4653 = icmp slt i32 %10, 0
  br i1 %.not4653, label %._crit_edge63, label %.lr.ph56.preheader

.lr.ph56.preheader:                               ; preds = %._crit_edge
  %11 = zext nneg i32 %10 to i64
  %12 = add nuw i32 %10, 1
  %13 = zext i32 %12 to i64
  %xtraiter = and i64 %13, 1
  %14 = icmp eq i32 %10, 0
  br i1 %14, label %.preheader49.unr-lcssa, label %.lr.ph56.preheader.new

.lr.ph56.preheader.new:                           ; preds = %.lr.ph56.preheader
  %unroll_iter = and i64 %13, 4294967294
  br label %.lr.ph56

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %15 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %indvars.iv
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %17 = getelementptr inbounds i8, ptr %15, i64 4
  %18 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %18, ptr %17, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %.not.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader49.unr-lcssa:                           ; preds = %55, %.lr.ph56.preheader
  %indvars.iv65.unr = phi i64 [ 1, %.lr.ph56.preheader ], [ %indvars.iv.next66.1, %55 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader49, label %.lr.ph56.epil

.lr.ph56.epil:                                    ; preds = %.preheader49.unr-lcssa
  %21 = add nsw i64 %indvars.iv65.unr, -1
  %22 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %21, i32 3
  %23 = trunc nuw nsw i64 %indvars.iv65.unr to i32
  store i32 %23, ptr %22, align 4, !tbaa !13
  %24 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %indvars.iv65.unr
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = trunc nuw nsw i64 %21 to i32
  store i32 %26, ptr %25, align 8, !tbaa !14
  %.not48.epil = icmp ugt i64 %indvars.iv65.unr, %11
  br i1 %.not48.epil, label %.preheader49, label %27

27:                                               ; preds = %.lr.ph56.epil
  %28 = getelementptr inbounds i8, ptr %24, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %30
  store i32 %23, ptr %31, align 4, !tbaa !5
  br label %.preheader49

.preheader49:                                     ; preds = %.lr.ph56.epil, %27, %.preheader49.unr-lcssa
  %32 = icmp sgt i32 %10, 1
  br i1 %32, label %.lr.ph59.preheader, label %._crit_edge63

.lr.ph59.preheader:                               ; preds = %.preheader49
  %33 = zext nneg i32 %10 to i64
  br label %.lr.ph59

.lr.ph56:                                         ; preds = %55, %.lr.ph56.preheader.new
  %indvars.iv65 = phi i64 [ 1, %.lr.ph56.preheader.new ], [ %indvars.iv.next66.1, %55 ]
  %niter = phi i64 [ 0, %.lr.ph56.preheader.new ], [ %niter.next.1, %55 ]
  %34 = add nsw i64 %indvars.iv65, -1
  %35 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %34, i32 3
  %36 = trunc nuw nsw i64 %indvars.iv65 to i32
  store i32 %36, ptr %35, align 4, !tbaa !13
  %37 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %indvars.iv65
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = trunc nuw nsw i64 %34 to i32
  store i32 %39, ptr %38, align 8, !tbaa !14
  %.not48 = icmp ugt i64 %indvars.iv65, %11
  br i1 %.not48, label %.lr.ph56.1, label %40

40:                                               ; preds = %.lr.ph56
  %41 = getelementptr inbounds i8, ptr %37, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %43
  store i32 %36, ptr %44, align 4, !tbaa !5
  br label %.lr.ph56.1

.lr.ph56.1:                                       ; preds = %.lr.ph56, %40
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %45 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %indvars.iv65, i32 3
  %46 = trunc nuw nsw i64 %indvars.iv.next66 to i32
  store i32 %46, ptr %45, align 4, !tbaa !13
  %47 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %indvars.iv.next66
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = trunc nuw nsw i64 %indvars.iv65 to i32
  store i32 %49, ptr %48, align 8, !tbaa !14
  %.not48.1.not = icmp ult i64 %indvars.iv65, %11
  br i1 %.not48.1.not, label %50, label %55

50:                                               ; preds = %.lr.ph56.1
  %51 = getelementptr inbounds i8, ptr %47, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %53
  store i32 %46, ptr %54, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %50, %.lr.ph56.1
  %indvars.iv.next66.1 = add nuw nsw i64 %indvars.iv65, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader49.unr-lcssa, label %.lr.ph56, !llvm.loop !15

.preheader:                                       ; preds = %96
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp slt i32 %.pre, 2
  br i1 %56, label %._crit_edge63, label %.lr.ph62

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %96
  %indvars.iv68 = phi i64 [ %33, %.lr.ph59.preheader ], [ %indvars.iv.next69, %96 ]
  %57 = getelementptr inbounds [100010 x i32], ptr @b, i64 0, i64 %indvars.iv68
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %59
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  %62 = load i32, ptr %61, align 8, !tbaa !14
  %63 = getelementptr inbounds i8, ptr %60, i64 12
  %64 = load i32, ptr %63, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %65 = load i32, ptr %60, align 16, !tbaa !16
  %66 = sext i32 %62 to i64
  %67 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %66
  %68 = load i32, ptr %67, align 16, !tbaa !16
  %69 = sub nsw i32 %65, %68
  %70 = call i32 @llvm.abs.i32(i32 %69, i1 true)
  store i32 %70, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %71 = sext i32 %64 to i64
  %72 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %71
  %73 = load i32, ptr %72, align 16, !tbaa !16
  %74 = sub nsw i32 %65, %73
  %75 = call i32 @llvm.abs.i32(i32 %74, i1 true)
  store i32 %75, ptr %2, align 4, !tbaa !5
  %76 = icmp eq i32 %62, 0
  br i1 %76, label %77, label %81

77:                                               ; preds = %.lr.ph59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %78 = getelementptr inbounds i8, ptr %72, i64 4
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %78)
  %79 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %indvars.iv68
  %80 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %79, ptr noundef nonnull align 4 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %96

81:                                               ; preds = %.lr.ph59
  %82 = load i32, ptr @n, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  %84 = icmp eq i32 %64, %83
  br i1 %84, label %85, label %89

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %86 = getelementptr inbounds i8, ptr %67, i64 4
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %86)
  %87 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %indvars.iv68
  %88 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %87, ptr noundef nonnull align 4 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %96

89:                                               ; preds = %81
  %90 = icmp ult i32 %75, %70
  %spec.select = select i1 %90, i32 %64, i32 %62
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %92 = sext i32 %spec.select to i64
  %93 = getelementptr inbounds [100010 x %struct.Node], ptr @node, i64 0, i64 %92, i32 1
  call void @_ZNSt4pairIiiEC2IRKiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %91, ptr noundef nonnull align 4 dereferenceable(4) %93)
  %94 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %indvars.iv68
  %95 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %94, ptr noundef nonnull align 4 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %96

96:                                               ; preds = %85, %89, %77
  call void @_Z6removei(i32 noundef %58)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %indvars.iv.next69 = add nsw i64 %indvars.iv68, -1
  %97 = icmp sgt i64 %indvars.iv68, 2
  br i1 %97, label %.lr.ph59, label %.preheader, !llvm.loop !17

._crit_edge63:                                    ; preds = %.lr.ph62, %._crit_edge, %.preheader49, %.preheader
  ret i32 0

.lr.ph62:                                         ; preds = %.preheader, %.lr.ph62
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %.lr.ph62 ], [ 2, %.preheader ]
  %98 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @ans, i64 0, i64 %indvars.iv71
  %99 = load i32, ptr %98, align 8, !tbaa !18
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %99)
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @.str)
  %102 = getelementptr inbounds i8, ptr %98, i64 4
  %103 = load i32, ptr %102, align 4, !tbaa !20
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %101, i32 noundef %103)
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %106 = load i32, ptr @n, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %.not47.not = icmp slt i64 %indvars.iv71, %107
  br i1 %.not47.not, label %.lr.ph62, label %._crit_edge63, !llvm.loop !21
}

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

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

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

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

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

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

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

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

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

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

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

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

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


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