	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmio_ide_read
_mmio_ide_read:                         ## @mmio_ide_read
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	andl	$15, %ebx
	je	LBB0_3
## %bb.1:
	cmpl	$8, %ebx
	jb	LBB0_6
## %bb.2:
	movq	(%r14), %rax
	addl	$-8, %ebx
	movl	(%rax,%rbx,4), %eax
	sarl	$8, %eax
	jmp	LBB0_10
LBB0_3:
	cmpl	$0, 16(%r14)
	je	LBB0_7
## %bb.4:
	cmpl	$0, 8(%r14)
	je	LBB0_8
## %bb.5:
	movl	12(%r14), %eax
	sarl	$8, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_6:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ide_ioport_read
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	andl	$65280, %ecx                    ## imm = 0xFF00
	movq	(%r14), %rdx
	movl	%ebx, %esi
	movl	%ecx, (%rdx,%rsi,4)
	jmp	LBB0_10
LBB0_7:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ide_data_readw
	movl	%eax, %ecx
	andl	$65280, %ecx                    ## imm = 0xFF00
	movq	(%r14), %rdx
	movl	%ecx, (%rdx)
	jmp	LBB0_10
LBB0_8:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ide_data_readw
	movl	%eax, 12(%r14)
	movzbl	%al, %eax
	xorl	%ecx, %ecx
	cmpl	$0, 8(%r14)
	sete	%cl
LBB0_9:
	movl	%ecx, 8(%r14)
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mmio_ide_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmio_ide_read
_mmio_ide_read:                         ; @mmio_ide_read
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ands	w20, w1, #0xf
	b.eq	LBB0_3
; %bb.1:
	subs	w8, w20, #8
	b.lo	LBB0_6
; %bb.2:
	ldr	x9, [x19]
	ldr	w8, [x9, w8, uxtw #2]
	asr	w0, w8, #8
	b	LBB0_9
LBB0_3:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_7
; %bb.4:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_8
; %bb.5:
	ldr	w8, [x19, #12]
	asr	w0, w8, #8
	str	wzr, [x19, #8]
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_ide_ioport_read
                                        ; kill: def $w0 killed $w0 def $x0
	and	w8, w0, #0xff00
	ldr	x9, [x19]
	str	w8, [x9, w20, uxtw #2]
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_ide_data_readw
	and	w8, w0, #0xff00
	ldr	x9, [x19]
	str	w8, [x9]
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	mov	w1, #0
	bl	_ide_data_readw
	mov	x8, x0
	and	w0, w8, #0xff
	ldr	w9, [x19, #8]
	cmp	w9, #0
	cset	w9, eq
	stp	w9, w8, [x19, #8]
LBB0_9:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mmio_ide_read
.subsections_via_symbols
