	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function k2_sata_tf_read
_k2_sata_tf_read:                       ## @k2_sata_tf_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_k2_stat_check_status
	movl	%eax, 56(%rbx)
	movl	20(%r15), %edi
	callq	_readw
	movq	%rax, 48(%rbx)
	movl	16(%r15), %edi
	callq	_readw
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	12(%r15), %edi
	callq	_readw
	movq	%rax, %r12
	movl	8(%r15), %edi
	callq	_readw
	movq	%rax, %r13
	movl	4(%r15), %edi
	callq	_readw
	movq	%rax, %r14
	movl	(%r15), %edi
	callq	_readw
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, (%rbx)
	movl	%r12d, 4(%rbx)
	movl	%r13d, 8(%rbx)
	movl	%r14d, 12(%rbx)
	movl	%eax, 16(%rbx)
	movq	_ATA_TFLAG_LBA48@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 20(%rbx)
	je	LBB0_2
## %bb.1:
	sarl	$8, %edx
	movl	%edx, 24(%rbx)
	sarl	$8, %r12d
	movl	%r12d, 28(%rbx)
	sarl	$8, %r13d
	movl	%r13d, 32(%rbx)
	sarl	$8, %r14d
	movl	%r14d, 36(%rbx)
	sarl	$8, %eax
	movl	%eax, 40(%rbx)
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_TFLAG_LBA48,4,2            ## @ATA_TFLAG_LBA48
	.no_dead_strip	_k2_sata_tf_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function k2_sata_tf_read
_k2_sata_tf_read:                       ; @k2_sata_tf_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x24, x0
	bl	_k2_stat_check_status
	str	w0, [x19, #56]
	ldr	w0, [x24, #20]
	bl	_readw
	str	x0, [x19, #48]
	ldr	w0, [x24, #16]
	bl	_readw
	mov	x20, x0
	ldr	w0, [x24, #12]
	bl	_readw
	mov	x21, x0
	ldr	w0, [x24, #8]
	bl	_readw
	mov	x22, x0
	ldr	w0, [x24, #4]
	bl	_readw
	mov	x23, x0
	ldr	w0, [x24]
	bl	_readw
	stp	w20, w21, [x19]
	stp	w22, w23, [x19, #8]
	str	w0, [x19, #16]
	ldr	w8, [x19, #20]
Lloh0:
	adrp	x9, _ATA_TFLAG_LBA48@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_TFLAG_LBA48@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	asr	w8, w20, #8
	asr	w9, w21, #8
	stp	w8, w9, [x19, #24]
	asr	w8, w22, #8
	asr	w9, w23, #8
	stp	w8, w9, [x19, #32]
	asr	w8, w0, #8
	str	w8, [x19, #40]
LBB0_2:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_TFLAG_LBA48,4,2            ; @ATA_TFLAG_LBA48
	.no_dead_strip	_k2_sata_tf_read
.subsections_via_symbols
