	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d40_lcla_free_all
_d40_lcla_free_all:                     ## @d40_lcla_free_all
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_chan_is_physical
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_8
## %bb.1:
	negl	%r15d
	movq	(%rbx), %rdi
	callq	_spin_lock_irqsave
	movq	_D40_LCLA_LINK_PER_EVENT_GRP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	$4, %r8d
	jl	LBB0_7
## %bb.2:
	movq	%r8, %rcx
	shrq	%rcx
	movl	$1, %edx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	cmpl	%edx, %ecx
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	movq	8(%rbx), %rsi
	movslq	(%rsi), %rax
	movslq	%r8d, %rsi
	imulq	%rax, %rsi
	movq	8(%rdi), %rdi
	addq	%rdx, %rsi
	cmpq	%r14, (%rdi,%rsi,8)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, (%rdi,%rsi,8)
	decq	(%r14)
	jne	LBB0_6
## %bb.5:
	xorl	%r15d, %r15d
LBB0_7:
	movq	(%rbx), %rdi
	callq	_spin_unlock_irqrestore
	movl	%r15d, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_D40_LCLA_LINK_PER_EVENT_GRP,4,2 ## @D40_LCLA_LINK_PER_EVENT_GRP
	.no_dead_strip	_d40_lcla_free_all
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d40_lcla_free_all
_d40_lcla_free_all:                     ; @d40_lcla_free_all
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	bl	_chan_is_physical
	cbz	x0, LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_9
LBB0_2:
	neg	w20, w20
	ldr	x0, [x19]
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x8, _D40_LCLA_LINK_PER_EVENT_GRP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D40_LCLA_LINK_PER_EVENT_GRP@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x8]
	cmp	w10, #4
	b.lt	LBB0_8
; %bb.3:
	mov	w8, #1
	sxtw	x9, w10
	lsr	x10, x10, #1
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x8, #1
	cmp	w10, w8
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x12, x11, [x19]
	ldrsw	x13, [x11]
	ldr	x11, [x12, #8]
	madd	x12, x13, x9, x8
	ldr	x13, [x11, x12, lsl #3]
	cmp	x13, x21
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x11, x12, lsl #3]
	ldr	x11, [x21]
	subs	x11, x11, #1
	str	x11, [x21]
	b.ne	LBB0_4
; %bb.7:
	mov	w20, #0
LBB0_8:
	ldr	x0, [x19]
	bl	_spin_unlock_irqrestore
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_D40_LCLA_LINK_PER_EVENT_GRP,4,2 ; @D40_LCLA_LINK_PER_EVENT_GRP
	.no_dead_strip	_d40_lcla_free_all
.subsections_via_symbols
