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

; 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.RtAudio::StreamParameters" = type { i32, i32, i32 }
%"struct.RtAudio::StreamOptions" = type <{ i32, i32, %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"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::allocator" = type { i8 }
%struct.rtaudio = type { ptr, ptr, ptr, i32, [512 x i8] }
%struct.rtaudio_stream_parameters = type { i32, i32, i32 }
%struct.rtaudio_stream_options = type { i32, i32, i32, [512 x i8] }

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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 i32 @rtaudio_open_stream(ptr noundef %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) #2 personality ptr @__gxx_personality_v0 {
  %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 ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"struct.RtAudio::StreamParameters", align 4
  %25 = alloca %"struct.RtAudio::StreamParameters", align 4
  %26 = alloca %"struct.RtAudio::StreamOptions", align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  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
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.rtaudio, ptr %31, i32 0, i32 3
  store i32 -1, ptr %32, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store ptr null, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  store ptr null, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #6
  call void @_ZN7RtAudio16StreamParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #6
  call void @_ZN7RtAudio16StreamParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %25) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %26) #6
  call void @_ZN7RtAudio13StreamOptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(44) %26) #6
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %48

35:                                               ; preds = %10
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.rtaudio_stream_parameters, ptr %36, i32 0, i32 0
  %38 = load i32, ptr %37, align 4, !tbaa !16
  %39 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %24, i32 0, i32 0
  store i32 %38, ptr %39, align 4, !tbaa !18
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.rtaudio_stream_parameters, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !20
  %43 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %24, i32 0, i32 1
  store i32 %42, ptr %43, align 4, !tbaa !21
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.rtaudio_stream_parameters, ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 4, !tbaa !22
  %47 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %24, i32 0, i32 2
  store i32 %46, ptr %47, align 4, !tbaa !23
  store ptr %24, ptr %21, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %35, %10
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %64

51:                                               ; preds = %48
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.rtaudio_stream_parameters, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %25, i32 0, i32 0
  store i32 %54, ptr %55, align 4, !tbaa !18
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.rtaudio_stream_parameters, ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !20
  %59 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %25, i32 0, i32 1
  store i32 %58, ptr %59, align 4, !tbaa !21
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.rtaudio_stream_parameters, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %61, align 4, !tbaa !22
  %63 = getelementptr inbounds %"struct.RtAudio::StreamParameters", ptr %25, i32 0, i32 2
  store i32 %62, ptr %63, align 4, !tbaa !23
  store ptr %25, ptr %22, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %51, %48
  %65 = load ptr, ptr %19, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %97

67:                                               ; preds = %64
  %68 = load ptr, ptr %19, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.rtaudio_stream_options, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 4, !tbaa !24
  %71 = getelementptr inbounds %"struct.RtAudio::StreamOptions", ptr %26, i32 0, i32 0
  store i32 %70, ptr %71, align 8, !tbaa !26
  %72 = load ptr, ptr %19, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.rtaudio_stream_options, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !30
  %75 = getelementptr inbounds %"struct.RtAudio::StreamOptions", ptr %26, i32 0, i32 1
  store i32 %74, ptr %75, align 4, !tbaa !31
  %76 = load ptr, ptr %19, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.rtaudio_stream_options, ptr %76, i32 0, i32 2
  %78 = load i32, ptr %77, align 4, !tbaa !32
  %79 = getelementptr inbounds %"struct.RtAudio::StreamOptions", ptr %26, i32 0, i32 3
  store i32 %78, ptr %79, align 8, !tbaa !33
  %80 = load ptr, ptr %19, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.rtaudio_stream_options, ptr %80, i32 0, i32 3
  %82 = getelementptr inbounds [512 x i8], ptr %81, i64 0, i64 0
  %83 = call i64 @strlen(ptr noundef %82) #7
  %84 = icmp ugt i64 %83, 0
  br i1 %84, label %85, label %96

85:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #6
  %86 = load ptr, ptr %19, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.rtaudio_stream_options, ptr %86, i32 0, i32 3
  %88 = getelementptr inbounds [512 x i8], ptr %87, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef %88, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %89 unwind label %92

89:                                               ; preds = %85
  %90 = getelementptr inbounds %"struct.RtAudio::StreamOptions", ptr %26, i32 0, i32 2
  %91 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %90, ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  br label %96

92:                                               ; preds = %85
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %29, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %30, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  br label %123

96:                                               ; preds = %89, %67
  store ptr %26, ptr %23, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %96, %64
  %98 = load ptr, ptr %17, align 8, !tbaa !5
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.rtaudio, ptr %99, i32 0, i32 1
  store ptr %98, ptr %100, align 8, !tbaa !34
  %101 = load ptr, ptr %18, align 8, !tbaa !5
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.rtaudio, ptr %102, i32 0, i32 2
  store ptr %101, ptr %103, align 8, !tbaa !35
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.rtaudio, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !36
  %107 = load ptr, ptr %22, align 8, !tbaa !5
  %108 = load ptr, ptr %21, align 8, !tbaa !5
  %109 = load i64, ptr %14, align 8, !tbaa !9
  %110 = load i32, ptr %15, align 4, !tbaa !11
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = load ptr, ptr %23, align 8, !tbaa !5
  %114 = invoke noundef i32 @_ZN7RtAudio10openStreamEPNS_16StreamParametersES1_mjPjPFiPvS3_jdjS3_ES3_PNS_13StreamOptionsE(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef %107, ptr noundef %108, i64 noundef %109, i32 noundef %110, ptr noundef %111, ptr noundef @_ZL13proxy_cb_funcPvS_jdjS_, ptr noundef %112, ptr noundef %113)
          to label %115 unwind label %119

115:                                              ; preds = %97
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.rtaudio, ptr %116, i32 0, i32 3
  %118 = load i32, ptr %117, align 8, !tbaa !13
  call void @_ZN7RtAudio13StreamOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %26) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  ret i32 %118

119:                                              ; preds = %97
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %29, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %30, align 4
  br label %123

123:                                              ; preds = %119, %92
  call void @_ZN7RtAudio13StreamOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %26) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %29, align 8
  %126 = load i32, ptr %30, align 4
  %127 = insertvalue { ptr, i32 } poison, ptr %125, 0
  %128 = insertvalue { ptr, i32 } %127, i32 %126, 1
  resume { ptr, i32 } %128
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7RtAudio16StreamParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7RtAudio13StreamOptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #3 align 2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

declare noundef i32 @_ZN7RtAudio10openStreamEPNS_16StreamParametersES1_mjPjPFiPvS3_jdjS3_ES3_PNS_13StreamOptionsE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13proxy_cb_funcPvS_jdjS_(ptr noundef, ptr noundef, i32 noundef, double noundef, i32 noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7RtAudio13StreamOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { 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 #3 = { inlinehint 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 #4 = { 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 #5 = { "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 }
attributes #7 = { nounwind willreturn memory(read) }

!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, !15, i64 24}
!14 = !{!"_ZTS7rtaudio", !6, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !7, i64 28}
!15 = !{!"_ZTS13rtaudio_error", !7, i64 0}
!16 = !{!17, !12, i64 0}
!17 = !{!"_ZTS25rtaudio_stream_parameters", !12, i64 0, !12, i64 4, !12, i64 8}
!18 = !{!19, !12, i64 0}
!19 = !{!"_ZTSN7RtAudio16StreamParametersE", !12, i64 0, !12, i64 4, !12, i64 8}
!20 = !{!17, !12, i64 4}
!21 = !{!19, !12, i64 4}
!22 = !{!17, !12, i64 8}
!23 = !{!19, !12, i64 8}
!24 = !{!25, !12, i64 0}
!25 = !{!"_ZTS22rtaudio_stream_options", !12, i64 0, !12, i64 4, !12, i64 8, !7, i64 12}
!26 = !{!27, !12, i64 0}
!27 = !{!"_ZTSN7RtAudio13StreamOptionsE", !12, i64 0, !12, i64 4, !28, i64 8, !12, i64 40}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !29, i64 0, !10, i64 8, !7, i64 16}
!29 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!30 = !{!25, !12, i64 4}
!31 = !{!27, !12, i64 4}
!32 = !{!25, !12, i64 8}
!33 = !{!27, !12, i64 40}
!34 = !{!14, !6, i64 8}
!35 = !{!14, !6, i64 16}
!36 = !{!14, !6, i64 0}


; 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.RtAudio::StreamParameters" = type { i32, i32, i32 }
%"struct.RtAudio::StreamOptions" = type <{ i32, i32, %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"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::allocator" = type { i8 }

; 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress 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 i32 @rtaudio_open_stream(ptr noundef %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 nocapture noundef readnone %9) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %11 = alloca %"struct.RtAudio::StreamParameters", align 8
  %12 = alloca %"struct.RtAudio::StreamParameters", align 8
  %13 = alloca %"struct.RtAudio::StreamOptions", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 -1, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #5
  call void @_ZN7RtAudio16StreamParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #5
  call void @_ZN7RtAudio16StreamParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %13) #5
  call void @_ZN7RtAudio13StreamOptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(44) %13) #5
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %22, label %17

17:                                               ; preds = %10
  %18 = load <2 x i32>, ptr %2, align 4, !tbaa !11
  store <2 x i32> %18, ptr %11, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %2, i64 8
  %20 = load i32, ptr %19, align 4, !tbaa !13
  %21 = getelementptr inbounds i8, ptr %11, i64 8
  store i32 %20, ptr %21, align 8, !tbaa !15
  br label %22

22:                                               ; preds = %17, %10
  %.032 = phi ptr [ %11, %17 ], [ null, %10 ]
  %.not36 = icmp eq ptr %1, null
  br i1 %.not36, label %28, label %23

23:                                               ; preds = %22
  %24 = load <2 x i32>, ptr %1, align 4, !tbaa !11
  store <2 x i32> %24, ptr %12, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %1, i64 8
  %26 = load i32, ptr %25, align 4, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %12, i64 8
  store i32 %26, ptr %27, align 8, !tbaa !15
  br label %28

28:                                               ; preds = %23, %22
  %.031 = phi ptr [ %12, %23 ], [ null, %22 ]
  %.not37 = icmp eq ptr %8, null
  br i1 %.not37, label %41, label %29

29:                                               ; preds = %28
  %30 = load <2 x i32>, ptr %8, align 4, !tbaa !11
  store <2 x i32> %30, ptr %13, align 8, !tbaa !11
  %31 = getelementptr inbounds i8, ptr %8, i64 8
  %32 = load i32, ptr %31, align 4, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %13, i64 40
  store i32 %32, ptr %33, align 8, !tbaa !19
  %34 = getelementptr inbounds i8, ptr %8, i64 12
  %char0 = load i8, ptr %34, align 1
  %.not38 = icmp eq i8 %char0, 0
  br i1 %.not38, label %41, label %35

35:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull %34, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %36 unwind label %39

36:                                               ; preds = %35
  %37 = getelementptr inbounds i8, ptr %13, i64 8
  %38 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  br label %41

39:                                               ; preds = %35
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  br label %50

41:                                               ; preds = %29, %36, %28
  %.030 = phi ptr [ null, %28 ], [ %13, %36 ], [ %13, %29 ]
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %6, ptr %42, align 8, !tbaa !24
  %43 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %7, ptr %43, align 8, !tbaa !25
  %44 = load ptr, ptr %0, align 8, !tbaa !26
  %45 = invoke noundef i32 @_ZN7RtAudio10openStreamEPNS_16StreamParametersES1_mjPjPFiPvS3_jdjS3_ES3_PNS_13StreamOptionsE(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef %.031, ptr noundef %.032, i64 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef nonnull @_ZL13proxy_cb_funcPvS_jdjS_, ptr noundef nonnull %0, ptr noundef %.030)
          to label %46 unwind label %48

46:                                               ; preds = %41
  %47 = load i32, ptr %16, align 8, !tbaa !5
  call void @_ZN7RtAudio13StreamOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %13) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  ret i32 %47

48:                                               ; preds = %41
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %50

50:                                               ; preds = %48, %39
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %40, %39 ]
  call void @_ZN7RtAudio13StreamOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %13) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7RtAudio16StreamParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7RtAudio13StreamOptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #3 align 2

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

declare noundef i32 @_ZN7RtAudio10openStreamEPNS_16StreamParametersES1_mjPjPFiPvS3_jdjS3_ES3_PNS_13StreamOptionsE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13proxy_cb_funcPvS_jdjS_(ptr noundef, ptr noundef, i32 noundef, double noundef, i32 noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7RtAudio13StreamOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { 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 #3 = { inlinehint 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 #4 = { "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 = { 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, !10, i64 24}
!6 = !{!"_ZTS7rtaudio", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !8, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS13rtaudio_error", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTS25rtaudio_stream_parameters", !12, i64 0, !12, i64 4, !12, i64 8}
!15 = !{!16, !12, i64 8}
!16 = !{!"_ZTSN7RtAudio16StreamParametersE", !12, i64 0, !12, i64 4, !12, i64 8}
!17 = !{!18, !12, i64 8}
!18 = !{!"_ZTS22rtaudio_stream_options", !12, i64 0, !12, i64 4, !12, i64 8, !8, i64 12}
!19 = !{!20, !12, i64 40}
!20 = !{!"_ZTSN7RtAudio13StreamOptionsE", !12, i64 0, !12, i64 4, !21, i64 8, !12, i64 40}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !23, i64 8, !8, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!23 = !{!"long", !8, i64 0}
!24 = !{!6, !7, i64 8}
!25 = !{!6, !7, i64 16}
!26 = !{!6, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass