	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd648_bmdma_stop
_cmd648_bmdma_stop:                     ## @cmd648_bmdma_stop
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	cmpq	$0, (%rbx)
	movq	_ARTTIM23_INTR_CH1@GOTPCREL(%rip), %rcx
	cmoveq	_CFR_INTR_CH0@GOTPCREL(%rip), %rcx
	movq	%rax, %r14
	movl	(%rcx), %ebx
	movq	_ARTTIM2@GOTPCREL(%rip), %rax
	cmoveq	_CFR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_ata_bmdma_stop
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_pci_read_config_byte
	orl	-36(%rbp), %ebx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_pci_write_config_byte
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARTTIM23_INTR_CH1,4,2          ## @ARTTIM23_INTR_CH1
	.comm	_CFR_INTR_CH0,4,2               ## @CFR_INTR_CH0
	.comm	_ARTTIM2,4,2                    ## @ARTTIM2
	.comm	_CFR,4,2                        ## @CFR
	.no_dead_strip	_cmd648_bmdma_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd648_bmdma_stop
_cmd648_bmdma_stop:                     ; @cmd648_bmdma_stop
	.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	x21, [x0]
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x20, x0
Lloh0:
	adrp	x8, _ARTTIM23_INTR_CH1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARTTIM23_INTR_CH1@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh2:
	adrp	x10, _CFR_INTR_CH0@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CFR_INTR_CH0@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w22, [x8]
Lloh4:
	adrp	x8, _ARTTIM2@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ARTTIM2@GOTPAGEOFF]
Lloh6:
	adrp	x9, _CFR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CFR@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w21, [x8]
	mov	x0, x19
	bl	_ata_bmdma_stop
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	orr	w2, w8, w22
	mov	x0, x20
	mov	x1, x21
	bl	_pci_write_config_byte
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ARTTIM23_INTR_CH1,4,2          ; @ARTTIM23_INTR_CH1
	.comm	_CFR_INTR_CH0,4,2               ; @CFR_INTR_CH0
	.comm	_ARTTIM2,4,2                    ; @ARTTIM2
	.comm	_CFR,4,2                        ; @CFR
	.no_dead_strip	_cmd648_bmdma_stop
.subsections_via_symbols
