	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_data_readw
_ide_data_readw:                        ## @ide_data_readw
	.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
	movq	_DRQ_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movl	4(%rbx), %r15d
	shll	$8, %r15d
	orl	(%rbx), %r15d
	addq	$8, %rbx
	movq	%rbx, 8(%rdi)
	movq	_IDE_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movl	%esi, %edx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_count@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %ecx
	callq	_fprintf
	movl	(%r12), %eax
	incl	%eax
	movzbl	%al, %eax
	movl	%eax, (%r12)
LBB0_4:
	cmpq	16(%r14), %rbx
	jb	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	*24(%r14)
	jmp	LBB0_6
LBB0_1:
	xorl	%r15d, %r15d
LBB0_6:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRQ_STAT,4,2                   ## @DRQ_STAT
	.comm	_IDE_debug,8,3                  ## @IDE_debug
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data_readw: %d, %04x (count: %d)\n"

	.comm	_count,4,2                      ## @count
	.no_dead_strip	_ide_data_readw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_data_readw
_ide_data_readw:                        ; @ide_data_readw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DRQ_STAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRQ_STAT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldp	w9, w10, [x8]
	orr	w19, w9, w10, lsl #8
	add	x21, x8, #8
	str	x21, [x0, #8]
Lloh3:
	adrp	x8, _IDE_debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IDE_debug@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x2, x1
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x22, _count@GOTPAGE
Lloh10:
	ldr	x22, [x22, _count@GOTPAGEOFF]
	ldr	w4, [x22]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_fprintf
	ldr	w8, [x22]
	add	w8, w8, #1
	and	w8, w8, #0xff
	str	w8, [x22]
LBB0_3:
	ldr	x8, [x20, #16]
	cmp	x21, x8
	b.lo	LBB0_6
; %bb.4:
	ldr	x8, [x20, #24]
	mov	x0, x20
	blr	x8
	b	LBB0_6
LBB0_5:
	mov	w19, #0
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DRQ_STAT,4,2                   ; @DRQ_STAT
	.comm	_IDE_debug,8,3                  ; @IDE_debug
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data_readw: %d, %04x (count: %d)\n"

	.comm	_count,4,2                      ; @count
	.no_dead_strip	_ide_data_readw
.subsections_via_symbols
