	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_set_linkstate              ## -- Begin function qib_set_linkstate
	.p2align	4, 0x90
_qib_set_linkstate:                     ## @qib_set_linkstate
	.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
                                        ## kill: def $esi killed $esi def $rsi
	addl	$-128, %esi
	cmpl	$5, %esi
	ja	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_5:
	movq	_QIB_IB_CFG_LSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_LINKCMD_DOWN@GOTPCREL(%rip), %rax
	movq	_IB_LINKINITCMD_SLEEP@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_QIB_IB_CFG_LSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_LINKCMD_DOWN@GOTPCREL(%rip), %rax
	movq	_IB_LINKINITCMD_NOP@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_6:
	movq	_QIB_IB_CFG_LSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_LINKCMD_DOWN@GOTPCREL(%rip), %rax
	movq	_IB_LINKINITCMD_DISABLE@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_4:
	movq	_QIB_IB_CFG_LSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_LINKCMD_DOWN@GOTPCREL(%rip), %rax
	movq	_IB_LINKINITCMD_POLL@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	*(%r15)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_7:
	movl	(%rbx), %ecx
	movq	_QIBL_LINKARMED@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_10
## %bb.8:
	movq	_QIBL_LINKINIT@GOTPCREL(%rip), %rax
	movq	_QIBL_LINKACTIVE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	testl	%ecx, %edx
	je	LBB0_9
## %bb.14:
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_QIBL_LINKV@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_IB_LINKCMD_ARMED@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_11:
	movl	(%rbx), %ecx
	movq	_QIBL_LINKACTIVE@GOTPCREL(%rip), %r12
	xorl	%eax, %eax
	testl	%ecx, (%r12)
	jne	LBB0_10
## %bb.12:
	movq	_QIBL_LINKARMED@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_9
## %bb.13:
	movq	_IB_LINKCMD_ACTIVE@GOTPCREL(%rip), %rax
LBB0_15:
	movq	_QIB_IB_CFG_LSTATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_IB_LINKINITCMD_NOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	*(%r15)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$10, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qib_wait_linkstate             ## TAILCALL
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_QIB_IB_CFG_LSTATE,4,2          ## @QIB_IB_CFG_LSTATE
	.comm	_IB_LINKCMD_DOWN,4,2            ## @IB_LINKCMD_DOWN
	.comm	_IB_LINKINITCMD_NOP,4,2         ## @IB_LINKINITCMD_NOP
	.comm	_IB_LINKINITCMD_POLL,4,2        ## @IB_LINKINITCMD_POLL
	.comm	_IB_LINKINITCMD_SLEEP,4,2       ## @IB_LINKINITCMD_SLEEP
	.comm	_IB_LINKINITCMD_DISABLE,4,2     ## @IB_LINKINITCMD_DISABLE
	.comm	_QIBL_LINKARMED,4,2             ## @QIBL_LINKARMED
	.comm	_QIBL_LINKINIT,4,2              ## @QIBL_LINKINIT
	.comm	_QIBL_LINKACTIVE,4,2            ## @QIBL_LINKACTIVE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QIBL_LINKV,4,2                 ## @QIBL_LINKV
	.comm	_IB_LINKCMD_ARMED,4,2           ## @IB_LINKCMD_ARMED
	.comm	_IB_LINKCMD_ACTIVE,4,2          ## @IB_LINKCMD_ACTIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_set_linkstate              ; -- Begin function qib_set_linkstate
	.p2align	2
_qib_set_linkstate:                     ; @qib_set_linkstate
	.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
	sub	w8, w1, #128
	cmp	w8, #5
	b.hi	LBB0_15
; %bb.1:
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _QIB_IB_CFG_LSTATE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _QIB_IB_CFG_LSTATE@GOTPAGEOFF]
Lloh4:
	adrp	x10, _IB_LINKCMD_DOWN@GOTPAGE
Lloh5:
	ldr	x10, [x10, _IB_LINKCMD_DOWN@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x9]
Lloh7:
	ldr	w9, [x10]
Lloh8:
	adrp	x10, _IB_LINKINITCMD_SLEEP@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IB_LINKINITCMD_SLEEP@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	ldr	x8, [x21]
Lloh10:
	adrp	x9, _QIB_IB_CFG_LSTATE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _QIB_IB_CFG_LSTATE@GOTPAGEOFF]
Lloh12:
	adrp	x10, _IB_LINKCMD_DOWN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _IB_LINKCMD_DOWN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
Lloh15:
	ldr	w9, [x10]
Lloh16:
	adrp	x10, _IB_LINKINITCMD_NOP@GOTPAGE
Lloh17:
	ldr	x10, [x10, _IB_LINKINITCMD_NOP@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	x8, [x21]
Lloh18:
	adrp	x9, _QIB_IB_CFG_LSTATE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _QIB_IB_CFG_LSTATE@GOTPAGEOFF]
Lloh20:
	adrp	x10, _IB_LINKCMD_DOWN@GOTPAGE
Lloh21:
	ldr	x10, [x10, _IB_LINKCMD_DOWN@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x9]
Lloh23:
	ldr	w9, [x10]
