	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __cqhci_enable
___cqhci_enable:                        ## @__cqhci_enable
	.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, %r15
	movq	32(%rdi), %r14
	movq	_CQHCI_CFG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_cqhci_readl
	movl	%eax, %ebx
	movq	_CQHCI_ENABLE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%ebx, %eax
	je	LBB0_2
## %bb.1:
	notl	%eax
	andl	%eax, %ebx
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_cqhci_writel
LBB0_2:
	movq	_CQHCI_DCMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CQHCI_TASK_DESC_SZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	orl	%eax, %edx
	notl	%edx
	andl	%ebx, %edx
	movq	_MMC_CAP2_CQE_DCMD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	(%r14), %esi
	cmovnel	%eax, %esi
	orl	%edx, %esi
	movq	_CQHCI_TASK_DESC_SZ_128@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	(%r15), %ebx
	cmovnel	%ecx, %ebx
	orl	%esi, %ebx
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_cqhci_writel
	movl	24(%r15), %edi
	callq	_lower_32_bits
	movq	_CQHCI_TDLBA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_cqhci_writel
	movl	24(%r15), %edi
	callq	_upper_32_bits
	movq	_CQHCI_TDLBAU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_cqhci_writel
	movl	4(%r15), %esi
	movq	_CQHCI_SSC2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_cqhci_writel
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_cqhci_set_irqs
	orl	(%r13), %ebx
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_cqhci_writel
	movl	$1, 4(%r14)
	movq	16(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	*%rax
LBB0_4:
	xorl	%eax, %eax
	callq	_wmb
	movq	_CQHCI_IS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_cqhci_set_irqs
	movl	$1, 8(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CQHCI_CFG,4,2                  ## @CQHCI_CFG
	.comm	_CQHCI_ENABLE,4,2               ## @CQHCI_ENABLE
	.comm	_CQHCI_DCMD,4,2                 ## @CQHCI_DCMD
	.comm	_CQHCI_TASK_DESC_SZ,4,2         ## @CQHCI_TASK_DESC_SZ
	.comm	_MMC_CAP2_CQE_DCMD,4,2          ## @MMC_CAP2_CQE_DCMD
	.comm	_CQHCI_TASK_DESC_SZ_128,4,2     ## @CQHCI_TASK_DESC_SZ_128
	.comm	_CQHCI_TDLBA,4,2                ## @CQHCI_TDLBA
	.comm	_CQHCI_TDLBAU,4,2               ## @CQHCI_TDLBAU
	.comm	_CQHCI_SSC2,4,2                 ## @CQHCI_SSC2
	.comm	_CQHCI_IS_MASK,4,2              ## @CQHCI_IS_MASK
	.no_dead_strip	___cqhci_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __cqhci_enable
___cqhci_enable:                        ; @__cqhci_enable
	.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	x19, x0
	ldr	x20, [x0, #32]
Lloh0:
	adrp	x22, _CQHCI_CFG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CQHCI_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_cqhci_readl
	mov	x21, x0
Lloh2:
	adrp	x23, _CQHCI_ENABLE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CQHCI_ENABLE@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	bic	w21, w21, w8
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_cqhci_writel
LBB0_2:
Lloh4:
	adrp	x8, _CQHCI_DCMD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CQHCI_DCMD@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _CQHCI_TASK_DESC_SZ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _CQHCI_TASK_DESC_SZ@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bic	w10, w21, w10
	ldr	w11, [x20]
Lloh10:
	adrp	x12, _MMC_CAP2_CQE_DCMD@GOTPAGE
Lloh11:
	ldr	x12, [x12, _MMC_CAP2_CQE_DCMD@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
	tst	w12, w11
	csel	w8, wzr, w8, eq
	orr	w8, w8, w10
Lloh13:
	adrp	x10, _CQHCI_TASK_DESC_SZ_128@GOTPAGE
Lloh14:
	ldr	x10, [x10, _CQHCI_TASK_DESC_SZ_128@GOTPAGEOFF]
	ldr	w11, [x19]
Lloh15:
	ldr	w10, [x10]
	tst	w10, w11
	csel	w9, wzr, w9, eq
	orr	w21, w8, w9
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_cqhci_writel
	ldr	w0, [x19, #24]
	bl	_lower_32_bits
	mov	x1, x0
Lloh16:
	adrp	x8, _CQHCI_TDLBA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CQHCI_TDLBA@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cqhci_writel
	ldr	w0, [x19, #24]
	bl	_upper_32_bits
	mov	x1, x0
Lloh19:
	adrp	x8, _CQHCI_TDLBAU@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CQHCI_TDLBAU@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cqhci_writel
	ldr	w1, [x19, #4]
Lloh22:
	adrp	x8, _CQHCI_SSC2@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CQHCI_SSC2@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cqhci_writel
	mov	x0, x19
	mov	w1, #0
	bl	_cqhci_set_irqs
	ldr	w8, [x23]
	orr	w1, w8, w21
	ldr	w2, [x22]
	mov	x0, x19
	bl	_cqhci_writel
	mov	w21, #1
	str	w21, [x20, #4]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	blr	x8
LBB0_4:
	bl	_wmb
Lloh25:
	adrp	x8, _CQHCI_IS_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CQHCI_IS_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cqhci_set_irqs
	str	w21, [x19, #8]
	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
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.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
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_CQHCI_CFG,4,2                  ; @CQHCI_CFG
	.comm	_CQHCI_ENABLE,4,2               ; @CQHCI_ENABLE
	.comm	_CQHCI_DCMD,4,2                 ; @CQHCI_DCMD
	.comm	_CQHCI_TASK_DESC_SZ,4,2         ; @CQHCI_TASK_DESC_SZ
	.comm	_MMC_CAP2_CQE_DCMD,4,2          ; @MMC_CAP2_CQE_DCMD
	.comm	_CQHCI_TASK_DESC_SZ_128,4,2     ; @CQHCI_TASK_DESC_SZ_128
	.comm	_CQHCI_TDLBA,4,2                ; @CQHCI_TDLBA
	.comm	_CQHCI_TDLBAU,4,2               ; @CQHCI_TDLBAU
	.comm	_CQHCI_SSC2,4,2                 ; @CQHCI_SSC2
	.comm	_CQHCI_IS_MASK,4,2              ; @CQHCI_IS_MASK
	.no_dead_strip	___cqhci_enable
.subsections_via_symbols
