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

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

@path = external dso_local global [19 x [19 x i32]], align 16
@dp = external dso_local global [262144 x [19 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress 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
  store i32 0, ptr %1, align 4
  %13 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  %19 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %25

25:                                               ; preds = %48, %0
  %26 = load i32, ptr %3, align 4, !tbaa !8
  %27 = load i32, ptr %2, align 4, !tbaa !8
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %51

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

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

35:                                               ; preds = %31
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %47

36:                                               ; preds = %31
  %37 = load i32, ptr %3, align 4, !tbaa !8
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [19 x [19 x i32]], ptr @path, i64 0, i64 %38
  %40 = load i32, ptr %5, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [19 x i32], ptr %39, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %42)
  br label %44

44:                                               ; preds = %36
  %45 = load i32, ptr %5, align 4, !tbaa !8
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %5, align 4, !tbaa !8
  br label %31, !llvm.loop !11

47:                                               ; preds = %35
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %3, align 4, !tbaa !8
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %3, align 4, !tbaa !8
  br label %25, !llvm.loop !13

51:                                               ; preds = %29
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 63, i64 19922944, i1 false)
  store i32 0, ptr getelementptr inbounds ([19 x i32], ptr getelementptr inbounds ([262144 x [19 x i32]], ptr @dp, i64 0, i64 1), i64 0, i64 1), align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %52

52:                                               ; preds = %134, %51
  %53 = load i32, ptr %6, align 4, !tbaa !8
  %54 = load i32, ptr %2, align 4, !tbaa !8
  %55 = shl i32 1, %54
  %56 = icmp slt i32 %53, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %52
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %137

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

59:                                               ; preds = %130, %58
  %60 = load i32, ptr %7, align 4, !tbaa !8
  %61 = load i32, ptr %2, align 4, !tbaa !8
  %62 = icmp sle i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %133

64:                                               ; preds = %59
  %65 = load i32, ptr %6, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [262144 x [19 x i32]], ptr @dp, i64 0, i64 %66
  %68 = load i32, ptr %7, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [19 x i32], ptr %67, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !8
  %72 = icmp eq i32 %71, 1061109567
  br i1 %72, label %73, label %74

73:                                               ; preds = %64
  br label %130

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

75:                                               ; preds = %126, %74
  %76 = load i32, ptr %8, align 4, !tbaa !8
  %77 = load i32, ptr %2, align 4, !tbaa !8
  %78 = icmp sle i32 %76, %77
  br i1 %78, label %80, label %79

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

80:                                               ; preds = %75
  %81 = load i32, ptr %6, align 4, !tbaa !8
  %82 = load i32, ptr %8, align 4, !tbaa !8
  %83 = sub nsw i32 %82, 1
  %84 = shl i32 1, %83
  %85 = and i32 %81, %84
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %125

87:                                               ; preds = %80
  %88 = load i32, ptr %6, align 4, !tbaa !8
  %89 = load i32, ptr %8, align 4, !tbaa !8
  %90 = sub nsw i32 %89, 1
  %91 = shl i32 1, %90
  %92 = add nsw i32 %88, %91
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [262144 x [19 x i32]], ptr @dp, i64 0, i64 %93
  %95 = load i32, ptr %8, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [19 x i32], ptr %94, i64 0, i64 %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %98 = load i32, ptr %6, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [262144 x [19 x i32]], ptr @dp, i64 0, i64 %99
  %101 = load i32, ptr %7, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [19 x i32], ptr %100, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !8
  %105 = load i32, ptr %7, align 4, !tbaa !8
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [19 x [19 x i32]], ptr @path, i64 0, i64 %106
  %108 = load i32, ptr %8, align 4, !tbaa !8
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [19 x i32], ptr %107, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !8
  %112 = add nsw i32 %104, %111
  store i32 %112, ptr %9, align 4, !tbaa !8
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %97, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %114 = load i32, ptr %113, align 4, !tbaa !8
  %115 = load i32, ptr %6, align 4, !tbaa !8
  %116 = load i32, ptr %8, align 4, !tbaa !8
  %117 = sub nsw i32 %116, 1
  %118 = shl i32 1, %117
  %119 = add nsw i32 %115, %118
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [262144 x [19 x i32]], ptr @dp, i64 0, i64 %120
  %122 = load i32, ptr %8, align 4, !tbaa !8
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [19 x i32], ptr %121, i64 0, i64 %123
  store i32 %114, ptr %124, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %125

125:                                              ; preds = %87, %80
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %8, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !8
  br label %75, !llvm.loop !14

129:                                              ; preds = %79
  br label %130

130:                                              ; preds = %129, %73
  %131 = load i32, ptr %7, align 4, !tbaa !8
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %7, align 4, !tbaa !8
  br label %59, !llvm.loop !15

133:                                              ; preds = %63
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %6, align 4, !tbaa !8
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %6, align 4, !tbaa !8
  br label %52, !llvm.loop !16

137:                                              ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1061109567, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 2, ptr %11, align 4, !tbaa !8
  br label %138

138:                                              ; preds = %161, %137
  %139 = load i32, ptr %11, align 4, !tbaa !8
  %140 = load i32, ptr %2, align 4, !tbaa !8
  %141 = icmp sle i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %164

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %144 = load i32, ptr %2, align 4, !tbaa !8
  %145 = shl i32 1, %144
  %146 = sub nsw i32 %145, 1
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [262144 x [19 x i32]], ptr @dp, i64 0, i64 %147
  %149 = load i32, ptr %11, align 4, !tbaa !8
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [19 x i32], ptr %148, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !8
  %153 = load i32, ptr %11, align 4, !tbaa !8
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [19 x [19 x i32]], ptr @path, i64 0, i64 %154
  %156 = getelementptr inbounds [19 x i32], ptr %155, i64 0, i64 1
  %157 = load i32, ptr %156, align 4, !tbaa !8
  %158 = add nsw i32 %152, %157
  store i32 %158, ptr %12, align 4, !tbaa !8
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %160 = load i32, ptr %159, align 4, !tbaa !8
  store i32 %160, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %161

161:                                              ; preds = %143
  %162 = load i32, ptr %11, align 4, !tbaa !8
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %11, align 4, !tbaa !8
  br label %138, !llvm.loop !17

164:                                              ; preds = %142
  %165 = load i32, ptr %10, align 4, !tbaa !8
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %165)
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %166, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %168 = load i32, ptr %1, align 4
  ret i32 %168
}

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #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 = { "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 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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

@path = external dso_local global [19 x [19 x i32]], align 16
@dp = external dso_local global [262144 x [19 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %16 = 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)
  %17 = load i32, ptr %1, align 4
  %.not44 = icmp slt i32 %17, 1
  br i1 %.not44, label %._crit_edge46, label %.preheader41

.preheader41:                                     ; preds = %0, %._crit_edge
  %18 = phi i32 [ %23, %._crit_edge ], [ %17, %0 ]
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %._crit_edge ], [ 1, %0 ]
  %.not3942 = icmp slt i32 %18, 1
  br i1 %.not3942, label %.preheader41.._crit_edge_crit_edge, label %.lr.ph

.preheader41.._crit_edge_crit_edge:               ; preds = %.preheader41
  %.pre79 = sext i32 %18 to i64
  br label %._crit_edge

._crit_edge46:                                    ; preds = %._crit_edge, %0
  %19 = phi i32 [ %17, %0 ], [ %23, %._crit_edge ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(19922944) @dp, i8 63, i64 19922944, i1 false)
  store i32 0, ptr getelementptr inbounds (i8, ptr @dp, i64 80), align 16, !tbaa !8
  %20 = shl nuw i32 1, %19
  %21 = icmp sgt i32 %20, 1
  br i1 %21, label %.preheader40.lr.ph, label %._crit_edge55

.preheader40.lr.ph:                               ; preds = %._crit_edge46
  %22 = icmp slt i32 %19, 1
  br i1 %22, label %._crit_edge55.thread, label %.preheader40

._crit_edge55.thread:                             ; preds = %.preheader40.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1061109567, ptr %3, align 4, !tbaa !8
  br label %._crit_edge60

._crit_edge:                                      ; preds = %.lr.ph, %.preheader41.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre79, %.preheader41.._crit_edge_crit_edge ], [ %27, %.lr.ph ]
  %23 = phi i32 [ %18, %.preheader41.._crit_edge_crit_edge ], [ %26, %.lr.ph ]
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %.not.not = icmp slt i64 %indvars.iv64, %.pre-phi
  br i1 %.not.not, label %.preheader41, label %._crit_edge46, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader41, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader41 ]
  %24 = getelementptr inbounds [19 x [19 x i32]], ptr @path, i64 0, i64 %indvars.iv64, i64 %indvars.iv
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr %1, align 4
  %27 = sext i32 %26 to i64
  %.not39.not = icmp slt i64 %indvars.iv, %27
  br i1 %.not39.not, label %.lr.ph, label %._crit_edge, !llvm.loop !14

.preheader40:                                     ; preds = %.preheader40.lr.ph, %._crit_edge53
  %28 = phi i32 [ %31, %._crit_edge53 ], [ %19, %.preheader40.lr.ph ]
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %._crit_edge53 ], [ 1, %.preheader40.lr.ph ]
  %.not3750 = icmp slt i32 %28, 1
  br i1 %.not3750, label %._crit_edge53, label %.lr.ph52

.lr.ph52:                                         ; preds = %.preheader40
  %29 = trunc nuw nsw i64 %indvars.iv73 to i32
  br label %35

._crit_edge55:                                    ; preds = %._crit_edge53, %._crit_edge46
  %30 = phi i32 [ %19, %._crit_edge46 ], [ %31, %._crit_edge53 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1061109567, ptr %3, align 4, !tbaa !8
  %.not3656 = icmp slt i32 %30, 2
  br i1 %.not3656, label %._crit_edge60, label %.lr.ph59

._crit_edge53:                                    ; preds = %.loopexit, %.preheader40
  %31 = phi i32 [ %28, %.preheader40 ], [ %64, %.loopexit ]
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %32 = shl nuw i32 1, %31
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next74, %33
  br i1 %34, label %.preheader40, label %._crit_edge55, !llvm.loop !15

35:                                               ; preds = %.lr.ph52, %.loopexit
  %36 = phi i32 [ %28, %.lr.ph52 ], [ %64, %.loopexit ]
  %37 = phi i32 [ %28, %.lr.ph52 ], [ %65, %.loopexit ]
  %indvars.iv70 = phi i64 [ 1, %.lr.ph52 ], [ %indvars.iv.next71, %.loopexit ]
  %38 = getelementptr inbounds [262144 x [19 x i32]], ptr @dp, i64 0, i64 %indvars.iv73, i64 %indvars.iv70
  %39 = load i32, ptr %38, align 4, !tbaa !8
  %40 = icmp eq i32 %39, 1061109567
  %.not3847 = icmp slt i32 %37, 1
  %or.cond = or i1 %40, %.not3847
  br i1 %or.cond, label %.loopexit, label %.lr.ph49

.lr.ph49:                                         ; preds = %35, %59
  %41 = phi i32 [ %60, %59 ], [ %36, %35 ]
  %42 = phi i32 [ %61, %59 ], [ %37, %35 ]
  %43 = phi i32 [ %62, %59 ], [ %37, %35 ]
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %59 ], [ 1, %35 ]
  %44 = trunc i64 %indvars.iv67 to i32
  %45 = add i32 %44, -1
  %46 = shl nuw i32 1, %45
  %47 = and i32 %46, %29
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %59

49:                                               ; preds = %.lr.ph49
  %50 = add nuw nsw i32 %46, %29
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [262144 x [19 x i32]], ptr @dp, i64 0, i64 %51, i64 %indvars.iv67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %53 = load i32, ptr %38, align 4, !tbaa !8
  %54 = getelementptr inbounds [19 x [19 x i32]], ptr @path, i64 0, i64 %indvars.iv70, i64 %indvars.iv67
  %55 = load i32, ptr %54, align 4, !tbaa !8
  %56 = add nsw i32 %55, %53
  store i32 %56, ptr %2, align 4, !tbaa !8
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %58 = load i32, ptr %57, align 4, !tbaa !8
  store i32 %58, ptr %52, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %.pre = load i32, ptr %1, align 4
  br label %59

59:                                               ; preds = %.lr.ph49, %49
  %60 = phi i32 [ %41, %.lr.ph49 ], [ %.pre, %49 ]
  %61 = phi i32 [ %42, %.lr.ph49 ], [ %.pre, %49 ]
  %62 = phi i32 [ %43, %.lr.ph49 ], [ %.pre, %49 ]
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %63 = sext i32 %62 to i64
  %.not38.not = icmp slt i64 %indvars.iv67, %63
  br i1 %.not38.not, label %.lr.ph49, label %.loopexit, !llvm.loop !16

.loopexit:                                        ; preds = %59, %35
  %64 = phi i32 [ %36, %35 ], [ %60, %59 ]
  %65 = phi i32 [ %37, %35 ], [ %61, %59 ]
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %66 = sext i32 %65 to i64
  %.not37.not = icmp slt i64 %indvars.iv70, %66
  br i1 %.not37.not, label %35, label %._crit_edge53, !llvm.loop !17

._crit_edge60:                                    ; preds = %.lr.ph59, %._crit_edge55.thread, %._crit_edge55
  %67 = phi i32 [ 1061109567, %._crit_edge55 ], [ 1061109567, %._crit_edge55.thread ], [ %79, %.lr.ph59 ]
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %67)
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %68, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph59:                                         ; preds = %._crit_edge55, %.lr.ph59
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %.lr.ph59 ], [ 2, %._crit_edge55 ]
  %70 = phi i32 [ %80, %.lr.ph59 ], [ %30, %._crit_edge55 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %notmask = shl nsw i32 -1, %70
  %71 = xor i32 %notmask, -1
  %72 = zext nneg i32 %71 to i64
  %73 = getelementptr inbounds [262144 x [19 x i32]], ptr @dp, i64 0, i64 %72, i64 %indvars.iv76
  %74 = load i32, ptr %73, align 4, !tbaa !8
  %75 = getelementptr inbounds [19 x [19 x i32]], ptr @path, i64 0, i64 %indvars.iv76, i64 1
  %76 = load i32, ptr %75, align 4, !tbaa !8
  %77 = add nsw i32 %76, %74
  store i32 %77, ptr %4, align 4, !tbaa !8
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %79 = load i32, ptr %78, align 4, !tbaa !8
  store i32 %79, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %80 = load i32, ptr %1, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %.not36.not = icmp slt i64 %indvars.iv76, %81
  br i1 %.not36.not, label %.lr.ph59, label %._crit_edge60, !llvm.loop !18
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) 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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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 = { "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 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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