Lloh24:
	adrp	x10, _IB_LINKINITCMD_DISABLE@GOTPAGE
Lloh25:
	ldr	x10, [x10, _IB_LINKINITCMD_DISABLE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x21]
Lloh26:
	adrp	x9, _QIB_IB_CFG_LSTATE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _QIB_IB_CFG_LSTATE@GOTPAGEOFF]
Lloh28:
	adrp	x10, _IB_LINKCMD_DOWN@GOTPAGE
Lloh29:
	ldr	x10, [x10, _IB_LINKCMD_DOWN@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x9]
Lloh31:
	ldr	w9, [x10]
Lloh32:
	adrp	x10, _IB_LINKINITCMD_POLL@GOTPAGE
Lloh33:
	ldr	x10, [x10, _IB_LINKINITCMD_POLL@GOTPAGEOFF]
LBB0_6:
	ldr	w10, [x10]
	orr	w2, w10, w9
	mov	x0, x19
	blr	x8
	mov	w0, #0
	b	LBB0_16
LBB0_7:
	ldr	w8, [x19]
Lloh34:
	adrp	x9, _QIBL_LINKARMED@GOTPAGE
Lloh35:
	ldr	x9, [x9, _QIBL_LINKARMED@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.8:
Lloh37:
	adrp	x9, _QIBL_LINKINIT@GOTPAGE
Lloh38:
	ldr	x9, [x9, _QIBL_LINKINIT@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
Lloh40:
	adrp	x10, _QIBL_LINKACTIVE@GOTPAGE
Lloh41:
	ldr	x10, [x10, _QIBL_LINKACTIVE@GOTPAGEOFF]
Lloh42:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_15
; %bb.9:
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh43:
	adrp	x22, _QIBL_LINKV@GOTPAGE
Lloh44:
	ldr	x22, [x22, _QIBL_LINKV@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh45:
	adrp	x8, _IB_LINKCMD_ARMED@GOTPAGE
Lloh46:
	ldr	x8, [x8, _IB_LINKCMD_ARMED@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	ldr	w8, [x19]
Lloh47:
	adrp	x9, _QIBL_LINKACTIVE@GOTPAGE
Lloh48:
	ldr	x9, [x9, _QIBL_LINKACTIVE@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
LBB0_11:
	mov	w0, #0
	b	LBB0_16
LBB0_12:
Lloh50:
	adrp	x9, _QIBL_LINKARMED@GOTPAGE
Lloh51:
	ldr	x9, [x9, _QIBL_LINKARMED@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:
Lloh53:
	adrp	x22, _QIBL_LINKACTIVE@GOTPAGE
Lloh54:
	ldr	x22, [x22, _QIBL_LINKACTIVE@GOTPAGEOFF]
Lloh55:
	adrp	x8, _IB_LINKCMD_ACTIVE@GOTPAGE
Lloh56:
	ldr	x8, [x8, _IB_LINKCMD_ACTIVE@GOTPAGEOFF]
LBB0_14:
	ldr	x9, [x21]
Lloh57:
	adrp	x10, _QIB_IB_CFG_LSTATE@GOTPAGE
Lloh58:
	ldr	x10, [x10, _QIB_IB_CFG_LSTATE@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x10]
	ldr	w8, [x8]
Lloh60:
	adrp	x10, _IB_LINKINITCMD_NOP@GOTPAGE
Lloh61:
	ldr	x10, [x10, _IB_LINKINITCMD_NOP@GOTPAGEOFF]
Lloh62:
	ldr	w10, [x10]
	orr	w2, w10, w8
	mov	x0, x19
	blr	x9
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #10
	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
	b	_qib_wait_linkstate
LBB0_15:
Lloh63:
	adrp	x8, _EINVAL@GOTPAGE
Lloh64:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh65:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
                                        ; -- End function
	.comm	_QIB_IB_CFG_LSTATE,4,2          ; @QIB_IB_CFG_LSTATE
	.comm	_IB_LINKCMD_DOWN,4,2            ; @IB_LINKCMD_DOWN
	.comm	_IB_LINKINITCMD_NOP,4,2         ; @IB_LINKINITCMD_NOP
	.comm	_IB_LINKINITCMD_POLL,4,2        ; @IB_LINKINITCMD_POLL
	.comm	_IB_LINKINITCMD_SLEEP,4,2       ; @IB_LINKINITCMD_SLEEP
	.comm	_IB_LINKINITCMD_DISABLE,4,2     ; @IB_LINKINITCMD_DISABLE
	.comm	_QIBL_LINKARMED,4,2             ; @QIBL_LINKARMED
	.comm	_QIBL_LINKINIT,4,2              ; @QIBL_LINKINIT
	.comm	_QIBL_LINKACTIVE,4,2            ; @QIBL_LINKACTIVE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QIBL_LINKV,4,2                 ; @QIBL_LINKV
	.comm	_IB_LINKCMD_ARMED,4,2           ; @IB_LINKCMD_ARMED
	.comm	_IB_LINKCMD_ACTIVE,4,2          ; @IB_LINKCMD_ACTIVE
.subsections_via_symbols
