	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_error_cmd
_ide_error_cmd:                         ## @ide_error_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_FS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.1:
	movl	4(%rsi), %edx
	movl	8(%rsi), %r8d
	subl	%r8d, %edx
	movq	16(%rsi), %rsi
	movq	_ATA_PROT_PIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jne	LBB0_7
## %bb.2:
	movq	_IDE_TFLAG_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	testl	%r8d, %r8d
	jne	LBB0_7
LBB0_4:
	movq	_IDE_TFLAG_MULTI_PIO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movl	(%rdi), %eax
	shll	$9, %eax
	subl	%eax, %edx
LBB0_7:
	testl	%edx, %edx
	jle	LBB0_8
LBB0_9:
	xorl	%esi, %esi
	popq	%rbp
	jmp	_ide_complete_rq                ## TAILCALL
LBB0_6:
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rax
	subl	(%rax), %edx
	testl	%edx, %edx
	jg	LBB0_9
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_TFLAG_FS,4,2               ## @IDE_TFLAG_FS
	.comm	_ATA_PROT_PIO,8,3               ## @ATA_PROT_PIO
	.comm	_IDE_TFLAG_WRITE,4,2            ## @IDE_TFLAG_WRITE
	.comm	_IDE_TFLAG_MULTI_PIO,4,2        ## @IDE_TFLAG_MULTI_PIO
	.comm	_SECTOR_SIZE,8,3                ## @SECTOR_SIZE
	.no_dead_strip	_ide_error_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_error_cmd
_ide_error_cmd:                         ; @ide_error_cmd
	.cfi_startproc
; %bb.0:
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _IDE_TFLAG_FS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IDE_TFLAG_FS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
	ldp	w10, w9, [x1, #4]
	sub	w2, w10, w9
	ldr	x10, [x1, #16]
Lloh3:
	adrp	x11, _ATA_PROT_PIO@GOTPAGE
Lloh4:
	ldr	x11, [x11, _ATA_PROT_PIO@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_5
; %bb.2:
Lloh6:
	adrp	x10, _IDE_TFLAG_WRITE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IDE_TFLAG_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	and	w10, w10, w8
	cmp	w10, #0
	ccmp	w9, #0, #4, eq
	b.ne	LBB0_5
; %bb.3:
Lloh9:
	adrp	x9, _IDE_TFLAG_MULTI_PIO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IDE_TFLAG_MULTI_PIO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	ldr	w8, [x0]
	sub	w2, w2, w8, lsl #9
LBB0_5:
	cmp	w2, #1
	b.lt	LBB0_8
LBB0_6:
	mov	w1, #0
	b	_ide_complete_rq
LBB0_7:
Lloh12:
	adrp	x8, _SECTOR_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SECTOR_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	sub	w2, w2, w8
	cmp	w2, #1
	b.ge	LBB0_6
LBB0_8:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_TFLAG_FS,4,2               ; @IDE_TFLAG_FS
	.comm	_ATA_PROT_PIO,8,3               ; @ATA_PROT_PIO
	.comm	_IDE_TFLAG_WRITE,4,2            ; @IDE_TFLAG_WRITE
	.comm	_IDE_TFLAG_MULTI_PIO,4,2        ; @IDE_TFLAG_MULTI_PIO
	.comm	_SECTOR_SIZE,8,3                ; @SECTOR_SIZE
	.no_dead_strip	_ide_error_cmd
.subsections_via_symbols
