	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nes_nic_tune_timer
_nes_nic_tune_timer:                    ## @nes_nic_tune_timer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movl	(%rdi), %r15d
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	cmpl	%r15d, 8(%rbx)
	jle	LBB0_1
## %bb.2:
	movq	16(%rbx), %rax
	incq	%rax
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	%rax, 16(%rbx)
	movl	%r15d, 8(%rbx)
	movq	_NES_NIC_CQ_DOWNWARD_TREND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_7
## %bb.4:
	movl	24(%rbx), %eax
	cmpl	%eax, %r15d
	jg	LBB0_7
## %bb.5:
	cmpl	$5, %eax
	jl	LBB0_7
## %bb.6:
	shrl	%eax
	movl	%eax, 24(%rbx)
	movq	$0, 16(%rbx)
	jmp	LBB0_24
LBB0_7:
	cmpl	$2, %r15d
	jl	LBB0_21
## %bb.8:
	addl	%r15d, 4(%r14)
	cmpl	24(%rbx), %r15d
	jle	LBB0_18
## %bb.9:
	cmpl	36(%rbx), %r15d
	jle	LBB0_20
## %bb.10:
	movl	40(%rbx), %ecx
	cmpl	%ecx, %r15d
	jle	LBB0_11
## %bb.14:
	addl	%ecx, %ecx
	movl	44(%rbx), %eax
	cmpl	%ecx, %r15d
	jle	LBB0_15
## %bb.17:
	addl	$-4, %eax
	jmp	LBB0_16
LBB0_18:
	movl	28(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 28(%rbx)
	movl	$0, 32(%rbx)
	cmpl	$3, %eax
	jl	LBB0_21
## %bb.19:
	addl	$3, 44(%rbx)
	jmp	LBB0_20
LBB0_11:
	movl	32(%rbx), %eax
	incl	%eax
	movl	%eax, 32(%rbx)
	movl	$0, 28(%rbx)
	cmpl	$6, %eax
	jge	LBB0_13
	jmp	LBB0_21
LBB0_15:
	addl	$-2, %eax
LBB0_16:
	movl	%eax, 44(%rbx)
	movl	$0, 28(%rbx)
	movl	32(%rbx), %eax
	incl	%eax
	movl	%eax, 32(%rbx)
	cmpl	$6, %eax
	jl	LBB0_21
LBB0_13:
	addl	$-4, 44(%rbx)
LBB0_20:
	movq	$0, 28(%rbx)
LBB0_21:
	movl	40(%rbx), %eax
	movl	44(%rbx), %ecx
	cmpl	%eax, %ecx
	jg	LBB0_23
## %bb.22:
	movl	24(%rbx), %eax
	cmpl	%eax, %ecx
	jge	LBB0_24
LBB0_23:
	movl	%eax, 44(%rbx)
LBB0_24:
	movl	$0, (%r14)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NES_NIC_CQ_DOWNWARD_TREND,8,3  ## @NES_NIC_CQ_DOWNWARD_TREND
	.no_dead_strip	_nes_nic_tune_timer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nes_nic_tune_timer
_nes_nic_tune_timer:                    ; @nes_nic_tune_timer
	.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	x20, [x0, #8]
	ldr	w21, [x0]
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #8]
	cmp	w8, w21
	b.le	LBB0_2
; %bb.1:
	ldr	x8, [x20, #16]
	add	x8, x8, #1
	b	LBB0_3
LBB0_2:
	mov	x8, #0
LBB0_3:
	str	x8, [x20, #16]
	str	w21, [x20, #8]
Lloh0:
	adrp	x9, _NES_NIC_CQ_DOWNWARD_TREND@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NES_NIC_CQ_DOWNWARD_TREND@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_5
; %bb.4:
	ldr	w8, [x20, #24]
	cmp	w21, w8
	ccmp	w8, #5, #8, le
	b.ge	LBB0_11
LBB0_5:
	cmp	w21, #2
	b.lt	LBB0_21
; %bb.6:
	ldr	w8, [x19, #4]
	add	w8, w8, w21
	str	w8, [x19, #4]
	ldr	w8, [x20, #24]
	cmp	w21, w8
	b.le	LBB0_12
; %bb.7:
	ldr	w8, [x20, #36]
	cmp	w21, w8
	b.le	LBB0_14
; %bb.8:
	ldr	w9, [x20, #40]
	cmp	w21, w9
	b.le	LBB0_17
; %bb.9:
	ldr	w8, [x20, #44]
	cmp	w21, w9, lsl #1
	b.le	LBB0_15
; %bb.10:
	sub	w8, w8, #4
	b	LBB0_16
LBB0_11:
	lsr	w8, w8, #1
	str	w8, [x20, #24]
	str	xzr, [x20, #16]
	b	LBB0_24
LBB0_12:
	mov	x8, x20
	ldr	w9, [x8, #28]!
	add	w10, w9, #1
	stp	w10, wzr, [x8]
	cmp	w9, #3
	b.lt	LBB0_21
; %bb.13:
	ldr	w9, [x20, #44]
	add	w9, w9, #3
	b	LBB0_19
LBB0_14:
	add	x8, x20, #28
	b	LBB0_20
LBB0_15:
	sub	w8, w8, #2
LBB0_16:
	str	w8, [x20, #44]
LBB0_17:
	ldr	w8, [x20, #32]
	add	w8, w8, #1
	stp	wzr, w8, [x20, #28]
	cmp	w8, #6
	b.lt	LBB0_21
; %bb.18:
	add	x8, x20, #28
	ldr	w9, [x20, #44]
	sub	w9, w9, #4
LBB0_19:
	str	w9, [x20, #44]
LBB0_20:
	str	xzr, [x8]
LBB0_21:
	ldp	w8, w9, [x20, #40]
	cmp	w9, w8
	b.gt	LBB0_23
; %bb.22:
	ldr	w8, [x20, #24]
	cmp	w9, w8
	b.ge	LBB0_24
LBB0_23:
	str	w8, [x20, #44]
LBB0_24:
	str	wzr, [x19]
	mov	x0, x20
	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
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NES_NIC_CQ_DOWNWARD_TREND,8,3  ; @NES_NIC_CQ_DOWNWARD_TREND
	.no_dead_strip	_nes_nic_tune_timer
.subsections_via_symbols
