; LLVM IR from stivalaa/EstimNetDirected :: src (graph)

; 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.graph_s = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, ptr, i32, ptr, ptr, i32, i32, ptr, i32, ptr }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__.inTwoPaths = external hidden unnamed_addr constant [51 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @inTwoPaths(ptr noundef %0, i32 noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %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 ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.graph_s, ptr %11, i32 0, i32 1
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %3
  br label %17

16:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 962, ptr noundef @__PRETTY_FUNCTION__.inTwoPaths) #4
  unreachable

17:                                               ; preds = %15
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.graph_s, ptr %18, i32 0, i32 4
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds i32, ptr %20, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.graph_s, ptr %25, i32 0, i32 4
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds i32, ptr %27, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = icmp ult i32 %24, %31
  br i1 %32, label %33, label %101

33:                                               ; preds = %17
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %97, %33
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.graph_s, ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %38, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = icmp ult i32 %35, %42
  br i1 %43, label %44, label %100

44:                                               ; preds = %34
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.graph_s, ptr %45, i32 0, i32 5
  %47 = load ptr, ptr %46, align 8, !tbaa !14
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds ptr, ptr %47, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !9
  store i32 %55, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = load i32, ptr %5, align 4, !tbaa !9
  %58 = icmp eq i32 %56, %57
  br i1 %58, label %63, label %59

59:                                               ; preds = %44
  %60 = load i32, ptr %7, align 4, !tbaa !9
  %61 = load i32, ptr %6, align 4, !tbaa !9
  %62 = icmp eq i32 %60, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %59, %44
  br label %97

64:                                               ; preds = %59
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %93, %64
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.graph_s, ptr %67, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !13
  %70 = load i32, ptr %6, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %69, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = icmp ult i32 %66, %73
  br i1 %74, label %75, label %96

75:                                               ; preds = %65
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.graph_s, ptr %76, i32 0, i32 5
  %78 = load ptr, ptr %77, align 8, !tbaa !14
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds ptr, ptr %78, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %82, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = icmp eq i32 %86, %87
  br i1 %88, label %89, label %92

89:                                               ; preds = %75
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = add i32 %90, 1
  store i32 %91, ptr %10, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %89, %75
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %9, align 4, !tbaa !9
  %95 = add i32 %94, 1
  store i32 %95, ptr %9, align 4, !tbaa !9
  br label %65, !llvm.loop !15

96:                                               ; preds = %65
  br label %97

97:                                               ; preds = %96, %63
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = add i32 %98, 1
  store i32 %99, ptr %8, align 4, !tbaa !9
  br label %34, !llvm.loop !17

100:                                              ; preds = %34
  br label %169

101:                                              ; preds = %17
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %165, %101
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.graph_s, ptr %104, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !13
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %106, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !9
  %111 = icmp ult i32 %103, %110
  br i1 %111, label %112, label %168

112:                                              ; preds = %102
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.graph_s, ptr %113, i32 0, i32 5
  %115 = load ptr, ptr %114, align 8, !tbaa !14
  %116 = load i32, ptr %6, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i32, ptr %8, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %119, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  store i32 %123, ptr %7, align 4, !tbaa !9
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = load i32, ptr %5, align 4, !tbaa !9
  %126 = icmp eq i32 %124, %125
  br i1 %126, label %131, label %127

127:                                              ; preds = %112
  %128 = load i32, ptr %7, align 4, !tbaa !9
  %129 = load i32, ptr %6, align 4, !tbaa !9
  %130 = icmp eq i32 %128, %129
  br i1 %130, label %131, label %132

131:                                              ; preds = %127, %112
  br label %165

132:                                              ; preds = %127
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %161, %132
  %134 = load i32, ptr %9, align 4, !tbaa !9
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.graph_s, ptr %135, i32 0, i32 4
  %137 = load ptr, ptr %136, align 8, !tbaa !13
  %138 = load i32, ptr %5, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = icmp ult i32 %134, %141
  br i1 %142, label %143, label %164

143:                                              ; preds = %133
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.graph_s, ptr %144, i32 0, i32 5
  %146 = load ptr, ptr %145, align 8, !tbaa !14
  %147 = load i32, ptr %5, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %146, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = load i32, ptr %9, align 4, !tbaa !9
  %152 = zext i32 %151 to i64
  %153 = getelementptr inbounds i32, ptr %150, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !9
  %155 = load i32, ptr %7, align 4, !tbaa !9
  %156 = icmp eq i32 %154, %155
  br i1 %156, label %157, label %160

157:                                              ; preds = %143
  %158 = load i32, ptr %10, align 4, !tbaa !9
  %159 = add i32 %158, 1
  store i32 %159, ptr %10, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %157, %143
  br label %161

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

164:                                              ; preds = %133
  br label %165

165:                                              ; preds = %164, %131
  %166 = load i32, ptr %8, align 4, !tbaa !9
  %167 = add i32 %166, 1
  store i32 %167, ptr %8, align 4, !tbaa !9
  br label %102, !llvm.loop !19

168:                                              ; preds = %102
  br label %169

169:                                              ; preds = %168, %100
  %170 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret i32 %170
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 }
attributes #4 = { noreturn 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"graph_s", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !6, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !6, i64 160, !10, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !6, i64 224, !10, i64 232, !10, i64 236, !6, i64 240, !6, i64 248, !10, i64 256, !6, i64 264, !10, i64 272, !6, i64 280, !6, i64 288, !10, i64 296, !10, i64 300, !6, i64 304, !10, i64 312, !6, i64 320}
!13 = !{!12, !6, i64 16}
!14 = !{!12, !6, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


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

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__.inTwoPaths = external hidden unnamed_addr constant [51 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @inTwoPaths(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 4
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %6, label %7

6:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 962, ptr noundef nonnull @__PRETTY_FUNCTION__.inTwoPaths) #3
  unreachable

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = zext i32 %1 to i64
  %11 = getelementptr inbounds i32, ptr %9, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !12
  %.fr70 = freeze i32 %12
  %13 = zext i32 %2 to i64
  %14 = getelementptr inbounds i32, ptr %9, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !12
  %16 = icmp ult i32 %.fr70, %15
  br i1 %16, label %.preheader53, label %.preheader57

.preheader57:                                     ; preds = %7
  %.not69 = icmp eq i32 %15, 0
  br i1 %.not69, label %.loopexit54, label %.lr.ph63

.lr.ph63:                                         ; preds = %.preheader57
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = getelementptr inbounds ptr, ptr %18, i64 %13
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %.not71 = icmp eq i32 %.fr70, 0
  %21 = getelementptr inbounds ptr, ptr %18, i64 %10
  br i1 %.not71, label %.loopexit54, label %.lr.ph63.split.us.preheader

.lr.ph63.split.us.preheader:                      ; preds = %.lr.ph63
  %wide.trip.count79 = zext i32 %15 to i64
  %wide.trip.count = zext i32 %.fr70 to i64
  %min.iters.check = icmp ult i32 %.fr70, 8
  %n.vec = and i64 %wide.trip.count, 4294967288
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.lr.ph63.split.us

.lr.ph63.split.us:                                ; preds = %.lr.ph63.split.us.preheader, %..loopexit56_crit_edge.us
  %indvars.iv76 = phi i64 [ 0, %.lr.ph63.split.us.preheader ], [ %indvars.iv.next77, %..loopexit56_crit_edge.us ]
  %.462.us = phi i32 [ 0, %.lr.ph63.split.us.preheader ], [ %.7.us, %..loopexit56_crit_edge.us ]
  %22 = getelementptr inbounds i32, ptr %20, i64 %indvars.iv76
  %23 = load i32, ptr %22, align 4, !tbaa !12
  %24 = icmp eq i32 %23, %1
  %25 = icmp eq i32 %23, %2
  %or.cond51.us = or i1 %24, %25
  br i1 %or.cond51.us, label %..loopexit56_crit_edge.us, label %.preheader55.us

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.560.us = phi i32 [ %spec.select52.us, %scalar.ph ], [ %.560.us.ph, %scalar.ph.preheader ]
  %26 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv
  %27 = load i32, ptr %26, align 4, !tbaa !12
  %28 = icmp eq i32 %27, %23
  %29 = zext i1 %28 to i32
  %spec.select52.us = add i32 %.560.us, %29
  %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 %..loopexit56_crit_edge.us, label %scalar.ph, !llvm.loop !15

..loopexit56_crit_edge.us:                        ; preds = %scalar.ph, %middle.block, %.lr.ph63.split.us
  %.7.us = phi i32 [ %.462.us, %.lr.ph63.split.us ], [ %41, %middle.block ], [ %spec.select52.us, %scalar.ph ]
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count79
  br i1 %exitcond80.not, label %.loopexit54, label %.lr.ph63.split.us, !llvm.loop !19

.preheader55.us:                                  ; preds = %.lr.ph63.split.us
  %30 = load ptr, ptr %21, align 8, !tbaa !14
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader55.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader55.us ], [ %n.vec, %middle.block ]
  %.560.us.ph = phi i32 [ %.462.us, %.preheader55.us ], [ %41, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.preheader55.us
  %31 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.462.us, i64 0
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %23, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %31, %vector.ph ], [ %38, %vector.body ]
  %vec.phi93 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %39, %vector.body ]
  %32 = getelementptr inbounds i32, ptr %30, i64 %index
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %wide.load = load <4 x i32>, ptr %32, align 4, !tbaa !12
  %wide.load94 = load <4 x i32>, ptr %33, align 4, !tbaa !12
  %34 = icmp eq <4 x i32> %wide.load, %broadcast.splat
  %35 = icmp eq <4 x i32> %wide.load94, %broadcast.splat
  %36 = zext <4 x i1> %34 to <4 x i32>
  %37 = zext <4 x i1> %35 to <4 x i32>
  %38 = add <4 x i32> %vec.phi, %36
  %39 = add <4 x i32> %vec.phi93, %37
  %index.next = add nuw i64 %index, 8
  %40 = icmp eq i64 %index.next, %n.vec
  br i1 %40, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %39, %38
  %41 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %..loopexit56_crit_edge.us, label %scalar.ph.preheader

