; LLVM IR from jgaeddert/liquid-dsp :: examples (flexframesync_reconfig_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.flexframegenprops_s = type { i32, i32, i32, i32 }

@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@optarg = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = 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) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.flexframegenprops_s, align 4
  %12 = alloca ptr, align 8
  %13 = alloca [14 x i8], align 1
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = 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
  %25 = call i64 @time(ptr noundef null) #8
  %26 = trunc i64 %25 to i32
  call void @srand(i32 noundef %26) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store float 3.000000e+01, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store float -3.000000e+01, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  br label %27

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

32:                                               ; preds = %27
  %33 = load i32, ptr %9, align 4, !tbaa !5
  switch i32 %33, label %42 [
    i32 117, label %34
    i32 104, label %34
    i32 115, label %35
    i32 110, label %39
  ]

34:                                               ; preds = %32, %32
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %189

35:                                               ; preds = %32
  %36 = load ptr, ptr @optarg, align 8, !tbaa !9
  %37 = call double @atof(ptr noundef %36) #9
  %38 = fptrunc double %37 to float
  store float %38, ptr %6, align 4, !tbaa !11
  br label %43

39:                                               ; preds = %32
  %40 = load ptr, ptr @optarg, align 8, !tbaa !9
  %41 = call i32 @atoi(ptr noundef %40) #9
  store i32 %41, ptr %8, align 4, !tbaa !5
  br label %43

42:                                               ; preds = %32
  call void @exit(i32 noundef 1) #10
  unreachable

43:                                               ; preds = %39, %35
  br label %27, !llvm.loop !13

44:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %45 = call i32 @flexframegenprops_init_default(ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %46 = call ptr @flexframegen_create(ptr noundef null)
  store ptr %46, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 14, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %47 = call ptr @flexframesync_create(ptr noundef null, ptr noundef null)
  store ptr %47, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %48 = load float, ptr %7, align 4, !tbaa !11
  %49 = fdiv float %48, 2.000000e+01
  %50 = call float @powf(float noundef 1.000000e+01, float noundef %49) #8
  store float %50, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %51 = load float, ptr %6, align 4, !tbaa !11
  %52 = load float, ptr %7, align 4, !tbaa !11
  %53 = fadd float %51, %52
  %54 = fdiv float %53, 2.000000e+01
  %55 = call float @powf(float noundef 1.000000e+01, float noundef %54) #8
  store float %55, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %65, %44
  %57 = load i32, ptr %18, align 4, !tbaa !5
  %58 = icmp ult i32 %57, 14
  br i1 %58, label %59, label %68

59:                                               ; preds = %56
  %60 = load i32, ptr %18, align 4, !tbaa !5
  %61 = trunc i32 %60 to i8
  %62 = load i32, ptr %18, align 4, !tbaa !5
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds [14 x i8], ptr %13, i64 0, i64 %63
  store i8 %61, ptr %64, align 1, !tbaa !15
  br label %65

65:                                               ; preds = %59
  %66 = load i32, ptr %18, align 4, !tbaa !5
  %67 = add i32 %66, 1
  store i32 %67, ptr %18, align 4, !tbaa !5
  br label %56, !llvm.loop !16

68:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 256, ptr %19, align 4, !tbaa !5
  %69 = load i32, ptr %19, align 4, !tbaa !5
  %70 = zext i32 %69 to i64
  %71 = call ptr @llvm.stacksave.p0()
  store ptr %71, ptr %20, align 8
  %72 = alloca { float, float }, i64 %70, align 16
  store i64 %70, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %176, %68
  %74 = load i32, ptr %22, align 4, !tbaa !5
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = icmp ult i32 %74, %75
  br i1 %76, label %77, label %179

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %78 = call i32 @rand() #8
  %79 = srem i32 %78, 256
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %23, align 4, !tbaa !5
  %81 = getelementptr inbounds %struct.flexframegenprops_s, ptr %11, i32 0, i32 0
  store i32 1, ptr %81, align 4, !tbaa !17
  %82 = getelementptr inbounds %struct.flexframegenprops_s, ptr %11, i32 0, i32 1
  store i32 1, ptr %82, align 4, !tbaa !19
  %83 = getelementptr inbounds %struct.flexframegenprops_s, ptr %11, i32 0, i32 2
  store i32 1, ptr %83, align 4, !tbaa !20
  %84 = call i32 @rand() #8
  %85 = srem i32 %84, 2
  %86 = icmp ne i32 %85, 0
  %87 = zext i1 %86 to i64
  %88 = select i1 %86, i32 40, i32 27
  %89 = getelementptr inbounds %struct.flexframegenprops_s, ptr %11, i32 0, i32 3
  store i32 %88, ptr %89, align 4, !tbaa !21
  %90 = load ptr, ptr %14, align 8, !tbaa !9
  %91 = load i32, ptr %23, align 4, !tbaa !5
  %92 = zext i32 %91 to i64
  %93 = mul i64 %92, 1
  %94 = call ptr @realloc(ptr noundef %90, i64 noundef %93) #11
  store ptr %94, ptr %14, align 8, !tbaa !9
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %107, %77
  %96 = load i32, ptr %18, align 4, !tbaa !5
  %97 = load i32, ptr %23, align 4, !tbaa !5
  %98 = icmp ult i32 %96, %97
  br i1 %98, label %99, label %110

99:                                               ; preds = %95
  %100 = call i32 @rand() #8
  %101 = and i32 %100, 255
  %102 = trunc i32 %101 to i8
  %103 = load ptr, ptr %14, align 8, !tbaa !9
  %104 = load i32, ptr %18, align 4, !tbaa !5
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds i8, ptr %103, i64 %105
  store i8 %102, ptr %106, align 1, !tbaa !15
  br label %107

107:                                              ; preds = %99
  %108 = load i32, ptr %18, align 4, !tbaa !5
  %109 = add i32 %108, 1
  store i32 %109, ptr %18, align 4, !tbaa !5
  br label %95, !llvm.loop !22

110:                                              ; preds = %95
  %111 = load ptr, ptr %12, align 8, !tbaa !9
  %112 = call i32 @flexframegen_setprops(ptr noundef %111, ptr noundef %11)
  %113 = load ptr, ptr %12, align 8, !tbaa !9
  %114 = getelementptr inbounds [14 x i8], ptr %13, i64 0, i64 0
  %115 = load ptr, ptr %14, align 8, !tbaa !9
  %116 = load i32, ptr %23, align 4, !tbaa !5
  %117 = call i32 @flexframegen_assemble(ptr noundef %113, ptr noundef %114, ptr noundef %115, i32 noundef %116)
  %118 = load i32, ptr %22, align 4, !tbaa !5
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %118)
  %120 = load ptr, ptr %12, align 8, !tbaa !9
  %121 = call i32 @flexframegen_print(ptr noundef %120)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %171, %110
  %123 = load i32, ptr %24, align 4, !tbaa !5
  %124 = icmp ne i32 %123, 0
  %125 = xor i1 %124, true
  br i1 %125, label %126, label %175

