; LLVM IR from SelfishOlex/MiniAudioO3DE :: MiniAudio/Code/Source/Clients (MiniAudioImplementation)

; 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.ma_context_config = type { ptr, i32, i64, ptr, %struct.ma_allocation_callbacks, %struct.anon.37, %struct.anon.38, %struct.anon.39, %struct.anon.40, %struct.ma_backend_callbacks }
%struct.ma_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.anon.37 = type { i32 }
%struct.anon.38 = type { ptr, ptr, i32 }
%struct.anon.39 = type { i32, i32, i32, i32 }
%struct.anon.40 = type { ptr, i32 }
%struct.ma_backend_callbacks = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ma_device_config = type { i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, ptr, ptr, ptr, ptr, %struct.ma_resampler_config, %struct.anon.49, %struct.anon.50, %struct.anon.51, %struct.anon.52, %struct.anon.53, %struct.anon.54, %struct.anon.55, %struct.anon.56 }
%struct.ma_resampler_config = type { i32, i32, i32, i32, i32, ptr, ptr, %struct.anon.48 }
%struct.anon.48 = type { i32 }
%struct.anon.49 = type { ptr, i32, i32, ptr, i32, i32 }
%struct.anon.50 = type { ptr, i32, i32, ptr, i32, i32 }
%struct.anon.51 = type { i8, i8, i8, i8 }
%struct.anon.52 = type { i32, i32, i32, i32 }
%struct.anon.53 = type { ptr, ptr }
%struct.anon.54 = type { i32 }
%struct.anon.55 = type { i32, i32 }
%struct.anon.56 = type { i32, i32, i32, i32 }
%struct.ma_spatializer_listener_config = type { i32, ptr, i32, float, float, float, float, %struct.ma_vec3f }
%struct.ma_vec3f = type { float, float, float }
%struct.ma_resource_manager_config = type { %struct.ma_allocation_callbacks, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, ptr }
%struct.ma_engine_config = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, %struct.ma_allocation_callbacks, i32, i32, i32, ptr }
%struct.ma_node_graph_config = type { i32, i16 }
%struct.ma_engine = type { %struct.ma_node_graph, ptr, ptr, ptr, i32, i32, [4 x %struct.ma_spatializer_listener], %struct.ma_allocation_callbacks, i8, i8, i32, ptr, i32, i32, i32 }
%struct.ma_node_graph = type { %struct.ma_node_base, %struct.ma_node_base, i16, i32 }
%struct.ma_node_base = type { ptr, ptr, ptr, i16, i16, i16, i16, i32, [2 x i64], i64, i32, i32, ptr, ptr, [2 x %struct.ma_node_input_bus], [2 x %struct.ma_node_output_bus], ptr, i32 }
%struct.ma_node_input_bus = type { %struct.ma_node_output_bus, i32, i32, i8 }
%struct.ma_node_output_bus = type { ptr, i8, i8, i8, i32, i32, i32, i32, float, ptr, ptr, ptr }
%struct.ma_spatializer_listener = type { %struct.ma_spatializer_listener_config, %struct.ma_vec3f, %struct.ma_vec3f, %struct.ma_vec3f, i32, i32, ptr }
%struct.ma_device = type { ptr, i32, i32, i32, ptr, ptr, ptr, ptr, %union.pthread_mutex_t, %struct.ma_event, %struct.ma_event, %struct.ma_event, i64, i32, i8, i8, i8, i8, i8, float, %struct.ma_duplex_rb, %struct.anon.24, %struct.anon.26, %struct.anon.31, %union.anon.32 }
%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.ma_event = type { i32, %union.pthread_mutex_t, %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct.ma_duplex_rb = type { %struct.ma_pcm_rb }
%struct.ma_pcm_rb = type { %struct.ma_rb, i32, i32 }
%struct.ma_rb = type { ptr, i32, i32, i32, i32, i32, i8, i8, %struct.ma_allocation_callbacks }
%struct.anon.24 = type { i32, ptr, ptr, %struct.anon.25 }
%struct.anon.25 = type { i32 }
%struct.anon.26 = type { ptr, %union.ma_device_id, [256 x i8], i32, i32, i32, [254 x i8], i32, i32, i32, [254 x i8], i32, i32, i32, %struct.ma_data_converter, ptr, i32, i32, ptr, i64, i64, i64 }
%union.ma_device_id = type { %union.anon.17 }
%union.anon.17 = type { ptr, [248 x i8] }
%struct.ma_data_converter = type { i32, i32, i32, i32, i32, i32, i32, i32, %struct.ma_channel_converter, %struct.ma_resampler, i8, i8, i8, i8, i8, i8, ptr }
%struct.ma_channel_converter = type { i32, i32, i32, i32, i32, ptr, ptr, ptr, %union.anon.27, ptr, i32 }
%union.anon.27 = type { ptr }
%struct.ma_resampler = type { ptr, ptr, ptr, i32, i32, i32, i32, %union.anon.28, ptr, i32 }
%union.anon.28 = type { %struct.ma_linear_resampler }
%struct.ma_linear_resampler = type { %struct.ma_linear_resampler_config, i32, i32, i32, i32, %union.anon.29, %union.anon.30, %struct.ma_lpf, ptr, i32 }
%struct.ma_linear_resampler_config = type { i32, i32, i32, i32, i32, double }
%union.anon.29 = type { ptr }
%union.anon.30 = type { ptr }
%struct.ma_lpf = type { i32, i32, i32, i32, i32, ptr, ptr, ptr, i32 }
%struct.anon.31 = type { ptr, %union.ma_device_id, [256 x i8], i32, i32, i32, [254 x i8], i32, i32, i32, [254 x i8], i32, i32, i32, %struct.ma_data_converter, ptr, i32, i32 }
%union.anon.32 = type { %struct.anon.36 }
%struct.anon.36 = type { i64, %struct.ma_event, %struct.ma_event, %struct.ma_semaphore, i32, i32, %union.ma_timer, double, i32, i32, i64, i64, i32 }
%struct.ma_semaphore = type { i32, %union.pthread_mutex_t, %union.pthread_cond_t }
%union.ma_timer = type { i64 }

; 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 dso_local ptr @ma_malloc(i64 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_free(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL33ma_allocation_callbacks_init_copyP23ma_allocation_callbacksPKS_(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ma_context_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_context_config) align 8) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_device_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_device_config) align 8, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_device_init(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_device_init_ex(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_device_uninit(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @ma_device_get_log(ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ma_spatializer_listener_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_spatializer_listener_config) align 8, i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_spatializer_listener_init(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_spatializer_listener_uninit(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ma_resource_manager_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_resource_manager_config) align 8) #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_resource_manager_init(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @ma_resource_manager_get_log(ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @ma_node_graph_config_init(i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_node_graph_init(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_node_graph_uninit(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_node_graph_get_channels(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @ma_engine_get_sample_rate(ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ma_engine_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_engine_config) align 8) #4

; Function Attrs: mustprogress uwtable
define dso_local i32 @ma_engine_init(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.ma_node_graph_config, align 4
  %8 = alloca %struct.ma_engine_config, align 8
  %9 = alloca %struct.ma_spatializer_listener_config, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.ma_engine_config, align 8
  %13 = alloca %struct.ma_device_config, align 8
  %14 = alloca %struct.ma_device_config, align 8
  %15 = alloca %struct.ma_context_config, align 8
  %16 = alloca %struct.ma_node_graph_config, align 4
  %17 = alloca %struct.ma_spatializer_listener_config, align 8
  %18 = alloca i32, align 4
  %19 = alloca %struct.ma_resource_manager_config, align 8
  %20 = alloca %struct.ma_resource_manager_config, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %2
  store i32 -2, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %405

24:                                               ; preds = %2
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 1240, i1 false)
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %30

28:                                               ; preds = %24
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %29, i64 128, i1 false), !tbaa.struct !9
  br label %31

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 128, ptr %12) #6
  call void @ma_engine_config_init(ptr dead_on_unwind writable sret(%struct.ma_engine_config) align 8 %12)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %12, i64 128, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 128, ptr %12) #6
  br label %31

31:                                               ; preds = %30, %28
  %32 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 15
  %33 = load i32, ptr %32, align 8, !tbaa !14
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ma_engine, ptr %34, i32 0, i32 14
  store i32 %33, ptr %35, align 8, !tbaa !17
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ma_engine, ptr %36, i32 0, i32 7
  %38 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 12
  %39 = call noundef i32 @_ZL33ma_allocation_callbacks_init_copyP23ma_allocation_callbacksPKS_(ptr noundef %37, ptr noundef %38)
  %40 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !24
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ma_engine, ptr %42, i32 0, i32 1
  store ptr %41, ptr %43, align 8, !tbaa !25
  %44 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !26
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.ma_engine, ptr %46, i32 0, i32 2
  store ptr %45, ptr %47, align 8, !tbaa !27
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ma_engine, ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !27
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %144

52:                                               ; preds = %31
  %53 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 14
  %54 = load i32, ptr %53, align 4, !tbaa !28
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %144

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 248, ptr %13) #6
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.ma_engine, ptr %57, i32 0, i32 7
  %59 = call ptr @ma_malloc(i64 noundef 3696, ptr noundef %58)
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ma_engine, ptr %60, i32 0, i32 2
  store ptr %59, ptr %61, align 8, !tbaa !27
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ma_engine, ptr %62, i32 0, i32 2
  %64 = load ptr, ptr %63, align 8, !tbaa !27
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %67

66:                                               ; preds = %56
  store i32 -4, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %141

67:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 248, ptr %14) #6
  call void @ma_device_config_init(ptr dead_on_unwind writable sret(%struct.ma_device_config) align 8 %14, i32 noundef 1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %14, i64 248, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 248, ptr %14) #6
  %68 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !53
  %70 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 15
  %71 = getelementptr inbounds %struct.anon.49, ptr %70, i32 0, i32 0
  store ptr %69, ptr %71, align 8, !tbaa !54
  %72 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 15
  %73 = getelementptr inbounds %struct.anon.49, ptr %72, i32 0, i32 1
  store i32 5, ptr %73, align 8, !tbaa !66
  %74 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 6
  %75 = load i32, ptr %74, align 4, !tbaa !67
  %76 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 15
  %77 = getelementptr inbounds %struct.anon.49, ptr %76, i32 0, i32 2
  store i32 %75, ptr %77, align 4, !tbaa !68
  %78 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 7
  %79 = load i32, ptr %78, align 8, !tbaa !69
  %80 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 1
  store i32 %79, ptr %80, align 4, !tbaa !70
  %81 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 10
  store ptr @_ZL32ma_engine_data_callback_internalP9ma_devicePvPKvj, ptr %81, align 8, !tbaa !71
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 13
  store ptr %82, ptr %83, align 8, !tbaa !72
  %84 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 8
  %85 = load i32, ptr %84, align 4, !tbaa !73
  %86 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 2
  store i32 %85, ptr %86, align 8, !tbaa !74
  %87 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 9
  %88 = load i32, ptr %87, align 8, !tbaa !75
  %89 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 3
  store i32 %88, ptr %89, align 4, !tbaa !76
  %90 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 6
  store i8 1, ptr %90, align 8, !tbaa !77
  %91 = getelementptr inbounds %struct.ma_device_config, ptr %13, i32 0, i32 7
  store i8 1, ptr %91, align 1, !tbaa !78
  %92 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !79
  %94 = icmp eq ptr %93, null
  br i1 %94, label %95, label %119

95:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 232, ptr %15) #6
  call void @ma_context_config_init(ptr dead_on_unwind writable sret(%struct.ma_context_config) align 8 %15)
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ma_engine, ptr %96, i32 0, i32 7
  %98 = getelementptr inbounds %struct.ma_context_config, ptr %15, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %98, ptr align 8 %97, i64 32, i1 false), !tbaa.struct !80
  %99 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !81
  %101 = getelementptr inbounds %struct.ma_context_config, ptr %15, i32 0, i32 0
  store ptr %100, ptr %101, align 8, !tbaa !82
  %102 = getelementptr inbounds %struct.ma_context_config, ptr %15, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !82
  %104 = icmp eq ptr %103, null
  br i1 %104, label %105, label %114

105:                                              ; preds = %95
  %106 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !24
  %108 = icmp ne ptr %107, null
  br i1 %108, label %109, label %114

109:                                              ; preds = %105
  %110 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !24
  %112 = call ptr @ma_resource_manager_get_log(ptr noundef %111)
  %113 = getelementptr inbounds %struct.ma_context_config, ptr %15, i32 0, i32 0
  store ptr %112, ptr %113, align 8, !tbaa !82
  br label %114

114:                                              ; preds = %109, %105, %95
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ma_engine, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !27
  %118 = call i32 @ma_device_init_ex(ptr noundef null, i32 noundef 0, ptr noundef %15, ptr noundef %13, ptr noundef %117)
  store i32 %118, ptr %6, align 4, !tbaa !92
  call void @llvm.lifetime.end.p0(i64 232, ptr %15) #6
  br label %126

119:                                              ; preds = %67
  %120 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !79
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ma_engine, ptr %122, i32 0, i32 2
  %124 = load ptr, ptr %123, align 8, !tbaa !27
  %125 = call i32 @ma_device_init(ptr noundef %121, ptr noundef %13, ptr noundef %124)
  store i32 %125, ptr %6, align 4, !tbaa !92
  br label %126

126:                                              ; preds = %119, %114
  %127 = load i32, ptr %6, align 4, !tbaa !92
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %138

129:                                              ; preds = %126
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.ma_engine, ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %131, align 8, !tbaa !27
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ma_engine, ptr %133, i32 0, i32 7
  call void @ma_free(ptr noundef %132, ptr noundef %134)
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.ma_engine, ptr %135, i32 0, i32 2
  store ptr null, ptr %136, align 8, !tbaa !27
  %137 = load i32, ptr %6, align 4, !tbaa !92
  store i32 %137, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %141

138:                                              ; preds = %126
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.ma_engine, ptr %139, i32 0, i32 9
  store i8 1, ptr %140, align 1, !tbaa !94
  store i32 0, ptr %11, align 4
  br label %141

141:                                              ; preds = %138, %129, %66
  call void @llvm.lifetime.end.p0(i64 248, ptr %13) #6
  %142 = load i32, ptr %11, align 4
  switch i32 %142, label %405 [
    i32 0, label %143
  ]

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143, %52, %31
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.ma_engine, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !27
  %148 = icmp ne ptr %147, null
  br i1 %148, label %149, label %163

149:                                              ; preds = %144
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.ma_engine, ptr %150, i32 0, i32 2
  %152 = load ptr, ptr %151, align 8, !tbaa !27
  %153 = getelementptr inbounds %struct.ma_device, ptr %152, i32 0, i32 22
  %154 = getelementptr inbounds %struct.anon.26, ptr %153, i32 0, i32 5
  %155 = load i32, ptr %154, align 8, !tbaa !95
  %156 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 6
  store i32 %155, ptr %156, align 4, !tbaa !67
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.ma_engine, ptr %157, i32 0, i32 2
  %159 = load ptr, ptr %158, align 8, !tbaa !27
  %160 = getelementptr inbounds %struct.ma_device, ptr %159, i32 0, i32 2
  %161 = load i32, ptr %160, align 4, !tbaa !113
  %162 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 7
  store i32 %161, ptr %162, align 8, !tbaa !69
  br label %163

163:                                              ; preds = %149, %144
  %164 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 6
  %165 = load i32, ptr %164, align 4, !tbaa !67
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %171, label %167

167:                                              ; preds = %163
  %168 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 7
  %169 = load i32, ptr %168, align 8, !tbaa !69
  %170 = icmp eq i32 %169, 0
  br i1 %170, label %171, label %172

171:                                              ; preds = %167, %163
  store i32 -2, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %405

172:                                              ; preds = %167
  %173 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 7
  %174 = load i32, ptr %173, align 8, !tbaa !69
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.ma_engine, ptr %175, i32 0, i32 4
  store i32 %174, ptr %176, align 8, !tbaa !114
  %177 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 4
  %178 = load ptr, ptr %177, align 8, !tbaa !81
  %179 = icmp ne ptr %178, null
  br i1 %179, label %180, label %185

180:                                              ; preds = %172
  %181 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !81
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.ma_engine, ptr %183, i32 0, i32 3
  store ptr %182, ptr %184, align 8, !tbaa !115
  br label %192

185:                                              ; preds = %172
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.ma_engine, ptr %186, i32 0, i32 2
  %188 = load ptr, ptr %187, align 8, !tbaa !27
  %189 = call ptr @ma_device_get_log(ptr noundef %188)
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.ma_engine, ptr %190, i32 0, i32 3
  store ptr %189, ptr %191, align 8, !tbaa !115
  br label %192

192:                                              ; preds = %185, %180
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %193 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 6
  %194 = load i32, ptr %193, align 4, !tbaa !67
  %195 = call i64 @ma_node_graph_config_init(i32 noundef %194)
  store i64 %195, ptr %16, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %16, i64 8, i1 false), !tbaa.struct !116
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %196 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 8
  %197 = load i32, ptr %196, align 4, !tbaa !73
  %198 = icmp ugt i32 %197, 65535
  br i1 %198, label %199, label %200

199:                                              ; preds = %192
  br label %205

200:                                              ; preds = %192
  %201 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 8
  %202 = load i32, ptr %201, align 4, !tbaa !73
  %203 = trunc i32 %202 to i16
  %204 = zext i16 %203 to i32
  br label %205

205:                                              ; preds = %200, %199
  %206 = phi i32 [ 65535, %199 ], [ %204, %200 ]
  %207 = trunc i32 %206 to i16
  %208 = getelementptr inbounds %struct.ma_node_graph_config, ptr %7, i32 0, i32 1
  store i16 %207, ptr %208, align 4, !tbaa !118
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.ma_engine, ptr %209, i32 0, i32 7
  %211 = load ptr, ptr %5, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.ma_engine, ptr %211, i32 0, i32 0
  %213 = call i32 @ma_node_graph_init(ptr noundef %7, ptr noundef %210, ptr noundef %212)
  store i32 %213, ptr %6, align 4, !tbaa !92
  %214 = load i32, ptr %6, align 4, !tbaa !92
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %216, label %217

216:                                              ; preds = %205
  br label %389

217:                                              ; preds = %205
  %218 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 5
  %219 = load i32, ptr %218, align 8, !tbaa !120
  %220 = icmp eq i32 %219, 0
  br i1 %220, label %221, label %223

221:                                              ; preds = %217
  %222 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 5
  store i32 1, ptr %222, align 8, !tbaa !120
  br label %223

223:                                              ; preds = %221, %217
  %224 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 5
  %225 = load i32, ptr %224, align 8, !tbaa !120
  %226 = icmp ugt i32 %225, 4
  br i1 %226, label %227, label %228

227:                                              ; preds = %223
  store i32 -2, ptr %6, align 4, !tbaa !92
  br label %389

228:                                              ; preds = %223
  store i32 0, ptr %10, align 4, !tbaa !10
  br label %229

229:                                              ; preds = %260, %228
  %230 = load i32, ptr %10, align 4, !tbaa !10
  %231 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 5
  %232 = load i32, ptr %231, align 8, !tbaa !120
  %233 = icmp ult i32 %230, %232
  br i1 %233, label %234, label %263

234:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 48, ptr %17) #6
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.ma_engine, ptr %235, i32 0, i32 0
  %237 = call i32 @ma_node_graph_get_channels(ptr noundef %236)
  call void @ma_spatializer_listener_config_init(ptr dead_on_unwind writable sret(%struct.ma_spatializer_listener_config) align 8 %17, i32 noundef %237)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %17, i64 48, i1 false), !tbaa.struct !121
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #6
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.ma_engine, ptr %238, i32 0, i32 2
  %240 = load ptr, ptr %239, align 8, !tbaa !27
  %241 = icmp ne ptr %240, null
  br i1 %241, label %242, label %243

242:                                              ; preds = %234
  br label %243

243:                                              ; preds = %242, %234
  %244 = load ptr, ptr %5, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.ma_engine, ptr %244, i32 0, i32 7
  %246 = load ptr, ptr %5, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.ma_engine, ptr %246, i32 0, i32 6
  %248 = load i32, ptr %10, align 4, !tbaa !10
  %249 = zext i32 %248 to i64
  %250 = getelementptr inbounds [4 x %struct.ma_spatializer_listener], ptr %247, i64 0, i64 %249
  %251 = call i32 @ma_spatializer_listener_init(ptr noundef %9, ptr noundef %245, ptr noundef %250)
  store i32 %251, ptr %6, align 4, !tbaa !92
  %252 = load i32, ptr %6, align 4, !tbaa !92
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %255

254:                                              ; preds = %243
  br label %366

255:                                              ; preds = %243
  %256 = load ptr, ptr %5, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.ma_engine, ptr %256, i32 0, i32 5
  %258 = load i32, ptr %257, align 4, !tbaa !125
  %259 = add i32 %258, 1
  store i32 %259, ptr %257, align 4, !tbaa !125
  br label %260

260:                                              ; preds = %255
  %261 = load i32, ptr %10, align 4, !tbaa !10
  %262 = add i32 %261, 1
  store i32 %262, ptr %10, align 4, !tbaa !10
  br label %229, !llvm.loop !126

263:                                              ; preds = %229
  %264 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 10
  %265 = load i32, ptr %264, align 4, !tbaa !128
  %266 = load ptr, ptr %5, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.ma_engine, ptr %266, i32 0, i32 13
  store i32 %265, ptr %267, align 4, !tbaa !129
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.ma_engine, ptr %268, i32 0, i32 13
  %270 = load i32, ptr %269, align 4, !tbaa !129
  %271 = icmp eq i32 %270, 0
  br i1 %271, label %272, label %286

272:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %273 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 11
  %274 = load i32, ptr %273, align 8, !tbaa !130
  store i32 %274, ptr %18, align 4, !tbaa !10
  %275 = load i32, ptr %18, align 4, !tbaa !10
  %276 = icmp eq i32 %275, 0
  br i1 %276, label %277, label %278

277:                                              ; preds = %272
  store i32 8, ptr %18, align 4, !tbaa !10
  br label %278

278:                                              ; preds = %277, %272
  %279 = load i32, ptr %18, align 4, !tbaa !10
  %280 = load ptr, ptr %5, align 8, !tbaa !5
  %281 = call i32 @ma_engine_get_sample_rate(ptr noundef %280)
  %282 = mul i32 %279, %281
  %283 = udiv i32 %282, 1000
  %284 = load ptr, ptr %5, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.ma_engine, ptr %284, i32 0, i32 13
  store i32 %283, ptr %285, align 4, !tbaa !129
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %286

286:                                              ; preds = %278, %263
  %287 = load ptr, ptr %5, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.ma_engine, ptr %287, i32 0, i32 1
  %289 = load ptr, ptr %288, align 8, !tbaa !25
  %290 = icmp eq ptr %289, null
  br i1 %290, label %291, label %332

291:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 96, ptr %19) #6
  %292 = load ptr, ptr %5, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.ma_engine, ptr %292, i32 0, i32 7
  %294 = call ptr @ma_malloc(i64 noundef 1088, ptr noundef %293)
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.ma_engine, ptr %295, i32 0, i32 1
  store ptr %294, ptr %296, align 8, !tbaa !25
  %297 = load ptr, ptr %5, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.ma_engine, ptr %297, i32 0, i32 1
  %299 = load ptr, ptr %298, align 8, !tbaa !25
  %300 = icmp eq ptr %299, null
  br i1 %300, label %301, label %302

301:                                              ; preds = %291
  store i32 -4, ptr %6, align 4, !tbaa !92
  store i32 6, ptr %11, align 4
  br label %329

302:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 96, ptr %20) #6
  call void @ma_resource_manager_config_init(ptr dead_on_unwind writable sret(%struct.ma_resource_manager_config) align 8 %20)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %20, i64 96, i1 false), !tbaa.struct !131
  call void @llvm.lifetime.end.p0(i64 96, ptr %20) #6
  %303 = load ptr, ptr %5, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.ma_engine, ptr %303, i32 0, i32 3
  %305 = load ptr, ptr %304, align 8, !tbaa !115
  %306 = getelementptr inbounds %struct.ma_resource_manager_config, ptr %19, i32 0, i32 1
  store ptr %305, ptr %306, align 8, !tbaa !132
  %307 = getelementptr inbounds %struct.ma_resource_manager_config, ptr %19, i32 0, i32 2
  store i32 5, ptr %307, align 8, !tbaa !134
  %308 = getelementptr inbounds %struct.ma_resource_manager_config, ptr %19, i32 0, i32 3
  store i32 0, ptr %308, align 4, !tbaa !135
  %309 = load ptr, ptr %5, align 8, !tbaa !5
  %310 = call i32 @ma_engine_get_sample_rate(ptr noundef %309)
  %311 = getelementptr inbounds %struct.ma_resource_manager_config, ptr %19, i32 0, i32 4
  store i32 %310, ptr %311, align 8, !tbaa !136
  %312 = getelementptr inbounds %struct.ma_resource_manager_config, ptr %19, i32 0, i32 0
  %313 = load ptr, ptr %5, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.ma_engine, ptr %313, i32 0, i32 7
  %315 = call noundef i32 @_ZL33ma_allocation_callbacks_init_copyP23ma_allocation_callbacksPKS_(ptr noundef %312, ptr noundef %314)
  %316 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 16
  %317 = load ptr, ptr %316, align 8, !tbaa !137
  %318 = getelementptr inbounds %struct.ma_resource_manager_config, ptr %19, i32 0, i32 8
  store ptr %317, ptr %318, align 8, !tbaa !138
  %319 = load ptr, ptr %5, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.ma_engine, ptr %319, i32 0, i32 1
  %321 = load ptr, ptr %320, align 8, !tbaa !25
  %322 = call i32 @ma_resource_manager_init(ptr noundef %19, ptr noundef %321)
  store i32 %322, ptr %6, align 4, !tbaa !92
  %323 = load i32, ptr %6, align 4, !tbaa !92
  %324 = icmp ne i32 %323, 0
  br i1 %324, label %325, label %326

325:                                              ; preds = %302
  store i32 7, ptr %11, align 4
  br label %329

326:                                              ; preds = %302
  %327 = load ptr, ptr %5, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.ma_engine, ptr %327, i32 0, i32 8
  store i8 1, ptr %328, align 8, !tbaa !139
  store i32 0, ptr %11, align 4
  br label %329

329:                                              ; preds = %326, %325, %301
  call void @llvm.lifetime.end.p0(i64 96, ptr %19) #6
  %330 = load i32, ptr %11, align 4
  switch i32 %330, label %405 [
    i32 0, label %331
    i32 7, label %354
    i32 6, label %366
  ]

331:                                              ; preds = %329
  br label %332

332:                                              ; preds = %331, %286
  %333 = load ptr, ptr %5, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.ma_engine, ptr %333, i32 0, i32 10
  store i32 0, ptr %334, align 4, !tbaa !140
  %335 = load ptr, ptr %5, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.ma_engine, ptr %335, i32 0, i32 11
  store ptr null, ptr %336, align 8, !tbaa !141
  %337 = getelementptr inbounds %struct.ma_engine_config, ptr %8, i32 0, i32 13
  %338 = load i32, ptr %337, align 8, !tbaa !142
  %339 = icmp eq i32 %338, 0
  br i1 %339, label %340, label %352

340:                                              ; preds = %332
  %341 = load ptr, ptr %5, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.ma_engine, ptr %341, i32 0, i32 2
  %343 = load ptr, ptr %342, align 8, !tbaa !27
  %344 = icmp ne ptr %343, null
  br i1 %344, label %345, label %352

345:                                              ; preds = %340
  %346 = load ptr, ptr %5, align 8, !tbaa !5
  %347 = call i32 @ma_engine_start(ptr noundef %346)
  store i32 %347, ptr %6, align 4, !tbaa !92
  %348 = load i32, ptr %6, align 4, !tbaa !92
  %349 = icmp ne i32 %348, 0
  br i1 %349, label %350, label %351

350:                                              ; preds = %345
  br label %353

351:                                              ; preds = %345
  br label %352

352:                                              ; preds = %351, %340, %332
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %405

353:                                              ; preds = %350
  br label %354

354:                                              ; preds = %353, %329
  %355 = load ptr, ptr %5, align 8, !tbaa !5
  %356 = getelementptr inbounds %struct.ma_engine, ptr %355, i32 0, i32 8
  %357 = load i8, ptr %356, align 8, !tbaa !139
  %358 = icmp ne i8 %357, 0
  br i1 %358, label %359, label %365

359:                                              ; preds = %354
  %360 = load ptr, ptr %5, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.ma_engine, ptr %360, i32 0, i32 1
  %362 = load ptr, ptr %361, align 8, !tbaa !25
  %363 = load ptr, ptr %5, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.ma_engine, ptr %363, i32 0, i32 7
  call void @ma_free(ptr noundef %362, ptr noundef %364)
  br label %365

365:                                              ; preds = %359, %354
  br label %366

366:                                              ; preds = %365, %329, %254
  store i32 0, ptr %10, align 4, !tbaa !10
  br label %367

367:                                              ; preds = %381, %366
  %368 = load i32, ptr %10, align 4, !tbaa !10
  %369 = load ptr, ptr %5, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.ma_engine, ptr %369, i32 0, i32 5
  %371 = load i32, ptr %370, align 4, !tbaa !125
  %372 = icmp ult i32 %368, %371
  br i1 %372, label %373, label %384

373:                                              ; preds = %367
  %374 = load ptr, ptr %5, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.ma_engine, ptr %374, i32 0, i32 6
  %376 = load i32, ptr %10, align 4, !tbaa !10
  %377 = zext i32 %376 to i64
  %378 = getelementptr inbounds [4 x %struct.ma_spatializer_listener], ptr %375, i64 0, i64 %377
  %379 = load ptr, ptr %5, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.ma_engine, ptr %379, i32 0, i32 7
  call void @ma_spatializer_listener_uninit(ptr noundef %378, ptr noundef %380)
  br label %381

381:                                              ; preds = %373
  %382 = load i32, ptr %10, align 4, !tbaa !10
  %383 = add i32 %382, 1
  store i32 %383, ptr %10, align 4, !tbaa !10
  br label %367, !llvm.loop !143

384:                                              ; preds = %367
  %385 = load ptr, ptr %5, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.ma_engine, ptr %385, i32 0, i32 0
  %387 = load ptr, ptr %5, align 8, !tbaa !5
  %388 = getelementptr inbounds %struct.ma_engine, ptr %387, i32 0, i32 7
  call void @ma_node_graph_uninit(ptr noundef %386, ptr noundef %388)
  br label %389

389:                                              ; preds = %384, %227, %216
  %390 = load ptr, ptr %5, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.ma_engine, ptr %390, i32 0, i32 9
  %392 = load i8, ptr %391, align 1, !tbaa !94
  %393 = icmp ne i8 %392, 0
  br i1 %393, label %394, label %403

