	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_read_log_page
_ata_read_log_page:                     ## @ata_read_log_page
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTK
	leaq	-64(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ata_tf_init
	movq	_ATA_CMD_READ_LOG_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	%r13d, -64(%rbp)
	movl	%ebx, -60(%rbp)
	movq	_ATA_TFLAG_ISADDR@GOTPCREL(%rip), %rax
	movq	_ATA_TFLAG_LBA48@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_ATA_TFLAG_DEVICE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ebx, %eax
	shrl	$8, %eax
	movl	%eax, -56(%rbp)
	orl	%ecx, -52(%rbp)
	movq	_ATA_PROT_PIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ATA_SECT_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	movl	$0, (%rsp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	movq	%r14, %r8
	movl	%ebx, %r9d
	callq	_ata_exec_internal
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DPRINTK
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read log page - page %d\n"

	.comm	_ATA_CMD_READ_LOG_EXT,4,2       ## @ATA_CMD_READ_LOG_EXT
	.comm	_ATA_TFLAG_ISADDR,4,2           ## @ATA_TFLAG_ISADDR
	.comm	_ATA_TFLAG_LBA48,4,2            ## @ATA_TFLAG_LBA48
	.comm	_ATA_TFLAG_DEVICE,4,2           ## @ATA_TFLAG_DEVICE
	.comm	_ATA_PROT_PIO,4,2               ## @ATA_PROT_PIO
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_ATA_SECT_SIZE,4,2              ## @ATA_SECT_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"EXIT, err_mask=%x\n"

	.no_dead_strip	_ata_read_log_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_read_log_page
_ata_read_log_page:                     ; @ata_read_log_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	add	x1, sp, #8
	mov	x0, x22
	bl	_ata_tf_init
Lloh2:
	adrp	x8, _ATA_CMD_READ_LOG_EXT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATA_CMD_READ_LOG_EXT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	stp	w21, w19, [sp, #8]
Lloh5:
	adrp	x9, _ATA_TFLAG_ISADDR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATA_TFLAG_ISADDR@GOTPAGEOFF]
Lloh7:
	adrp	x10, _ATA_TFLAG_LBA48@GOTPAGE
Lloh8:
	ldr	x10, [x10, _ATA_TFLAG_LBA48@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh11:
	adrp	x10, _ATA_TFLAG_DEVICE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ATA_TFLAG_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w9, w9, w10
	ldr	w10, [sp, #20]
	orr	w9, w9, w10
	lsr	w10, w19, #8
	stp	w10, w9, [sp, #16]
Lloh14:
	adrp	x9, _ATA_PROT_PIO@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ATA_PROT_PIO@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _DMA_FROM_DEVICE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _DMA_FROM_DEVICE@GOTPAGEOFF]
	stp	w9, w8, [sp, #24]
Lloh19:
	ldr	w3, [x10]
Lloh20:
	adrp	x8, _ATA_SECT_SIZE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATA_SECT_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	mul	w5, w8, w19
	add	x1, sp, #8
	mov	x0, x22
	mov	x2, #0
	mov	x4, x20
	mov	w6, #0
	bl	_ata_exec_internal
	mov	x19, x0
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_DPRINTK
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read log page - page %d\n"

	.comm	_ATA_CMD_READ_LOG_EXT,4,2       ; @ATA_CMD_READ_LOG_EXT
	.comm	_ATA_TFLAG_ISADDR,4,2           ; @ATA_TFLAG_ISADDR
	.comm	_ATA_TFLAG_LBA48,4,2            ; @ATA_TFLAG_LBA48
	.comm	_ATA_TFLAG_DEVICE,4,2           ; @ATA_TFLAG_DEVICE
	.comm	_ATA_PROT_PIO,4,2               ; @ATA_PROT_PIO
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_ATA_SECT_SIZE,4,2              ; @ATA_SECT_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"EXIT, err_mask=%x\n"

	.no_dead_strip	_ata_read_log_page
.subsections_via_symbols
