	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_read                       ## -- Begin function ide_read
	.p2align	4, 0x90
_ide_read:                              ## @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	%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
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_ide_bsy
	movq	24(%r12), %rdi
	addq	$2, %rdi
	movl	%r14d, %eax
	cltd
	idivl	(%r12)
	movl	%eax, %esi
	callq	_SetPhysByte
	movq	24(%r12), %rdi
	addq	$3, %rdi
	movl	4(%r12), %esi
	incl	%esi
	callq	_SetPhysByte
	movq	24(%r12), %rdi
	addq	$4, %rdi
	movl	8(%r12), %esi
	callq	_SetPhysByte
	movq	24(%r12), %rdi
	addq	$5, %rdi
	movl	8(%r12), %esi
	sarl	$8, %esi
	callq	_SetPhysByte
	movq	24(%r12), %rdi
	addq	$6, %rdi
	movl	$160, %esi
	orl	12(%r12), %esi
	callq	_SetPhysByte
	movq	24(%r12), %rdi
	addq	$7, %rdi
	movl	$32, %esi
	callq	_SetPhysByte
	movl	(%r12), %esi
	cmpl	$2, %esi
	jb	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rdi
	callq	_GetPhysHalf
	movw	%ax, (%r15,%rbx,2)
	incq	%rbx
	movslq	(%r12), %rsi
	movq	%rsi, %rax
	shrq	%rax
	cmpq	%rbx, %rax
	ja	LBB0_2
LBB0_3:
	addl	16(%r12), %esi
	movl	%esi, 16(%r12)
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ide_seek
	movl	%r14d, %eax
	cltd
	idivl	(%r12)
	subl	%edx, %r14d
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_read                       ; -- Begin function ide_read
	.p2align	2
_ide_read:                              ; @ide_read
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_ide_bsy
	ldr	x8, [x20, #24]
	add	x0, x8, #2
	ldr	w8, [x20]
	sdiv	w1, w19, w8
	bl	_SetPhysByte
	ldr	x8, [x20, #24]
	add	x0, x8, #3
	ldr	w8, [x20, #4]
	add	w1, w8, #1
	bl	_SetPhysByte
	ldr	x8, [x20, #24]
	add	x0, x8, #4
	ldr	w1, [x20, #8]
	bl	_SetPhysByte
	ldr	x8, [x20, #24]
	add	x0, x8, #5
	ldr	w8, [x20, #8]
	asr	w1, w8, #8
	bl	_SetPhysByte
	ldr	x8, [x20, #24]
	add	x0, x8, #6
	ldr	w8, [x20, #12]
	mov	w9, #160
	orr	w1, w8, w9
	bl	_SetPhysByte
	ldr	x8, [x20, #24]
	add	x0, x8, #7
	mov	w1, #32
	bl	_SetPhysByte
	ldr	w8, [x20]
	cmp	w8, #2
	b.lo	LBB0_3
; %bb.1:
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, #24]
	bl	_GetPhysHalf
	strh	w0, [x21, x22, lsl #1]
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8, lsr #1
	b.lo	LBB0_2
LBB0_3:
	ldr	w9, [x20, #16]
	add	w1, w9, w8
	str	w1, [x20, #16]
	mov	x0, x20
	bl	_ide_seek
	ldr	w8, [x20]
	sdiv	w9, w19, w8
	mul	w0, w9, w8
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