126:                                              ; preds = %122
  %127 = load ptr, ptr %12, align 8, !tbaa !9
  %128 = load i32, ptr %19, align 4, !tbaa !5
  %129 = call i32 @flexframegen_write_samples(ptr noundef %127, ptr noundef %72, i32 noundef %128)
  store i32 %129, ptr %24, align 4, !tbaa !5
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %168, %126
  %131 = load i32, ptr %18, align 4, !tbaa !5
  %132 = load i32, ptr %19, align 4, !tbaa !5
  %133 = icmp ult i32 %131, %132
  br i1 %133, label %134, label %171

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

168:                                              ; preds = %134
  %169 = load i32, ptr %18, align 4, !tbaa !5
  %170 = add i32 %169, 1
  store i32 %170, ptr %18, align 4, !tbaa !5
  br label %130, !llvm.loop !23

171:                                              ; preds = %130
  %172 = load ptr, ptr %15, align 8, !tbaa !9
  %173 = load i32, ptr %19, align 4, !tbaa !5
  %174 = call i32 @flexframesync_execute(ptr noundef %172, ptr noundef %72, i32 noundef %173)
  br label %122, !llvm.loop !24

175:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %22, align 4, !tbaa !5
  %178 = add i32 %177, 1
  store i32 %178, ptr %22, align 4, !tbaa !5
  br label %73, !llvm.loop !25

179:                                              ; preds = %73
  %180 = load ptr, ptr %15, align 8, !tbaa !9
  %181 = call i32 @flexframesync_print(ptr noundef %180)
  %182 = load ptr, ptr %12, align 8, !tbaa !9
  %183 = call i32 @flexframegen_destroy(ptr noundef %182)
  %184 = load ptr, ptr %15, align 8, !tbaa !9
  %185 = call i32 @flexframesync_destroy(ptr noundef %184)
  %186 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %186) #8
  %187 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  %188 = load ptr, ptr %20, align 8
  call void @llvm.stackrestore.p0(ptr %188)
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 14, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %189

