; LLVM IR from kylewray/nova :: src/pomdp/algorithms (pomdp_perseus_cpu)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4nova37pomdp_perseus_compute_b_dot_alpha_cpuEjPKiPKfjS3_Pf(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4nova43pomdp_perseus_update_compute_best_alpha_cpuEjjjjjjfPKiPKfS3_S3_S1_S3_jS3_jjPf(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4nova29pomdp_perseus_update_step_cpuEjjjjjjfPKiPKfS3_S3_S1_S3_S3_jjPfPj(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, float noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, i32 noundef %14, i32 noundef %15, ptr noundef %16, ptr noundef %17) #2 {
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca float, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca float, align 4
  %38 = alloca float, align 4
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  store i32 %0, ptr %19, align 4, !tbaa !5
  store i32 %1, ptr %20, align 4, !tbaa !5
  store i32 %2, ptr %21, align 4, !tbaa !5
  store i32 %3, ptr %22, align 4, !tbaa !5
  store i32 %4, ptr %23, align 4, !tbaa !5
  store i32 %5, ptr %24, align 4, !tbaa !5
  store float %6, ptr %25, align 4, !tbaa !9
  store ptr %7, ptr %26, align 8, !tbaa !11
  store ptr %8, ptr %27, align 8, !tbaa !11
  store ptr %9, ptr %28, align 8, !tbaa !11
  store ptr %10, ptr %29, align 8, !tbaa !11
  store ptr %11, ptr %30, align 8, !tbaa !11
  store ptr %12, ptr %31, align 8, !tbaa !11
  store ptr %13, ptr %32, align 8, !tbaa !11
  store i32 %14, ptr %33, align 4, !tbaa !5
  store i32 %15, ptr %34, align 4, !tbaa !5
  store ptr %16, ptr %35, align 8, !tbaa !11
  store ptr %17, ptr %36, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  store float -1.000000e+10, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  store float -1.000000e+10, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %43 = load i32, ptr %19, align 4, !tbaa !5
  %44 = zext i32 %43 to i64
  %45 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %44, i64 4)
  %46 = extractvalue { i64, i1 } %45, 1
  %47 = extractvalue { i64, i1 } %45, 0
  %48 = select i1 %46, i64 -1, i64 %47
  %49 = call noalias noundef nonnull ptr @_Znam(i64 noundef %48) #8
  store ptr %49, ptr %39, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  store i32 0, ptr %40, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %115, %18
  %51 = load i32, ptr %40, align 4, !tbaa !5
  %52 = load i32, ptr %21, align 4, !tbaa !5
  %53 = icmp ult i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 2, ptr %41, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  br label %118

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  store i32 0, ptr %42, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %75, %55
  %57 = load i32, ptr %42, align 4, !tbaa !5
  %58 = load i32, ptr %19, align 4, !tbaa !5
  %59 = icmp ult i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 5, ptr %41, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %78

61:                                               ; preds = %56
  %62 = load ptr, ptr %29, align 8, !tbaa !11
  %63 = load i32, ptr %42, align 4, !tbaa !5
  %64 = load i32, ptr %21, align 4, !tbaa !5
  %65 = mul i32 %63, %64
  %66 = load i32, ptr %40, align 4, !tbaa !5
  %67 = add i32 %65, %66
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds float, ptr %62, i64 %68
  %70 = load float, ptr %69, align 4, !tbaa !9
  %71 = load ptr, ptr %39, align 8, !tbaa !11
  %72 = load i32, ptr %42, align 4, !tbaa !5
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds float, ptr %71, i64 %73
  store float %70, ptr %74, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %61
  %76 = load i32, ptr %42, align 4, !tbaa !5
  %77 = add i32 %76, 1
  store i32 %77, ptr %42, align 4, !tbaa !5
  br label %56, !llvm.loop !13

78:                                               ; preds = %60
  %79 = load i32, ptr %19, align 4, !tbaa !5
  %80 = load i32, ptr %20, align 4, !tbaa !5
  %81 = load i32, ptr %21, align 4, !tbaa !5
  %82 = load i32, ptr %22, align 4, !tbaa !5
  %83 = load i32, ptr %23, align 4, !tbaa !5
  %84 = load i32, ptr %24, align 4, !tbaa !5
  %85 = load float, ptr %25, align 4, !tbaa !9
  %86 = load ptr, ptr %26, align 8, !tbaa !11
  %87 = load ptr, ptr %27, align 8, !tbaa !11
  %88 = load ptr, ptr %28, align 8, !tbaa !11
  %89 = load ptr, ptr %29, align 8, !tbaa !11
  %90 = load ptr, ptr %30, align 8, !tbaa !11
  %91 = load ptr, ptr %31, align 8, !tbaa !11
  %92 = load i32, ptr %34, align 4, !tbaa !5
  %93 = load ptr, ptr %32, align 8, !tbaa !11
  %94 = load i32, ptr %33, align 4, !tbaa !5
  %95 = load i32, ptr %40, align 4, !tbaa !5
  %96 = load ptr, ptr %39, align 8, !tbaa !11
  call void @_ZN4nova43pomdp_perseus_update_compute_best_alpha_cpuEjjjjjjfPKiPKfS3_S3_S1_S3_jS3_jjPf(i32 noundef %79, i32 noundef %80, i32 noundef %81, i32 noundef %82, i32 noundef %83, i32 noundef %84, float noundef %85, ptr noundef %86, ptr noundef %87, ptr noundef %88, ptr noundef %89, ptr noundef %90, ptr noundef %91, i32 noundef %92, ptr noundef %93, i32 noundef %94, i32 noundef %95, ptr noundef %96)
  %97 = load i32, ptr %24, align 4, !tbaa !5
  %98 = load ptr, ptr %30, align 8, !tbaa !11
  %99 = load ptr, ptr %31, align 8, !tbaa !11
  %100 = load i32, ptr %34, align 4, !tbaa !5
  %101 = load ptr, ptr %39, align 8, !tbaa !11
  call void @_ZN4nova37pomdp_perseus_compute_b_dot_alpha_cpuEjPKiPKfjS3_Pf(i32 noundef %97, ptr noundef %98, ptr noundef %99, i32 noundef %100, ptr noundef %101, ptr noundef %37)
  %102 = load float, ptr %37, align 4, !tbaa !9
  %103 = load float, ptr %38, align 4, !tbaa !9
  %104 = fcmp ogt float %102, %103
  br i1 %104, label %105, label %114

105:                                              ; preds = %78
  %106 = load ptr, ptr %35, align 8, !tbaa !11
  %107 = load ptr, ptr %39, align 8, !tbaa !11
  %108 = load i32, ptr %19, align 4, !tbaa !5
  %109 = zext i32 %108 to i64
  %110 = mul i64 %109, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %106, ptr align 4 %107, i64 %110, i1 false)
  %111 = load i32, ptr %40, align 4, !tbaa !5
  %112 = load ptr, ptr %36, align 8, !tbaa !11
  store i32 %111, ptr %112, align 4, !tbaa !5
  %113 = load float, ptr %37, align 4, !tbaa !9
  store float %113, ptr %38, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %105, %78
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %40, align 4, !tbaa !5
  %117 = add i32 %116, 1
  store i32 %117, ptr %40, align 4, !tbaa !5
  br label %50, !llvm.loop !15