.preheader53:                                     ; preds = %7
  %.not72 = icmp eq i32 %.fr70, 0
  br i1 %.not72, label %.loopexit54, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader53
  %42 = getelementptr inbounds i8, ptr %0, i64 24
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = getelementptr inbounds ptr, ptr %43, i64 %10
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %46 = getelementptr inbounds ptr, ptr %43, i64 %13
  %wide.trip.count89 = zext i32 %.fr70 to i64
  %wide.trip.count84 = zext i32 %15 to i64
  %min.iters.check97 = icmp ult i32 %15, 8
  %n.vec100 = and i64 %wide.trip.count84, 4294967288
  %cmp.n112 = icmp eq i64 %n.vec100, %wide.trip.count84
  br label %47

47:                                               ; preds = %.lr.ph, %.loopexit
  %indvars.iv86 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next87, %.loopexit ]
  %.068 = phi i32 [ 0, %.lr.ph ], [ %.3, %.loopexit ]
  %48 = getelementptr inbounds i32, ptr %45, i64 %indvars.iv86
  %49 = load i32, ptr %48, align 4, !tbaa !12
  %50 = icmp eq i32 %49, %1
  %51 = icmp eq i32 %49, %2
  %or.cond = or i1 %50, %51
  br i1 %or.cond, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %47
  %52 = load ptr, ptr %46, align 8, !tbaa !14
  br i1 %min.iters.check97, label %scalar.ph96.preheader, label %vector.ph98

vector.ph98:                                      ; preds = %.preheader
  %53 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.068, i64 0
  %broadcast.splatinsert108 = insertelement <4 x i32> poison, i32 %49, i64 0
  %broadcast.splat109 = shufflevector <4 x i32> %broadcast.splatinsert108, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body102

vector.body102:                                   ; preds = %vector.body102, %vector.ph98
  %index103 = phi i64 [ 0, %vector.ph98 ], [ %index.next110, %vector.body102 ]
  %vec.phi104 = phi <4 x i32> [ %53, %vector.ph98 ], [ %60, %vector.body102 ]
  %vec.phi105 = phi <4 x i32> [ zeroinitializer, %vector.ph98 ], [ %61, %vector.body102 ]
  %54 = getelementptr inbounds i32, ptr %52, i64 %index103
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %wide.load106 = load <4 x i32>, ptr %54, align 4, !tbaa !12
  %wide.load107 = load <4 x i32>, ptr %55, align 4, !tbaa !12
  %56 = icmp eq <4 x i32> %wide.load106, %broadcast.splat109
  %57 = icmp eq <4 x i32> %wide.load107, %broadcast.splat109
  %58 = zext <4 x i1> %56 to <4 x i32>
  %59 = zext <4 x i1> %57 to <4 x i32>
  %60 = add <4 x i32> %vec.phi104, %58
  %61 = add <4 x i32> %vec.phi105, %59
  %index.next110 = add nuw i64 %index103, 8
  %62 = icmp eq i64 %index.next110, %n.vec100
  br i1 %62, label %middle.block95, label %vector.body102, !llvm.loop !21

middle.block95:                                   ; preds = %vector.body102
  %bin.rdx111 = add <4 x i32> %61, %60
  %63 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx111)
  br i1 %cmp.n112, label %.loopexit, label %scalar.ph96.preheader

scalar.ph96.preheader:                            ; preds = %middle.block95, %.preheader
  %indvars.iv81.ph = phi i64 [ 0, %.preheader ], [ %n.vec100, %middle.block95 ]
  %.166.ph = phi i32 [ %.068, %.preheader ], [ %63, %middle.block95 ]
  br label %scalar.ph96

scalar.ph96:                                      ; preds = %scalar.ph96.preheader, %scalar.ph96
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %scalar.ph96 ], [ %indvars.iv81.ph, %scalar.ph96.preheader ]
  %.166 = phi i32 [ %spec.select, %scalar.ph96 ], [ %.166.ph, %scalar.ph96.preheader ]
  %64 = getelementptr inbounds i32, ptr %52, i64 %indvars.iv81
  %65 = load i32, ptr %64, align 4, !tbaa !12
  %66 = icmp eq i32 %65, %49
  %67 = zext i1 %66 to i32
  %spec.select = add i32 %.166, %67
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %.loopexit, label %scalar.ph96, !llvm.loop !22

.loopexit:                                        ; preds = %scalar.ph96, %middle.block95, %47
  %.3 = phi i32 [ %.068, %47 ], [ %63, %middle.block95 ], [ %spec.select, %scalar.ph96 ]
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %.loopexit54, label %47, !llvm.loop !23

.loopexit54:                                      ; preds = %..loopexit56_crit_edge.us, %.loopexit, %.lr.ph63, %.preheader57, %.preheader53
  %.8 = phi i32 [ 0, %.preheader53 ], [ 0, %.preheader57 ], [ 0, %.lr.ph63 ], [ %.3, %.loopexit ], [ %.7.us, %..loopexit56_crit_edge.us ]
  ret i32 %.8
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #2

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { noreturn 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, !7, i64 4}
!6 = !{!"graph_s", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !10, i64 104, !10, i64 112, !7, i64 120, !10, i64 128, !10, i64 136, !7, i64 144, !10, i64 152, !10, i64 160, !7, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !10, i64 224, !7, i64 232, !7, i64 236, !10, i64 240, !10, i64 248, !7, i64 256, !10, i64 264, !7, i64 272, !10, i64 280, !10, i64 288, !7, i64 296, !7, i64 300, !10, i64 304, !7, i64 312, !10, i64 320}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 16}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !10, i64 24}
!14 = !{!10, !10, i64 0}
!15 = distinct !{!15, !16, !17, !18}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16, !18, !17}
!21 = distinct !{!21, !16, !18, !17}
!22 = distinct !{!22, !16, !17, !18}
!23 = distinct !{!23, !16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass