; LLVM IR from jgaeddert/liquid-dsp :: src/buffer/tests (cbuffer_autotest)

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

@.str = external hidden unnamed_addr constant [90 x i8], align 1
@liquid_autotest_verbose = external global i32, align 4
@.str.26 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [2 x i8], align 1

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

declare void @liquid_autotest_passed(...) #1

declare i32 @cbufferf_write(ptr noundef, ptr noundef, i32 noundef) #1

declare i32 @cbufferf_read(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) #1

declare i32 @cbufferf_release(ptr noundef, i32 noundef) #1

declare i32 @cbufferf_size(ptr noundef) #1

declare i32 @cbufferf_destroy(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_cbufferf_flow() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store i32 48, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 17, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1200, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = zext i32 %18 to i64
  %20 = call ptr @llvm.stacksave.p0()
  store ptr %20, ptr %5, align 8
  %21 = alloca float, i64 %19, align 16
  store i64 %19, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = call ptr @cbufferf_create_max(i32 noundef %22, i32 noundef %23)
  store ptr %24, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %124, %0
  br label %26

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %27 = load ptr, ptr %7, align 8, !tbaa !9
  %28 = call i32 @cbufferf_space_available(ptr noundef %27)
  store i32 %28, ptr %11, align 4, !tbaa !5
  %29 = load i32, ptr %11, align 4, !tbaa !5
  %30 = icmp ugt i32 %29, 0
  br i1 %30, label %31, label %55

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %32 = call i32 @rand() #5
  %33 = load i32, ptr %11, align 4, !tbaa !5
  %34 = urem i32 %32, %33
  %35 = add i32 %34, 1
  store i32 %35, ptr %12, align 4, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %48, %31
  %37 = load i32, ptr %8, align 4, !tbaa !5
  %38 = load i32, ptr %12, align 4, !tbaa !5
  %39 = icmp ult i32 %37, %38
  br i1 %39, label %40, label %51

40:                                               ; preds = %36
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = uitofp i32 %41 to float
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds float, ptr %21, i64 %44
  store float %42, ptr %45, align 4, !tbaa !11
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = add i32 %46, 1
  store i32 %47, ptr %9, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %40
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = add i32 %49, 1
  store i32 %50, ptr %8, align 4, !tbaa !5
  br label %36, !llvm.loop !13

51:                                               ; preds = %36
  %52 = load ptr, ptr %7, align 8, !tbaa !9
  %53 = load i32, ptr %12, align 4, !tbaa !5
  %54 = call i32 @cbufferf_write(ptr noundef %52, ptr noundef %21, i32 noundef %53)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %55

55:                                               ; preds = %51, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %56 = load ptr, ptr %7, align 8, !tbaa !9
  %57 = call i32 @cbufferf_size(ptr noundef %56)
  store i32 %57, ptr %13, align 4, !tbaa !5
  %58 = load i32, ptr %13, align 4, !tbaa !5
  %59 = icmp ugt i32 %58, 0
  br i1 %59, label %60, label %113

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %61 = call i32 @rand() #5
  %62 = load i32, ptr %13, align 4, !tbaa !5
  %63 = urem i32 %61, %62
  store i32 %63, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %64 = load ptr, ptr %7, align 8, !tbaa !9
  %65 = load i32, ptr %14, align 4, !tbaa !5
  %66 = call i32 @cbufferf_read(ptr noundef %64, i32 noundef %65, ptr noundef %15, ptr noundef %16)
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %106, %60
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = load i32, ptr %16, align 4, !tbaa !5
  %70 = icmp ult i32 %68, %69
  br i1 %70, label %71, label %109

71:                                               ; preds = %67
  %72 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %93

74:                                               ; preds = %71
  %75 = load ptr, ptr %15, align 8, !tbaa !9
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds float, ptr %75, i64 %77
  %79 = load float, ptr %78, align 4, !tbaa !11
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = uitofp i32 %80 to float
  %82 = fcmp oeq float %79, %81
  %83 = zext i1 %82 to i64
  %84 = select i1 %82, ptr @.str.27, ptr @.str.28
  %85 = load ptr, ptr %15, align 8, !tbaa !9
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds float, ptr %85, i64 %87
  %89 = load float, ptr %88, align 4, !tbaa !11
  %90 = fpext float %89 to double
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, ptr noundef %84, double noundef %90, i32 noundef %91)
  br label %93

93:                                               ; preds = %74, %71
  %94 = load ptr, ptr %15, align 8, !tbaa !9
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds float, ptr %94, i64 %96
  %98 = load float, ptr %97, align 4, !tbaa !11
  %99 = load i32, ptr %10, align 4, !tbaa !5
  %100 = uitofp i32 %99 to float
  %101 = fcmp une float %98, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %93
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %102, %93
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = add i32 %104, 1
  store i32 %105, ptr %10, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %103
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = add i32 %107, 1
  store i32 %108, ptr %8, align 4, !tbaa !5
  br label %67, !llvm.loop !15

109:                                              ; preds = %67
  %110 = load ptr, ptr %7, align 8, !tbaa !9
  %111 = load i32, ptr %16, align 4, !tbaa !5
  %112 = call i32 @cbufferf_release(ptr noundef %110, i32 noundef %111)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %113

113:                                              ; preds = %109, %55
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %120

116:                                              ; preds = %113
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = load i32, ptr %3, align 4, !tbaa !5
  %119 = icmp uge i32 %117, %118
  br i1 %119, label %120, label %121

120:                                              ; preds = %116, %113
  store i32 3, ptr %17, align 4
  br label %122

121:                                              ; preds = %116
  store i32 0, ptr %17, align 4
  br label %122

122:                                              ; preds = %121, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %123 = load i32, ptr %17, align 4
  switch i32 %123, label %138 [
    i32 0, label %124
    i32 3, label %125
  ]

124:                                              ; preds = %122
  br label %25

125:                                              ; preds = %122
  %126 = load i32, ptr %4, align 4, !tbaa !5
  %127 = icmp eq i32 %126, 1
  br i1 %127, label %133, label %128

128:                                              ; preds = %125
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = icmp eq i32 %129, 1
  %131 = zext i1 %130 to i32
  %132 = sitofp i32 %131 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 292, ptr noundef @.str.29, double noundef %132, ptr noundef @.str.30, ptr noundef @.str.31, double noundef 1.000000e+00)
  br label %134

133:                                              ; preds = %125
  call void (...) @liquid_autotest_passed()
  br label %134

134:                                              ; preds = %133, %128
  %135 = load ptr, ptr %7, align 8, !tbaa !9
  %136 = call i32 @cbufferf_destroy(ptr noundef %135)
  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 8, ptr %7) #5
  %137 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %137)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void

138:                                              ; preds = %122
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

declare ptr @cbufferf_create_max(i32 noundef, i32 noundef) #1

declare i32 @cbufferf_space_available(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @rand() #4

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !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"

@.str = external hidden unnamed_addr constant [90 x i8], align 1
@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str.26 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [2 x i8], align 1

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

declare void @liquid_autotest_passed(...) local_unnamed_addr #1

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

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

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) local_unnamed_addr #1

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

declare i32 @cbufferf_size(ptr noundef) local_unnamed_addr #1

declare i32 @cbufferf_destroy(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_cbufferf_flow() local_unnamed_addr #2 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca [48 x float], align 16
  %4 = tail call ptr @cbufferf_create_max(i32 noundef 48, i32 noundef 17) #5
  br label %5

5:                                                ; preds = %72, %0
  %.042 = phi i32 [ 0, %0 ], [ %.244, %72 ]
  %.039 = phi i32 [ 0, %0 ], [ %.241, %72 ]
  %.036 = phi i32 [ 1, %0 ], [ %.3, %72 ]
  %6 = call i32 @cbufferf_space_available(ptr noundef %4) #5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %26, label %7

7:                                                ; preds = %5
  %8 = call i32 @rand() #5
  %.fr115 = freeze i32 %8
  %9 = urem i32 %.fr115, %6
  %10 = zext i32 %9 to i64
  %11 = zext i32 %.fr115 to i64
  %12 = add nuw nsw i64 %11, 1
  %13 = urem i32 %.fr115, %6
  %narrow = sub nuw i32 %.fr115, %13
  %14 = zext i32 %narrow to i64
  %15 = sub nsw i64 %12, %14
  %min.iters.check96 = icmp ult i64 %15, 8
  br i1 %min.iters.check96, label %scalar.ph95.preheader, label %vector.ph97

vector.ph97:                                      ; preds = %7
  %n.vec99 = and i64 %15, -8
  %.cast101 = trunc i64 %n.vec99 to i32
  %ind.end102 = add i32 %.039, %.cast101
  %.splatinsert106 = insertelement <4 x i32> poison, i32 %.039, i64 0
  %.splat107 = shufflevector <4 x i32> %.splatinsert106, <4 x i32> poison, <4 x i32> zeroinitializer
  %induction108 = add <4 x i32> %.splat107, <i32 0, i32 1, i32 2, i32 3>
  br label %vector.body104

vector.body104:                                   ; preds = %vector.body104, %vector.ph97
  %index105 = phi i64 [ 0, %vector.ph97 ], [ %index.next113, %vector.body104 ]
  %vec.ind109 = phi <4 x i32> [ %induction108, %vector.ph97 ], [ %vec.ind.next112, %vector.body104 ]
  %step.add110 = add <4 x i32> %vec.ind109, <i32 4, i32 4, i32 4, i32 4>
  %16 = uitofp <4 x i32> %vec.ind109 to <4 x float>
  %17 = uitofp <4 x i32> %step.add110 to <4 x float>
  %18 = getelementptr inbounds float, ptr %3, i64 %index105
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store <4 x float> %16, ptr %18, align 16, !tbaa !5
  store <4 x float> %17, ptr %19, align 16, !tbaa !5
  %index.next113 = add nuw i64 %index105, 8
  %vec.ind.next112 = add <4 x i32> %vec.ind109, <i32 8, i32 8, i32 8, i32 8>
  %20 = icmp eq i64 %index.next113, %n.vec99
  br i1 %20, label %middle.block94, label %vector.body104, !llvm.loop !9

middle.block94:                                   ; preds = %vector.body104
  %cmp.n114 = icmp eq i64 %15, %n.vec99
  br i1 %cmp.n114, label %.loopexit, label %scalar.ph95.preheader

scalar.ph95.preheader:                            ; preds = %middle.block94, %7
  %indvars.iv.ph = phi i64 [ 0, %7 ], [ %n.vec99, %middle.block94 ]
  %.14053.ph = phi i32 [ %.039, %7 ], [ %ind.end102, %middle.block94 ]
  br label %scalar.ph95

scalar.ph95:                                      ; preds = %scalar.ph95.preheader, %scalar.ph95
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph95 ], [ %indvars.iv.ph, %scalar.ph95.preheader ]
  %.14053 = phi i32 [ %23, %scalar.ph95 ], [ %.14053.ph, %scalar.ph95.preheader ]
  %21 = uitofp i32 %.14053 to float
  %22 = getelementptr inbounds float, ptr %3, i64 %indvars.iv
  store float %21, ptr %22, align 4, !tbaa !5
  %23 = add i32 %.14053, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not49.not = icmp ult i64 %indvars.iv, %10
  br i1 %.not49.not, label %scalar.ph95, label %.loopexit, !llvm.loop !13

.loopexit:                                        ; preds = %scalar.ph95, %middle.block94
  %.lcssa87 = phi i32 [ %ind.end102, %middle.block94 ], [ %23, %scalar.ph95 ]
  %24 = add nuw i32 %9, 1
  %25 = call i32 @cbufferf_write(ptr noundef %4, ptr noundef nonnull %3, i32 noundef %24) #5
  br label %26

26:                                               ; preds = %.loopexit, %5
  %.241 = phi i32 [ %.lcssa87, %.loopexit ], [ %.039, %5 ]
  %27 = call i32 @cbufferf_size(ptr noundef %4) #5
  %.not50 = icmp eq i32 %27, 0
  br i1 %.not50, label %72, label %28

28:                                               ; preds = %26
  %29 = call i32 @rand() #5
  %30 = urem i32 %29, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %31 = call i32 @cbufferf_read(ptr noundef %4, i32 noundef %30, ptr noundef nonnull %1, ptr noundef nonnull %2) #5
  %32 = load i32, ptr %2, align 4, !tbaa !14
  %.not62 = icmp eq i32 %32, 0
  br i1 %.not62, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %28
  %33 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !14
  %34 = icmp eq i32 %33, 0
  %35 = load ptr, ptr %1, align 8, !tbaa !16
  br i1 %34, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %wide.trip.count = zext i32 %32 to i64
  %min.iters.check = icmp ult i32 %32, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.split.us
  %n.vec = and i64 %wide.trip.count, 4294967288
  %.cast = trunc nuw i64 %n.vec to i32
  %ind.end = add i32 %.042, %.cast
  %.splatinsert = insertelement <4 x i32> poison, i32 %.042, i64 0
  %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %induction = add <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i1> [ zeroinitializer, %vector.ph ], [ %42, %vector.body ]
  %vec.phi91 = phi <4 x i1> [ zeroinitializer, %vector.ph ], [ %43, %vector.body ]
  %vec.ind = phi <4 x i32> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %36 = getelementptr inbounds float, ptr %35, i64 %index
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %wide.load = load <4 x float>, ptr %36, align 4, !tbaa !5
  %wide.load93 = load <4 x float>, ptr %37, align 4, !tbaa !5
  %38 = uitofp <4 x i32> %vec.ind to <4 x float>
  %39 = uitofp <4 x i32> %step.add to <4 x float>
  %40 = fcmp une <4 x float> %wide.load, %38
  %41 = fcmp une <4 x float> %wide.load93, %39
  %42 = or <4 x i1> %vec.phi, %40
  %43 = or <4 x i1> %vec.phi91, %41
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %44 = icmp eq i64 %index.next, %n.vec
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %bin.rdx = or <4 x i1> %43, %42
  %bin.rdx.fr = freeze <4 x i1> %bin.rdx
  %45 = bitcast <4 x i1> %bin.rdx.fr to i4
  %.not116 = icmp eq i4 %45, 0
  %rdx.select = select i1 %.not116, i32 %.036, i32 0
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph.split.us
  %indvars.iv72.ph = phi i64 [ 0, %.lr.ph.split.us ], [ %n.vec, %middle.block ]
  %.157.us.ph = phi i32 [ %.036, %.lr.ph.split.us ], [ %rdx.select, %middle.block ]
  %.14355.us.ph = phi i32 [ %.042, %.lr.ph.split.us ], [ %ind.end, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %scalar.ph ], [ %indvars.iv72.ph, %scalar.ph.preheader ]
  %.157.us = phi i32 [ %.2.us, %scalar.ph ], [ %.157.us.ph, %scalar.ph.preheader ]
  %.14355.us = phi i32 [ %50, %scalar.ph ], [ %.14355.us.ph, %scalar.ph.preheader ]
  %46 = getelementptr inbounds float, ptr %35, i64 %indvars.iv72
  %47 = load float, ptr %46, align 4, !tbaa !5
  %48 = uitofp i32 %.14355.us to float
  %49 = fcmp une float %47, %48
  %.2.us = select i1 %49, i32 0, i32 %.157.us
  %50 = add i32 %.14355.us, 1
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %scalar.ph, !llvm.loop !19

.lr.ph.split:                                     ; preds = %.lr.ph, %61
  %.pre77 = phi ptr [ %.pre7779, %61 ], [ %35, %.lr.ph ]
  %51 = phi i32 [ %62, %61 ], [ %32, %.lr.ph ]
  %52 = phi i32 [ %63, %61 ], [ 1, %.lr.ph ]
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %61 ], [ 0, %.lr.ph ]
  %.157 = phi i32 [ %.2, %61 ], [ %.036, %.lr.ph ]
  %.14355 = phi i32 [ %67, %61 ], [ %.042, %.lr.ph ]
  %.not52 = icmp eq i32 %52, 0
  br i1 %.not52, label %.lr.ph.split._crit_edge, label %53

.lr.ph.split._crit_edge:                          ; preds = %.lr.ph.split
  %.pre81 = uitofp i32 %.14355 to float
  br label %61

53:                                               ; preds = %.lr.ph.split
  %54 = getelementptr inbounds float, ptr %.pre77, i64 %indvars.iv69
  %55 = load float, ptr %54, align 4, !tbaa !5
  %56 = uitofp i32 %.14355 to float
  %57 = fcmp oeq float %55, %56
  %58 = select i1 %57, ptr @.str.27, ptr @.str.28
  %59 = fpext float %55 to double
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, ptr noundef nonnull %58, double noundef %59, i32 noundef %.14355)
  %.pre = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !14
  %.pre76 = load ptr, ptr %1, align 8, !tbaa !16
  %.pre78 = load i32, ptr %2, align 4, !tbaa !14
  br label %61

61:                                               ; preds = %.lr.ph.split._crit_edge, %53
  %.pre-phi = phi float [ %.pre81, %.lr.ph.split._crit_edge ], [ %56, %53 ]
  %.pre7779 = phi ptr [ %.pre77, %.lr.ph.split._crit_edge ], [ %.pre76, %53 ]
  %62 = phi i32 [ %51, %.lr.ph.split._crit_edge ], [ %.pre78, %53 ]
  %63 = phi i32 [ 0, %.lr.ph.split._crit_edge ], [ %.pre, %53 ]
  %64 = getelementptr inbounds float, ptr %.pre7779, i64 %indvars.iv69
  %65 = load float, ptr %64, align 4, !tbaa !5
  %66 = fcmp une float %65, %.pre-phi
  %.2 = select i1 %66, i32 0, i32 %.157
  %67 = add i32 %.14355, 1
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %68 = zext i32 %62 to i64
  %69 = icmp ult i64 %indvars.iv.next70, %68
  br i1 %69, label %.lr.ph.split, label %._crit_edge, !llvm.loop !20

._crit_edge.loopexit:                             ; preds = %scalar.ph, %middle.block
  %.2.us.lcssa = phi i32 [ %rdx.select, %middle.block ], [ %.2.us, %scalar.ph ]
  %70 = add i32 %.042, %32
  br label %._crit_edge

._crit_edge:                                      ; preds = %61, %._crit_edge.loopexit, %28
  %.143.lcssa = phi i32 [ %.042, %28 ], [ %70, %._crit_edge.loopexit ], [ %67, %61 ]
  %.1.lcssa = phi i32 [ %.036, %28 ], [ %.2.us.lcssa, %._crit_edge.loopexit ], [ %.2, %61 ]
  %.lcssa = phi i32 [ 0, %28 ], [ %32, %._crit_edge.loopexit ], [ %62, %61 ]
  %71 = call i32 @cbufferf_release(ptr noundef %4, i32 noundef %.lcssa) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  br label %72

72:                                               ; preds = %._crit_edge, %26
  %.244 = phi i32 [ %.143.lcssa, %._crit_edge ], [ %.042, %26 ]
  %.3 = phi i32 [ %.1.lcssa, %._crit_edge ], [ %.036, %26 ]
  %.not51 = icmp eq i32 %.3, 0
  %73 = icmp ugt i32 %.244, 1199
  %or.cond = select i1 %.not51, i1 true, i1 %73
  br i1 %or.cond, label %74, label %5

74:                                               ; preds = %72
  %75 = icmp eq i32 %.3, 1
  br i1 %75, label %77, label %76

76:                                               ; preds = %74
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 292, ptr noundef nonnull @.str.29, double noundef 0.000000e+00, ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.31, double noundef 1.000000e+00) #5
  br label %78

77:                                               ; preds = %74
  call void (...) @liquid_autotest_passed() #5
  br label %78

78:                                               ; preds = %77, %76
  %79 = call i32 @cbufferf_destroy(ptr noundef %4) #5
  ret void
}

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

declare i32 @cbufferf_space_available(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #3

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

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


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