394:                                              ; preds = %389
  %395 = load ptr, ptr %5, align 8, !tbaa !5
  %396 = getelementptr inbounds %struct.ma_engine, ptr %395, i32 0, i32 2
  %397 = load ptr, ptr %396, align 8, !tbaa !27
  call void @ma_device_uninit(ptr noundef %397)
  %398 = load ptr, ptr %5, align 8, !tbaa !5
  %399 = getelementptr inbounds %struct.ma_engine, ptr %398, i32 0, i32 2
  %400 = load ptr, ptr %399, align 8, !tbaa !27
  %401 = load ptr, ptr %5, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.ma_engine, ptr %401, i32 0, i32 7
  call void @ma_free(ptr noundef %400, ptr noundef %402)
  br label %403

403:                                              ; preds = %394, %389
  %404 = load i32, ptr %6, align 4, !tbaa !92
  store i32 %404, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %405

405:                                              ; preds = %403, %352, %329, %171, %141, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %406 = load i32, ptr %3, align 4
  ret i32 %406
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL32ma_engine_data_callback_internalP9ma_devicePvPKvj(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_engine_start(ptr noundef) #1

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "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 }

!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 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5, i64 40, i64 4, !10, i64 44, i64 4, !10, i64 48, i64 4, !10, i64 52, i64 4, !10, i64 56, i64 4, !10, i64 60, i64 4, !10, i64 64, i64 4, !10, i64 72, i64 8, !5, i64 80, i64 8, !5, i64 88, i64 8, !5, i64 96, i64 8, !5, i64 104, i64 4, !10, i64 108, i64 4, !10, i64 112, i64 4, !12, i64 120, i64 8, !5}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS22ma_mono_expansion_mode", !7, i64 0}
!14 = !{!15, !13, i64 112}
!15 = !{!"_ZTS16ma_engine_config", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !16, i64 72, !11, i64 104, !11, i64 108, !13, i64 112, !6, i64 120}
!16 = !{!"_ZTS23ma_allocation_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!18, !13, i64 1232}
!18 = !{!"_ZTS9ma_engine", !19, i64 0, !6, i64 728, !6, i64 736, !6, i64 744, !11, i64 752, !11, i64 756, !7, i64 760, !16, i64 1176, !7, i64 1208, !7, i64 1209, !11, i64 1212, !6, i64 1216, !11, i64 1224, !11, i64 1228, !13, i64 1232}
!19 = !{!"_ZTS13ma_node_graph", !20, i64 0, !20, i64 360, !21, i64 720, !11, i64 724}
!20 = !{!"_ZTS12ma_node_base", !6, i64 0, !6, i64 8, !6, i64 16, !21, i64 24, !21, i64 26, !21, i64 28, !21, i64 30, !22, i64 32, !7, i64 40, !23, i64 56, !11, i64 64, !11, i64 68, !6, i64 72, !6, i64 80, !7, i64 88, !7, i64 232, !6, i64 344, !11, i64 352}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTS13ma_node_state", !7, i64 0}
!23 = !{!"long long", !7, i64 0}
!24 = !{!15, !6, i64 0}
!25 = !{!18, !6, i64 728}
!26 = !{!15, !6, i64 16}
!27 = !{!18, !6, i64 736}
!28 = !{!15, !11, i64 108}
!29 = !{i64 0, i64 4, !30, i64 4, i64 4, !10, i64 8, i64 4, !10, i64 12, i64 4, !10, i64 16, i64 4, !10, i64 20, i64 4, !32, i64 24, i64 1, !34, i64 25, i64 1, !34, i64 26, i64 1, !34, i64 27, i64 1, !34, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 8, !5, i64 64, i64 4, !35, i64 68, i64 4, !10, i64 72, i64 4, !10, i64 76, i64 4, !10, i64 80, i64 4, !37, i64 88, i64 8, !5, i64 96, i64 8, !5, i64 104, i64 4, !10, i64 112, i64 8, !5, i64 120, i64 4, !35, i64 124, i64 4, !10, i64 128, i64 8, !5, i64 136, i64 4, !39, i64 140, i64 4, !41, i64 144, i64 8, !5, i64 152, i64 4, !35, i64 156, i64 4, !10, i64 160, i64 8, !5, i64 168, i64 4, !39, i64 172, i64 4, !41, i64 176, i64 1, !34, i64 177, i64 1, !34, i64 178, i64 1, !34, i64 179, i64 1, !34, i64 180, i64 4, !10, i64 184, i64 4, !10, i64 188, i64 4, !10, i64 192, i64 4, !10, i64 200, i64 8, !5, i64 208, i64 8, !5, i64 216, i64 4, !10, i64 220, i64 4, !43, i64 224, i64 4, !45, i64 228, i64 4, !47, i64 232, i64 4, !49, i64 236, i64 4, !51, i64 240, i64 4, !10}
!30 = !{!31, !31, i64 0}
!31 = !{!"_ZTS14ma_device_type", !7, i64 0}
!32 = !{!33, !33, i64 0}
!33 = !{!"_ZTS22ma_performance_profile", !7, i64 0}
!34 = !{!7, !7, i64 0}
!35 = !{!36, !36, i64 0}
!36 = !{!"_ZTS9ma_format", !7, i64 0}
!37 = !{!38, !38, i64 0}
!38 = !{!"_ZTS21ma_resample_algorithm", !7, i64 0}
!39 = !{!40, !40, i64 0}
!40 = !{!"_ZTS19ma_channel_mix_mode", !7, i64 0}
!41 = !{!42, !42, i64 0}
!42 = !{!"_ZTS13ma_share_mode", !7, i64 0}
!43 = !{!44, !44, i64 0}
!44 = !{!"_ZTS21ma_opensl_stream_type", !7, i64 0}
!45 = !{!46, !46, i64 0}
!46 = !{!"_ZTS26ma_opensl_recording_preset", !7, i64 0}
!47 = !{!48, !48, i64 0}
!48 = !{!"_ZTS15ma_aaudio_usage", !7, i64 0}
!49 = !{!50, !50, i64 0}
!50 = !{!"_ZTS22ma_aaudio_content_type", !7, i64 0}
!51 = !{!52, !52, i64 0}
!52 = !{!"_ZTS22ma_aaudio_input_preset", !7, i64 0}
!53 = !{!15, !6, i64 24}
!54 = !{!55, !6, i64 112}
!55 = !{!"_ZTS16ma_device_config", !31, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !33, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !56, i64 64, !58, i64 112, !59, i64 144, !60, i64 176, !61, i64 180, !62, i64 200, !63, i64 216, !64, i64 220, !65, i64 228}
!56 = !{!"_ZTS19ma_resampler_config", !36, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !38, i64 16, !6, i64 24, !6, i64 32, !57, i64 40}
!57 = !{!"_ZTSN19ma_resampler_configUt_E", !11, i64 0}
!58 = !{!"_ZTSN16ma_device_configUt_E", !6, i64 0, !36, i64 8, !11, i64 12, !6, i64 16, !40, i64 24, !42, i64 28}
!59 = !{!"_ZTSN16ma_device_configUt0_E", !6, i64 0, !36, i64 8, !11, i64 12, !6, i64 16, !40, i64 24, !42, i64 28}
!60 = !{!"_ZTSN16ma_device_configUt1_E", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!61 = !{!"_ZTSN16ma_device_configUt2_E", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!62 = !{!"_ZTSN16ma_device_configUt3_E", !6, i64 0, !6, i64 8}
!63 = !{!"_ZTSN16ma_device_configUt4_E", !11, i64 0}
!64 = !{!"_ZTSN16ma_device_configUt5_E", !44, i64 0, !46, i64 4}
!65 = !{!"_ZTSN16ma_device_configUt6_E", !48, i64 0, !50, i64 4, !52, i64 8, !11, i64 12}
!66 = !{!55, !36, i64 120}
!67 = !{!15, !11, i64 44}
!68 = !{!55, !11, i64 124}
!69 = !{!15, !11, i64 48}
!70 = !{!55, !11, i64 4}
!71 = !{!55, !6, i64 32}
!72 = !{!55, !6, i64 56}
!73 = !{!15, !11, i64 52}
!74 = !{!55, !11, i64 8}
!75 = !{!15, !11, i64 56}
!76 = !{!55, !11, i64 12}
!77 = !{!55, !7, i64 24}
!78 = !{!55, !7, i64 25}
!79 = !{!15, !6, i64 8}
!80 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!81 = !{!15, !6, i64 32}
!82 = !{!83, !6, i64 0}
!83 = !{!"_ZTS17ma_context_config", !6, i64 0, !84, i64 8, !85, i64 16, !6, i64 24, !16, i64 32, !86, i64 64, !87, i64 72, !88, i64 96, !90, i64 112, !91, i64 128}
!84 = !{!"_ZTS18ma_thread_priority", !7, i64 0}
!85 = !{!"long", !7, i64 0}
!86 = !{!"_ZTSN17ma_context_configUt_E", !11, i64 0}
!87 = !{!"_ZTSN17ma_context_configUt0_E", !6, i64 0, !6, i64 8, !11, i64 16}
!88 = !{!"_ZTSN17ma_context_configUt1_E", !89, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!89 = !{!"_ZTS23ma_ios_session_category", !7, i64 0}
!90 = !{!"_ZTSN17ma_context_configUt2_E", !6, i64 0, !11, i64 8}
!91 = !{!"_ZTS20ma_backend_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!92 = !{!93, !93, i64 0}
!93 = !{!"_ZTS9ma_result", !7, i64 0}
!94 = !{!18, !7, i64 1209}
!95 = !{!96, !11, i64 1040}
!96 = !{!"_ZTS9ma_device", !6, i64 0, !31, i64 8, !11, i64 12, !97, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !98, i64 96, !98, i64 192, !98, i64 288, !85, i64 384, !93, i64 392, !7, i64 396, !7, i64 397, !7, i64 398, !7, i64 399, !7, i64 400, !99, i64 404, !100, i64 408, !103, i64 480, !105, i64 512, !112, i64 1944, !7, i64 3344}
!97 = !{!"_ZTS15ma_device_state", !7, i64 0}
!98 = !{!"_ZTS8ma_event", !11, i64 0, !7, i64 8, !7, i64 48}
!99 = !{!"float", !7, i64 0}
!100 = !{!"_ZTS12ma_duplex_rb", !101, i64 0}
!101 = !{!"_ZTS9ma_pcm_rb", !102, i64 0, !36, i64 64, !11, i64 68}
!102 = !{!"_ZTS5ma_rb", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !7, i64 28, !7, i64 29, !16, i64 32}
!103 = !{!"_ZTSN9ma_deviceUt_E", !38, i64 0, !6, i64 8, !6, i64 16, !104, i64 24}
!104 = !{!"_ZTSN9ma_deviceUt_Ut_E", !11, i64 0}
!105 = !{!"_ZTSN9ma_deviceUt0_E", !6, i64 0, !7, i64 8, !7, i64 264, !42, i64 520, !36, i64 524, !11, i64 528, !7, i64 532, !36, i64 788, !11, i64 792, !11, i64 796, !7, i64 800, !11, i64 1056, !11, i64 1060, !40, i64 1064, !106, i64 1072, !6, i64 1384, !11, i64 1392, !11, i64 1396, !6, i64 1400, !23, i64 1408, !23, i64 1416, !23, i64 1424}
!106 = !{!"_ZTS17ma_data_converter", !36, i64 0, !36, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !107, i64 24, !108, i64 28, !109, i64 32, !111, i64 104, !7, i64 296, !7, i64 297, !7, i64 298, !7, i64 299, !7, i64 300, !7, i64 301, !6, i64 304}
!107 = !{!"_ZTS14ma_dither_mode", !7, i64 0}
!108 = !{!"_ZTS32ma_data_converter_execution_path", !7, i64 0}
!109 = !{!"_ZTS20ma_channel_converter", !36, i64 0, !11, i64 4, !11, i64 8, !40, i64 12, !110, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !7, i64 48, !6, i64 56, !11, i64 64}
!110 = !{!"_ZTS26ma_channel_conversion_path", !7, i64 0}
!111 = !{!"_ZTS12ma_resampler", !6, i64 0, !6, i64 8, !6, i64 16, !36, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !6, i64 176, !11, i64 184}
!112 = !{!"_ZTSN9ma_deviceUt1_E", !6, i64 0, !7, i64 8, !7, i64 264, !42, i64 520, !36, i64 524, !11, i64 528, !7, i64 532, !36, i64 788, !11, i64 792, !11, i64 796, !7, i64 800, !11, i64 1056, !11, i64 1060, !40, i64 1064, !106, i64 1072, !6, i64 1384, !11, i64 1392, !11, i64 1396}
!113 = !{!96, !11, i64 12}
!114 = !{!18, !11, i64 752}
!115 = !{!18, !6, i64 744}
!116 = !{i64 0, i64 4, !10, i64 4, i64 2, !117}
!117 = !{!21, !21, i64 0}
!118 = !{!119, !21, i64 4}
!119 = !{!"_ZTS20ma_node_graph_config", !11, i64 0, !21, i64 4}
!120 = !{!15, !11, i64 40}
!121 = !{i64 0, i64 4, !10, i64 8, i64 8, !5, i64 16, i64 4, !122, i64 20, i64 4, !124, i64 24, i64 4, !124, i64 28, i64 4, !124, i64 32, i64 4, !124, i64 36, i64 4, !124, i64 40, i64 4, !124, i64 44, i64 4, !124}
!122 = !{!123, !123, i64 0}
!123 = !{!"_ZTS13ma_handedness", !7, i64 0}
!124 = !{!99, !99, i64 0}
!125 = !{!18, !11, i64 756}
!126 = distinct !{!126, !127}
!127 = !{!"llvm.loop.mustprogress"}
!128 = !{!15, !11, i64 60}
!129 = !{!18, !11, i64 1228}
!130 = !{!15, !11, i64 64}
!131 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5, i64 40, i64 4, !35, i64 44, i64 4, !10, i64 48, i64 4, !10, i64 52, i64 4, !10, i64 56, i64 4, !10, i64 60, i64 4, !10, i64 64, i64 8, !5, i64 72, i64 8, !5, i64 80, i64 4, !10, i64 88, i64 8, !5}
!132 = !{!133, !6, i64 32}
!133 = !{!"_ZTS26ma_resource_manager_config", !16, i64 0, !6, i64 32, !36, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !6, i64 64, !6, i64 72, !11, i64 80, !6, i64 88}
!134 = !{!133, !36, i64 40}
!135 = !{!133, !11, i64 44}
!136 = !{!133, !11, i64 48}
!137 = !{!15, !6, i64 120}
!138 = !{!133, !6, i64 64}
!139 = !{!18, !7, i64 1208}
!140 = !{!18, !11, i64 1212}
!141 = !{!18, !6, i64 1216}
!142 = !{!15, !11, i64 104}
!143 = distinct !{!143, !127}


; 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.ma_context_config = type { ptr, i32, i64, ptr, %struct.ma_allocation_callbacks, %struct.anon.37, %struct.anon.38, %struct.anon.39, %struct.anon.40, %struct.ma_backend_callbacks }
%struct.ma_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.anon.37 = type { i32 }
%struct.anon.38 = type { ptr, ptr, i32 }
%struct.anon.39 = type { i32, i32, i32, i32 }
%struct.anon.40 = type { ptr, i32 }
%struct.ma_backend_callbacks = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ma_device_config = type { i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, ptr, ptr, ptr, ptr, %struct.ma_resampler_config, %struct.anon.49, %struct.anon.50, %struct.anon.51, %struct.anon.52, %struct.anon.53, %struct.anon.54, %struct.anon.55, %struct.anon.56 }
%struct.ma_resampler_config = type { i32, i32, i32, i32, i32, ptr, ptr, %struct.anon.48 }
%struct.anon.48 = type { i32 }
%struct.anon.49 = type { ptr, i32, i32, ptr, i32, i32 }
%struct.anon.50 = type { ptr, i32, i32, ptr, i32, i32 }
%struct.anon.51 = type { i8, i8, i8, i8 }
%struct.anon.52 = type { i32, i32, i32, i32 }
%struct.anon.53 = type { ptr, ptr }
%struct.anon.54 = type { i32 }
%struct.anon.55 = type { i32, i32 }
%struct.anon.56 = type { i32, i32, i32, i32 }
%struct.ma_spatializer_listener_config = type { i32, ptr, i32, float, float, float, float, %struct.ma_vec3f }
%struct.ma_vec3f = type { float, float, float }
%struct.ma_resource_manager_config = type { %struct.ma_allocation_callbacks, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, ptr }
%struct.ma_engine_config = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, %struct.ma_allocation_callbacks, i32, i32, i32, ptr }
%struct.ma_node_graph_config = type { i32, i16 }
%struct.ma_spatializer_listener = type { %struct.ma_spatializer_listener_config, %struct.ma_vec3f, %struct.ma_vec3f, %struct.ma_vec3f, i32, i32, ptr }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @ma_malloc(i64 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_free(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL33ma_allocation_callbacks_init_copyP23ma_allocation_callbacksPKS_(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ma_context_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_context_config) align 8) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_device_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_device_config) align 8, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_device_init(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_device_init_ex(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_device_uninit(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @ma_device_get_log(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ma_spatializer_listener_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_spatializer_listener_config) align 8, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_spatializer_listener_init(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_spatializer_listener_uninit(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ma_resource_manager_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_resource_manager_config) align 8) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_resource_manager_init(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @ma_resource_manager_get_log(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @ma_node_graph_config_init(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_node_graph_init(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_node_graph_uninit(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_node_graph_get_channels(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @ma_engine_get_sample_rate(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ma_engine_config_init(ptr dead_on_unwind noalias writable sret(%struct.ma_engine_config) align 8) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local i32 @ma_engine_init(ptr noundef readonly %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca %struct.ma_node_graph_config, align 8
  %4 = alloca %struct.ma_engine_config, align 8
  %5 = alloca %struct.ma_spatializer_listener_config, align 8
  %6 = alloca %struct.ma_engine_config, align 8
  %7 = alloca %struct.ma_device_config, align 8
  %8 = alloca %struct.ma_device_config, align 8
  %9 = alloca %struct.ma_context_config, align 8
  %10 = alloca %struct.ma_spatializer_listener_config, align 8
  %11 = alloca %struct.ma_resource_manager_config, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #7
  %12 = icmp eq ptr %1, null
  br i1 %12, label %186, label %13

13:                                               ; preds = %2
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1240) %1, i8 0, i64 1240, i1 false)
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %15, label %14

14:                                               ; preds = %13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 8 dereferenceable(128) %0, i64 128, i1 false), !tbaa.struct !5
  br label %16

15:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #7
  call void @ma_engine_config_init(ptr dead_on_unwind nonnull writable sret(%struct.ma_engine_config) align 8 %6)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 8 dereferenceable(128) %6, i64 128, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #7
  br label %16

16:                                               ; preds = %15, %14
  %17 = getelementptr inbounds i8, ptr %4, i64 112
  %18 = load i32, ptr %17, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %1, i64 1232
  store i32 %18, ptr %19, align 8, !tbaa !17
  %20 = getelementptr inbounds i8, ptr %1, i64 1176
  %21 = getelementptr inbounds i8, ptr %4, i64 72
  %22 = call noundef i32 @_ZL33ma_allocation_callbacks_init_copyP23ma_allocation_callbacksPKS_(ptr noundef nonnull %20, ptr noundef nonnull %21)
  %23 = load ptr, ptr %4, align 8, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %1, i64 728
  store ptr %23, ptr %24, align 8, !tbaa !25
  %25 = getelementptr inbounds i8, ptr %4, i64 16
  %26 = load ptr, ptr %25, align 8, !tbaa !26
  %27 = getelementptr inbounds i8, ptr %1, i64 736
  store ptr %26, ptr %27, align 8, !tbaa !27
  %28 = icmp eq ptr %26, null
  %29 = getelementptr inbounds i8, ptr %4, i64 108
  %30 = load i32, ptr %29, align 4
  %31 = icmp eq i32 %30, 0
  %or.cond = select i1 %28, i1 %31, i1 false
  br i1 %or.cond, label %32, label %76

32:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 248, ptr nonnull %7) #7
  %33 = call ptr @ma_malloc(i64 noundef 3696, ptr noundef nonnull %20)
  store ptr %33, ptr %27, align 8, !tbaa !27
  %34 = icmp eq ptr %33, null
  br i1 %34, label %.thread, label %35

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 248, ptr nonnull %8) #7
  call void @ma_device_config_init(ptr dead_on_unwind nonnull writable sret(%struct.ma_device_config) align 8 %8, i32 noundef 1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(248) %7, ptr noundef nonnull align 8 dereferenceable(248) %8, i64 248, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %8) #7
  %36 = getelementptr inbounds i8, ptr %4, i64 24
  %37 = load ptr, ptr %36, align 8, !tbaa !52
  %38 = getelementptr inbounds i8, ptr %7, i64 112
  store ptr %37, ptr %38, align 8, !tbaa !53
  %39 = getelementptr inbounds i8, ptr %7, i64 120
  store i32 5, ptr %39, align 8, !tbaa !65
  %40 = getelementptr inbounds i8, ptr %4, i64 44
  %41 = load i32, ptr %40, align 4, !tbaa !66
  %42 = getelementptr inbounds i8, ptr %7, i64 124
  store i32 %41, ptr %42, align 4, !tbaa !67
  %43 = getelementptr inbounds i8, ptr %4, i64 48
  %44 = getelementptr inbounds i8, ptr %7, i64 4
  %45 = getelementptr inbounds i8, ptr %7, i64 32
  store ptr @_ZL32ma_engine_data_callback_internalP9ma_devicePvPKvj, ptr %45, align 8, !tbaa !68
  %46 = getelementptr inbounds i8, ptr %7, i64 56
  store ptr %1, ptr %46, align 8, !tbaa !69
  %47 = load <2 x i32>, ptr %43, align 8, !tbaa !10
  store <2 x i32> %47, ptr %44, align 4, !tbaa !10
  %48 = getelementptr inbounds i8, ptr %4, i64 56
  %49 = load i32, ptr %48, align 8, !tbaa !70
  %50 = getelementptr inbounds i8, ptr %7, i64 12
  store i32 %49, ptr %50, align 4, !tbaa !71
  %51 = getelementptr inbounds i8, ptr %7, i64 24
  store i8 1, ptr %51, align 8, !tbaa !72
  %52 = getelementptr inbounds i8, ptr %7, i64 25
  store i8 1, ptr %52, align 1, !tbaa !73
  %53 = getelementptr inbounds i8, ptr %4, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !74
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %68

56:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 232, ptr nonnull %9) #7
  call void @ma_context_config_init(ptr dead_on_unwind nonnull writable sret(%struct.ma_context_config) align 8 %9)
  %57 = getelementptr inbounds i8, ptr %9, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %57, ptr noundef nonnull align 8 dereferenceable(32) %20, i64 32, i1 false), !tbaa.struct !75
  %58 = getelementptr inbounds i8, ptr %4, i64 32
  %59 = load ptr, ptr %58, align 8, !tbaa !76
  store ptr %59, ptr %9, align 8, !tbaa !77
  %60 = icmp eq ptr %59, null
  %61 = load ptr, ptr %4, align 8
  %62 = icmp ne ptr %61, null
  %or.cond5 = select i1 %60, i1 %62, i1 false
  br i1 %or.cond5, label %63, label %65

63:                                               ; preds = %56
  %64 = call ptr @ma_resource_manager_get_log(ptr noundef nonnull %61)
  store ptr %64, ptr %9, align 8, !tbaa !77
  br label %65

65:                                               ; preds = %63, %56
  %66 = load ptr, ptr %27, align 8, !tbaa !27
  %67 = call i32 @ma_device_init_ex(ptr noundef null, i32 noundef 0, ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef %66)
  call void @llvm.lifetime.end.p0(i64 232, ptr nonnull %9) #7
  br label %71

68:                                               ; preds = %35
  %69 = load ptr, ptr %27, align 8, !tbaa !27
  %70 = call i32 @ma_device_init(ptr noundef nonnull %54, ptr noundef nonnull %7, ptr noundef %69)
  br label %71

71:                                               ; preds = %68, %65
  %.088 = phi i32 [ %67, %65 ], [ %70, %68 ]
  %.not107 = icmp eq i32 %.088, 0
  br i1 %.not107, label %74, label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %27, align 8, !tbaa !27
  call void @ma_free(ptr noundef %73, ptr noundef nonnull %20)
  store ptr null, ptr %27, align 8, !tbaa !27
  br label %.thread

.thread:                                          ; preds = %72, %32
  %.0.ph = phi i32 [ -4, %32 ], [ %.088, %72 ]
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %7) #7
  br label %186

74:                                               ; preds = %71
  %75 = getelementptr inbounds i8, ptr %1, i64 1209
  store i8 1, ptr %75, align 1, !tbaa !87
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %7) #7
  %.pre = load ptr, ptr %27, align 8, !tbaa !27
  br label %76

76:                                               ; preds = %74, %16
  %77 = phi ptr [ %.pre, %74 ], [ %26, %16 ]
  %.not108 = icmp eq ptr %77, null
  br i1 %.not108, label %._crit_edge137, label %78

._crit_edge137:                                   ; preds = %76
  %.phi.trans.insert = getelementptr inbounds i8, ptr %4, i64 44
  %.pre138 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !66
  %.phi.trans.insert139 = getelementptr inbounds i8, ptr %4, i64 48
  %.pre140 = load i32, ptr %.phi.trans.insert139, align 8
  br label %85

78:                                               ; preds = %76
  %79 = getelementptr inbounds i8, ptr %77, i64 1040
  %80 = load i32, ptr %79, align 8, !tbaa !88
  %81 = getelementptr inbounds i8, ptr %4, i64 44
  store i32 %80, ptr %81, align 4, !tbaa !66
  %82 = getelementptr inbounds i8, ptr %77, i64 12
  %83 = load i32, ptr %82, align 4, !tbaa !107
  %84 = getelementptr inbounds i8, ptr %4, i64 48
  store i32 %83, ptr %84, align 8, !tbaa !108
  br label %85

85:                                               ; preds = %._crit_edge137, %78
  %86 = phi i32 [ %.pre140, %._crit_edge137 ], [ %83, %78 ]
  %87 = phi i32 [ %.pre138, %._crit_edge137 ], [ %80, %78 ]
  %88 = getelementptr inbounds i8, ptr %4, i64 44
  %89 = icmp eq i32 %87, 0
  %90 = icmp eq i32 %86, 0
  %or.cond8 = select i1 %89, i1 true, i1 %90
  br i1 %or.cond8, label %186, label %91

91:                                               ; preds = %85
  %92 = getelementptr inbounds i8, ptr %1, i64 752
  store i32 %86, ptr %92, align 8, !tbaa !109
  %93 = getelementptr inbounds i8, ptr %4, i64 32
  %94 = load ptr, ptr %93, align 8, !tbaa !76
  %.not109 = icmp eq ptr %94, null
  br i1 %.not109, label %95, label %97

95:                                               ; preds = %91
  %96 = call ptr @ma_device_get_log(ptr noundef %77)
  %.pre141 = load i32, ptr %88, align 4, !tbaa !66
  br label %97

97:                                               ; preds = %91, %95
  %98 = phi i32 [ %.pre141, %95 ], [ %87, %91 ]
  %.sink = phi ptr [ %96, %95 ], [ %94, %91 ]
  %99 = getelementptr inbounds i8, ptr %1, i64 744
  store ptr %.sink, ptr %99, align 8
  %100 = call i64 @ma_node_graph_config_init(i32 noundef %98)
  store i64 %100, ptr %3, align 8
  %101 = getelementptr inbounds i8, ptr %4, i64 52
  %102 = load i32, ptr %101, align 4
  %103 = call i32 @llvm.umin.i32(i32 %102, i32 65535)
  %104 = trunc nuw i32 %103 to i16
  %105 = getelementptr inbounds i8, ptr %3, i64 4
  store i16 %104, ptr %105, align 4, !tbaa !110
  %106 = call i32 @ma_node_graph_init(ptr noundef nonnull %3, ptr noundef nonnull %20, ptr noundef nonnull %1)
  %.not110 = icmp eq i32 %106, 0
  br i1 %.not110, label %107, label %180

107:                                              ; preds = %97
  %108 = getelementptr inbounds i8, ptr %4, i64 40
  %109 = load i32, ptr %108, align 8, !tbaa !112
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %.thread142, label %111

.thread142:                                       ; preds = %107
  store i32 1, ptr %108, align 8, !tbaa !112
  br label %.lr.ph

111:                                              ; preds = %107
  %112 = icmp ugt i32 %109, 4
  br i1 %112, label %180, label %.lr.ph

.lr.ph:                                           ; preds = %111, %.thread142
  %113 = getelementptr inbounds i8, ptr %1, i64 760
  %114 = getelementptr inbounds i8, ptr %1, i64 756
  br label %115

115:                                              ; preds = %.lr.ph, %119
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %119 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #7
  %116 = call i32 @ma_node_graph_get_channels(ptr noundef nonnull %1)
  call void @ma_spatializer_listener_config_init(ptr dead_on_unwind nonnull writable sret(%struct.ma_spatializer_listener_config) align 8 %10, i32 noundef %116)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(48) %10, i64 48, i1 false), !tbaa.struct !113
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #7
  %117 = getelementptr inbounds [4 x %struct.ma_spatializer_listener], ptr %113, i64 0, i64 %indvars.iv
  %118 = call i32 @ma_spatializer_listener_init(ptr noundef nonnull %5, ptr noundef nonnull %20, ptr noundef nonnull %117)
  %.not115 = icmp eq i32 %118, 0
  br i1 %.not115, label %119, label %.loopexit

119:                                              ; preds = %115
  %120 = load i32, ptr %114, align 4, !tbaa !117
  %121 = add i32 %120, 1
  store i32 %121, ptr %114, align 4, !tbaa !117
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %122 = load i32, ptr %108, align 8, !tbaa !112
  %123 = zext i32 %122 to i64
  %124 = icmp ult i64 %indvars.iv.next, %123
  br i1 %124, label %115, label %._crit_edge, !llvm.loop !118

._crit_edge:                                      ; preds = %119
  %125 = getelementptr inbounds i8, ptr %4, i64 60
  %126 = load i32, ptr %125, align 4, !tbaa !120
  %127 = getelementptr inbounds i8, ptr %1, i64 1228
  store i32 %126, ptr %127, align 4, !tbaa !121
  %128 = icmp eq i32 %126, 0
  br i1 %128, label %129, label %136

129:                                              ; preds = %._crit_edge
  %130 = getelementptr inbounds i8, ptr %4, i64 64
  %131 = load i32, ptr %130, align 8, !tbaa !122
  %132 = icmp eq i32 %131, 0
  %spec.store.select = select i1 %132, i32 8, i32 %131
  %133 = call i32 @ma_engine_get_sample_rate(ptr noundef nonnull %1)
  %134 = mul i32 %spec.store.select, %133
  %135 = udiv i32 %134, 1000
  store i32 %135, ptr %127, align 4, !tbaa !121
  br label %136

136:                                              ; preds = %129, %._crit_edge
  %137 = load ptr, ptr %24, align 8, !tbaa !25
  %138 = icmp eq ptr %137, null
  br i1 %138, label %139, label %157

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %11) #7
  %140 = call ptr @ma_malloc(i64 noundef 1088, ptr noundef nonnull %20)
  store ptr %140, ptr %24, align 8, !tbaa !25
  %141 = icmp eq ptr %140, null
  br i1 %141, label %156, label %142

142:                                              ; preds = %139
  call void @ma_resource_manager_config_init(ptr dead_on_unwind nonnull writable sret(%struct.ma_resource_manager_config) align 8 %11)
  %143 = load ptr, ptr %99, align 8, !tbaa !123
  %144 = getelementptr inbounds i8, ptr %11, i64 32
  store ptr %143, ptr %144, align 8, !tbaa !124
  %145 = getelementptr inbounds i8, ptr %11, i64 40
  store i32 5, ptr %145, align 8, !tbaa !126
  %146 = getelementptr inbounds i8, ptr %11, i64 44
  store i32 0, ptr %146, align 4, !tbaa !127
  %147 = call i32 @ma_engine_get_sample_rate(ptr noundef nonnull %1)
  %148 = getelementptr inbounds i8, ptr %11, i64 48
  store i32 %147, ptr %148, align 8, !tbaa !128
  %149 = call noundef i32 @_ZL33ma_allocation_callbacks_init_copyP23ma_allocation_callbacksPKS_(ptr noundef nonnull %11, ptr noundef nonnull %20)
  %150 = getelementptr inbounds i8, ptr %4, i64 120
  %151 = load ptr, ptr %150, align 8, !tbaa !129
  %152 = getelementptr inbounds i8, ptr %11, i64 64
  store ptr %151, ptr %152, align 8, !tbaa !130
  %153 = load ptr, ptr %24, align 8, !tbaa !25
  %154 = call i32 @ma_resource_manager_init(ptr noundef nonnull %11, ptr noundef %153)
  %.not111 = icmp eq i32 %154, 0
  br i1 %.not111, label %.thread119, label %.thread122

.thread122:                                       ; preds = %142
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %11) #7
  br label %167

.thread119:                                       ; preds = %142
  %155 = getelementptr inbounds i8, ptr %1, i64 1208
  store i8 1, ptr %155, align 8, !tbaa !131
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %11) #7
  br label %157

156:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %11) #7
  br label %.loopexit

