; LLVM IR from tangjz/acm-icpc :: lydsy/3308.ll (ZN8PrimDual4SPFAEv)

; 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.PrimDual::Edge" = type { i32, i32, i32, i32 }

@_ZN8PrimDual1NE = external dso_local global i32, align 4
@_ZN8PrimDual1SE = external dso_local global i32, align 4
@_ZN8PrimDual1TE = external dso_local global i32, align 4
@_ZN8PrimDual3lnkE = external dso_local global [200001 x i32], align 16
@_ZN8PrimDual3disE = external dso_local global [200001 x i32], align 16
@_ZN8PrimDual3sumE = external dso_local global i32, align 4
@_ZN8PrimDual1eE = external dso_local global [400003 x %"struct.PrimDual::Edge"], align 16
@_ZN8PrimDual3visE = external dso_local global [200001 x i8], align 16
@_ZZN8PrimDual4SPFAEvE3que = external hidden global [200001 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN8PrimDual4SPFAEv() #0 {
  %1 = alloca i1, align 1
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  %11 = load i32, ptr @_ZN8PrimDual1NE, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = mul i64 %12, 4
  call void @llvm.memset.p0.i64(ptr align 16 @_ZN8PrimDual3disE, i8 63, i64 %13, i1 false)
  %14 = load i32, ptr @_ZN8PrimDual1NE, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = mul i64 %15, 4
  call void @llvm.memset.p0.i64(ptr align 16 @_ZN8PrimDual3visE, i8 0, i64 %16, i1 false)
  %17 = load i32, ptr @_ZN8PrimDual1TE, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %18
  store i32 0, ptr %19, align 4, !tbaa !5
  %20 = load i32, ptr @_ZN8PrimDual1TE, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [200001 x i8], ptr @_ZN8PrimDual3visE, i64 0, i64 %21
  store i8 1, ptr %22, align 1, !tbaa !9
  %23 = load i32, ptr @_ZN8PrimDual1TE, align 4, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %3, align 4, !tbaa !5
  %26 = sext i32 %24 to i64
  %27 = getelementptr inbounds [200001 x i32], ptr @_ZZN8PrimDual4SPFAEvE3que, i64 0, i64 %26
  store i32 %23, ptr %27, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %118, %0
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = icmp ne i32 %29, %30
  br i1 %31, label %32, label %119

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %33 to i64
  %36 = getelementptr inbounds [200001 x i32], ptr @_ZZN8PrimDual4SPFAEvE3que, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  store i32 %37, ptr %4, align 4, !tbaa !5
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200001 x i8], ptr @_ZN8PrimDual3visE, i64 0, i64 %39
  store i8 0, ptr %40, align 1, !tbaa !9
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = icmp eq i32 %41, 200001
  br i1 %42, label %43, label %44

