; LLVM IR from jgaeddert/liquid-dsp :: examples (fskmodem_waterfall_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.7 = external hidden unnamed_addr constant [10 x i8], align 1
@optarg = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca float, 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 i32, align 4
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 400, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store float 3.000000e+01, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store float 0x3FB99999A0000000, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  br label %28

28:                                               ; preds = %51, %2
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = call i32 @getopt(i32 noundef %29, ptr noundef %30, ptr noundef @.str.7) #7
  store i32 %31, ptr %10, align 4, !tbaa !5
  %32 = icmp ne i32 %31, -1
  br i1 %32, label %33, label %52

33:                                               ; preds = %28
  %34 = load i32, ptr %10, align 4, !tbaa !5
  switch i32 %34, label %50 [
    i32 104, label %35
    i32 109, label %36
    i32 98, label %39
    i32 110, label %43
    i32 115, label %46
  ]

35:                                               ; preds = %33
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %184

36:                                               ; preds = %33
  %37 = load ptr, ptr @optarg, align 8, !tbaa !9
  %38 = call i32 @atoi(ptr noundef %37) #8
  store i32 %38, ptr %6, align 4, !tbaa !5
  br label %51

39:                                               ; preds = %33
  %40 = load ptr, ptr @optarg, align 8, !tbaa !9
  %41 = call double @atof(ptr noundef %40) #8
  %42 = fptrunc double %41 to float
  store float %42, ptr %9, align 4, !tbaa !11
  br label %51

43:                                               ; preds = %33
  %44 = load ptr, ptr @optarg, align 8, !tbaa !9
  %45 = call i32 @atoi(ptr noundef %44) #8
  store i32 %45, ptr %7, align 4, !tbaa !5
  br label %51

46:                                               ; preds = %33
  %47 = load ptr, ptr @optarg, align 8, !tbaa !9
  %48 = call double @atof(ptr noundef %47) #8
  %49 = fptrunc double %48 to float
  store float %49, ptr %8, align 4, !tbaa !11
  br label %51

50:                                               ; preds = %33
  call void @exit(i32 noundef 1) #9
  unreachable

51:                                               ; preds = %46, %43, %39, %36
  br label %28, !llvm.loop !13

52:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = shl i32 1, %53
  store i32 %54, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %55 = load i32, ptr %14, align 4, !tbaa !5
  %56 = mul i32 500, %55
  store i32 %56, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %57 = load float, ptr %8, align 4, !tbaa !11
  %58 = fneg float %57
  %59 = fdiv float %58, 2.000000e+01
  %60 = call float @powf(float noundef 1.000000e+01, float noundef %59) #7
  store float %60, ptr %16, align 4, !tbaa !11
  %61 = load i32, ptr %15, align 4, !tbaa !5
  %62 = load i32, ptr %14, align 4, !tbaa !5
  %63 = icmp ult i32 %61, %62
  br i1 %63, label %64, label %68

64:                                               ; preds = %52
  %65 = load ptr, ptr @stderr, align 8, !tbaa !9
  %66 = load i32, ptr %14, align 4, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.8, ptr noundef @.str.9, i32 noundef %66) #7
  call void @exit(i32 noundef 1) #9
  unreachable

68:                                               ; preds = %52
  %69 = load i32, ptr %15, align 4, !tbaa !5
  %70 = icmp ugt i32 %69, 2048
  br i1 %70, label %71, label %74

71:                                               ; preds = %68
  %72 = load ptr, ptr @stderr, align 8, !tbaa !9
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.10, ptr noundef @.str.9) #7
  call void @exit(i32 noundef 1) #9
  unreachable

74:                                               ; preds = %68
  %75 = load i32, ptr %14, align 4, !tbaa !5
  %76 = icmp ugt i32 %75, 1024
  br i1 %76, label %77, label %81

77:                                               ; preds = %74
  %78 = load ptr, ptr @stderr, align 8, !tbaa !9
  %79 = load i32, ptr %14, align 4, !tbaa !5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef @.str.11, ptr noundef @.str.9, i32 noundef %79) #7
  call void @exit(i32 noundef 1) #9
  unreachable