157:                                              ; preds = %.thread119, %136
  %158 = getelementptr inbounds i8, ptr %1, i64 1212
  store i32 0, ptr %158, align 4, !tbaa !132
  %159 = getelementptr inbounds i8, ptr %1, i64 1216
  store ptr null, ptr %159, align 8, !tbaa !133
  %160 = getelementptr inbounds i8, ptr %4, i64 104
  %161 = load i32, ptr %160, align 8, !tbaa !134
  %162 = icmp eq i32 %161, 0
  br i1 %162, label %163, label %186

163:                                              ; preds = %157
  %164 = load ptr, ptr %27, align 8, !tbaa !27
  %.not112 = icmp eq ptr %164, null
  br i1 %.not112, label %186, label %165

165:                                              ; preds = %163
  %166 = call i32 @ma_engine_start(ptr noundef nonnull %1)
  %.not113 = icmp eq i32 %166, 0
  br i1 %.not113, label %186, label %167

167:                                              ; preds = %.thread122, %165
  %.290 = phi i32 [ %166, %165 ], [ %154, %.thread122 ]
  %168 = getelementptr inbounds i8, ptr %1, i64 1208
  %169 = load i8, ptr %168, align 8, !tbaa !131
  %.not114 = icmp eq i8 %169, 0
  br i1 %.not114, label %.loopexit, label %170

170:                                              ; preds = %167
  %171 = load ptr, ptr %24, align 8, !tbaa !25
  call void @ma_free(ptr noundef %171, ptr noundef nonnull %20)
  br label %.loopexit

.loopexit:                                        ; preds = %115, %156, %167, %170
  %.3 = phi i32 [ -4, %156 ], [ %.290, %170 ], [ %.290, %167 ], [ %118, %115 ]
  %172 = getelementptr inbounds i8, ptr %1, i64 756
  %173 = load i32, ptr %172, align 4, !tbaa !117
  %.not131 = icmp eq i32 %173, 0
  br i1 %.not131, label %._crit_edge129, label %.lr.ph128

.lr.ph128:                                        ; preds = %.loopexit
  %174 = getelementptr inbounds i8, ptr %1, i64 760
  br label %175

175:                                              ; preds = %.lr.ph128, %175
  %indvars.iv134 = phi i64 [ 0, %.lr.ph128 ], [ %indvars.iv.next135, %175 ]
  %176 = getelementptr inbounds [4 x %struct.ma_spatializer_listener], ptr %174, i64 0, i64 %indvars.iv134
  call void @ma_spatializer_listener_uninit(ptr noundef nonnull %176, ptr noundef nonnull %20)
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %177 = load i32, ptr %172, align 4, !tbaa !117
  %178 = zext i32 %177 to i64
  %179 = icmp ult i64 %indvars.iv.next135, %178
  br i1 %179, label %175, label %._crit_edge129, !llvm.loop !135

._crit_edge129:                                   ; preds = %175, %.loopexit
  call void @ma_node_graph_uninit(ptr noundef nonnull %1, ptr noundef nonnull %20)
  br label %180

180:                                              ; preds = %111, %97, %._crit_edge129
  %.4 = phi i32 [ %106, %97 ], [ %.3, %._crit_edge129 ], [ -2, %111 ]
  %181 = getelementptr inbounds i8, ptr %1, i64 1209
  %182 = load i8, ptr %181, align 1, !tbaa !87
  %.not116 = icmp eq i8 %182, 0
  br i1 %.not116, label %186, label %183

183:                                              ; preds = %180
  %184 = load ptr, ptr %27, align 8, !tbaa !27
  call void @ma_device_uninit(ptr noundef %184)
  %185 = load ptr, ptr %27, align 8, !tbaa !27
  call void @ma_free(ptr noundef %185, ptr noundef nonnull %20)
  br label %186

186:                                              ; preds = %.thread, %180, %183, %157, %163, %165, %85, %2
  %.2 = phi i32 [ -2, %2 ], [ -2, %85 ], [ 0, %165 ], [ 0, %163 ], [ 0, %157 ], [ %.4, %183 ], [ %.4, %180 ], [ %.0.ph, %.thread ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i32 %.2
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL32ma_engine_data_callback_internalP9ma_devicePvPKvj(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @ma_engine_start(ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #6

attributes #0 = { mustprogress 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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{i64 0, i64 8, !6, i64 8, i64 8, !6, i64 16, i64 8, !6, i64 24, i64 8, !6, i64 32, i64 8, !6, i64 40, i64 4, !10, i64 44, i64 4, !10, i64 48, i64 4, !10, i64 52, i64 4, !10, i64 56, i64 4, !10, i64 60, i64 4, !10, i64 64, i64 4, !10, i64 72, i64 8, !6, i64 80, i64 8, !6, i64 88, i64 8, !6, i64 96, i64 8, !6, i64 104, i64 4, !10, i64 108, i64 4, !10, i64 112, i64 4, !12, i64 120, i64 8, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS22ma_mono_expansion_mode", !8, i64 0}
!14 = !{!15, !13, i64 112}
!15 = !{!"_ZTS16ma_engine_config", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !16, i64 72, !11, i64 104, !11, i64 108, !13, i64 112, !7, i64 120}
!16 = !{!"_ZTS23ma_allocation_callbacks", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!17 = !{!18, !13, i64 1232}
!18 = !{!"_ZTS9ma_engine", !19, i64 0, !7, i64 728, !7, i64 736, !7, i64 744, !11, i64 752, !11, i64 756, !8, i64 760, !16, i64 1176, !8, i64 1208, !8, i64 1209, !11, i64 1212, !7, i64 1216, !11, i64 1224, !11, i64 1228, !13, i64 1232}
!19 = !{!"_ZTS13ma_node_graph", !20, i64 0, !20, i64 360, !21, i64 720, !11, i64 724}
!20 = !{!"_ZTS12ma_node_base", !7, i64 0, !7, i64 8, !7, i64 16, !21, i64 24, !21, i64 26, !21, i64 28, !21, i64 30, !22, i64 32, !8, i64 40, !23, i64 56, !11, i64 64, !11, i64 68, !7, i64 72, !7, i64 80, !8, i64 88, !8, i64 232, !7, i64 344, !11, i64 352}
!21 = !{!"short", !8, i64 0}
!22 = !{!"_ZTS13ma_node_state", !8, i64 0}
!23 = !{!"long long", !8, i64 0}
!24 = !{!15, !7, i64 0}
!25 = !{!18, !7, i64 728}
!26 = !{!15, !7, i64 16}
!27 = !{!18, !7, i64 736}
!28 = !{i64 0, i64 4, !29, i64 4, i64 4, !10, i64 8, i64 4, !10, i64 12, i64 4, !10, i64 16, i64 4, !10, i64 20, i64 4, !31, i64 24, i64 1, !33, i64 25, i64 1, !33, i64 26, i64 1, !33, i64 27, i64 1, !33, i64 32, i64 8, !6, i64 40, i64 8, !6, i64 48, i64 8, !6, i64 56, i64 8, !6, i64 64, i64 4, !34, i64 68, i64 4, !10, i64 72, i64 4, !10, i64 76, i64 4, !10, i64 80, i64 4, !36, i64 88, i64 8, !6, i64 96, i64 8, !6, i64 104, i64 4, !10, i64 112, i64 8, !6, i64 120, i64 4, !34, i64 124, i64 4, !10, i64 128, i64 8, !6, i64 136, i64 4, !38, i64 140, i64 4, !40, i64 144, i64 8, !6, i64 152, i64 4, !34, i64 156, i64 4, !10, i64 160, i64 8, !6, i64 168, i64 4, !38, i64 172, i64 4, !40, i64 176, i64 1, !33, i64 177, i64 1, !33, i64 178, i64 1, !33, i64 179, i64 1, !33, i64 180, i64 4, !10, i64 184, i64 4, !10, i64 188, i64 4, !10, i64 192, i64 4, !10, i64 200, i64 8, !6, i64 208, i64 8, !6, i64 216, i64 4, !10, i64 220, i64 4, !42, i64 224, i64 4, !44, i64 228, i64 4, !46, i64 232, i64 4, !48, i64 236, i64 4, !50, i64 240, i64 4, !10}
!29 = !{!30, !30, i64 0}
!30 = !{!"_ZTS14ma_device_type", !8, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"_ZTS22ma_performance_profile", !8, i64 0}
!33 = !{!8, !8, i64 0}
!34 = !{!35, !35, i64 0}
!35 = !{!"_ZTS9ma_format", !8, i64 0}
!36 = !{!37, !37, i64 0}
!37 = !{!"_ZTS21ma_resample_algorithm", !8, i64 0}
!38 = !{!39, !39, i64 0}
!39 = !{!"_ZTS19ma_channel_mix_mode", !8, i64 0}
!40 = !{!41, !41, i64 0}
!41 = !{!"_ZTS13ma_share_mode", !8, i64 0}
!42 = !{!43, !43, i64 0}
!43 = !{!"_ZTS21ma_opensl_stream_type", !8, i64 0}
!44 = !{!45, !45, i64 0}
!45 = !{!"_ZTS26ma_opensl_recording_preset", !8, i64 0}
!46 = !{!47, !47, i64 0}
!47 = !{!"_ZTS15ma_aaudio_usage", !8, i64 0}
!48 = !{!49, !49, i64 0}
!49 = !{!"_ZTS22ma_aaudio_content_type", !8, i64 0}
!50 = !{!51, !51, i64 0}
!51 = !{!"_ZTS22ma_aaudio_input_preset", !8, i64 0}
!52 = !{!15, !7, i64 24}
!53 = !{!54, !7, i64 112}
!54 = !{!"_ZTS16ma_device_config", !30, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !32, i64 20, !8, i64 24, !8, i64 25, !8, i64 26, !8, i64 27, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !55, i64 64, !57, i64 112, !58, i64 144, !59, i64 176, !60, i64 180, !61, i64 200, !62, i64 216, !63, i64 220, !64, i64 228}
!55 = !{!"_ZTS19ma_resampler_config", !35, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !37, i64 16, !7, i64 24, !7, i64 32, !56, i64 40}
!56 = !{!"_ZTSN19ma_resampler_configUt_E", !11, i64 0}
!57 = !{!"_ZTSN16ma_device_configUt_E", !7, i64 0, !35, i64 8, !11, i64 12, !7, i64 16, !39, i64 24, !41, i64 28}
!58 = !{!"_ZTSN16ma_device_configUt0_E", !7, i64 0, !35, i64 8, !11, i64 12, !7, i64 16, !39, i64 24, !41, i64 28}
!59 = !{!"_ZTSN16ma_device_configUt1_E", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3}
!60 = !{!"_ZTSN16ma_device_configUt2_E", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!61 = !{!"_ZTSN16ma_device_configUt3_E", !7, i64 0, !7, i64 8}
!62 = !{!"_ZTSN16ma_device_configUt4_E", !11, i64 0}
!63 = !{!"_ZTSN16ma_device_configUt5_E", !43, i64 0, !45, i64 4}
!64 = !{!"_ZTSN16ma_device_configUt6_E", !47, i64 0, !49, i64 4, !51, i64 8, !11, i64 12}
!65 = !{!54, !35, i64 120}
!66 = !{!15, !11, i64 44}
!67 = !{!54, !11, i64 124}
!68 = !{!54, !7, i64 32}
!69 = !{!54, !7, i64 56}
!70 = !{!15, !11, i64 56}
!71 = !{!54, !11, i64 12}
!72 = !{!54, !8, i64 24}
!73 = !{!54, !8, i64 25}
!74 = !{!15, !7, i64 8}
!75 = !{i64 0, i64 8, !6, i64 8, i64 8, !6, i64 16, i64 8, !6, i64 24, i64 8, !6}
!76 = !{!15, !7, i64 32}
!77 = !{!78, !7, i64 0}
!78 = !{!"_ZTS17ma_context_config", !7, i64 0, !79, i64 8, !80, i64 16, !7, i64 24, !16, i64 32, !81, i64 64, !82, i64 72, !83, i64 96, !85, i64 112, !86, i64 128}
!79 = !{!"_ZTS18ma_thread_priority", !8, i64 0}
!80 = !{!"long", !8, i64 0}
!81 = !{!"_ZTSN17ma_context_configUt_E", !11, i64 0}
!82 = !{!"_ZTSN17ma_context_configUt0_E", !7, i64 0, !7, i64 8, !11, i64 16}
!83 = !{!"_ZTSN17ma_context_configUt1_E", !84, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!84 = !{!"_ZTS23ma_ios_session_category", !8, i64 0}
!85 = !{!"_ZTSN17ma_context_configUt2_E", !7, i64 0, !11, i64 8}
!86 = !{!"_ZTS20ma_backend_callbacks", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96}
!87 = !{!18, !8, i64 1209}
!88 = !{!89, !11, i64 1040}
!89 = !{!"_ZTS9ma_device", !7, i64 0, !30, i64 8, !11, i64 12, !90, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !8, i64 56, !91, i64 96, !91, i64 192, !91, i64 288, !80, i64 384, !92, i64 392, !8, i64 396, !8, i64 397, !8, i64 398, !8, i64 399, !8, i64 400, !93, i64 404, !94, i64 408, !97, i64 480, !99, i64 512, !106, i64 1944, !8, i64 3344}
!90 = !{!"_ZTS15ma_device_state", !8, i64 0}
!91 = !{!"_ZTS8ma_event", !11, i64 0, !8, i64 8, !8, i64 48}
!92 = !{!"_ZTS9ma_result", !8, i64 0}
!93 = !{!"float", !8, i64 0}
!94 = !{!"_ZTS12ma_duplex_rb", !95, i64 0}
!95 = !{!"_ZTS9ma_pcm_rb", !96, i64 0, !35, i64 64, !11, i64 68}
!96 = !{!"_ZTS5ma_rb", !7, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !8, i64 28, !8, i64 29, !16, i64 32}
!97 = !{!"_ZTSN9ma_deviceUt_E", !37, i64 0, !7, i64 8, !7, i64 16, !98, i64 24}
!98 = !{!"_ZTSN9ma_deviceUt_Ut_E", !11, i64 0}
!99 = !{!"_ZTSN9ma_deviceUt0_E", !7, i64 0, !8, i64 8, !8, i64 264, !41, i64 520, !35, i64 524, !11, i64 528, !8, i64 532, !35, i64 788, !11, i64 792, !11, i64 796, !8, i64 800, !11, i64 1056, !11, i64 1060, !39, i64 1064, !100, i64 1072, !7, i64 1384, !11, i64 1392, !11, i64 1396, !7, i64 1400, !23, i64 1408, !23, i64 1416, !23, i64 1424}
!100 = !{!"_ZTS17ma_data_converter", !35, i64 0, !35, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !101, i64 24, !102, i64 28, !103, i64 32, !105, i64 104, !8, i64 296, !8, i64 297, !8, i64 298, !8, i64 299, !8, i64 300, !8, i64 301, !7, i64 304}
!101 = !{!"_ZTS14ma_dither_mode", !8, i64 0}
!102 = !{!"_ZTS32ma_data_converter_execution_path", !8, i64 0}
!103 = !{!"_ZTS20ma_channel_converter", !35, i64 0, !11, i64 4, !11, i64 8, !39, i64 12, !104, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !8, i64 48, !7, i64 56, !11, i64 64}
!104 = !{!"_ZTS26ma_channel_conversion_path", !8, i64 0}
!105 = !{!"_ZTS12ma_resampler", !7, i64 0, !7, i64 8, !7, i64 16, !35, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !8, i64 40, !7, i64 176, !11, i64 184}
!106 = !{!"_ZTSN9ma_deviceUt1_E", !7, i64 0, !8, i64 8, !8, i64 264, !41, i64 520, !35, i64 524, !11, i64 528, !8, i64 532, !35, i64 788, !11, i64 792, !11, i64 796, !8, i64 800, !11, i64 1056, !11, i64 1060, !39, i64 1064, !100, i64 1072, !7, i64 1384, !11, i64 1392, !11, i64 1396}
!107 = !{!89, !11, i64 12}
!108 = !{!15, !11, i64 48}
!109 = !{!18, !11, i64 752}
!110 = !{!111, !21, i64 4}
!111 = !{!"_ZTS20ma_node_graph_config", !11, i64 0, !21, i64 4}
!112 = !{!15, !11, i64 40}
!113 = !{i64 0, i64 4, !10, i64 8, i64 8, !6, i64 16, i64 4, !114, i64 20, i64 4, !116, i64 24, i64 4, !116, i64 28, i64 4, !116, i64 32, i64 4, !116, i64 36, i64 4, !116, i64 40, i64 4, !116, i64 44, i64 4, !116}
!114 = !{!115, !115, i64 0}
!115 = !{!"_ZTS13ma_handedness", !8, i64 0}
!116 = !{!93, !93, i64 0}
!117 = !{!18, !11, i64 756}
!118 = distinct !{!118, !119}
!119 = !{!"llvm.loop.mustprogress"}
!120 = !{!15, !11, i64 60}
!121 = !{!18, !11, i64 1228}
!122 = !{!15, !11, i64 64}
!123 = !{!18, !7, i64 744}
!124 = !{!125, !7, i64 32}
!125 = !{!"_ZTS26ma_resource_manager_config", !16, i64 0, !7, i64 32, !35, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !7, i64 64, !7, i64 72, !11, i64 80, !7, i64 88}
!126 = !{!125, !35, i64 40}
!127 = !{!125, !11, i64 44}
!128 = !{!125, !11, i64 48}
!129 = !{!15, !7, i64 120}
!130 = !{!125, !7, i64 64}
!131 = !{!18, !8, i64 1208}
!132 = !{!18, !11, i64 1212}
!133 = !{!18, !7, i64 1216}
!134 = !{!15, !11, i64 104}
!135 = distinct !{!135, !119}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass