	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function geth_fill_freeq
_geth_fill_freeq:                       ## @geth_fill_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	subl	(%rdi), %ebx
	movl	4(%rdi), %ecx
	subl	%ebx, %ecx
	movl	$-1, %r15d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r15d
	notl	%r15d
	addq	$8, %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	_GLOBAL_SWFQ_RWPTR_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	addq	16(%r14), %rdi
	callq	_readl
	movl	%eax, %r12d
	movl	%ebx, %ecx
	shrl	%cl, %r12d
	movl	$1, %eax
	shll	%cl, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$64, %eax
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	shrl	%cl, %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_page_ref_add
	addl	%ebx, -44(%rbp)                 ## 4-byte Folded Spill
	incl	%r12d
	andl	%r15d, %r12d
	movb	$1, %al
	testb	%al, %al
	je	LBB0_9
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %ebx
	subl	%r15d, %ebx
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	32(%rdx), %rax
	movl	%r12d, %ecx
	movq	(%rax,%rcx,8), %r14
	movl	24(%rdx), %r13d
	movq	%r14, %rdi
	callq	_page_ref_count
	movl	%r13d, %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_page_ref_count
	cmpl	$2, %eax
	jl	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	andl	%r15d, %ebx
	cmpl	-64(%rbp), %ebx                 ## 4-byte Folded Reload
	ja	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_geth_freeq_alloc_map_page
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	testb	%al, %al
	jne	LBB0_1
	jmp	LBB0_9
LBB0_2:
	movl	%r15d, %r12d
LBB0_9:
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movq	_GLOBAL_SWFQ_RWPTR_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rax,%rcx), %rsi
	addq	$2, %rsi
	movl	%r12d, %edi
	callq	_writew
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GLOBAL_SWFQ_RWPTR_REG,8,3      ## @GLOBAL_SWFQ_RWPTR_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fill entry %d page ref count %d add %d refs\n"

	.no_dead_strip	_geth_fill_freeq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function geth_fill_freeq
_geth_fill_freeq:                       ; @geth_fill_freeq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w10, [x0], #8
	sub	w20, w8, w9
	sub	w8, w10, w20
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w28, w8
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _GLOBAL_SWFQ_RWPTR_REG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GLOBAL_SWFQ_RWPTR_REG@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	w21, #0
	lsr	w22, w0, w20
	mov	w8, #1
	lsl	w23, w8, w20
	mov	w8, #64
	str	w20, [sp, #4]                   ; 4-byte Folded Spill
	lsr	w20, w8, w20
Lloh6:
	adrp	x24, l_.str@PAGE
Lloh7:
	add	x24, x24, l_.str@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	x1, x23
	bl	_page_ref_add
	add	w21, w21, w23
	add	w8, w22, #1
	and	w22, w8, w28
	mov	w8, #1
	tbz	w8, #0, LBB0_8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	subs	w27, w22, w28
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #32]
	ldr	x25, [x8, w22, uxtw #3]
	ldr	w26, [x19, #24]
	mov	x0, x25
	bl	_page_ref_count
	mov	x3, x0
	mov	x0, x26
	mov	x1, x24
	mov	x2, x22
	mov	x4, x23
	bl	_dev_dbg
	mov	x0, x25
	bl	_page_ref_count
	cmp	w0, #2
	b.lt	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	and	w8, w27, w28
	cmp	w8, w20
	b.hi	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_geth_freeq_alloc_map_page
	mov	x25, x0
	cbnz	x0, LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #0
	tbnz	w8, #0, LBB0_2
	b	LBB0_8
LBB0_7:
	mov	x22, x28
LBB0_8:
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	lsl	w0, w22, w8
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x9, _GLOBAL_SWFQ_RWPTR_REG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GLOBAL_SWFQ_RWPTR_REG@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x8, x8, x9
	add	x1, x8, #2
	bl	_writew
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GLOBAL_SWFQ_RWPTR_REG,8,3      ; @GLOBAL_SWFQ_RWPTR_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fill entry %d page ref count %d add %d refs\n"

	.no_dead_strip	_geth_fill_freeq
.subsections_via_symbols
