	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd646_1_dma_end
_cmd646_1_dma_end:                      ## @cmd646_1_dma_end
	.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), %r14
	movq	_ATA_DMA_STATUS@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%r14), %rdi
	callq	_inb
	movl	%eax, %ebx
	movq	_ATA_DMA_CMD@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r14), %rdi
	callq	_inb
	andl	$-2, %eax
	movq	(%r12), %rsi
	addq	(%r14), %rsi
	movl	%eax, %edi
	callq	_outb
	movl	%ebx, %edi
	orl	$6, %edi
	movq	(%r15), %rsi
	addq	(%r14), %rsi
	callq	_outb
	andl	$7, %ebx
	xorl	%eax, %eax
	cmpl	$4, %ebx
	setne	%al
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_DMA_STATUS,8,3             ## @ATA_DMA_STATUS
	.comm	_ATA_DMA_CMD,8,3                ## @ATA_DMA_CMD
	.no_dead_strip	_cmd646_1_dma_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd646_1_dma_end
_cmd646_1_dma_end:                      ; @cmd646_1_dma_end
	.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
	ldr	x20, [x0]
	ldr	x8, [x20]
Lloh0:
	adrp	x21, _ATA_DMA_STATUS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ATA_DMA_STATUS@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_inb
	mov	x19, x0
	ldr	x8, [x20]
Lloh2:
	adrp	x22, _ATA_DMA_CMD@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ATA_DMA_CMD@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_inb
	and	w0, w0, #0xfffffffe
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outb
	orr	w0, w19, #0x6
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
	and	w8, w19, #0x7
	cmp	w8, #4
	cset	w0, ne
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_DMA_STATUS,8,3             ; @ATA_DMA_STATUS
	.comm	_ATA_DMA_CMD,8,3                ; @ATA_DMA_CMD
	.no_dead_strip	_cmd646_1_dma_end
.subsections_via_symbols
