	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmio_ide_write
_mmio_ide_write:                        ## @mmio_ide_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %rbx
	andl	$15, %esi
	je	LBB0_1
## %bb.4:
	cmpl	$8, %esi
	jb	LBB0_6
## %bb.5:
	shll	$8, %edx
	movq	(%rbx), %rax
	addl	$-8, %esi
	movl	%edx, (%rax,%rsi,4)
	jmp	LBB0_9
LBB0_1:
	cmpl	$0, 16(%rbx)
	je	LBB0_10
## %bb.2:
	cmpl	$0, 8(%rbx)
	je	LBB0_3
## %bb.7:
	shll	$8, %edx
	orl	12(%rbx), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ide_data_writew
	xorl	%eax, %eax
	cmpl	$0, 8(%rbx)
	sete	%al
	jmp	LBB0_8
LBB0_6:
	movq	(%rbx), %rax
	movl	%esi, %ecx
	orl	(%rax,%rcx,4), %edx
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ide_ioport_write               ## TAILCALL
LBB0_10:
	movq	(%rbx), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ide_data_writew                ## TAILCALL
LBB0_3:
	movzbl	%dl, %eax
	movl	%eax, 12(%rbx)
	movl	$1, %eax
LBB0_8:
	movl	%eax, 8(%rbx)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mmio_ide_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmio_ide_write
_mmio_ide_write:                        ; @mmio_ide_write
	.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	w1, w1, #0xf
	b.eq	LBB0_3
; %bb.1:
	subs	w8, w1, #8
	b.lo	LBB0_6
; %bb.2:
	lsl	w9, w2, #8
	ldr	x10, [x19]
	str	w9, [x10, w8, uxtw #2]
	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]
	orr	w2, w8, w2, lsl #8
	mov	x0, x19
	mov	w1, #0
	bl	_ide_data_writew
	ldr	w8, [x19, #8]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x19, #8]
	b	LBB0_9
LBB0_6:
	ldr	x8, [x19]
	ldr	w8, [x8, w1, uxtw #2]
	orr	w2, w8, w2
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ide_ioport_write
LBB0_7:
	ldr	x8, [x19]
	ldr	w8, [x8]
	orr	w2, w8, w2
	mov	x0, x19
	mov	w1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ide_data_writew
LBB0_8:
	and	w8, w2, #0xff
	mov	w9, #1
	stp	w9, w8, [x19, #8]
LBB0_9:
	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_write
.subsections_via_symbols
