; LLVM IR from introlab/odas :: src/init (directivity)

; 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.mics_obj = type { i32, i32, ptr, ptr, ptr, ptr, ptr }
%struct.beampatterns_obj = type { i32, i32, ptr, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local ptr @directivity_beampattern_mics(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.mics_obj, ptr %14, i32 0, i32 0
  %16 = load i32, ptr %15, align 8, !tbaa !11
  store i32 %16, ptr %6, align 4, !tbaa !9
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = load i32, ptr %4, align 4, !tbaa !9
  %19 = call ptr @beampatterns_construct_zero(i32 noundef %17, i32 noundef %18)
  store ptr %19, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %172, %2
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = icmp ult i32 %21, %22
  br i1 %23, label %24, label %175

24:                                               ; preds = %20
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.beampatterns_obj, ptr %25, i32 0, i32 2
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds float, ptr %27, i64 %29
  store float 0.000000e+00, ptr %30, align 4, !tbaa !15
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.beampatterns_obj, ptr %31, i32 0, i32 3
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds float, ptr %33, i64 %35
  store float 1.800000e+02, ptr %36, align 4, !tbaa !15
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.beampatterns_obj, ptr %37, i32 0, i32 3
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds float, ptr %39, i64 %41
  %43 = load float, ptr %42, align 4, !tbaa !15
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.beampatterns_obj, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds float, ptr %46, i64 %48
  %50 = load float, ptr %49, align 4, !tbaa !15
  %51 = fsub float %43, %50
  %52 = load i32, ptr %4, align 4, !tbaa !9
  %53 = sub i32 %52, 1
  %54 = uitofp i32 %53 to float
  %55 = fdiv float %51, %54
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.beampatterns_obj, ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %58, i64 %60
  store float %55, ptr %61, align 4, !tbaa !15
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %168, %24
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = icmp ult i32 %63, %64
  br i1 %65, label %66, label %171

66:                                               ; preds = %62
  %67 = load i32, ptr %8, align 4, !tbaa !9
  %68 = uitofp i32 %67 to float
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.beampatterns_obj, ptr %69, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds float, ptr %71, i64 %73
  %75 = load float, ptr %74, align 4, !tbaa !15
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.beampatterns_obj, ptr %76, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !13
  %79 = load i32, ptr %7, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds float, ptr %78, i64 %80
  %82 = load float, ptr %81, align 4, !tbaa !15
  %83 = call float @llvm.fmuladd.f32(float %68, float %75, float %82)
  store float %83, ptr %9, align 4, !tbaa !15
  %84 = load float, ptr %9, align 4, !tbaa !15
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.mics_obj, ptr %85, i32 0, i32 5
  %87 = load ptr, ptr %86, align 8, !tbaa !19
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %87, i64 %89
  %91 = load float, ptr %90, align 4, !tbaa !15
  %92 = fcmp ole float %84, %91
  br i1 %92, label %93, label %104

93:                                               ; preds = %66
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.beampatterns_obj, ptr %94, i32 0, i32 5
  %96 = load ptr, ptr %95, align 8, !tbaa !20
  %97 = load i32, ptr %7, align 4, !tbaa !9
  %98 = load i32, ptr %4, align 4, !tbaa !9
  %99 = mul i32 %97, %98
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = add i32 %99, %100
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds float, ptr %96, i64 %102
  store float 1.000000e+00, ptr %103, align 4, !tbaa !15
  br label %167

104:                                              ; preds = %66
  %105 = load float, ptr %9, align 4, !tbaa !15
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.mics_obj, ptr %106, i32 0, i32 6
  %108 = load ptr, ptr %107, align 8, !tbaa !21
  %109 = load i32, ptr %7, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds float, ptr %108, i64 %110
  %112 = load float, ptr %111, align 4, !tbaa !15
  %113 = fcmp oge float %105, %112
  br i1 %113, label %114, label %125

114:                                              ; preds = %104
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.beampatterns_obj, ptr %115, i32 0, i32 5
  %117 = load ptr, ptr %116, align 8, !tbaa !20
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = load i32, ptr %4, align 4, !tbaa !9
  %120 = mul i32 %118, %119
  %121 = load i32, ptr %8, align 4, !tbaa !9
  %122 = add i32 %120, %121
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds float, ptr %117, i64 %123
  store float 0.000000e+00, ptr %124, align 4, !tbaa !15
  br label %166

125:                                              ; preds = %104
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.mics_obj, ptr %126, i32 0, i32 5
  %128 = load ptr, ptr %127, align 8, !tbaa !19
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds float, ptr %128, i64 %130
  %132 = load float, ptr %131, align 4, !tbaa !15
  store float %132, ptr %10, align 4, !tbaa !15
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.mics_obj, ptr %133, i32 0, i32 6
  %135 = load ptr, ptr %134, align 8, !tbaa !21
  %136 = load i32, ptr %7, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = getelementptr inbounds float, ptr %135, i64 %137
  %139 = load float, ptr %138, align 4, !tbaa !15
  store float %139, ptr %11, align 4, !tbaa !15
  %140 = load float, ptr %10, align 4, !tbaa !15
  %141 = load float, ptr %11, align 4, !tbaa !15
  %142 = fadd float %140, %141
  %143 = fdiv float %142, 2.000000e+00
  store float %143, ptr %12, align 4, !tbaa !15
  %144 = load float, ptr %11, align 4, !tbaa !15
  %145 = load float, ptr %10, align 4, !tbaa !15
  %146 = fsub float %144, %145
  %147 = fdiv float 2.000000e+01, %146
  store float %147, ptr %13, align 4, !tbaa !15
  %148 = load float, ptr %13, align 4, !tbaa !15
  %149 = load float, ptr %9, align 4, !tbaa !15
  %150 = load float, ptr %12, align 4, !tbaa !15
  %151 = fsub float %149, %150
  %152 = fmul float %148, %151
  %153 = call float @expf(float noundef %152) #5, !tbaa !9
  %154 = fadd float 1.000000e+00, %153
  %155 = fdiv float 1.000000e+00, %154
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.beampatterns_obj, ptr %156, i32 0, i32 5
  %158 = load ptr, ptr %157, align 8, !tbaa !20
  %159 = load i32, ptr %7, align 4, !tbaa !9
  %160 = load i32, ptr %4, align 4, !tbaa !9
  %161 = mul i32 %159, %160
  %162 = load i32, ptr %8, align 4, !tbaa !9
  %163 = add i32 %161, %162
  %164 = zext i32 %163 to i64
  %165 = getelementptr inbounds float, ptr %158, i64 %164
  store float %155, ptr %165, align 4, !tbaa !15
  br label %166

166:                                              ; preds = %125, %114
  br label %167

167:                                              ; preds = %166, %93
  br label %168

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

171:                                              ; preds = %62
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %7, align 4, !tbaa !9
  %174 = add i32 %173, 1
  store i32 %174, ptr %7, align 4, !tbaa !9
  br label %20, !llvm.loop !24

175:                                              ; preds = %20
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret ptr %176
}

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

declare ptr @beampatterns_construct_zero(i32 noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: nounwind
declare float @expf(float noundef) #4

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

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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { 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 = !{!"mics_obj", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!13 = !{!14, !6, i64 8}
!14 = !{!"beampatterns_obj", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!14, !6, i64 16}
!18 = !{!14, !6, i64 24}
!19 = !{!12, !6, i64 32}
!20 = !{!14, !6, i64 32}
!21 = !{!12, !6, i64 40}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


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

; Function Attrs: nounwind uwtable
define dso_local ptr @directivity_beampattern_mics(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %4 = tail call ptr @beampatterns_construct_zero(i32 noundef %3, i32 noundef %1) #4
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %._crit_edge63, label %.lr.ph62

.lr.ph62:                                         ; preds = %2
  %5 = getelementptr inbounds i8, ptr %4, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %4, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = add i32 %1, -1
  %10 = uitofp i32 %9 to float
  %11 = getelementptr inbounds i8, ptr %4, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %.not64 = icmp eq i32 %1, 0
  %13 = getelementptr inbounds i8, ptr %4, i64 32
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  br i1 %.not64, label %.lr.ph62.split.preheader, label %.lr.ph62.split.us

.lr.ph62.split.preheader:                         ; preds = %.lr.ph62
  %wide.trip.count75 = zext i32 %3 to i64
  %min.iters.check = icmp ult i32 %3, 4
  br i1 %min.iters.check, label %.lr.ph62.split.preheader92, label %vector.memcheck

.lr.ph62.split.preheader92:                       ; preds = %middle.block, %vector.memcheck, %.lr.ph62.split.preheader
  %indvars.iv72.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph62.split.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count75, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph62.split.prol.loopexit, label %.lr.ph62.split.prol

.lr.ph62.split.prol:                              ; preds = %.lr.ph62.split.preheader92
  %15 = getelementptr inbounds float, ptr %6, i64 %indvars.iv72.ph
  store float 0.000000e+00, ptr %15, align 4, !tbaa !15
  %16 = getelementptr inbounds float, ptr %8, i64 %indvars.iv72.ph
  store float 1.800000e+02, ptr %16, align 4, !tbaa !15
  %17 = load float, ptr %15, align 4, !tbaa !15
  %18 = fsub float 1.800000e+02, %17
  %19 = fdiv float %18, %10
  %20 = getelementptr inbounds float, ptr %12, i64 %indvars.iv72.ph
  store float %19, ptr %20, align 4, !tbaa !15
  %indvars.iv.next73.prol = or disjoint i64 %indvars.iv72.ph, 1
  br label %.lr.ph62.split.prol.loopexit

.lr.ph62.split.prol.loopexit:                     ; preds = %.lr.ph62.split.prol, %.lr.ph62.split.preheader92
  %indvars.iv72.unr = phi i64 [ %indvars.iv72.ph, %.lr.ph62.split.preheader92 ], [ %indvars.iv.next73.prol, %.lr.ph62.split.prol ]
  %21 = add nsw i64 %wide.trip.count75, -1
  %22 = icmp eq i64 %indvars.iv72.ph, %21
  br i1 %22, label %._crit_edge63, label %.lr.ph62.split

vector.memcheck:                                  ; preds = %.lr.ph62.split.preheader
  %23 = shl nuw nsw i64 %wide.trip.count75, 2
  %scevgep = getelementptr i8, ptr %6, i64 %23
  %scevgep83 = getelementptr i8, ptr %8, i64 %23
  %scevgep84 = getelementptr i8, ptr %12, i64 %23
  %bound0 = icmp ult ptr %6, %scevgep83
  %bound1 = icmp ult ptr %8, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound085 = icmp ult ptr %6, %scevgep84
  %bound186 = icmp ult ptr %12, %scevgep
  %found.conflict87 = and i1 %bound085, %bound186
  %conflict.rdx = or i1 %found.conflict, %found.conflict87
  %bound088 = icmp ult ptr %8, %scevgep84
  %bound189 = icmp ult ptr %12, %scevgep83
  %found.conflict90 = and i1 %bound088, %bound189
  %conflict.rdx91 = or i1 %conflict.rdx, %found.conflict90
  br i1 %conflict.rdx91, label %.lr.ph62.split.preheader92, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count75, 4294967292
  %.scalar = fdiv float 1.800000e+02, %10
  %24 = insertelement <4 x float> poison, float %.scalar, i64 0
  %25 = shufflevector <4 x float> %24, <4 x float> 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 ]
  %26 = getelementptr inbounds float, ptr %6, i64 %index
  store <4 x float> zeroinitializer, ptr %26, align 4, !tbaa !15, !alias.scope !17, !noalias !20
  %27 = getelementptr inbounds float, ptr %8, i64 %index
  store <4 x float> <float 1.800000e+02, float 1.800000e+02, float 1.800000e+02, float 1.800000e+02>, ptr %27, align 4, !tbaa !15, !alias.scope !23, !noalias !24
  %28 = getelementptr inbounds float, ptr %12, i64 %index
  store <4 x float> %25, ptr %28, align 4, !tbaa !15, !alias.scope !24
  %index.next = add nuw i64 %index, 4
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count75
  br i1 %cmp.n, label %._crit_edge63, label %.lr.ph62.split.preheader92

.lr.ph62.split.us:                                ; preds = %.lr.ph62
  %30 = getelementptr inbounds i8, ptr %0, i64 32
  %31 = load ptr, ptr %30, align 8, !tbaa !29
  %wide.trip.count70 = zext i32 %3 to i64
  %wide.trip.count = zext i32 %1 to i64
  %32 = load ptr, ptr %13, align 8, !tbaa !30
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %._crit_edge.us, %.lr.ph62.split.us
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %._crit_edge.us ], [ 0, %.lr.ph62.split.us ]
  %33 = getelementptr inbounds float, ptr %6, i64 %indvars.iv67
  store float 0.000000e+00, ptr %33, align 4, !tbaa !15
  %34 = getelementptr inbounds float, ptr %8, i64 %indvars.iv67
  store float 1.800000e+02, ptr %34, align 4, !tbaa !15
  %35 = load float, ptr %33, align 4, !tbaa !15
  %36 = fsub float 1.800000e+02, %35
  %37 = fdiv float %36, %10
  %38 = getelementptr inbounds float, ptr %12, i64 %indvars.iv67
  store float %37, ptr %38, align 4, !tbaa !15
  %39 = getelementptr inbounds float, ptr %31, i64 %indvars.iv67
  %40 = trunc nuw i64 %indvars.iv67 to i32
  %41 = mul i32 %40, %1
  br label %42

42:                                               ; preds = %.lr.ph.us, %65
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %65 ]
  %43 = trunc nuw i64 %indvars.iv to i32
  %44 = uitofp i32 %43 to float
  %45 = load float, ptr %38, align 4, !tbaa !15
  %46 = load float, ptr %33, align 4, !tbaa !15
  %47 = tail call float @llvm.fmuladd.f32(float %44, float %45, float %46)
  %48 = load float, ptr %39, align 4, !tbaa !15
  %49 = fcmp ugt float %47, %48
  br i1 %49, label %50, label %65

50:                                               ; preds = %42
  %51 = load ptr, ptr %14, align 8, !tbaa !31
  %52 = getelementptr inbounds float, ptr %51, i64 %indvars.iv67
  %53 = load float, ptr %52, align 4, !tbaa !15
  %54 = fcmp ult float %47, %53
  br i1 %54, label %55, label %65

55:                                               ; preds = %50
  %56 = fadd float %48, %53
  %57 = fmul float %56, 5.000000e-01
  %58 = fsub float %53, %48
  %59 = fdiv float 2.000000e+01, %58
  %60 = fsub float %47, %57
  %61 = fmul float %59, %60
  %62 = tail call float @expf(float noundef %61) #4, !tbaa !32
  %63 = fadd float %62, 1.000000e+00
  %64 = fdiv float 1.000000e+00, %63
  br label %65

65:                                               ; preds = %50, %42, %55
  %.sink = phi float [ %64, %55 ], [ 1.000000e+00, %42 ], [ 0.000000e+00, %50 ]
  %66 = add i32 %41, %43
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds float, ptr %32, i64 %67
  store float %.sink, ptr %68, align 4, !tbaa !15
  %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 %42, !llvm.loop !33

._crit_edge.us:                                   ; preds = %65
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond71.not = icmp eq i64 %indvars.iv.next68, %wide.trip.count70
  br i1 %exitcond71.not, label %._crit_edge63, label %.lr.ph.us, !llvm.loop !34

.lr.ph62.split:                                   ; preds = %.lr.ph62.split.prol.loopexit, %.lr.ph62.split
  %indvars.iv72 = phi i64 [ %indvars.iv.next73.1, %.lr.ph62.split ], [ %indvars.iv72.unr, %.lr.ph62.split.prol.loopexit ]
  %69 = getelementptr inbounds float, ptr %6, i64 %indvars.iv72
  store float 0.000000e+00, ptr %69, align 4, !tbaa !15
  %70 = getelementptr inbounds float, ptr %8, i64 %indvars.iv72
  store float 1.800000e+02, ptr %70, align 4, !tbaa !15
  %71 = load float, ptr %69, align 4, !tbaa !15
  %72 = fsub float 1.800000e+02, %71
  %73 = fdiv float %72, %10
  %74 = getelementptr inbounds float, ptr %12, i64 %indvars.iv72
  store float %73, ptr %74, align 4, !tbaa !15
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %75 = getelementptr inbounds float, ptr %6, i64 %indvars.iv.next73
  store float 0.000000e+00, ptr %75, align 4, !tbaa !15
  %76 = getelementptr inbounds float, ptr %8, i64 %indvars.iv.next73
  store float 1.800000e+02, ptr %76, align 4, !tbaa !15
  %77 = load float, ptr %75, align 4, !tbaa !15
  %78 = fsub float 1.800000e+02, %77
  %79 = fdiv float %78, %10
  %80 = getelementptr inbounds float, ptr %12, i64 %indvars.iv.next73
  store float %79, ptr %80, align 4, !tbaa !15
  %indvars.iv.next73.1 = add nuw nsw i64 %indvars.iv72, 2
  %exitcond76.not.1 = icmp eq i64 %indvars.iv.next73.1, %wide.trip.count75
  br i1 %exitcond76.not.1, label %._crit_edge63, label %.lr.ph62.split, !llvm.loop !35

._crit_edge63:                                    ; preds = %._crit_edge.us, %.lr.ph62.split.prol.loopexit, %.lr.ph62.split, %middle.block, %2
  ret ptr %4
}

declare ptr @beampatterns_construct_zero(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @expf(float noundef) local_unnamed_addr #3

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = !{!"mics_obj", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"beampatterns_obj", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !8, i64 0}
!17 = !{!18}
!18 = distinct !{!18, !19}
!19 = distinct !{!19, !"LVerDomain"}
!20 = !{!21, !22}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = !{!21}
!24 = !{!22}
!25 = distinct !{!25, !26, !27, !28}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.isvectorized", i32 1}
!28 = !{!"llvm.loop.unroll.runtime.disable"}
!29 = !{!6, !10, i64 32}
!30 = !{!12, !10, i64 32}
!31 = !{!6, !10, i64 40}
!32 = !{!7, !7, i64 0}
!33 = distinct !{!33, !26}
!34 = distinct !{!34, !26}
!35 = distinct !{!35, !26, !27}


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