	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_dev_set_xfermode
_ata_dev_set_xfermode:                  ## @ata_dev_set_xfermode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DPRINTK
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ata_tf_init
	movq	_ATA_CMD_SET_FEATURES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	_ATA_TFLAG_ISADDR@GOTPCREL(%rip), %rax
	movq	_ATA_TFLAG_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_ATA_TFLAG_POLLING@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_SETFEATURES_XFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	orl	%ecx, -40(%rbp)
	movq	_ATA_PROT_NODATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	%rbx, %rdi
	callq	_ata_pio_need_iordy
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %ecx
	jmp	LBB0_3
LBB0_2:
	movl	4(%rbx), %edi
	callq	_ata_id_has_iordy
	movl	$1, %ecx
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movl	%ecx, -36(%rbp)
	movq	_DMA_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, (%rsp)
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_ata_exec_internal
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DPRINTK
LBB0_4:
	movl	%r14d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set features - xfer mode\n"

	.comm	_ATA_CMD_SET_FEATURES,4,2       ## @ATA_CMD_SET_FEATURES
	.comm	_SETFEATURES_XFER,4,2           ## @SETFEATURES_XFER
	.comm	_ATA_TFLAG_ISADDR,4,2           ## @ATA_TFLAG_ISADDR
	.comm	_ATA_TFLAG_DEVICE,4,2           ## @ATA_TFLAG_DEVICE
	.comm	_ATA_TFLAG_POLLING,4,2          ## @ATA_TFLAG_POLLING
	.comm	_ATA_PROT_NODATA,4,2            ## @ATA_PROT_NODATA
	.comm	_DMA_NONE,4,2                   ## @DMA_NONE
L_.str.1:                               ## @.str.1
	.asciz	"EXIT, err_mask=%x\n"

	.no_dead_strip	_ata_dev_set_xfermode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_dev_set_xfermode
_ata_dev_set_xfermode:                  ; @ata_dev_set_xfermode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	add	x1, sp, #8
	mov	x0, x19
	bl	_ata_tf_init
Lloh2:
	adrp	x8, _ATA_CMD_SET_FEATURES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATA_CMD_SET_FEATURES@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SETFEATURES_XFER@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SETFEATURES_XFER@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #20]
Lloh8:
	adrp	x8, _ATA_TFLAG_ISADDR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATA_TFLAG_ISADDR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ATA_TFLAG_DEVICE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATA_TFLAG_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _ATA_TFLAG_POLLING@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ATA_TFLAG_POLLING@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #8]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _ATA_PROT_NODATA@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ATA_PROT_NODATA@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	str	w8, [sp, #8]
	str	w9, [sp, #16]
	mov	x0, x19
	bl	_ata_pio_need_iordy
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	b	LBB0_4
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_ata_id_has_iordy
	cbz	x0, LBB0_6
; %bb.3:
	mov	w8, #1
LBB0_4:
	str	w8, [sp, #12]
Lloh20:
	adrp	x8, _DMA_NONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DMA_NONE@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, #0
	mov	x4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_ata_exec_internal
	mov	x19, x0
	str	x19, [sp]
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTK
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	mov	w19, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set features - xfer mode\n"

	.comm	_ATA_CMD_SET_FEATURES,4,2       ; @ATA_CMD_SET_FEATURES
	.comm	_SETFEATURES_XFER,4,2           ; @SETFEATURES_XFER
	.comm	_ATA_TFLAG_ISADDR,4,2           ; @ATA_TFLAG_ISADDR
	.comm	_ATA_TFLAG_DEVICE,4,2           ; @ATA_TFLAG_DEVICE
	.comm	_ATA_TFLAG_POLLING,4,2          ; @ATA_TFLAG_POLLING
	.comm	_ATA_PROT_NODATA,4,2            ; @ATA_PROT_NODATA
	.comm	_DMA_NONE,4,2                   ; @DMA_NONE
l_.str.1:                               ; @.str.1
	.asciz	"EXIT, err_mask=%x\n"

	.no_dead_strip	_ata_dev_set_xfermode
.subsections_via_symbols
