	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uhdlc_close
_uhdlc_close:                           ## @uhdlc_close
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_dev_to_hdlc
	movq	(%rax), %rbx
	movq	40(%rbx), %r12
	leaq	32(%rbx), %rdi
	callq	_napi_disable
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	callq	_ucc_fast_get_qe_cr_subblock
	movl	%eax, %r15d
	movq	_QE_GRACEFUL_STOP_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_QE_CR_PROTOCOL_UNSPECIFIED@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	callq	_qe_issue_cmd
	movq	_QE_CLOSE_RX_BD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	callq	_qe_issue_cmd
	cmpq	$0, 24(%rbx)
	je	LBB0_2
## %bb.1:
	movb	(%r12), %cl
	movl	$-2, %eax
	roll	%cl, %eax
	movq	8(%r12), %rcx
	andl	%eax, (%rcx)
LBB0_2:
	movl	16(%rbx), %edi
	movq	_COMM_DIR_RX@GOTPCREL(%rip), %rax
	movq	_COMM_DIR_TX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_ucc_fast_disable
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	%r14, %rdi
	callq	_netdev_reset_queue
	movq	$0, (%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QE_GRACEFUL_STOP_TX,4,2        ## @QE_GRACEFUL_STOP_TX
	.comm	_QE_CR_PROTOCOL_UNSPECIFIED,8,3 ## @QE_CR_PROTOCOL_UNSPECIFIED
	.comm	_QE_CLOSE_RX_BD,4,2             ## @QE_CLOSE_RX_BD
	.comm	_COMM_DIR_RX,4,2                ## @COMM_DIR_RX
	.comm	_COMM_DIR_TX,4,2                ## @COMM_DIR_TX
	.no_dead_strip	_uhdlc_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uhdlc_close
_uhdlc_close:                           ; @uhdlc_close
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_dev_to_hdlc
	ldr	x20, [x0]
	ldr	x22, [x20, #40]
	add	x0, x20, #32
	bl	_napi_disable
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #4]
	bl	_ucc_fast_get_qe_cr_subblock
	mov	x21, x0
Lloh0:
	adrp	x8, _QE_GRACEFUL_STOP_TX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QE_GRACEFUL_STOP_TX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x23, _QE_CR_PROTOCOL_UNSPECIFIED@GOTPAGE
Lloh4:
	ldr	x23, [x23, _QE_CR_PROTOCOL_UNSPECIFIED@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x1, x21
	mov	w3, #0
	bl	_qe_issue_cmd
Lloh5:
	adrp	x8, _QE_CLOSE_RX_BD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _QE_CLOSE_RX_BD@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w2, [x23]
	mov	x1, x21
	mov	w3, #0
	bl	_qe_issue_cmd
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x22]
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	x9, [x22, #8]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
LBB0_2:
Lloh8:
	adrp	x8, _COMM_DIR_RX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _COMM_DIR_RX@GOTPAGEOFF]
	ldr	w0, [x20, #16]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _COMM_DIR_TX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _COMM_DIR_TX@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_ucc_fast_disable
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_free_irq
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x19
	bl	_netdev_reset_queue
	str	xzr, [x20]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_QE_GRACEFUL_STOP_TX,4,2        ; @QE_GRACEFUL_STOP_TX
	.comm	_QE_CR_PROTOCOL_UNSPECIFIED,8,3 ; @QE_CR_PROTOCOL_UNSPECIFIED
	.comm	_QE_CLOSE_RX_BD,4,2             ; @QE_CLOSE_RX_BD
	.comm	_COMM_DIR_RX,4,2                ; @COMM_DIR_RX
	.comm	_COMM_DIR_TX,4,2                ; @COMM_DIR_TX
	.no_dead_strip	_uhdlc_close
.subsections_via_symbols
