	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function complete_wqe
_complete_wqe:                          ## @complete_wqe
	.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	%rdx, %r14
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	movq	(%r14), %rax
	movq	_wqe_state_pending@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movl	8(%r14), %edi
	movl	16(%rbx), %esi
	callq	_psn_compare
	testq	%rax, %rax
	js	LBB0_4
## %bb.3:
	movl	8(%r14), %eax
	incl	%eax
	movq	_BTH_PSN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, 16(%rbx)
	movl	$-1, 20(%rbx)
LBB0_4:
	cmpq	$0, 8(%rbx)
	je	LBB0_6
## %bb.5:
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rxe_run_task
LBB0_6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_do_complete
	movq	_COMPST_GET_WQE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wqe_state_pending,8,3          ## @wqe_state_pending
	.comm	_BTH_PSN_MASK,4,2               ## @BTH_PSN_MASK
	.comm	_COMPST_GET_WQE,4,2             ## @COMPST_GET_WQE
	.no_dead_strip	_complete_wqe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function complete_wqe
_complete_wqe:                          ; @complete_wqe
	.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, x2
	mov	x20, x0
	cbz	x1, LBB0_6
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _wqe_state_pending@GOTPAGE
Lloh1:
	ldr	x9, [x9, _wqe_state_pending@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	ldr	w0, [x19, #8]
	ldr	w1, [x20, #16]
	bl	_psn_compare
	tbnz	x0, #63, LBB0_4
; %bb.3:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _BTH_PSN_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BTH_PSN_MASK@GOTPAGEOFF]
	add	w8, w8, #1
Lloh5:
	ldr	w9, [x9]
	and	w8, w8, w9
	mov	w9, #-1
	stp	w8, w9, [x20, #16]
LBB0_4:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.5:
	str	xzr, [x20, #8]
	mov	x0, x20
	mov	w1, #1
	bl	_rxe_run_task
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_do_complete
Lloh6:
	adrp	x8, _COMPST_GET_WQE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _COMPST_GET_WQE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_wqe_state_pending,8,3          ; @wqe_state_pending
	.comm	_BTH_PSN_MASK,4,2               ; @BTH_PSN_MASK
	.comm	_COMPST_GET_WQE,4,2             ; @COMPST_GET_WQE
	.no_dead_strip	_complete_wqe
.subsections_via_symbols
