	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_eh_read_log_10h
_ata_eh_read_log_10h:                   ## @ata_eh_read_log_10h
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	_ATA_LOG_SATA_NCQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_ata_read_log_page
	testl	%eax, %eax
	je	LBB0_1
## %bb.17:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_1:
	movq	_ATA_SECT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.2:
	cmpl	$8, %eax
	jae	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_12
LBB0_4:
	movl	%eax, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rsi
	movq	%rsi, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %ecx
	andl	$3, %ecx
	cmpq	$24, %rsi
	jae	LBB0_6
## %bb.5:
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	jmp	LBB0_8
LBB0_6:
	andq	$-4, %rdi
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rbx,%rsi,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%rbx,%rsi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	32(%rbx,%rsi,4), %xmm1
	movdqu	48(%rbx,%rsi,4), %xmm3
	movdqu	64(%rbx,%rsi,4), %xmm4
	paddd	%xmm1, %xmm4
	paddd	%xmm2, %xmm4
	movdqu	80(%rbx,%rsi,4), %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm0, %xmm2
	movdqu	96(%rbx,%rsi,4), %xmm0
	paddd	%xmm4, %xmm0
	movdqu	112(%rbx,%rsi,4), %xmm1
	paddd	%xmm2, %xmm1
	addq	$32, %rsi
	addq	$-4, %rdi
	jne	LBB0_7
LBB0_8:
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.9:
	leaq	(%rbx,%rsi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rsi,%rdi), %xmm2
	paddd	%xmm2, %xmm0
	movdqu	(%rsi,%rdi), %xmm2
	paddd	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %rcx
	jne	LBB0_10
LBB0_11:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	cmpq	%rax, %rdx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rbx,%rdx,4), %ecx
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_12
LBB0_13:
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.14:
	movq	_KERN_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_ata_dev_printk
LBB0_15:
	movl	(%rbx), %eax
	testb	$-128, %al
	jne	LBB0_16
## %bb.19:
	andl	$31, %eax
	movl	%eax, (%r15)
	movl	8(%rbx), %eax
	movl	%eax, (%r14)
	movl	12(%rbx), %eax
	movl	%eax, 4(%r14)
	movl	16(%rbx), %eax
	movl	%eax, 8(%r14)
	movl	20(%rbx), %eax
	movl	%eax, 12(%r14)
	movl	24(%rbx), %eax
	movl	%eax, 16(%r14)
	movl	28(%rbx), %eax
	movl	%eax, 20(%r14)
	movl	32(%rbx), %eax
	movl	%eax, 24(%r14)
	movl	36(%rbx), %eax
	movl	%eax, 28(%r14)
	movl	40(%rbx), %eax
	movl	%eax, 32(%r14)
	movl	48(%rbx), %eax
	movl	%eax, 36(%r14)
	movl	52(%rbx), %eax
	movl	%eax, 40(%r14)
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_16:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_18:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_LOG_SATA_NCQ,4,2           ## @ATA_LOG_SATA_NCQ
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ATA_SECT_SIZE,4,2              ## @ATA_SECT_SIZE
	.comm	_KERN_WARNING,4,2               ## @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid checksum 0x%x on log page 10h\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_ata_eh_read_log_10h
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_eh_read_log_10h
_ata_eh_read_log_10h:                   ; @ata_eh_read_log_10h
	.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	x22, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x20, [x8]
Lloh0:
	adrp	x8, _ATA_LOG_SATA_NCQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_LOG_SATA_NCQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x20
	mov	w3, #1
	bl	_ata_read_log_page
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_15
LBB0_2:
Lloh5:
	adrp	x8, _ATA_SECT_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATA_SECT_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.3:
	cmp	w8, #16
	b.hs	LBB0_5
; %bb.4:
	mov	x9, #0
	mov	w3, #0
	b	LBB0_8
LBB0_5:
	and	x9, x8, #0xfffffff0
	add	x10, x20, #32
	movi.2d	v0, #0000000000000000
	mov	x11, x9
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x10, #-32]
	ldp	q6, q7, [x10], #64
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	subs	x11, x11, #16
	b.ne	LBB0_6
; %bb.7:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w3, s0
	cmp	x9, x8
	b.eq	LBB0_10
LBB0_8:
	add	x10, x20, x9, lsl #2
	sub	x8, x8, x9
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x10], #4
	add	w3, w9, w3
	subs	x8, x8, #1
	b.ne	LBB0_9
LBB0_10:
	cbz	w3, LBB0_12
; %bb.11:
Lloh8:
	adrp	x8, _KERN_WARNING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KERN_WARNING@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	bl	_ata_dev_printk
LBB0_12:
	ldr	w8, [x20]
	tbnz	w8, #7, LBB0_14
; %bb.13:
	mov	w0, #0
	and	w8, w8, #0x1f
	str	w8, [x21]
	ldr	w8, [x20, #8]
	str	w8, [x19]
	ldr	w8, [x20, #12]
	str	w8, [x19, #4]
	ldr	w8, [x20, #16]
	str	w8, [x19, #8]
	ldr	w8, [x20, #20]
	str	w8, [x19, #12]
	ldr	w8, [x20, #24]
	str	w8, [x19, #16]
	ldr	w8, [x20, #28]
	str	w8, [x19, #20]
	ldr	w8, [x20, #32]
	str	w8, [x19, #24]
	ldr	w8, [x20, #36]
	str	w8, [x19, #28]
	ldr	w8, [x20, #40]
	str	w8, [x19, #32]
	ldr	w8, [x20, #48]
	str	w8, [x19, #36]
	ldr	w8, [x20, #52]
	str	w8, [x19, #40]
	b	LBB0_16
LBB0_14:
Lloh13:
	adrp	x8, _ENOENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_LOG_SATA_NCQ,4,2           ; @ATA_LOG_SATA_NCQ
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ATA_SECT_SIZE,4,2              ; @ATA_SECT_SIZE
	.comm	_KERN_WARNING,4,2               ; @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid checksum 0x%x on log page 10h\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_ata_eh_read_log_10h
.subsections_via_symbols
