	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function close_one_chan
_close_one_chan:                        ## @close_one_chan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:
	movq	_irqs_to_free_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	leaq	64(%rbx), %rdi
	movq	_irqs_to_free@GOTPCREL(%rip), %rsi
	callq	_list_add
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_8
LBB0_3:
	cmpq	$0, 56(%rbx)
	je	LBB0_5
## %bb.4:
	movq	40(%rbx), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_5:
	cmpq	$0, 48(%rbx)
	je	LBB0_7
## %bb.6:
	movq	40(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_7:
	movq	$0, 32(%rbx)
LBB0_8:
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	(%rbx), %edi
	movl	16(%rbx), %esi
	callq	*%rax
LBB0_10:
	movq	$0, 8(%rbx)
	movl	$-1, (%rbx)
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_irqs_to_free_lock,4,2          ## @irqs_to_free_lock
	.comm	_irqs_to_free,4,2               ## @irqs_to_free
	.no_dead_strip	_close_one_chan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function close_one_chan
_close_one_chan:                        ; @close_one_chan
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_11
; %bb.1:
	mov	x19, x0
	cbz	w1, LBB0_3
; %bb.2:
Lloh0:
	adrp	x20, _irqs_to_free_lock@GOTPAGE
Lloh1:
	ldr	x20, [x20, _irqs_to_free_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	add	x0, x19, #64
Lloh2:
	adrp	x1, _irqs_to_free@GOTPAGE
Lloh3:
	ldr	x1, [x1, _irqs_to_free@GOTPAGEOFF]
	bl	_list_add
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_3:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	mov	x1, x19
	bl	_free_irq
LBB0_5:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_free_irq
LBB0_7:
	str	xzr, [x19, #32]
LBB0_8:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w0, [x19]
	ldr	w1, [x19, #16]
	blr	x8
LBB0_10:
	str	xzr, [x19, #8]
	mov	w8, #-1
	str	w8, [x19]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_irqs_to_free_lock,4,2          ; @irqs_to_free_lock
	.comm	_irqs_to_free,4,2               ; @irqs_to_free
	.no_dead_strip	_close_one_chan
.subsections_via_symbols
