; LLVM IR from boschglobal/dse.network :: tests/benchmark (bench_net)

; 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.vector_t = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.timespec = type { i64, i64 }
%struct.signal_t = type { i32, ptr, ptr, ptr, ptr, ptr, [8 x i8], [16 x i8] }

@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @get_timespec_now() #0

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @get_elapsedtime_ns(i64, i64) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local double @ns_to_us_to_sec(i64 noundef) #0

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
declare dso_local void @_allocate_vectors(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @run_bench_vector(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.vector_t, align 8
  %10 = alloca %struct.timespec, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #4
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 80, i1 false)
  %17 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 0
  %18 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %18, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 1
  %20 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 2
  %21 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 3
  %22 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 4
  %23 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 5
  %24 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 6
  %25 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 7
  %26 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 8
  %27 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 9
  call void @_allocate_vectors(ptr noundef %9)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %28 = call { i64, i64 } @get_timespec_now()
  %29 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %30 = extractvalue { i64, i64 } %28, 0
  store i64 %30, ptr %29, align 8
  %31 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %32 = extractvalue { i64, i64 } %28, 1
  store i64 %32, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %138, %4
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

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

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

39:                                               ; preds = %134, %38
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %45 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = load i32, ptr %13, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds double, ptr %46, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !14
  store double %50, ptr %14, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %51 = load double, ptr %14, align 8, !tbaa !14
  %52 = fadd double %51, 1.000000e+00
  store double %52, ptr %15, align 8, !tbaa !14
  %53 = load double, ptr %15, align 8, !tbaa !14
  %54 = fcmp ogt double %53, 1.000000e+02
  br i1 %54, label %55, label %56

55:                                               ; preds = %44
  br label %58

56:                                               ; preds = %44
  %57 = load double, ptr %15, align 8, !tbaa !14
  br label %58

58:                                               ; preds = %56, %55
  %59 = phi double [ 0.000000e+00, %55 ], [ %57, %56 ]
  store double %59, ptr %15, align 8, !tbaa !14
  %60 = load double, ptr %15, align 8, !tbaa !14
  %61 = fdiv double %60, 5.000000e-01
  store double %61, ptr %15, align 8, !tbaa !14
  %62 = load double, ptr %15, align 8, !tbaa !14
  %63 = fptoui double %62 to i8
  %64 = zext i8 %63 to i64
  %65 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i64, ptr %66, i64 %68
  store i64 %64, ptr %69, align 8, !tbaa !17
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds %struct.signal_t, ptr %70, i64 %72
  %74 = getelementptr inbounds %struct.signal_t, ptr %73, i32 0, i32 6
  %75 = getelementptr inbounds [8 x i8], ptr %74, i64 0, i64 0
  %76 = load i8, ptr %75, align 8, !tbaa !19
  %77 = zext i8 %76 to i32
  %78 = shl i32 %77, 1
  %79 = trunc i32 %78 to i8
  %80 = zext i8 %79 to i32
  %81 = and i32 %80, 126
  %82 = trunc i32 %81 to i8
  %83 = zext i8 %82 to i64
  %84 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 5
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i64, ptr %85, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !17
  %90 = or i64 %89, %83
  store i64 %90, ptr %88, align 8, !tbaa !17
  %91 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 5
  %92 = load ptr, ptr %91, align 8, !tbaa !20
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i64, ptr %92, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !17
  %97 = and i64 %96, 126
  %98 = trunc i64 %97 to i8
  %99 = zext i8 %98 to i32
  %100 = ashr i32 %99, 1
  %101 = trunc i32 %100 to i8
  %102 = zext i8 %101 to i64
  %103 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !16
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i64, ptr %104, i64 %106
  store i64 %102, ptr %107, align 8, !tbaa !17
  %108 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 4
  %109 = load ptr, ptr %108, align 8, !tbaa !16
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i64, ptr %109, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !17
  %114 = icmp ule i64 %113, 200
  br i1 %114, label %115, label %124

115:                                              ; preds = %58
  %116 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !16
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i64, ptr %117, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !17
  %122 = uitofp i64 %121 to double
  %123 = fmul double %122, 5.000000e-01
  store double %123, ptr %15, align 8, !tbaa !14
  br label %127

124:                                              ; preds = %58
  %125 = load double, ptr %15, align 8, !tbaa !14
  %126 = fadd double %125, 1.000000e+00
  store double %126, ptr %15, align 8, !tbaa !14
  br label %127

127:                                              ; preds = %124, %115
  %128 = load double, ptr %15, align 8, !tbaa !14
  %129 = getelementptr inbounds %struct.vector_t, ptr %9, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8, !tbaa !13
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds double, ptr %130, i64 %132
  store double %128, ptr %133, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %134

134:                                              ; preds = %127
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %13, align 4, !tbaa !9
  br label %39, !llvm.loop !21

137:                                              ; preds = %43
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %11, align 4, !tbaa !9
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %11, align 4, !tbaa !9
  br label %33, !llvm.loop !23

141:                                              ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %142 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %143 = load i64, ptr %142, align 8
  %144 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %145 = load i64, ptr %144, align 8
  %146 = call i64 @get_elapsedtime_ns(i64 %143, i64 %145)
  store i64 %146, ptr %16, align 8, !tbaa !17
  %147 = load i64, ptr %16, align 8, !tbaa !17
  %148 = call double @ns_to_us_to_sec(i64 noundef %147)
  %149 = load i32, ptr %8, align 4, !tbaa !9
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %148, i32 noundef %149, i32 noundef %150)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #4
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 0}
!12 = !{!"vector_t", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!13 = !{!12, !6, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!12, !6, i64 32}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!12, !6, i64 40}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; 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.vector_t = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.signal_t = type { i32, ptr, ptr, ptr, ptr, ptr, [8 x i8], [16 x i8] }

