; LLVM IR from TobiasKozel/VAE :: external/portaudio/qa/loopback/src (paqa)

; 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.UserOptions_s = type { i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32 }

@g_testsPassed = external dso_local global i32, align 4
@g_testsFailed = external dso_local global i32, align 4
@.str.45 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [55 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @TestSampleFormatConversion() #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
declare dso_local void @usage(ptr noundef) #2

; 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 %struct.UserOptions_s, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %13 = load ptr, ptr %5, align 8, !tbaa !9
  %14 = getelementptr inbounds ptr, ptr %13, i64 0
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %15, ptr %10, align 8, !tbaa !9
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.45)
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 1
  br i1 %18, label %19, label %37

19:                                               ; preds = %2
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str.46)
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %32, %19
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %25, label %35

25:                                               ; preds = %21
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds ptr, ptr %26, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str.47, ptr noundef %30)
  br label %32

32:                                               ; preds = %25
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %6, align 4, !tbaa !5
  br label %21, !llvm.loop !11

35:                                               ; preds = %21
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.48)
  br label %39

37:                                               ; preds = %2
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.49)
  br label %39

39:                                               ; preds = %37, %35
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 48, i1 false)
  %40 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 8
  store i32 -1, ptr %40, align 8, !tbaa !13
  %41 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 9
  store i32 -1, ptr %41, align 4, !tbaa !15
  %42 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 0
  store i32 -1, ptr %42, align 8, !tbaa !16
  %43 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 1
  store i32 -1, ptr %43, align 4, !tbaa !17
  %44 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 2
  store i32 -1, ptr %44, align 8, !tbaa !18
  %45 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 3
  store i32 -1, ptr %45, align 4, !tbaa !19
  %46 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 7
  store ptr @.str.50, ptr %46, align 8, !tbaa !20
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %150, %39
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %51, label %153

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %52 = load ptr, ptr %5, align 8, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %52, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  store ptr %56, ptr %11, align 8, !tbaa !9
  %57 = load ptr, ptr %11, align 8, !tbaa !9
  %58 = getelementptr inbounds i8, ptr %57, i64 0
  %59 = load i8, ptr %58, align 1, !tbaa !21
  %60 = sext i8 %59 to i32
  %61 = icmp eq i32 %60, 45
  br i1 %61, label %62, label %146

62:                                               ; preds = %51
  %63 = load ptr, ptr %11, align 8, !tbaa !9
  %64 = getelementptr inbounds i8, ptr %63, i64 1
  %65 = load i8, ptr %64, align 1, !tbaa !21
  %66 = sext i8 %65 to i32
  switch i32 %66, label %141 [
    i32 105, label %67
    i32 111, label %72
    i32 108, label %77
    i32 114, label %83
    i32 115, label %88
    i32 109, label %93
    i32 119, label %95
    i32 100, label %97
    i32 118, label %101
    i32 104, label %103
    i32 45, label %105
  ]

67:                                               ; preds = %62
  %68 = load ptr, ptr %11, align 8, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %68, i64 2
  %70 = call i32 @atoi(ptr noundef %69) #8
  %71 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 8
  store i32 %70, ptr %71, align 8, !tbaa !13
  br label %145

72:                                               ; preds = %62
  %73 = load ptr, ptr %11, align 8, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %73, i64 2
  %75 = call i32 @atoi(ptr noundef %74) #8
  %76 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 9
  store i32 %75, ptr %76, align 4, !tbaa !15
  br label %145

77:                                               ; preds = %62
  %78 = load ptr, ptr %11, align 8, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %78, i64 2
  %80 = call i32 @atoi(ptr noundef %79) #8
  %81 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 3
  store i32 %80, ptr %81, align 4, !tbaa !19
  %82 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 2
  store i32 %80, ptr %82, align 8, !tbaa !18
  br label %145

83:                                               ; preds = %62
  %84 = load ptr, ptr %11, align 8, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %84, i64 2
  %86 = call i32 @atoi(ptr noundef %85) #8
  %87 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 0
  store i32 %86, ptr %87, align 8, !tbaa !16
  br label %145

88:                                               ; preds = %62
  %89 = load ptr, ptr %11, align 8, !tbaa !9
  %90 = getelementptr inbounds i8, ptr %89, i64 2
  %91 = call i32 @atoi(ptr noundef %90) #8
  %92 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 1
  store i32 %91, ptr %92, align 4, !tbaa !17
  br label %145

93:                                               ; preds = %62
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str.51)
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %145

95:                                               ; preds = %62
  %96 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 4
  store i32 1, ptr %96, align 8, !tbaa !22
  br label %145

97:                                               ; preds = %62
  %98 = load ptr, ptr %11, align 8, !tbaa !9
  %99 = getelementptr inbounds i8, ptr %98, i64 2
  %100 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 7
  store ptr %99, ptr %100, align 8, !tbaa !20
  br label %145

101:                                              ; preds = %62
  %102 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 5
  store i32 1, ptr %102, align 4, !tbaa !23
  br label %145

103:                                              ; preds = %62
  %104 = load ptr, ptr %10, align 8, !tbaa !9
  call void @usage(ptr noundef %104)
  call void @exit(i32 noundef 0) #9
  unreachable

105:                                              ; preds = %62
  %106 = load ptr, ptr %11, align 8, !tbaa !9
  %107 = getelementptr inbounds i8, ptr %106, i64 2
  %108 = call i32 @strcmp(ptr noundef %107, ptr noundef @.str.52) #8
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %120

110:                                              ; preds = %105
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %6, align 4, !tbaa !5
  %113 = load ptr, ptr %5, align 8, !tbaa !9
  %114 = load i32, ptr %6, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds ptr, ptr %113, i64 %115
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = call i32 @atoi(ptr noundef %117) #8
  %119 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 2
  store i32 %118, ptr %119, align 8, !tbaa !18
  br label %140

120:                                              ; preds = %105
  %121 = load ptr, ptr %11, align 8, !tbaa !9
  %122 = getelementptr inbounds i8, ptr %121, i64 2
  %123 = call i32 @strcmp(ptr noundef %122, ptr noundef @.str.53) #8
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %135

125:                                              ; preds = %120
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %6, align 4, !tbaa !5
  %128 = load ptr, ptr %5, align 8, !tbaa !9
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !9
  %133 = call i32 @atoi(ptr noundef %132) #8
  %134 = getelementptr inbounds %struct.UserOptions_s, ptr %7, i32 0, i32 3
  store i32 %133, ptr %134, align 4, !tbaa !19
  br label %139

135:                                              ; preds = %120
  %136 = load ptr, ptr %11, align 8, !tbaa !9
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.54, ptr noundef %136)
  %138 = load ptr, ptr %10, align 8, !tbaa !9
  call void @usage(ptr noundef %138)
  call void @exit(i32 noundef 1) #9
  unreachable

139:                                              ; preds = %125
  br label %140

140:                                              ; preds = %139, %110
  br label %145

141:                                              ; preds = %62
  %142 = load ptr, ptr %11, align 8, !tbaa !9
  %143 = call i32 (ptr, ...) @printf(ptr noundef @.str.54, ptr noundef %142)
  %144 = load ptr, ptr %10, align 8, !tbaa !9
  call void @usage(ptr noundef %144)
  call void @exit(i32 noundef 1) #9
  unreachable

145:                                              ; preds = %140, %101, %97, %95, %93, %88, %83, %77, %72, %67
  br label %150

146:                                              ; preds = %51
  %147 = load ptr, ptr %11, align 8, !tbaa !9
  %148 = call i32 (ptr, ...) @printf(ptr noundef @.str.55, ptr noundef %147)
  %149 = load ptr, ptr %10, align 8, !tbaa !9
  call void @usage(ptr noundef %149)
  call void @exit(i32 noundef 1) #9
  unreachable

150:                                              ; preds = %145
  %151 = load i32, ptr %6, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %47, !llvm.loop !24

153:                                              ; preds = %47
  %154 = call i32 @PaQa_TestAnalyzer()
  store i32 %154, ptr %8, align 4, !tbaa !5
  %155 = call i32 @TestSampleFormatConversion()
  store i32 %155, ptr %8, align 4, !tbaa !5
  %156 = load i32, ptr %8, align 4, !tbaa !5
  %157 = icmp eq i32 %156, 0
  br i1 %157, label %158, label %175

158:                                              ; preds = %153
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %175

161:                                              ; preds = %158
  %162 = call i32 @Pa_Initialize()
  %163 = call i32 @Pa_GetVersion()
  %164 = call ptr @Pa_GetVersionText()
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.56, i32 noundef %163, ptr noundef %164)
  %166 = call i32 (ptr, ...) @printf(ptr noundef @.str.57)
  call void @PaQa_ListAudioDevices()
  %167 = call i32 @Pa_GetDeviceCount()
  %168 = icmp eq i32 %167, 0
  br i1 %168, label %169, label %171

169:                                              ; preds = %161
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  br label %171

171:                                              ; preds = %169, %161
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str.59)
  %173 = call i32 @ScanForLoopback(ptr noundef %7)
  %174 = call i32 @Pa_Terminate()
  br label %175

175:                                              ; preds = %171, %158, %153
  %176 = load i32, ptr @g_testsFailed, align 4, !tbaa !5
  %177 = icmp eq i32 %176, 0
  br i1 %177, label %178, label %182

178:                                              ; preds = %175
  %179 = load i32, ptr @g_testsPassed, align 4, !tbaa !5
  %180 = load i32, ptr @g_testsFailed, align 4, !tbaa !5
  %181 = call i32 (ptr, ...) @printf(ptr noundef @.str.60, i32 noundef %179, i32 noundef %180)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %186

182:                                              ; preds = %175
  %183 = load i32, ptr @g_testsPassed, align 4, !tbaa !5
  %184 = load i32, ptr @g_testsFailed, align 4, !tbaa !5
  %185 = call i32 (ptr, ...) @printf(ptr noundef @.str.61, i32 noundef %183, i32 noundef %184)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %186

186:                                              ; preds = %182, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %187 = load i32, ptr %3, align 4
  ret i32 %187
}

; 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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #6

declare i32 @PaQa_TestAnalyzer() #1

declare i32 @Pa_Initialize() #1

declare i32 @Pa_GetVersion() #1

declare ptr @Pa_GetVersionText() #1

declare void @PaQa_ListAudioDevices() #1

declare i32 @Pa_GetDeviceCount() #1

; Function Attrs: nounwind uwtable
declare hidden i32 @ScanForLoopback(ptr noundef) #2

declare i32 @Pa_Terminate() #1

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 40}
!14 = !{!"UserOptions_s", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 44}
!15 = !{!14, !6, i64 44}
!16 = !{!14, !6, i64 0}
!17 = !{!14, !6, i64 4}
!18 = !{!14, !6, i64 8}
!19 = !{!14, !6, i64 12}
!20 = !{!14, !10, i64 32}
!21 = !{!7, !7, i64 0}
!22 = !{!14, !6, i64 16}
!23 = !{!14, !6, i64 20}
!24 = distinct !{!24, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.UserOptions_s = type { i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32 }

@g_testsPassed = external dso_local local_unnamed_addr global i32, align 4
@g_testsFailed = external dso_local local_unnamed_addr global i32, align 4
@.str.45 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [55 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @TestSampleFormatConversion() local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
declare dso_local void @usage(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 {
  %3 = alloca %struct.UserOptions_s, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #8
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45)
  %6 = icmp sgt i32 %0, 1
  br i1 %6, label %7, label %.loopexit

7:                                                ; preds = %2
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46)
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %9

9:                                                ; preds = %7, %9
  %indvars.iv = phi i64 [ 1, %7 ], [ %indvars.iv.next, %9 ]
  %10 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47, ptr noundef %11)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %9, !llvm.loop !9

.loopexit:                                        ; preds = %9, %2
  %.str.49.sink = phi ptr [ @.str.49, %2 ], [ @.str.48, %9 ]
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.49.sink)
  %14 = getelementptr inbounds i8, ptr %3, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %14, i8 0, i64 16, i1 false)
  %15 = getelementptr inbounds i8, ptr %3, i64 40
  store i32 -1, ptr %15, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %3, i64 44
  store i32 -1, ptr %16, align 4, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %3, i64 4
  %18 = getelementptr inbounds i8, ptr %3, i64 8
  %19 = getelementptr inbounds i8, ptr %3, i64 12
  %20 = getelementptr inbounds i8, ptr %3, i64 32
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 -1, i64 16, i1 false)
  store ptr @.str.50, ptr %20, align 8, !tbaa !15
  br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.loopexit
  %21 = getelementptr inbounds i8, ptr %3, i64 20
  %22 = getelementptr inbounds i8, ptr %3, i64 16
  br label %23

23:                                               ; preds = %.lr.ph, %79
  %.153 = phi i32 [ 1, %.lr.ph ], [ %80, %79 ]
  %.03952 = phi i32 [ 0, %.lr.ph ], [ %.140, %79 ]
  %24 = sext i32 %.153 to i64
  %25 = getelementptr inbounds ptr, ptr %1, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = load i8, ptr %26, align 1, !tbaa !16
  %28 = icmp eq i8 %27, 45
  br i1 %28, label %29, label %77

29:                                               ; preds = %23
  %30 = getelementptr inbounds i8, ptr %26, i64 1
  %31 = load i8, ptr %30, align 1, !tbaa !16
  switch i8 %31, label %75 [
    i8 105, label %32
    i8 111, label %35
    i8 108, label %38
    i8 114, label %41
    i8 115, label %44
    i8 109, label %47
    i8 119, label %49
    i8 100, label %50
    i8 118, label %52
    i8 104, label %53
    i8 45, label %54
  ]

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %26, i64 2
  %34 = tail call i32 @atoi(ptr nocapture noundef %33) #9
  store i32 %34, ptr %15, align 8, !tbaa !11
  br label %79

35:                                               ; preds = %29
  %36 = getelementptr inbounds i8, ptr %26, i64 2
  %37 = tail call i32 @atoi(ptr nocapture noundef %36) #9
  store i32 %37, ptr %16, align 4, !tbaa !14
  br label %79

38:                                               ; preds = %29
  %39 = getelementptr inbounds i8, ptr %26, i64 2
  %40 = tail call i32 @atoi(ptr nocapture noundef %39) #9
  store i32 %40, ptr %19, align 4, !tbaa !17
  store i32 %40, ptr %18, align 8, !tbaa !18
  br label %79

41:                                               ; preds = %29
  %42 = getelementptr inbounds i8, ptr %26, i64 2
  %43 = tail call i32 @atoi(ptr nocapture noundef %42) #9
  store i32 %43, ptr %3, align 8, !tbaa !19
  br label %79

44:                                               ; preds = %29
  %45 = getelementptr inbounds i8, ptr %26, i64 2
  %46 = tail call i32 @atoi(ptr nocapture noundef %45) #9
  store i32 %46, ptr %17, align 4, !tbaa !20
  br label %79

47:                                               ; preds = %29
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  br label %79

49:                                               ; preds = %29
  store i32 1, ptr %22, align 8, !tbaa !21
  br label %79

50:                                               ; preds = %29
  %51 = getelementptr inbounds i8, ptr %26, i64 2
  store ptr %51, ptr %20, align 8, !tbaa !15
  br label %79

52:                                               ; preds = %29
  store i32 1, ptr %21, align 4, !tbaa !22
  br label %79

53:                                               ; preds = %29
  tail call void @usage(ptr noundef %4)
  tail call void @exit(i32 noundef 0) #10
  unreachable

54:                                               ; preds = %29
  %55 = getelementptr inbounds i8, ptr %26, i64 2
  %56 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %55, ptr noundef nonnull dereferenceable(1) @.str.52) #9
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %64

58:                                               ; preds = %54
  %59 = add nsw i32 %.153, 1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %1, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = tail call i32 @atoi(ptr nocapture noundef %62) #9
  store i32 %63, ptr %18, align 8, !tbaa !18
  br label %79

64:                                               ; preds = %54
  %65 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %55, ptr noundef nonnull dereferenceable(1) @.str.53) #9
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %64
  %68 = add nsw i32 %.153, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds ptr, ptr %1, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = tail call i32 @atoi(ptr nocapture noundef %71) #9
  store i32 %72, ptr %19, align 4, !tbaa !17
  br label %79

73:                                               ; preds = %64
  %74 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54, ptr noundef nonnull %26)
  tail call void @usage(ptr noundef %4)
  tail call void @exit(i32 noundef 1) #10
  unreachable

75:                                               ; preds = %29
  %76 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54, ptr noundef nonnull %26)
  tail call void @usage(ptr noundef %4)
  tail call void @exit(i32 noundef 1) #10
  unreachable

77:                                               ; preds = %23
  %78 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.55, ptr noundef nonnull %26)
  tail call void @usage(ptr noundef %4)
  tail call void @exit(i32 noundef 1) #10
  unreachable

79:                                               ; preds = %32, %35, %38, %41, %44, %47, %49, %50, %52, %67, %58
  %.140 = phi i32 [ %.03952, %58 ], [ %.03952, %67 ], [ %.03952, %52 ], [ %.03952, %50 ], [ %.03952, %49 ], [ 1, %47 ], [ %.03952, %44 ], [ %.03952, %41 ], [ %.03952, %38 ], [ %.03952, %35 ], [ %.03952, %32 ]
  %.2 = phi i32 [ %59, %58 ], [ %68, %67 ], [ %.153, %52 ], [ %.153, %50 ], [ %.153, %49 ], [ %.153, %47 ], [ %.153, %44 ], [ %.153, %41 ], [ %.153, %38 ], [ %.153, %35 ], [ %.153, %32 ]
  %80 = add nsw i32 %.2, 1
  %81 = icmp slt i32 %80, %0
  br i1 %81, label %23, label %._crit_edge.loopexit, !llvm.loop !23

._crit_edge.loopexit:                             ; preds = %79
  %82 = icmp eq i32 %.140, 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.loopexit
  %.039.lcssa = phi i1 [ true, %.loopexit ], [ %82, %._crit_edge.loopexit ]
  %83 = tail call i32 @PaQa_TestAnalyzer() #8
  %84 = tail call i32 @TestSampleFormatConversion()
  %85 = icmp eq i32 %84, 0
  %or.cond = select i1 %85, i1 %.039.lcssa, i1 false
  br i1 %or.cond, label %86, label %100

86:                                               ; preds = %._crit_edge
  %87 = tail call i32 @Pa_Initialize() #8
  %88 = tail call i32 @Pa_GetVersion() #8
  %89 = tail call ptr @Pa_GetVersionText() #8
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56, i32 noundef %88, ptr noundef %89)
  %91 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.57)
  tail call void @PaQa_ListAudioDevices() #8
  %92 = tail call i32 @Pa_GetDeviceCount() #8
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %96

94:                                               ; preds = %86
  %95 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  br label %96

96:                                               ; preds = %94, %86
  %97 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.59)
  %98 = call i32 @ScanForLoopback(ptr noundef nonnull %3)
  %99 = call i32 @Pa_Terminate() #8
  br label %100

100:                                              ; preds = %96, %._crit_edge
  %101 = load i32, ptr @g_testsFailed, align 4, !tbaa !24
  %102 = icmp eq i32 %101, 0
  %103 = load i32, ptr @g_testsPassed, align 4, !tbaa !24
  br i1 %102, label %104, label %106

104:                                              ; preds = %100
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60, i32 noundef %103, i32 noundef 0)
  br label %108

106:                                              ; preds = %100
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.61, i32 noundef %103, i32 noundef %101)
  br label %108

108:                                              ; preds = %106, %104
  %.0 = phi i32 [ 0, %104 ], [ 1, %106 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #8
  ret i32 %.0
}

; 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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6

declare i32 @PaQa_TestAnalyzer() local_unnamed_addr #7

declare i32 @Pa_Initialize() local_unnamed_addr #7

declare i32 @Pa_GetVersion() local_unnamed_addr #7

declare ptr @Pa_GetVersionText() local_unnamed_addr #7

declare void @PaQa_ListAudioDevices() local_unnamed_addr #7

declare i32 @Pa_GetDeviceCount() local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare hidden i32 @ScanForLoopback(ptr noundef) local_unnamed_addr #2

declare i32 @Pa_Terminate() local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { "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 }

!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, !13, i64 40}
!12 = !{!"UserOptions_s", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 44}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 44}
!15 = !{!12, !6, i64 32}
!16 = !{!7, !7, i64 0}
!17 = !{!12, !13, i64 12}
!18 = !{!12, !13, i64 8}
!19 = !{!12, !13, i64 0}
!20 = !{!12, !13, i64 4}
!21 = !{!12, !13, i64 16}
!22 = !{!12, !13, i64 20}
!23 = distinct !{!23, !10}
!24 = !{!13, !13, i64 0}


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