43:                                               ; preds = %32
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %43, %32
  %45 = phi i1 [ false, %32 ], [ false, %43 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3lnkE, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %49, ptr %5, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %112, %44
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = icmp ne i32 %51, -1
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %118

54:                                               ; preds = %50
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = xor i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %57
  %59 = getelementptr inbounds %"struct.PrimDual::Edge", ptr %58, i32 0, i32 2
  %60 = load i32, ptr %59, align 8, !tbaa !11
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %63, label %62

62:                                               ; preds = %54
  br label %112

63:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %65
  %67 = getelementptr inbounds %"struct.PrimDual::Edge", ptr %66, i32 0, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !13
  store i32 %68, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = xor i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %75
  %77 = getelementptr inbounds %"struct.PrimDual::Edge", ptr %76, i32 0, i32 3
  %78 = load i32, ptr %77, align 4, !tbaa !14
  %79 = add nsw i32 %72, %78
  store i32 %79, ptr %7, align 4, !tbaa !5
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp slt i32 %80, %84
  br i1 %85, label %86, label %111

86:                                               ; preds = %63
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %89
  store i32 %87, ptr %90, align 4, !tbaa !5
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [200001 x i8], ptr @_ZN8PrimDual3visE, i64 0, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !9, !range !15, !noundef !16
  %95 = trunc i8 %94 to i1
  br i1 %95, label %110, label %96

96:                                               ; preds = %86
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [200001 x i8], ptr @_ZN8PrimDual3visE, i64 0, i64 %98
  store i8 1, ptr %99, align 1, !tbaa !9
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %3, align 4, !tbaa !5
  %103 = sext i32 %101 to i64
  %104 = getelementptr inbounds [200001 x i32], ptr @_ZZN8PrimDual4SPFAEvE3que, i64 0, i64 %103
  store i32 %100, ptr %104, align 4, !tbaa !5
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = icmp eq i32 %105, 200001
  br i1 %106, label %107, label %108

107:                                              ; preds = %96
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %107, %96
  %109 = phi i1 [ false, %96 ], [ false, %107 ]
  br label %110

110:                                              ; preds = %108, %86
  br label %111

111:                                              ; preds = %110, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %112

112:                                              ; preds = %111, %62
  %113 = load i32, ptr %5, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %114
  %116 = getelementptr inbounds %"struct.PrimDual::Edge", ptr %115, i32 0, i32 0
  %117 = load i32, ptr %116, align 16, !tbaa !17
  store i32 %117, ptr %5, align 4, !tbaa !5
  br label %50, !llvm.loop !18

118:                                              ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %28, !llvm.loop !20

119:                                              ; preds = %28
  %120 = load i32, ptr @_ZN8PrimDual1SE, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = icmp eq i32 %123, 1061109567
  br i1 %124, label %125, label %126

125:                                              ; preds = %119
  store i1 false, ptr %1, align 1
  store i32 1, ptr %8, align 4
  br label %178

126:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %168, %126
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = load i32, ptr @_ZN8PrimDual1NE, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 7, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %171

132:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %133 = load i32, ptr %9, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3lnkE, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  store i32 %136, ptr %10, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %161, %132
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = icmp ne i32 %138, -1
  br i1 %139, label %141, label %140

140:                                              ; preds = %137
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %167

141:                                              ; preds = %137
  %142 = load i32, ptr %10, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %143
  %145 = getelementptr inbounds %"struct.PrimDual::Edge", ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !13
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = sub nsw i32 %149, %153
  %155 = load i32, ptr %10, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %156
  %158 = getelementptr inbounds %"struct.PrimDual::Edge", ptr %157, i32 0, i32 3
  %159 = load i32, ptr %158, align 4, !tbaa !14
  %160 = add nsw i32 %159, %154
  store i32 %160, ptr %158, align 4, !tbaa !14
  br label %161

161:                                              ; preds = %141
  %162 = load i32, ptr %10, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %163
  %165 = getelementptr inbounds %"struct.PrimDual::Edge", ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 16, !tbaa !17
  store i32 %166, ptr %10, align 4, !tbaa !5
  br label %137, !llvm.loop !21

167:                                              ; preds = %140
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %9, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %9, align 4, !tbaa !5
  br label %127, !llvm.loop !22

171:                                              ; preds = %131
  %172 = load i32, ptr @_ZN8PrimDual1SE, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = load i32, ptr @_ZN8PrimDual3sumE, align 4, !tbaa !5
  %177 = add nsw i32 %176, %175
  store i32 %177, ptr @_ZN8PrimDual3sumE, align 4, !tbaa !5
  store i1 true, ptr %1, align 1
  store i32 1, ptr %8, align 4
  br label %178

178:                                              ; preds = %171, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  %179 = load i1, ptr %1, align 1
  ret i1 %179
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN8PrimDual4EdgeE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!13 = !{!12, !6, i64 4}
!14 = !{!12, !6, i64 12}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!12, !6, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


; 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.PrimDual::Edge" = type { i32, i32, i32, i32 }

@_ZN8PrimDual1NE = external dso_local local_unnamed_addr global i32, align 4
@_ZN8PrimDual1SE = external dso_local local_unnamed_addr global i32, align 4
@_ZN8PrimDual1TE = external dso_local local_unnamed_addr global i32, align 4
@_ZN8PrimDual3lnkE = external dso_local local_unnamed_addr global [200001 x i32], align 16
@_ZN8PrimDual3disE = external dso_local local_unnamed_addr global [200001 x i32], align 16
@_ZN8PrimDual3sumE = external dso_local local_unnamed_addr global i32, align 4
@_ZN8PrimDual1eE = external dso_local local_unnamed_addr global [400003 x %"struct.PrimDual::Edge"], align 16
@_ZN8PrimDual3visE = external dso_local local_unnamed_addr global [200001 x i8], align 16
@_ZZN8PrimDual4SPFAEvE3que = external hidden local_unnamed_addr global [200001 x i32], align 16

; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local noundef zeroext i1 @_ZN8PrimDual4SPFAEv() local_unnamed_addr #0 {
  %1 = load i32, ptr @_ZN8PrimDual1NE, align 4, !tbaa !5
  %2 = sext i32 %1 to i64
  %3 = shl nsw i64 %2, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZN8PrimDual3disE, i8 63, i64 %3, i1 false)
  tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZN8PrimDual3visE, i8 0, i64 %3, i1 false)
  %4 = load i32, ptr @_ZN8PrimDual1TE, align 4, !tbaa !5
  %5 = sext i32 %4 to i64
  %6 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %5
  store i32 0, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds [200001 x i8], ptr @_ZN8PrimDual3visE, i64 0, i64 %5
  store i8 1, ptr %7, align 1, !tbaa !9
  store i32 %4, ptr @_ZZN8PrimDual4SPFAEvE3que, align 16, !tbaa !5
  br label %8