118:                                              ; preds = %54
  %119 = load ptr, ptr %39, align 8, !tbaa !11
  %120 = icmp eq ptr %119, null
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  call void @_ZdaPv(ptr noundef %119) #9
  br label %122

122:                                              ; preds = %121, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #6

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nobuiltin 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN4nova37pomdp_perseus_compute_b_dot_alpha_cpuEjPKiPKfjS3_Pf(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) 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) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4nova43pomdp_perseus_update_compute_best_alpha_cpuEjjjjjjfPKiPKfS3_S3_S1_S3_jS3_jjPf(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4nova29pomdp_perseus_update_step_cpuEjjjjjjfPKiPKfS3_S3_S1_S3_S3_jjPfPj(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, float noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, i32 noundef %14, i32 noundef %15, ptr nocapture noundef writeonly %16, ptr nocapture noundef writeonly %17) local_unnamed_addr #2 {
  %19 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  store float -1.000000e+10, ptr %19, align 4, !tbaa !5
  %20 = zext i32 %0 to i64
  %21 = shl nuw nsw i64 %20, 2
  %22 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %21) #7
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %._crit_edge49, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %18
  %.not50 = icmp eq i32 %0, 0
  br i1 %.not50, label %.preheader, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %23 = add nsw i64 %20, -1
  %min.iters.check = icmp ult i32 %0, 12
  %ident.check = icmp ne i32 %2, 1
  %24 = trunc i64 %23 to i32
  %25 = icmp ugt i64 %23, 4294967295
  %n.vec = and i64 %20, 4294967288
  %cmp.n = icmp eq i64 %n.vec, %20
  %xtraiter = and i64 %20, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %48
  %.04248.us = phi i32 [ %49, %48 ], [ 0, %.preheader.us.preheader ]
  %.04347.us = phi float [ %.1.us, %48 ], [ -1.000000e+10, %.preheader.us.preheader ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.scevcheck, %.preheader.us
  %indvars.iv.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %26 = trunc nuw i64 %indvars.iv.prol to i32
  %27 = mul i32 %26, %2
  %28 = add i32 %27, %.04248.us
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds float, ptr %10, i64 %29
  %31 = load float, ptr %30, align 4, !tbaa !5
  %32 = getelementptr inbounds float, ptr %22, i64 %indvars.iv.prol
  store float %31, ptr %32, align 4, !tbaa !5
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !9

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %33 = sub nsw i64 %indvars.iv.ph, %20
  %34 = icmp ugt i64 %33, -4
  br i1 %34, label %._crit_edge.us, label %scalar.ph

vector.scevcheck:                                 ; preds = %.preheader.us
  %35 = xor i32 %.04248.us, -1
  %36 = icmp ult i32 %35, %24
  %37 = or i1 %36, %25
  %38 = or i1 %ident.check, %37
  br i1 %38, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.scevcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.scevcheck ]
  %39 = trunc i64 %index to i32
  %40 = add i32 %.04248.us, %39
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds float, ptr %10, i64 %41
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %wide.load = load <4 x float>, ptr %42, align 4, !tbaa !5
  %wide.load57 = load <4 x float>, ptr %43, align 4, !tbaa !5
  %44 = getelementptr inbounds float, ptr %22, i64 %index
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  store <4 x float> %wide.load, ptr %44, align 4, !tbaa !5
  store <4 x float> %wide.load57, ptr %45, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %46 = icmp eq i64 %index.next, %n.vec
  br i1 %46, label %middle.block, label %vector.body, !llvm.loop !11

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

