; LLVM IR from jgaeddert/liquid-dsp :: src/dotprod/tests (dotprod_rrrf_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 [96 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@liquid_autotest_verbose = external global i32, align 4
@.str.21 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [23 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 i32 @dotprod_rrrf_run(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i1 @llvm.is.fpclass.f32(float, i32 immarg) #3

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

declare void @liquid_autotest_passed(...) #1

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

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

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

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

declare i32 @dotprod_rrrf_destroy(ptr noundef) #1

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

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

20:                                               ; preds = %33, %1
  %21 = load i32, ptr %7, align 4, !tbaa !5
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = icmp ult i32 %21, %22
  br i1 %23, label %24, label %36

24:                                               ; preds = %20
  %25 = call float (...) @randnf()
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds float, ptr %16, i64 %27
  store float %25, ptr %28, align 4, !tbaa !9
  %29 = call float (...) @randnf()
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds float, ptr %19, i64 %31
  store float %29, ptr %32, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %24
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = add i32 %34, 1
  store i32 %35, ptr %7, align 4, !tbaa !5
  br label %20, !llvm.loop !11

36:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store float 0.000000e+00, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %52, %36
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = icmp ult i32 %38, %39
  br i1 %40, label %41, label %55

41:                                               ; preds = %37
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds float, ptr %16, i64 %43
  %45 = load float, ptr %44, align 4, !tbaa !9
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds float, ptr %19, i64 %47
  %49 = load float, ptr %48, align 4, !tbaa !9
  %50 = load float, ptr %8, align 4, !tbaa !9
  %51 = call float @llvm.fmuladd.f32(float %45, float %49, float %50)
  store float %51, ptr %8, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %41
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = add i32 %53, 1
  store i32 %54, ptr %7, align 4, !tbaa !5
  br label %37, !llvm.loop !13

55:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = call ptr @dotprod_rrrf_create(ptr noundef %16, i32 noundef %56)
  store ptr %57, ptr %10, align 8, !tbaa !14
  %58 = load ptr, ptr %10, align 8, !tbaa !14
  %59 = call i32 @dotprod_rrrf_execute(ptr noundef %58, ptr noundef %19, ptr noundef %9)
  %60 = load ptr, ptr %10, align 8, !tbaa !14
  %61 = call i32 @dotprod_rrrf_destroy(ptr noundef %60)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = call i32 @dotprod_rrrf_run(ptr noundef %16, ptr noundef %19, i32 noundef %62, ptr noundef %11)
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = call i32 @dotprod_rrrf_run4(ptr noundef %16, ptr noundef %19, i32 noundef %64, ptr noundef %12)
  %66 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %87

68:                                               ; preds = %55
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = load float, ptr %9, align 4, !tbaa !9
  %71 = fpext float %70 to double
  %72 = load float, ptr %8, align 4, !tbaa !9
  %73 = fpext float %72 to double
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, i32 noundef %69, double noundef %71, double noundef %73)
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = load float, ptr %11, align 4, !tbaa !9
  %77 = fpext float %76 to double
  %78 = load float, ptr %8, align 4, !tbaa !9
  %79 = fpext float %78 to double
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, i32 noundef %75, double noundef %77, double noundef %79)
  %81 = load i32, ptr %2, align 4, !tbaa !5
  %82 = load float, ptr %12, align 4, !tbaa !9
  %83 = fpext float %82 to double
  %84 = load float, ptr %8, align 4, !tbaa !9
  %85 = fpext float %84 to double
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i32 noundef %81, double noundef %83, double noundef %85)
  br label %87

87:                                               ; preds = %68, %55
  %88 = load float, ptr %9, align 4, !tbaa !9
  %89 = load float, ptr %8, align 4, !tbaa !9
  %90 = fsub float %88, %89
  %91 = fpext float %90 to double
  %92 = load float, ptr %9, align 4, !tbaa !9
  %93 = load float, ptr %8, align 4, !tbaa !9
  %94 = fsub float %92, %93
  %95 = fpext float %94 to double
  %96 = load float, ptr %9, align 4, !tbaa !9
  %97 = load float, ptr %8, align 4, !tbaa !9
  %98 = fsub float %96, %97
  %99 = fpext float %98 to double
  %100 = load float, ptr %9, align 4, !tbaa !9
  %101 = load float, ptr %8, align 4, !tbaa !9
  %102 = fsub float %100, %101
  %103 = fpext float %102 to double
  %104 = call double @llvm.fmuladd.f64(double %91, double %95, double 0.000000e+00)
  %105 = call double @sqrt(double noundef %104) #6
  %106 = load float, ptr %3, align 4, !tbaa !9
  %107 = fpext float %106 to double
  %108 = fcmp ogt double %105, %107
  br i1 %108, label %121, label %109

109:                                              ; preds = %87
  %110 = load float, ptr %9, align 4, !tbaa !9
  %111 = call i1 @llvm.is.fpclass.f32(float %110, i32 3)
  br i1 %111, label %121, label %112

112:                                              ; preds = %109
  %113 = load float, ptr %9, align 4, !tbaa !9
  %114 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %114, label %121, label %115

115:                                              ; preds = %112
  %116 = load float, ptr %8, align 4, !tbaa !9
  %117 = call i1 @llvm.is.fpclass.f32(float %116, i32 3)
  br i1 %117, label %121, label %118

118:                                              ; preds = %115
  %119 = load float, ptr %8, align 4, !tbaa !9
  %120 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %120, label %121, label %142

121:                                              ; preds = %118, %115, %112, %109, %87
  %122 = load float, ptr %9, align 4, !tbaa !9
  %123 = load float, ptr %8, align 4, !tbaa !9
  %124 = fsub float %122, %123
  %125 = fpext float %124 to double
  %126 = load float, ptr %9, align 4, !tbaa !9
  %127 = load float, ptr %8, align 4, !tbaa !9
  %128 = fsub float %126, %127
  %129 = fpext float %128 to double
  %130 = load float, ptr %9, align 4, !tbaa !9
  %131 = load float, ptr %8, align 4, !tbaa !9
  %132 = fsub float %130, %131
  %133 = fpext float %132 to double
  %134 = load float, ptr %9, align 4, !tbaa !9
  %135 = load float, ptr %8, align 4, !tbaa !9
  %136 = fsub float %134, %135
  %137 = fpext float %136 to double
  %138 = call double @llvm.fmuladd.f64(double %125, double %129, double 0.000000e+00)
  %139 = call double @sqrt(double noundef %138) #6
  %140 = load float, ptr %3, align 4, !tbaa !9
  %141 = fpext float %140 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 388, ptr noundef @.str.24, double noundef %139, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %141)
  br label %143

