	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cqhci_halt
_cqhci_halt:                            ## @cqhci_halt
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_cqhci_halted
	movl	%eax, %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jne	LBB0_3
## %bb.1:
	movq	_CQHCI_IS_HAC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cqhci_set_irqs
	movq	_CQHCI_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_cqhci_readl
	movq	_CQHCI_HALT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_cqhci_writel
	movl	(%rbx), %r12d
	movq	%rbx, %rdi
	callq	_cqhci_halted
	movl	%eax, %r13d
	movl	%r15d, %edi
	callq	_msecs_to_jiffies
	leaq	1(%rax), %rdx
	movl	%r12d, %edi
	movl	%r13d, %esi
	callq	_wait_event_timeout
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_cqhci_set_irqs
	movq	%rbx, %rdi
	callq	_cqhci_halted
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CQHCI_IS_HAC,4,2               ## @CQHCI_IS_HAC
	.comm	_CQHCI_CTL,4,2                  ## @CQHCI_CTL
	.comm	_CQHCI_HALT,4,2                 ## @CQHCI_HALT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: cqhci: Failed to halt\n"

	.no_dead_strip	_cqhci_halt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cqhci_halt
_cqhci_halt:                            ; @cqhci_halt
	.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	x21, x1
	mov	x19, x0
	ldr	x20, [x0]
	mov	x0, x20
	bl	_cqhci_halted
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _CQHCI_IS_HAC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CQHCI_IS_HAC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_cqhci_set_irqs
Lloh3:
	adrp	x22, _CQHCI_CTL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CQHCI_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_cqhci_readl
Lloh5:
	adrp	x8, _CQHCI_HALT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CQHCI_HALT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x22]
	mov	x0, x20
	bl	_cqhci_writel
	ldr	w22, [x20]
	mov	x0, x20
	bl	_cqhci_halted
	mov	x23, x0
	mov	x0, x21
	bl	_msecs_to_jiffies
	add	x2, x0, #1
	mov	x0, x22
	mov	x1, x23
	bl	_wait_event_timeout
	mov	x0, x20
	mov	w1, #0
	bl	_cqhci_set_irqs
	mov	x0, x20
	bl	_cqhci_halted
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_mmc_hostname
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	w0, #0
LBB0_4:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CQHCI_IS_HAC,4,2               ; @CQHCI_IS_HAC
	.comm	_CQHCI_CTL,4,2                  ; @CQHCI_CTL
	.comm	_CQHCI_HALT,4,2                 ; @CQHCI_HALT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: cqhci: Failed to halt\n"

	.no_dead_strip	_cqhci_halt
.subsections_via_symbols
