	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function release_global_resources
_release_global_resources:              ## @release_global_resources
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_spu_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_global_ref@GOTPCREL(%rip), %rax
	decl	(%rax)
	jne	LBB0_2
## %bb.1:
	movq	_cpu_to_cwq@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_kfree
	movq	$0, (%rbx)
	movq	_cpu_to_mau@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_kfree
	movq	$0, (%rbx)
	xorl	%eax, %eax
	callq	_queue_cache_destroy
	xorl	%eax, %eax
	callq	_n2_spu_hvapi_unregister
LBB0_2:
	movq	_spu_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_spu_lock,4,2                   ## @spu_lock
	.comm	_global_ref,4,2                 ## @global_ref
	.comm	_cpu_to_cwq,8,3                 ## @cpu_to_cwq
	.comm	_cpu_to_mau,8,3                 ## @cpu_to_mau
	.no_dead_strip	_release_global_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function release_global_resources
_release_global_resources:              ; @release_global_resources
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x0, _spu_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _spu_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x8, _global_ref@GOTPAGE
Lloh3:
	ldr	x8, [x8, _global_ref@GOTPAGEOFF]
	ldr	w9, [x8]
	subs	w9, w9, #1
	str	w9, [x8]
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x19, _cpu_to_cwq@GOTPAGE
Lloh5:
	ldr	x19, [x19, _cpu_to_cwq@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
Lloh6:
	adrp	x19, _cpu_to_mau@GOTPAGE
Lloh7:
	ldr	x19, [x19, _cpu_to_mau@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
	bl	_queue_cache_destroy
	bl	_n2_spu_hvapi_unregister
LBB0_2:
Lloh8:
	adrp	x0, _spu_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _spu_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_spu_lock,4,2                   ; @spu_lock
	.comm	_global_ref,4,2                 ; @global_ref
	.comm	_cpu_to_cwq,8,3                 ; @cpu_to_cwq
	.comm	_cpu_to_mau,8,3                 ; @cpu_to_mau
	.no_dead_strip	_release_global_resources
.subsections_via_symbols
