; LLVM IR from jgaeddert/liquid-dsp :: examples (quantize_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.4 = external hidden unnamed_addr constant [7 x i8], align 1
@optarg = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.31 = 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 i32, align 4
  %7 = alloca float, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca ptr, align 8
  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) #8
  store i32 4, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store float 2.550000e+02, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 64, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  br label %23

23:                                               ; preds = %39, %2
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = call i32 @getopt(i32 noundef %24, ptr noundef %25, ptr noundef @.str.4) #8
  store i32 %26, ptr %9, align 4, !tbaa !5
  %27 = icmp ne i32 %26, -1
  br i1 %27, label %28, label %40

28:                                               ; preds = %23
  %29 = load i32, ptr %9, align 4, !tbaa !5
  switch i32 %29, label %38 [
    i32 117, label %30
    i32 104, label %30
    i32 98, label %31
    i32 109, label %34
  ]

30:                                               ; preds = %28, %28
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %227

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

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

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

39:                                               ; preds = %34, %31
  br label %23, !llvm.loop !13

40:                                               ; preds = %23
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = icmp ugt i32 %41, 16
  br i1 %42, label %46, label %43

43:                                               ; preds = %40
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = icmp ult i32 %44, 1
  br i1 %45, label %46, label %52

46:                                               ; preds = %43, %40
  %47 = load ptr, ptr @stderr, align 8, !tbaa !9
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = getelementptr inbounds ptr, ptr %48, i64 0
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef @.str.5, ptr noundef %50) #8
  call void @exit(i32 noundef 1) #10
  unreachable

52:                                               ; preds = %43
  %53 = load float, ptr %7, align 4, !tbaa !11
  %54 = fcmp olt float %53, 0.000000e+00
  br i1 %54, label %55, label %61

55:                                               ; preds = %52
  %56 = load ptr, ptr @stderr, align 8, !tbaa !9
  %57 = load ptr, ptr %5, align 8, !tbaa !9
  %58 = getelementptr inbounds ptr, ptr %57, i64 0
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.6, ptr noundef %59) #8
  call void @exit(i32 noundef 1) #10
  unreachable

61:                                               ; preds = %52
  br label %62

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = call ptr @llvm.stacksave.p0()
  store ptr %65, ptr %12, align 8
  %66 = alloca float, i64 %64, align 16
  store i64 %64, ptr %13, align 8
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = zext i32 %67 to i64
  %69 = alloca float, i64 %68, align 16
  store i64 %68, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store float 0.000000e+00, ptr %19, align 4, !tbaa !11
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store float 0.000000e+00, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = uitofp i32 %72 to float
  %74 = fdiv float 0x40147AE140000000, %73
  store float %74, ptr %21, align 4, !tbaa !11
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %152, %62
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = icmp ult i32 %76, %77
  br i1 %78, label %79, label %155

79:                                               ; preds = %75
  %80 = load float, ptr %20, align 4, !tbaa !11
  %81 = fpext float %80 to double
  %82 = fmul double 0x401921FB54442D18, %81
  %83 = fptrunc double %82 to float
  %84 = call float @cosf(float noundef %83) #8
  %85 = load float, ptr %20, align 4, !tbaa !11
  %86 = fpext float %85 to double
  %87 = fmul double 0x401921FB54442D18, %86
  %88 = fmul double %87, 0x3FE23D70A0000000
  %89 = fptrunc double %88 to float
  %90 = call float @cosf(float noundef %89) #8
  %91 = fmul float 5.000000e-01, %90
  %92 = call float @llvm.fmuladd.f32(float 5.000000e-01, float %84, float %91)
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds float, ptr %66, i64 %94
  store float %92, ptr %95, align 4, !tbaa !11
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = call float @liquid_kaiser(i32 noundef %96, i32 noundef %97, float noundef 1.000000e+01)
  %99 = fmul float 5.000000e-01, %98
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds float, ptr %66, i64 %101
  %103 = load float, ptr %102, align 4, !tbaa !11
  %104 = fmul float %103, %99
  store float %104, ptr %102, align 4, !tbaa !11
  %105 = load float, ptr %21, align 4, !tbaa !11
  %106 = load float, ptr %20, align 4, !tbaa !11
  %107 = fadd float %106, %105
  store float %107, ptr %20, align 4, !tbaa !11
  %108 = load i32, ptr %11, align 4, !tbaa !5
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds float, ptr %66, i64 %109
  %111 = load float, ptr %110, align 4, !tbaa !11
  %112 = load float, ptr %7, align 4, !tbaa !11
  %113 = call float @compress_mulaw(float noundef %111, float noundef %112)
  store float %113, ptr %15, align 4, !tbaa !11
  %114 = load float, ptr %15, align 4, !tbaa !11
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = call i32 @quantize_adc(float noundef %114, i32 noundef %115)
  store i32 %116, ptr %16, align 4, !tbaa !5
  %117 = load i32, ptr %16, align 4, !tbaa !5
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = call float @quantize_dac(i32 noundef %117, i32 noundef %118)
  store float %119, ptr %17, align 4, !tbaa !11
  %120 = load float, ptr %17, align 4, !tbaa !11
  %121 = load float, ptr %7, align 4, !tbaa !11
  %122 = call float @expand_mulaw(float noundef %120, float noundef %121)
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds float, ptr %69, i64 %124
  store float %122, ptr %125, align 4, !tbaa !11
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds float, ptr %69, i64 %127
  %129 = load float, ptr %128, align 4, !tbaa !11
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = zext i32 %130 to i64
  %132 = getelementptr inbounds float, ptr %66, i64 %131
  %133 = load float, ptr %132, align 4, !tbaa !11
  %134 = fsub float %129, %133
  store float %134, ptr %18, align 4, !tbaa !11
  %135 = load float, ptr %18, align 4, !tbaa !11
  %136 = load float, ptr %18, align 4, !tbaa !11
  %137 = load float, ptr %19, align 4, !tbaa !11
  %138 = call float @llvm.fmuladd.f32(float %135, float %136, float %137)
  store float %138, ptr %19, align 4, !tbaa !11
  %139 = load i32, ptr %11, align 4, !tbaa !5
  %140 = load i32, ptr %11, align 4, !tbaa !5
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds float, ptr %66, i64 %141
  %143 = load float, ptr %142, align 4, !tbaa !11
  %144 = fpext float %143 to double
  %145 = load i32, ptr %16, align 4, !tbaa !5
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds float, ptr %69, i64 %147
  %149 = load float, ptr %148, align 4, !tbaa !11
  %150 = fpext float %149 to double
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %139, double noundef %144, i32 noundef %145, double noundef %150)
  br label %152

152:                                              ; preds = %79
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = add i32 %153, 1
  store i32 %154, ptr %11, align 4, !tbaa !5
  br label %75, !llvm.loop !15

155:                                              ; preds = %75
  %156 = load float, ptr %19, align 4, !tbaa !11
  %157 = load i32, ptr %8, align 4, !tbaa !5
  %158 = uitofp i32 %157 to float
  %159 = fdiv float %156, %158
  %160 = call float @sqrtf(float noundef %159) #8
  store float %160, ptr %19, align 4, !tbaa !11
  %161 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %162 = load float, ptr %19, align 4, !tbaa !11
  %163 = fpext float %162 to double
  %164 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %163)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %165 = call noalias ptr @fopen(ptr noundef @.str.12, ptr noundef @.str.13)
  store ptr %165, ptr %22, align 8, !tbaa !9
  %166 = load ptr, ptr %22, align 8, !tbaa !9
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %166, ptr noundef @.str.14, ptr noundef @.str.12) #8
  %168 = load ptr, ptr %22, align 8, !tbaa !9
  %169 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef @.str.15) #8
  %170 = load ptr, ptr %22, align 8, !tbaa !9
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str.16) #8
  %172 = load ptr, ptr %22, align 8, !tbaa !9
  %173 = load i32, ptr %8, align 4, !tbaa !5
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef @.str.17, i32 noundef %173) #8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %196, %155
  %176 = load i32, ptr %11, align 4, !tbaa !5
  %177 = load i32, ptr %8, align 4, !tbaa !5
  %178 = icmp ult i32 %176, %177
  br i1 %178, label %179, label %199

179:                                              ; preds = %175
  %180 = load ptr, ptr %22, align 8, !tbaa !9
  %181 = load i32, ptr %11, align 4, !tbaa !5
  %182 = add i32 %181, 1
  %183 = load i32, ptr %11, align 4, !tbaa !5
  %184 = zext i32 %183 to i64
  %185 = getelementptr inbounds float, ptr %66, i64 %184
  %186 = load float, ptr %185, align 4, !tbaa !11
  %187 = fpext float %186 to double
  %188 = load i32, ptr %11, align 4, !tbaa !5
  %189 = add i32 %188, 1
  %190 = load i32, ptr %11, align 4, !tbaa !5
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds float, ptr %69, i64 %191
  %193 = load float, ptr %192, align 4, !tbaa !11
  %194 = fpext float %193 to double
  %195 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.18, i32 noundef %182, double noundef %187, i32 noundef %189, double noundef %194) #8
  br label %196

196:                                              ; preds = %179
  %197 = load i32, ptr %11, align 4, !tbaa !5
  %198 = add i32 %197, 1
  store i32 %198, ptr %11, align 4, !tbaa !5
  br label %175, !llvm.loop !16

199:                                              ; preds = %175
  %200 = load ptr, ptr %22, align 8, !tbaa !9
  %201 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.19) #8
  %202 = load ptr, ptr %22, align 8, !tbaa !9
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef @.str.20) #8
  %204 = load ptr, ptr %22, align 8, !tbaa !9
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef @.str.21) #8
  %206 = load ptr, ptr %22, align 8, !tbaa !9
  %207 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef @.str.22) #8
  %208 = load ptr, ptr %22, align 8, !tbaa !9
  %209 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %208, ptr noundef @.str.23) #8
  %210 = load ptr, ptr %22, align 8, !tbaa !9
  %211 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef @.str.24) #8
  %212 = load ptr, ptr %22, align 8, !tbaa !9
  %213 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef @.str.25) #8
  %214 = load ptr, ptr %22, align 8, !tbaa !9
  %215 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %214, ptr noundef @.str.26) #8
  %216 = load ptr, ptr %22, align 8, !tbaa !9
  %217 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %216, ptr noundef @.str.27) #8
  %218 = load ptr, ptr %22, align 8, !tbaa !9
  %219 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %218, ptr noundef @.str.28) #8
  %220 = load ptr, ptr %22, align 8, !tbaa !9
  %221 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %220, ptr noundef @.str.29) #8
  %222 = load ptr, ptr %22, align 8, !tbaa !9
  %223 = call i32 @fclose(ptr noundef %222)
  %224 = call i32 (ptr, ...) @printf(ptr noundef @.str.30, ptr noundef @.str.12)
  %225 = call i32 (ptr, ...) @printf(ptr noundef @.str.31)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  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 4, ptr %15) #8
  %226 = load ptr, ptr %12, align 8
  call void @llvm.stackrestore.p0(ptr %226)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %227

227:                                              ; preds = %199, %30
  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
  %228 = load i32, ptr %3, align 4
  ret i32 %228
}

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

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

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

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

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

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

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

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

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

declare float @liquid_kaiser(i32 noundef, i32 noundef, float noundef) #1

declare float @compress_mulaw(float noundef, float noundef) #1

declare i32 @quantize_adc(float noundef, i32 noundef) #1

declare float @quantize_dac(i32 noundef, i32 noundef) #1

declare float @expand_mulaw(float noundef, float noundef) #1

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

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

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = 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.4 = external hidden unnamed_addr constant [7 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.31 = 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 {
  br label %.outer

.outer:                                           ; preds = %9, %2
  %.073.ph = phi float [ %12, %9 ], [ 2.550000e+02, %2 ]
  %.070.ph = phi i32 [ %.070, %9 ], [ 4, %2 ]
  br label %3

3:                                                ; preds = %.outer, %6
  %.070 = phi i32 [ %8, %6 ], [ %.070.ph, %.outer ]
  %4 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.4) #9
  switch i32 %4, label %13 [
    i32 -1, label %14
    i32 117, label %5
    i32 104, label %5
    i32 98, label %6
    i32 109, label %9
  ]

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

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
  tail call void @exit(i32 noundef 1) #11
  unreachable

14:                                               ; preds = %3
  %15 = add i32 %.070, -17
  %or.cond = icmp ult i32 %15, -16
  br i1 %or.cond, label %16, label %20

16:                                               ; preds = %14
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = load ptr, ptr %1, align 8, !tbaa !5
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.5, ptr noundef %18) #12
  tail call void @exit(i32 noundef 1) #11
  unreachable

20:                                               ; preds = %14
  %21 = fcmp olt float %.073.ph, 0.000000e+00
  br i1 %21, label %22, label %26

22:                                               ; preds = %20
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.6, ptr noundef %24) #12
  tail call void @exit(i32 noundef 1) #11
  unreachable

26:                                               ; preds = %20
  %27 = tail call ptr @llvm.stacksave.p0()
  %28 = alloca [64 x float], align 16
  %29 = alloca [64 x float], align 16
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %32

32:                                               ; preds = %26, %32
  %indvars.iv = phi i64 [ 0, %26 ], [ %indvars.iv.next, %32 ]
  %.07183 = phi float [ 0.000000e+00, %26 ], [ %47, %32 ]
  %.07282 = phi float [ 0.000000e+00, %26 ], [ %54, %32 ]
  %33 = fpext float %.07183 to double
  %34 = fmul double %33, 0x401921FB54442D18
  %35 = fptrunc double %34 to float
  %36 = tail call float @cosf(float noundef %35) #9
  %37 = fmul double %34, 0x3FE23D70A0000000
  %38 = fptrunc double %37 to float
  %39 = tail call float @cosf(float noundef %38) #9
  %40 = fmul float %39, 5.000000e-01
  %41 = tail call float @llvm.fmuladd.f32(float %36, float 5.000000e-01, float %40)
  %42 = getelementptr inbounds float, ptr %28, i64 %indvars.iv
  %43 = trunc nuw nsw i64 %indvars.iv to i32
  %44 = tail call float @liquid_kaiser(i32 noundef %43, i32 noundef 64, float noundef 1.000000e+01) #9
  %45 = fmul float %44, 5.000000e-01
  %46 = fmul float %41, %45
  store float %46, ptr %42, align 4, !tbaa !11
  %47 = fadd float %.07183, 0x3FB47AE140000000
  %48 = tail call float @compress_mulaw(float noundef %46, float noundef %.073.ph) #9
  %49 = tail call i32 @quantize_adc(float noundef %48, i32 noundef %.070) #9
  %50 = tail call float @quantize_dac(i32 noundef %49, i32 noundef %.070) #9
  %51 = tail call float @expand_mulaw(float noundef %50, float noundef %.073.ph) #9
  %52 = getelementptr inbounds float, ptr %29, i64 %indvars.iv
  store float %51, ptr %52, align 4, !tbaa !11
  %53 = fsub float %51, %46
  %54 = tail call float @llvm.fmuladd.f32(float %53, float %53, float %.07282)
  %55 = fpext float %46 to double
  %56 = fpext float %51 to double
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %43, double noundef %55, i32 noundef %49, double noundef %56)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 64
  br i1 %exitcond.not, label %58, label %32, !llvm.loop !13

58:                                               ; preds = %32
  %59 = fmul float %54, 1.562500e-02
  %60 = tail call float @sqrtf(float noundef %59) #9
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %62 = fpext float %60 to double
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %62)
  %64 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.13)
  %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.12) #9
  %66 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.15) #9
  %67 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.16) #9
  %68 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.17, i32 noundef 64) #9
  br label %69

69:                                               ; preds = %58, %69
  %indvars.iv90 = phi i64 [ 0, %58 ], [ %indvars.iv.next91, %69 ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %70 = getelementptr inbounds float, ptr %28, i64 %indvars.iv90
  %71 = load float, ptr %70, align 4, !tbaa !11
  %72 = fpext float %71 to double
  %73 = getelementptr inbounds float, ptr %29, i64 %indvars.iv90
  %74 = load float, ptr %73, align 4, !tbaa !11
  %75 = fpext float %74 to double
  %76 = trunc nuw nsw i64 %indvars.iv.next91 to i32
  %77 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.18, i32 noundef %76, double noundef %72, i32 noundef %76, double noundef %75) #9
  %exitcond93.not = icmp eq i64 %indvars.iv.next91, 64
  br i1 %exitcond93.not, label %78, label %69, !llvm.loop !14

78:                                               ; preds = %69
  %79 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.19) #9
  %80 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.20) #9
  %81 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.21) #9
  %82 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.22) #9
  %83 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.23) #9
  %84 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.24) #9
  %85 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.25) #9
  %86 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.26) #9
  %87 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.27) #9
  %88 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.28) #9
  %89 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.29) #9
  %90 = tail call i32 @fclose(ptr noundef %64)
  %91 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30, ptr noundef nonnull @.str.12)
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.31)
  tail call void @llvm.stackrestore.p0(ptr %27)
  br label %93

93:                                               ; preds = %78, %5
  ret i32 0
}

; 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 i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #6

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

declare float @liquid_kaiser(i32 noundef, i32 noundef, float noundef) local_unnamed_addr #8

declare float @compress_mulaw(float noundef, float noundef) local_unnamed_addr #8

declare i32 @quantize_adc(float noundef, i32 noundef) local_unnamed_addr #8

declare float @quantize_dac(i32 noundef, i32 noundef) local_unnamed_addr #8

declare float @expand_mulaw(float noundef, float noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sqrtf(float noundef) local_unnamed_addr #6

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

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

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

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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { "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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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