	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmdq_init
_cmdq_init:                             ## @cmdq_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_clk_enable
	shrq	$63, %rax
	movl	%eax, %edi
	callq	_WARN_ON
	movq	_CMDQ_THR_ACTIVE_SLOT_CYCLES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CMDQ_THR_SLOT_CYCLES@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	callq	_writel
	movq	_CMDQ_MAX_EVENT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	js	LBB0_3
## %bb.1:
	movl	$-1, %ebx
	movq	_CMDQ_SYNC_TOKEN_UPDATE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movq	(%r12), %rsi
	addq	8(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	cmpl	(%r15), %ebx
	jl	LBB0_2
LBB0_3:
	movl	(%r14), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clk_disable                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CMDQ_THR_ACTIVE_SLOT_CYCLES,4,2 ## @CMDQ_THR_ACTIVE_SLOT_CYCLES
	.comm	_CMDQ_THR_SLOT_CYCLES,8,3       ## @CMDQ_THR_SLOT_CYCLES
	.comm	_CMDQ_MAX_EVENT,4,2             ## @CMDQ_MAX_EVENT
	.comm	_CMDQ_SYNC_TOKEN_UPDATE,8,3     ## @CMDQ_SYNC_TOKEN_UPDATE
	.no_dead_strip	_cmdq_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmdq_init
_cmdq_init:                             ; @cmdq_init
	.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	w0, [x0]
	bl	_clk_enable
	lsr	x0, x0, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_WARN_ON
Lloh0:
	adrp	x8, _CMDQ_THR_ACTIVE_SLOT_CYCLES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMDQ_THR_ACTIVE_SLOT_CYCLES@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _CMDQ_THR_SLOT_CYCLES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CMDQ_THR_SLOT_CYCLES@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh6:
	adrp	x21, _CMDQ_MAX_EVENT@GOTPAGE
Lloh7:
	ldr	x21, [x21, _CMDQ_MAX_EVENT@GOTPAGEOFF]
	ldr	w8, [x21]
	tbnz	w8, #31, LBB0_3
; %bb.1:
	mov	w20, #-1
Lloh8:
	adrp	x22, _CMDQ_SYNC_TOKEN_UPDATE@GOTPAGE
Lloh9:
	ldr	x22, [x22, _CMDQ_SYNC_TOKEN_UPDATE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w20, w20, #1
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_2
LBB0_3:
	ldr	w0, [x19]
	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	_clk_disable
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CMDQ_THR_ACTIVE_SLOT_CYCLES,4,2 ; @CMDQ_THR_ACTIVE_SLOT_CYCLES
	.comm	_CMDQ_THR_SLOT_CYCLES,8,3       ; @CMDQ_THR_SLOT_CYCLES
	.comm	_CMDQ_MAX_EVENT,4,2             ; @CMDQ_MAX_EVENT
	.comm	_CMDQ_SYNC_TOKEN_UPDATE,8,3     ; @CMDQ_SYNC_TOKEN_UPDATE
	.no_dead_strip	_cmdq_init
.subsections_via_symbols
