	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_late_7220_initreg
_qib_late_7220_initreg:                 ## @qib_late_7220_initreg
	.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, %rbx
	movq	_kr_rcvhdrentsize@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rdi), %rdx
	callq	_qib_write_kreg
	movq	_kr_rcvhdrsize@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_qib_write_kreg
	movq	_kr_rcvhdrcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_qib_write_kreg
	movq	_kr_sendpioavailaddr@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	24(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_qib_write_kreg
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_qib_read_kreg64
	movq	24(%rbx), %rdx
	xorl	%r14d, %r14d
	cmpq	%rdx, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rcx
	callq	_qib_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_2:
	movq	_sendctrl_observer@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_qib_register_observer
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kr_rcvhdrentsize,4,2           ## @kr_rcvhdrentsize
	.comm	_kr_rcvhdrsize,4,2              ## @kr_rcvhdrsize
	.comm	_kr_rcvhdrcnt,4,2               ## @kr_rcvhdrcnt
	.comm	_kr_sendpioavailaddr,4,2        ## @kr_sendpioavailaddr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Catastrophic software error, SendPIOAvailAddr written as %lx, read back as %llx\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_sendctrl_observer,4,2          ## @sendctrl_observer
	.no_dead_strip	_qib_late_7220_initreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_late_7220_initreg
_qib_late_7220_initreg:                 ; @qib_late_7220_initreg
	.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
Lloh0:
	adrp	x8, _kr_rcvhdrentsize@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kr_rcvhdrentsize@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x0]
	bl	_qib_write_kreg
Lloh3:
	adrp	x8, _kr_rcvhdrsize@GOTPAGE
Lloh4:
	ldr	x8, [x8, _kr_rcvhdrsize@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x19
	bl	_qib_write_kreg
Lloh6:
	adrp	x8, _kr_rcvhdrcnt@GOTPAGE
Lloh7:
	ldr	x8, [x8, _kr_rcvhdrcnt@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x2, [x19, #16]
	mov	x0, x19
	bl	_qib_write_kreg
Lloh9:
	adrp	x20, _kr_sendpioavailaddr@GOTPAGE
Lloh10:
	ldr	x20, [x20, _kr_sendpioavailaddr@GOTPAGEOFF]
	ldr	w1, [x20]
	ldr	x2, [x19, #24]
	mov	x0, x19
	bl	_qib_write_kreg
	ldr	w1, [x20]
	mov	x0, x19
	bl	_qib_read_kreg64
	ldr	x2, [x19, #24]
	cmp	x0, x2
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_3
LBB0_2:
	mov	x3, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_qib_dev_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
Lloh16:
	adrp	x1, _sendctrl_observer@GOTPAGE
Lloh17:
	ldr	x1, [x1, _sendctrl_observer@GOTPAGEOFF]
	mov	x0, x19
	bl	_qib_register_observer
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_kr_rcvhdrentsize,4,2           ; @kr_rcvhdrentsize
	.comm	_kr_rcvhdrsize,4,2              ; @kr_rcvhdrsize
	.comm	_kr_rcvhdrcnt,4,2               ; @kr_rcvhdrcnt
	.comm	_kr_sendpioavailaddr,4,2        ; @kr_sendpioavailaddr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Catastrophic software error, SendPIOAvailAddr written as %lx, read back as %llx\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_sendctrl_observer,4,2          ; @sendctrl_observer
	.no_dead_strip	_qib_late_7220_initreg
.subsections_via_symbols