81:                                               ; preds = %74
  %82 = load float, ptr %9, align 4, !tbaa !11
  %83 = fcmp ole float %82, 0.000000e+00
  br i1 %83, label %87, label %84

84:                                               ; preds = %81
  %85 = load float, ptr %9, align 4, !tbaa !11
  %86 = fcmp oge float %85, 5.000000e-01
  br i1 %86, label %87, label %90

87:                                               ; preds = %84, %81
  %88 = load ptr, ptr @stderr, align 8, !tbaa !9
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.12, ptr noundef @.str.9) #7
  call void @exit(i32 noundef 1) #9
  unreachable

90:                                               ; preds = %84
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %94 = load i32, ptr %15, align 4, !tbaa !5
  %95 = call i32 @liquid_nextpow2(i32 noundef %94)
  %96 = shl i32 1, %95
  store i32 %96, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %97 = load i32, ptr %17, align 4, !tbaa !5
  %98 = udiv i32 %97, 2
  store i32 %98, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %99 = load i32, ptr %17, align 4, !tbaa !5
  %100 = udiv i32 %99, 2
  store i32 %100, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 512, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %101 = load i32, ptr %17, align 4, !tbaa !5
  %102 = load i32, ptr %18, align 4, !tbaa !5
  %103 = load i32, ptr %19, align 4, !tbaa !5
  %104 = load i32, ptr %20, align 4, !tbaa !5
  %105 = load i32, ptr %21, align 4, !tbaa !5
  %106 = call ptr @spwaterfallcf_create(i32 noundef %101, i32 noundef %102, i32 noundef %103, i32 noundef %104, i32 noundef %105)
  store ptr %106, ptr %22, align 8, !tbaa !9
  %107 = load ptr, ptr %22, align 8, !tbaa !9
  %108 = call i32 @spwaterfallcf_print(ptr noundef %107)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = load i32, ptr %15, align 4, !tbaa !5
  %111 = load float, ptr %9, align 4, !tbaa !11
  %112 = call ptr @fskmod_create(i32 noundef %109, i32 noundef %110, float noundef %111)
  store ptr %112, ptr %23, align 8, !tbaa !9
  %113 = load i32, ptr %15, align 4, !tbaa !5
  %114 = zext i32 %113 to i64
  %115 = call ptr @llvm.stacksave.p0()
  store ptr %115, ptr %24, align 8
  %116 = alloca { float, float }, i64 %114, align 16
  store i64 %114, ptr %25, align 8
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = zext i32 %117 to i64
  %119 = alloca { float, float }, i64 %118, align 16
  store i64 %118, ptr %26, align 8
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %173, %93
  %121 = load i32, ptr %12, align 4, !tbaa !5
  %122 = load i32, ptr %7, align 4, !tbaa !5
  %123 = icmp ult i32 %121, %122
  br i1 %123, label %124, label %176

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %125 = call i32 @rand() #7
  %126 = load i32, ptr %14, align 4, !tbaa !5
  %127 = urem i32 %125, %126
  store i32 %127, ptr %27, align 4, !tbaa !5
  %128 = load ptr, ptr %23, align 8, !tbaa !9
  %129 = load i32, ptr %27, align 4, !tbaa !5
  %130 = call i32 @fskmod_modulate(ptr noundef %128, i32 noundef %129, ptr noundef %116)
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %166, %124
  %132 = load i32, ptr %13, align 4, !tbaa !5
  %133 = load i32, ptr %15, align 4, !tbaa !5
  %134 = icmp ult i32 %132, %133
  br i1 %134, label %135, label %169