@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @get_timespec_now() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @get_elapsedtime_ns(i64, i64) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local double @ns_to_us_to_sec(i64 noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @_allocate_vectors(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @run_bench_vector(ptr nocapture noundef readnone %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca %struct.vector_t, align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %5, i8 0, i64 80, i1 false)
  store i32 %2, ptr %5, align 8, !tbaa !5
  call void @_allocate_vectors(ptr noundef nonnull %5)
  %6 = call { i64, i64 } @get_timespec_now()
  %7 = icmp sgt i32 %3, 0
  br i1 %7, label %.preheader.lr.ph, label %._crit_edge32

.preheader.lr.ph:                                 ; preds = %4
  %8 = icmp sgt i32 %2, 0
  %9 = getelementptr inbounds i8, ptr %5, i64 8
  %10 = load ptr, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr %5, i64 32
  %12 = load ptr, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr %5, i64 40
  %14 = load ptr, ptr %13, align 8
  br i1 %8, label %.preheader.us.preheader, label %._crit_edge32

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count = zext nneg i32 %2 to i64
  %15 = shl nuw nsw i64 %wide.trip.count, 3
  %scevgep = getelementptr i8, ptr %12, i64 %15
  %scevgep36 = getelementptr i8, ptr %14, i64 %15
  %scevgep37 = getelementptr i8, ptr %10, i64 %15
  %scevgep38 = getelementptr i8, ptr %1, i64 48
  %16 = mul nuw nsw i64 %wide.trip.count, 72
  %17 = getelementptr i8, ptr %1, i64 %16
  %scevgep39 = getelementptr i8, ptr %17, i64 -23
  %min.iters.check = icmp ult i32 %2, 4
  %bound0 = icmp ult ptr %12, %scevgep36
  %bound1 = icmp ult ptr %14, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound040 = icmp ult ptr %12, %scevgep37
  %bound141 = icmp ult ptr %10, %scevgep
  %found.conflict42 = and i1 %bound040, %bound141
  %conflict.rdx = or i1 %found.conflict, %found.conflict42
  %bound043 = icmp ult ptr %12, %scevgep39
  %bound144 = icmp ult ptr %scevgep38, %scevgep
  %found.conflict45 = and i1 %bound043, %bound144
  %conflict.rdx46 = or i1 %conflict.rdx, %found.conflict45
  %bound047 = icmp ult ptr %14, %scevgep37
  %bound148 = icmp ult ptr %10, %scevgep36
  %found.conflict49 = and i1 %bound047, %bound148
  %conflict.rdx50 = or i1 %conflict.rdx46, %found.conflict49
  %bound051 = icmp ult ptr %14, %scevgep39
  %bound152 = icmp ult ptr %scevgep38, %scevgep36
  %found.conflict53 = and i1 %bound051, %bound152
  %conflict.rdx54 = or i1 %conflict.rdx50, %found.conflict53
  %bound055 = icmp ult ptr %10, %scevgep39
  %bound156 = icmp ult ptr %scevgep38, %scevgep37
  %found.conflict57 = and i1 %bound055, %bound156
  %conflict.rdx58 = or i1 %conflict.rdx54, %found.conflict57
  %n.vec = and i64 %wide.trip.count, 2147483646
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %.031.us = phi i32 [ %64, %._crit_edge.us ], [ 0, %.preheader.us.preheader ]
  %brmerge = select i1 %min.iters.check, i1 true, i1 %conflict.rdx58
  br i1 %brmerge, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader.us ]
  %18 = or disjoint i64 %index, 1
  %19 = getelementptr inbounds double, ptr %10, i64 %index
  %wide.load = load <2 x double>, ptr %19, align 8, !tbaa !11, !alias.scope !13, !noalias !16
  %20 = fadd <2 x double> %wide.load, <double 1.000000e+00, double 1.000000e+00>
  %21 = fcmp ogt <2 x double> %20, <double 1.000000e+02, double 1.000000e+02>
  %22 = fmul <2 x double> %20, <double 2.000000e+00, double 2.000000e+00>
  %23 = select <2 x i1> %21, <2 x double> zeroinitializer, <2 x double> %22
  %24 = fptoui <2 x double> %23 to <2 x i8>
  %25 = zext <2 x i8> %24 to <2 x i64>
  %26 = getelementptr inbounds i64, ptr %12, i64 %index
  store <2 x i64> %25, ptr %26, align 8, !tbaa !18, !alias.scope !20, !noalias !22
  %27 = getelementptr inbounds %struct.signal_t, ptr %1, i64 %index, i32 6
  %28 = getelementptr inbounds %struct.signal_t, ptr %1, i64 %18, i32 6
  %29 = load i8, ptr %27, align 8, !tbaa !24, !alias.scope !16
  %30 = load i8, ptr %28, align 8, !tbaa !24, !alias.scope !16
  %31 = insertelement <2 x i8> poison, i8 %29, i64 0
  %32 = insertelement <2 x i8> %31, i8 %30, i64 1
  %33 = shl <2 x i8> %32, <i8 1, i8 1>
  %34 = and <2 x i8> %33, <i8 126, i8 126>
  %35 = zext nneg <2 x i8> %34 to <2 x i64>
  %36 = getelementptr inbounds i64, ptr %14, i64 %index
  %wide.load59 = load <2 x i64>, ptr %36, align 8, !tbaa !18, !alias.scope !25, !noalias !26
  %37 = or <2 x i64> %wide.load59, %35
  store <2 x i64> %37, ptr %36, align 8, !tbaa !18, !alias.scope !25, !noalias !26
  %38 = lshr <2 x i64> %37, <i64 1, i64 1>
  %39 = and <2 x i64> %38, <i64 63, i64 63>
  store <2 x i64> %39, ptr %26, align 8, !tbaa !18, !alias.scope !20, !noalias !22
  %40 = uitofp nneg <2 x i64> %39 to <2 x double>
  %41 = fmul <2 x double> %40, <double 5.000000e-01, double 5.000000e-01>
  store <2 x double> %41, ptr %19, align 8, !tbaa !11, !alias.scope !13, !noalias !16
  %index.next = add nuw i64 %index, 2
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !27

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

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

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %43 = getelementptr inbounds double, ptr %10, i64 %indvars.iv
  %44 = load double, ptr %43, align 8, !tbaa !11
  %45 = fadd double %44, 1.000000e+00
  %46 = fcmp ogt double %45, 1.000000e+02
  %47 = fmul double %45, 2.000000e+00
  %48 = select i1 %46, double 0.000000e+00, double %47
  %49 = fptoui double %48 to i8
  %50 = zext i8 %49 to i64
  %51 = getelementptr inbounds i64, ptr %12, i64 %indvars.iv
  store i64 %50, ptr %51, align 8, !tbaa !18
  %52 = getelementptr inbounds %struct.signal_t, ptr %1, i64 %indvars.iv, i32 6
  %53 = load i8, ptr %52, align 8, !tbaa !24
  %54 = shl i8 %53, 1
  %55 = and i8 %54, 126
  %56 = zext nneg i8 %55 to i64
  %57 = getelementptr inbounds i64, ptr %14, i64 %indvars.iv
  %58 = load i64, ptr %57, align 8, !tbaa !18
  %59 = or i64 %58, %56
  store i64 %59, ptr %57, align 8, !tbaa !18
  %60 = lshr i64 %59, 1
  %61 = and i64 %60, 63
  store i64 %61, ptr %51, align 8, !tbaa !18
  %62 = uitofp nneg i64 %61 to double
  %63 = fmul double %62, 5.000000e-01
  store double %63, ptr %43, align 8, !tbaa !11
  %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_edge.us, label %scalar.ph, !llvm.loop !31

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %64 = add nuw nsw i32 %.031.us, 1
  %exitcond35.not = icmp eq i32 %64, %3
  br i1 %exitcond35.not, label %._crit_edge32, label %.preheader.us, !llvm.loop !32

._crit_edge32:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph, %4
  %65 = extractvalue { i64, i64 } %6, 1
  %66 = extractvalue { i64, i64 } %6, 0
  %67 = call i64 @get_elapsedtime_ns(i64 %66, i64 %65)
  %68 = call double @ns_to_us_to_sec(i64 noundef %67)
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %68, i32 noundef %3, i32 noundef %2)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #4
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"vector_t", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!14}
!14 = distinct !{!14, !15}
!15 = distinct !{!15, !"LVerDomain"}
!16 = !{!17}
!17 = distinct !{!17, !15}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!21}
!21 = distinct !{!21, !15}
!22 = !{!23, !14, !17}
!23 = distinct !{!23, !15}
!24 = !{!8, !8, i64 0}
!25 = !{!23}
!26 = !{!14, !17}
!27 = distinct !{!27, !28, !29, !30}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.isvectorized", i32 1}
!30 = !{!"llvm.loop.unroll.runtime.disable"}
!31 = distinct !{!31, !28, !29}
!32 = distinct !{!32, !28}


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