	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_output_data                ## -- Begin function ide_output_data
	.p2align	4, 0x90
_ide_output_data:                       ## @ide_output_data
	.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
	movq	_disk_present@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_6
## %bb.1:
	movl	%edx, %ebx
	movq	%rsi, %r15
	movl	%edi, %r14d
	callq	_device_select
	shll	$2, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_dma_start_write
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movl	%r14d, %edi
	callq	_wait_dma_not_busy
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_3:
	movl	%r14d, %edi
	movl	$30, %esi
	callq	_wait_not_busy
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_5:
	movl	%r14d, %edi
	callq	_wait_no_error
	testl	%eax, %eax
	je	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_puts                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_disk_present,8,3               ## @disk_present
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timed out of wait for DMA channel for SATA device %d to have in-progress clear\n"

L_.str.1:                               ## @.str.1
	.asciz	"Timed out of wait for SATA device %d to have BUSY clear\n"

L_str:                                  ## @str
	.asciz	"oxnas_sata_output_data() Wait for ATA no-error timed-out"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_output_data                ; -- Begin function ide_output_data
	.p2align	2
_ide_output_data:                       ; @ide_output_data
	.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
Lloh0:
	adrp	x8, _disk_present@GOTPAGE
Lloh1:
	ldr	x8, [x8, _disk_present@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8, w0, sxtw #2]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_device_select
	lsl	w1, w21, #2
	mov	x0, x20
	bl	_dma_start_write
	mov	w0, #1000
	bl	_udelay
	mov	x0, x19
	bl	_wait_dma_not_busy
	cbnz	w0, LBB0_3
; %bb.2:
	str	x19, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
LBB0_3:
	mov	x0, x19
	mov	w1, #30
	bl	_wait_not_busy
	cbz	x0, LBB0_5
; %bb.4:
	mov	x8, x19
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
LBB0_5:
	mov	x0, x19
	bl	_wait_no_error
	cbz	w0, LBB0_7
LBB0_6:
	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
LBB0_7:
Lloh7:
	adrp	x0, l_str@PAGE
Lloh8:
	add	x0, x0, l_str@PAGEOFF
	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
	b	_puts
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_disk_present,8,3               ; @disk_present
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timed out of wait for DMA channel for SATA device %d to have in-progress clear\n"

l_.str.1:                               ; @.str.1
	.asciz	"Timed out of wait for SATA device %d to have BUSY clear\n"

l_str:                                  ; @str
	.asciz	"oxnas_sata_output_data() Wait for ATA no-error timed-out"

.subsections_via_symbols
