	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_ioport_write
_ide_ioport_write:                      ## @ide_ioport_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_IDE_debug@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_2:
	andl	$7, %ebx
	cmpl	$7, %ebx
	jne	LBB0_3
LBB0_11:
	cmpq	$0, (%r12)
	je	LBB0_13
## %bb.12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_13:
	movq	%r15, %rdi
	callq	_ide_transfer_stop
	movq	%r15, %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ide_command                    ## TAILCALL
LBB0_3:
	movq	_BUSY_STAT@GOTPCREL(%rip), %rax
	movq	_DRQ_STAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%r15)
	je	LBB0_4
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	$6, %ebx
	ja	LBB0_11
## %bb.5:
	movl	%ebx, %eax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_14:
	movq	%r15, %rdi
	callq	_ide_clear_hob
	movl	8(%r15), %eax
	movl	%eax, 4(%r15)
	movl	%r14d, 8(%r15)
	jmp	LBB0_15
LBB0_6:
	movq	%r15, %rdi
	callq	_ide_clear_hob
	movl	16(%r15), %eax
	movl	%eax, 12(%r15)
	movl	%r14d, 16(%r15)
	jmp	LBB0_15
LBB0_7:
	movq	%r15, %rdi
	callq	_ide_clear_hob
	movl	24(%r15), %eax
	movl	%eax, 20(%r15)
	movl	%r14d, 24(%r15)
	jmp	LBB0_15
LBB0_8:
	movq	%r15, %rdi
	callq	_ide_clear_hob
	movl	32(%r15), %eax
	movl	%eax, 28(%r15)
	movl	%r14d, 32(%r15)
	jmp	LBB0_15
LBB0_9:
	movq	%r15, %rdi
	callq	_ide_clear_hob
	movl	40(%r15), %eax
	movl	%eax, 36(%r15)
	movl	%r14d, 40(%r15)
	jmp	LBB0_15
LBB0_10:
	movl	%r14d, %eax
	andl	$-177, %eax
	orl	$160, %eax
	movl	%eax, 44(%r15)
	shrl	$4, %r14d
	andl	$1, %r14d
	movl	%r14d, 48(%r15)
	jmp	LBB0_15
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_14
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_IDE_debug,8,3                  ## @IDE_debug
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ide: put: addr: %04x, byte: %02x\n"

	.comm	_BUSY_STAT,4,2                  ## @BUSY_STAT
	.comm	_DRQ_STAT,4,2                   ## @DRQ_STAT
L_.str.1:                               ## @.str.1
	.asciz	"\tIDE: CMD=%02x\n"

	.no_dead_strip	_ide_ioport_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_ioport_write
_ide_ioport_write:                      ; @ide_ioport_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _IDE_debug@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IDE_debug@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_fprintf
LBB0_2:
	and	w8, w21, #0x7
	cmp	w8, #7
	b.ne	LBB0_6
LBB0_3:
	ldr	x8, [x22]
	cbz	x8, LBB0_5
; %bb.4:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_fprintf
LBB0_5:
	mov	x0, x20
	bl	_ide_transfer_stop
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ide_command
LBB0_6:
	ldr	w9, [x20]
Lloh12:
	adrp	x10, _BUSY_STAT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _BUSY_STAT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
Lloh15:
	adrp	x11, _DRQ_STAT@GOTPAGE
Lloh16:
	ldr	x11, [x11, _DRQ_STAT@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w10, w9
	b.eq	LBB0_8
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	cmp	w8, #6
	b.hi	LBB0_3
; %bb.9:
Lloh18:
	adrp	x9, lJTI0_0@PAGE
Lloh19:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
	mov	x0, x20
	bl	_ide_clear_hob
	ldr	w8, [x20, #8]
	stp	w8, w19, [x20, #4]
	b	LBB0_7
LBB0_11:
	mov	x0, x20
	bl	_ide_clear_hob
	ldr	w8, [x20, #16]
	stp	w8, w19, [x20, #12]
	b	LBB0_7
LBB0_12:
	mov	x0, x20
	bl	_ide_clear_hob
	ldr	w8, [x20, #24]
	stp	w8, w19, [x20, #20]
	b	LBB0_7
LBB0_13:
	mov	x0, x20
	bl	_ide_clear_hob
	ldr	w8, [x20, #32]
	stp	w8, w19, [x20, #28]
	b	LBB0_7
LBB0_14:
	mov	x0, x20
	bl	_ide_clear_hob
	ldr	w8, [x20, #40]
	stp	w8, w19, [x20, #36]
	b	LBB0_7
LBB0_15:
	and	w8, w19, #0xffffffcf
	mov	w9, #160
	orr	w8, w8, w9
	ubfx	w9, w19, #4, #1
	stp	w8, w9, [x20, #44]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_15-LBB0_7)>>2
                                        ; -- End function
	.comm	_IDE_debug,8,3                  ; @IDE_debug
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ide: put: addr: %04x, byte: %02x\n"

	.comm	_BUSY_STAT,4,2                  ; @BUSY_STAT
	.comm	_DRQ_STAT,4,2                   ; @DRQ_STAT
l_.str.1:                               ; @.str.1
	.asciz	"\tIDE: CMD=%02x\n"

	.no_dead_strip	_ide_ioport_write
.subsections_via_symbols