.loopexit:                                        ; preds = %._crit_edge54, %8
  %.1.lcssa = phi i32 [ %.03544, %8 ], [ %.3, %._crit_edge54 ]
  %.not = icmp eq i32 %spec.store.select, %.1.lcssa
  br i1 %.not, label %45, label %8, !llvm.loop !11

8:                                                ; preds = %0, %.loopexit
  %.03345 = phi i32 [ 0, %0 ], [ %spec.store.select, %.loopexit ]
  %.03544 = phi i32 [ 1, %0 ], [ %.1.lcssa, %.loopexit ]
  %9 = add nsw i32 %.03345, 1
  %10 = sext i32 %.03345 to i64
  %11 = getelementptr inbounds [200001 x i32], ptr @_ZZN8PrimDual4SPFAEvE3que, i64 0, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [200001 x i8], ptr @_ZN8PrimDual3visE, i64 0, i64 %13
  store i8 0, ptr %14, align 1, !tbaa !9
  %15 = icmp eq i32 %9, 200001
  %spec.store.select = select i1 %15, i32 0, i32 %9
  %16 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3lnkE, i64 0, i64 %13
  %.03440 = load i32, ptr %16, align 4, !tbaa !5
  %.not3841 = icmp eq i32 %.03440, -1
  br i1 %.not3841, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %8
  %17 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %13
  br label %18

18:                                               ; preds = %.lr.ph, %._crit_edge54
  %.03443 = phi i32 [ %.03440, %.lr.ph ], [ %.034, %._crit_edge54 ]
  %.142 = phi i32 [ %.03544, %.lr.ph ], [ %.3, %._crit_edge54 ]
  %19 = xor i32 %.03443, 1
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %20
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load i32, ptr %22, align 8, !tbaa !13
  %.not39 = icmp eq i32 %23, 0
  %.pre = sext i32 %.03443 to i64
  br i1 %.not39, label %._crit_edge54, label %24

24:                                               ; preds = %18
  %25 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %.pre, i32 1
  %26 = load i32, ptr %25, align 4, !tbaa !15
  %27 = load i32, ptr %17, align 4, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %21, i64 12
  %29 = load i32, ptr %28, align 4, !tbaa !16
  %30 = add nsw i32 %29, %27
  %31 = sext i32 %26 to i64
  %32 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = icmp slt i32 %30, %33
  br i1 %34, label %35, label %._crit_edge54

35:                                               ; preds = %24
  store i32 %30, ptr %32, align 4, !tbaa !5
  %36 = getelementptr inbounds [200001 x i8], ptr @_ZN8PrimDual3visE, i64 0, i64 %31
  %37 = load i8, ptr %36, align 1, !tbaa !9, !range !17, !noundef !18
  %38 = trunc nuw i8 %37 to i1
  br i1 %38, label %._crit_edge54, label %39

39:                                               ; preds = %35
  store i8 1, ptr %36, align 1, !tbaa !9
  %40 = add nsw i32 %.142, 1
  %41 = sext i32 %.142 to i64
  %42 = getelementptr inbounds [200001 x i32], ptr @_ZZN8PrimDual4SPFAEvE3que, i64 0, i64 %41
  store i32 %26, ptr %42, align 4, !tbaa !5
  %43 = icmp eq i32 %40, 200001
  %spec.store.select1 = select i1 %43, i32 0, i32 %40
  br label %._crit_edge54

._crit_edge54:                                    ; preds = %18, %24, %39, %35
  %.3 = phi i32 [ %.142, %24 ], [ %spec.store.select1, %39 ], [ %.142, %35 ], [ %.142, %18 ]
  %44 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %.pre
  %.034 = load i32, ptr %44, align 16, !tbaa !5
  %.not38 = icmp eq i32 %.034, -1
  br i1 %.not38, label %.loopexit, label %18, !llvm.loop !19

45:                                               ; preds = %.loopexit
  %46 = load i32, ptr @_ZN8PrimDual1SE, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp ne i32 %49, 1061109567
  br i1 %50, label %.preheader, label %69

.preheader:                                       ; preds = %45
  %51 = icmp sgt i32 %1, 0
  br i1 %51, label %.lr.ph51.preheader, label %._crit_edge52

.lr.ph51.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %.lr.ph51

._crit_edge52:                                    ; preds = %._crit_edge, %.preheader
  %52 = load i32, ptr @_ZN8PrimDual3sumE, align 4, !tbaa !5
  %53 = add nsw i32 %52, %49
  store i32 %53, ptr @_ZN8PrimDual3sumE, align 4, !tbaa !5
  br label %69

.lr.ph51:                                         ; preds = %.lr.ph51.preheader, %._crit_edge
  %indvars.iv = phi i64 [ 0, %.lr.ph51.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %54 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3lnkE, i64 0, i64 %indvars.iv
  %.046 = load i32, ptr %54, align 4, !tbaa !5
  %.not3747 = icmp eq i32 %.046, -1
  br i1 %.not3747, label %._crit_edge, label %.lr.ph49

.lr.ph49:                                         ; preds = %.lr.ph51
  %55 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %indvars.iv
  %56 = load i32, ptr %55, align 4, !tbaa !5
  br label %57

._crit_edge:                                      ; preds = %57, %.lr.ph51
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge52, label %.lr.ph51, !llvm.loop !20

57:                                               ; preds = %.lr.ph49, %57
  %.048 = phi i32 [ %.046, %.lr.ph49 ], [ %.0, %57 ]
  %58 = sext i32 %.048 to i64
  %59 = getelementptr inbounds [400003 x %"struct.PrimDual::Edge"], ptr @_ZN8PrimDual1eE, i64 0, i64 %58
  %60 = getelementptr inbounds i8, ptr %59, i64 4
  %61 = load i32, ptr %60, align 4, !tbaa !15
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [200001 x i32], ptr @_ZN8PrimDual3disE, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sub i32 %64, %56
  %66 = getelementptr inbounds i8, ptr %59, i64 12
  %67 = load i32, ptr %66, align 4, !tbaa !16
  %68 = add nsw i32 %65, %67
  store i32 %68, ptr %66, align 4, !tbaa !16
  %.0 = load i32, ptr %59, align 16, !tbaa !5
  %.not37 = icmp eq i32 %.0, -1
  br i1 %.not37, label %._crit_edge, label %57, !llvm.loop !21

69:                                               ; preds = %45, %._crit_edge52
  ret i1 %50
}

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

attributes #0 = { mustprogress nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) 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 nounwind willreturn memory(argmem: write) }

!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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSN8PrimDual4EdgeE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!15 = !{!14, !6, i64 4}
!16 = !{!14, !6, i64 12}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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