	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lancer_test_and_set_rdy_state  ## -- Begin function lancer_test_and_set_rdy_state
	.p2align	4, 0x90
_lancer_test_and_set_rdy_state:         ## @lancer_test_and_set_rdy_state
	.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	%rdi, %r14
	callq	_lancer_provisioning_error
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_8
LBB0_2:
	movq	%r14, %rdi
	callq	_lancer_wait_ready
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_SLIPORT_STATUS_OFFSET@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%r14), %rdi
	callq	_ioread32
	movq	_SLIPORT_STATUS_ERR_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	_SLIPORT_STATUS_RN_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.4:
	movl	%edx, %esi
	andl	%eax, %esi
	je	LBB0_6
## %bb.5:
	movq	_SLI_PORT_CONTROL_IP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SLIPORT_CONTROL_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_iowrite32
	movq	%r14, %rdi
	callq	_lancer_wait_ready
	movl	%eax, %r15d
	movq	(%r13), %rdi
	addq	(%r14), %rdi
	callq	_ioread32
	movl	(%rbx), %ecx
	orl	(%r12), %ecx
	andl	%eax, %ecx
	orl	%r15d, %ecx
	movl	$-1, %ebx
	cmovel	%r15d, %ebx
	jmp	LBB0_7
LBB0_6:
	orl	%edx, %ecx
	andl	%eax, %ecx
	xorl	%ebx, %ebx
	negl	%ecx
	sbbl	%ebx, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_lancer_provisioning_error
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	cmovel	%ebx, %ecx
LBB0_8:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_SLIPORT_STATUS_OFFSET,8,3      ## @SLIPORT_STATUS_OFFSET
	.comm	_SLIPORT_STATUS_ERR_MASK,4,2    ## @SLIPORT_STATUS_ERR_MASK
	.comm	_SLIPORT_STATUS_RN_MASK,4,2     ## @SLIPORT_STATUS_RN_MASK
	.comm	_SLI_PORT_CONTROL_IP_MASK,4,2   ## @SLI_PORT_CONTROL_IP_MASK
	.comm	_SLIPORT_CONTROL_OFFSET,8,3     ## @SLIPORT_CONTROL_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lancer_test_and_set_rdy_state  ; -- Begin function lancer_test_and_set_rdy_state
	.p2align	2
_lancer_test_and_set_rdy_state:         ; @lancer_test_and_set_rdy_state
	.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	x19, x0
	bl	_lancer_provisioning_error
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x0, x19
	bl	_lancer_wait_ready
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	x8, [x19]
Lloh3:
	adrp	x21, _SLIPORT_STATUS_OFFSET@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SLIPORT_STATUS_OFFSET@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
Lloh5:
	adrp	x22, _SLIPORT_STATUS_ERR_MASK@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SLIPORT_STATUS_ERR_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w8, w8, w0
Lloh7:
	adrp	x23, _SLIPORT_STATUS_RN_MASK@GOTPAGE
Lloh8:
	ldr	x23, [x23, _SLIPORT_STATUS_RN_MASK@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w9, w9, w0
	cmp	w8, #0
	ccmp	w9, #0, #4, ne
	b.ne	LBB0_5
; %bb.4:
	orr	w8, w8, w9
	cmp	w8, #0
	csetm	w20, ne
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _SLI_PORT_CONTROL_IP_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SLI_PORT_CONTROL_IP_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _SLIPORT_CONTROL_OFFSET@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SLIPORT_CONTROL_OFFSET@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	mov	x0, x19
	bl	_lancer_wait_ready
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w9, w8
	and	w8, w8, w0
	orr	w8, w20, w8
	cmp	w8, #0
	csinv	w20, w20, wzr, eq
LBB0_6:
	mov	x0, x19
	bl	_lancer_provisioning_error
Lloh15:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w20, w8, eq
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_SLIPORT_STATUS_OFFSET,8,3      ; @SLIPORT_STATUS_OFFSET
	.comm	_SLIPORT_STATUS_ERR_MASK,4,2    ; @SLIPORT_STATUS_ERR_MASK
	.comm	_SLIPORT_STATUS_RN_MASK,4,2     ; @SLIPORT_STATUS_RN_MASK
	.comm	_SLI_PORT_CONTROL_IP_MASK,4,2   ; @SLI_PORT_CONTROL_IP_MASK
	.comm	_SLIPORT_CONTROL_OFFSET,8,3     ; @SLIPORT_CONTROL_OFFSET
.subsections_via_symbols
