	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipath_ht_init_hwerrors
_ipath_ht_init_hwerrors:                ## @ipath_ht_init_hwerrors
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movl	(%rax), %esi
	callq	_ipath_read_kreg64
	movl	%eax, %ebx
	movq	_INFINIPATH_EXTS_MEMBIST_ENDTEST@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_ipath_dev_err
LBB0_2:
	movq	_INFINIPATH_EXTS_MEMBIST_CORRECT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_ipath_dbg
LBB0_4:
	movq	%r14, %rdi
	callq	_ipath_check_htlink
	movq	_IPATH_8BIT_IN_HT0@GOTPCREL(%rip), %rax
	movl	(%r14), %ecx
	movl	(%rax), %edx
	andl	%ecx, %edx
	movq	_infinipath_hwe_htclnkabyte1crcerr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	xorl	%eax, %eax
	cmpl	$1, %edx
	movl	$0, %edi
	sbbl	%edi, %edi
	orl	%esi, %edi
	movq	_IPATH_8BIT_IN_HT1@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movq	_infinipath_hwe_htclnkbbyte1crcerr@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	cmpl	$1, %ecx
	sbbl	%eax, %eax
	orl	%edx, %eax
	movq	_INFINIPATH_HWE_SERDESPLLFAILED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_INFINIPATH_HWE_RXDSYNCMEMPARITYERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%edx, %ecx
	movq	_INFINIPATH_HWE_HTCMISCERR4@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movl	4(%r14), %esi
	andl	%edi, %eax
	notl	%ecx
	andl	%eax, %ecx
	cmpl	$9, %esi
	je	LBB0_6
## %bb.5:
	cmpl	$4, %esi
	jne	LBB0_7
LBB0_6:
	notl	%edx
	andl	%edx, %ecx
LBB0_7:
	movl	%ecx, 8(%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INFINIPATH_EXTS_MEMBIST_ENDTEST,4,2 ## @INFINIPATH_EXTS_MEMBIST_ENDTEST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MemBIST did not complete!\n"

	.comm	_INFINIPATH_EXTS_MEMBIST_CORRECT,4,2 ## @INFINIPATH_EXTS_MEMBIST_CORRECT
L_.str.1:                               ## @.str.1
	.asciz	"MemBIST corrected\n"

	.comm	_IPATH_8BIT_IN_HT0,4,2          ## @IPATH_8BIT_IN_HT0
	.comm	_infinipath_hwe_htclnkabyte1crcerr,4,2 ## @infinipath_hwe_htclnkabyte1crcerr
	.comm	_IPATH_8BIT_IN_HT1,4,2          ## @IPATH_8BIT_IN_HT1
	.comm	_infinipath_hwe_htclnkbbyte1crcerr,4,2 ## @infinipath_hwe_htclnkbbyte1crcerr
	.comm	_INFINIPATH_HWE_SERDESPLLFAILED,4,2 ## @INFINIPATH_HWE_SERDESPLLFAILED
	.comm	_INFINIPATH_HWE_RXDSYNCMEMPARITYERR,4,2 ## @INFINIPATH_HWE_RXDSYNCMEMPARITYERR
	.comm	_INFINIPATH_HWE_HTCMISCERR4,4,2 ## @INFINIPATH_HWE_HTCMISCERR4
	.no_dead_strip	_ipath_ht_init_hwerrors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipath_ht_init_hwerrors
_ipath_ht_init_hwerrors:                ; @ipath_ht_init_hwerrors
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w1, [x8]
	bl	_ipath_read_kreg64
	mov	x20, x0
Lloh0:
	adrp	x8, _INFINIPATH_EXTS_MEMBIST_ENDTEST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INFINIPATH_EXTS_MEMBIST_ENDTEST@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ipath_dev_err
LBB0_2:
Lloh5:
	adrp	x8, _INFINIPATH_EXTS_MEMBIST_CORRECT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INFINIPATH_EXTS_MEMBIST_CORRECT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ipath_dbg
LBB0_4:
	mov	x0, x19
	bl	_ipath_check_htlink
Lloh10:
	adrp	x8, _IPATH_8BIT_IN_HT0@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IPATH_8BIT_IN_HT0@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
Lloh13:
	adrp	x8, _infinipath_hwe_htclnkabyte1crcerr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _infinipath_hwe_htclnkabyte1crcerr@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x8]
	ldp	w11, w8, [x19]
	tst	w9, w11
	mov	w9, #-1
	csinv	w10, w9, w10, eq
