; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/tiny_audio (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", i8, [7 x i8], %"struct.RtApi::RtApiStream", i8, [7 x i8] }>
%"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] }
%"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], i32, %struct.CallbackInfo, [2 x %"struct.RtApi::ConvertInfo"], double }
%struct.CallbackInfo = type { ptr, i32, ptr, ptr, ptr, ptr, i8, i8, i32 }
%"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.3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.9 = 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
define dso_local void @_ZN5RtApi10openStreamEPN7RtAudio16StreamParametersES2_mjPjPFiPvS4_jdjS4_ES4_PNS0_13StreamOptionsEPFvN12RtAudioError4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE(ptr noundef nonnull align 8 dereferenceable(793) %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, ptr noundef %9) #1 align 2 {
  %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 ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = 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
  store ptr %9, ptr %20, align 8, !tbaa !5
  %26 = load ptr, ptr %11, align 8
  %27 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 5
  %28 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %27, i32 0, i32 3
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = icmp ne i32 %29, -50
  br i1 %30, label %31, label %34

31:                                               ; preds = %10
  %32 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 2
  %33 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef @.str.3)
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 7)
  br label %195

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

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 !29
  %41 = icmp ult i32 %40, 1
  br i1 %41, label %42, label %45

42:                                               ; preds = %37
  %43 = getelementptr inbounds %class.RtApi, ptr %26, 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.4)
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 7)
  br label %195

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

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

53:                                               ; preds = %48
  %54 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 2
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef @.str.5)
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 7)
  br label %195

56:                                               ; preds = %48, %45
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %65

59:                                               ; preds = %56
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = icmp eq ptr %60, null
  br i1 %61, label %62, label %65

62:                                               ; preds = %59
  %63 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 2
  %64 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %63, ptr noundef @.str.6)
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 7)
  br label %195

65:                                               ; preds = %59, %56
  %66 = load i64, ptr %14, align 8, !tbaa !9
  %67 = call noundef i32 @_ZN5RtApi11formatBytesEm(ptr noundef nonnull align 8 dereferenceable(793) %26, i64 noundef %66)
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %72

69:                                               ; preds = %65
  %70 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 2
  %71 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %70, ptr noundef @.str.7)
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 7)
  br label %195

72:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %73 = load ptr, ptr %26, align 8, !tbaa !31
  %74 = getelementptr inbounds ptr, ptr %73, i64 3
  %75 = load ptr, ptr %74, align 8
  %76 = call noundef i32 %75(ptr noundef nonnull align 8 dereferenceable(793) %26)
  store i32 %76, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store i32 0, ptr %22, align 4, !tbaa !11
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %92

79:                                               ; preds = %72
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %80, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !29
  store i32 %82, ptr %22, align 4, !tbaa !11
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %83, i32 0, i32 0
  %85 = load i32, ptr %84, align 4, !tbaa !33
  %86 = load i32, ptr %21, align 4, !tbaa !11
  %87 = icmp uge i32 %85, %86
  br i1 %87, label %88, label %91

88:                                               ; preds = %79
  %89 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 2
  %90 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %89, ptr noundef @.str.8)
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 7)
  store i32 1, ptr %23, align 4
  br label %193

91:                                               ; preds = %79
  br label %92

92:                                               ; preds = %91, %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  store i32 0, ptr %24, align 4, !tbaa !11
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %108

95:                                               ; preds = %92
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !29
  store i32 %98, ptr %24, align 4, !tbaa !11
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 4, !tbaa !33
  %102 = load i32, ptr %21, align 4, !tbaa !11
  %103 = icmp uge i32 %101, %102
  br i1 %103, label %104, label %107

104:                                              ; preds = %95
  %105 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 2
  %106 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %105, ptr noundef @.str.9)
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 7)
  store i32 1, ptr %23, align 4
  br label %192

107:                                              ; preds = %95
  br label %108

108:                                              ; preds = %107, %92
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #3
  %109 = load i32, ptr %22, align 4, !tbaa !11
  %110 = icmp ugt i32 %109, 0
  br i1 %110, label %111, label %134

111:                                              ; preds = %108
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 4, !tbaa !33
  %115 = load i32, ptr %22, align 4, !tbaa !11
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %116, i32 0, i32 2
  %118 = load i32, ptr %117, align 4, !tbaa !34
  %119 = load i32, ptr %15, align 4, !tbaa !11
  %120 = load i64, ptr %14, align 8, !tbaa !9
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  %122 = load ptr, ptr %19, align 8, !tbaa !5
  %123 = load ptr, ptr %26, align 8, !tbaa !31
  %124 = getelementptr inbounds ptr, ptr %123, i64 13
  %125 = load ptr, ptr %124, align 8
  %126 = call noundef zeroext i1 %125(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef %114, i32 noundef 0, i32 noundef %115, i32 noundef %118, i32 noundef %119, i64 noundef %120, ptr noundef %121, ptr noundef %122)
  %127 = zext i1 %126 to i8
  store i8 %127, ptr %25, align 1, !tbaa !35
  %128 = load i8, ptr %25, align 1, !tbaa !35, !range !36, !noundef !37
  %129 = trunc i8 %128 to i1
  %130 = zext i1 %129 to i32
  %131 = icmp eq i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %111
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 9)
  store i32 1, ptr %23, align 4
  br label %191

133:                                              ; preds = %111
  br label %134

134:                                              ; preds = %133, %108
  %135 = load i32, ptr %24, align 4, !tbaa !11
  %136 = icmp ugt i32 %135, 0
  br i1 %136, label %137, label %167

137:                                              ; preds = %134
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %138, i32 0, i32 0
  %140 = load i32, ptr %139, align 4, !tbaa !33
  %141 = load i32, ptr %24, align 4, !tbaa !11
  %142 = load ptr, ptr %13, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %142, i32 0, i32 2
  %144 = load i32, ptr %143, align 4, !tbaa !34
  %145 = load i32, ptr %15, align 4, !tbaa !11
  %146 = load i64, ptr %14, align 8, !tbaa !9
  %147 = load ptr, ptr %16, align 8, !tbaa !5
  %148 = load ptr, ptr %19, align 8, !tbaa !5
  %149 = load ptr, ptr %26, align 8, !tbaa !31
  %150 = getelementptr inbounds ptr, ptr %149, i64 13
  %151 = load ptr, ptr %150, align 8
  %152 = call noundef zeroext i1 %151(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef %140, i32 noundef 1, i32 noundef %141, i32 noundef %144, i32 noundef %145, i64 noundef %146, ptr noundef %147, ptr noundef %148)
  %153 = zext i1 %152 to i8
  store i8 %153, ptr %25, align 1, !tbaa !35
  %154 = load i8, ptr %25, align 1, !tbaa !35, !range !36, !noundef !37
  %155 = trunc i8 %154 to i1
  %156 = zext i1 %155 to i32
  %157 = icmp eq i32 %156, 0
  br i1 %157, label %158, label %166

158:                                              ; preds = %137
  %159 = load i32, ptr %22, align 4, !tbaa !11
  %160 = icmp ugt i32 %159, 0
  br i1 %160, label %161, label %165

161:                                              ; preds = %158
  %162 = load ptr, ptr %26, align 8, !tbaa !31
  %163 = getelementptr inbounds ptr, ptr %162, i64 7
  %164 = load ptr, ptr %163, align 8
  call void %164(ptr noundef nonnull align 8 dereferenceable(793) %26)
  br label %165

165:                                              ; preds = %161, %158
  call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %26, i32 noundef 9)
  store i32 1, ptr %23, align 4
  br label %191

166:                                              ; preds = %137
  br label %167

167:                                              ; preds = %166, %134
  %168 = load ptr, ptr %17, align 8, !tbaa !5
  %169 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 5
  %170 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %169, i32 0, i32 20
  %171 = getelementptr inbounds %struct.CallbackInfo, ptr %170, i32 0, i32 2
  store ptr %168, ptr %171, align 8, !tbaa !38
  %172 = load ptr, ptr %18, align 8, !tbaa !5
  %173 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 5
  %174 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %173, i32 0, i32 20
  %175 = getelementptr inbounds %struct.CallbackInfo, ptr %174, i32 0, i32 3
  store ptr %172, ptr %175, align 8, !tbaa !39
  %176 = load ptr, ptr %20, align 8, !tbaa !5
  %177 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 5
  %178 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %177, i32 0, i32 20
  %179 = getelementptr inbounds %struct.CallbackInfo, ptr %178, i32 0, i32 4
  store ptr %176, ptr %179, align 8, !tbaa !40
  %180 = load ptr, ptr %19, align 8, !tbaa !5
  %181 = icmp ne ptr %180, null
  br i1 %181, label %182, label %188

182:                                              ; preds = %167
  %183 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 5
  %184 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %183, i32 0, i32 12
  %185 = load i32, ptr %184, align 8, !tbaa !41
  %186 = load ptr, ptr %19, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.RtAudio::StreamOptions", ptr %186, i32 0, i32 1
  store i32 %185, ptr %187, align 4, !tbaa !42
  br label %188

188:                                              ; preds = %182, %167
  %189 = getelementptr inbounds %class.RtApi, ptr %26, i32 0, i32 5
  %190 = getelementptr inbounds %"struct.RtApi::RtApiStream", ptr %189, i32 0, i32 3
  store i32 0, ptr %190, align 4, !tbaa !13
  store i32 0, ptr %23, align 4
  br label %191

191:                                              ; preds = %188, %165, %132
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #3
  br label %192

192:                                              ; preds = %191, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  br label %193

193:                                              ; preds = %192, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  %194 = load i32, ptr %23, align 4
  switch i32 %194, label %196 [
    i32 0, label %195
    i32 1, label %195
  ]

195:                                              ; preds = %193, %193, %69, %62, %53, %42, %31
  ret void

196:                                              ; preds = %193
  unreachable
}

; 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
declare dso_local void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793), i32 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5RtApi11formatBytesEm(ptr noundef nonnull align 8 dereferenceable(793), 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, !26, i64 444}
!14 = !{!"_ZTS5RtApi", !15, i64 8, !21, i64 384, !23, i64 416, !24, i64 424, !23, i64 792}
!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 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN5RtApi11RtApiStreamE", !7, i64 0, !6, i64 8, !25, i64 16, !26, i64 20, !7, i64 24, !6, i64 40, !7, i64 48, !23, 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, !12, i64 136, !27, i64 144, !7, i64 200, !28, i64 360}
!25 = !{!"_ZTSN5RtApi10StreamModeE", !7, i64 0}
!26 = !{!"_ZTSN5RtApi11StreamStateE", !7, i64 0}
!27 = !{!"_ZTS12CallbackInfo", !6, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !23, i64 48, !23, i64 49, !12, i64 52}
!28 = !{!"double", !7, i64 0}
!29 = !{!30, !12, i64 4}
!30 = !{!"_ZTSN7RtAudio16StreamParametersE", !12, i64 0, !12, i64 4, !12, i64 8}
!31 = !{!32, !32, i64 0}
!32 = !{!"vtable pointer", !8, i64 0}
!33 = !{!30, !12, i64 0}
!34 = !{!30, !12, i64 8}
!35 = !{!23, !23, i64 0}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = !{!14, !6, i64 584}
!39 = !{!14, !6, i64 592}
!40 = !{!14, !6, i64 600}
!41 = !{!14, !12, i64 488}
!42 = !{!43, !12, i64 4}
!43 = !{!"_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.3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [60 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5RtApi10openStreamEPN7RtAudio16StreamParametersES2_mjPjPFiPvS4_jdjS4_ES4_PNS0_13StreamOptionsEPFvN12RtAudioError4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE(ptr noundef nonnull align 8 dereferenceable(793) %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, ptr noundef %9) local_unnamed_addr #0 align 2 {
  %11 = getelementptr inbounds i8, ptr %0, i64 444
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %.not = icmp eq i32 %12, -50
  br i1 %.not, label %16, label %13

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %0, i64 384
  %15 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.3)
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 7)
  br label %94

16:                                               ; preds = %10
  tail call void @_ZN5RtApi15clearStreamInfoEv(ptr noundef nonnull align 8 dereferenceable(793) %0)
  %.not45 = icmp eq ptr %1, null
  br i1 %.not45, label %24, label %17

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

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.4)
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 7)
  br label %94

24:                                               ; preds = %16
  %.not46 = icmp eq ptr %2, null
  br i1 %.not46, label %32, label %25

.thread53:                                        ; preds = %17
  %.not4654 = icmp eq ptr %2, null
  br i1 %.not4654, label %.thread, label %25

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

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %0, i64 384
  %31 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull @.str.5)
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 7)
  br label %94

32:                                               ; preds = %24
  %33 = getelementptr inbounds i8, ptr %0, i64 384
  %34 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull @.str.6)
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 7)
  br label %94

.thread:                                          ; preds = %.thread53, %25
  %.not4655 = phi i1 [ false, %25 ], [ true, %.thread53 ]
  %35 = tail call noundef i32 @_ZN5RtApi11formatBytesEm(ptr noundef nonnull align 8 dereferenceable(793) %0, i64 noundef %3)
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %40

37:                                               ; preds = %.thread
  %38 = getelementptr inbounds i8, ptr %0, i64 384
  %39 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str.7)
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 7)
  br label %94

40:                                               ; preds = %.thread
  %41 = load ptr, ptr %0, align 8, !tbaa !28
  %42 = getelementptr inbounds i8, ptr %41, i64 24
  %43 = load ptr, ptr %42, align 8
  %44 = tail call noundef i32 %43(ptr noundef nonnull align 8 dereferenceable(793) %0)
  br i1 %.not45, label %52, label %45

45:                                               ; preds = %40
  %46 = getelementptr inbounds i8, ptr %1, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !26
  %48 = load i32, ptr %1, align 4, !tbaa !30
  %.not47 = icmp ult i32 %48, %44
  br i1 %.not47, label %52, label %49

49:                                               ; preds = %45
  %50 = getelementptr inbounds i8, ptr %0, i64 384
  %51 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull @.str.8)
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 7)
  br label %94

52:                                               ; preds = %45, %40
  %.040 = phi i32 [ %47, %45 ], [ 0, %40 ]
  br i1 %.not4655, label %60, label %53

53:                                               ; preds = %52
  %54 = getelementptr inbounds i8, ptr %2, i64 4
  %55 = load i32, ptr %54, align 4, !tbaa !26
  %56 = load i32, ptr %2, align 4, !tbaa !30
  %.not48 = icmp ult i32 %56, %44
  br i1 %.not48, label %60, label %57

57:                                               ; preds = %53
  %58 = getelementptr inbounds i8, ptr %0, i64 384
  %59 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef nonnull @.str.9)
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 7)
  br label %94

60:                                               ; preds = %53, %52
  %.0 = phi i32 [ %55, %53 ], [ 0, %52 ]
  %.not49 = icmp eq i32 %.040, 0
  br i1 %.not49, label %70, label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %1, align 4, !tbaa !30
  %63 = getelementptr inbounds i8, ptr %1, i64 8
  %64 = load i32, ptr %63, align 4, !tbaa !31
  %65 = load ptr, ptr %0, align 8, !tbaa !28
  %66 = getelementptr inbounds i8, ptr %65, i64 104
  %67 = load ptr, ptr %66, align 8
  %68 = tail call noundef zeroext i1 %67(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef %62, i32 noundef 0, i32 noundef %.040, i32 noundef %64, i32 noundef %4, i64 noundef %3, ptr noundef %5, ptr noundef %8)
  br i1 %68, label %70, label %69

69:                                               ; preds = %61
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 9)
  br label %94

70:                                               ; preds = %61, %60
  %.not50 = icmp eq i32 %.0, 0
  br i1 %.not50, label %85, label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %2, align 4, !tbaa !30
  %73 = getelementptr inbounds i8, ptr %2, i64 8
  %74 = load i32, ptr %73, align 4, !tbaa !31
  %75 = load ptr, ptr %0, align 8, !tbaa !28
  %76 = getelementptr inbounds i8, ptr %75, i64 104
  %77 = load ptr, ptr %76, align 8
  %78 = tail call noundef zeroext i1 %77(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef %72, i32 noundef 1, i32 noundef %.0, i32 noundef %74, i32 noundef %4, i64 noundef %3, ptr noundef %5, ptr noundef %8)
  br i1 %78, label %85, label %79

79:                                               ; preds = %71
  br i1 %.not49, label %84, label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %0, align 8, !tbaa !28
  %82 = getelementptr inbounds i8, ptr %81, i64 56
  %83 = load ptr, ptr %82, align 8
  tail call void %83(ptr noundef nonnull align 8 dereferenceable(793) %0)
  br label %84

84:                                               ; preds = %80, %79
  tail call void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793) %0, i32 noundef 9)
  br label %94

85:                                               ; preds = %71, %70
  %86 = getelementptr inbounds i8, ptr %0, i64 584
  store ptr %6, ptr %86, align 8, !tbaa !32
  %87 = getelementptr inbounds i8, ptr %0, i64 592
  store ptr %7, ptr %87, align 8, !tbaa !33
  %88 = getelementptr inbounds i8, ptr %0, i64 600
  store ptr %9, ptr %88, align 8, !tbaa !34
  %.not51 = icmp eq ptr %8, null
  br i1 %.not51, label %93, label %89

89:                                               ; preds = %85
  %90 = getelementptr inbounds i8, ptr %0, i64 488
  %91 = load i32, ptr %90, align 8, !tbaa !35
  %92 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %91, ptr %92, align 4, !tbaa !36
  br label %93

93:                                               ; preds = %89, %85
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %49, %69, %84, %93, %57, %37, %32, %29, %21, %13
  ret void
}

; 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
declare dso_local void @_ZN5RtApi5errorEN12RtAudioError4TypeE(ptr noundef nonnull align 8 dereferenceable(793), i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5RtApi11formatBytesEm(ptr noundef nonnull align 8 dereferenceable(793), 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, !22, i64 444}
!6 = !{!"_ZTS5RtApi", !7, i64 8, !16, i64 384, !19, i64 416, !20, i64 424, !19, i64 792}
!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 = !{!"bool", !12, i64 0}
!20 = !{!"_ZTSN5RtApi11RtApiStreamE", !12, i64 0, !11, i64 8, !21, i64 16, !22, i64 20, !12, i64 24, !11, i64 40, !12, i64 48, !19, i64 50, !12, i64 51, !12, i64 53, !23, i64 56, !23, i64 60, !23, i64 64, !12, i64 68, !12, i64 76, !12, i64 84, !12, i64 96, !18, i64 112, !12, i64 120, !23, i64 136, !24, i64 144, !12, i64 200, !25, i64 360}
!21 = !{!"_ZTSN5RtApi10StreamModeE", !12, i64 0}
!22 = !{!"_ZTSN5RtApi11StreamStateE", !12, i64 0}
!23 = !{!"int", !12, i64 0}
!24 = !{!"_ZTS12CallbackInfo", !11, i64 0, !23, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !19, i64 48, !19, i64 49, !23, i64 52}
!25 = !{!"double", !12, i64 0}
!26 = !{!27, !23, i64 4}
!27 = !{!"_ZTSN7RtAudio16StreamParametersE", !23, i64 0, !23, i64 4, !23, i64 8}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !13, i64 0}
!30 = !{!27, !23, i64 0}
!31 = !{!27, !23, i64 8}
!32 = !{!6, !11, i64 584}
!33 = !{!6, !11, i64 592}
!34 = !{!6, !11, i64 600}
!35 = !{!6, !23, i64 488}
!36 = !{!37, !23, i64 4}
!37 = !{!"_ZTSN7RtAudio13StreamOptionsE", !23, i64 0, !23, i64 4, !16, i64 8, !23, i64 40}


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