189:                                              ; preds = %179, %34
  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
  %190 = load i32, ptr %3, align 4
  ret i32 %190
}

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

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

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

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

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

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

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

declare i32 @flexframegenprops_init_default(ptr noundef) #1

declare ptr @flexframegen_create(ptr noundef) #1

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

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

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

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

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #7

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

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

declare i32 @flexframegen_print(ptr noundef) #1

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

declare float @randnf(...) #1

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

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

declare i32 @flexframesync_print(ptr noundef) #1

declare i32 @flexframegen_destroy(ptr noundef) #1

declare i32 @flexframesync_destroy(ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind willreturn }
attributes #7 = { nounwind allocsize(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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind allocsize(1) }

!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 = !{!7, !7, i64 0}
!16 = distinct !{!16, !14}
!17 = !{!18, !6, i64 0}
!18 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!19 = !{!18, !6, i64 4}
!20 = !{!18, !6, i64 8}
!21 = !{!18, !6, i64 12}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !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.flexframegenprops_s = type { i32, i32, i32, i32 }

@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = 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 #0 {
  %3 = alloca %struct.flexframegenprops_s, align 4
  %4 = alloca [14 x i8], align 8
  %5 = tail call i64 @time(ptr noundef null) #11
  %6 = trunc i64 %5 to i32
  tail call void @srand(i32 noundef %6) #11
  br label %.outer

.outer:                                           ; preds = %14, %2
  %.047.ph = phi i32 [ %16, %14 ], [ 3, %2 ]
  %.046.ph = phi float [ %.046, %14 ], [ 3.000000e+01, %2 ]
  br label %7

7:                                                ; preds = %.outer, %10
  %.046 = phi float [ %13, %10 ], [ %.046.ph, %.outer ]
  %8 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.4) #11
  switch i32 %8, label %17 [
    i32 -1, label %18
    i32 117, label %9
    i32 104, label %9
    i32 115, label %10
    i32 110, label %14
  ]

9:                                                ; preds = %7, %7
  tail call void @usage()
  br label %77

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

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

17:                                               ; preds = %7
  tail call void @exit(i32 noundef 1) #13
  unreachable

18:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #11
  %19 = call i32 @flexframegenprops_init_default(ptr noundef nonnull %3) #11
  %20 = call ptr @flexframegen_create(ptr noundef null) #11
  call void @llvm.lifetime.start.p0(i64 14, ptr nonnull %4) #11
  %21 = call ptr @flexframesync_create(ptr noundef null, ptr noundef null) #11
  %22 = fadd float %.046, -3.000000e+01
  %23 = fdiv float %22, 2.000000e+01
  %24 = call float @powf(float noundef 1.000000e+01, float noundef %23) #11
  store <8 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7>, ptr %4, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %4, i64 8
  store <4 x i8> <i8 8, i8 9, i8 10, i8 11>, ptr %25, align 8, !tbaa !11
  %26 = getelementptr inbounds i8, ptr %4, i64 12
  store i8 12, ptr %26, align 4, !tbaa !11
  %27 = getelementptr inbounds i8, ptr %4, i64 13
  store i8 13, ptr %27, align 1, !tbaa !11
  %28 = call ptr @llvm.stacksave.p0()
  %29 = alloca [256 x { float, float }], align 16
  %.not = icmp eq i32 %.047.ph, 0
  br i1 %.not, label %._crit_edge67, label %.lr.ph66

.lr.ph66:                                         ; preds = %18
  %30 = getelementptr inbounds i8, ptr %3, i64 4
  %31 = getelementptr inbounds i8, ptr %3, i64 8
  %32 = getelementptr inbounds i8, ptr %3, i64 12
  %33 = insertelement <2 x float> poison, float %24, i64 0
  %34 = shufflevector <2 x float> %33, <2 x float> poison, <2 x i32> zeroinitializer
  br label %35

35:                                               ; preds = %.lr.ph66, %71
  %.04564 = phi i32 [ 0, %.lr.ph66 ], [ %72, %71 ]
  %.05163 = phi ptr [ null, %.lr.ph66 ], [ %43, %71 ]
  %36 = call i32 @rand() #11
  %37 = srem i32 %36, 256
  %38 = add nsw i32 %37, 1
  store i32 1, ptr %3, align 4, !tbaa !12
  store i32 1, ptr %30, align 4, !tbaa !15
  store i32 1, ptr %31, align 4, !tbaa !16
  %39 = call i32 @rand() #11
  %40 = and i32 %39, 1
  %.not54 = icmp eq i32 %40, 0
  %41 = select i1 %.not54, i32 27, i32 40
  store i32 %41, ptr %32, align 4, !tbaa !17
  %42 = zext i32 %38 to i64
  %43 = call ptr @realloc(ptr noundef %.05163, i64 noundef %42) #14
  %.not68 = icmp eq i32 %38, 0
  br i1 %.not68, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %35, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %35 ]
  %44 = call i32 @rand() #11
  %45 = trunc i32 %44 to i8
  %46 = getelementptr inbounds i8, ptr %43, i64 %indvars.iv
  store i8 %45, ptr %46, align 1, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %42
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %35
  %47 = call i32 @flexframegen_setprops(ptr noundef %20, ptr noundef nonnull %3) #11
  %48 = call i32 @flexframegen_assemble(ptr noundef %20, ptr noundef nonnull %4, ptr noundef %43, i32 noundef %38) #11
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %.04564)
  %50 = call i32 @flexframegen_print(ptr noundef %20) #11
  br label %51

51:                                               ; preds = %._crit_edge, %69
  %52 = call i32 @flexframegen_write_samples(ptr noundef %20, ptr noundef nonnull %29, i32 noundef 256) #11
  br label %53

53:                                               ; preds = %51, %53
  %indvars.iv75 = phi i64 [ 0, %51 ], [ %indvars.iv.next76, %53 ]
  %54 = getelementptr inbounds { float, float }, ptr %29, i64 %indvars.iv75
  %55 = load <2 x float>, ptr %54, align 8
  %56 = fmul <2 x float> %34, %55
  %57 = fpext <2 x float> %56 to <2 x double>
  %58 = call float (...) @randnf() #11
  %59 = call float (...) @randnf() #11
  %60 = fmul float %59, 0.000000e+00
  %61 = fadd float %58, %60
  %62 = insertelement <2 x float> poison, float %61, i64 0
  %63 = insertelement <2 x float> %62, float %59, i64 1
  %64 = fmul <2 x float> %63, <float 0x3FA030DC40000000, float 0x3FA030DC40000000>
  %65 = fpext <2 x float> %64 to <2 x double>
  %66 = fmul <2 x double> %65, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %67 = fadd <2 x double> %66, %57
  %68 = fptrunc <2 x double> %67 to <2 x float>
  store <2 x float> %68, ptr %54, align 8
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next76, 256
  br i1 %exitcond78.not, label %69, label %53, !llvm.loop !19

69:                                               ; preds = %53
  %70 = call i32 @flexframesync_execute(ptr noundef %21, ptr noundef nonnull %29, i32 noundef 256) #11
  %.not55 = icmp eq i32 %52, 0
  br i1 %.not55, label %51, label %71, !llvm.loop !20

71:                                               ; preds = %69
  %72 = add nuw i32 %.04564, 1
  %exitcond79.not = icmp eq i32 %72, %.047.ph
  br i1 %exitcond79.not, label %._crit_edge67, label %35, !llvm.loop !21

._crit_edge67:                                    ; preds = %71, %18
  %.051.lcssa = phi ptr [ null, %18 ], [ %43, %71 ]
  %73 = call i32 @flexframesync_print(ptr noundef %21) #11
  %74 = call i32 @flexframegen_destroy(ptr noundef %20) #11
  %75 = call i32 @flexframesync_destroy(ptr noundef %21) #11
  call void @free(ptr noundef %.051.lcssa) #11
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @llvm.stackrestore.p0(ptr %28)
  call void @llvm.lifetime.end.p0(i64 14, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  br label %77

77:                                               ; preds = %._crit_edge67, %9
  ret i32 0
}

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

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

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

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

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

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

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

declare i32 @flexframegenprops_init_default(ptr noundef) local_unnamed_addr #6

declare ptr @flexframegen_create(ptr noundef) local_unnamed_addr #6

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

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

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #9

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

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

declare i32 @flexframegen_print(ptr noundef) local_unnamed_addr #6

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

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

declare i32 @flexframesync_execute(ptr noundef, ptr noundef, i32 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) #3

declare i32 @flexframesync_print(ptr noundef) local_unnamed_addr #6

declare i32 @flexframegen_destroy(ptr noundef) local_unnamed_addr #6

declare i32 @flexframesync_destroy(ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #10

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 = { 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 "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #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 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 #8 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #9 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #10 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { noreturn nounwind }
attributes #14 = { nounwind allocsize(1) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!14 = !{!"int", !7, i64 0}
!15 = !{!13, !14, i64 4}
!16 = !{!13, !14, i64 8}
!17 = !{!13, !14, i64 12}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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