	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_tf_read_block              ## -- Begin function ata_tf_read_block
	.p2align	4, 0x90
_ata_tf_read_block:                     ## @ata_tf_read_block
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	movq	_ATA_TFLAG_LBA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movq	_ATA_TFLAG_LBA48@GOTPCREL(%rip), %rdx
                                        ## implicit-def: $ecx
	testl	%eax, (%rdx)
	jne	LBB0_3
## %bb.2:
	movl	4(%rdi), %ecx
	andl	$15, %ecx
	shll	$24, %ecx
LBB0_3:
	movl	8(%rdi), %edx
	movl	12(%rdi), %eax
	shll	$16, %edx
	orl	%ecx, %edx
	shll	$8, %eax
	orl	%edx, %eax
	orl	16(%rdi), %eax
	jmp	LBB0_7
LBB0_4:
	movq	%rsi, %r14
	movl	8(%rdi), %ebx
	shll	$8, %ebx
	orl	12(%rdi), %ebx
	movl	4(%rdi), %r15d
	andl	$15, %r15d
	movl	16(%rdi), %eax
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_KERN_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_ata_dev_printk
	movl	$1, %eax
LBB0_6:
	imull	(%r14), %ebx
	addl	%r15d, %ebx
	imull	4(%r14), %ebx
	addl	%ebx, %eax
	decl	%eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_TFLAG_LBA,4,2              ## @ATA_TFLAG_LBA
	.comm	_ATA_TFLAG_LBA48,4,2            ## @ATA_TFLAG_LBA48
	.comm	_KERN_WARNING,4,2               ## @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device reported invalid CHS sector 0\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_tf_read_block              ; -- Begin function ata_tf_read_block
	.p2align	2
_ata_tf_read_block:                     ; @ata_tf_read_block
	.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, _ATA_TFLAG_LBA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_TFLAG_LBA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _ATA_TFLAG_LBA48@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATA_TFLAG_LBA48@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x9]
                                        ; implicit-def: $w9
	tst	w10, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x0, #4]
	ubfiz	w9, w8, #24, #4
LBB0_3:
	ldp	w8, w10, [x0, #8]
	orr	w8, w9, w8, lsl #16
	orr	w8, w8, w10, lsl #8
	ldr	w9, [x0, #16]
	orr	w0, w8, w9
	b	LBB0_7
LBB0_4:
	mov	x19, x1
	ldp	w10, w9, [x0, #4]
	ldp	w11, w8, [x0, #12]
	orr	w20, w11, w9, lsl #8
	and	w21, w10, #0xf
	cbnz	w8, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _KERN_WARNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KERN_WARNING@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ata_dev_printk
	mov	w8, #1
LBB0_6:
	ldp	w9, w10, [x19]
	madd	w9, w9, w20, w21
	madd	w8, w9, w10, w8
	sub	w0, w8, #1
LBB0_7:
	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	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_TFLAG_LBA,4,2              ; @ATA_TFLAG_LBA
	.comm	_ATA_TFLAG_LBA48,4,2            ; @ATA_TFLAG_LBA48
	.comm	_KERN_WARNING,4,2               ; @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device reported invalid CHS sector 0\n"

.subsections_via_symbols