142:                                              ; preds = %118
  call void (...) @liquid_autotest_passed()
  br label %143

143:                                              ; preds = %142, %121
  %144 = load float, ptr %11, align 4, !tbaa !9
  %145 = load float, ptr %8, align 4, !tbaa !9
  %146 = fsub float %144, %145
  %147 = fpext float %146 to double
  %148 = load float, ptr %11, align 4, !tbaa !9
  %149 = load float, ptr %8, align 4, !tbaa !9
  %150 = fsub float %148, %149
  %151 = fpext float %150 to double
  %152 = load float, ptr %11, align 4, !tbaa !9
  %153 = load float, ptr %8, align 4, !tbaa !9
  %154 = fsub float %152, %153
  %155 = fpext float %154 to double
  %156 = load float, ptr %11, align 4, !tbaa !9
  %157 = load float, ptr %8, align 4, !tbaa !9
  %158 = fsub float %156, %157
  %159 = fpext float %158 to double
  %160 = call double @llvm.fmuladd.f64(double %147, double %151, double 0.000000e+00)
  %161 = call double @sqrt(double noundef %160) #6
  %162 = load float, ptr %3, align 4, !tbaa !9
  %163 = fpext float %162 to double
  %164 = fcmp ogt double %161, %163
  br i1 %164, label %177, label %165

165:                                              ; preds = %143
  %166 = load float, ptr %11, align 4, !tbaa !9
  %167 = call i1 @llvm.is.fpclass.f32(float %166, i32 3)
  br i1 %167, label %177, label %168

168:                                              ; preds = %165
  %169 = load float, ptr %11, align 4, !tbaa !9
  %170 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %170, label %177, label %171

171:                                              ; preds = %168
  %172 = load float, ptr %8, align 4, !tbaa !9
  %173 = call i1 @llvm.is.fpclass.f32(float %172, i32 3)
  br i1 %173, label %177, label %174

174:                                              ; preds = %171
  %175 = load float, ptr %8, align 4, !tbaa !9
  %176 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %176, label %177, label %198

177:                                              ; preds = %174, %171, %168, %165, %143
  %178 = load float, ptr %11, align 4, !tbaa !9
  %179 = load float, ptr %8, align 4, !tbaa !9
  %180 = fsub float %178, %179
  %181 = fpext float %180 to double
  %182 = load float, ptr %11, align 4, !tbaa !9
  %183 = load float, ptr %8, align 4, !tbaa !9
  %184 = fsub float %182, %183
  %185 = fpext float %184 to double
  %186 = load float, ptr %11, align 4, !tbaa !9
  %187 = load float, ptr %8, align 4, !tbaa !9
  %188 = fsub float %186, %187
  %189 = fpext float %188 to double
  %190 = load float, ptr %11, align 4, !tbaa !9
  %191 = load float, ptr %8, align 4, !tbaa !9
  %192 = fsub float %190, %191
  %193 = fpext float %192 to double
  %194 = call double @llvm.fmuladd.f64(double %181, double %185, double 0.000000e+00)
  %195 = call double @sqrt(double noundef %194) #6
  %196 = load float, ptr %3, align 4, !tbaa !9
  %197 = fpext float %196 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 391, ptr noundef @.str.25, double noundef %195, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %197)
  br label %199

198:                                              ; preds = %174
  call void (...) @liquid_autotest_passed()
  br label %199

199:                                              ; preds = %198, %177
  %200 = load float, ptr %12, align 4, !tbaa !9
  %201 = load float, ptr %8, align 4, !tbaa !9
  %202 = fsub float %200, %201
  %203 = fpext float %202 to double
  %204 = load float, ptr %12, align 4, !tbaa !9
  %205 = load float, ptr %8, align 4, !tbaa !9
  %206 = fsub float %204, %205
  %207 = fpext float %206 to double
  %208 = load float, ptr %12, align 4, !tbaa !9
  %209 = load float, ptr %8, align 4, !tbaa !9
  %210 = fsub float %208, %209
  %211 = fpext float %210 to double
  %212 = load float, ptr %12, align 4, !tbaa !9
  %213 = load float, ptr %8, align 4, !tbaa !9
  %214 = fsub float %212, %213
  %215 = fpext float %214 to double
  %216 = call double @llvm.fmuladd.f64(double %203, double %207, double 0.000000e+00)
  %217 = call double @sqrt(double noundef %216) #6
  %218 = load float, ptr %3, align 4, !tbaa !9
  %219 = fpext float %218 to double
  %220 = fcmp ogt double %217, %219
  br i1 %220, label %233, label %221

221:                                              ; preds = %199
  %222 = load float, ptr %12, align 4, !tbaa !9
  %223 = call i1 @llvm.is.fpclass.f32(float %222, i32 3)
  br i1 %223, label %233, label %224

224:                                              ; preds = %221
  %225 = load float, ptr %12, align 4, !tbaa !9
  %226 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %226, label %233, label %227

227:                                              ; preds = %224
  %228 = load float, ptr %8, align 4, !tbaa !9
  %229 = call i1 @llvm.is.fpclass.f32(float %228, i32 3)
  br i1 %229, label %233, label %230

230:                                              ; preds = %227
  %231 = load float, ptr %8, align 4, !tbaa !9
  %232 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %232, label %233, label %254

233:                                              ; preds = %230, %227, %224, %221, %199
  %234 = load float, ptr %12, align 4, !tbaa !9
  %235 = load float, ptr %8, align 4, !tbaa !9
  %236 = fsub float %234, %235
  %237 = fpext float %236 to double
  %238 = load float, ptr %12, align 4, !tbaa !9
  %239 = load float, ptr %8, align 4, !tbaa !9
  %240 = fsub float %238, %239
  %241 = fpext float %240 to double
  %242 = load float, ptr %12, align 4, !tbaa !9
  %243 = load float, ptr %8, align 4, !tbaa !9
  %244 = fsub float %242, %243
  %245 = fpext float %244 to double
  %246 = load float, ptr %12, align 4, !tbaa !9
  %247 = load float, ptr %8, align 4, !tbaa !9
  %248 = fsub float %246, %247
  %249 = fpext float %248 to double
  %250 = call double @llvm.fmuladd.f64(double %237, double %241, double 0.000000e+00)
  %251 = call double @sqrt(double noundef %250) #6
  %252 = load float, ptr %3, align 4, !tbaa !9
  %253 = fpext float %252 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 394, ptr noundef @.str.26, double noundef %251, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %253)
  br label %255

254:                                              ; preds = %230
  call void (...) @liquid_autotest_passed()
  br label %255

255:                                              ; preds = %254, %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %256 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %256)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void
}

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

declare float @randnf(...) #1

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

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

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 "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 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 #5 = { nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}


; 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 [96 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str.21 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [23 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 i32 @dotprod_rrrf_run(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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 void @liquid_autotest_passed(...) local_unnamed_addr #1

declare i32 @dotprod_rrrf_run4(ptr noundef, ptr noundef, i32 noundef, 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

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

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

declare i32 @dotprod_rrrf_destroy(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @runtest_dotprod_rrrf(i32 noundef %0) local_unnamed_addr #4 {
  %2 = alloca float, align 4
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = zext i32 %0 to i64
  %6 = alloca float, i64 %5, align 16
  %7 = alloca float, i64 %5, align 16
  %.not79 = icmp eq i32 %0, 0
  br i1 %.not79, label %._crit_edge, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph
  br i1 %.not79, label %._crit_edge, label %.lr.ph78.preheader

.lr.ph78.preheader:                               ; preds = %.preheader
  %xtraiter = and i64 %5, 3
  %8 = icmp ult i32 %0, 4
  br i1 %8, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph78.preheader.new

.lr.ph78.preheader.new:                           ; preds = %.lr.ph78.preheader
  %unroll_iter = and i64 %5, 4294967292
  br label %.lr.ph78

.lr.ph:                                           ; preds = %1, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %1 ]
  %9 = tail call float (...) @randnf() #6
  %10 = getelementptr inbounds float, ptr %6, i64 %indvars.iv
  store float %9, ptr %10, align 4, !tbaa !5
  %11 = tail call float (...) @randnf() #6
  %12 = getelementptr inbounds float, ptr %7, i64 %indvars.iv
  store float %11, ptr %12, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %5
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !9

.lr.ph78:                                         ; preds = %.lr.ph78, %.lr.ph78.preheader.new
  %indvars.iv82 = phi i64 [ 0, %.lr.ph78.preheader.new ], [ %indvars.iv.next83.3, %.lr.ph78 ]
  %.06076 = phi float [ 0.000000e+00, %.lr.ph78.preheader.new ], [ %32, %.lr.ph78 ]
  %niter = phi i64 [ 0, %.lr.ph78.preheader.new ], [ %niter.next.3, %.lr.ph78 ]
  %13 = getelementptr inbounds float, ptr %6, i64 %indvars.iv82
  %14 = load float, ptr %13, align 16, !tbaa !5
  %15 = getelementptr inbounds float, ptr %7, i64 %indvars.iv82
  %16 = load float, ptr %15, align 16, !tbaa !5
  %17 = tail call float @llvm.fmuladd.f32(float %14, float %16, float %.06076)
  %indvars.iv.next83 = or disjoint i64 %indvars.iv82, 1
  %18 = getelementptr inbounds float, ptr %6, i64 %indvars.iv.next83
  %19 = load float, ptr %18, align 4, !tbaa !5
  %20 = getelementptr inbounds float, ptr %7, i64 %indvars.iv.next83
  %21 = load float, ptr %20, align 4, !tbaa !5
  %22 = tail call float @llvm.fmuladd.f32(float %19, float %21, float %17)
  %indvars.iv.next83.1 = or disjoint i64 %indvars.iv82, 2
  %23 = getelementptr inbounds float, ptr %6, i64 %indvars.iv.next83.1
  %24 = load float, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds float, ptr %7, i64 %indvars.iv.next83.1
  %26 = load float, ptr %25, align 8, !tbaa !5
  %27 = tail call float @llvm.fmuladd.f32(float %24, float %26, float %22)
  %indvars.iv.next83.2 = or disjoint i64 %indvars.iv82, 3
  %28 = getelementptr inbounds float, ptr %6, i64 %indvars.iv.next83.2
  %29 = load float, ptr %28, align 4, !tbaa !5
  %30 = getelementptr inbounds float, ptr %7, i64 %indvars.iv.next83.2
  %31 = load float, ptr %30, align 4, !tbaa !5
  %32 = tail call float @llvm.fmuladd.f32(float %29, float %31, float %27)
  %indvars.iv.next83.3 = add nuw nsw i64 %indvars.iv82, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph78, !llvm.loop !11

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph78, %.lr.ph78.preheader
  %.lcssa.ph = phi float [ poison, %.lr.ph78.preheader ], [ %32, %.lr.ph78 ]
  %indvars.iv82.unr = phi i64 [ 0, %.lr.ph78.preheader ], [ %indvars.iv.next83.3, %.lr.ph78 ]
  %.06076.unr = phi float [ 0.000000e+00, %.lr.ph78.preheader ], [ %32, %.lr.ph78 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph78.epil

.lr.ph78.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph78.epil
  %indvars.iv82.epil = phi i64 [ %indvars.iv.next83.epil, %.lr.ph78.epil ], [ %indvars.iv82.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.06076.epil = phi float [ %37, %.lr.ph78.epil ], [ %.06076.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph78.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %33 = getelementptr inbounds float, ptr %6, i64 %indvars.iv82.epil
  %34 = load float, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds float, ptr %7, i64 %indvars.iv82.epil
  %36 = load float, ptr %35, align 4, !tbaa !5
  %37 = tail call float @llvm.fmuladd.f32(float %34, float %36, float %.06076.epil)
  %indvars.iv.next83.epil = add nuw nsw i64 %indvars.iv82.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph78.epil, !llvm.loop !12

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph78.epil, %1, %.preheader
  %.060.lcssa = phi float [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %1 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %37, %.lr.ph78.epil ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %38 = call ptr @dotprod_rrrf_create(ptr noundef nonnull %6, i32 noundef %0) #6
  %39 = call i32 @dotprod_rrrf_execute(ptr noundef %38, ptr noundef nonnull %7, ptr noundef nonnull %2) #6
  %40 = call i32 @dotprod_rrrf_destroy(ptr noundef %38) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %41 = call i32 @dotprod_rrrf_run(ptr noundef nonnull %6, ptr noundef nonnull %7, i32 noundef %0, ptr noundef nonnull %3) #6
  %42 = call i32 @dotprod_rrrf_run4(ptr noundef nonnull %6, ptr noundef nonnull %7, i32 noundef %0, ptr noundef nonnull %4) #6
  %43 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !14
  %.not = icmp eq i32 %43, 0
  br i1 %.not, label %55, label %44

44:                                               ; preds = %._crit_edge
  %45 = load float, ptr %2, align 4, !tbaa !5
  %46 = fpext float %45 to double
  %47 = fpext float %.060.lcssa to double
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %0, double noundef %46, double noundef %47)
  %49 = load float, ptr %3, align 4, !tbaa !5
  %50 = fpext float %49 to double
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, i32 noundef %0, double noundef %50, double noundef %47)
  %52 = load float, ptr %4, align 4, !tbaa !5
  %53 = fpext float %52 to double
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef %0, double noundef %53, double noundef %47)
  br label %55

55:                                               ; preds = %44, %._crit_edge
  %56 = load float, ptr %2, align 4
  %57 = fsub float %56, %.060.lcssa
  %58 = fpext float %57 to double
  %59 = call double @llvm.fmuladd.f64(double %58, double %58, double 0.000000e+00)
  %sqrt = call double @llvm.sqrt.f64(double %59)
  %60 = fcmp ogt double %sqrt, 0x3F1A36E2E0000000
  %61 = fcmp uno float %56, 0.000000e+00
  %or.cond = select i1 %60, i1 true, i1 %61
  %62 = fcmp uno float %.060.lcssa, 0.000000e+00
  %or.cond63 = select i1 %or.cond, i1 true, i1 %62
  br i1 %or.cond63, label %63, label %64

63:                                               ; preds = %55
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 388, ptr noundef nonnull @.str.24, double noundef %sqrt, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F1A36E2E0000000) #6
  br label %65

64:                                               ; preds = %55
  call void (...) @liquid_autotest_passed() #6
  br label %65

65:                                               ; preds = %64, %63
  %66 = load float, ptr %3, align 4
  %67 = fsub float %66, %.060.lcssa
  %68 = fpext float %67 to double
  %69 = call double @llvm.fmuladd.f64(double %68, double %68, double 0.000000e+00)
  %sqrt71 = call double @llvm.sqrt.f64(double %69)
  %70 = fcmp ogt double %sqrt71, 0x3F1A36E2E0000000
  %71 = fcmp uno float %66, 0.000000e+00
  %or.cond65 = select i1 %70, i1 true, i1 %71
  %or.cond66 = select i1 %or.cond65, i1 true, i1 %62
  br i1 %or.cond66, label %72, label %73

72:                                               ; preds = %65
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 391, ptr noundef nonnull @.str.25, double noundef %sqrt71, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F1A36E2E0000000) #6
  br label %74

73:                                               ; preds = %65
  call void (...) @liquid_autotest_passed() #6
  br label %74

74:                                               ; preds = %73, %72
  %75 = load float, ptr %4, align 4
  %76 = fsub float %75, %.060.lcssa
  %77 = fpext float %76 to double
  %78 = call double @llvm.fmuladd.f64(double %77, double %77, double 0.000000e+00)
  %sqrt73 = call double @llvm.sqrt.f64(double %78)
  %79 = fcmp ogt double %sqrt73, 0x3F1A36E2E0000000
  %80 = fcmp uno float %75, 0.000000e+00
  %or.cond68 = select i1 %79, i1 true, i1 %80
  %or.cond69 = select i1 %or.cond68, i1 true, i1 %62
  br i1 %or.cond69, label %81, label %82

81:                                               ; preds = %74
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 394, ptr noundef nonnull @.str.26, double noundef %sqrt73, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F1A36E2E0000000) #6
  br label %83

82:                                               ; preds = %74
  call void (...) @liquid_autotest_passed() #6
  br label %83

83:                                               ; preds = %82, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  ret void
}

declare float @randnf(...) 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #5

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass