	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function restart_sched
_restart_sched:                         ## @restart_sched
	.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, %r12
	movq	(%rdi), %r13
	movq	8(%rdi), %r15
	leaq	16(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_reclaim_completed_tx
	movl	(%r13), %ebx
	subl	4(%r13), %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_debug
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_sched_skb
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r13, %r8
	callq	_write_tx_descs
	movl	(%r13), %edx
	subl	4(%r13), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_sched_skb
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_skb_shinfo
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_compute_large_page_tx_descs
	leal	(%r14,%rax), %ecx
	incl	%ecx
	addl	%ecx, 4(%r13)
                                        ## kill: def $r14d killed $r14d killed $r14 def $r14
	addl	%eax, %r14d
	movl	(%r13), %esi
	movl	8(%r13), %ecx
	movl	12(%r13), %edx
	leal	(%rdx,%r14), %eax
	incl	%eax
	movl	%eax, 12(%r13)
	subl	%esi, %eax
	jb	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, 12(%r13)
	movl	%ecx, %eax
	xorl	$1, %eax
	movl	%eax, 8(%r13)
	jmp	LBB0_4
LBB0_5:
	movq	_CMDQ_STAT_LAST_PKT_DB@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	addq	$20, %r13
	movq	%r13, %rsi
	callq	_clear_bit
	movq	_CMDQ_STAT_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_7
## %bb.6:
	movl	(%rbx), %edi
	movq	%r13, %rsi
	callq	_set_bit
	movq	_F_CMDQ0_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_A_SG_DOORBELL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	callq	_writel
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"restart_sched credits=%d\n"

	.comm	_CMDQ_STAT_LAST_PKT_DB,4,2      ## @CMDQ_STAT_LAST_PKT_DB
	.comm	_CMDQ_STAT_RUNNING,4,2          ## @CMDQ_STAT_RUNNING
	.comm	_F_CMDQ0_ENABLE,4,2             ## @F_CMDQ0_ENABLE
	.comm	_A_SG_DOORBELL,8,3              ## @A_SG_DOORBELL
	.no_dead_strip	_restart_sched
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function restart_sched
_restart_sched:                         ; @restart_sched
	.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	x22, x0
	ldp	x21, x20, [x0]
	add	x19, x21, #16
	mov	x0, x19
	bl	_spin_lock
	mov	x0, x22
	mov	x1, x21
	bl	_reclaim_completed_tx
	ldp	w8, w9, [x21]
	sub	w23, w8, w9
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_pr_debug
	mov	x0, x22
	mov	x1, #0
	mov	x2, x23
	bl	_sched_skb
	cbz	x0, LBB0_7
; %bb.1:
	mov	x23, x0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x23
	mov	x4, x21
	bl	_write_tx_descs
	ldp	w8, w9, [x21]
	sub	w2, w8, w9
	mov	x0, x22
	mov	x1, #0
	bl	_sched_skb
	mov	x23, x0
	cbz	x0, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_skb_shinfo
	ldr	w24, [x0]
	mov	x0, x23
	bl	_compute_large_page_tx_descs
	add	w8, w24, w0
	add	w8, w8, #1
	ldp	w10, w9, [x21]
	add	w9, w8, w9
	str	w9, [x21, #4]
	ldp	w3, w2, [x21, #8]
	add	w9, w2, w8
	subs	w8, w9, w10
	str	w9, [x21, #12]
	b.lo	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	eor	w9, w3, #0x1
	stp	w9, w8, [x21, #8]
	b	LBB0_2
LBB0_5:
Lloh2:
	adrp	x22, _CMDQ_STAT_LAST_PKT_DB@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CMDQ_STAT_LAST_PKT_DB@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x21, x21, #20
	mov	x1, x21
	bl	_clear_bit
Lloh4:
	adrp	x8, _CMDQ_STAT_RUNNING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CMDQ_STAT_RUNNING@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_and_set_bit
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x22]
	mov	x1, x21
	bl	_set_bit
Lloh7:
	adrp	x8, _F_CMDQ0_ENABLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _F_CMDQ0_ENABLE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	x8, [x20]
Lloh10:
	adrp	x9, _A_SG_DOORBELL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _A_SG_DOORBELL@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
LBB0_7:
	mov	x0, x19
	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
	b	_spin_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"restart_sched credits=%d\n"

	.comm	_CMDQ_STAT_LAST_PKT_DB,4,2      ; @CMDQ_STAT_LAST_PKT_DB
	.comm	_CMDQ_STAT_RUNNING,4,2          ; @CMDQ_STAT_RUNNING
	.comm	_F_CMDQ0_ENABLE,4,2             ; @F_CMDQ0_ENABLE
	.comm	_A_SG_DOORBELL,8,3              ; @A_SG_DOORBELL
	.no_dead_strip	_restart_sched
.subsections_via_symbols
