	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_set_ib_7220_lstate
_qib_set_ib_7220_lstate:                ## @qib_set_ib_7220_lstate
	.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
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	movq	_QLOGIC_IB_IBCC_LINKINITCMD_DISABLE@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_2
## %bb.1:
	leaq	8(%r15), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	_QIBL_IB_LINK_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%r15)
	jmp	LBB0_5
LBB0_2:
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_QLOGIC_IB_IBCC_LINKCMD_DOWN@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_6
LBB0_4:
	leaq	8(%r15), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	_QIBL_IB_LINK_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 12(%r15)
LBB0_5:
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	movq	_IBA7220_IBCC_LINKCMD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movq	_QLOGIC_IB_IBCC_LINKINITCMD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%r12d, %ebx
	movq	_kr_ibcctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r15), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_qib_write_kreg
	movq	_kr_scratch@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qib_write_kreg                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_QLOGIC_IB_IBCC_LINKINITCMD_DISABLE,4,2 ## @QLOGIC_IB_IBCC_LINKINITCMD_DISABLE
	.comm	_QIBL_IB_LINK_DISABLED,4,2      ## @QIBL_IB_LINK_DISABLED
	.comm	_QLOGIC_IB_IBCC_LINKCMD_DOWN,4,2 ## @QLOGIC_IB_IBCC_LINKCMD_DOWN
	.comm	_IBA7220_IBCC_LINKCMD_SHIFT,4,2 ## @IBA7220_IBCC_LINKCMD_SHIFT
	.comm	_QLOGIC_IB_IBCC_LINKINITCMD_SHIFT,4,2 ## @QLOGIC_IB_IBCC_LINKINITCMD_SHIFT
	.comm	_kr_ibcctrl,4,2                 ## @kr_ibcctrl
	.comm	_kr_scratch,4,2                 ## @kr_scratch
	.no_dead_strip	_qib_set_ib_7220_lstate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_set_ib_7220_lstate
_qib_set_ib_7220_lstate:                ; @qib_set_ib_7220_lstate
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x8, _QLOGIC_IB_IBCC_LINKINITCMD_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLOGIC_IB_IBCC_LINKINITCMD_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_2
; %bb.1:
	add	x23, x20, #8
	mov	x0, x23
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x8, _QIBL_IB_LINK_DISABLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QIBL_IB_LINK_DISABLED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	orr	w8, w9, w8
	b	LBB0_5
LBB0_2:
	cbnz	w21, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _QLOGIC_IB_IBCC_LINKCMD_DOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QLOGIC_IB_IBCC_LINKCMD_DOWN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_6
LBB0_4:
	add	x23, x20, #8
	mov	x0, x23
	bl	_spin_lock_irqsave
Lloh9:
	adrp	x8, _QIBL_IB_LINK_DISABLED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QIBL_IB_LINK_DISABLED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	bic	w8, w9, w8
LBB0_5:
	str	w8, [x20, #12]
	mov	x0, x23
	bl	_spin_unlock_irqrestore
LBB0_6:
Lloh12:
	adrp	x8, _IBA7220_IBCC_LINKCMD_SHIFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IBA7220_IBCC_LINKCMD_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsl	w8, w22, w8
Lloh15:
	adrp	x9, _QLOGIC_IB_IBCC_LINKINITCMD_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _QLOGIC_IB_IBCC_LINKINITCMD_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	lsl	w9, w21, w9
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _kr_ibcctrl@GOTPAGE
Lloh19:
	ldr	x9, [x9, _kr_ibcctrl@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	ldr	x9, [x20]
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_qib_write_kreg
Lloh21:
	adrp	x8, _kr_scratch@GOTPAGE
Lloh22:
	ldr	x8, [x8, _kr_scratch@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	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_write_kreg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_QLOGIC_IB_IBCC_LINKINITCMD_DISABLE,4,2 ; @QLOGIC_IB_IBCC_LINKINITCMD_DISABLE
	.comm	_QIBL_IB_LINK_DISABLED,4,2      ; @QIBL_IB_LINK_DISABLED
	.comm	_QLOGIC_IB_IBCC_LINKCMD_DOWN,4,2 ; @QLOGIC_IB_IBCC_LINKCMD_DOWN
	.comm	_IBA7220_IBCC_LINKCMD_SHIFT,4,2 ; @IBA7220_IBCC_LINKCMD_SHIFT
	.comm	_QLOGIC_IB_IBCC_LINKINITCMD_SHIFT,4,2 ; @QLOGIC_IB_IBCC_LINKINITCMD_SHIFT
	.comm	_kr_ibcctrl,4,2                 ; @kr_ibcctrl
	.comm	_kr_scratch,4,2                 ; @kr_scratch
	.no_dead_strip	_qib_set_ib_7220_lstate
.subsections_via_symbols
