; LLVM IR from jingweizhanghuai/Morn :: src/wave (morn_wave_shape)

; 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.MWave = type { i32, i32, [32 x ptr] }

@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.mWaveMainPeak = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @mWavePeak(ptr noundef, i32 noundef, float 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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @mWaveMainPeak(ptr noundef %0, i32 noundef %1, float noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [32 x ptr], align 16
  %12 = alloca i32, align 4
  %13 = alloca [32 x i32], align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store float %2, ptr %7, align 4, !tbaa !11
  store ptr %3, ptr %8, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %26, label %22

22:                                               ; preds = %19
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = ptrtoint ptr %23 to i64
  %25 = icmp eq i64 %24, -1
  br i1 %25, label %26, label %27

26:                                               ; preds = %22, %19
  br i1 true, label %57, label %48

27:                                               ; preds = %22
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.MWave, ptr %28, i32 0, i32 2
  %30 = getelementptr inbounds [32 x ptr], ptr %29, i64 0, i64 0
  %31 = icmp eq ptr %30, null
  br i1 %31, label %57, label %32

32:                                               ; preds = %27
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.MWave, ptr %33, i32 0, i32 2
  %35 = getelementptr inbounds [32 x ptr], ptr %34, i64 0, i64 0
  %36 = ptrtoint ptr %35 to i64
  %37 = icmp eq i64 %36, -1
  br i1 %37, label %57, label %38

38:                                               ; preds = %32
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.MWave, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !13
  %42 = icmp sle i32 %41, 0
  br i1 %42, label %57, label %43

43:                                               ; preds = %38
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.MWave, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !15
  %47 = icmp sle i32 %46, 0
  br i1 %47, label %57, label %48

48:                                               ; preds = %43, %26
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = icmp eq ptr %49, null
  br i1 %50, label %55, label %51

51:                                               ; preds = %48
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = ptrtoint ptr %52 to i64
  %54 = icmp eq i64 %53, -1
  br label %55

55:                                               ; preds = %51, %48
  %56 = phi i1 [ true, %48 ], [ %54, %51 ]
  br label %57

57:                                               ; preds = %55, %43, %38, %32, %27, %26
  %58 = phi i1 [ true, %43 ], [ true, %38 ], [ true, %32 ], [ true, %27 ], [ true, %26 ], [ %56, %55 ]
  %59 = zext i1 %58 to i32
  store i32 %59, ptr %9, align 4, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %57
  %63 = load i32, ptr %9, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %63, i32 noundef -1, ptr noundef @.str, i32 noundef 60, ptr noundef @__FUNCTION__.mWaveMainPeak, ptr noundef @.str.1)
  br label %64

64:                                               ; preds = %62, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %65

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.MWave, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !13
  store i32 %68, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 256, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %79, %65
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %82

74:                                               ; preds = %69
  %75 = call noalias ptr @malloc(i64 noundef 128) #6
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [32 x ptr], ptr %11, i64 0, i64 %77
  store ptr %75, ptr %78, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %74
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %12, align 4, !tbaa !9
  br label %69, !llvm.loop !16

82:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 128, ptr %13) #5
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = load i32, ptr %6, align 4, !tbaa !9
  %85 = load float, ptr %7, align 4, !tbaa !11
  %86 = getelementptr inbounds [32 x ptr], ptr %11, i64 0, i64 0
  %87 = getelementptr inbounds [32 x i32], ptr %13, i64 0, i64 0
  call void @mWavePeak(ptr noundef %83, i32 noundef %84, float noundef %85, ptr noundef %86, ptr noundef %87)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %151, %82
  %89 = load i32, ptr %14, align 4, !tbaa !9
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 7, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %154

93:                                               ; preds = %88
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = load i32, ptr %14, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %94, i64 %96
  store i32 -1, ptr %97, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %143, %93
  %99 = load i32, ptr %17, align 4, !tbaa !9
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [32 x i32], ptr %13, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = icmp slt i32 %99, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %98
  store i32 10, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %146

106:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.MWave, ptr %107, i32 0, i32 2
  %109 = load i32, ptr %14, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [32 x ptr], ptr %108, i64 0, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [32 x ptr], ptr %11, i64 0, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load i32, ptr %17, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %116, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds float, ptr %112, i64 %121
  %123 = load float, ptr %122, align 4, !tbaa !11
  %124 = fptosi float %123 to i32
  store i32 %124, ptr %18, align 4, !tbaa !9
  %125 = load i32, ptr %18, align 4, !tbaa !9
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = icmp sgt i32 %125, %126
  br i1 %127, label %128, label %142

