	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks8695_refill_rxbuffers
_ks8695_refill_rxbuffers:               ## @ks8695_refill_rxbuffers
	.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	_MAX_RX_DESC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	addq	$24, %rbx
	cmpq	%rcx, %r12
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	cmpq	$0, 16(%rcx,%rbx)
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX_RXBUF_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_dev_alloc_skb
	movq	%rax, %r14
	movq	8(%r15), %rax
	movq	%r14, 16(%rax,%rbx)
	testq	%r14, %r14
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	20(%r15), %edi
	movl	4(%r14), %esi
	movq	_MAX_RXBUF_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, %r13
	movl	20(%r15), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movq	%r13, 8(%rax,%rbx)
	movl	16(%r15), %ecx
	movl	%ecx, (%r14)
	movq	_MAX_RXBUF_SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	%rcx, (%rax,%rbx)
	movq	%r13, %rdi
	callq	_cpu_to_le32
	movq	(%r15), %rcx
	movq	%rax, 16(%rcx,%rbx)
	movq	(%r14), %rdi
	callq	_cpu_to_le32
	movq	(%r15), %rcx
	movq	%rax, 8(%rcx,%rbx)
	xorl	%eax, %eax
	callq	_wmb
	movq	_RDES_OWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_cpu_to_le32
	movq	(%r15), %rcx
	movq	%rax, (%rcx,%rbx)
	movq	_MAX_RX_DESC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	callq	_dev_kfree_skb_irq
	movq	8(%r15), %rax
	movq	$0, 16(%rax,%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_RX_DESC,4,2                ## @MAX_RX_DESC
	.comm	_MAX_RXBUF_SIZE,8,3             ## @MAX_RXBUF_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_RDES_OWN,8,3                   ## @RDES_OWN
	.no_dead_strip	_ks8695_refill_rxbuffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks8695_refill_rxbuffers
_ks8695_refill_rxbuffers:               ; @ks8695_refill_rxbuffers
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x23, _MAX_RX_DESC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MAX_RX_DESC@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	mov	x24, #0
Lloh2:
	adrp	x25, _MAX_RXBUF_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MAX_RXBUF_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x26, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh6:
	adrp	x27, _RDES_OWN@GOTPAGE
Lloh7:
	ldr	x27, [x27, _RDES_OWN@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	add	x22, x22, #24
	cmp	x24, w8, sxtw
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	add	x9, x9, x22
	ldr	x9, [x9, #16]
	cbnz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x25]
	bl	_dev_alloc_skb
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	str	x0, [x8, #16]
	cbz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x20, x0
	ldr	w0, [x19, #20]
	ldr	w1, [x20, #4]
	ldr	x2, [x25]
	ldr	w3, [x26]
	bl	_dma_map_single
	mov	x21, x0
	ldr	w0, [x19, #20]
	mov	x1, x21
	bl	_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	str	x21, [x8, #8]
	ldr	w9, [x19, #16]
	str	w9, [x20]
	ldr	x9, [x25]
	str	x9, [x8]
	mov	x0, x21
	bl	_cpu_to_le32
	ldr	x8, [x19]
	add	x8, x8, x22
	str	x0, [x8, #16]
	ldr	x0, [x25]
	bl	_cpu_to_le32
	ldr	x8, [x19]
	add	x8, x8, x22
	str	x0, [x8, #8]
	bl	_wmb
	ldr	x0, [x27]
	bl	_cpu_to_le32
	ldr	x8, [x19]
	str	x0, [x8, x22]
	ldr	w8, [x23]
	b	LBB0_2
LBB0_7:
	mov	x0, x20
	bl	_dev_kfree_skb_irq
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	str	xzr, [x8, #16]
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_RX_DESC,4,2                ; @MAX_RX_DESC
	.comm	_MAX_RXBUF_SIZE,8,3             ; @MAX_RXBUF_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_RDES_OWN,8,3                   ; @RDES_OWN
	.no_dead_strip	_ks8695_refill_rxbuffers
.subsections_via_symbols