47:                                               ; preds = %._crit_edge.us
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr nonnull align 4 %22, i64 %21, i1 false)
  store i32 %.04248.us, ptr %17, align 4, !tbaa !15
  br label %48

48:                                               ; preds = %47, %._crit_edge.us
  %.1.us = phi float [ %78, %47 ], [ %.04347.us, %._crit_edge.us ]
  %49 = add nuw i32 %.04248.us, 1
  %exitcond53.not = icmp eq i32 %49, %2
  br i1 %exitcond53.not, label %._crit_edge49, label %.preheader.us, !llvm.loop !17

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %50 = trunc nuw i64 %indvars.iv to i32
  %51 = mul i32 %50, %2
  %52 = add i32 %51, %.04248.us
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds float, ptr %10, i64 %53
  %55 = load float, ptr %54, align 4, !tbaa !5
  %56 = getelementptr inbounds float, ptr %22, i64 %indvars.iv
  store float %55, ptr %56, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %57 = trunc nuw i64 %indvars.iv.next to i32
  %58 = mul i32 %57, %2
  %59 = add i32 %58, %.04248.us
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %10, i64 %60
  %62 = load float, ptr %61, align 4, !tbaa !5
  %63 = getelementptr inbounds float, ptr %22, i64 %indvars.iv.next
  store float %62, ptr %63, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %64 = trunc nuw i64 %indvars.iv.next.1 to i32
  %65 = mul i32 %64, %2
  %66 = add i32 %65, %.04248.us
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds float, ptr %10, i64 %67
  %69 = load float, ptr %68, align 4, !tbaa !5
  %70 = getelementptr inbounds float, ptr %22, i64 %indvars.iv.next.1
  store float %69, ptr %70, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %71 = trunc nuw i64 %indvars.iv.next.2 to i32
  %72 = mul i32 %71, %2
  %73 = add i32 %72, %.04248.us
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds float, ptr %10, i64 %74
  %76 = load float, ptr %75, align 4, !tbaa !5
  %77 = getelementptr inbounds float, ptr %22, i64 %indvars.iv.next.2
  store float %76, ptr %77, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %20
  br i1 %exitcond.not.3, label %._crit_edge.us, label %scalar.ph, !llvm.loop !18

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  call void @_ZN4nova43pomdp_perseus_update_compute_best_alpha_cpuEjjjjjjfPKiPKfS3_S3_S1_S3_jS3_jjPf(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, float noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef nonnull %10, ptr noundef %11, ptr noundef %12, i32 noundef %15, ptr noundef %13, i32 noundef %14, i32 noundef %.04248.us, ptr noundef nonnull %22)
  call void @_ZN4nova37pomdp_perseus_compute_b_dot_alpha_cpuEjPKiPKfjS3_Pf(i32 noundef %5, ptr noundef %11, ptr noundef %12, i32 noundef %15, ptr noundef nonnull %22, ptr noundef nonnull %19)
  %78 = load float, ptr %19, align 4, !tbaa !5
  %79 = fcmp ogt float %78, %.04347.us
  br i1 %79, label %47, label %48

.preheader:                                       ; preds = %.preheader.lr.ph, %83
  %.04248 = phi i32 [ %84, %83 ], [ 0, %.preheader.lr.ph ]
  %.04347 = phi float [ %.1, %83 ], [ -1.000000e+10, %.preheader.lr.ph ]
  call void @_ZN4nova43pomdp_perseus_update_compute_best_alpha_cpuEjjjjjjfPKiPKfS3_S3_S1_S3_jS3_jjPf(i32 noundef 0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, float noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, i32 noundef %15, ptr noundef %13, i32 noundef %14, i32 noundef %.04248, ptr noundef nonnull %22)
  call void @_ZN4nova37pomdp_perseus_compute_b_dot_alpha_cpuEjPKiPKfjS3_Pf(i32 noundef %5, ptr noundef %11, ptr noundef %12, i32 noundef %15, ptr noundef nonnull %22, ptr noundef nonnull %19)
  %80 = load float, ptr %19, align 4, !tbaa !5
  %81 = fcmp ogt float %80, %.04347
  br i1 %81, label %82, label %83

82:                                               ; preds = %.preheader
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr nonnull align 4 %22, i64 %21, i1 false)
  store i32 %.04248, ptr %17, align 4, !tbaa !15
  br label %83

83:                                               ; preds = %.preheader, %82
  %.1 = phi float [ %80, %82 ], [ %.04347, %.preheader ]
  %84 = add nuw i32 %.04248, 1
  %exitcond54.not = icmp eq i32 %84, %2
  br i1 %exitcond54.not, label %._crit_edge49, label %.preheader, !llvm.loop !17

._crit_edge49:                                    ; preds = %48, %83, %18
  call void @_ZdaPv(ptr noundef nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  ret void
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin allocsize(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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nobuiltin 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12, !13}


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