128:                                              ; preds = %106
  %129 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %129, ptr %16, align 4, !tbaa !9
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [32 x ptr], ptr %11, i64 0, i64 %131
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = load i32, ptr %17, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr %133, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = load i32, ptr %14, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr %138, i64 %140
  store i32 %137, ptr %141, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %128, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %17, align 4, !tbaa !9
  br label %98, !llvm.loop !18

146:                                              ; preds = %105
  %147 = load i32, ptr %14, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [32 x ptr], ptr %11, i64 0, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  call void @free(ptr noundef %150) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %151

151:                                              ; preds = %146
  %152 = load i32, ptr %14, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %14, align 4, !tbaa !9
  br label %88, !llvm.loop !19

154:                                              ; preds = %92
  call void @llvm.lifetime.end.p0(i64 128, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  ret void
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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 = { nounwind 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 = { 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 }
attributes #6 = { nounwind allocsize(0) }

!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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"MWave", !10, i64 0, !10, i64 4, !7, i64 8}
!15 = !{!14, !10, i64 4}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; 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 [82 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.mWaveMainPeak = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @mWavePeak(ptr noundef, i32 noundef, float 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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local void @mWaveMainPeak(ptr noundef %0, i32 noundef %1, float noundef %2, ptr noundef writeonly %3) local_unnamed_addr #0 {
  %5 = alloca [32 x ptr], align 16
  %6 = alloca [32 x i32], align 16
  %7 = getelementptr i8, ptr %0, i64 8
  %8 = icmp eq ptr %7, inttoptr (i64 -1 to ptr)
  br i1 %8, label %17, label %switch.early.test

switch.early.test:                                ; preds = %4
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %9 [
    i64 -1, label %17
    i64 0, label %17
  ]

9:                                                ; preds = %switch.early.test
  %10 = load i32, ptr %0, align 8, !tbaa !5
  %11 = icmp slt i32 %10, 1
  br i1 %11, label %17, label %12

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !10
  %15 = icmp slt i32 %14, 1
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  %magicptr54 = ptrtoint ptr %3 to i64
  switch i64 %magicptr54, label %.thread77 [
    i64 -1, label %17
    i64 0, label %17
  ]

.thread77:                                        ; preds = %16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #5
  br label %.lr.ph.preheader

17:                                               ; preds = %12, %9, %switch.early.test, %switch.early.test, %4, %16, %16
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 60, ptr noundef nonnull @__FUNCTION__.mWaveMainPeak, ptr noundef nonnull @.str.1) #5
  %.pre = load i32, ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #5
  %18 = icmp sgt i32 %.pre, 0
  br i1 %18, label %.lr.ph.preheader, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #5
  call void @mWavePeak(ptr noundef nonnull %0, i32 noundef %1, float noundef %2, ptr noundef nonnull %5, ptr noundef nonnull %6)
  br label %._crit_edge64

.lr.ph.preheader:                                 ; preds = %.thread77, %17
  %19 = phi i32 [ %10, %.thread77 ], [ %.pre, %17 ]
  %wide.trip.count = zext nneg i32 %19 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #5
  call void @mWavePeak(ptr noundef nonnull %0, i32 noundef %1, float noundef %2, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %wide.trip.count74 = zext nneg i32 %19 to i64
  br label %.lr.ph63

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %20 = tail call noalias dereferenceable_or_null(128) ptr @malloc(i64 noundef 128) #6
  %21 = getelementptr inbounds [32 x ptr], ptr %5, i64 0, i64 %indvars.iv
  store ptr %20, ptr %21, 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, label %.lr.ph, !llvm.loop !13

._crit_edge64:                                    ; preds = %._crit_edge60, %._crit_edge.thread
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #5
  ret void

.lr.ph63:                                         ; preds = %._crit_edge, %._crit_edge60
  %indvars.iv71 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next72, %._crit_edge60 ]
  %22 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv71
  store i32 -1, ptr %22, align 4, !tbaa !15
  %23 = getelementptr inbounds [32 x i32], ptr %6, i64 0, i64 %indvars.iv71
  %24 = load i32, ptr %23, align 4, !tbaa !15
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph59, label %.lr.ph63.._crit_edge60_crit_edge

.lr.ph63.._crit_edge60_crit_edge:                 ; preds = %.lr.ph63
  %.phi.trans.insert = getelementptr inbounds [32 x ptr], ptr %5, i64 0, i64 %indvars.iv71
  %.pre76 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !11
  br label %._crit_edge60

.lr.ph59:                                         ; preds = %.lr.ph63
  %26 = getelementptr inbounds [32 x ptr], ptr %7, i64 0, i64 %indvars.iv71
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds [32 x ptr], ptr %5, i64 0, i64 %indvars.iv71
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %wide.trip.count69 = zext nneg i32 %24 to i64
  %xtraiter = and i64 %wide.trip.count69, 1
  %30 = icmp eq i32 %24, 1
  br i1 %30, label %._crit_edge60.loopexit.unr-lcssa, label %.lr.ph59.new

.lr.ph59.new:                                     ; preds = %.lr.ph59
  %unroll_iter = and i64 %wide.trip.count69, 2147483646
  br label %40

._crit_edge60.loopexit.unr-lcssa:                 ; preds = %58, %.lr.ph59
  %indvars.iv66.unr = phi i64 [ 0, %.lr.ph59 ], [ %indvars.iv.next67.1, %58 ]
  %.04956.unr = phi i32 [ 0, %.lr.ph59 ], [ %.1.1, %58 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge60, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge60.loopexit.unr-lcssa
  %31 = getelementptr inbounds i32, ptr %29, i64 %indvars.iv66.unr
  %32 = load i32, ptr %31, align 4, !tbaa !15
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds float, ptr %27, i64 %33
  %35 = load float, ptr %34, align 4, !tbaa !16
  %36 = fptosi float %35 to i32
  %37 = icmp slt i32 %.04956.unr, %36
  br i1 %37, label %38, label %._crit_edge60

38:                                               ; preds = %.epil.preheader
  store i32 %32, ptr %22, align 4, !tbaa !15
  br label %._crit_edge60

._crit_edge60:                                    ; preds = %._crit_edge60.loopexit.unr-lcssa, %38, %.epil.preheader, %.lr.ph63.._crit_edge60_crit_edge
  %39 = phi ptr [ %.pre76, %.lr.ph63.._crit_edge60_crit_edge ], [ %29, %.epil.preheader ], [ %29, %38 ], [ %29, %._crit_edge60.loopexit.unr-lcssa ]
  call void @free(ptr noundef %39) #5
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %._crit_edge64, label %.lr.ph63, !llvm.loop !18

40:                                               ; preds = %58, %.lr.ph59.new
  %indvars.iv66 = phi i64 [ 0, %.lr.ph59.new ], [ %indvars.iv.next67.1, %58 ]
  %.04956 = phi i32 [ 0, %.lr.ph59.new ], [ %.1.1, %58 ]
  %niter = phi i64 [ 0, %.lr.ph59.new ], [ %niter.next.1, %58 ]
  %41 = getelementptr inbounds i32, ptr %29, i64 %indvars.iv66
  %42 = load i32, ptr %41, align 4, !tbaa !15
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds float, ptr %27, i64 %43
  %45 = load float, ptr %44, align 4, !tbaa !16
  %46 = fptosi float %45 to i32
  %47 = icmp slt i32 %.04956, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  store i32 %42, ptr %22, align 4, !tbaa !15
  br label %49

49:                                               ; preds = %48, %40
  %.1 = phi i32 [ %46, %48 ], [ %.04956, %40 ]
  %indvars.iv.next67 = or disjoint i64 %indvars.iv66, 1
  %50 = getelementptr inbounds i32, ptr %29, i64 %indvars.iv.next67
  %51 = load i32, ptr %50, align 4, !tbaa !15
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds float, ptr %27, i64 %52
  %54 = load float, ptr %53, align 4, !tbaa !16
  %55 = fptosi float %54 to i32
  %56 = icmp slt i32 %.1, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %49
  store i32 %51, ptr %22, align 4, !tbaa !15
  br label %58

58:                                               ; preds = %57, %49
  %.1.1 = phi i32 [ %55, %57 ], [ %.1, %49 ]
  %indvars.iv.next67.1 = add nuw nsw i64 %indvars.iv66, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge60.loopexit.unr-lcssa, label %40, !llvm.loop !19
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

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 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!"MWave", !7, i64 0, !7, i64 4, !8, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !8, i64 0}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


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