; LLVM IR from jgaeddert/liquid-dsp :: examples (polyfit_example)

; 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 [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 25, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 2, ptr %3, align 4, !tbaa !5
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = zext i32 %10 to i64
  %12 = call ptr @llvm.stacksave.p0()
  store ptr %12, ptr %4, align 8
  %13 = alloca float, i64 %11, align 16
  store i64 %11, ptr %5, align 8
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = zext i32 %14 to i64
  %16 = alloca float, i64 %15, align 16
  store i64 %15, 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 %17

17:                                               ; preds = %46, %0
  %18 = load i32, ptr %7, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp ult i32 %18, %19
  br i1 %20, label %21, label %49

21:                                               ; preds = %17
  %22 = call float (...) @randf()
  %23 = call float @llvm.fmuladd.f32(float 1.400000e+01, float %22, float -7.000000e+00)
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds float, ptr %13, i64 %25
  store float %23, ptr %26, align 4, !tbaa !9
  %27 = load i32, ptr %7, align 4, !tbaa !5
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds float, ptr %13, i64 %28
  %30 = load float, ptr %29, align 4, !tbaa !9
  %31 = fpext float %30 to double
  %32 = fmul double 1.000000e-01, %31
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = zext i32 %33 to i64
  %35 = getelementptr inbounds float, ptr %13, i64 %34
  %36 = load float, ptr %35, align 4, !tbaa !9
  %37 = fpext float %36 to double
  %38 = call float (...) @randnf()
  %39 = fpext float %38 to double
  %40 = fmul double 1.000000e-01, %39
  %41 = call double @llvm.fmuladd.f64(double %32, double %37, double %40)
  %42 = fptrunc double %41 to float
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds float, ptr %16, i64 %44
  store float %42, ptr %45, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %21
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = add i32 %47, 1
  store i32 %48, ptr %7, align 4, !tbaa !5
  br label %17, !llvm.loop !11

49:                                               ; preds = %17
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = add i32 %50, 1
  %52 = zext i32 %51 to i64
  %53 = alloca float, i64 %52, align 16
  store i64 %52, ptr %8, align 8
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = add i32 %55, 1
  %57 = call i32 @polyf_fit(ptr noundef %13, ptr noundef %16, i32 noundef %54, ptr noundef %53, i32 noundef %56)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %82, %49
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %61 = icmp ult i32 %59, %60
  br i1 %61, label %62, label %85

62:                                               ; preds = %58
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds float, ptr %13, i64 %64
  %66 = load float, ptr %65, align 4, !tbaa !9
  %67 = fpext float %66 to double
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds float, ptr %16, i64 %69
  %71 = load float, ptr %70, align 4, !tbaa !9
  %72 = fpext float %71 to double
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = add i32 %73, 1
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds float, ptr %13, i64 %76
  %78 = load float, ptr %77, align 4, !tbaa !9
  %79 = call float @polyf_val(ptr noundef %53, i32 noundef %74, float noundef %78)
  %80 = fpext float %79 to double
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str, double noundef %67, double noundef %72, double noundef %80)
  br label %82

82:                                               ; preds = %62
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = add i32 %83, 1
  store i32 %84, ptr %7, align 4, !tbaa !5
  br label %58, !llvm.loop !13

85:                                               ; preds = %58
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %98, %85
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = load i32, ptr %3, align 4, !tbaa !5
  %89 = icmp ule i32 %87, %88
  br i1 %89, label %90, label %101

90:                                               ; preds = %86
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds float, ptr %53, i64 %93
  %95 = load float, ptr %94, align 4, !tbaa !9
  %96 = fpext float %95 to double
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %91, double noundef %96)
  br label %98

98:                                               ; preds = %90
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = add i32 %99, 1
  store i32 %100, ptr %7, align 4, !tbaa !5
  br label %86, !llvm.loop !14

101:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %102 = call noalias ptr @fopen(ptr noundef @.str.2, ptr noundef @.str.3)
  store ptr %102, ptr %9, align 8, !tbaa !15
  %103 = load ptr, ptr %9, align 8, !tbaa !15
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.4, ptr noundef @.str.2) #6
  %105 = load ptr, ptr %9, align 8, !tbaa !15
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str.5) #6
  %107 = load ptr, ptr %9, align 8, !tbaa !15
  %108 = load i32, ptr %2, align 4, !tbaa !5
  %109 = load i32, ptr %3, align 4, !tbaa !5
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str.6, i32 noundef %108, i32 noundef %109) #6
  %111 = load ptr, ptr %9, align 8, !tbaa !15
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str.7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %134, %101
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = icmp ult i32 %114, %115
  br i1 %116, label %117, label %137

117:                                              ; preds = %113
  %118 = load ptr, ptr %9, align 8, !tbaa !15
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = add i32 %119, 1
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds float, ptr %13, i64 %122
  %124 = load float, ptr %123, align 4, !tbaa !9
  %125 = fpext float %124 to double
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = add i32 %126, 1
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %16, i64 %129
  %131 = load float, ptr %130, align 4, !tbaa !9
  %132 = fpext float %131 to double
  %133 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef @.str.8, i32 noundef %120, double noundef %125, i32 noundef %127, double noundef %132) #6
  br label %134

134:                                              ; preds = %117
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = add i32 %135, 1
  store i32 %136, ptr %7, align 4, !tbaa !5
  br label %113, !llvm.loop !17

137:                                              ; preds = %113
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %154, %137
  %139 = load i32, ptr %7, align 4, !tbaa !5
  %140 = load i32, ptr %3, align 4, !tbaa !5
  %141 = icmp ule i32 %139, %140
  br i1 %141, label %142, label %157

142:                                              ; preds = %138
  %143 = load ptr, ptr %9, align 8, !tbaa !15
  %144 = load i32, ptr %7, align 4, !tbaa !5
  %145 = add i32 %144, 1
  %146 = load i32, ptr %3, align 4, !tbaa !5
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = sub i32 %146, %147
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds float, ptr %53, i64 %149
  %151 = load float, ptr %150, align 4, !tbaa !9
  %152 = fpext float %151 to double
  %153 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str.9, i32 noundef %145, double noundef %152) #6
  br label %154

154:                                              ; preds = %142
  %155 = load i32, ptr %7, align 4, !tbaa !5
  %156 = add i32 %155, 1
  store i32 %156, ptr %7, align 4, !tbaa !5
  br label %138, !llvm.loop !18

157:                                              ; preds = %138
  %158 = load ptr, ptr %9, align 8, !tbaa !15
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef @.str.10) #6
  %160 = load ptr, ptr %9, align 8, !tbaa !15
  %161 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %160, ptr noundef @.str.11) #6
  %162 = load ptr, ptr %9, align 8, !tbaa !15
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %162, ptr noundef @.str.12) #6
  %164 = load ptr, ptr %9, align 8, !tbaa !15
  %165 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %164, ptr noundef @.str.13) #6
  %166 = load ptr, ptr %9, align 8, !tbaa !15
  %167 = load i32, ptr %3, align 4, !tbaa !5
  %168 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %166, ptr noundef @.str.14, i32 noundef %167) #6
  %169 = load ptr, ptr %9, align 8, !tbaa !15
  %170 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.15) #6
  %171 = load ptr, ptr %9, align 8, !tbaa !15
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.16) #6
  %173 = load ptr, ptr %9, align 8, !tbaa !15
  %174 = call i32 @fclose(ptr noundef %173)
  %175 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, ptr noundef @.str.2)
  %176 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %177 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %177)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %178 = load i32, ptr %1, align 4
  ret i32 %178
}

; 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
declare ptr @llvm.stacksave.p0() #2

declare float @randf(...) #3

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

declare float @randnf(...) #3

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

declare i32 @polyf_fit(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

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

declare float @polyf_val(ptr noundef, i32 noundef, float noundef) #3

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #5

declare i32 @fclose(ptr noundef) #3

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

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

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 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 }

!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 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; 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 [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [25 x float], align 16
  %2 = alloca [25 x float], align 16
  br label %3

3:                                                ; preds = %0, %3
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %3 ]
  %4 = tail call float (...) @randf() #4
  %5 = tail call float @llvm.fmuladd.f32(float %4, float 1.400000e+01, float -7.000000e+00)
  %6 = getelementptr inbounds float, ptr %1, i64 %indvars.iv
  store float %5, ptr %6, align 4, !tbaa !5
  %7 = fpext float %5 to double
  %8 = fmul double %7, 1.000000e-01
  %9 = tail call float (...) @randnf() #4
  %10 = fpext float %9 to double
  %11 = fmul double %10, 1.000000e-01
  %12 = tail call double @llvm.fmuladd.f64(double %8, double %7, double %11)
  %13 = fptrunc double %12 to float
  %14 = getelementptr inbounds float, ptr %2, i64 %indvars.iv
  store float %13, ptr %14, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 25
  br i1 %exitcond.not, label %15, label %3, !llvm.loop !9

15:                                               ; preds = %3
  %16 = alloca [3 x float], align 16
  %17 = call i32 @polyf_fit(ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 25, ptr noundef nonnull %16, i32 noundef 3) #4
  br label %18

18:                                               ; preds = %15, %18
  %indvars.iv62 = phi i64 [ 0, %15 ], [ %indvars.iv.next63, %18 ]
  %19 = getelementptr inbounds float, ptr %1, i64 %indvars.iv62
  %20 = load float, ptr %19, align 4, !tbaa !5
  %21 = fpext float %20 to double
  %22 = getelementptr inbounds float, ptr %2, i64 %indvars.iv62
  %23 = load float, ptr %22, align 4, !tbaa !5
  %24 = fpext float %23 to double
  %25 = call float @polyf_val(ptr noundef nonnull %16, i32 noundef 3, float noundef %20) #4
  %26 = fpext float %25 to double
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, double noundef %21, double noundef %24, double noundef %26)
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next63, 25
  br i1 %exitcond65.not, label %.preheader55.preheader, label %18, !llvm.loop !11

.preheader55.preheader:                           ; preds = %18
  %28 = load float, ptr %16, align 16, !tbaa !5
  %29 = fpext float %28 to double
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 0, double noundef %29)
  %31 = getelementptr inbounds i8, ptr %16, i64 4
  %32 = load float, ptr %31, align 4, !tbaa !5
  %33 = fpext float %32 to double
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 1, double noundef %33)
  %35 = getelementptr inbounds i8, ptr %16, i64 8
  %36 = load float, ptr %35, align 8, !tbaa !5
  %37 = fpext float %36 to double
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2, double noundef %37)
  %39 = call noalias ptr @fopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3)
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2) #4
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.5) #4
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.6, i32 noundef 25, i32 noundef 2) #4
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.7) #4
  %44 = load float, ptr %1, align 16, !tbaa !5
  %45 = fpext float %44 to double
  %46 = load float, ptr %2, align 16, !tbaa !5
  %47 = fpext float %46 to double
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 1, double noundef %45, i32 noundef 1, double noundef %47) #4
  %49 = getelementptr inbounds i8, ptr %1, i64 4
  %50 = load float, ptr %49, align 4, !tbaa !5
  %51 = fpext float %50 to double
  %52 = getelementptr inbounds i8, ptr %2, i64 4
  %53 = load float, ptr %52, align 4, !tbaa !5
  %54 = fpext float %53 to double
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 2, double noundef %51, i32 noundef 2, double noundef %54) #4
  %56 = getelementptr inbounds i8, ptr %1, i64 8
  %57 = load float, ptr %56, align 8, !tbaa !5
  %58 = fpext float %57 to double
  %59 = getelementptr inbounds i8, ptr %2, i64 8
  %60 = load float, ptr %59, align 8, !tbaa !5
  %61 = fpext float %60 to double
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 3, double noundef %58, i32 noundef 3, double noundef %61) #4
  %63 = getelementptr inbounds i8, ptr %1, i64 12
  %64 = load float, ptr %63, align 4, !tbaa !5
  %65 = fpext float %64 to double
  %66 = getelementptr inbounds i8, ptr %2, i64 12
  %67 = load float, ptr %66, align 4, !tbaa !5
  %68 = fpext float %67 to double
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 4, double noundef %65, i32 noundef 4, double noundef %68) #4
  %70 = getelementptr inbounds i8, ptr %1, i64 16
  %71 = load float, ptr %70, align 16, !tbaa !5
  %72 = fpext float %71 to double
  %73 = getelementptr inbounds i8, ptr %2, i64 16
  %74 = load float, ptr %73, align 16, !tbaa !5
  %75 = fpext float %74 to double
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 5, double noundef %72, i32 noundef 5, double noundef %75) #4
  %77 = getelementptr inbounds i8, ptr %1, i64 20
  %78 = load float, ptr %77, align 4, !tbaa !5
  %79 = fpext float %78 to double
  %80 = getelementptr inbounds i8, ptr %2, i64 20
  %81 = load float, ptr %80, align 4, !tbaa !5
  %82 = fpext float %81 to double
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 6, double noundef %79, i32 noundef 6, double noundef %82) #4
  %84 = getelementptr inbounds i8, ptr %1, i64 24
  %85 = load float, ptr %84, align 8, !tbaa !5
  %86 = fpext float %85 to double
  %87 = getelementptr inbounds i8, ptr %2, i64 24
  %88 = load float, ptr %87, align 8, !tbaa !5
  %89 = fpext float %88 to double
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 7, double noundef %86, i32 noundef 7, double noundef %89) #4
  %91 = getelementptr inbounds i8, ptr %1, i64 28
  %92 = load float, ptr %91, align 4, !tbaa !5
  %93 = fpext float %92 to double
  %94 = getelementptr inbounds i8, ptr %2, i64 28
  %95 = load float, ptr %94, align 4, !tbaa !5
  %96 = fpext float %95 to double
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 8, double noundef %93, i32 noundef 8, double noundef %96) #4
  %98 = getelementptr inbounds i8, ptr %1, i64 32
  %99 = load float, ptr %98, align 16, !tbaa !5
  %100 = fpext float %99 to double
  %101 = getelementptr inbounds i8, ptr %2, i64 32
  %102 = load float, ptr %101, align 16, !tbaa !5
  %103 = fpext float %102 to double
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 9, double noundef %100, i32 noundef 9, double noundef %103) #4
  %105 = getelementptr inbounds i8, ptr %1, i64 36
  %106 = load float, ptr %105, align 4, !tbaa !5
  %107 = fpext float %106 to double
  %108 = getelementptr inbounds i8, ptr %2, i64 36
  %109 = load float, ptr %108, align 4, !tbaa !5
  %110 = fpext float %109 to double
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 10, double noundef %107, i32 noundef 10, double noundef %110) #4
  %112 = getelementptr inbounds i8, ptr %1, i64 40
  %113 = load float, ptr %112, align 8, !tbaa !5
  %114 = fpext float %113 to double
  %115 = getelementptr inbounds i8, ptr %2, i64 40
  %116 = load float, ptr %115, align 8, !tbaa !5
  %117 = fpext float %116 to double
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 11, double noundef %114, i32 noundef 11, double noundef %117) #4
  %119 = getelementptr inbounds i8, ptr %1, i64 44
  %120 = load float, ptr %119, align 4, !tbaa !5
  %121 = fpext float %120 to double
  %122 = getelementptr inbounds i8, ptr %2, i64 44
  %123 = load float, ptr %122, align 4, !tbaa !5
  %124 = fpext float %123 to double
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 12, double noundef %121, i32 noundef 12, double noundef %124) #4
  %126 = getelementptr inbounds i8, ptr %1, i64 48
  %127 = load float, ptr %126, align 16, !tbaa !5
  %128 = fpext float %127 to double
  %129 = getelementptr inbounds i8, ptr %2, i64 48
  %130 = load float, ptr %129, align 16, !tbaa !5
  %131 = fpext float %130 to double
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 13, double noundef %128, i32 noundef 13, double noundef %131) #4
  %133 = getelementptr inbounds i8, ptr %1, i64 52
  %134 = load float, ptr %133, align 4, !tbaa !5
  %135 = fpext float %134 to double
  %136 = getelementptr inbounds i8, ptr %2, i64 52
  %137 = load float, ptr %136, align 4, !tbaa !5
  %138 = fpext float %137 to double
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 14, double noundef %135, i32 noundef 14, double noundef %138) #4
  %140 = getelementptr inbounds i8, ptr %1, i64 56
  %141 = load float, ptr %140, align 8, !tbaa !5
  %142 = fpext float %141 to double
  %143 = getelementptr inbounds i8, ptr %2, i64 56
  %144 = load float, ptr %143, align 8, !tbaa !5
  %145 = fpext float %144 to double
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 15, double noundef %142, i32 noundef 15, double noundef %145) #4
  %147 = getelementptr inbounds i8, ptr %1, i64 60
  %148 = load float, ptr %147, align 4, !tbaa !5
  %149 = fpext float %148 to double
  %150 = getelementptr inbounds i8, ptr %2, i64 60
  %151 = load float, ptr %150, align 4, !tbaa !5
  %152 = fpext float %151 to double
  %153 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 16, double noundef %149, i32 noundef 16, double noundef %152) #4
  %154 = getelementptr inbounds i8, ptr %1, i64 64
  %155 = load float, ptr %154, align 16, !tbaa !5
  %156 = fpext float %155 to double
  %157 = getelementptr inbounds i8, ptr %2, i64 64
  %158 = load float, ptr %157, align 16, !tbaa !5
  %159 = fpext float %158 to double
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 17, double noundef %156, i32 noundef 17, double noundef %159) #4
  %161 = getelementptr inbounds i8, ptr %1, i64 68
  %162 = load float, ptr %161, align 4, !tbaa !5
  %163 = fpext float %162 to double
  %164 = getelementptr inbounds i8, ptr %2, i64 68
  %165 = load float, ptr %164, align 4, !tbaa !5
  %166 = fpext float %165 to double
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 18, double noundef %163, i32 noundef 18, double noundef %166) #4
  %168 = getelementptr inbounds i8, ptr %1, i64 72
  %169 = load float, ptr %168, align 8, !tbaa !5
  %170 = fpext float %169 to double
  %171 = getelementptr inbounds i8, ptr %2, i64 72
  %172 = load float, ptr %171, align 8, !tbaa !5
  %173 = fpext float %172 to double
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 19, double noundef %170, i32 noundef 19, double noundef %173) #4
  %175 = getelementptr inbounds i8, ptr %1, i64 76
  %176 = load float, ptr %175, align 4, !tbaa !5
  %177 = fpext float %176 to double
  %178 = getelementptr inbounds i8, ptr %2, i64 76
  %179 = load float, ptr %178, align 4, !tbaa !5
  %180 = fpext float %179 to double
  %181 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 20, double noundef %177, i32 noundef 20, double noundef %180) #4
  %182 = getelementptr inbounds i8, ptr %1, i64 80
  %183 = load float, ptr %182, align 16, !tbaa !5
  %184 = fpext float %183 to double
  %185 = getelementptr inbounds i8, ptr %2, i64 80
  %186 = load float, ptr %185, align 16, !tbaa !5
  %187 = fpext float %186 to double
  %188 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 21, double noundef %184, i32 noundef 21, double noundef %187) #4
  %189 = getelementptr inbounds i8, ptr %1, i64 84
  %190 = load float, ptr %189, align 4, !tbaa !5
  %191 = fpext float %190 to double
  %192 = getelementptr inbounds i8, ptr %2, i64 84
  %193 = load float, ptr %192, align 4, !tbaa !5
  %194 = fpext float %193 to double
  %195 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 22, double noundef %191, i32 noundef 22, double noundef %194) #4
  %196 = getelementptr inbounds i8, ptr %1, i64 88
  %197 = load float, ptr %196, align 8, !tbaa !5
  %198 = fpext float %197 to double
  %199 = getelementptr inbounds i8, ptr %2, i64 88
  %200 = load float, ptr %199, align 8, !tbaa !5
  %201 = fpext float %200 to double
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 23, double noundef %198, i32 noundef 23, double noundef %201) #4
  %203 = getelementptr inbounds i8, ptr %1, i64 92
  %204 = load float, ptr %203, align 4, !tbaa !5
  %205 = fpext float %204 to double
  %206 = getelementptr inbounds i8, ptr %2, i64 92
  %207 = load float, ptr %206, align 4, !tbaa !5
  %208 = fpext float %207 to double
  %209 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 24, double noundef %205, i32 noundef 24, double noundef %208) #4
  %210 = getelementptr inbounds i8, ptr %1, i64 96
  %211 = load float, ptr %210, align 16, !tbaa !5
  %212 = fpext float %211 to double
  %213 = getelementptr inbounds i8, ptr %2, i64 96
  %214 = load float, ptr %213, align 16, !tbaa !5
  %215 = fpext float %214 to double
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.8, i32 noundef 25, double noundef %212, i32 noundef 25, double noundef %215) #4
  %217 = load float, ptr %35, align 8, !tbaa !5
  %218 = fpext float %217 to double
  %219 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.9, i32 noundef 1, double noundef %218) #4
  %220 = load float, ptr %31, align 4, !tbaa !5
  %221 = fpext float %220 to double
  %222 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.9, i32 noundef 2, double noundef %221) #4
  %223 = load float, ptr %16, align 16, !tbaa !5
  %224 = fpext float %223 to double
  %225 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.9, i32 noundef 3, double noundef %224) #4
  %226 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.10) #4
  %227 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.11) #4
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.12) #4
  %229 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.13) #4
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.14, i32 noundef 2) #4
  %231 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.15) #4
  %232 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.16) #4
  %233 = call i32 @fclose(ptr noundef %39)
  %234 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef nonnull @.str.2)
  %235 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  ret i32 0
}

declare float @randf(...) local_unnamed_addr #1

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

declare float @randnf(...) 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 i32 @polyf_fit(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare float @polyf_val(ptr noundef, i32 noundef, float noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 }

!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}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass