	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcmgenet_set_coalesce
_bcmgenet_set_coalesce:                 ## @bcmgenet_set_coalesce
	.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	%rsi, %rbx
	callq	_netdev_priv
	movq	(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.1:
	movq	%rax, %r14
	movq	_DMA_INTR_THRESHOLD_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	jg	LBB0_4
## %bb.2:
	movq	8(%rbx), %rax
	cmpq	%rcx, %rax
	jg	LBB0_4
## %bb.3:
	movl	16(%rbx), %ecx
	movq	_DMA_TIMEOUT_MASK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	leal	1(,%rsi,8), %esi
	cmpl	%esi, %ecx
	jg	LBB0_4
## %bb.6:
	testl	%ecx, %ecx
	jne	LBB0_8
## %bb.7:
	testq	%rax, %rax
	jne	LBB0_8
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpq	$0, 56(%rbx)
	jne	LBB0_21
## %bb.9:
	cmpq	$0, 48(%rbx)
	jne	LBB0_21
## %bb.10:
	cmpq	$0, 40(%rbx)
	jne	LBB0_21
## %bb.11:
	cmpq	$0, 32(%rbx)
	jne	LBB0_21
## %bb.12:
	cmpq	$0, 24(%rbx)
	je	LBB0_13
LBB0_21:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_13:
	movq	8(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
## %bb.14:
	xorl	%r15d, %r15d
	movq	_DMA_MBUF_DONE_THRESH@GOTPCREL(%rip), %r12
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bcmgenet_tdma_ring_writel
	incq	%r15
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rdx
	cmpq	%rax, %r15
	jb	LBB0_15
LBB0_16:
	movq	_DESC_INDEX@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	_DMA_MBUF_DONE_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_bcmgenet_tdma_ring_writel
	movq	8(%r14), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_19
## %bb.17:
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	addq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_bcmgenet_set_ring_rx_coalesce
	incq	%r13
	movq	8(%r14), %rax
	movl	4(%rax), %eax
	addq	$4, %r12
	cmpq	%rax, %r13
	jb	LBB0_18
LBB0_19:
	movq	(%r15), %rdi
	shlq	$2, %rdi
	addq	(%r14), %rdi
	movq	%rbx, %rsi
	callq	_bcmgenet_set_ring_rx_coalesce
	xorl	%eax, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_INTR_THRESHOLD_MASK,8,3    ## @DMA_INTR_THRESHOLD_MASK
	.comm	_DMA_TIMEOUT_MASK,4,2           ## @DMA_TIMEOUT_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_DMA_MBUF_DONE_THRESH,4,2       ## @DMA_MBUF_DONE_THRESH
	.comm	_DESC_INDEX,8,3                 ## @DESC_INDEX
	.no_dead_strip	_bcmgenet_set_coalesce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcmgenet_set_coalesce
_bcmgenet_set_coalesce:                 ; @bcmgenet_set_coalesce
	.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, x1
	bl	_netdev_priv
	ldr	x2, [x19]
Lloh0:
	adrp	x8, _DMA_INTR_THRESHOLD_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_INTR_THRESHOLD_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	cmp	x2, #0
	ccmp	x2, x9, #0, ne
	b.gt	LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	cmp	x8, x9
	b.gt	LBB0_5
; %bb.2:
	ldr	w9, [x19, #16]
Lloh3:
	adrp	x10, _DMA_TIMEOUT_MASK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DMA_TIMEOUT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	mov	w11, #1
	bfi	w11, w10, #3, #29
	cmp	w9, w11
	b.gt	LBB0_5
; %bb.3:
	mov	x20, x0
	cbnz	w9, LBB0_8
; %bb.4:
	cbnz	x8, LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
LBB0_8:
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_13
; %bb.9:
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_13
; %bb.10:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_13
; %bb.11:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_13
; %bb.12:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_14
LBB0_13:
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_6
LBB0_14:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh10:
	adrp	x22, _DMA_MBUF_DONE_THRESH@GOTPAGE
Lloh11:
	ldr	x22, [x22, _DMA_MBUF_DONE_THRESH@GOTPAGEOFF]
	cbz	w8, LBB0_17
; %bb.15:
	mov	x21, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_bcmgenet_tdma_ring_writel
	add	x21, x21, #1
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	ldr	x2, [x19]
	cmp	x21, x8
	b.lo	LBB0_16
LBB0_17:
Lloh12:
	adrp	x21, _DESC_INDEX@GOTPAGE
Lloh13:
	ldr	x21, [x21, _DESC_INDEX@GOTPAGEOFF]
	ldr	x1, [x21]
	ldr	w3, [x22]
	mov	x0, x20
	bl	_bcmgenet_tdma_ring_writel
	ldr	x8, [x20, #8]
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_20
; %bb.18:
	mov	x22, #0
	mov	x23, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x0, x8, x22
	mov	x1, x19
	bl	_bcmgenet_set_ring_rx_coalesce
	add	x23, x23, #1
	ldr	x8, [x20, #8]
	ldr	w8, [x8, #4]
	add	x22, x22, #4
	cmp	x23, x8
	b.lo	LBB0_19
LBB0_20:
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x0, x8, x9, lsl #2
	mov	x1, x19
	bl	_bcmgenet_set_ring_rx_coalesce
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_INTR_THRESHOLD_MASK,8,3    ; @DMA_INTR_THRESHOLD_MASK
	.comm	_DMA_TIMEOUT_MASK,4,2           ; @DMA_TIMEOUT_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_DMA_MBUF_DONE_THRESH,4,2       ; @DMA_MBUF_DONE_THRESH
	.comm	_DESC_INDEX,8,3                 ; @DESC_INDEX
	.no_dead_strip	_bcmgenet_set_coalesce
.subsections_via_symbols
