	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_wait_linkstate             ## -- Begin function qib_wait_linkstate
	.p2align	4, 0x90
_qib_wait_linkstate:                    ## @qib_wait_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	%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, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movl	%r14d, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	12(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %r13d
	andl	%r14d, %r13d
	movl	%r12d, %edi
	callq	_msecs_to_jiffies
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_wait_event_interruptible_timeout
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	$0, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	testl	%r14d, 4(%rbx)
	je	LBB0_3
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_wait_linkstate             ; -- Begin function qib_wait_linkstate
	.p2align	2
_qib_wait_linkstate:                    ; @qib_wait_linkstate
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	add	x21, x0, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	str	w19, [x20]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w23, [x20, #12]
	ldr	w8, [x20, #4]
	and	w24, w8, w19
	mov	x0, x22
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_wait_event_interruptible_timeout
	mov	x0, x21
	bl	_spin_lock_irqsave
	str	wzr, [x20]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	ldr	w8, [x20, #4]
	tst	w8, w19
	b.eq	LBB0_5
LBB0_4:
	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_5:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
