; LLVM IR from TobiasKozel/VAE :: external/rtaudio (RtAudio)

; 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"

%class.RtApi = type { ptr, %"class.std::__cxx11::basic_ostringstream", %"class.std::__cxx11::basic_string", %"class.std::function", i8, %"struct.RtApi::RtApiStream" }
%"class.std::__cxx11::basic_ostringstream" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"struct.RtApi::RtApiStream" = type { [2 x i32], ptr, i32, i32, [2 x ptr], ptr, [2 x i8], i8, [2 x i8], [2 x i8], i32, i32, i32, [2 x i32], [2 x i32], [2 x i32], [2 x i64], i64, [2 x i64], %union.pthread_mutex_t, %struct.CallbackInfo, [2 x %"struct.RtApi::ConvertInfo"], double }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.CallbackInfo = type <{ ptr, i64, ptr, ptr, ptr, i8, i8, [2 x i8], i32, i8, [7 x i8] }>
%"struct.RtApi::ConvertInfo" = type { i32, i32, i32, i64, i64, %"class.std::vector.3", %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.RtAudio::StreamParameters" = type { i32, i32, i32 }
%"struct.RtAudio::StreamOptions" = type <{ i32, i32, %"class.std::__cxx11::basic_string", i32, [4 x i8] }>

@.str.24 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [60 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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5RtApi10openStreamEPN7RtAudio16StreamParametersES2_mjPjPFiPvS4_jdjS4_ES4_PNS0_13StreamOptionsE(ptr noundef nonnull align 8 dereferenceable(856) %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #1 align 2 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i8, align 1
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store i64 %3, ptr %14, align 8, !tbaa !9
  store i32 %4, ptr %15, align 4, !tbaa !11
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  %25 = load ptr, ptr %11, align 8
  %26 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 5
  %27 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %26, i32 0, i32 3
  %28 = load i32, ptr %27, align 4, !tbaa !13
  %29 = icmp ne i32 %28, -50
  br i1 %29, label %30, label %34

30:                                               ; preds = %9
  %31 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 2
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str.24)
  %33 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 8)
  store i32 %33, ptr %10, align 4
  br label %191

34:                                               ; preds = %9
  call void @_ZN5RtApi15clearStreamInfoEv(ptr noundef nonnull align 8 dereferenceable(856) %25)
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %46

37:                                               ; preds = %34
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !31
  %41 = icmp ult i32 %40, 1
  br i1 %41, label %42, label %46

42:                                               ; preds = %37
  %43 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 2
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef @.str.25)
  %45 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 8)
  store i32 %45, ptr %10, align 4
  br label %191

46:                                               ; preds = %37, %34
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %58

49:                                               ; preds = %46
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !31
  %53 = icmp ult i32 %52, 1
  br i1 %53, label %54, label %58

54:                                               ; preds = %49
  %55 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 2
  %56 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef @.str.26)
  %57 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 8)
  store i32 %57, ptr %10, align 4
  br label %191

58:                                               ; preds = %49, %46
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %68

61:                                               ; preds = %58
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = icmp eq ptr %62, null
  br i1 %63, label %64, label %68

64:                                               ; preds = %61
  %65 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 2
  %66 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %65, ptr noundef @.str.27)
  %67 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 8)
  store i32 %67, ptr %10, align 4
  br label %191

68:                                               ; preds = %61, %58
  %69 = load i64, ptr %14, align 8, !tbaa !9
  %70 = call noundef i32 @_ZN5RtApi11formatBytesEm(ptr noundef nonnull align 8 dereferenceable(856) %25, i64 noundef %69)
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %76

72:                                               ; preds = %68
  %73 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 2
  %74 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef @.str.28)
  %75 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 8)
  store i32 %75, ptr %10, align 4
  br label %191

76:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %77 = load ptr, ptr %25, align 8, !tbaa !33
  %78 = getelementptr inbounds ptr, ptr %77, i64 3
  %79 = load ptr, ptr %78, align 8
  %80 = call noundef i32 %79(ptr noundef nonnull align 8 dereferenceable(856) %25)
  store i32 %80, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store i32 0, ptr %21, align 4, !tbaa !11
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %97

83:                                               ; preds = %76
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !31
  store i32 %86, ptr %21, align 4, !tbaa !11
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 4, !tbaa !35
  %90 = load i32, ptr %20, align 4, !tbaa !11
  %91 = icmp uge i32 %89, %90
  br i1 %91, label %92, label %96

92:                                               ; preds = %83
  %93 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 2
  %94 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %93, ptr noundef @.str.29)
  %95 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 8)
  store i32 %95, ptr %10, align 4
  store i32 1, ptr %22, align 4
  br label %190

96:                                               ; preds = %83
  br label %97

97:                                               ; preds = %96, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  store i32 0, ptr %23, align 4, !tbaa !11
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %114

100:                                              ; preds = %97
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 4, !tbaa !31
  store i32 %103, ptr %23, align 4, !tbaa !11
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 4, !tbaa !35
  %107 = load i32, ptr %20, align 4, !tbaa !11
  %108 = icmp uge i32 %106, %107
  br i1 %108, label %109, label %113

109:                                              ; preds = %100
  %110 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 2
  %111 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %110, ptr noundef @.str.30)
  %112 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 8)
  store i32 %112, ptr %10, align 4
  store i32 1, ptr %22, align 4
  br label %189

113:                                              ; preds = %100
  br label %114

114:                                              ; preds = %113, %97
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #3
  %115 = load i32, ptr %21, align 4, !tbaa !11
  %116 = icmp ugt i32 %115, 0
  br i1 %116, label %117, label %141

117:                                              ; preds = %114
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %118, i32 0, i32 0
  %120 = load i32, ptr %119, align 4, !tbaa !35
  %121 = load i32, ptr %21, align 4, !tbaa !11
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %122, i32 0, i32 2
  %124 = load i32, ptr %123, align 4, !tbaa !36
  %125 = load i32, ptr %15, align 4, !tbaa !11
  %126 = load i64, ptr %14, align 8, !tbaa !9
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  %129 = load ptr, ptr %25, align 8, !tbaa !33
  %130 = getelementptr inbounds ptr, ptr %129, i64 13
  %131 = load ptr, ptr %130, align 8
  %132 = call noundef zeroext i1 %131(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef %120, i32 noundef 0, i32 noundef %121, i32 noundef %124, i32 noundef %125, i64 noundef %126, ptr noundef %127, ptr noundef %128)
  %133 = zext i1 %132 to i8
  store i8 %133, ptr %24, align 1, !tbaa !37
  %134 = load i8, ptr %24, align 1, !tbaa !37, !range !38, !noundef !39
  %135 = trunc i8 %134 to i1
  %136 = zext i1 %135 to i32
  %137 = icmp eq i32 %136, 0
  br i1 %137, label %138, label %140

138:                                              ; preds = %117
  %139 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 10)
  store i32 %139, ptr %10, align 4
  store i32 1, ptr %22, align 4
  br label %188

140:                                              ; preds = %117
  br label %141

141:                                              ; preds = %140, %114
  %142 = load i32, ptr %23, align 4, !tbaa !11
  %143 = icmp ugt i32 %142, 0
  br i1 %143, label %144, label %168

144:                                              ; preds = %141
  %145 = load ptr, ptr %13, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %145, i32 0, i32 0
  %147 = load i32, ptr %146, align 4, !tbaa !35
  %148 = load i32, ptr %23, align 4, !tbaa !11
  %149 = load ptr, ptr %13, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %149, i32 0, i32 2
  %151 = load i32, ptr %150, align 4, !tbaa !36
  %152 = load i32, ptr %15, align 4, !tbaa !11
  %153 = load i64, ptr %14, align 8, !tbaa !9
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  %155 = load ptr, ptr %19, align 8, !tbaa !5
  %156 = load ptr, ptr %25, align 8, !tbaa !33
  %157 = getelementptr inbounds ptr, ptr %156, i64 13
  %158 = load ptr, ptr %157, align 8
  %159 = call noundef zeroext i1 %158(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef %147, i32 noundef 1, i32 noundef %148, i32 noundef %151, i32 noundef %152, i64 noundef %153, ptr noundef %154, ptr noundef %155)
  %160 = zext i1 %159 to i8
  store i8 %160, ptr %24, align 1, !tbaa !37
  %161 = load i8, ptr %24, align 1, !tbaa !37, !range !38, !noundef !39
  %162 = trunc i8 %161 to i1
  %163 = zext i1 %162 to i32
  %164 = icmp eq i32 %163, 0
  br i1 %164, label %165, label %167

165:                                              ; preds = %144
  %166 = call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %25, i32 noundef 10)
  store i32 %166, ptr %10, align 4
  store i32 1, ptr %22, align 4
  br label %188

167:                                              ; preds = %144
  br label %168

168:                                              ; preds = %167, %141
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 5
  %171 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %170, i32 0, i32 20
  %172 = getelementptr inbounds %struct.CallbackInfo, ptr %171, i32 0, i32 2
  store ptr %169, ptr %172, align 8, !tbaa !40
  %173 = load ptr, ptr %18, align 8, !tbaa !5
  %174 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 5
  %175 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %174, i32 0, i32 20
  %176 = getelementptr inbounds %struct.CallbackInfo, ptr %175, i32 0, i32 3
  store ptr %173, ptr %176, align 8, !tbaa !41
  %177 = load ptr, ptr %19, align 8, !tbaa !5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %185

179:                                              ; preds = %168
  %180 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 5
  %181 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %180, i32 0, i32 12
  %182 = load i32, ptr %181, align 8, !tbaa !42
  %183 = load ptr, ptr %19, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.RtAudio::StreamOptions", ptr %183, i32 0, i32 1
  store i32 %182, ptr %184, align 4, !tbaa !43
  br label %185

185:                                              ; preds = %179, %168
  %186 = getelementptr inbounds %class.RtApi, ptr %25, i32 0, i32 5
  %187 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %186, i32 0, i32 3
  store i32 0, ptr %187, align 4, !tbaa !13
  store i32 0, ptr %10, align 4
  store i32 1, ptr %22, align 4
  br label %188

188:                                              ; preds = %185, %165, %138
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #3
  br label %189

189:                                              ; preds = %188, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  br label %190

190:                                              ; preds = %189, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  br label %191

191:                                              ; preds = %190, %72, %64, %54, %42, %30
  %192 = load i32, ptr %10, align 4
  ret i32 %192
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5RtApi15clearStreamInfoEv(ptr noundef nonnull align 8 dereferenceable(856)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5RtApi11formatBytesEm(ptr noundef nonnull align 8 dereferenceable(856), i64 noundef) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { mustprogress 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 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !28, i64 476}
!14 = !{!"_ZTS5RtApi", !15, i64 8, !21, i64 384, !23, i64 416, !25, i64 448, !26, i64 456}
!15 = !{!"_ZTSNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8}
!16 = !{!"_ZTSSo"}
!17 = !{!"_ZTSNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE", !18, i64 0, !20, i64 64, !21, i64 72}
!18 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !19, i64 56}
!19 = !{!"_ZTSSt6locale", !6, i64 0}
!20 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !10, i64 8, !7, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!23 = !{!"_ZTSSt8functionIFv16RtAudioErrorTypeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !24, i64 0, !6, i64 24}
!24 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTSN5RtApi11RtApiStreamE", !7, i64 0, !6, i64 8, !27, i64 16, !28, i64 20, !7, i64 24, !6, i64 40, !7, i64 48, !25, i64 50, !7, i64 51, !7, i64 53, !12, i64 56, !12, i64 60, !12, i64 64, !7, i64 68, !7, i64 76, !7, i64 84, !7, i64 96, !10, i64 112, !7, i64 120, !7, i64 136, !29, i64 176, !7, i64 232, !30, i64 392}
!27 = !{!"_ZTSN5RtApi10StreamModeE", !7, i64 0}
!28 = !{!"_ZTSN5RtApi11StreamStateE", !7, i64 0}
!29 = !{!"_ZTS12CallbackInfo", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !25, i64 40, !25, i64 41, !12, i64 44, !25, i64 48}
!30 = !{!"double", !7, i64 0}
!31 = !{!32, !12, i64 4}
!32 = !{!"_ZTSN7RtAudio16StreamParametersE", !12, i64 0, !12, i64 4, !12, i64 8}
!33 = !{!34, !34, i64 0}
!34 = !{!"vtable pointer", !8, i64 0}
!35 = !{!32, !12, i64 0}
!36 = !{!32, !12, i64 8}
!37 = !{!25, !25, i64 0}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!14, !6, i64 648}
!41 = !{!14, !6, i64 656}
!42 = !{!14, !12, i64 520}
!43 = !{!44, !12, i64 4}
!44 = !{!"_ZTSN7RtAudio13StreamOptionsE", !12, i64 0, !12, i64 4, !21, i64 8, !12, i64 40}


; 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.24 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [60 x i8], align 1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5RtApi10openStreamEPN7RtAudio16StreamParametersES2_mjPjPFiPvS4_jdjS4_ES4_PNS0_13StreamOptionsE(ptr noundef nonnull align 8 dereferenceable(856) %0, ptr noundef readonly %1, ptr noundef readonly %2, i64 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 align 2 {
  %10 = getelementptr inbounds i8, ptr %0, i64 476
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %.not = icmp eq i32 %11, -50
  br i1 %.not, label %16, label %12

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 384
  %14 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.24)
  %15 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 8)
  br label %96

16:                                               ; preds = %9
  tail call void @_ZN5RtApi15clearStreamInfoEv(ptr noundef nonnull align 8 dereferenceable(856) %0)
  %.not46 = icmp eq ptr %1, null
  br i1 %.not46, label %25, label %17

17:                                               ; preds = %16
  %18 = getelementptr inbounds i8, ptr %1, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !28
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %.thread54

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %0, i64 384
  %23 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull @.str.25)
  %24 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 8)
  br label %96

