	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_dbdma_status
_ata_dbdma_status:                      ## @ata_dbdma_status
	.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
	movl	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_device_get_softc
	movq	%rax, %r14
	movq	_ATA_DMA_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	callq	_dbdma_get_chan_status
	movl	%eax, %ecx
	movq	_DBDMA_STATUS_ACTIVE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	sete	%al
	jmp	LBB0_5
LBB0_2:
	movq	_ATA_ALTSTAT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ATA_IDX_INB
	movq	_ATA_S_BUSY@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.3:
	movl	$100, %edi
	callq	_DELAY
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ATA_IDX_INB
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, (%r15)
	jne	LBB0_5
LBB0_4:
	movl	$1, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_DMA_ACTIVE,4,2             ## @ATA_DMA_ACTIVE
	.comm	_DBDMA_STATUS_ACTIVE,4,2        ## @DBDMA_STATUS_ACTIVE
	.comm	_ATA_ALTSTAT,4,2                ## @ATA_ALTSTAT
	.comm	_ATA_S_BUSY,4,2                 ## @ATA_S_BUSY
	.no_dead_strip	_ata_dbdma_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_dbdma_status
_ata_dbdma_status:                      ; @ata_dbdma_status
	.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
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	mov	x0, x19
	bl	_device_get_softc
	ldr	w8, [x20, #4]
Lloh0:
	adrp	x9, _ATA_DMA_ACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_DMA_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_dbdma_get_chan_status
Lloh3:
	adrp	x8, _DBDMA_STATUS_ACTIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DBDMA_STATUS_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
	b	LBB0_6
LBB0_2:
	mov	x19, x0
Lloh6:
	adrp	x20, _ATA_ALTSTAT@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ATA_ALTSTAT@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_ATA_IDX_INB
Lloh8:
	adrp	x21, _ATA_S_BUSY@GOTPAGE
Lloh9:
	ldr	x21, [x21, _ATA_S_BUSY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.3:
	mov	w0, #100
	bl	_DELAY
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ATA_IDX_INB
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_DMA_ACTIVE,4,2             ; @ATA_DMA_ACTIVE
	.comm	_DBDMA_STATUS_ACTIVE,4,2        ; @DBDMA_STATUS_ACTIVE
	.comm	_ATA_ALTSTAT,4,2                ; @ATA_ALTSTAT
	.comm	_ATA_S_BUSY,4,2                 ; @ATA_S_BUSY
	.no_dead_strip	_ata_dbdma_status
.subsections_via_symbols
