; LLVM IR from Tunghohin/Competitive_Coding :: Daimayuan (1076)

; 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.FlowGraph = type { i32, i32, i32, [400020 x %"struct.FlowGraph<long long>::edge"], [1010 x i32], i32, [1010 x i32], [1010 x i32], i32 }
%"struct.FlowGraph<long long>::edge" = type { i32, i32, 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 }

@g = external dso_local global %class.FlowGraph, align 8
@nat = external dso_local global [110 x [110 x i32]], align 16
@sci = external dso_local global [110 x [110 x i32]], align 16
@ud_nat = external dso_local global [110 x [110 x i32]], align 16
@lr_nat = external dso_local global [110 x [110 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = mul nsw i32 %21, %22
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %5, align 4, !tbaa !5
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = mul nsw i32 %30, %31
  call void @_ZN9FlowGraphIxE4initEiiii(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %27, i32 noundef %28, i32 noundef %29, i32 noundef %32)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %65, %0
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %68

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %61, %38
  %40 = load i32, ptr %9, align 4, !tbaa !5
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %64

44:                                               ; preds = %39
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [110 x [110 x i32]], ptr @nat, i64 0, i64 %46
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [110 x i32], ptr %47, i64 0, i64 %49
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [110 x [110 x i32]], ptr @nat, i64 0, i64 %53
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [110 x i32], ptr %54, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = add nsw i32 %59, %58
  store i32 %60, ptr %6, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %44
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %9, align 4, !tbaa !5
  br label %39, !llvm.loop !9

64:                                               ; preds = %43
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %7, align 4, !tbaa !5
  br label %33, !llvm.loop !11

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

69:                                               ; preds = %101, %68
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %104

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %97, %74
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = load i32, ptr %3, align 4, !tbaa !5
  %78 = icmp sle i32 %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %100

80:                                               ; preds = %75
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [110 x [110 x i32]], ptr @sci, i64 0, i64 %82
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [110 x i32], ptr %83, i64 0, i64 %85
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %86)
  %88 = load i32, ptr %10, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [110 x [110 x i32]], ptr @sci, i64 0, i64 %89
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [110 x i32], ptr %90, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = add nsw i32 %95, %94
  store i32 %96, ptr %6, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %80
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %11, align 4, !tbaa !5
  br label %75, !llvm.loop !12

100:                                              ; preds = %79
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %10, align 4, !tbaa !5
  br label %69, !llvm.loop !13

104:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %137, %104
  %106 = load i32, ptr %12, align 4, !tbaa !5
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %140

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %133, %110
  %112 = load i32, ptr %13, align 4, !tbaa !5
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = icmp sle i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %136

116:                                              ; preds = %111
  %117 = load i32, ptr %12, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [110 x [110 x i32]], ptr @ud_nat, i64 0, i64 %118
  %120 = load i32, ptr %13, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [110 x i32], ptr %119, i64 0, i64 %121
  %123 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %122)
  %124 = load i32, ptr %12, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [110 x [110 x i32]], ptr @ud_nat, i64 0, i64 %125
  %127 = load i32, ptr %13, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [110 x i32], ptr %126, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = load i32, ptr %6, align 4, !tbaa !5
  %132 = add nsw i32 %131, %130
  store i32 %132, ptr %6, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %116
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %13, align 4, !tbaa !5
  br label %111, !llvm.loop !14

136:                                              ; preds = %115
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %12, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %12, align 4, !tbaa !5
  br label %105, !llvm.loop !15

140:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %173, %140
  %142 = load i32, ptr %14, align 4, !tbaa !5
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = icmp sle i32 %142, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %176

146:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %169, %146
  %148 = load i32, ptr %15, align 4, !tbaa !5
  %149 = load i32, ptr %3, align 4, !tbaa !5
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %172

152:                                              ; preds = %147
  %153 = load i32, ptr %14, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [110 x [110 x i32]], ptr @lr_nat, i64 0, i64 %154
  %156 = load i32, ptr %15, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [110 x i32], ptr %155, i64 0, i64 %157
  %159 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %158)
  %160 = load i32, ptr %14, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [110 x [110 x i32]], ptr @lr_nat, i64 0, i64 %161
  %163 = load i32, ptr %15, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [110 x i32], ptr %162, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = load i32, ptr %6, align 4, !tbaa !5
  %168 = add nsw i32 %167, %166
  store i32 %168, ptr %6, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %152
  %170 = load i32, ptr %15, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %15, align 4, !tbaa !5
  br label %147, !llvm.loop !16

172:                                              ; preds = %151
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %14, align 4, !tbaa !5
  br label %141, !llvm.loop !17

176:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %206, %176
  %178 = load i32, ptr %16, align 4, !tbaa !5
  %179 = load i32, ptr %2, align 4, !tbaa !5
  %180 = icmp sle i32 %178, %179
  br i1 %180, label %182, label %181

181:                                              ; preds = %177
  store i32 26, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %209

182:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %202, %182
  %184 = load i32, ptr %17, align 4, !tbaa !5
  %185 = load i32, ptr %2, align 4, !tbaa !5
  %186 = icmp sle i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 29, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %205

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %189 = load i32, ptr %2, align 4, !tbaa !5
  %190 = load i32, ptr %16, align 4, !tbaa !5
  %191 = sub nsw i32 %190, 1
  %192 = mul nsw i32 %189, %191
  %193 = load i32, ptr %17, align 4, !tbaa !5
  %194 = add nsw i32 %192, %193
  store i32 %194, ptr %18, align 4, !tbaa !5
  %195 = load i32, ptr %16, align 4, !tbaa !5
  %196 = load i32, ptr %17, align 4, !tbaa !5
  %197 = add nsw i32 %195, %196
  %198 = srem i32 %197, 2
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %201

200:                                              ; preds = %188
  br label %201

201:                                              ; preds = %200, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %17, align 4, !tbaa !5
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %17, align 4, !tbaa !5
  br label %183, !llvm.loop !18

205:                                              ; preds = %187
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %16, align 4, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %16, align 4, !tbaa !5
  br label %177, !llvm.loop !19

209:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %210 = load i32, ptr %1, align 4
  ret i32 %210
}

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

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: mustprogress nounwind uwtable
declare dso_local void @_ZN9FlowGraphIxE4initEiiii(ptr noundef nonnull align 8 dereferenceable(6412464), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; 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.FlowGraph = type { i32, i32, i32, [400020 x %"struct.FlowGraph<long long>::edge"], [1010 x i32], i32, [1010 x i32], [1010 x i32], i32 }
%"struct.FlowGraph<long long>::edge" = type { i32, i32, 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 }

@g = external dso_local global %class.FlowGraph, align 8
@nat = external dso_local global [110 x [110 x i32]], align 16
@sci = external dso_local global [110 x [110 x i32]], align 16
@ud_nat = external dso_local global [110 x [110 x i32]], align 16
@lr_nat = external dso_local global [110 x [110 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = load i32, ptr %2, align 4, !tbaa !5
  %7 = mul nsw i32 %6, %5
  %8 = add nsw i32 %7, 1
  %9 = add nsw i32 %7, 2
  call void @_ZN9FlowGraphIxE4initEiiii(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %8, i32 noundef %9, i32 noundef %9, i32 noundef %7)
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %.not78 = icmp slt i32 %10, 1
  br i1 %.not78, label %._crit_edge115, label %.preheader74.lr.ph

.preheader74.lr.ph:                               ; preds = %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = icmp slt i32 %11, 1
  br i1 %12, label %.preheader71, label %.preheader74

.preheader74:                                     ; preds = %.preheader74.lr.ph, %._crit_edge
  %13 = phi i32 [ %16, %._crit_edge ], [ %10, %.preheader74.lr.ph ]
  %14 = phi i32 [ %17, %._crit_edge ], [ %11, %.preheader74.lr.ph ]
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %._crit_edge ], [ 1, %.preheader74.lr.ph ]
  %.not6675 = icmp slt i32 %14, 1
  br i1 %.not6675, label %._crit_edge, label %.lr.ph

.preheader73:                                     ; preds = %._crit_edge
  %.not6088 = icmp slt i32 %16, 1
  br i1 %.not6088, label %._crit_edge115, label %.preheader72.lr.ph

.preheader72.lr.ph:                               ; preds = %.preheader73
  %.pr = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp slt i32 %.pr, 1
  br i1 %15, label %.preheader71, label %.preheader72

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader74
  %16 = phi i32 [ %13, %.preheader74 ], [ %.pre, %._crit_edge.loopexit ]
  %17 = phi i32 [ %14, %.preheader74 ], [ %21, %._crit_edge.loopexit ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %18 = sext i32 %16 to i64
  %.not.not = icmp slt i64 %indvars.iv126, %18
  br i1 %.not.not, label %.preheader74, label %.preheader73, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader74, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader74 ]
  %19 = getelementptr inbounds [110 x [110 x i32]], ptr @nat, i64 0, i64 %indvars.iv126, i64 %indvars.iv
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %.not66.not = icmp slt i64 %indvars.iv, %22
  br i1 %.not66.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !12

.preheader72:                                     ; preds = %.preheader72.lr.ph, %._crit_edge86
  %23 = phi i32 [ %29, %._crit_edge86 ], [ %16, %.preheader72.lr.ph ]
  %24 = phi i32 [ %30, %._crit_edge86 ], [ %.pr, %.preheader72.lr.ph ]
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %._crit_edge86 ], [ 1, %.preheader72.lr.ph ]
  %.not6582 = icmp slt i32 %24, 1
  br i1 %.not6582, label %._crit_edge86, label %.lr.ph85

.preheader71:                                     ; preds = %._crit_edge86, %.preheader74.lr.ph, %.preheader72.lr.ph
  %25 = phi i32 [ %16, %.preheader72.lr.ph ], [ %10, %.preheader74.lr.ph ], [ %29, %._crit_edge86 ]
  %26 = icmp sgt i32 %25, 1
  br i1 %26, label %.preheader70.lr.ph, label %.preheader69

.preheader70.lr.ph:                               ; preds = %.preheader71
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 1
  br i1 %28, label %._crit_edge115, label %.preheader70

._crit_edge86.loopexit:                           ; preds = %.lr.ph85
  %.pre147 = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge86

._crit_edge86:                                    ; preds = %._crit_edge86.loopexit, %.preheader72
  %29 = phi i32 [ %23, %.preheader72 ], [ %.pre147, %._crit_edge86.loopexit ]
  %30 = phi i32 [ %24, %.preheader72 ], [ %34, %._crit_edge86.loopexit ]
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %31 = sext i32 %29 to i64
  %.not60.not = icmp slt i64 %indvars.iv132, %31
  br i1 %.not60.not, label %.preheader72, label %.preheader71, !llvm.loop !13

.lr.ph85:                                         ; preds = %.preheader72, %.lr.ph85
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %.lr.ph85 ], [ 1, %.preheader72 ]
  %32 = getelementptr inbounds [110 x [110 x i32]], ptr @sci, i64 0, i64 %indvars.iv132, i64 %indvars.iv129
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %.not65.not = icmp slt i64 %indvars.iv129, %35
  br i1 %.not65.not, label %.lr.ph85, label %._crit_edge86.loopexit, !llvm.loop !14

.preheader70:                                     ; preds = %.preheader70.lr.ph, %._crit_edge97
  %36 = phi i32 [ %40, %._crit_edge97 ], [ %25, %.preheader70.lr.ph ]
  %37 = phi i32 [ %41, %._crit_edge97 ], [ %27, %.preheader70.lr.ph ]
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %._crit_edge97 ], [ 1, %.preheader70.lr.ph ]
  %.not6493 = icmp slt i32 %37, 1
  br i1 %.not6493, label %._crit_edge97, label %.lr.ph96

.preheader69:                                     ; preds = %._crit_edge97, %.preheader71
  %38 = phi i32 [ %25, %.preheader71 ], [ %40, %._crit_edge97 ]
  %.not61108 = icmp sgt i32 %38, 0
  %.pr156 = load i32, ptr %2, align 4
  %39 = icmp sgt i32 %.pr156, 1
  %or.cond = select i1 %.not61108, i1 %39, i1 false
  br i1 %or.cond, label %.preheader68, label %._crit_edge115

._crit_edge97.loopexit:                           ; preds = %.lr.ph96
  %.pre148 = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge97

._crit_edge97:                                    ; preds = %._crit_edge97.loopexit, %.preheader70
  %40 = phi i32 [ %36, %.preheader70 ], [ %.pre148, %._crit_edge97.loopexit ]
  %41 = phi i32 [ %37, %.preheader70 ], [ %46, %._crit_edge97.loopexit ]
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %42 = sext i32 %40 to i64
  %43 = icmp slt i64 %indvars.iv.next139, %42
  br i1 %43, label %.preheader70, label %.preheader69, !llvm.loop !15

.lr.ph96:                                         ; preds = %.preheader70, %.lr.ph96
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %.lr.ph96 ], [ 1, %.preheader70 ]
  %44 = getelementptr inbounds [110 x [110 x i32]], ptr @ud_nat, i64 0, i64 %indvars.iv138, i64 %indvars.iv135
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %44)
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %.not64.not = icmp slt i64 %indvars.iv135, %47
  br i1 %.not64.not, label %.lr.ph96, label %._crit_edge97.loopexit, !llvm.loop !16

.preheader68:                                     ; preds = %.preheader69, %._crit_edge106
  %48 = phi i32 [ %51, %._crit_edge106 ], [ %38, %.preheader69 ]
  %49 = phi i32 [ %52, %._crit_edge106 ], [ %.pr156, %.preheader69 ]
  %indvars.iv144 = phi i64 [ %indvars.iv.next145, %._crit_edge106 ], [ 1, %.preheader69 ]
  %50 = icmp sgt i32 %49, 1
  br i1 %50, label %.lr.ph105, label %._crit_edge106

._crit_edge106.loopexit:                          ; preds = %.lr.ph105
  %.pre149 = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge106

._crit_edge106:                                   ; preds = %._crit_edge106.loopexit, %.preheader68
  %51 = phi i32 [ %48, %.preheader68 ], [ %.pre149, %._crit_edge106.loopexit ]
  %52 = phi i32 [ %49, %.preheader68 ], [ %56, %._crit_edge106.loopexit ]
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %53 = sext i32 %51 to i64
  %.not61.not = icmp slt i64 %indvars.iv144, %53
  br i1 %.not61.not, label %.preheader68, label %._crit_edge115, !llvm.loop !17

.lr.ph105:                                        ; preds = %.preheader68, %.lr.ph105
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %.lr.ph105 ], [ 1, %.preheader68 ]
  %54 = getelementptr inbounds [110 x [110 x i32]], ptr @lr_nat, i64 0, i64 %indvars.iv144, i64 %indvars.iv141
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %54)
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next142, %57
  br i1 %58, label %.lr.ph105, label %._crit_edge106.loopexit, !llvm.loop !18

._crit_edge115:                                   ; preds = %._crit_edge106, %.preheader70.lr.ph, %.preheader73, %0, %.preheader69
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0
}

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

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 nounwind uwtable
declare dso_local void @_ZN9FlowGraphIxE4initEiiii(ptr noundef nonnull align 8 dereferenceable(6412464), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #4 = { 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 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10, !11}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !11}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !11}
!18 = distinct !{!18, !10}


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