; LLVM IR from eyangch/competitive-programming :: Codeforces/1738 (e)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@MOD = external dso_local global i64, align 8
@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@A = external dso_local global [100001 x i64], align 16
@S = external dso_local global [100001 x i64], align 16
@Q = external dso_local global [100002 x i64], align 16
@f = external dso_local global [100005 x i64], align 16
@fi = external dso_local global [100005 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3invx(i64 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4calcxxx(i64 noundef, i64 noundef, i64 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %15
  %17 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef null)
  %18 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  store i64 1, ptr @f, align 16, !tbaa !8
  store i64 1, ptr @fi, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 1, ptr %2, align 8, !tbaa !8
  br label %19

19:                                               ; preds = %40, %0
  %20 = load i64, ptr %2, align 8, !tbaa !8
  %21 = icmp slt i64 %20, 100005
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %43

23:                                               ; preds = %19
  %24 = load i64, ptr %2, align 8, !tbaa !8
  %25 = sub nsw i64 %24, 1
  %26 = getelementptr inbounds [100005 x i64], ptr @f, i64 0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !8
  %28 = load i64, ptr %2, align 8, !tbaa !8
  %29 = mul nsw i64 %27, %28
  %30 = load i64, ptr @MOD, align 8, !tbaa !8
  %31 = srem i64 %29, %30
  %32 = load i64, ptr %2, align 8, !tbaa !8
  %33 = getelementptr inbounds [100005 x i64], ptr @f, i64 0, i64 %32
  store i64 %31, ptr %33, align 8, !tbaa !8
  %34 = load i64, ptr %2, align 8, !tbaa !8
  %35 = getelementptr inbounds [100005 x i64], ptr @f, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !8
  %37 = call noundef i64 @_Z3invx(i64 noundef %36)
  %38 = load i64, ptr %2, align 8, !tbaa !8
  %39 = getelementptr inbounds [100005 x i64], ptr @fi, i64 0, i64 %38
  store i64 %37, ptr %39, align 8, !tbaa !8
  br label %40

40:                                               ; preds = %23
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = add nsw i64 %41, 1
  store i64 %42, ptr %2, align 8, !tbaa !8
  br label %19, !llvm.loop !11

43:                                               ; preds = %22
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %45

45:                                               ; preds = %234, %43
  %46 = load i64, ptr @T, align 8, !tbaa !8
  %47 = add nsw i64 %46, -1
  store i64 %47, ptr @T, align 8, !tbaa !8
  %48 = icmp ne i64 %46, 0
  br i1 %48, label %49, label %238

49:                                               ; preds = %45
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 1, ptr %3, align 8, !tbaa !8
  br label %51

51:                                               ; preds = %60, %49
  %52 = load i64, ptr %3, align 8, !tbaa !8
  %53 = load i64, ptr @N, align 8, !tbaa !8
  %54 = icmp sle i64 %52, %53
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %51
  %57 = load i64, ptr %3, align 8, !tbaa !8
  %58 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %57
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %58)
  br label %60

60:                                               ; preds = %56
  %61 = load i64, ptr %3, align 8, !tbaa !8
  %62 = add nsw i64 %61, 1
  store i64 %62, ptr %3, align 8, !tbaa !8
  br label %51, !llvm.loop !13

63:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 1, ptr %4, align 8, !tbaa !8
  br label %64

64:                                               ; preds = %80, %63
  %65 = load i64, ptr %4, align 8, !tbaa !8
  %66 = load i64, ptr @N, align 8, !tbaa !8
  %67 = icmp sle i64 %65, %66
  br i1 %67, label %69, label %68

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

69:                                               ; preds = %64
  %70 = load i64, ptr %4, align 8, !tbaa !8
  %71 = sub nsw i64 %70, 1
  %72 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !8
  %74 = load i64, ptr %4, align 8, !tbaa !8
  %75 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !8
  %77 = add nsw i64 %73, %76
  %78 = load i64, ptr %4, align 8, !tbaa !8
  %79 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %78
  store i64 %77, ptr %79, align 8, !tbaa !8
  br label %80

80:                                               ; preds = %69
  %81 = load i64, ptr %4, align 8, !tbaa !8
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %4, align 8, !tbaa !8
  br label %64, !llvm.loop !14

83:                                               ; preds = %68
  %84 = load i64, ptr @N, align 8, !tbaa !8
  %85 = add nsw i64 %84, 1
  %86 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %85
  store i64 0, ptr %86, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %87 = load i64, ptr @N, align 8, !tbaa !8
  store i64 %87, ptr %5, align 8, !tbaa !8
  br label %88

88:                                               ; preds = %103, %83
  %89 = load i64, ptr %5, align 8, !tbaa !8
  %90 = icmp sgt i64 %89, 0
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %106

92:                                               ; preds = %88
  %93 = load i64, ptr %5, align 8, !tbaa !8
  %94 = add nsw i64 %93, 1
  %95 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !8
  %97 = load i64, ptr %5, align 8, !tbaa !8
  %98 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = add nsw i64 %96, %99
  %101 = load i64, ptr %5, align 8, !tbaa !8
  %102 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %101
  store i64 %100, ptr %102, align 8, !tbaa !8
  br label %103

103:                                              ; preds = %92
  %104 = load i64, ptr %5, align 8, !tbaa !8
  %105 = add nsw i64 %104, -1
  store i64 %105, ptr %5, align 8, !tbaa !8
  br label %88, !llvm.loop !15

106:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 1, ptr %6, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %107 = load i64, ptr @N, align 8, !tbaa !8
  store i64 %107, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 1, ptr %10, align 8, !tbaa !8
  br label %108

108:                                              ; preds = %222, %106
  %109 = load i64, ptr %6, align 8, !tbaa !8
  %110 = load i64, ptr %7, align 8, !tbaa !8
  %111 = icmp sle i64 %109, %110
  br i1 %111, label %112, label %223

112:                                              ; preds = %108
  br label %113

113:                                              ; preds = %141, %112
  %114 = load i64, ptr %6, align 8, !tbaa !8
  %115 = load i64, ptr %7, align 8, !tbaa !8
  %116 = icmp slt i64 %114, %115
  br i1 %116, label %117, label %125

117:                                              ; preds = %113
  %118 = load i64, ptr %6, align 8, !tbaa !8
  %119 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %118
  %120 = load i64, ptr %119, align 8, !tbaa !8
  %121 = load i64, ptr %7, align 8, !tbaa !8
  %122 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !8
  %124 = icmp ne i64 %120, %123
  br label %125

125:                                              ; preds = %117, %113
  %126 = phi i1 [ false, %113 ], [ %124, %117 ]
  br i1 %126, label %127, label %142

127:                                              ; preds = %125
  %128 = load i64, ptr %6, align 8, !tbaa !8
  %129 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !8
  %131 = load i64, ptr %7, align 8, !tbaa !8
  %132 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !8
  %134 = icmp slt i64 %130, %133
  br i1 %134, label %135, label %138

135:                                              ; preds = %127
  %136 = load i64, ptr %6, align 8, !tbaa !8
  %137 = add nsw i64 %136, 1
  store i64 %137, ptr %6, align 8, !tbaa !8
  br label %141

138:                                              ; preds = %127
  %139 = load i64, ptr %7, align 8, !tbaa !8
  %140 = add nsw i64 %139, -1
  store i64 %140, ptr %7, align 8, !tbaa !8
  br label %141

141:                                              ; preds = %138, %135
  br label %113, !llvm.loop !16

142:                                              ; preds = %125
  br label %143

143:                                              ; preds = %157, %142
  %144 = load i64, ptr %6, align 8, !tbaa !8
  %145 = load i64, ptr %7, align 8, !tbaa !8
  %146 = icmp slt i64 %144, %145
  br i1 %146, label %147, label %155

147:                                              ; preds = %143
  %148 = load i64, ptr %6, align 8, !tbaa !8
  %149 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %148
  %150 = load i64, ptr %149, align 8, !tbaa !8
  %151 = load i64, ptr %7, align 8, !tbaa !8
  %152 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %151
  %153 = load i64, ptr %152, align 8, !tbaa !8
  %154 = icmp eq i64 %150, %153
  br label %155

155:                                              ; preds = %147, %143
  %156 = phi i1 [ false, %143 ], [ %154, %147 ]
  br i1 %156, label %157, label %162

157:                                              ; preds = %155
  %158 = load i64, ptr %6, align 8, !tbaa !8
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %6, align 8, !tbaa !8
  %160 = load i64, ptr %8, align 8, !tbaa !8
  %161 = add nsw i64 %160, 1
  store i64 %161, ptr %8, align 8, !tbaa !8
  br label %143, !llvm.loop !17

162:                                              ; preds = %155
  %163 = load i64, ptr %6, align 8, !tbaa !8
  %164 = add nsw i64 %163, -1
  store i64 %164, ptr %6, align 8, !tbaa !8
  br label %165

165:                                              ; preds = %179, %162
  %166 = load i64, ptr %6, align 8, !tbaa !8
  %167 = load i64, ptr %7, align 8, !tbaa !8
  %168 = icmp slt i64 %166, %167
  br i1 %168, label %169, label %177

169:                                              ; preds = %165
  %170 = load i64, ptr %6, align 8, !tbaa !8
  %171 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !8
  %173 = load i64, ptr %7, align 8, !tbaa !8
  %174 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !8
  %176 = icmp eq i64 %172, %175
  br label %177

177:                                              ; preds = %169, %165
  %178 = phi i1 [ false, %165 ], [ %176, %169 ]
  br i1 %178, label %179, label %184

179:                                              ; preds = %177
  %180 = load i64, ptr %7, align 8, !tbaa !8
  %181 = add nsw i64 %180, -1
  store i64 %181, ptr %7, align 8, !tbaa !8
  %182 = load i64, ptr %9, align 8, !tbaa !8
  %183 = add nsw i64 %182, 1
  store i64 %183, ptr %9, align 8, !tbaa !8
  br label %165, !llvm.loop !18

184:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !8
  %185 = load i64, ptr %6, align 8, !tbaa !8
  %186 = load i64, ptr %7, align 8, !tbaa !8
  %187 = icmp eq i64 %185, %186
  br i1 %187, label %188, label %203

188:                                              ; preds = %184
  %189 = load i64, ptr %6, align 8, !tbaa !8
  %190 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !8
  %192 = icmp eq i64 %191, 0
  br i1 %192, label %193, label %203

193:                                              ; preds = %188
  %194 = load i64, ptr %8, align 8, !tbaa !8
  %195 = load i64, ptr %9, align 8, !tbaa !8
  %196 = add nsw i64 %194, %195
  %197 = sub nsw i64 %196, 1
  %198 = load i64, ptr %8, align 8, !tbaa !8
  %199 = load i64, ptr %9, align 8, !tbaa !8
  %200 = add nsw i64 %198, %199
  %201 = sub nsw i64 %200, 1
  %202 = call noundef i64 @_Z4calcxxx(i64 noundef %197, i64 noundef 1, i64 noundef %201)
  store i64 %202, ptr %11, align 8, !tbaa !8
  br label %207

203:                                              ; preds = %188, %184
  %204 = load i64, ptr %8, align 8, !tbaa !8
  %205 = load i64, ptr %9, align 8, !tbaa !8
  %206 = call noundef i64 @_Z4calcxxx(i64 noundef %204, i64 noundef %205, i64 noundef -1)
  store i64 %206, ptr %11, align 8, !tbaa !8
  br label %207

207:                                              ; preds = %203, %193
  %208 = load i64, ptr %10, align 8, !tbaa !8
  %209 = load i64, ptr %11, align 8, !tbaa !8
  %210 = mul nsw i64 %208, %209
  %211 = load i64, ptr @MOD, align 8, !tbaa !8
  %212 = srem i64 %210, %211
  store i64 %212, ptr %10, align 8, !tbaa !8
  store i64 0, ptr %9, align 8, !tbaa !8
  store i64 0, ptr %8, align 8, !tbaa !8
  %213 = load i64, ptr %6, align 8, !tbaa !8
  %214 = add nsw i64 %213, 1
  store i64 %214, ptr %6, align 8, !tbaa !8
  %215 = load i64, ptr %6, align 8, !tbaa !8
  %216 = load i64, ptr %7, align 8, !tbaa !8
  %217 = icmp sge i64 %215, %216
  br i1 %217, label %218, label %219

218:                                              ; preds = %207
  store i32 17, ptr %12, align 4
  br label %220

219:                                              ; preds = %207
  store i32 0, ptr %12, align 4
  br label %220

220:                                              ; preds = %219, %218
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %221 = load i32, ptr %12, align 4
  switch i32 %221, label %240 [
    i32 0, label %222
    i32 17, label %223
  ]

222:                                              ; preds = %220
  br label %108, !llvm.loop !19

223:                                              ; preds = %220, %108
  %224 = load i64, ptr @N, align 8, !tbaa !8
  %225 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %224
  %226 = load i64, ptr %225, align 8, !tbaa !8
  %227 = icmp eq i64 %226, 0
  br i1 %227, label %228, label %234

228:                                              ; preds = %223
  %229 = load i64, ptr @N, align 8, !tbaa !8
  %230 = sub nsw i64 %229, 1
  %231 = load i64, ptr @N, align 8, !tbaa !8
  %232 = sub nsw i64 %231, 1
  %233 = call noundef i64 @_Z4calcxxx(i64 noundef %230, i64 noundef 1, i64 noundef %232)
  store i64 %233, ptr %10, align 8, !tbaa !8
  br label %234

234:                                              ; preds = %228, %223
  %235 = load i64, ptr %10, align 8, !tbaa !8
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %235)
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %236, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %45, !llvm.loop !20

238:                                              ; preds = %45
  %239 = load i32, ptr %1, align 4
  ret i32 %239

240:                                              ; preds = %220
  unreachable
}

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 = !{!"long long", !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}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@MOD = external dso_local local_unnamed_addr global i64, align 8
@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@A = external dso_local global [100001 x i64], align 16
@S = external dso_local local_unnamed_addr global [100001 x i64], align 16
@Q = external dso_local local_unnamed_addr global [100002 x i64], align 16
@f = external dso_local local_unnamed_addr global [100005 x i64], align 16
@fi = external dso_local local_unnamed_addr global [100005 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3invx(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4calcxxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %2 = getelementptr i8, ptr %1, i64 -24
  %3 = load i64, ptr %2, align 8
  %4 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %3
  %5 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %4, ptr noundef null)
  %6 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  store i64 1, ptr @f, align 16, !tbaa !8
  store i64 1, ptr @fi, align 16, !tbaa !8
  br label %11

7:                                                ; preds = %11
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %9 = load i64, ptr @T, align 8, !tbaa !8
  %10 = add nsw i64 %9, -1
  store i64 %10, ptr @T, align 8, !tbaa !8
  %.not128 = icmp eq i64 %9, 0
  br i1 %.not128, label %._crit_edge131, label %.lr.ph130

11:                                               ; preds = %0, %11
  %.08094 = phi i64 [ 1, %0 ], [ %21, %11 ]
  %12 = add nsw i64 %.08094, -1
  %13 = getelementptr inbounds [100005 x i64], ptr @f, i64 0, i64 %12
  %14 = load i64, ptr %13, align 8, !tbaa !8
  %15 = mul nsw i64 %14, %.08094
  %16 = load i64, ptr @MOD, align 8, !tbaa !8
  %17 = srem i64 %15, %16
  %18 = getelementptr inbounds [100005 x i64], ptr @f, i64 0, i64 %.08094
  store i64 %17, ptr %18, align 8, !tbaa !8
  %19 = tail call noundef i64 @_Z3invx(i64 noundef %17)
  %20 = getelementptr inbounds [100005 x i64], ptr @fi, i64 0, i64 %.08094
  store i64 %19, ptr %20, align 8, !tbaa !8
  %21 = add nuw nsw i64 %.08094, 1
  %exitcond.not = icmp eq i64 %21, 100005
  br i1 %exitcond.not, label %7, label %11, !llvm.loop !11

.lr.ph130:                                        ; preds = %7, %124
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %23 = load i64, ptr @N, align 8, !tbaa !8
  %.not8695 = icmp slt i64 %23, 1
  br i1 %.not8695, label %._crit_edge.thread, label %.lr.ph

.preheader93:                                     ; preds = %.lr.ph
  %.not8797 = icmp slt i64 %28, 1
  br i1 %.not8797, label %._crit_edge.thread, label %.lr.ph99.preheader

.lr.ph99.preheader:                               ; preds = %.preheader93
  %.pre = load i64, ptr @S, align 16, !tbaa !8
  %xtraiter = and i64 %28, 3
  %24 = icmp ult i64 %28, 4
  br i1 %24, label %._crit_edge.unr-lcssa, label %.lr.ph99.preheader.new

.lr.ph99.preheader.new:                           ; preds = %.lr.ph99.preheader
  %unroll_iter = and i64 %28, 9223372036854775804
  br label %.lr.ph99

.lr.ph:                                           ; preds = %.lr.ph130, %.lr.ph
  %.07996 = phi i64 [ %27, %.lr.ph ], [ 1, %.lr.ph130 ]
  %25 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %.07996
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %27 = add nuw nsw i64 %.07996, 1
  %28 = load i64, ptr @N, align 8, !tbaa !8
  %.not86.not = icmp slt i64 %.07996, %28
  br i1 %.not86.not, label %.lr.ph, label %.preheader93, !llvm.loop !13

._crit_edge.thread:                               ; preds = %.preheader93, %.lr.ph130
  %.lcssa139.ph = phi i64 [ %28, %.preheader93 ], [ %23, %.lr.ph130 ]
  %.pre-phi142 = add nsw i64 %.lcssa139.ph, 1
  %29 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %.pre-phi142
  store i64 0, ptr %29, align 8, !tbaa !8
  br label %.preheader92.preheader

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph99, %.lr.ph99.preheader
  %.unr = phi i64 [ %.pre, %.lr.ph99.preheader ], [ %55, %.lr.ph99 ]
  %.07898.unr = phi i64 [ 1, %.lr.ph99.preheader ], [ %57, %.lr.ph99 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph99.epil

.lr.ph99.epil:                                    ; preds = %._crit_edge.unr-lcssa, %.lr.ph99.epil
  %30 = phi i64 [ %33, %.lr.ph99.epil ], [ %.unr, %._crit_edge.unr-lcssa ]
  %.07898.epil = phi i64 [ %35, %.lr.ph99.epil ], [ %.07898.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph99.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %31 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %.07898.epil
  %32 = load i64, ptr %31, align 8, !tbaa !8
  %33 = add nsw i64 %32, %30
  %34 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %.07898.epil
  store i64 %33, ptr %34, align 8, !tbaa !8
  %35 = add nuw i64 %.07898.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph99.epil, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph99.epil, %._crit_edge.unr-lcssa
  %.pre-phi = add nuw i64 %28, 1
  %36 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %.pre-phi
  store i64 0, ptr %36, align 8, !tbaa !8
  br label %.lr.ph102

.lr.ph99:                                         ; preds = %.lr.ph99, %.lr.ph99.preheader.new
  %37 = phi i64 [ %.pre, %.lr.ph99.preheader.new ], [ %55, %.lr.ph99 ]
  %.07898 = phi i64 [ 1, %.lr.ph99.preheader.new ], [ %57, %.lr.ph99 ]
  %niter = phi i64 [ 0, %.lr.ph99.preheader.new ], [ %niter.next.3, %.lr.ph99 ]
  %38 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %.07898
  %39 = load i64, ptr %38, align 8, !tbaa !8
  %40 = add nsw i64 %39, %37
  %41 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %.07898
  store i64 %40, ptr %41, align 8, !tbaa !8
  %42 = add nuw nsw i64 %.07898, 1
  %43 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !8
  %45 = add nsw i64 %44, %40
  %46 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %42
  store i64 %45, ptr %46, align 8, !tbaa !8
  %47 = add nuw nsw i64 %.07898, 2
  %48 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !8
  %50 = add nsw i64 %49, %45
  %51 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %47
  store i64 %50, ptr %51, align 8, !tbaa !8
  %52 = add nuw i64 %.07898, 3
  %53 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !8
  %55 = add nsw i64 %54, %50
  %56 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %52
  store i64 %55, ptr %56, align 8, !tbaa !8
  %57 = add nuw i64 %.07898, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %.lr.ph99, !llvm.loop !16

.lr.ph102:                                        ; preds = %._crit_edge, %.lr.ph102
  %58 = phi i64 [ %61, %.lr.ph102 ], [ 0, %._crit_edge ]
  %.077100 = phi i64 [ %63, %.lr.ph102 ], [ %28, %._crit_edge ]
  %59 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %.077100
  %60 = load i64, ptr %59, align 8, !tbaa !8
  %61 = add nsw i64 %60, %58
  %62 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %.077100
  store i64 %61, ptr %62, align 8, !tbaa !8
  %63 = add nsw i64 %.077100, -1
  %64 = icmp ugt i64 %.077100, 1
  br i1 %64, label %.lr.ph102, label %.preheader92.preheader, !llvm.loop !17

.preheader92.preheader:                           ; preds = %.lr.ph102, %._crit_edge.thread
  %.070.ph = phi i64 [ %.lcssa139.ph, %._crit_edge.thread ], [ %28, %.lr.ph102 ]
  br label %.preheader92

.preheader92:                                     ; preds = %.preheader92.preheader, %112
  %.073 = phi i64 [ %.376.lcssa148157, %112 ], [ 1, %.preheader92.preheader ]
  %.070 = phi i64 [ %.3.lcssa160, %112 ], [ %.070.ph, %.preheader92.preheader ]
  %.065 = phi i64 [ %115, %112 ], [ 1, %.preheader92.preheader ]
  %.not88 = icmp sgt i64 %.073, %.070
  br i1 %.not88, label %116, label %.preheader

.preheader:                                       ; preds = %.preheader92
  %65 = icmp slt i64 %.073, %.070
  br i1 %65, label %.lr.ph105, label %.critedge

.lr.ph105:                                        ; preds = %.preheader, %70
  %.171104 = phi i64 [ %.272, %70 ], [ %.070, %.preheader ]
  %.174103 = phi i64 [ %.275, %70 ], [ %.073, %.preheader ]
  %66 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %.174103
  %67 = load i64, ptr %66, align 8, !tbaa !8
  %68 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %.171104
  %69 = load i64, ptr %68, align 8, !tbaa !8
  %.not89 = icmp eq i64 %67, %69
  br i1 %.not89, label %.critedge, label %70

70:                                               ; preds = %.lr.ph105
  %71 = icmp slt i64 %67, %69
  %72 = zext i1 %71 to i64
  %.275 = add nsw i64 %.174103, %72
  %not. = xor i1 %71, true
  %73 = sext i1 %not. to i64
  %.272 = add nsw i64 %.171104, %73
  %74 = icmp slt i64 %.275, %.272
  br i1 %74, label %.lr.ph105, label %.critedge, !llvm.loop !18

.critedge:                                        ; preds = %.lr.ph105, %70, %.preheader
  %.174.lcssa = phi i64 [ %.073, %.preheader ], [ %.275, %70 ], [ %.174103, %.lr.ph105 ]
  %.171.lcssa = phi i64 [ %.070, %.preheader ], [ %.272, %70 ], [ %.171104, %.lr.ph105 ]
  %75 = icmp slt i64 %.174.lcssa, %.171.lcssa
  br i1 %75, label %.lr.ph113, label %.critedge2

.lr.ph113:                                        ; preds = %.critedge
  %76 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %.171.lcssa
  %77 = load i64, ptr %76, align 8, !tbaa !8
  %78 = sub i64 %.171.lcssa, %.174.lcssa
  br label %79

79:                                               ; preds = %.lr.ph113, %83
  %.169112 = phi i64 [ 0, %.lr.ph113 ], [ %85, %83 ]
  %.376111 = phi i64 [ %.174.lcssa, %.lr.ph113 ], [ %84, %83 ]
  %80 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %.376111
  %81 = load i64, ptr %80, align 8, !tbaa !8
  %82 = icmp eq i64 %81, %77
  br i1 %82, label %83, label %.critedge2

83:                                               ; preds = %79
  %84 = add nsw i64 %.376111, 1
  %85 = add nuw i64 %.169112, 1
  %exitcond134.not = icmp eq i64 %85, %78
  br i1 %exitcond134.not, label %.critedge2.thread, label %79, !llvm.loop !19

.critedge2.thread:                                ; preds = %83
  %86 = add i64 %.171.lcssa, -1
  br label %.lr.ph122

.critedge2:                                       ; preds = %79, %.critedge
  %.376.lcssa = phi i64 [ %.174.lcssa, %.critedge ], [ %.376111, %79 ]
  %.169.lcssa = phi i64 [ 0, %.critedge ], [ %.169112, %79 ]
  %87 = add i64 %.376.lcssa, -1
  %.not90119 = icmp sgt i64 %.376.lcssa, %.171.lcssa
  br i1 %.not90119, label %.critedge4, label %.lr.ph122

.lr.ph122:                                        ; preds = %.critedge2.thread, %.critedge2
  %88 = phi i64 [ %86, %.critedge2.thread ], [ %87, %.critedge2 ]
  %.169.lcssa149 = phi i64 [ %78, %.critedge2.thread ], [ %.169.lcssa, %.critedge2 ]
  %.376.lcssa147 = phi i64 [ %.171.lcssa, %.critedge2.thread ], [ %.376.lcssa, %.critedge2 ]
  %89 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !8
  %91 = add i64 %.171.lcssa, 1
  %92 = sub i64 %91, %.376.lcssa147
  br label %93

93:                                               ; preds = %.lr.ph122, %97
  %.167121 = phi i64 [ 0, %.lr.ph122 ], [ %99, %97 ]
  %.3120 = phi i64 [ %.171.lcssa, %.lr.ph122 ], [ %98, %97 ]
  %94 = getelementptr inbounds [100002 x i64], ptr @Q, i64 0, i64 %.3120
  %95 = load i64, ptr %94, align 8, !tbaa !8
  %96 = icmp eq i64 %90, %95
  br i1 %96, label %97, label %.critedge4

97:                                               ; preds = %93
  %98 = add nsw i64 %.3120, -1
  %99 = add nuw i64 %.167121, 1
  %exitcond135.not = icmp eq i64 %99, %92
  br i1 %exitcond135.not, label %.critedge4.thread, label %93, !llvm.loop !20

.critedge4:                                       ; preds = %93, %.critedge2
  %100 = phi i64 [ %87, %.critedge2 ], [ %88, %93 ]
  %.169.lcssa150 = phi i64 [ %.169.lcssa, %.critedge2 ], [ %.169.lcssa149, %93 ]
  %.376.lcssa148 = phi i64 [ %.376.lcssa, %.critedge2 ], [ %.376.lcssa147, %93 ]
  %.3.lcssa = phi i64 [ %.171.lcssa, %.critedge2 ], [ %.3120, %93 ]
  %.167.lcssa = phi i64 [ 0, %.critedge2 ], [ %.167121, %93 ]
  %101 = icmp eq i64 %100, %.3.lcssa
  br i1 %101, label %.critedge4.thread, label %110

.critedge4.thread:                                ; preds = %97, %.critedge4
  %.167.lcssa163 = phi i64 [ %.167.lcssa, %.critedge4 ], [ %92, %97 ]
  %.3.lcssa162 = phi i64 [ %.3.lcssa, %.critedge4 ], [ %88, %97 ]
  %.376.lcssa148159 = phi i64 [ %.376.lcssa148, %.critedge4 ], [ %.376.lcssa147, %97 ]
  %.169.lcssa150156 = phi i64 [ %.169.lcssa150, %.critedge4 ], [ %.169.lcssa149, %97 ]
  %102 = phi i64 [ %100, %.critedge4 ], [ %88, %97 ]
  %103 = getelementptr inbounds [100001 x i64], ptr @A, i64 0, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !8
  %105 = icmp eq i64 %104, 0
  br i1 %105, label %106, label %110

106:                                              ; preds = %.critedge4.thread
  %107 = add i64 %.169.lcssa150156, -1
  %108 = add i64 %107, %.167.lcssa163
  %109 = tail call noundef i64 @_Z4calcxxx(i64 noundef %108, i64 noundef 1, i64 noundef %108)
  br label %112

110:                                              ; preds = %.critedge4.thread, %.critedge4
  %.167.lcssa164 = phi i64 [ %.167.lcssa163, %.critedge4.thread ], [ %.167.lcssa, %.critedge4 ]
  %.3.lcssa161 = phi i64 [ %.3.lcssa162, %.critedge4.thread ], [ %.3.lcssa, %.critedge4 ]
  %.376.lcssa148158 = phi i64 [ %.376.lcssa148159, %.critedge4.thread ], [ %.376.lcssa148, %.critedge4 ]
  %.169.lcssa150155 = phi i64 [ %.169.lcssa150156, %.critedge4.thread ], [ %.169.lcssa150, %.critedge4 ]
  %111 = tail call noundef i64 @_Z4calcxxx(i64 noundef %.169.lcssa150155, i64 noundef %.167.lcssa164, i64 noundef -1)
  br label %112

112:                                              ; preds = %110, %106
  %.3.lcssa160 = phi i64 [ %.3.lcssa162, %106 ], [ %.3.lcssa161, %110 ]
  %.376.lcssa148157 = phi i64 [ %.376.lcssa148159, %106 ], [ %.376.lcssa148158, %110 ]
  %.064 = phi i64 [ %109, %106 ], [ %111, %110 ]
  %113 = mul nsw i64 %.064, %.065
  %114 = load i64, ptr @MOD, align 8, !tbaa !8
  %115 = srem i64 %113, %114
  %.not91 = icmp slt i64 %.376.lcssa148157, %.3.lcssa160
  br i1 %.not91, label %.preheader92, label %116

116:                                              ; preds = %112, %.preheader92
  %.1 = phi i64 [ %115, %112 ], [ %.065, %.preheader92 ]
  %117 = load i64, ptr @N, align 8, !tbaa !8
  %118 = getelementptr inbounds [100001 x i64], ptr @S, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !8
  %120 = icmp eq i64 %119, 0
  br i1 %120, label %121, label %124

121:                                              ; preds = %116
  %122 = add nsw i64 %117, -1
  %123 = tail call noundef i64 @_Z4calcxxx(i64 noundef %122, i64 noundef 1, i64 noundef %122)
  br label %124

124:                                              ; preds = %121, %116
  %.2 = phi i64 [ %123, %121 ], [ %.1, %116 ]
  %125 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.2)
  %126 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %125, i8 noundef signext 10)
  %127 = load i64, ptr @T, align 8, !tbaa !8
  %128 = add nsw i64 %127, -1
  store i64 %128, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %127, 0
  br i1 %.not, label %._crit_edge131, label %.lr.ph130, !llvm.loop !21

._crit_edge131:                                   ; preds = %124, %7
  ret i32 0
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 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 #4

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

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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" }

!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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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