; LLVM IR from XiaoMi/mace :: mace/runtimes/apu/v4/neuron_implementation.ll (Z13LoadNeuronApiv)

; 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.NeuronApi = type { i8, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) #0

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z20ASharedMemory_createPKcm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z13LoadNeuronApiv(ptr dead_on_unwind noalias writable sret(%struct.NeuronApi) align 8 %0) #0 {
  %2 = alloca ptr, align 8
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 256, i1 false)
  %3 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 1
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store ptr null, ptr %2, align 8, !tbaa !12
  %4 = call ptr @dlopen(ptr noundef @.str.1, i32 noundef 1) #5
  store ptr %4, ptr %2, align 8, !tbaa !12
  %5 = load ptr, ptr %2, align 8, !tbaa !12
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %9

7:                                                ; preds = %1
  %8 = call ptr @dlopen(ptr noundef @.str.2, i32 noundef 1) #5
  store ptr %8, ptr %2, align 8, !tbaa !12
  br label %9

9:                                                ; preds = %7, %1
  %10 = load ptr, ptr %2, align 8, !tbaa !12
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %14

12:                                               ; preds = %9
  %13 = call ptr @dlopen(ptr noundef @.str.3, i32 noundef 1) #5
  store ptr %13, ptr %2, align 8, !tbaa !12
  br label %14

14:                                               ; preds = %12, %9
  %15 = load ptr, ptr %2, align 8, !tbaa !12
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %20

17:                                               ; preds = %14
  %18 = load ptr, ptr @stderr, align 8, !tbaa !12
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef @.str.4, ptr noundef @.str.5) #5
  br label %20

20:                                               ; preds = %17, %14
  %21 = load ptr, ptr %2, align 8, !tbaa !12
  %22 = icmp ne ptr %21, null
  %23 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 0
  %24 = zext i1 %22 to i8
  store i8 %24, ptr %23, align 8, !tbaa !13
  %25 = load ptr, ptr %2, align 8, !tbaa !12
  %26 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %25, ptr noundef @.str.6, i1 noundef zeroext false)
  %27 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 2
  store ptr %26, ptr %27, align 8, !tbaa !14
  %28 = load ptr, ptr %2, align 8, !tbaa !12
  %29 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %28, ptr noundef @.str.7, i1 noundef zeroext false)
  %30 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 3
  store ptr %29, ptr %30, align 8, !tbaa !15
  %31 = load ptr, ptr %2, align 8, !tbaa !12
  %32 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %31, ptr noundef @.str.8, i1 noundef zeroext false)
  %33 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 4
  store ptr %32, ptr %33, align 8, !tbaa !16
  %34 = load ptr, ptr %2, align 8, !tbaa !12
  %35 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %34, ptr noundef @.str.9, i1 noundef zeroext false)
  %36 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 5
  store ptr %35, ptr %36, align 8, !tbaa !17
  %37 = load ptr, ptr %2, align 8, !tbaa !12
  %38 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %37, ptr noundef @.str.10, i1 noundef zeroext false)
  %39 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 6
  store ptr %38, ptr %39, align 8, !tbaa !18
  %40 = load ptr, ptr %2, align 8, !tbaa !12
  %41 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %40, ptr noundef @.str.11, i1 noundef zeroext false)
  %42 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 7
  store ptr %41, ptr %42, align 8, !tbaa !19
  %43 = load ptr, ptr %2, align 8, !tbaa !12
  %44 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %43, ptr noundef @.str.12, i1 noundef zeroext false)
  %45 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 8
  store ptr %44, ptr %45, align 8, !tbaa !20
  %46 = load ptr, ptr %2, align 8, !tbaa !12
  %47 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %46, ptr noundef @.str.13, i1 noundef zeroext false)
  %48 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 9
  store ptr %47, ptr %48, align 8, !tbaa !21
  %49 = load ptr, ptr %2, align 8, !tbaa !12
  %50 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %49, ptr noundef @.str.14, i1 noundef zeroext false)
  %51 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 10
  store ptr %50, ptr %51, align 8, !tbaa !22
  %52 = load ptr, ptr %2, align 8, !tbaa !12
  %53 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %52, ptr noundef @.str.15, i1 noundef zeroext false)
  %54 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 11
  store ptr %53, ptr %54, align 8, !tbaa !23
  %55 = load ptr, ptr %2, align 8, !tbaa !12
  %56 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %55, ptr noundef @.str.16, i1 noundef zeroext false)
  %57 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 12
  store ptr %56, ptr %57, align 8, !tbaa !24
  %58 = load ptr, ptr %2, align 8, !tbaa !12
  %59 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %58, ptr noundef @.str.17, i1 noundef zeroext false)
  %60 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 13
  store ptr %59, ptr %60, align 8, !tbaa !25
  %61 = load ptr, ptr %2, align 8, !tbaa !12
  %62 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %61, ptr noundef @.str.18, i1 noundef zeroext false)
  %63 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 14
  store ptr %62, ptr %63, align 8, !tbaa !26
  %64 = load ptr, ptr %2, align 8, !tbaa !12
  %65 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %64, ptr noundef @.str.19, i1 noundef zeroext false)
  %66 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 19
  store ptr %65, ptr %66, align 8, !tbaa !27
  %67 = load ptr, ptr %2, align 8, !tbaa !12
  %68 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %67, ptr noundef @.str.20, i1 noundef zeroext false)
  %69 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 15
  store ptr %68, ptr %69, align 8, !tbaa !28
  %70 = load ptr, ptr %2, align 8, !tbaa !12
  %71 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %70, ptr noundef @.str.21, i1 noundef zeroext false)
  %72 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 16
  store ptr %71, ptr %72, align 8, !tbaa !29
  %73 = load ptr, ptr %2, align 8, !tbaa !12
  %74 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %73, ptr noundef @.str.22, i1 noundef zeroext false)
  %75 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 17
  store ptr %74, ptr %75, align 8, !tbaa !30
  %76 = load ptr, ptr %2, align 8, !tbaa !12
  %77 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %76, ptr noundef @.str.23, i1 noundef zeroext false)
  %78 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 18
  store ptr %77, ptr %78, align 8, !tbaa !31
  %79 = load ptr, ptr %2, align 8, !tbaa !12
  %80 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %79, ptr noundef @.str.24, i1 noundef zeroext false)
  %81 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 31
  store ptr %80, ptr %81, align 8, !tbaa !32
  %82 = load ptr, ptr %2, align 8, !tbaa !12
  %83 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %82, ptr noundef @.str.25, i1 noundef zeroext false)
  %84 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 20
  store ptr %83, ptr %84, align 8, !tbaa !33
  %85 = load ptr, ptr %2, align 8, !tbaa !12
  %86 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %85, ptr noundef @.str.26, i1 noundef zeroext false)
  %87 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 21
  store ptr %86, ptr %87, align 8, !tbaa !34
  %88 = load ptr, ptr %2, align 8, !tbaa !12
  %89 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %88, ptr noundef @.str.27, i1 noundef zeroext false)
  %90 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 22
  store ptr %89, ptr %90, align 8, !tbaa !35
  %91 = load ptr, ptr %2, align 8, !tbaa !12
  %92 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %91, ptr noundef @.str.28, i1 noundef zeroext false)
  %93 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 23
  store ptr %92, ptr %93, align 8, !tbaa !36
  %94 = load ptr, ptr %2, align 8, !tbaa !12
  %95 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %94, ptr noundef @.str.29, i1 noundef zeroext false)
  %96 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 24
  store ptr %95, ptr %96, align 8, !tbaa !37
  %97 = load ptr, ptr %2, align 8, !tbaa !12
  %98 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %97, ptr noundef @.str.30, i1 noundef zeroext false)
  %99 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 25
  store ptr %98, ptr %99, align 8, !tbaa !38
  %100 = load ptr, ptr %2, align 8, !tbaa !12
  %101 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %100, ptr noundef @.str.31, i1 noundef zeroext false)
  %102 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 32
  store ptr %101, ptr %102, align 8, !tbaa !39
  %103 = load ptr, ptr %2, align 8, !tbaa !12
  %104 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %103, ptr noundef @.str.32, i1 noundef zeroext false)
  %105 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 27
  store ptr %104, ptr %105, align 8, !tbaa !40
  %106 = load ptr, ptr %2, align 8, !tbaa !12
  %107 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %106, ptr noundef @.str.33, i1 noundef zeroext false)
  %108 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 28
  store ptr %107, ptr %108, align 8, !tbaa !41
  %109 = load ptr, ptr %2, align 8, !tbaa !12
  %110 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %109, ptr noundef @.str.34, i1 noundef zeroext false)
  %111 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 29
  store ptr %110, ptr %111, align 8, !tbaa !42
  %112 = load ptr, ptr %2, align 8, !tbaa !12
  %113 = call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %112, ptr noundef @.str.35, i1 noundef zeroext false)
  %114 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 30
  store ptr %113, ptr %114, align 8, !tbaa !43
  %115 = load ptr, ptr %2, align 8, !tbaa !12
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %119

117:                                              ; preds = %20
  %118 = getelementptr inbounds %struct.NeuronApi, ptr %0, i32 0, i32 26
  store ptr @_Z20ASharedMemory_createPKcm, ptr %118, align 8, !tbaa !44
  br label %119

119:                                              ; preds = %117, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  ret void
}

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

; Function Attrs: nounwind
declare ptr @dlopen(ptr noundef, i32 noundef) #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 4}
!6 = !{!"_ZTS9NeuronApi", !7, i64 0, !10, i64 4, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !11, i64 8}
!15 = !{!6, !11, i64 16}
!16 = !{!6, !11, i64 24}
!17 = !{!6, !11, i64 32}
!18 = !{!6, !11, i64 40}
!19 = !{!6, !11, i64 48}
!20 = !{!6, !11, i64 56}
!21 = !{!6, !11, i64 64}
!22 = !{!6, !11, i64 72}
!23 = !{!6, !11, i64 80}
!24 = !{!6, !11, i64 88}
!25 = !{!6, !11, i64 96}
!26 = !{!6, !11, i64 104}
!27 = !{!6, !11, i64 144}
!28 = !{!6, !11, i64 112}
!29 = !{!6, !11, i64 120}
!30 = !{!6, !11, i64 128}
!31 = !{!6, !11, i64 136}
!32 = !{!6, !11, i64 240}
!33 = !{!6, !11, i64 152}
!34 = !{!6, !11, i64 160}
!35 = !{!6, !11, i64 168}
!36 = !{!6, !11, i64 176}
!37 = !{!6, !11, i64 184}
!38 = !{!6, !11, i64 192}
!39 = !{!6, !11, i64 248}
!40 = !{!6, !11, i64 208}
!41 = !{!6, !11, i64 216}
!42 = !{!6, !11, i64 224}
!43 = !{!6, !11, i64 232}
!44 = !{!6, !11, i64 200}


; 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.NeuronApi = type { i8, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z13LoadNeuronApiv(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.NeuronApi) align 8 %0) local_unnamed_addr #0 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(208) %0, i8 0, i64 208, i1 false)
  %2 = tail call ptr @dlopen(ptr noundef nonnull @.str.1, i32 noundef 1) #5
  %3 = icmp eq ptr %2, null
  br i1 %3, label %4, label %.thread37

4:                                                ; preds = %1
  %5 = tail call ptr @dlopen(ptr noundef nonnull @.str.2, i32 noundef 1) #5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %.thread37

7:                                                ; preds = %4
  %8 = tail call ptr @dlopen(ptr noundef nonnull @.str.3, i32 noundef 1) #5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %.thread37

10:                                               ; preds = %7
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5) #6
  br label %.thread37

.thread37:                                        ; preds = %1, %4, %10, %7
  %.139 = phi ptr [ null, %10 ], [ %8, %7 ], [ %5, %4 ], [ %2, %1 ]
  %13 = icmp ne ptr %.139, null
  %14 = zext i1 %13 to i8
  store i8 %14, ptr %0, align 8, !tbaa !9
  %15 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.6, i1 noundef zeroext false)
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %15, ptr %16, align 8, !tbaa !13
  %17 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.7, i1 noundef zeroext false)
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %17, ptr %18, align 8, !tbaa !14
  %19 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.8, i1 noundef zeroext false)
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %19, ptr %20, align 8, !tbaa !15
  %21 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.9, i1 noundef zeroext false)
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %21, ptr %22, align 8, !tbaa !16
  %23 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.10, i1 noundef zeroext false)
  %24 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %23, ptr %24, align 8, !tbaa !17
  %25 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.11, i1 noundef zeroext false)
  %26 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %25, ptr %26, align 8, !tbaa !18
  %27 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.12, i1 noundef zeroext false)
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %27, ptr %28, align 8, !tbaa !19
  %29 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.13, i1 noundef zeroext false)
  %30 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %29, ptr %30, align 8, !tbaa !20
  %31 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.14, i1 noundef zeroext false)
  %32 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %31, ptr %32, align 8, !tbaa !21
  %33 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.15, i1 noundef zeroext false)
  %34 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %33, ptr %34, align 8, !tbaa !22
  %35 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.16, i1 noundef zeroext false)
  %36 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %35, ptr %36, align 8, !tbaa !23
  %37 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.17, i1 noundef zeroext false)
  %38 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %37, ptr %38, align 8, !tbaa !24
  %39 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.18, i1 noundef zeroext false)
  %40 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %39, ptr %40, align 8, !tbaa !25
  %41 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.19, i1 noundef zeroext false)
  %42 = getelementptr inbounds i8, ptr %0, i64 144
  store ptr %41, ptr %42, align 8, !tbaa !26
  %43 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.20, i1 noundef zeroext false)
  %44 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr %43, ptr %44, align 8, !tbaa !27
  %45 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.21, i1 noundef zeroext false)
  %46 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr %45, ptr %46, align 8, !tbaa !28
  %47 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.22, i1 noundef zeroext false)
  %48 = getelementptr inbounds i8, ptr %0, i64 128
  store ptr %47, ptr %48, align 8, !tbaa !29
  %49 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.23, i1 noundef zeroext false)
  %50 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr %49, ptr %50, align 8, !tbaa !30
  %51 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.24, i1 noundef zeroext false)
  %52 = getelementptr inbounds i8, ptr %0, i64 240
  store ptr %51, ptr %52, align 8, !tbaa !31
  %53 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.25, i1 noundef zeroext false)
  %54 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr %53, ptr %54, align 8, !tbaa !32
  %55 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.26, i1 noundef zeroext false)
  %56 = getelementptr inbounds i8, ptr %0, i64 160
  store ptr %55, ptr %56, align 8, !tbaa !33
  %57 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.27, i1 noundef zeroext false)
  %58 = getelementptr inbounds i8, ptr %0, i64 168
  store ptr %57, ptr %58, align 8, !tbaa !34
  %59 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.28, i1 noundef zeroext false)
  %60 = getelementptr inbounds i8, ptr %0, i64 176
  store ptr %59, ptr %60, align 8, !tbaa !35
  %61 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.29, i1 noundef zeroext false)
  %62 = getelementptr inbounds i8, ptr %0, i64 184
  store ptr %61, ptr %62, align 8, !tbaa !36
  %63 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.30, i1 noundef zeroext false)
  %64 = getelementptr inbounds i8, ptr %0, i64 192
  store ptr %63, ptr %64, align 8, !tbaa !37
  %65 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.31, i1 noundef zeroext false)
  %66 = getelementptr inbounds i8, ptr %0, i64 248
  store ptr %65, ptr %66, align 8, !tbaa !38
  %67 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.32, i1 noundef zeroext false)
  %68 = getelementptr inbounds i8, ptr %0, i64 208
  store ptr %67, ptr %68, align 8, !tbaa !39
  %69 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.33, i1 noundef zeroext false)
  %70 = getelementptr inbounds i8, ptr %0, i64 216
  store ptr %69, ptr %70, align 8, !tbaa !40
  %71 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.34, i1 noundef zeroext false)
  %72 = getelementptr inbounds i8, ptr %0, i64 224
  store ptr %71, ptr %72, align 8, !tbaa !41
  %73 = tail call noundef ptr @_Z12LoadFunctionPvPKcb(ptr noundef %.139, ptr noundef nonnull @.str.35, i1 noundef zeroext false)
  %74 = getelementptr inbounds i8, ptr %0, i64 232
  store ptr %73, ptr %74, align 8, !tbaa !42
  br i1 %13, label %75, label %77

75:                                               ; preds = %.thread37
  %76 = getelementptr inbounds i8, ptr %0, i64 200
  store ptr @_Z20ASharedMemory_createPKcm, ptr %76, align 8, !tbaa !43
  br label %77

77:                                               ; preds = %75, %.thread37
  ret void
}

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

; Function Attrs: nounwind
declare ptr @dlopen(ptr noundef, i32 noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { cold 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, !11, i64 0}
!10 = !{!"_ZTS9NeuronApi", !11, i64 0, !12, i64 4, !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, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!10, !6, i64 16}
!15 = !{!10, !6, i64 24}
!16 = !{!10, !6, i64 32}
!17 = !{!10, !6, i64 40}
!18 = !{!10, !6, i64 48}
!19 = !{!10, !6, i64 56}
!20 = !{!10, !6, i64 64}
!21 = !{!10, !6, i64 72}
!22 = !{!10, !6, i64 80}
!23 = !{!10, !6, i64 88}
!24 = !{!10, !6, i64 96}
!25 = !{!10, !6, i64 104}
!26 = !{!10, !6, i64 144}
!27 = !{!10, !6, i64 112}
!28 = !{!10, !6, i64 120}
!29 = !{!10, !6, i64 128}
!30 = !{!10, !6, i64 136}
!31 = !{!10, !6, i64 240}
!32 = !{!10, !6, i64 152}
!33 = !{!10, !6, i64 160}
!34 = !{!10, !6, i64 168}
!35 = !{!10, !6, i64 176}
!36 = !{!10, !6, i64 184}
!37 = !{!10, !6, i64 192}
!38 = !{!10, !6, i64 248}
!39 = !{!10, !6, i64 208}
!40 = !{!10, !6, i64 216}
!41 = !{!10, !6, i64 224}
!42 = !{!10, !6, i64 232}
!43 = !{!10, !6, i64 200}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass