; LLVM IR from tangjz/acm-icpc :: lydsy/2067.ll (Z4dfs1ii)

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

%struct.Edge = type { i32, i32 }

@lnk = external dso_local global [100001 x i32], align 16
@lim = external dso_local global i32, align 4
@f = external dso_local global [100001 x i32], align 16
@e = external dso_local global [200003 x %struct.Edge], align 16
@_ZZ4dfs1iiE2mx = external hidden global [3 x i32], align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z4dfs1ii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i1, align 1
  %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
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %11 = load i32, ptr %4, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [100001 x i32], ptr @lnk, i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %14, ptr %6, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %37, %2
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %19, label %18

18:                                               ; preds = %15
  store i32 2, ptr %7, align 4
  br label %43

19:                                               ; preds = %15
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [200003 x %struct.Edge], ptr @e, i64 0, i64 %21
  %23 = getelementptr inbounds %struct.Edge, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = icmp ne i32 %24, %25
  br i1 %26, label %27, label %36

27:                                               ; preds = %19
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [200003 x %struct.Edge], ptr @e, i64 0, i64 %29
  %31 = getelementptr inbounds %struct.Edge, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = call noundef zeroext i1 @_Z4dfs1ii(i32 noundef %32, i32 noundef %33)
  br i1 %34, label %36, label %35

35:                                               ; preds = %27
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %43

36:                                               ; preds = %27, %19
  br label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200003 x %struct.Edge], ptr @e, i64 0, i64 %39
  %41 = getelementptr inbounds %struct.Edge, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !11
  store i32 %42, ptr %6, align 4, !tbaa !5
  br label %15, !llvm.loop !12

43:                                               ; preds = %35, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  %44 = load i32, ptr %7, align 4
  switch i32 %44, label %157 [
    i32 2, label %45
    i32 1, label %155
  ]

45:                                               ; preds = %43
  store i32 -1, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 2), align 4, !tbaa !5
  store i32 -1, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 1), align 4, !tbaa !5
  store i32 -1, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100001 x i32], ptr @lnk, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %49, ptr %8, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %87, %45
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %93

54:                                               ; preds = %50
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [200003 x %struct.Edge], ptr @e, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.Edge, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = icmp eq i32 %59, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %54
  br label %87

63:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [200003 x %struct.Edge], ptr @e, i64 0, i64 %65
  %67 = getelementptr inbounds %struct.Edge, ptr %66, i32 0, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  store i32 %71, ptr %9, align 4, !tbaa !5
  %72 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %63
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @_ZZ4dfs1iiE2mx, ptr noundef nonnull align 4 dereferenceable(4) %9) #3
  br label %76

76:                                               ; preds = %75, %63
  %77 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 1), align 4, !tbaa !5
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %80, label %81

80:                                               ; preds = %76
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 1), ptr noundef nonnull align 4 dereferenceable(4) %9) #3
  br label %81

81:                                               ; preds = %80, %76
  %82 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 2), align 4, !tbaa !5
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %81
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 2), ptr noundef nonnull align 4 dereferenceable(4) %9) #3
  br label %86

86:                                               ; preds = %85, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %87

87:                                               ; preds = %86, %62
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [200003 x %struct.Edge], ptr @e, i64 0, i64 %89
  %91 = getelementptr inbounds %struct.Edge, ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 8, !tbaa !11
  store i32 %92, ptr %8, align 4, !tbaa !5
  br label %50, !llvm.loop !14

93:                                               ; preds = %53
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = icmp eq i32 %94, -1
  br i1 %95, label %96, label %116

96:                                               ; preds = %93
  %97 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %98 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 1), align 4, !tbaa !5
  %99 = add nsw i32 %97, %98
  %100 = load i32, ptr @lim, align 4, !tbaa !5
  %101 = icmp sgt i32 %99, %100
  br i1 %101, label %109, label %102

102:                                              ; preds = %96
  %103 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %104 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 2), align 4, !tbaa !5
  %105 = add nsw i32 %103, %104
  %106 = add nsw i32 %105, 1
  %107 = load i32, ptr @lim, align 4, !tbaa !5
  %108 = icmp sgt i32 %106, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %102, %96
  store i1 false, ptr %3, align 1
  br label %155

110:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !5
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @_ZZ4dfs1iiE2mx, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = load i32, ptr %4, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %114
  store i32 %112, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %148

116:                                              ; preds = %93
  %117 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %118 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 1), align 4, !tbaa !5
  %119 = icmp sgt i32 %117, %118
  br i1 %119, label %120, label %132

120:                                              ; preds = %116
  %121 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %122 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 1), align 4, !tbaa !5
  %123 = add nsw i32 %121, %122
  %124 = add nsw i32 %123, 1
  %125 = load i32, ptr @lim, align 4, !tbaa !5
  %126 = icmp sle i32 %124, %125
  br i1 %126, label %127, label %132

127:                                              ; preds = %120
  %128 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %130
  store i32 %128, ptr %131, align 4, !tbaa !5
  br label %147

132:                                              ; preds = %120, %116
  %133 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %134 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @_ZZ4dfs1iiE2mx, i64 0, i64 2), align 4, !tbaa !5
  %135 = add nsw i32 %133, %134
  %136 = add nsw i32 %135, 1
  %137 = load i32, ptr @lim, align 4, !tbaa !5
  %138 = icmp sle i32 %136, %137
  br i1 %138, label %139, label %145

139:                                              ; preds = %132
  %140 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %143
  store i32 %141, ptr %144, align 4, !tbaa !5
  br label %146

145:                                              ; preds = %132
  store i1 false, ptr %3, align 1
  br label %155

146:                                              ; preds = %139
  br label %147

147:                                              ; preds = %146, %127
  br label %148

148:                                              ; preds = %147, %110
  %149 = load i32, ptr %4, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = load i32, ptr @lim, align 4, !tbaa !5
  %154 = icmp sle i32 %152, %153
  store i1 %154, ptr %3, align 1
  br label %155

155:                                              ; preds = %148, %145, %109, %43
  %156 = load i1, ptr %3, align 1
  ret i1 %156

157:                                              ; preds = %43
  unreachable
}

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

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

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

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

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

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

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


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

%struct.Edge = type { i32, i32 }

@lnk = external dso_local local_unnamed_addr global [100001 x i32], align 16
@lim = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local local_unnamed_addr global [100001 x i32], align 16
@e = external dso_local local_unnamed_addr global [200003 x %struct.Edge], align 16
@_ZZ4dfs1iiE2mx = external hidden global [3 x i32], align 4

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z4dfs1ii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = sext i32 %0 to i64
  %6 = getelementptr inbounds [100001 x i32], ptr @lnk, i64 0, i64 %5
  %.02034 = load i32, ptr %6, align 4, !tbaa !5
  %.not35 = icmp eq i32 %.02034, 0
  br i1 %.not35, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %2
  store i32 -1, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 8), align 4, !tbaa !5
  store i32 -1, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 4), align 4, !tbaa !5
  store i32 -1, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  br label %._crit_edge42

.lr.ph:                                           ; preds = %2, %13
  %.02036 = phi i32 [ %.020, %13 ], [ %.02034, %2 ]
  %7 = sext i32 %.02036 to i64
  %8 = getelementptr inbounds [200003 x %struct.Edge], ptr @e, i64 0, i64 %7
  %9 = getelementptr inbounds i8, ptr %8, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !9
  %.not26 = icmp eq i32 %10, %1
  br i1 %.not26, label %13, label %11

11:                                               ; preds = %.lr.ph
  %12 = tail call noundef zeroext i1 @_Z4dfs1ii(i32 noundef %10, i32 noundef %0)
  br i1 %12, label %13, label %.loopexit

13:                                               ; preds = %.lr.ph, %11
  %.020 = load i32, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i32 %.020, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %13
  %.037.pre = load i32, ptr %6, align 4, !tbaa !5
  store i32 -1, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 8), align 4, !tbaa !5
  store i32 -1, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 4), align 4, !tbaa !5
  store i32 -1, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %.not2738 = icmp eq i32 %.037.pre, 0
  br i1 %.not2738, label %._crit_edge42, label %.lr.ph41

._crit_edge42:                                    ; preds = %41, %._crit_edge.thread, %._crit_edge
  %14 = icmp eq i32 %1, -1
  %15 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 4), align 4, !tbaa !5
  %17 = load i32, ptr @lim, align 4, !tbaa !5
  br i1 %14, label %42, label %52

.lr.ph41:                                         ; preds = %._crit_edge, %41
  %.039 = phi i32 [ %.0, %41 ], [ %.037.pre, %._crit_edge ]
  %18 = sext i32 %.039 to i64
  %19 = getelementptr inbounds [200003 x %struct.Edge], ptr @e, i64 0, i64 %18
  %20 = getelementptr inbounds i8, ptr %19, i64 4
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = icmp eq i32 %21, %1
  br i1 %22, label %41, label %23

23:                                               ; preds = %.lr.ph41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %24 = sext i32 %21 to i64
  %25 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %26, ptr %3, align 4, !tbaa !5
  %27 = load i32, ptr @_ZZ4dfs1iiE2mx, align 4, !tbaa !5
  %28 = icmp slt i32 %27, %26
  br i1 %28, label %29, label %30

29:                                               ; preds = %23
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @_ZZ4dfs1iiE2mx, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %29, %23
  %31 = phi i32 [ %.pre, %29 ], [ %26, %23 ]
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 4), align 4, !tbaa !5
  %33 = icmp slt i32 %32, %31
  br i1 %33, label %34, label %35

34:                                               ; preds = %30
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 4), ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  %.pre44 = load i32, ptr %3, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %34, %30
  %36 = phi i32 [ %.pre44, %34 ], [ %31, %30 ]
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 8), align 4, !tbaa !5
  %38 = icmp slt i32 %37, %36
  br i1 %38, label %39, label %40

39:                                               ; preds = %35
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 8), ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  br label %40

40:                                               ; preds = %39, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %41

41:                                               ; preds = %.lr.ph41, %40
  %.0 = load i32, ptr %19, align 8, !tbaa !5
  %.not27 = icmp eq i32 %.0, 0
  br i1 %.not27, label %._crit_edge42, label %.lr.ph41, !llvm.loop !13

42:                                               ; preds = %._crit_edge42
  %43 = add nsw i32 %16, %15
  %44 = icmp sgt i32 %43, %17
  br i1 %44, label %.loopexit, label %45

45:                                               ; preds = %42
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 8), align 4, !tbaa !5
  %47 = add nsw i32 %46, %15
  %.not30 = icmp slt i32 %47, %17
  br i1 %.not30, label %48, label %.loopexit

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @_ZZ4dfs1iiE2mx, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %5
  store i32 %50, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  %.pre46 = load i32, ptr @lim, align 4, !tbaa !5
  br label %63

52:                                               ; preds = %._crit_edge42
  %53 = icmp sgt i32 %15, %16
  %54 = add nsw i32 %16, %15
  %.not28.not = icmp slt i32 %54, %17
  %or.cond = select i1 %53, i1 %.not28.not, i1 false
  br i1 %or.cond, label %55, label %57

55:                                               ; preds = %52
  %56 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %5
  store i32 %15, ptr %56, align 4, !tbaa !5
  br label %63

57:                                               ; preds = %52
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ4dfs1iiE2mx, i64 8), align 4, !tbaa !5
  %59 = add nsw i32 %58, %15
  %.not29.not = icmp slt i32 %59, %17
  br i1 %.not29.not, label %60, label %.loopexit

60:                                               ; preds = %57
  %61 = add nsw i32 %15, 1
  %62 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %5
  store i32 %61, ptr %62, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %55, %60, %48
  %64 = phi i32 [ %17, %55 ], [ %17, %60 ], [ %.pre46, %48 ]
  %65 = phi i32 [ %15, %55 ], [ %61, %60 ], [ %50, %48 ]
  %66 = icmp sle i32 %65, %64
  br label %.loopexit

.loopexit:                                        ; preds = %11, %57, %42, %45, %63
  %.1 = phi i1 [ %66, %63 ], [ false, %45 ], [ false, %42 ], [ false, %57 ], [ false, %11 ]
  ret i1 %.1
}

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

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nounwind }

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

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


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