135:                                              ; preds = %131
  %136 = load i32, ptr %13, align 4, !tbaa !5
  %137 = zext i32 %136 to i64
  %138 = getelementptr inbounds { float, float }, ptr %116, i64 %137
  %139 = getelementptr inbounds { float, float }, ptr %138, i32 0, i32 0
  %140 = load float, ptr %139, align 8
  %141 = getelementptr inbounds { float, float }, ptr %138, i32 0, i32 1
  %142 = load float, ptr %141, align 4
  %143 = fpext float %140 to double
  %144 = fpext float %142 to double
  %145 = load float, ptr %16, align 4, !tbaa !11
  %146 = call float (...) @randnf()
  %147 = call float (...) @randnf()
  %148 = fmul float 0.000000e+00, %147
  %149 = fmul float 1.000000e+00, %147
  %150 = fadd float %146, %148
  %151 = fmul float %145, %150
  %152 = fmul float %145, %149
  %153 = fpext float %151 to double
  %154 = fpext float %152 to double
  %155 = fmul double %153, 0x3FE6A09E667F3BCD
  %156 = fmul double %154, 0x3FE6A09E667F3BCD
  %157 = fadd double %143, %155
  %158 = fadd double %144, %156
  %159 = fptrunc double %157 to float
  %160 = fptrunc double %158 to float
  %161 = load i32, ptr %13, align 4, !tbaa !5
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds { float, float }, ptr %119, i64 %162
  %164 = getelementptr inbounds { float, float }, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds { float, float }, ptr %163, i32 0, i32 1
  store float %159, ptr %164, align 8
  store float %160, ptr %165, align 4
  br label %166

166:                                              ; preds = %135
  %167 = load i32, ptr %13, align 4, !tbaa !5
  %168 = add i32 %167, 1
  store i32 %168, ptr %13, align 4, !tbaa !5
  br label %131, !llvm.loop !15

169:                                              ; preds = %131
  %170 = load ptr, ptr %22, align 8, !tbaa !9
  %171 = load i32, ptr %15, align 4, !tbaa !5
  %172 = call i32 @spwaterfallcf_write(ptr noundef %170, ptr noundef %119, i32 noundef %171)
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %173

173:                                              ; preds = %169
  %174 = load i32, ptr %12, align 4, !tbaa !5
  %175 = add i32 %174, 1
  store i32 %175, ptr %12, align 4, !tbaa !5
  br label %120, !llvm.loop !16

176:                                              ; preds = %120
  %177 = load ptr, ptr %22, align 8, !tbaa !9
  %178 = call i32 @spwaterfallcf_export(ptr noundef %177, ptr noundef @.str.13)
  %179 = load ptr, ptr %22, align 8, !tbaa !9
  %180 = call i32 @spwaterfallcf_print(ptr noundef %179)
  %181 = load ptr, ptr %23, align 8, !tbaa !9
  %182 = call i32 @fskmod_destroy(ptr noundef %181)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  %183 = load ptr, ptr %24, align 8
  call void @llvm.stackrestore.p0(ptr %183)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %184

184:                                              ; preds = %176, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %185 = load i32, ptr %3, align 4
  ret i32 %185
}

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: nounwind
declare float @powf(float noundef, float noundef) #2

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

declare i32 @liquid_nextpow2(i32 noundef) #5

declare ptr @spwaterfallcf_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #5

declare i32 @spwaterfallcf_print(ptr noundef) #5

declare ptr @fskmod_create(i32 noundef, i32 noundef, float noundef) #5

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

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

declare i32 @fskmod_modulate(ptr noundef, i32 noundef, ptr noundef) #5

declare float @randnf(...) #5

declare i32 @spwaterfallcf_write(ptr noundef, ptr noundef, i32 noundef) #5

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

declare i32 @spwaterfallcf_export(ptr noundef, ptr noundef) #5

declare i32 @fskmod_destroy(ptr noundef) #5

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

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 = { 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 = { inlinehint nounwind willreturn memory(read) 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 #4 = { noreturn 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 = { "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 = { nocallback nofree nosync nounwind willreturn }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn 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}
!16 = distinct !{!16, !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.7 = external hidden unnamed_addr constant [10 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  br label %.outer

.outer:                                           ; preds = %9, %2
  %.052.ph = phi float [ %12, %9 ], [ 0x3FB99999A0000000, %2 ]
  %.050.ph = phi float [ %.050.ph100, %9 ], [ 3.000000e+01, %2 ]
  %.048.ph = phi i32 [ %.048.ph104, %9 ], [ 400, %2 ]
  %.047.ph = phi i32 [ %.047, %9 ], [ 2, %2 ]
  br label %.outer99

.outer99:                                         ; preds = %.outer, %16
  %.050.ph100 = phi float [ %.050.ph, %.outer ], [ %19, %16 ]
  %.048.ph101 = phi i32 [ %.048.ph, %.outer ], [ %.048.ph104, %16 ]
  %.047.ph102 = phi i32 [ %.047.ph, %.outer ], [ %.047, %16 ]
  br label %.outer103

.outer103:                                        ; preds = %.outer99, %13
  %.048.ph104 = phi i32 [ %.048.ph101, %.outer99 ], [ %15, %13 ]
  %.047.ph105 = phi i32 [ %.047.ph102, %.outer99 ], [ %.047, %13 ]
  br label %3

3:                                                ; preds = %.outer103, %6
  %.047 = phi i32 [ %8, %6 ], [ %.047.ph105, %.outer103 ]
  %4 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.7) #9
  switch i32 %4, label %20 [
    i32 -1, label %21
    i32 104, label %5
    i32 109, label %6
    i32 98, label %9
    i32 110, label %13
    i32 115, label %16
  ]

5:                                                ; preds = %3
  tail call void @usage()
  br label %84

6:                                                ; preds = %3
  %7 = load ptr, ptr @optarg, align 8, !tbaa !5
  %8 = tail call i32 @atoi(ptr nocapture noundef %7) #10
  br label %3, !llvm.loop !9

9:                                                ; preds = %3
  %10 = load ptr, ptr @optarg, align 8, !tbaa !5
  %11 = tail call double @atof(ptr noundef %10) #10
  %12 = fptrunc double %11 to float
  br label %.outer, !llvm.loop !9

13:                                               ; preds = %3
  %14 = load ptr, ptr @optarg, align 8, !tbaa !5
  %15 = tail call i32 @atoi(ptr nocapture noundef %14) #10
  br label %.outer103, !llvm.loop !9

16:                                               ; preds = %3
  %17 = load ptr, ptr @optarg, align 8, !tbaa !5
  %18 = tail call double @atof(ptr noundef %17) #10
  %19 = fptrunc double %18 to float
  br label %.outer99, !llvm.loop !9

20:                                               ; preds = %3
  tail call void @exit(i32 noundef 1) #11
  unreachable

21:                                               ; preds = %3
  %22 = shl nuw i32 1, %.047
  %23 = shl i32 500, %.047
  %24 = fdiv float %.050.ph100, -2.000000e+01
  %25 = tail call float @powf(float noundef 1.000000e+01, float noundef %24) #9
  %26 = icmp ult i32 %23, %22
  br i1 %26, label %27, label %30

27:                                               ; preds = %21
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, i32 noundef %22) #12
  tail call void @exit(i32 noundef 1) #11
  unreachable

30:                                               ; preds = %21
  %31 = icmp ugt i32 %23, 2048
  br i1 %31, label %32, label %35

32:                                               ; preds = %30
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.9) #12
  tail call void @exit(i32 noundef 1) #11
  unreachable

35:                                               ; preds = %30
  %36 = icmp ugt i32 %.047, 10
  br i1 %36, label %37, label %40

37:                                               ; preds = %35
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.9, i32 noundef %22) #12
  tail call void @exit(i32 noundef 1) #11
  unreachable

40:                                               ; preds = %35
  %41 = fcmp ole float %.052.ph, 0.000000e+00
  %42 = fcmp oge float %.052.ph, 5.000000e-01
  %or.cond = or i1 %41, %42
  br i1 %or.cond, label %43, label %46

43:                                               ; preds = %40
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  %45 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.9) #12
  tail call void @exit(i32 noundef 1) #11
  unreachable

46:                                               ; preds = %40
  %47 = tail call i32 @liquid_nextpow2(i32 noundef %23) #9
  %48 = shl nuw i32 1, %47
  %49 = lshr i32 %48, 1
  %50 = tail call ptr @spwaterfallcf_create(i32 noundef %48, i32 noundef 1, i32 noundef %49, i32 noundef %49, i32 noundef 512) #9
  %51 = tail call i32 @spwaterfallcf_print(ptr noundef %50) #9
  %52 = tail call ptr @fskmod_create(i32 noundef %.047, i32 noundef %23, float noundef %.052.ph) #9
  %53 = zext nneg i32 %23 to i64
  %54 = tail call ptr @llvm.stacksave.p0()
  %55 = alloca { float, float }, i64 %53, align 16
  %56 = alloca { float, float }, i64 %53, align 16
  %.not = icmp eq i32 %.048.ph104, 0
  br i1 %.not, label %._crit_edge71, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %46
  %57 = add nsw i32 %22, -1
  %umax = tail call i32 @llvm.umax.i32(i32 %23, i32 1)
  %wide.trip.count = zext nneg i32 %umax to i64
  %58 = insertelement <2 x float> poison, float %25, i64 0
  %59 = shufflevector <2 x float> %58, <2 x float> poison, <2 x i32> zeroinitializer
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %.05468.us = phi i32 [ %80, %._crit_edge.us ], [ 0, %.lr.ph.us.preheader ]
  %60 = call i32 @rand() #9
  %61 = and i32 %60, %57
  %62 = call i32 @fskmod_modulate(ptr noundef %52, i32 noundef %61, ptr noundef nonnull %55) #9
  br label %63

63:                                               ; preds = %.lr.ph.us, %63
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %63 ]
  %64 = getelementptr inbounds { float, float }, ptr %55, i64 %indvars.iv
  %65 = getelementptr inbounds { float, float }, ptr %56, i64 %indvars.iv
  %66 = load <2 x float>, ptr %64, align 8
  %67 = fpext <2 x float> %66 to <2 x double>
  %68 = call float (...) @randnf() #9
  %69 = call float (...) @randnf() #9
  %70 = fmul float %69, 0.000000e+00
  %71 = fadd float %68, %70
  %72 = insertelement <2 x float> poison, float %71, i64 0
  %73 = insertelement <2 x float> %72, float %69, i64 1
  %74 = fmul <2 x float> %59, %73
  %75 = fpext <2 x float> %74 to <2 x double>
  %76 = fmul <2 x double> %75, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %77 = fadd <2 x double> %76, %67
  %78 = fptrunc <2 x double> %77 to <2 x float>
  store <2 x float> %78, ptr %65, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %63, !llvm.loop !11

._crit_edge.us:                                   ; preds = %63
  %79 = call i32 @spwaterfallcf_write(ptr noundef %50, ptr noundef nonnull %56, i32 noundef %23) #9
  %80 = add nuw i32 %.05468.us, 1
  %exitcond82.not = icmp eq i32 %80, %.048.ph104
  br i1 %exitcond82.not, label %._crit_edge71, label %.lr.ph.us, !llvm.loop !12

._crit_edge71:                                    ; preds = %._crit_edge.us, %46
  %81 = call i32 @spwaterfallcf_export(ptr noundef %50, ptr noundef nonnull @.str.13) #9
  %82 = call i32 @spwaterfallcf_print(ptr noundef %50) #9
  %83 = call i32 @fskmod_destroy(ptr noundef %52) #9
  call void @llvm.stackrestore.p0(ptr %54)
  br label %84

84:                                               ; preds = %._crit_edge71, %5
  ret i32 0
}

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @powf(float noundef, float noundef) local_unnamed_addr #4

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

declare i32 @liquid_nextpow2(i32 noundef) local_unnamed_addr #6

declare ptr @spwaterfallcf_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

declare i32 @spwaterfallcf_print(ptr noundef) local_unnamed_addr #6

declare ptr @fskmod_create(i32 noundef, i32 noundef, float noundef) local_unnamed_addr #6

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

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

declare i32 @fskmod_modulate(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

declare float @randnf(...) local_unnamed_addr #6

declare i32 @spwaterfallcf_write(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

declare i32 @spwaterfallcf_export(ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @fskmod_destroy(ptr noundef) local_unnamed_addr #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #8

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 = { 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 #2 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { noreturn 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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { noreturn nounwind }
attributes #12 = { cold 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 = !{!"any pointer", !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, !10}


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