; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x18-总结与练习/156. 矩阵 (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"

%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"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" }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@f = external dso_local global [1010 x [1010 x i64]], align 16
@p = external dso_local global [1020100 x i64], align 16
@allHash = external dso_local global %"class.std::unordered_set", align 8
@m = external dso_local global i64, align 8
@n = external dso_local global i64, align 8
@a = external dso_local global i64, align 8
@b = external dso_local global i64, align 8
@q = external dso_local global i64, align 8
@str = external dso_local global [1010 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4calcPyii(ptr noundef, i32 noundef, 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 i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @m)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) @a)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) @b)
  store i64 1, ptr @p, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %37, %0
  %20 = load i32, ptr %2, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = load i64, ptr @m, align 8, !tbaa !5
  %23 = load i64, ptr @n, align 8, !tbaa !5
  %24 = mul i64 %22, %23
  %25 = icmp ule i64 %21, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %19
  %28 = load i32, ptr %2, align 4, !tbaa !9
  %29 = sub nsw i32 %28, 1
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = mul i64 %32, 131
  %34 = load i32, ptr %2, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %35
  store i64 %33, ptr %36, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %27
  %38 = load i32, ptr %2, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %2, align 4, !tbaa !9
  br label %19, !llvm.loop !11

40:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %82, %40
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = load i64, ptr @m, align 8, !tbaa !5
  %45 = icmp ule i64 %43, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %85

47:                                               ; preds = %41
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef getelementptr inbounds (i8, ptr @str, i64 1))
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %78, %47
  %50 = load i32, ptr %5, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = load i64, ptr @n, align 8, !tbaa !5
  %53 = icmp ule i64 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %49
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %81

55:                                               ; preds = %49
  %56 = load i32, ptr %3, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %57
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = sub nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [1010 x i64], ptr %58, i64 0, i64 %61
  %63 = load i64, ptr %62, align 8, !tbaa !5
  %64 = mul i64 %63, 131
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %66
  %68 = load i8, ptr %67, align 1, !tbaa !13
  %69 = sext i8 %68 to i64
  %70 = add i64 %64, %69
  %71 = sub i64 %70, 48
  %72 = load i32, ptr %3, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %73
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1010 x i64], ptr %74, i64 0, i64 %76
  store i64 %71, ptr %77, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %55
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %5, align 4, !tbaa !9
  br label %49, !llvm.loop !14

81:                                               ; preds = %54
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %3, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %3, align 4, !tbaa !9
  br label %41, !llvm.loop !15

85:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %86 = load i64, ptr @b, align 8, !tbaa !5
  %87 = trunc i64 %86 to i32
  store i32 %87, ptr %6, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %161, %85
  %89 = load i32, ptr %6, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = load i64, ptr @n, align 8, !tbaa !5
  %92 = icmp ule i64 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %88
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %164

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = load i64, ptr @b, align 8, !tbaa !5
  %98 = sub i64 %96, %97
  %99 = add i64 %98, 1
  %100 = trunc i64 %99 to i32
  store i32 %100, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %101 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %101, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %157, %94
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = load i64, ptr @m, align 8, !tbaa !5
  %106 = icmp ule i64 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %102
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %160

108:                                              ; preds = %102
  %109 = load i64, ptr %7, align 8, !tbaa !5
  %110 = load i64, ptr @b, align 8, !tbaa !5
  %111 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !5
  %113 = mul i64 %109, %112
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %115
  %117 = getelementptr inbounds [1010 x i64], ptr %116, i64 0, i64 0
  %118 = load i32, ptr %8, align 4, !tbaa !9
  %119 = load i32, ptr %9, align 4, !tbaa !9
  %120 = call noundef i64 @_Z4calcPyii(ptr noundef %117, i32 noundef %118, i32 noundef %119)
  %121 = add i64 %113, %120
  store i64 %121, ptr %7, align 8, !tbaa !5
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = load i64, ptr @a, align 8, !tbaa !5
  %125 = add i64 %124, 1
  %126 = icmp uge i64 %123, %125
  br i1 %126, label %127, label %145

127:                                              ; preds = %108
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = load i64, ptr @a, align 8, !tbaa !5
  %131 = sub i64 %129, %130
  %132 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %131
  %133 = getelementptr inbounds [1010 x i64], ptr %132, i64 0, i64 0
  %134 = load i32, ptr %8, align 4, !tbaa !9
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = call noundef i64 @_Z4calcPyii(ptr noundef %133, i32 noundef %134, i32 noundef %135)
  %137 = load i64, ptr @a, align 8, !tbaa !5
  %138 = load i64, ptr @b, align 8, !tbaa !5
  %139 = mul i64 %137, %138
  %140 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !5
  %142 = mul i64 %136, %141
  %143 = load i64, ptr %7, align 8, !tbaa !5
  %144 = sub i64 %143, %142
  store i64 %144, ptr %7, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %127, %108
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = load i64, ptr @a, align 8, !tbaa !5
  %149 = icmp uge i64 %147, %148
  br i1 %149, label %150, label %156

150:                                              ; preds = %145
  %151 = call { ptr, i8 } @_ZNSt13unordered_setIySt4hashIyESt8equal_toIyESaIyEE6insertERKy(ptr noundef nonnull align 8 dereferenceable(56) @allHash, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %152 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %153 = extractvalue { ptr, i8 } %151, 0
  store ptr %153, ptr %152, align 8
  %154 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %155 = extractvalue { ptr, i8 } %151, 1
  store i8 %155, ptr %154, align 8
  br label %156

156:                                              ; preds = %150, %145
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %10, align 4, !tbaa !9
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %10, align 4, !tbaa !9
  br label %102, !llvm.loop !16

160:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %6, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %6, align 4, !tbaa !9
  br label %88, !llvm.loop !17

164:                                              ; preds = %93
  %165 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @q)
  br label %166

166:                                              ; preds = %211, %164
  %167 = load i64, ptr @q, align 8, !tbaa !5
  %168 = add i64 %167, -1
  store i64 %168, ptr @q, align 8, !tbaa !5
  %169 = icmp ne i64 %167, 0
  br i1 %169, label %170, label %212

170:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %199, %170
  %172 = load i32, ptr %13, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = load i64, ptr @a, align 8, !tbaa !5
  %175 = icmp ule i64 %173, %174
  br i1 %175, label %177, label %176

176:                                              ; preds = %171
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %202

177:                                              ; preds = %171
  %178 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef getelementptr inbounds (i8, ptr @str, i64 1))
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !9
  br label %179

179:                                              ; preds = %195, %177
  %180 = load i32, ptr %14, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = load i64, ptr @b, align 8, !tbaa !5
  %183 = icmp ule i64 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %179
  store i32 22, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %198

185:                                              ; preds = %179
  %186 = load i64, ptr %12, align 8, !tbaa !5
  %187 = mul i64 %186, 131
  %188 = load i32, ptr %14, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %189
  %191 = load i8, ptr %190, align 1, !tbaa !13
  %192 = sext i8 %191 to i64
  %193 = add i64 %187, %192
  %194 = sub i64 %193, 48
  store i64 %194, ptr %12, align 8, !tbaa !5
  br label %195

195:                                              ; preds = %185
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %14, align 4, !tbaa !9
  br label %179, !llvm.loop !18

198:                                              ; preds = %184
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %13, align 4, !tbaa !9
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %13, align 4, !tbaa !9
  br label %171, !llvm.loop !19

202:                                              ; preds = %176
  %203 = call noundef i64 @_ZNKSt13unordered_setIySt4hashIyESt8equal_toIyESaIyEE5countERKy(ptr noundef nonnull align 8 dereferenceable(56) @allHash, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %204 = icmp ne i64 %203, 0
  br i1 %204, label %205, label %208

205:                                              ; preds = %202
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %206, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %211

208:                                              ; preds = %202
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %209, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %211

211:                                              ; preds = %208, %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %166, !llvm.loop !20

212:                                              ; preds = %166
  ret i32 0
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #4

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIySt4hashIyESt8equal_toIyESaIyEE6insertERKy(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

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

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!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::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"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" }

@f = external dso_local global [1010 x [1010 x i64]], align 16
@p = external dso_local local_unnamed_addr global [1020100 x i64], align 16
@allHash = external dso_local global %"class.std::unordered_set", align 8
@m = external dso_local global i64, align 8
@n = external dso_local global i64, align 8
@a = external dso_local global i64, align 8
@b = external dso_local global i64, align 8
@q = external dso_local global i64, align 8
@str = external dso_local global [1010 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @m)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %5 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) @a)
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) @b)
  store i64 1, ptr @p, align 16, !tbaa !5
  %7 = load i64, ptr @m, align 8, !tbaa !5
  %8 = load i64, ptr @n, align 8, !tbaa !5
  %9 = mul i64 %8, %7
  %.not54 = icmp eq i64 %9, 0
  br i1 %.not54, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %xtraiter = and i64 %9, 3
  %10 = icmp ult i64 %9, 4
  br i1 %10, label %.preheader.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %9, -4
  br label %.lr.ph

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph, %.lr.ph.preheader
  %.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %21, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph.epil
  %11 = phi i64 [ %12, %.lr.ph.epil ], [ %.unr, %.preheader.loopexit.unr-lcssa ]
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %12 = mul i64 %11, 131
  %13 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %indvars.iv.epil
  store i64 %12, ptr %13, align 8, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.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 %.preheader, label %.lr.ph.epil, !llvm.loop !9

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph.epil, %0
  %.not4459 = icmp eq i64 %7, 0
  br i1 %.not4459, label %._crit_edge72, label %.lr.ph61

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %14 = phi i64 [ 1, %.lr.ph.preheader.new ], [ %21, %.lr.ph ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %15 = mul i64 %14, 131
  %16 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %indvars.iv
  store i64 %15, ptr %16, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = mul i64 %14, 17161
  %18 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %indvars.iv.next
  store i64 %17, ptr %18, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %19 = mul i64 %14, 2248091
  %20 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %indvars.iv.next.1
  store i64 %19, ptr %20, align 8, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %21 = mul i64 %14, 294499921
  %22 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %indvars.iv.next.2
  store i64 %21, ptr %22, align 8, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 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 %.preheader.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

._crit_edge62:                                    ; preds = %._crit_edge
  %23 = load i64, ptr @b, align 8, !tbaa !5
  %sext = shl i64 %23, 32
  %24 = ashr exact i64 %sext, 32
  %.not4568 = icmp ult i64 %27, %24
  %25 = icmp eq i64 %36, 0
  %or.cond = or i1 %.not4568, %25
  br i1 %or.cond, label %._crit_edge72, label %.lr.ph71.split

.lr.ph61:                                         ; preds = %.preheader, %._crit_edge
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %._crit_edge ], [ 1, %.preheader ]
  %26 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 1))
  %27 = load i64, ptr @n, align 8, !tbaa !5
  %.not5356 = icmp eq i64 %27, 0
  br i1 %.not5356, label %._crit_edge, label %.lr.ph58.preheader

.lr.ph58.preheader:                               ; preds = %.lr.ph61
  %.phi.trans.insert = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %indvars.iv93, i64 0
  %.pre = load i64, ptr %.phi.trans.insert, align 16, !tbaa !5
  %xtraiter127 = and i64 %27, 1
  %28 = icmp eq i64 %27, 1
  br i1 %28, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph58.preheader.new

.lr.ph58.preheader.new:                           ; preds = %.lr.ph58.preheader
  %unroll_iter131 = and i64 %27, -2
  br label %.lr.ph58

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph58, %.lr.ph58.preheader
  %.unr129 = phi i64 [ %.pre, %.lr.ph58.preheader ], [ %50, %.lr.ph58 ]
  %indvars.iv89.unr = phi i64 [ 1, %.lr.ph58.preheader ], [ %indvars.iv.next90.1, %.lr.ph58 ]
  %lcmp.mod130.not = icmp eq i64 %xtraiter127, 0
  br i1 %lcmp.mod130.not, label %._crit_edge, label %.lr.ph58.epil

.lr.ph58.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa
  %29 = mul i64 %.unr129, 131
  %30 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %indvars.iv89.unr
  %31 = load i8, ptr %30, align 1, !tbaa !13
  %32 = sext i8 %31 to i64
  %33 = add i64 %29, -48
  %34 = add i64 %33, %32
  %35 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %indvars.iv93, i64 %indvars.iv89.unr
  store i64 %34, ptr %35, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph58.epil, %._crit_edge.loopexit.unr-lcssa, %.lr.ph61
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %36 = load i64, ptr @m, align 8, !tbaa !5
  %.not44.not = icmp ugt i64 %36, %indvars.iv93
  br i1 %.not44.not, label %.lr.ph61, label %._crit_edge62, !llvm.loop !14

.lr.ph58:                                         ; preds = %.lr.ph58, %.lr.ph58.preheader.new
  %37 = phi i64 [ %.pre, %.lr.ph58.preheader.new ], [ %50, %.lr.ph58 ]
  %indvars.iv89 = phi i64 [ 1, %.lr.ph58.preheader.new ], [ %indvars.iv.next90.1, %.lr.ph58 ]
  %niter132 = phi i64 [ 0, %.lr.ph58.preheader.new ], [ %niter132.next.1, %.lr.ph58 ]
  %38 = mul i64 %37, 131
  %39 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %indvars.iv89
  %40 = load i8, ptr %39, align 1, !tbaa !13
  %41 = sext i8 %40 to i64
  %42 = add i64 %38, -48
  %43 = add i64 %42, %41
  %44 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %indvars.iv93, i64 %indvars.iv89
  store i64 %43, ptr %44, align 8, !tbaa !5
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %45 = mul i64 %43, 131
  %46 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %indvars.iv.next90
  %47 = load i8, ptr %46, align 1, !tbaa !13
  %48 = sext i8 %47 to i64
  %49 = add i64 %45, -48
  %50 = add i64 %49, %48
  %51 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %indvars.iv93, i64 %indvars.iv.next90
  store i64 %50, ptr %51, align 8, !tbaa !5
  %indvars.iv.next90.1 = add nuw nsw i64 %indvars.iv89, 2
  %niter132.next.1 = add i64 %niter132, 2
  %niter132.ncmp.1 = icmp eq i64 %niter132.next.1, %unroll_iter131
  br i1 %niter132.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph58, !llvm.loop !15

._crit_edge72:                                    ; preds = %._crit_edge67, %.preheader, %._crit_edge62
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @q)
  %53 = load i64, ptr @q, align 8, !tbaa !5
  %54 = add i64 %53, -1
  store i64 %54, ptr @q, align 8, !tbaa !5
  %.not4683 = icmp eq i64 %53, 0
  br i1 %.not4683, label %._crit_edge86, label %.lr.ph85

.lr.ph71.split:                                   ; preds = %._crit_edge62, %._crit_edge67
  %55 = phi i64 [ %62, %._crit_edge67 ], [ %27, %._crit_edge62 ]
  %56 = phi i64 [ %63, %._crit_edge67 ], [ 1, %._crit_edge62 ]
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %._crit_edge67 ], [ %24, %._crit_edge62 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store i64 0, ptr %1, align 8, !tbaa !5
  %57 = load i64, ptr @b, align 8, !tbaa !5
  %58 = trunc i64 %57 to i32
  %59 = trunc nsw i64 %indvars.iv99 to i32
  %60 = sub i32 %59, %58
  %61 = add i32 %60, 1
  %.not5063 = icmp eq i64 %56, 0
  br i1 %.not5063, label %._crit_edge67, label %.lr.ph66

._crit_edge67.loopexit:                           ; preds = %90
  %.pre112 = load i64, ptr @n, align 8, !tbaa !5
  br label %._crit_edge67

._crit_edge67:                                    ; preds = %._crit_edge67.loopexit, %.lr.ph71.split
  %62 = phi i64 [ %.pre112, %._crit_edge67.loopexit ], [ %55, %.lr.ph71.split ]
  %63 = phi i64 [ %91, %._crit_edge67.loopexit ], [ 0, %.lr.ph71.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %indvars.iv.next100 = add nsw i64 %indvars.iv99, 1
  %.not45 = icmp ult i64 %62, %indvars.iv.next100
  br i1 %.not45, label %._crit_edge72, label %.lr.ph71.split, !llvm.loop !16

.lr.ph66:                                         ; preds = %.lr.ph71.split, %90
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %90 ], [ 1, %.lr.ph71.split ]
  %64 = load i64, ptr %1, align 8, !tbaa !5
  %65 = load i64, ptr @b, align 8, !tbaa !5
  %66 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = mul i64 %67, %64
  %69 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %indvars.iv96
  %70 = call noundef i64 @_Z4calcPyii(ptr noundef nonnull %69, i32 noundef %61, i32 noundef %59)
  %71 = add i64 %68, %70
  store i64 %71, ptr %1, align 8, !tbaa !5
  %72 = load i64, ptr @a, align 8, !tbaa !5
  %73 = add i64 %72, 1
  %.not51 = icmp ugt i64 %73, %indvars.iv96
  br i1 %.not51, label %86, label %74

74:                                               ; preds = %.lr.ph66
  %75 = sub nsw i64 %indvars.iv96, %72
  %76 = getelementptr inbounds [1010 x [1010 x i64]], ptr @f, i64 0, i64 %75
  %77 = call noundef i64 @_Z4calcPyii(ptr noundef nonnull %76, i32 noundef %61, i32 noundef %59)
  %78 = load i64, ptr @a, align 8, !tbaa !5
  %79 = load i64, ptr @b, align 8, !tbaa !5
  %80 = mul i64 %79, %78
  %81 = getelementptr inbounds [1020100 x i64], ptr @p, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !5
  %83 = mul i64 %82, %77
  %84 = load i64, ptr %1, align 8, !tbaa !5
  %85 = sub i64 %84, %83
  store i64 %85, ptr %1, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %74, %.lr.ph66
  %87 = phi i64 [ %78, %74 ], [ %72, %.lr.ph66 ]
  %.not52 = icmp ugt i64 %87, %indvars.iv96
  br i1 %.not52, label %90, label %88

88:                                               ; preds = %86
  %89 = call { ptr, i8 } @_ZNSt13unordered_setIySt4hashIyESt8equal_toIyESaIyEE6insertERKy(ptr noundef nonnull align 8 dereferenceable(56) @allHash, ptr noundef nonnull align 8 dereferenceable(8) %1)
  br label %90

90:                                               ; preds = %86, %88
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %91 = load i64, ptr @m, align 8, !tbaa !5
  %.not50.not = icmp ugt i64 %91, %indvars.iv96
  br i1 %.not50.not, label %.lr.ph66, label %._crit_edge67.loopexit, !llvm.loop !18

.lr.ph85:                                         ; preds = %._crit_edge72, %._crit_edge82
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 0, ptr %2, align 8, !tbaa !5
  %92 = load i64, ptr @a, align 8, !tbaa !5
  %.not4778 = icmp eq i64 %92, 0
  br i1 %.not4778, label %._crit_edge82, label %.lr.ph81

._crit_edge82:                                    ; preds = %108, %.lr.ph85
  %93 = call noundef i64 @_ZNKSt13unordered_setIySt4hashIyESt8equal_toIyESaIyEE5countERKy(ptr noundef nonnull align 8 dereferenceable(56) @allHash, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.not48 = icmp ne i64 %93, 0
  %. = zext i1 %.not48 to i32
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.)
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %96 = load i64, ptr @q, align 8, !tbaa !5
  %97 = add i64 %96, -1
  store i64 %97, ptr @q, align 8, !tbaa !5
  %.not46 = icmp eq i64 %96, 0
  br i1 %.not46, label %._crit_edge86, label %.lr.ph85, !llvm.loop !19

.lr.ph81:                                         ; preds = %.lr.ph85, %108
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %108 ], [ 1, %.lr.ph85 ]
  %98 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 1))
  %99 = load i64, ptr @b, align 8, !tbaa !5
  %.not4973 = icmp eq i64 %99, 0
  br i1 %.not4973, label %108, label %.lr.ph76.preheader

.lr.ph76.preheader:                               ; preds = %.lr.ph81
  %.promoted = load i64, ptr %2, align 8, !tbaa !5
  %xtraiter133 = and i64 %99, 3
  %100 = icmp ult i64 %99, 4
  br i1 %100, label %._crit_edge77.unr-lcssa, label %.lr.ph76.preheader.new

.lr.ph76.preheader.new:                           ; preds = %.lr.ph76.preheader
  %unroll_iter138 = and i64 %99, -4
  br label %.lr.ph76

._crit_edge77.unr-lcssa:                          ; preds = %.lr.ph76, %.lr.ph76.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph76.preheader ], [ %134, %.lr.ph76 ]
  %indvars.iv105.unr = phi i64 [ 1, %.lr.ph76.preheader ], [ %indvars.iv.next106.3, %.lr.ph76 ]
  %.unr135 = phi i64 [ %.promoted, %.lr.ph76.preheader ], [ %134, %.lr.ph76 ]
  %lcmp.mod136.not = icmp eq i64 %xtraiter133, 0
  br i1 %lcmp.mod136.not, label %._crit_edge77, label %.lr.ph76.epil

.lr.ph76.epil:                                    ; preds = %._crit_edge77.unr-lcssa, %.lr.ph76.epil
  %indvars.iv105.epil = phi i64 [ %indvars.iv.next106.epil, %.lr.ph76.epil ], [ %indvars.iv105.unr, %._crit_edge77.unr-lcssa ]
  %101 = phi i64 [ %107, %.lr.ph76.epil ], [ %.unr135, %._crit_edge77.unr-lcssa ]
  %epil.iter134 = phi i64 [ %epil.iter134.next, %.lr.ph76.epil ], [ 0, %._crit_edge77.unr-lcssa ]
  %102 = mul i64 %101, 131
  %103 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %indvars.iv105.epil
  %104 = load i8, ptr %103, align 1, !tbaa !13
  %105 = sext i8 %104 to i64
  %106 = add i64 %102, -48
  %107 = add i64 %106, %105
  %indvars.iv.next106.epil = add nuw nsw i64 %indvars.iv105.epil, 1
  %epil.iter134.next = add i64 %epil.iter134, 1
  %epil.iter134.cmp.not = icmp eq i64 %epil.iter134.next, %xtraiter133
  br i1 %epil.iter134.cmp.not, label %._crit_edge77, label %.lr.ph76.epil, !llvm.loop !20

._crit_edge77:                                    ; preds = %.lr.ph76.epil, %._crit_edge77.unr-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge77.unr-lcssa ], [ %107, %.lr.ph76.epil ]
  store i64 %.lcssa, ptr %2, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %._crit_edge77, %.lr.ph81
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %109 = load i64, ptr @a, align 8, !tbaa !5
  %.not47.not = icmp ugt i64 %109, %indvars.iv109
  br i1 %.not47.not, label %.lr.ph81, label %._crit_edge82, !llvm.loop !21

.lr.ph76:                                         ; preds = %.lr.ph76, %.lr.ph76.preheader.new
  %indvars.iv105 = phi i64 [ 1, %.lr.ph76.preheader.new ], [ %indvars.iv.next106.3, %.lr.ph76 ]
  %110 = phi i64 [ %.promoted, %.lr.ph76.preheader.new ], [ %134, %.lr.ph76 ]
  %niter139 = phi i64 [ 0, %.lr.ph76.preheader.new ], [ %niter139.next.3, %.lr.ph76 ]
  %111 = mul i64 %110, 131
  %112 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %indvars.iv105
  %113 = load i8, ptr %112, align 1, !tbaa !13
  %114 = sext i8 %113 to i64
  %115 = add i64 %111, -48
  %116 = add i64 %115, %114
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %117 = mul i64 %116, 131
  %118 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %indvars.iv.next106
  %119 = load i8, ptr %118, align 1, !tbaa !13
  %120 = sext i8 %119 to i64
  %121 = add i64 %117, -48
  %122 = add i64 %121, %120
  %indvars.iv.next106.1 = add nuw nsw i64 %indvars.iv105, 2
  %123 = mul i64 %122, 131
  %124 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %indvars.iv.next106.1
  %125 = load i8, ptr %124, align 1, !tbaa !13
  %126 = sext i8 %125 to i64
  %127 = add i64 %123, -48
  %128 = add i64 %127, %126
  %indvars.iv.next106.2 = add nuw nsw i64 %indvars.iv105, 3
  %129 = mul i64 %128, 131
  %130 = getelementptr inbounds [1010 x i8], ptr @str, i64 0, i64 %indvars.iv.next106.2
  %131 = load i8, ptr %130, align 1, !tbaa !13
  %132 = sext i8 %131 to i64
  %133 = add i64 %129, -48
  %134 = add i64 %133, %132
  %indvars.iv.next106.3 = add nuw nsw i64 %indvars.iv105, 4
  %niter139.next.3 = add i64 %niter139, 4
  %niter139.ncmp.3 = icmp eq i64 %niter139.next.3, %unroll_iter138
  br i1 %niter139.ncmp.3, label %._crit_edge77.unr-lcssa, label %.lr.ph76, !llvm.loop !22

._crit_edge86:                                    ; preds = %._crit_edge82, %._crit_edge72
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIySt4hashIyESt8equal_toIyESaIyEE6insertERKy(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

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


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