	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function geth_cleanup_freeq
_geth_cleanup_freeq:                    ## @geth_cleanup_freeq
	.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, %r13
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%rdi), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movb	4(%rdi), %cl
	movl	$1, %r12d
	shlq	%cl, %r12
	subl	%eax, %r14d
	movl	%r14d, %ecx
	shrq	%cl, %r12
	movq	_GLOBAL_SWFQ_RWPTR_REG@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	40(%r13), %rdi
	callq	_readw
	movq	40(%r13), %rcx
	movq	(%rbx), %rdx
	leaq	(%rcx,%rdx), %rsi
	addq	$2, %rsi
	movl	%eax, %edi
	callq	_writew
	movq	_GLOBAL_SW_FREEQ_BASE_SIZE_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	40(%r13), %rsi
	xorl	%edi, %edi
	callq	_writel
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%r12, %rbx
	je	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	%ebx, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movq	16(%r13), %rcx
	movl	(%rcx,%rax,4), %esi
	movl	24(%r13), %edi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dma_unmap_single
	movq	32(%r13), %r15
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15,%rbx,4), %edi
	callq	_page_ref_count
	testq	%rax, %rax
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	(%r15,%rbx,4), %edi
	callq	_put_page
	jmp	LBB0_4
LBB0_6:
	movq	32(%r13), %rdi
	callq	_kfree
	movb	4(%r13), %cl
	movl	$4, %esi
	shlq	%cl, %rsi
	movl	24(%r13), %edi
	movq	16(%r13), %rdx
	movl	8(%r13), %ecx
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_free_coherent              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GLOBAL_SWFQ_RWPTR_REG,8,3      ## @GLOBAL_SWFQ_RWPTR_REG
	.comm	_GLOBAL_SW_FREEQ_BASE_SIZE_REG,8,3 ## @GLOBAL_SW_FREEQ_BASE_SIZE_REG
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_geth_cleanup_freeq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function geth_cleanup_freeq
_geth_cleanup_freeq:                    ; @geth_cleanup_freeq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w20, w9, [x0]
	sub	w21, w8, w20
	mov	w24, #1
	lsl	x8, x24, x9
	lsr	x22, x8, x21
	ldr	x8, [x0, #40]
Lloh3:
	adrp	x23, _GLOBAL_SWFQ_RWPTR_REG@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GLOBAL_SWFQ_RWPTR_REG@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readw
	ldr	x8, [x19, #40]
	ldr	x9, [x23]
	add	x8, x8, x9
	add	x1, x8, #2
	bl	_writew
	ldr	x8, [x19, #40]
Lloh5:
	adrp	x9, _GLOBAL_SW_FREEQ_BASE_SIZE_REG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GLOBAL_SW_FREEQ_BASE_SIZE_REG@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	cbz	w22, LBB0_5
; %bb.1:
	mov	x23, #0
	lsl	w20, w24, w20
Lloh8:
	adrp	x24, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x24, [x24, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x23, x22
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	x8, [x19, #16]
	lsl	w9, w23, w21
	ldr	w1, [x8, w9, uxtw #2]
	ldr	w0, [x19, #24]
	ldr	w3, [x24]
	mov	x2, x20
	bl	_dma_unmap_single
	ldr	x25, [x19, #32]
	ldr	w0, [x25, x23, lsl #2]
	bl	_page_ref_count
	cmp	x0, #1
	b.lt	LBB0_2
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x26, x23, #2
	ldr	w0, [x25, x26]
	bl	_put_page
	ldr	w0, [x25, x26]
	bl	_page_ref_count
	cmp	x0, #0
	b.gt	LBB0_4
	b	LBB0_2
LBB0_5:
	ldr	x0, [x19, #32]
	bl	_kfree
	ldr	w0, [x19, #24]
	mov	w8, #4
	ldp	w9, w3, [x19, #4]
	lsl	x1, x8, x9
	ldr	x2, [x19, #16]
                                        ; kill: def $w1 killed $w1 killed $x1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_dma_free_coherent
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GLOBAL_SWFQ_RWPTR_REG,8,3      ; @GLOBAL_SWFQ_RWPTR_REG
	.comm	_GLOBAL_SW_FREEQ_BASE_SIZE_REG,8,3 ; @GLOBAL_SW_FREEQ_BASE_SIZE_REG
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_geth_cleanup_freeq
.subsections_via_symbols
