	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uhdlc_memclean
_uhdlc_memclean:                        ## @uhdlc_memclean
	.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	%rdi, %rbx
	movq	80(%rdi), %rax
	movq	8(%rax), %rdi
	callq	_qe_muram_free
	movq	80(%rbx), %rax
	movq	(%rax), %rdi
	callq	_qe_muram_free
	movq	112(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %edi
	movq	_RX_BD_RING_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$2, %esi
	movq	104(%rbx), %rcx
	callq	_dma_free_coherent
	xorps	%xmm0, %xmm0
	movups	%xmm0, 104(%rbx)
LBB0_2:
	movq	96(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.3:
	movl	16(%rbx), %edi
	movq	_TX_BD_RING_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$2, %esi
	movq	88(%rbx), %rcx
	callq	_dma_free_coherent
	xorps	%xmm0, %xmm0
	movups	%xmm0, 88(%rbx)
LBB0_4:
	cmpq	$0, 80(%rbx)
	je	LBB0_6
## %bb.5:
	movq	72(%rbx), %rdi
	callq	_qe_muram_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, 72(%rbx)
LBB0_6:
	movq	64(%rbx), %rdi
	callq	_kfree
	movq	$0, 64(%rbx)
	movq	56(%rbx), %rdi
	callq	_kfree
	movq	$0, 56(%rbx)
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_iounmap
	movq	$0, 48(%rbx)
LBB0_8:
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_ucc_fast_free
	movq	$0, 40(%rbx)
LBB0_10:
	movq	32(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:
	movl	16(%rbx), %edi
	movq	_RX_BD_RING_LEN@GOTPCREL(%rip), %rax
	movq	_MAX_RX_BUF_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	imull	(%rax), %esi
	movq	24(%rbx), %rcx
	callq	_dma_free_coherent
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
LBB0_12:
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.13:
	movl	16(%rbx), %edi
	movq	_TX_BD_RING_LEN@GOTPCREL(%rip), %rax
	movq	_MAX_RX_BUF_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	imull	(%rax), %esi
	movq	(%rbx), %rcx
	callq	_dma_free_coherent
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_BD_RING_LEN,4,2             ## @RX_BD_RING_LEN
	.comm	_TX_BD_RING_LEN,4,2             ## @TX_BD_RING_LEN
	.comm	_MAX_RX_BUF_LENGTH,4,2          ## @MAX_RX_BUF_LENGTH
	.no_dead_strip	_uhdlc_memclean
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uhdlc_memclean
_uhdlc_memclean:                        ; @uhdlc_memclean
	.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	x19, x0
	ldr	x8, [x0, #80]
	ldr	x0, [x8, #8]
	bl	_qe_muram_free
	ldr	x8, [x19, #80]
	ldr	x0, [x8]
	bl	_qe_muram_free
	ldr	x2, [x19, #112]
Lloh0:
	adrp	x20, _RX_BD_RING_LEN@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RX_BD_RING_LEN@GOTPAGEOFF]
	cbz	x2, LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	ldr	w8, [x20]
	lsl	w1, w8, #2
	ldr	x3, [x19, #104]
	bl	_dma_free_coherent
	stp	xzr, xzr, [x19, #104]
LBB0_2:
	ldr	x2, [x19, #96]
Lloh2:
	adrp	x21, _TX_BD_RING_LEN@GOTPAGE
Lloh3:
	ldr	x21, [x21, _TX_BD_RING_LEN@GOTPAGEOFF]
	cbz	x2, LBB0_4
; %bb.3:
	ldr	w0, [x19, #16]
	ldr	w8, [x21]
	lsl	w1, w8, #2
	ldr	x3, [x19, #88]
	bl	_dma_free_coherent
	stp	xzr, xzr, [x19, #88]
LBB0_4:
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x0, [x19, #72]
	bl	_qe_muram_free
	stp	xzr, xzr, [x19, #72]
LBB0_6:
	ldr	x0, [x19, #64]
	bl	_kfree
	str	xzr, [x19, #64]
	ldr	x0, [x19, #56]
	bl	_kfree
	str	xzr, [x19, #56]
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_iounmap
	str	xzr, [x19, #48]
LBB0_8:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_ucc_fast_free
	str	xzr, [x19, #40]
LBB0_10:
	ldr	x2, [x19, #32]
Lloh4:
	adrp	x22, _MAX_RX_BUF_LENGTH@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MAX_RX_BUF_LENGTH@GOTPAGEOFF]
	cbz	x2, LBB0_12
; %bb.11:
	ldr	w0, [x19, #16]
	ldr	w8, [x20]
	ldr	w9, [x22]
	mul	w1, w9, w8
	ldr	x3, [x19, #24]
	bl	_dma_free_coherent
	stp	xzr, xzr, [x19, #24]
LBB0_12:
	ldr	x2, [x19, #8]
	cbz	x2, LBB0_14
; %bb.13:
	ldr	w0, [x19, #16]
	ldr	w8, [x21]
	ldr	w9, [x22]
	mul	w1, w9, w8
	ldr	x3, [x19]
	bl	_dma_free_coherent
	stp	xzr, xzr, [x19]
LBB0_14:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_BD_RING_LEN,4,2             ; @RX_BD_RING_LEN
	.comm	_TX_BD_RING_LEN,4,2             ; @TX_BD_RING_LEN
	.comm	_MAX_RX_BUF_LENGTH,4,2          ; @MAX_RX_BUF_LENGTH
	.no_dead_strip	_uhdlc_memclean
.subsections_via_symbols
