; LLVM IR from jgaeddert/liquid-dsp :: examples (dsssframesync_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"

%struct.dsssframegenprops_s = type { i32, i32, i32 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@optarg = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #2 {
  %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 i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca %struct.dsssframegenprops_s, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i32, align 4
  %27 = alloca float, align 4
  %28 = alloca { float, float }, align 4
  %29 = alloca { float, float }, align 4
  %30 = alloca { float, float }, 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
  %31 = call i64 @time(ptr noundef null) #8
  %32 = trunc i64 %31 to i32
  call void @srand(i32 noundef %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 6, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 20, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store float -6.000000e+01, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store float -3.000000e+00, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store float 0x3F9EB851E0000000, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  br label %33

33:                                               ; preds = %64, %2
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = load ptr, ptr %5, align 8, !tbaa !9
  %36 = call i32 @getopt(i32 noundef %34, ptr noundef %35, ptr noundef @.str.9) #8
  store i32 %36, ptr %14, align 4, !tbaa !5
  %37 = icmp ne i32 %36, -1
  br i1 %37, label %38, label %65

38:                                               ; preds = %33
  %39 = load i32, ptr %14, align 4, !tbaa !5
  switch i32 %39, label %63 [
    i32 117, label %40
    i32 104, label %40
    i32 115, label %41
    i32 70, label %45
    i32 110, label %49
    i32 118, label %53
    i32 99, label %56
    i32 107, label %59
    i32 100, label %62
  ]

40:                                               ; preds = %38, %38
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %203

41:                                               ; preds = %38
  %42 = load ptr, ptr @optarg, align 8, !tbaa !9
  %43 = call double @atof(ptr noundef %42) #9
  %44 = fptrunc double %43 to float
  store float %44, ptr %12, align 4, !tbaa !11
  br label %64

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

49:                                               ; preds = %38
  %50 = load ptr, ptr @optarg, align 8, !tbaa !9
  %51 = call i64 @atol(ptr noundef %50) #9
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %9, align 4, !tbaa !5
  br label %64

53:                                               ; preds = %38
  %54 = load ptr, ptr @optarg, align 8, !tbaa !9
  %55 = call i32 @liquid_getopt_str2crc(ptr noundef %54)
  store i32 %55, ptr %6, align 4, !tbaa !5
  br label %64

56:                                               ; preds = %38
  %57 = load ptr, ptr @optarg, align 8, !tbaa !9
  %58 = call i32 @liquid_getopt_str2fec(ptr noundef %57)
  store i32 %58, ptr %7, align 4, !tbaa !5
  br label %64

59:                                               ; preds = %38
  %60 = load ptr, ptr @optarg, align 8, !tbaa !9
  %61 = call i32 @liquid_getopt_str2fec(ptr noundef %60)
  store i32 %61, ptr %8, align 4, !tbaa !5
  br label %64

62:                                               ; preds = %38
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %64

63:                                               ; preds = %38
  call void @exit(i32 noundef -1) #10
  unreachable

64:                                               ; preds = %62, %59, %56, %53, %49, %45, %41
  br label %33, !llvm.loop !13

65:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %66 = load float, ptr %11, align 4, !tbaa !11
  %67 = fdiv float %66, 2.000000e+01
  %68 = call float @powf(float noundef 1.000000e+01, float noundef %67) #8
  store float %68, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %69 = load float, ptr %12, align 4, !tbaa !11
  %70 = load float, ptr %11, align 4, !tbaa !11
  %71 = fadd float %69, %70
  %72 = fdiv float %71, 2.000000e+01
  %73 = call float @powf(float noundef 1.000000e+01, float noundef %72) #8
  store float %73, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #8
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = getelementptr inbounds %struct.dsssframegenprops_s, ptr %19, i32 0, i32 0
  store i32 %74, ptr %75, align 4, !tbaa !15
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = getelementptr inbounds %struct.dsssframegenprops_s, ptr %19, i32 0, i32 1
  store i32 %76, ptr %77, align 4, !tbaa !17
  %78 = load i32, ptr %8, align 4, !tbaa !5
  %79 = getelementptr inbounds %struct.dsssframegenprops_s, ptr %19, i32 0, i32 2
  store i32 %78, ptr %79, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %80 = call ptr @dsssframegen_create(ptr noundef %19)
  store ptr %80, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %81 = call ptr @dsssframesync_create(ptr noundef @callback, ptr noundef null)
  store ptr %81, ptr %21, align 8, !tbaa !9
  %82 = load i32, ptr %10, align 4, !tbaa !5
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %85

84:                                               ; preds = %65
  br label %85

85:                                               ; preds = %84, %65
  %86 = load ptr, ptr %20, align 8, !tbaa !9
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = call i32 @dsssframegen_assemble(ptr noundef %86, ptr noundef null, ptr noundef null, i32 noundef %87)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 256, ptr %22, align 4, !tbaa !5
  %89 = load i32, ptr %22, align 4, !tbaa !5
  %90 = zext i32 %89 to i64
  %91 = call ptr @llvm.stacksave.p0()
  store ptr %91, ptr %23, align 8
  %92 = alloca { float, float }, i64 %90, align 16
  store i64 %90, ptr %24, align 8
  %93 = load i32, ptr %22, align 4, !tbaa !5
  %94 = zext i32 %93 to i64
  %95 = alloca { float, float }, i64 %94, align 16
  store i64 %94, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store float 0.000000e+00, ptr %27, align 4, !tbaa !11
  br label %96

96:                                               ; preds = %186, %85
  %97 = load i32, ptr %26, align 4, !tbaa !5
  %98 = icmp ne i32 %97, 0
  %99 = xor i1 %98, true
  br i1 %99, label %100, label %190

100:                                              ; preds = %96
  %101 = load ptr, ptr %20, align 8, !tbaa !9
  %102 = load i32, ptr %22, align 4, !tbaa !5
  %103 = call i32 @dsssframegen_write_samples(ptr noundef %101, ptr noundef %92, i32 noundef %102)
  store i32 %103, ptr %26, align 4, !tbaa !5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %183, %100
  %105 = load i32, ptr %16, align 4, !tbaa !5
  %106 = load i32, ptr %22, align 4, !tbaa !5
  %107 = icmp ult i32 %105, %106
  br i1 %107, label %108, label %186

108:                                              ; preds = %104
  %109 = load float, ptr %18, align 4, !tbaa !11
  %110 = load i32, ptr %16, align 4, !tbaa !5
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds { float, float }, ptr %92, i64 %111
  %113 = getelementptr inbounds { float, float }, ptr %112, i32 0, i32 0
  %114 = load float, ptr %113, align 8
  %115 = getelementptr inbounds { float, float }, ptr %112, i32 0, i32 1
  %116 = load float, ptr %115, align 4
  %117 = fmul float %109, %114
  %118 = fmul float %109, %116
  %119 = load float, ptr %27, align 4, !tbaa !11
  %120 = fmul float 0.000000e+00, %119
  %121 = fmul float 1.000000e+00, %119
  %122 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 0
  %123 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 1
  store float %120, ptr %122, align 4
  store float %121, ptr %123, align 4
  %124 = load <2 x float>, ptr %28, align 4
  %125 = call <2 x float> @cexpf(<2 x float> noundef %124) #8
  store <2 x float> %125, ptr %29, align 4
  %126 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 0
  %127 = load float, ptr %126, align 4
  %128 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 1
  %129 = load float, ptr %128, align 4
  %130 = fmul float %117, %127
  %131 = fmul float %118, %129
  %132 = fmul float %117, %129
  %133 = fmul float %118, %127
  %134 = fsub float %130, %131
  %135 = fadd float %132, %133
  %136 = fcmp uno float %134, %134
  br i1 %136, label %137, label %145, !prof !19

137:                                              ; preds = %108
  %138 = fcmp uno float %135, %135
  br i1 %138, label %139, label %145, !prof !19

139:                                              ; preds = %137
  %140 = call <2 x float> @__mulsc3(float noundef %117, float noundef %118, float noundef %127, float noundef %129) #8
  store <2 x float> %140, ptr %30, align 4
  %141 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 0
  %142 = load float, ptr %141, align 4
  %143 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 1
  %144 = load float, ptr %143, align 4
  br label %145

145:                                              ; preds = %139, %137, %108
  %146 = phi float [ %134, %108 ], [ %134, %137 ], [ %142, %139 ]
  %147 = phi float [ %135, %108 ], [ %135, %137 ], [ %144, %139 ]
  %148 = load i32, ptr %16, align 4, !tbaa !5
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds { float, float }, ptr %95, i64 %149
  %151 = getelementptr inbounds { float, float }, ptr %150, i32 0, i32 0
  %152 = getelementptr inbounds { float, float }, ptr %150, i32 0, i32 1
  store float %146, ptr %151, align 8
  store float %147, ptr %152, align 4
  %153 = load float, ptr %13, align 4, !tbaa !11
  %154 = load float, ptr %27, align 4, !tbaa !11
  %155 = fadd float %154, %153
  store float %155, ptr %27, align 4, !tbaa !11
  %156 = load float, ptr %17, align 4, !tbaa !11
  %157 = call float (...) @randnf()
  %158 = call float (...) @randnf()
  %159 = fmul float 0.000000e+00, %158
  %160 = fmul float 1.000000e+00, %158
  %161 = fadd float %157, %159
  %162 = fmul float %156, %161
  %163 = fmul float %156, %160
  %164 = fpext float %162 to double
  %165 = fpext float %163 to double
  %166 = fmul double %164, 0x3FE6A09E667F3BCD
  %167 = fmul double %165, 0x3FE6A09E667F3BCD
  %168 = load i32, ptr %16, align 4, !tbaa !5
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds { float, float }, ptr %95, i64 %169
  %171 = getelementptr inbounds { float, float }, ptr %170, i32 0, i32 0
  %172 = load float, ptr %171, align 8
  %173 = getelementptr inbounds { float, float }, ptr %170, i32 0, i32 1
  %174 = load float, ptr %173, align 4
  %175 = fpext float %172 to double
  %176 = fpext float %174 to double
  %177 = fadd double %175, %166
  %178 = fadd double %176, %167
  %179 = fptrunc double %177 to float
  %180 = fptrunc double %178 to float
  %181 = getelementptr inbounds { float, float }, ptr %170, i32 0, i32 0
  %182 = getelementptr inbounds { float, float }, ptr %170, i32 0, i32 1
  store float %179, ptr %181, align 8
  store float %180, ptr %182, align 4
  br label %183

183:                                              ; preds = %145
  %184 = load i32, ptr %16, align 4, !tbaa !5
  %185 = add i32 %184, 1
  store i32 %185, ptr %16, align 4, !tbaa !5
  br label %104, !llvm.loop !20

186:                                              ; preds = %104
  %187 = load ptr, ptr %21, align 8, !tbaa !9
  %188 = load i32, ptr %22, align 4, !tbaa !5
  %189 = call i32 @dsssframesync_execute(ptr noundef %187, ptr noundef %95, i32 noundef %188)
  br label %96, !llvm.loop !21

190:                                              ; preds = %96
  %191 = load ptr, ptr %21, align 8, !tbaa !9
  %192 = call i32 @dsssframesync_print(ptr noundef %191)
  %193 = load i32, ptr %10, align 4, !tbaa !5
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %196

195:                                              ; preds = %190
  br label %196

196:                                              ; preds = %195, %190
  %197 = load ptr, ptr %20, align 8, !tbaa !9
  %198 = call i32 @dsssframegen_destroy(ptr noundef %197)
  %199 = load ptr, ptr %21, align 8, !tbaa !9
  %200 = call i32 @dsssframesync_destroy(ptr noundef %199)
  %201 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  %202 = load ptr, ptr %23, align 8
  call void @llvm.stackrestore.p0(ptr %202)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %203

203:                                              ; preds = %196, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %204 = load i32, ptr %3, align 4
  ret i32 %204
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #3

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

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

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr noundef nonnull) #5

declare i32 @liquid_getopt_str2crc(ptr noundef) #1

declare i32 @liquid_getopt_str2fec(ptr noundef) #1

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

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

declare ptr @dsssframegen_create(ptr noundef) #1

declare ptr @dsssframesync_create(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @callback(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #0

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

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

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) #3

declare <2 x float> @__mulsc3(float, float, float, float)

declare float @randnf(...) #1

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

declare i32 @dsssframesync_print(ptr noundef) #1

declare i32 @dsssframegen_destroy(ptr noundef) #1

declare i32 @dsssframesync_destroy(ptr noundef) #1

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

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

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 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { nocallback nofree nosync nounwind willreturn }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { 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 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8}
!17 = !{!16, !6, i64 4}
!18 = !{!16, !6, i64 8}
!19 = !{!"branch_weights", i32 1, i32 1048575}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !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"

%struct.dsssframegenprops_s = type { i32, i32, i32 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca %struct.dsssframegenprops_s, align 4
  %4 = tail call i64 @time(ptr noundef null) #10
  %5 = trunc i64 %4 to i32
  tail call void @srand(i32 noundef %5) #10
  br label %.outer

.outer:                                           ; preds = %13, %2
  %.052.ph = phi float [ %16, %13 ], [ 0x3F9EB851E0000000, %2 ]
  %.050.ph = phi float [ %.050.ph110, %13 ], [ -3.000000e+00, %2 ]
  %.046.ph = phi i32 [ %.046.ph116, %13 ], [ 20, %2 ]
  %.044.ph = phi i32 [ %.044.ph121, %13 ], [ 1, %2 ]
  %.042.ph = phi i32 [ %.042.ph125, %13 ], [ 1, %2 ]
  %.038.ph = phi i32 [ %.038.ph128, %13 ], [ 6, %2 ]
  br label %.outer109

.outer109:                                        ; preds = %.outer, %9
  %.050.ph110 = phi float [ %.050.ph, %.outer ], [ %12, %9 ]
  %.046.ph111 = phi i32 [ %.046.ph, %.outer ], [ %.046.ph116, %9 ]
  %.044.ph112 = phi i32 [ %.044.ph, %.outer ], [ %.044.ph121, %9 ]
  %.042.ph113 = phi i32 [ %.042.ph, %.outer ], [ %.042.ph125, %9 ]
  %.038.ph114 = phi i32 [ %.038.ph, %.outer ], [ %.038.ph128, %9 ]
  br label %.outer115

.outer115:                                        ; preds = %.outer109, %17
  %.046.ph116 = phi i32 [ %.046.ph111, %.outer109 ], [ %20, %17 ]
  %.044.ph117 = phi i32 [ %.044.ph112, %.outer109 ], [ %.044.ph121, %17 ]
  %.042.ph118 = phi i32 [ %.042.ph113, %.outer109 ], [ %.042.ph125, %17 ]
  %.038.ph119 = phi i32 [ %.038.ph114, %.outer109 ], [ %.038.ph128, %17 ]
  br label %.outer120

.outer120:                                        ; preds = %.outer115, %27
  %.044.ph121 = phi i32 [ %.044.ph117, %.outer115 ], [ %29, %27 ]
  %.042.ph122 = phi i32 [ %.042.ph118, %.outer115 ], [ %.042.ph125, %27 ]
  %.038.ph123 = phi i32 [ %.038.ph119, %.outer115 ], [ %.038.ph128, %27 ]
  br label %.outer124

.outer124:                                        ; preds = %.outer120, %24
  %.042.ph125 = phi i32 [ %.042.ph122, %.outer120 ], [ %26, %24 ]
  %.038.ph126 = phi i32 [ %.038.ph123, %.outer120 ], [ %.038.ph128, %24 ]
  br label %.outer127

.outer127:                                        ; preds = %.outer124, %21
  %.038.ph128 = phi i32 [ %.038.ph126, %.outer124 ], [ %23, %21 ]
  br label %6

6:                                                ; preds = %.outer127, %6
  %7 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.9) #10
  switch i32 %7, label %30 [
    i32 -1, label %31
    i32 117, label %8
    i32 104, label %8
    i32 115, label %9
    i32 70, label %13
    i32 110, label %17
    i32 118, label %21
    i32 99, label %24
    i32 107, label %27
    i32 100, label %6
  ], !llvm.loop !5

8:                                                ; preds = %6, %6
  tail call void @usage()
  br label %95

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

13:                                               ; preds = %6
  %14 = load ptr, ptr @optarg, align 8, !tbaa !7
  %15 = tail call double @atof(ptr noundef %14) #11
  %16 = fptrunc double %15 to float
  br label %.outer, !llvm.loop !5

17:                                               ; preds = %6
  %18 = load ptr, ptr @optarg, align 8, !tbaa !7
  %19 = tail call i64 @atol(ptr nocapture noundef %18) #11
  %20 = trunc i64 %19 to i32
  br label %.outer115, !llvm.loop !5

21:                                               ; preds = %6
  %22 = load ptr, ptr @optarg, align 8, !tbaa !7
  %23 = tail call i32 @liquid_getopt_str2crc(ptr noundef %22) #10
  br label %.outer127, !llvm.loop !5

24:                                               ; preds = %6
  %25 = load ptr, ptr @optarg, align 8, !tbaa !7
  %26 = tail call i32 @liquid_getopt_str2fec(ptr noundef %25) #10
  br label %.outer124, !llvm.loop !5

27:                                               ; preds = %6
  %28 = load ptr, ptr @optarg, align 8, !tbaa !7
  %29 = tail call i32 @liquid_getopt_str2fec(ptr noundef %28) #10
  br label %.outer120, !llvm.loop !5

30:                                               ; preds = %6
  tail call void @exit(i32 noundef -1) #12
  unreachable

31:                                               ; preds = %6
  %32 = fadd float %.050.ph110, -6.000000e+01
  %33 = fdiv float %32, 2.000000e+01
  %34 = tail call float @powf(float noundef 1.000000e+01, float noundef %33) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #10
  store i32 %.038.ph128, ptr %3, align 4, !tbaa !11
  %35 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 %.042.ph125, ptr %35, align 4, !tbaa !14
  %36 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 %.044.ph121, ptr %36, align 4, !tbaa !15
  %37 = call ptr @dsssframegen_create(ptr noundef nonnull %3) #10
  %38 = call ptr @dsssframesync_create(ptr noundef nonnull @callback, ptr noundef null) #10
  %39 = call i32 @dsssframegen_assemble(ptr noundef %37, ptr noundef null, ptr noundef null, i32 noundef %.046.ph116) #10
  %40 = call ptr @llvm.stacksave.p0()
  %41 = alloca [256 x { float, float }], align 16
  %42 = alloca [256 x { float, float }], align 16
  %43 = insertelement <2 x float> poison, float %34, i64 0
  %44 = shufflevector <2 x float> %43, <2 x float> poison, <2 x i32> zeroinitializer
  br label %45

45:                                               ; preds = %31, %88
  %.03970 = phi float [ 0.000000e+00, %31 ], [ %74, %88 ]
  %46 = call i32 @dsssframegen_write_samples(ptr noundef %37, ptr noundef nonnull %41, i32 noundef 256) #10
  br label %47

47:                                               ; preds = %45, %69
  %indvars.iv = phi i64 [ 0, %45 ], [ %indvars.iv.next, %69 ]
  %.14069 = phi float [ %.03970, %45 ], [ %74, %69 ]
  %48 = getelementptr inbounds { float, float }, ptr %41, i64 %indvars.iv
  %49 = fmul float %.14069, 0.000000e+00
  %.sroa.02.0.vec.insert = insertelement <2 x float> poison, float %49, i64 0
  %.sroa.02.4.vec.insert = insertelement <2 x float> %.sroa.02.0.vec.insert, float %.14069, i64 1
  %50 = load <2 x float>, ptr %48, align 8
  %51 = fmul <2 x float> %44, %50
  %52 = call <2 x float> @cexpf(<2 x float> noundef %.sroa.02.4.vec.insert) #10
  %53 = fmul <2 x float> %51, %52
  %54 = shufflevector <2 x float> %52, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %55 = fmul <2 x float> %51, %54
  %shift = shufflevector <2 x float> %53, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %56 = fsub <2 x float> %53, %shift
  %57 = extractelement <2 x float> %56, i64 0
  %shift108 = shufflevector <2 x float> %55, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %58 = fadd <2 x float> %55, %shift108
  %59 = extractelement <2 x float> %58, i64 0
  %60 = fcmp uno float %57, 0.000000e+00
  br i1 %60, label %61, label %69, !prof !16

61:                                               ; preds = %47
  %62 = fcmp uno float %59, 0.000000e+00
  br i1 %62, label %63, label %69, !prof !16

63:                                               ; preds = %61
  %64 = extractelement <2 x float> %51, i64 0
  %65 = extractelement <2 x float> %51, i64 1
  %66 = extractelement <2 x float> %52, i64 0
  %67 = extractelement <2 x float> %52, i64 1
  %68 = call <2 x float> @__mulsc3(float noundef %64, float noundef %65, float noundef %66, float noundef %67) #10
  %.sroa.0.0.vec.extract = extractelement <2 x float> %68, i64 0
  %.sroa.0.4.vec.extract = extractelement <2 x float> %68, i64 1
  br label %69

69:                                               ; preds = %63, %61, %47
  %70 = phi float [ %57, %47 ], [ %57, %61 ], [ %.sroa.0.0.vec.extract, %63 ]
  %71 = phi float [ %59, %47 ], [ %59, %61 ], [ %.sroa.0.4.vec.extract, %63 ]
  %72 = getelementptr inbounds { float, float }, ptr %42, i64 %indvars.iv
  %73 = getelementptr inbounds i8, ptr %72, i64 4
  store float %70, ptr %72, align 8
  store float %71, ptr %73, align 4
  %74 = fadd float %.052.ph, %.14069
  %75 = call float (...) @randnf() #10
  %76 = call float (...) @randnf() #10
  %77 = fmul float %76, 0.000000e+00
  %78 = fadd float %75, %77
  %79 = insertelement <2 x float> poison, float %78, i64 0
  %80 = insertelement <2 x float> %79, float %76, i64 1
  %81 = fmul <2 x float> %80, <float 0x3F50624DE0000000, float 0x3F50624DE0000000>
  %82 = fpext <2 x float> %81 to <2 x double>
  %83 = fmul <2 x double> %82, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %84 = load <2 x float>, ptr %72, align 8
  %85 = fpext <2 x float> %84 to <2 x double>
  %86 = fadd <2 x double> %83, %85
  %87 = fptrunc <2 x double> %86 to <2 x float>
  store <2 x float> %87, ptr %72, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 256
  br i1 %exitcond.not, label %88, label %47, !llvm.loop !17

88:                                               ; preds = %69
  %89 = call i32 @dsssframesync_execute(ptr noundef %38, ptr noundef nonnull %42, i32 noundef 256) #10
  %.not55 = icmp eq i32 %46, 0
  br i1 %.not55, label %45, label %90, !llvm.loop !18

90:                                               ; preds = %88
  %91 = call i32 @dsssframesync_print(ptr noundef %38) #10
  %92 = call i32 @dsssframegen_destroy(ptr noundef %37) #10
  %93 = call i32 @dsssframesync_destroy(ptr noundef %38) #10
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  call void @llvm.stackrestore.p0(ptr %40)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #10
  br label %95

95:                                               ; preds = %90, %8
  ret i32 0
}

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

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr nocapture noundef nonnull) local_unnamed_addr #5

declare i32 @liquid_getopt_str2crc(ptr noundef) local_unnamed_addr #6

declare i32 @liquid_getopt_str2fec(ptr noundef) local_unnamed_addr #6

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

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

declare ptr @dsssframegen_create(ptr noundef) local_unnamed_addr #6

declare ptr @dsssframesync_create(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare hidden i32 @callback(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #0

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

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

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) local_unnamed_addr #3

declare <2 x float> @__mulsc3(float, float, float, float) local_unnamed_addr

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

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

declare i32 @dsssframesync_print(ptr noundef) local_unnamed_addr #6

declare i32 @dsssframegen_destroy(ptr noundef) local_unnamed_addr #6

declare i32 @dsssframesync_destroy(ptr noundef) local_unnamed_addr #6

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

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

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


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