	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvme_enable_ctrl               ## -- Begin function nvme_enable_ctrl
	.p2align	4, 0x90
_nvme_enable_ctrl:                      ## @nvme_enable_ctrl
	.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	16(%rdi), %rax
	movq	_NVME_REG_CAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	8(%rdi), %r15
	movq	%r15, %rdx
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_2:
	movl	(%r15), %edi
	callq	_NVME_CAP_MPSMIN
	addl	$12, %eax
	cmpl	$13, %eax
	jb	LBB0_4
## %bb.3:
	movl	24(%r14), %edi
	movl	$1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$4096, %ecx                     ## imm = 0x1000
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	movl	$4096, (%r14)                   ## imm = 0x1000
	movq	_NVME_CC_CSS_NVM@GOTPCREL(%rip), %rax
	movq	_NVME_CC_AMS_RR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_NVME_CC_SHN_NONE@GOTPCREL(%rip), %rcx
	orl	(%rax), %edx
	orl	(%rcx), %edx
	movq	_NVME_CC_IOSQES@GOTPCREL(%rip), %rax
	movq	_NVME_CC_IOCQES@GOTPCREL(%rip), %rcx
	orl	(%rax), %edx
	orl	(%rcx), %edx
	movq	_NVME_CC_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, 4(%r14)
	movq	16(%r14), %rax
	movq	_NVME_REG_CC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	callq	*8(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	8(%r14), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvme_wait_ready                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_REG_CAP,4,2               ## @NVME_REG_CAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reading CAP failed (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Minimum device page size %u too large for host (%u)\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_NVME_CC_CSS_NVM,4,2            ## @NVME_CC_CSS_NVM
	.comm	_NVME_CC_MPS_SHIFT,4,2          ## @NVME_CC_MPS_SHIFT
	.comm	_NVME_CC_AMS_RR,4,2             ## @NVME_CC_AMS_RR
	.comm	_NVME_CC_SHN_NONE,4,2           ## @NVME_CC_SHN_NONE
	.comm	_NVME_CC_IOSQES,4,2             ## @NVME_CC_IOSQES
	.comm	_NVME_CC_IOCQES,4,2             ## @NVME_CC_IOCQES
	.comm	_NVME_CC_ENABLE,4,2             ## @NVME_CC_ENABLE
	.comm	_NVME_REG_CC,4,2                ## @NVME_REG_CC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvme_enable_ctrl               ; -- Begin function nvme_enable_ctrl
	.p2align	2
_nvme_enable_ctrl:                      ; @nvme_enable_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _NVME_REG_CAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVME_REG_CAP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	add	x21, x0, #8
	mov	x2, x21
	blr	x8
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_5
LBB0_2:
	ldr	w0, [x21]
	bl	_NVME_CAP_MPSMIN
	add	w8, w0, #12
	cmp	w8, #13
	b.lo	LBB0_4
; %bb.3:
	ldr	w0, [x19, #24]
	mov	w9, #1
	lsl	w2, w9, w8
	mov	w8, #4096
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	mov	w8, #4096
	str	w8, [x19]
Lloh10:
	adrp	x8, _NVME_CC_CSS_NVM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NVME_CC_CSS_NVM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _NVME_CC_AMS_RR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NVME_CC_AMS_RR@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _NVME_CC_SHN_NONE@GOTPAGE
Lloh17:
	ldr	x10, [x10, _NVME_CC_SHN_NONE@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w8, w8, w10
Lloh19:
	adrp	x9, _NVME_CC_IOSQES@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NVME_CC_IOSQES@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _NVME_CC_IOCQES@GOTPAGE
Lloh23:
	ldr	x10, [x10, _NVME_CC_IOCQES@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w8, w8, w10
Lloh25:
	adrp	x9, _NVME_CC_ENABLE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _NVME_CC_ENABLE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w2, w8, w9
	str	w2, [x19, #4]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
Lloh28:
	adrp	x9, _NVME_REG_CC@GOTPAGE
Lloh29:
	ldr	x9, [x9, _NVME_REG_CC@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_5:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_6:
	ldr	w1, [x19, #8]
	mov	x0, x19
	mov	w2, #1
	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
	add	sp, sp, #64
	b	_nvme_wait_ready
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_REG_CAP,4,2               ; @NVME_REG_CAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reading CAP failed (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Minimum device page size %u too large for host (%u)\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_NVME_CC_CSS_NVM,4,2            ; @NVME_CC_CSS_NVM
	.comm	_NVME_CC_MPS_SHIFT,4,2          ; @NVME_CC_MPS_SHIFT
	.comm	_NVME_CC_AMS_RR,4,2             ; @NVME_CC_AMS_RR
	.comm	_NVME_CC_SHN_NONE,4,2           ; @NVME_CC_SHN_NONE
	.comm	_NVME_CC_IOSQES,4,2             ; @NVME_CC_IOSQES
	.comm	_NVME_CC_IOCQES,4,2             ; @NVME_CC_IOCQES
	.comm	_NVME_CC_ENABLE,4,2             ; @NVME_CC_ENABLE
	.comm	_NVME_REG_CC,4,2                ; @NVME_REG_CC
.subsections_via_symbols
