; 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_node_heap_layout = type { i64, i64, i64, i64, i32, 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_node_config = type { ptr, i32, i32, i32, ptr, ptr }
%struct.ma_node_graph = type { %struct.ma_node_base, %struct.ma_node_base, i16, i32 }

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_silence_pcm_frames(ptr noundef, i64 noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @ma_node_init_preallocated(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.ma_node_heap_layout, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %17, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %18 = load ptr, ptr %10, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %4
  store i32 -2, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %231

21:                                               ; preds = %4
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 360, i1 false)
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call noundef i32 @_ZL23ma_node_get_heap_layoutP13ma_node_graphPK14ma_node_configP19ma_node_heap_layout(ptr noundef %23, ptr noundef %24, ptr noundef %12)
  store i32 %25, ptr %11, align 4, !tbaa !9
  %26 = load i32, ptr %11, align 4, !tbaa !9
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %30

28:                                               ; preds = %21
  %29 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %29, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %231

30:                                               ; preds = %21
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ma_node_base, ptr %32, i32 0, i32 16
  store ptr %31, ptr %33, align 8, !tbaa !11
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 0
  %36 = load i64, ptr %35, align 8, !tbaa !17
  call void @llvm.memset.p0.i64(ptr align 1 %34, i8 0, i64 %36, i1 false)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.ma_node_base, ptr %38, i32 0, i32 0
  store ptr %37, ptr %39, align 8, !tbaa !20
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ma_node_config, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !21
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ma_node_base, ptr %43, i32 0, i32 1
  store ptr %42, ptr %44, align 8, !tbaa !23
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ma_node_config, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !24
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ma_node_base, ptr %48, i32 0, i32 7
  store i32 %47, ptr %49, align 8, !tbaa !25
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ma_node_base, ptr %50, i32 0, i32 8
  %52 = getelementptr inbounds [2 x i64], ptr %51, i64 0, i64 0
  store i64 0, ptr %52, align 8, !tbaa !26
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ma_node_base, ptr %53, i32 0, i32 8
  %55 = getelementptr inbounds [2 x i64], ptr %54, i64 0, i64 1
  store i64 -1, ptr %55, align 8, !tbaa !26
  %56 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 4
  %57 = load i32, ptr %56, align 8, !tbaa !27
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ma_node_base, ptr %58, i32 0, i32 10
  store i32 %57, ptr %59, align 8, !tbaa !28
  %60 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 5
  %61 = load i32, ptr %60, align 4, !tbaa !29
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ma_node_base, ptr %62, i32 0, i32 11
  store i32 %61, ptr %63, align 4, !tbaa !30
  %64 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 1
  %65 = load i64, ptr %64, align 8, !tbaa !31
  %66 = icmp ne i64 %65, 4294967295
  br i1 %66, label %67, label %74

67:                                               ; preds = %30
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 1
  %70 = load i64, ptr %69, align 8, !tbaa !31
  %71 = getelementptr inbounds i8, ptr %68, i64 %70
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ma_node_base, ptr %72, i32 0, i32 12
  store ptr %71, ptr %73, align 8, !tbaa !32
  br label %80

74:                                               ; preds = %30
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ma_node_base, ptr %75, i32 0, i32 14
  %77 = getelementptr inbounds [2 x %struct.ma_node_input_bus], ptr %76, i64 0, i64 0
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ma_node_base, ptr %78, i32 0, i32 12
  store ptr %77, ptr %79, align 8, !tbaa !32
  br label %80

80:                                               ; preds = %74, %67
  %81 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 2
  %82 = load i64, ptr %81, align 8, !tbaa !33
  %83 = icmp ne i64 %82, 4294967295
  br i1 %83, label %84, label %91

84:                                               ; preds = %80
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 1
  %87 = load i64, ptr %86, align 8, !tbaa !31
  %88 = getelementptr inbounds i8, ptr %85, i64 %87
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ma_node_base, ptr %89, i32 0, i32 13
  store ptr %88, ptr %90, align 8, !tbaa !34
  br label %97

91:                                               ; preds = %80
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ma_node_base, ptr %92, i32 0, i32 15
  %94 = getelementptr inbounds [2 x %struct.ma_node_output_bus], ptr %93, i64 0, i64 0
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ma_node_base, ptr %95, i32 0, i32 13
  store ptr %94, ptr %96, align 8, !tbaa !34
  br label %97

97:                                               ; preds = %91, %84
  %98 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 3
  %99 = load i64, ptr %98, align 8, !tbaa !35
  %100 = icmp ne i64 %99, 4294967295
  br i1 %100, label %101, label %113

101:                                              ; preds = %97
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ma_node_heap_layout, ptr %12, i32 0, i32 3
  %104 = load i64, ptr %103, align 8, !tbaa !35
  %105 = getelementptr inbounds i8, ptr %102, i64 %104
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ma_node_base, ptr %106, i32 0, i32 2
  store ptr %105, ptr %107, align 8, !tbaa !36
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ma_node_graph, ptr %108, i32 0, i32 2
  %110 = load i16, ptr %109, align 8, !tbaa !37
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ma_node_base, ptr %111, i32 0, i32 3
  store i16 %110, ptr %112, align 8, !tbaa !39
  br label %116

113:                                              ; preds = %97
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ma_node_base, ptr %114, i32 0, i32 2
  store ptr null, ptr %115, align 8, !tbaa !36
  br label %116

116:                                              ; preds = %113, %101
  store i32 0, ptr %13, align 4, !tbaa !40
  br label %117

117:                                              ; preds = %142, %116
  %118 = load i32, ptr %13, align 4, !tbaa !40
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = call i32 @ma_node_get_input_bus_count(ptr noundef %119)
  %121 = icmp ult i32 %118, %120
  br i1 %121, label %122, label %145

122:                                              ; preds = %117
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.ma_node_config, ptr %123, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !41
  %126 = load i32, ptr %13, align 4, !tbaa !40
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds i32, ptr %125, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !40
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.ma_node_base, ptr %130, i32 0, i32 12
  %132 = load ptr, ptr %131, align 8, !tbaa !32
  %133 = load i32, ptr %13, align 4, !tbaa !40
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds %struct.ma_node_input_bus, ptr %132, i64 %134
  %136 = call noundef i32 @_ZL22ma_node_input_bus_initjP17ma_node_input_bus(i32 noundef %129, ptr noundef %135)
  store i32 %136, ptr %11, align 4, !tbaa !9
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %141

139:                                              ; preds = %122
  %140 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %140, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %231

141:                                              ; preds = %122
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %13, align 4, !tbaa !40
  %144 = add i32 %143, 1
  store i32 %144, ptr %13, align 4, !tbaa !40
  br label %117, !llvm.loop !42

145:                                              ; preds = %117
  store i32 0, ptr %14, align 4, !tbaa !40
  br label %146

146:                                              ; preds = %173, %145
  %147 = load i32, ptr %14, align 4, !tbaa !40
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = call i32 @ma_node_get_output_bus_count(ptr noundef %148)
  %150 = icmp ult i32 %147, %149
  br i1 %150, label %151, label %176

151:                                              ; preds = %146
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = load i32, ptr %14, align 4, !tbaa !40
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.ma_node_config, ptr %154, i32 0, i32 5
  %156 = load ptr, ptr %155, align 8, !tbaa !44
  %157 = load i32, ptr %14, align 4, !tbaa !40
  %158 = zext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %156, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !40
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.ma_node_base, ptr %161, i32 0, i32 13
  %163 = load ptr, ptr %162, align 8, !tbaa !34
  %164 = load i32, ptr %14, align 4, !tbaa !40
  %165 = zext i32 %164 to i64
  %166 = getelementptr inbounds %struct.ma_node_output_bus, ptr %163, i64 %165
  %167 = call noundef i32 @_ZL23ma_node_output_bus_initPvjjP18ma_node_output_bus(ptr noundef %152, i32 noundef %153, i32 noundef %160, ptr noundef %166)
  store i32 %167, ptr %11, align 4, !tbaa !9
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %172

170:                                              ; preds = %151
  %171 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %171, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %231

172:                                              ; preds = %151
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %14, align 4, !tbaa !40
  %175 = add i32 %174, 1
  store i32 %175, ptr %14, align 4, !tbaa !40
  br label %146, !llvm.loop !45

176:                                              ; preds = %146
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.ma_node_base, ptr %177, i32 0, i32 2
  %179 = load ptr, ptr %178, align 8, !tbaa !36
  %180 = icmp ne ptr %179, null
  br i1 %180, label %181, label %230

181:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !40
  br label %182

182:                                              ; preds = %202, %181
  %183 = load i32, ptr %16, align 4, !tbaa !40
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = call i32 @ma_node_get_input_bus_count(ptr noundef %184)
  %186 = icmp ult i32 %183, %185
  br i1 %186, label %187, label %205

187:                                              ; preds = %182
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  %189 = load i32, ptr %16, align 4, !tbaa !40
  %190 = call noundef ptr @_ZL28ma_node_get_cached_input_ptrPvj(ptr noundef %188, i32 noundef %189)
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.ma_node_base, ptr %191, i32 0, i32 3
  %193 = load i16, ptr %192, align 8, !tbaa !39
  %194 = zext i16 %193 to i64
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.ma_node_base, ptr %195, i32 0, i32 12
  %197 = load ptr, ptr %196, align 8, !tbaa !32
  %198 = load i32, ptr %16, align 4, !tbaa !40
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds %struct.ma_node_input_bus, ptr %197, i64 %199
  %201 = call noundef i32 @_ZL30ma_node_input_bus_get_channelsPK17ma_node_input_bus(ptr noundef %200)
  call void @ma_silence_pcm_frames(ptr noundef %190, i64 noundef %194, i32 noundef 5, i32 noundef %201)
  br label %202

202:                                              ; preds = %187
  %203 = load i32, ptr %16, align 4, !tbaa !40
  %204 = add i32 %203, 1
  store i32 %204, ptr %16, align 4, !tbaa !40
  br label %182, !llvm.loop !46

205:                                              ; preds = %182
  store i32 0, ptr %16, align 4, !tbaa !40
  br label %206

206:                                              ; preds = %226, %205
  %207 = load i32, ptr %16, align 4, !tbaa !40
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = call i32 @ma_node_get_output_bus_count(ptr noundef %208)
  %210 = icmp ult i32 %207, %209
  br i1 %210, label %211, label %229

211:                                              ; preds = %206
  %212 = load ptr, ptr %9, align 8, !tbaa !5
  %213 = load i32, ptr %16, align 4, !tbaa !40
  %214 = call noundef ptr @_ZL29ma_node_get_cached_output_ptrPvj(ptr noundef %212, i32 noundef %213)
  %215 = load ptr, ptr %10, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.ma_node_base, ptr %215, i32 0, i32 3
  %217 = load i16, ptr %216, align 8, !tbaa !39
  %218 = zext i16 %217 to i64
  %219 = load ptr, ptr %10, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.ma_node_base, ptr %219, i32 0, i32 13
  %221 = load ptr, ptr %220, align 8, !tbaa !34
  %222 = load i32, ptr %16, align 4, !tbaa !40
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds %struct.ma_node_output_bus, ptr %221, i64 %223
  %225 = call noundef i32 @_ZL31ma_node_output_bus_get_channelsPK18ma_node_output_bus(ptr noundef %224)
  call void @ma_silence_pcm_frames(ptr noundef %214, i64 noundef %218, i32 noundef 5, i32 noundef %225)
  br label %226

226:                                              ; preds = %211
  %227 = load i32, ptr %16, align 4, !tbaa !40
  %228 = add i32 %227, 1
  store i32 %228, ptr %16, align 4, !tbaa !40
  br label %206, !llvm.loop !47

229:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %230

230:                                              ; preds = %229, %176
  store i32 0, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %231

231:                                              ; preds = %230, %170, %139, %28, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %232 = load i32, ptr %5, align 4
  ret i32 %232
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL22ma_node_input_bus_initjP17ma_node_input_bus(i32 noundef, ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL23ma_node_output_bus_initPvjjP18ma_node_output_bus(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL30ma_node_input_bus_get_channelsPK17ma_node_input_bus(ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL31ma_node_output_bus_get_channelsPK18ma_node_output_bus(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 }

!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 = !{!"_ZTS9ma_result", !7, i64 0}
!11 = !{!12, !6, i64 344}
!12 = !{!"_ZTS12ma_node_base", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 26, !13, i64 28, !13, i64 30, !14, i64 32, !7, i64 40, !15, i64 56, !16, i64 64, !16, i64 68, !6, i64 72, !6, i64 80, !7, i64 88, !7, i64 232, !6, i64 344, !16, i64 352}
!13 = !{!"short", !7, i64 0}
!14 = !{!"_ZTS13ma_node_state", !7, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !19, i64 0}
!18 = !{!"_ZTS19ma_node_heap_layout", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !16, i64 32, !16, i64 36}
!19 = !{!"long", !7, i64 0}
!20 = !{!12, !6, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTS14ma_node_config", !6, i64 0, !14, i64 8, !16, i64 12, !16, i64 16, !6, i64 24, !6, i64 32}
!23 = !{!12, !6, i64 8}
!24 = !{!22, !14, i64 8}
!25 = !{!12, !14, i64 32}
!26 = !{!15, !15, i64 0}
!27 = !{!18, !16, i64 32}
!28 = !{!12, !16, i64 64}
!29 = !{!18, !16, i64 36}
!30 = !{!12, !16, i64 68}
!31 = !{!18, !19, i64 8}
!32 = !{!12, !6, i64 72}
!33 = !{!18, !19, i64 16}
!34 = !{!12, !6, i64 80}
!35 = !{!18, !19, i64 24}
!36 = !{!12, !6, i64 16}
!37 = !{!38, !13, i64 720}
!38 = !{!"_ZTS13ma_node_graph", !12, i64 0, !12, i64 360, !13, i64 720, !16, i64 724}
!39 = !{!12, !13, i64 24}
!40 = !{!16, !16, i64 0}
!41 = !{!22, !6, i64 24}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = !{!22, !6, i64 32}
!45 = distinct !{!45, !43}
!46 = distinct !{!46, !43}
!47 = distinct !{!47, !43}


; 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_node_heap_layout = type { i64, i64, i64, i64, i32, 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 }

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_silence_pcm_frames(ptr noundef, i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @ma_node_init_preallocated(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca %struct.ma_node_heap_layout, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  %6 = icmp eq ptr %3, null
  br i1 %6, label %.loopexit, label %7

7:                                                ; preds = %4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(360) %3, i8 0, i64 360, i1 false)
  %8 = call noundef i32 @_ZL23ma_node_get_heap_layoutP13ma_node_graphPK14ma_node_configP19ma_node_heap_layout(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %5)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %.loopexit

9:                                                ; preds = %7
  %10 = getelementptr inbounds i8, ptr %3, i64 344
  store ptr %2, ptr %10, align 8, !tbaa !5
  %11 = load i64, ptr %5, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 1 %2, i8 0, i64 %11, i1 false)
  store ptr %0, ptr %3, align 8, !tbaa !17
  %12 = load ptr, ptr %1, align 8, !tbaa !18
  %13 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %12, ptr %13, align 8, !tbaa !20
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %3, i64 32
  store i32 %15, ptr %16, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %3, i64 40
  store i64 0, ptr %17, align 8, !tbaa !23
  %18 = getelementptr inbounds i8, ptr %3, i64 48
  store i64 -1, ptr %18, align 8, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %5, i64 32
  %20 = getelementptr inbounds i8, ptr %3, i64 64
  %21 = load <2 x i32>, ptr %19, align 8, !tbaa !24
  store <2 x i32> %21, ptr %20, align 8, !tbaa !24
  %22 = getelementptr inbounds i8, ptr %5, i64 8
  %23 = load i64, ptr %22, align 8, !tbaa !25
  %.not79 = icmp eq i64 %23, 4294967295
  %24 = getelementptr inbounds i8, ptr %3, i64 88
  %25 = getelementptr inbounds i8, ptr %2, i64 %23
  %.sink = select i1 %.not79, ptr %24, ptr %25
  %26 = getelementptr inbounds i8, ptr %3, i64 72
  store ptr %.sink, ptr %26, align 8
  %27 = getelementptr inbounds i8, ptr %5, i64 16
  %28 = load i64, ptr %27, align 8, !tbaa !26
  %.not80 = icmp eq i64 %28, 4294967295
  %29 = getelementptr inbounds i8, ptr %3, i64 232
  %30 = getelementptr inbounds i8, ptr %2, i64 %23
  %.sink116 = select i1 %.not80, ptr %29, ptr %30
  %31 = getelementptr inbounds i8, ptr %3, i64 80
  store ptr %.sink116, ptr %31, align 8
  %32 = getelementptr inbounds i8, ptr %5, i64 24
  %33 = load i64, ptr %32, align 8, !tbaa !27
  %.not81 = icmp eq i64 %33, 4294967295
  br i1 %.not81, label %39, label %34

34:                                               ; preds = %9
  %35 = getelementptr inbounds i8, ptr %2, i64 %33
  %36 = getelementptr inbounds i8, ptr %0, i64 720
  %37 = load i16, ptr %36, align 8, !tbaa !28
  %38 = getelementptr inbounds i8, ptr %3, i64 24
  store i16 %37, ptr %38, align 8, !tbaa !30
  br label %39

39:                                               ; preds = %9, %34
  %.sink117 = phi ptr [ %35, %34 ], [ null, %9 ]
  %40 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %.sink117, ptr %40, align 8
  %41 = call i32 @ma_node_get_input_bus_count(ptr noundef nonnull %3)
  %.not97 = icmp eq i32 %41, 0
  br i1 %.not97, label %.preheader86, label %.lr.ph

.lr.ph:                                           ; preds = %39
  %42 = getelementptr inbounds i8, ptr %1, i64 24
  br label %49

43:                                               ; preds = %49
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %44 = call i32 @ma_node_get_input_bus_count(ptr noundef nonnull %3)
  %45 = zext i32 %44 to i64
  %46 = icmp ult i64 %indvars.iv.next, %45
  br i1 %46, label %49, label %.preheader86, !llvm.loop !31

.preheader86:                                     ; preds = %43, %39
  %47 = call i32 @ma_node_get_output_bus_count(ptr noundef nonnull %3)
  %.not98 = icmp eq i32 %47, 0
  br i1 %.not98, label %._crit_edge, label %.lr.ph92

.lr.ph92:                                         ; preds = %.preheader86
  %48 = getelementptr inbounds i8, ptr %1, i64 32
  br label %60

49:                                               ; preds = %.lr.ph, %43
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %43 ]
  %50 = load ptr, ptr %42, align 8, !tbaa !33
  %51 = getelementptr inbounds i32, ptr %50, i64 %indvars.iv
  %52 = load i32, ptr %51, align 4, !tbaa !24
  %53 = load ptr, ptr %26, align 8, !tbaa !34
  %54 = getelementptr inbounds %struct.ma_node_input_bus, ptr %53, i64 %indvars.iv
  %55 = call noundef i32 @_ZL22ma_node_input_bus_initjP17ma_node_input_bus(i32 noundef %52, ptr noundef %54)
  %.not84 = icmp eq i32 %55, 0
  br i1 %.not84, label %43, label %.loopexit

56:                                               ; preds = %60
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %57 = call i32 @ma_node_get_output_bus_count(ptr noundef nonnull %3)
  %58 = zext i32 %57 to i64
  %59 = icmp ult i64 %indvars.iv.next108, %58
  br i1 %59, label %60, label %._crit_edge, !llvm.loop !35

60:                                               ; preds = %.lr.ph92, %56
  %indvars.iv107 = phi i64 [ 0, %.lr.ph92 ], [ %indvars.iv.next108, %56 ]
  %61 = load ptr, ptr %48, align 8, !tbaa !36
  %62 = getelementptr inbounds i32, ptr %61, i64 %indvars.iv107
  %63 = load i32, ptr %62, align 4, !tbaa !24
  %64 = load ptr, ptr %31, align 8, !tbaa !37
  %65 = getelementptr inbounds %struct.ma_node_output_bus, ptr %64, i64 %indvars.iv107
  %66 = trunc nuw i64 %indvars.iv107 to i32
  %67 = call noundef i32 @_ZL23ma_node_output_bus_initPvjjP18ma_node_output_bus(ptr noundef nonnull %3, i32 noundef %66, i32 noundef %63, ptr noundef %65)
  %.not83 = icmp eq i32 %67, 0
  br i1 %.not83, label %56, label %.loopexit

._crit_edge:                                      ; preds = %56, %.preheader86
  %68 = load ptr, ptr %40, align 8, !tbaa !38
  %.not82 = icmp eq ptr %68, null
  br i1 %.not82, label %.loopexit, label %.preheader85

.preheader85:                                     ; preds = %._crit_edge
  %69 = call i32 @ma_node_get_input_bus_count(ptr noundef nonnull %3)
  %.not99 = icmp eq i32 %69, 0
  br i1 %.not99, label %.preheader, label %.lr.ph94

.lr.ph94:                                         ; preds = %.preheader85
  %70 = getelementptr inbounds i8, ptr %3, i64 24
  br label %73

.preheader:                                       ; preds = %73, %.preheader85
  %71 = call i32 @ma_node_get_output_bus_count(ptr noundef nonnull %3)
  %.not100 = icmp eq i32 %71, 0
  br i1 %.not100, label %.loopexit, label %.lr.ph96

.lr.ph96:                                         ; preds = %.preheader
  %72 = getelementptr inbounds i8, ptr %3, i64 24
  br label %84

73:                                               ; preds = %.lr.ph94, %73
  %indvars.iv110 = phi i64 [ 0, %.lr.ph94 ], [ %indvars.iv.next111, %73 ]
  %74 = trunc nuw i64 %indvars.iv110 to i32
  %75 = call noundef ptr @_ZL28ma_node_get_cached_input_ptrPvj(ptr noundef nonnull %3, i32 noundef %74)
  %76 = load i16, ptr %70, align 8, !tbaa !30
  %77 = zext i16 %76 to i64
  %78 = load ptr, ptr %26, align 8, !tbaa !34
  %79 = getelementptr inbounds %struct.ma_node_input_bus, ptr %78, i64 %indvars.iv110
  %80 = call noundef i32 @_ZL30ma_node_input_bus_get_channelsPK17ma_node_input_bus(ptr noundef %79)
  call void @ma_silence_pcm_frames(ptr noundef %75, i64 noundef %77, i32 noundef 5, i32 noundef %80)
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %81 = call i32 @ma_node_get_input_bus_count(ptr noundef nonnull %3)
  %82 = zext i32 %81 to i64
  %83 = icmp ult i64 %indvars.iv.next111, %82
  br i1 %83, label %73, label %.preheader, !llvm.loop !39

84:                                               ; preds = %.lr.ph96, %84
  %indvars.iv113 = phi i64 [ 0, %.lr.ph96 ], [ %indvars.iv.next114, %84 ]
  %85 = trunc nuw i64 %indvars.iv113 to i32
  %86 = call noundef ptr @_ZL29ma_node_get_cached_output_ptrPvj(ptr noundef nonnull %3, i32 noundef %85)
  %87 = load i16, ptr %72, align 8, !tbaa !30
  %88 = zext i16 %87 to i64
  %89 = load ptr, ptr %31, align 8, !tbaa !37
  %90 = getelementptr inbounds %struct.ma_node_output_bus, ptr %89, i64 %indvars.iv113
  %91 = call noundef i32 @_ZL31ma_node_output_bus_get_channelsPK18ma_node_output_bus(ptr noundef %90)
  call void @ma_silence_pcm_frames(ptr noundef %86, i64 noundef %88, i32 noundef 5, i32 noundef %91)
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %92 = call i32 @ma_node_get_output_bus_count(ptr noundef nonnull %3)
  %93 = zext i32 %92 to i64
  %94 = icmp ult i64 %indvars.iv.next114, %93
  br i1 %94, label %84, label %.loopexit, !llvm.loop !40

.loopexit:                                        ; preds = %49, %60, %84, %.preheader, %._crit_edge, %7, %4
  %.072 = phi i32 [ -2, %4 ], [ %8, %7 ], [ 0, %._crit_edge ], [ 0, %.preheader ], [ 0, %84 ], [ %67, %60 ], [ %55, %49 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  ret i32 %.072
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL22ma_node_input_bus_initjP17ma_node_input_bus(i32 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL23ma_node_output_bus_initPvjjP18ma_node_output_bus(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL30ma_node_input_bus_get_channelsPK17ma_node_input_bus(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL31ma_node_output_bus_get_channelsPK18ma_node_output_bus(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 }

!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, !7, i64 344}
!6 = !{!"_ZTS12ma_node_base", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 26, !10, i64 28, !10, i64 30, !11, i64 32, !8, i64 40, !12, i64 56, !13, i64 64, !13, i64 68, !7, i64 72, !7, i64 80, !8, i64 88, !8, i64 232, !7, i64 344, !13, i64 352}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"_ZTS13ma_node_state", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTS19ma_node_heap_layout", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !13, i64 32, !13, i64 36}
!16 = !{!"long", !8, i64 0}
!17 = !{!6, !7, i64 0}
!18 = !{!19, !7, i64 0}
!19 = !{!"_ZTS14ma_node_config", !7, i64 0, !11, i64 8, !13, i64 12, !13, i64 16, !7, i64 24, !7, i64 32}
!20 = !{!6, !7, i64 8}
!21 = !{!19, !11, i64 8}
!22 = !{!6, !11, i64 32}
!23 = !{!12, !12, i64 0}
!24 = !{!13, !13, i64 0}
!25 = !{!15, !16, i64 8}
!26 = !{!15, !16, i64 16}
!27 = !{!15, !16, i64 24}
!28 = !{!29, !10, i64 720}
!29 = !{!"_ZTS13ma_node_graph", !6, i64 0, !6, i64 360, !10, i64 720, !13, i64 724}
!30 = !{!6, !10, i64 24}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!19, !7, i64 24}
!34 = !{!6, !7, i64 72}
!35 = distinct !{!35, !32}
!36 = !{!19, !7, i64 32}
!37 = !{!6, !7, i64 80}
!38 = !{!6, !7, i64 16}
!39 = distinct !{!39, !32}
!40 = distinct !{!40, !32}


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