	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_tf_set_cmd
_ide_tf_set_cmd:                        ## @ide_tf_set_cmd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rsi), %eax
	movq	_IDE_TFLAG_LBA48@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_IDE_TFLAG_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	_ATA_PROT_DMA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rsi)
	movl	$8, %edx
	jmp	LBB0_5
LBB0_2:
	movq	_ATA_PROT_PIO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rsi)
	cmpq	$0, (%rdi)
	je	LBB0_3
## %bb.4:
	movq	_IDE_TFLAG_MULTI_PIO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%eax, %edx
	movl	%edx, (%rsi)
	xorl	%edx, %edx
	jmp	LBB0_5
LBB0_3:
	movl	$4, %edx
LBB0_5:
	xorl	%edi, %edi
	testl	%eax, %ecx
	setne	%dil
	xorl	%ecx, %ecx
	testl	%eax, %r8d
	setne	%cl
	movq	_ide_rw_cmds@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rdi,%rcx,2), %rcx
	orq	%rdx, %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 4(%rsi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_TFLAG_LBA48,4,2            ## @IDE_TFLAG_LBA48
	.comm	_IDE_TFLAG_WRITE,4,2            ## @IDE_TFLAG_WRITE
	.comm	_ATA_PROT_DMA,4,2               ## @ATA_PROT_DMA
	.comm	_ATA_PROT_PIO,4,2               ## @ATA_PROT_PIO
	.comm	_IDE_TFLAG_MULTI_PIO,4,2        ## @IDE_TFLAG_MULTI_PIO
	.comm	_ide_rw_cmds,8,3                ## @ide_rw_cmds
	.no_dead_strip	_ide_tf_set_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_tf_set_cmd
_ide_tf_set_cmd:                        ; @ide_tf_set_cmd
	.cfi_startproc
; %bb.0:
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _IDE_TFLAG_LBA48@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IDE_TFLAG_LBA48@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _IDE_TFLAG_WRITE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IDE_TFLAG_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cbz	x2, LBB0_2
; %bb.1:
Lloh6:
	adrp	x11, _ATA_PROT_DMA@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ATA_PROT_DMA@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	str	w11, [x1, #8]
	mov	w11, #8
	b	LBB0_5
LBB0_2:
Lloh9:
	adrp	x11, _ATA_PROT_PIO@GOTPAGE
Lloh10:
	ldr	x11, [x11, _ATA_PROT_PIO@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	str	w11, [x1, #8]
	ldr	x11, [x0]
	cbz	x11, LBB0_4
; %bb.3:
	mov	x11, #0
Lloh12:
	adrp	x12, _IDE_TFLAG_MULTI_PIO@GOTPAGE
Lloh13:
	ldr	x12, [x12, _IDE_TFLAG_MULTI_PIO@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	orr	w12, w12, w8
	str	w12, [x1]
	b	LBB0_5
LBB0_4:
	mov	w11, #4
LBB0_5:
	tst	w10, w8
	cset	w10, ne
	tst	w9, w8
	cset	w8, ne
Lloh15:
	adrp	x9, _ide_rw_cmds@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ide_rw_cmds@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	bfi	x10, x8, #1, #1
	orr	x8, x10, x11
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x1, #4]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_TFLAG_LBA48,4,2            ; @IDE_TFLAG_LBA48
	.comm	_IDE_TFLAG_WRITE,4,2            ; @IDE_TFLAG_WRITE
	.comm	_ATA_PROT_DMA,4,2               ; @ATA_PROT_DMA
	.comm	_ATA_PROT_PIO,4,2               ; @ATA_PROT_PIO
	.comm	_IDE_TFLAG_MULTI_PIO,4,2        ; @IDE_TFLAG_MULTI_PIO
	.comm	_ide_rw_cmds,8,3                ; @ide_rw_cmds
	.no_dead_strip	_ide_tf_set_cmd
.subsections_via_symbols
