	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_chk_6120_errormask
_qib_chk_6120_errormask:                ## @qib_chk_6120_errormask
	.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	8(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	_QIB_INITTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_6
## %bb.2:
	movq	_kr_errmask@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_qib_read_kreg64
	movq	%rax, %r14
	movq	8(%rbx), %rax
	cmpq	(%rax), %r14
	je	LBB0_6
## %bb.3:
	incl	_qib_chk_6120_errormask.fixed(%rip)
	movq	_kr_hwerrstatus@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qib_read_kreg64
	movq	%rax, %r15
	movq	_kr_control@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qib_read_kreg32
	movl	%eax, %r12d
	movl	(%r13), %esi
	movq	8(%rbx), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_qib_write_kreg
	movq	8(%rbx), %rax
	testq	%r15, 8(%rax)
	jne	LBB0_5
## %bb.4:
	movq	_QLOGIC_IB_C_FREEZEMODE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_6
LBB0_5:
	movq	_kr_hwerrclear@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_qib_write_kreg
	movq	_kr_errclear@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_qib_write_kreg
	movq	_kr_intclear@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_qib_write_kreg
	movl	16(%rbx), %edi
	movl	_qib_chk_6120_errormask.fixed(%rip), %edx
	movq	8(%rbx), %rax
	movq	(%rax), %r8
	movq	%r15, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rcx
	movl	%r12d, %r9d
	callq	_qib_devinfo
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_qib_chk_6120_errormask.fixed,4,2 ## @qib_chk_6120_errormask.fixed
	.comm	_QIB_INITTED,4,2                ## @QIB_INITTED
	.comm	_kr_errmask,4,2                 ## @kr_errmask
	.comm	_kr_hwerrstatus,4,2             ## @kr_hwerrstatus
	.comm	_kr_control,4,2                 ## @kr_control
	.comm	_QLOGIC_IB_C_FREEZEMODE,4,2     ## @QLOGIC_IB_C_FREEZEMODE
	.comm	_kr_hwerrclear,4,2              ## @kr_hwerrclear
	.comm	_kr_errclear,4,2                ## @kr_errclear
	.comm	_kr_intclear,4,2                ## @kr_intclear
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"errormask fixed(%u) %lx->%lx, ctrl %x hwerr %lx\n"

	.no_dead_strip	_qib_chk_6120_errormask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_chk_6120_errormask
_qib_chk_6120_errormask:                ; @qib_chk_6120_errormask
	.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
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _QIB_INITTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QIB_INITTED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x24, _kr_errmask@GOTPAGE
Lloh4:
	ldr	x24, [x24, _kr_errmask@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_qib_read_kreg64
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
LBB0_3:
	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
LBB0_4:
	mov	x20, x0
	adrp	x23, _qib_chk_6120_errormask.fixed@PAGE
	ldr	w8, [x23, _qib_chk_6120_errormask.fixed@PAGEOFF]
	add	w8, w8, #1
	str	w8, [x23, _qib_chk_6120_errormask.fixed@PAGEOFF]
Lloh5:
	adrp	x8, _kr_hwerrstatus@GOTPAGE
Lloh6:
	ldr	x8, [x8, _kr_hwerrstatus@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qib_read_kreg64
	mov	x21, x0
Lloh8:
	adrp	x8, _kr_control@GOTPAGE
Lloh9:
	ldr	x8, [x8, _kr_control@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qib_read_kreg32
	mov	x22, x0
	ldr	w1, [x24]
	ldr	x8, [x19, #8]
	ldr	x2, [x8]
	mov	x0, x19
	bl	_qib_write_kreg
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	tst	x8, x21
	b.ne	LBB0_6
; %bb.5:
Lloh11:
	adrp	x8, _QLOGIC_IB_C_FREEZEMODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QLOGIC_IB_C_FREEZEMODE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_3
LBB0_6:
Lloh14:
	adrp	x8, _kr_hwerrclear@GOTPAGE
Lloh15:
	ldr	x8, [x8, _kr_hwerrclear@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_qib_write_kreg
Lloh17:
	adrp	x8, _kr_errclear@GOTPAGE
Lloh18:
	ldr	x8, [x8, _kr_errclear@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_qib_write_kreg
Lloh20:
	adrp	x8, _kr_intclear@GOTPAGE
Lloh21:
	ldr	x8, [x8, _kr_intclear@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_qib_write_kreg
	ldr	w0, [x19, #16]
	ldr	w2, [x23, _qib_chk_6120_errormask.fixed@PAGEOFF]
	ldr	x8, [x19, #8]
	ldr	x4, [x8]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	mov	x5, x22
	mov	x6, x21
	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
	b	_qib_devinfo
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_qib_chk_6120_errormask.fixed,4,2 ; @qib_chk_6120_errormask.fixed
	.comm	_QIB_INITTED,4,2                ; @QIB_INITTED
	.comm	_kr_errmask,4,2                 ; @kr_errmask
	.comm	_kr_hwerrstatus,4,2             ; @kr_hwerrstatus
	.comm	_kr_control,4,2                 ; @kr_control
	.comm	_QLOGIC_IB_C_FREEZEMODE,4,2     ; @QLOGIC_IB_C_FREEZEMODE
	.comm	_kr_hwerrclear,4,2              ; @kr_hwerrclear
	.comm	_kr_errclear,4,2                ; @kr_errclear
	.comm	_kr_intclear,4,2                ; @kr_intclear
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"errormask fixed(%u) %lx->%lx, ctrl %x hwerr %lx\n"

	.no_dead_strip	_qib_chk_6120_errormask
.subsections_via_symbols