Lloh16:
	adrp	x12, _IPATH_8BIT_IN_HT1@GOTPAGE
Lloh17:
	ldr	x12, [x12, _IPATH_8BIT_IN_HT1@GOTPAGEOFF]
Lloh18:
	ldr	w12, [x12]
	tst	w12, w11
Lloh19:
	adrp	x11, _infinipath_hwe_htclnkbbyte1crcerr@GOTPAGE
Lloh20:
	ldr	x11, [x11, _infinipath_hwe_htclnkbbyte1crcerr@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	csinv	w9, w9, w11, eq
Lloh22:
	adrp	x11, _INFINIPATH_HWE_SERDESPLLFAILED@GOTPAGE
Lloh23:
	ldr	x11, [x11, _INFINIPATH_HWE_SERDESPLLFAILED@GOTPAGEOFF]
	and	w10, w9, w10
Lloh24:
	ldr	w9, [x11]
Lloh25:
	adrp	x11, _INFINIPATH_HWE_RXDSYNCMEMPARITYERR@GOTPAGE
Lloh26:
	ldr	x11, [x11, _INFINIPATH_HWE_RXDSYNCMEMPARITYERR@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x11]
	orr	w11, w11, w9
Lloh28:
	adrp	x12, _INFINIPATH_HWE_HTCMISCERR4@GOTPAGE
Lloh29:
	ldr	x12, [x12, _INFINIPATH_HWE_HTCMISCERR4@GOTPAGEOFF]
Lloh30:
	ldr	w12, [x12]
	orr	w11, w11, w12
	bic	w10, w10, w11
	cmp	w8, #9
	b.eq	LBB0_6
; %bb.5:
	cmp	w8, #4
	b.ne	LBB0_7
LBB0_6:
	bic	w10, w10, w9
LBB0_7:
	str	w10, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_INFINIPATH_EXTS_MEMBIST_ENDTEST,4,2 ; @INFINIPATH_EXTS_MEMBIST_ENDTEST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MemBIST did not complete!\n"

	.comm	_INFINIPATH_EXTS_MEMBIST_CORRECT,4,2 ; @INFINIPATH_EXTS_MEMBIST_CORRECT
l_.str.1:                               ; @.str.1
	.asciz	"MemBIST corrected\n"

	.comm	_IPATH_8BIT_IN_HT0,4,2          ; @IPATH_8BIT_IN_HT0
	.comm	_infinipath_hwe_htclnkabyte1crcerr,4,2 ; @infinipath_hwe_htclnkabyte1crcerr
	.comm	_IPATH_8BIT_IN_HT1,4,2          ; @IPATH_8BIT_IN_HT1
	.comm	_infinipath_hwe_htclnkbbyte1crcerr,4,2 ; @infinipath_hwe_htclnkbbyte1crcerr
	.comm	_INFINIPATH_HWE_SERDESPLLFAILED,4,2 ; @INFINIPATH_HWE_SERDESPLLFAILED
	.comm	_INFINIPATH_HWE_RXDSYNCMEMPARITYERR,4,2 ; @INFINIPATH_HWE_RXDSYNCMEMPARITYERR
	.comm	_INFINIPATH_HWE_HTCMISCERR4,4,2 ; @INFINIPATH_HWE_HTCMISCERR4
	.no_dead_strip	_ipath_ht_init_hwerrors
.subsections_via_symbols
