	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_pci_configure_admin_queue
_nvme_pci_configure_admin_queue:        ## @nvme_pci_configure_admin_queue
	.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, %r12
	xorl	%esi, %esi
	callq	_db_bar_size
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nvme_remap_bar
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movq	_NVME_REG_VS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movl	%eax, %ebx
	movl	$1, %edi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_NVME_VS
	cmpl	%eax, %ebx
	jge	LBB0_4
## %bb.2:
	movl	$0, 24(%r12)
	jmp	LBB0_7
LBB0_4:
	movl	4(%r12), %edi
	callq	_NVME_CAP_NSSRC
	movl	%eax, 24(%r12)
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movq	_NVME_REG_CSTS@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movq	_NVME_CSTS_NSSRO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %edi
	je	LBB0_7
## %bb.6:
	movq	(%rbx), %rsi
	addq	8(%r12), %rsi
	callq	_writel
LBB0_7:
	leaq	4(%r12), %r15
	movq	%r15, %rdi
	callq	_nvme_disable_ctrl
	testl	%eax, %eax
	js	LBB0_12
## %bb.8:
	movq	_NVME_AQ_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_nvme_alloc_queue
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movq	16(%r12), %r14
	movl	(%r14), %eax
	decl	%eax
	movl	%eax, %edi
	shll	$16, %edi
	orl	%eax, %edi
	movq	_NVME_REG_AQA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	callq	_writel
	movl	20(%r14), %edi
	movq	_NVME_REG_ASQ@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	callq	_lo_hi_writeq
	movl	16(%r14), %edi
	movq	_NVME_REG_ACQ@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	callq	_lo_hi_writeq
	movq	%r15, %rdi
	callq	_nvme_enable_ctrl
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	$0, 8(%r14)
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_nvme_init_queue
	movq	%r14, %rdi
	callq	_queue_request_irq
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	decl	(%r12)
LBB0_12:
	movl	%eax, %ebx
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_NVMEQ_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %r14
	movq	%r14, %rsi
	callq	_set_bit
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_REG_VS,8,3                ## @NVME_REG_VS
	.comm	_NVME_REG_CSTS,8,3              ## @NVME_REG_CSTS
	.comm	_NVME_CSTS_NSSRO,4,2            ## @NVME_CSTS_NSSRO
	.comm	_NVME_AQ_DEPTH,4,2              ## @NVME_AQ_DEPTH
	.comm	_NVME_REG_AQA,8,3               ## @NVME_REG_AQA
	.comm	_NVME_REG_ASQ,8,3               ## @NVME_REG_ASQ
	.comm	_NVME_REG_ACQ,8,3               ## @NVME_REG_ACQ
	.comm	_NVMEQ_ENABLED,4,2              ## @NVMEQ_ENABLED
	.no_dead_strip	_nvme_pci_configure_admin_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_pci_configure_admin_queue
_nvme_pci_configure_admin_queue:        ; @nvme_pci_configure_admin_queue
	.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
	mov	w1, #0
	bl	_db_bar_size
	mov	x1, x0
	mov	x0, x19
	bl	_nvme_remap_bar
	tbnz	w0, #31, LBB0_12
; %bb.1:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _NVME_REG_VS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVME_REG_VS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
	mov	w0, #1
	mov	w1, #1
	mov	w2, #0
	bl	_NVME_VS
	cmp	w20, w0
	b.ge	LBB0_3
; %bb.2:
	str	wzr, [x19, #24]
	b	LBB0_6
LBB0_3:
	ldr	w0, [x19, #4]
	bl	_NVME_CAP_NSSRC
	str	w0, [x19, #24]
	cbz	w0, LBB0_6
; %bb.4:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x20, _NVME_REG_CSTS@GOTPAGE
Lloh4:
	ldr	x20, [x20, _NVME_REG_CSTS@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
	mov	x8, x0
Lloh5:
	adrp	x9, _NVME_CSTS_NSSRO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NVME_CSTS_NSSRO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x9]
	tst	w0, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
LBB0_6:
	add	x21, x19, #4
	mov	x0, x21
	bl	_nvme_disable_ctrl
	tbnz	w0, #31, LBB0_12
; %bb.7:
Lloh8:
	adrp	x8, _NVME_AQ_DEPTH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NVME_AQ_DEPTH@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_nvme_alloc_queue
	cbnz	w0, LBB0_12
; %bb.8:
	ldp	x8, x20, [x19, #8]
	ldr	w9, [x20]
	sub	w9, w9, #1
	orr	w0, w9, w9, lsl #16
Lloh11:
	adrp	x9, _NVME_REG_AQA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NVME_REG_AQA@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x20, #20]
	ldr	x8, [x19, #8]
Lloh14:
	adrp	x9, _NVME_REG_ASQ@GOTPAGE
Lloh15:
	ldr	x9, [x9, _NVME_REG_ASQ@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_lo_hi_writeq
	ldr	w0, [x20, #16]
	ldr	x8, [x19, #8]
Lloh17:
	adrp	x9, _NVME_REG_ACQ@GOTPAGE
Lloh18:
	ldr	x9, [x9, _NVME_REG_ACQ@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_lo_hi_writeq
	mov	x0, x21
	bl	_nvme_enable_ctrl
	cbnz	w0, LBB0_12
; %bb.9:
	str	xzr, [x20, #8]
	mov	x0, x20
	mov	w1, #0
	bl	_nvme_init_queue
	mov	x0, x20
	bl	_queue_request_irq
	cbz	w0, LBB0_11
; %bb.10:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	b	LBB0_12
LBB0_11:
Lloh20:
	adrp	x8, _NVMEQ_ENABLED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NVMEQ_ENABLED@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	add	x1, x20, #4
	bl	_set_bit
	mov	w0, #0
LBB0_12:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_REG_VS,8,3                ; @NVME_REG_VS
	.comm	_NVME_REG_CSTS,8,3              ; @NVME_REG_CSTS
	.comm	_NVME_CSTS_NSSRO,4,2            ; @NVME_CSTS_NSSRO
	.comm	_NVME_AQ_DEPTH,4,2              ; @NVME_AQ_DEPTH
	.comm	_NVME_REG_AQA,8,3               ; @NVME_REG_AQA
	.comm	_NVME_REG_ASQ,8,3               ; @NVME_REG_ASQ
	.comm	_NVME_REG_ACQ,8,3               ; @NVME_REG_ACQ
	.comm	_NVMEQ_ENABLED,4,2              ; @NVMEQ_ENABLED
	.no_dead_strip	_nvme_pci_configure_admin_queue
.subsections_via_symbols