25:                                               ; preds = %16
  %.not47 = icmp eq ptr %2, null
  br i1 %.not47, label %34, label %26

.thread54:                                        ; preds = %17
  %.not4755 = icmp eq ptr %2, null
  br i1 %.not4755, label %.thread, label %26

26:                                               ; preds = %.thread54, %25
  %27 = getelementptr inbounds i8, ptr %2, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !28
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %.thread

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %0, i64 384
  %32 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull @.str.26)
  %33 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 8)
  br label %96

34:                                               ; preds = %25
  %35 = getelementptr inbounds i8, ptr %0, i64 384
  %36 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull @.str.27)
  %37 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 8)
  br label %96

.thread:                                          ; preds = %.thread54, %26
  %.not4756 = phi i1 [ false, %26 ], [ true, %.thread54 ]
  %38 = tail call noundef i32 @_ZN5RtApi11formatBytesEm(ptr noundef nonnull align 8 dereferenceable(856) %0, i64 noundef %3)
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %44

40:                                               ; preds = %.thread
  %41 = getelementptr inbounds i8, ptr %0, i64 384
  %42 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef nonnull @.str.28)
  %43 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 8)
  br label %96

44:                                               ; preds = %.thread
  %45 = load ptr, ptr %0, align 8, !tbaa !30
  %46 = getelementptr inbounds i8, ptr %45, i64 24
  %47 = load ptr, ptr %46, align 8
  %48 = tail call noundef i32 %47(ptr noundef nonnull align 8 dereferenceable(856) %0)
  br i1 %.not46, label %57, label %49

49:                                               ; preds = %44
  %50 = getelementptr inbounds i8, ptr %1, i64 4
  %51 = load i32, ptr %50, align 4, !tbaa !28
  %52 = load i32, ptr %1, align 4, !tbaa !32
  %.not48 = icmp ult i32 %52, %48
  br i1 %.not48, label %57, label %53

53:                                               ; preds = %49
  %54 = getelementptr inbounds i8, ptr %0, i64 384
  %55 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef nonnull @.str.29)
  %56 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 8)
  br label %96

57:                                               ; preds = %49, %44
  %.039 = phi i32 [ %51, %49 ], [ 0, %44 ]
  br i1 %.not4756, label %66, label %58

58:                                               ; preds = %57
  %59 = getelementptr inbounds i8, ptr %2, i64 4
  %60 = load i32, ptr %59, align 4, !tbaa !28
  %61 = load i32, ptr %2, align 4, !tbaa !32
  %.not49 = icmp ult i32 %61, %48
  br i1 %.not49, label %66, label %62

62:                                               ; preds = %58
  %63 = getelementptr inbounds i8, ptr %0, i64 384
  %64 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %63, ptr noundef nonnull @.str.30)
  %65 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 8)
  br label %96

66:                                               ; preds = %58, %57
  %.0 = phi i32 [ %60, %58 ], [ 0, %57 ]
  %.not50 = icmp eq i32 %.039, 0
  br i1 %.not50, label %77, label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %1, align 4, !tbaa !32
  %69 = getelementptr inbounds i8, ptr %1, i64 8
  %70 = load i32, ptr %69, align 4, !tbaa !33
  %71 = load ptr, ptr %0, align 8, !tbaa !30
  %72 = getelementptr inbounds i8, ptr %71, i64 104
  %73 = load ptr, ptr %72, align 8
  %74 = tail call noundef zeroext i1 %73(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef %68, i32 noundef 0, i32 noundef %.039, i32 noundef %70, i32 noundef %4, i64 noundef %3, ptr noundef %5, ptr noundef %8)
  br i1 %74, label %77, label %75

75:                                               ; preds = %67
  %76 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 10)
  br label %96

77:                                               ; preds = %67, %66
  %.not51 = icmp eq i32 %.0, 0
  br i1 %.not51, label %88, label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %2, align 4, !tbaa !32
  %80 = getelementptr inbounds i8, ptr %2, i64 8
  %81 = load i32, ptr %80, align 4, !tbaa !33
  %82 = load ptr, ptr %0, align 8, !tbaa !30
  %83 = getelementptr inbounds i8, ptr %82, i64 104
  %84 = load ptr, ptr %83, align 8
  %85 = tail call noundef zeroext i1 %84(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef %79, i32 noundef 1, i32 noundef %.0, i32 noundef %81, i32 noundef %4, i64 noundef %3, ptr noundef %5, ptr noundef %8)
  br i1 %85, label %88, label %86

86:                                               ; preds = %78
  %87 = tail call noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856) %0, i32 noundef 10)
  br label %96

88:                                               ; preds = %78, %77
  %89 = getelementptr inbounds i8, ptr %0, i64 648
  store ptr %6, ptr %89, align 8, !tbaa !34
  %90 = getelementptr inbounds i8, ptr %0, i64 656
  store ptr %7, ptr %90, align 8, !tbaa !35
  %.not52 = icmp eq ptr %8, null
  br i1 %.not52, label %95, label %91

91:                                               ; preds = %88
  %92 = getelementptr inbounds i8, ptr %0, i64 520
  %93 = load i32, ptr %92, align 8, !tbaa !36
  %94 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %93, ptr %94, align 4, !tbaa !37
  br label %95

95:                                               ; preds = %91, %88
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %53, %75, %86, %95, %62, %40, %34, %30, %21, %12
  %.3 = phi i32 [ %15, %12 ], [ %24, %21 ], [ %33, %30 ], [ %37, %34 ], [ %43, %40 ], [ %56, %53 ], [ %65, %62 ], [ %76, %75 ], [ %87, %86 ], [ 0, %95 ]
  ret i32 %.3
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5RtApi15clearStreamInfoEv(ptr noundef nonnull align 8 dereferenceable(856)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5RtApi5errorE16RtAudioErrorType(ptr noundef nonnull align 8 dereferenceable(856), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5RtApi11formatBytesEm(ptr noundef nonnull align 8 dereferenceable(856), i64 noundef) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress 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 = { mustprogress 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" }

!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, !24, i64 476}
!6 = !{!"_ZTS5RtApi", !7, i64 8, !16, i64 384, !19, i64 416, !21, i64 448, !22, i64 456}
!7 = !{!"_ZTSNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE", !8, i64 0, !9, i64 8}
!8 = !{!"_ZTSSo"}
!9 = !{!"_ZTSNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE", !10, i64 0, !15, i64 64, !16, i64 72}
!10 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !14, i64 56}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSSt6locale", !11, i64 0}
!15 = !{!"_ZTSSt13_Ios_Openmode", !12, i64 0}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !18, i64 8, !12, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!18 = !{!"long", !12, i64 0}
!19 = !{!"_ZTSSt8functionIFv16RtAudioErrorTypeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !20, i64 0, !11, i64 24}
!20 = !{!"_ZTSSt14_Function_base", !12, i64 0, !11, i64 16}
!21 = !{!"bool", !12, i64 0}
!22 = !{!"_ZTSN5RtApi11RtApiStreamE", !12, i64 0, !11, i64 8, !23, i64 16, !24, i64 20, !12, i64 24, !11, i64 40, !12, i64 48, !21, i64 50, !12, i64 51, !12, i64 53, !25, i64 56, !25, i64 60, !25, i64 64, !12, i64 68, !12, i64 76, !12, i64 84, !12, i64 96, !18, i64 112, !12, i64 120, !12, i64 136, !26, i64 176, !12, i64 232, !27, i64 392}
!23 = !{!"_ZTSN5RtApi10StreamModeE", !12, i64 0}
!24 = !{!"_ZTSN5RtApi11StreamStateE", !12, i64 0}
!25 = !{!"int", !12, i64 0}
!26 = !{!"_ZTS12CallbackInfo", !11, i64 0, !18, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !21, i64 40, !21, i64 41, !25, i64 44, !21, i64 48}
!27 = !{!"double", !12, i64 0}
!28 = !{!29, !25, i64 4}
!29 = !{!"_ZTSN7RtAudio16StreamParametersE", !25, i64 0, !25, i64 4, !25, i64 8}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !13, i64 0}
!32 = !{!29, !25, i64 0}
!33 = !{!29, !25, i64 8}
!34 = !{!6, !11, i64 648}
!35 = !{!6, !11, i64 656}
!36 = !{!6, !25, i64 520}
!37 = !{!38, !25, i64 4}
!38 = !{!"_ZTSN7RtAudio13StreamOptionsE", !25, i64 0, !25, i64 4, !16, i64 8, !25, i64 40}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass