	.file	"extr_ptw32_OLL_lock.c_ptw32_oll_Arrive.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ptw32_oll_Arrive
	.type	ptw32_oll_Arrive, @function
ptw32_oll_Arrive:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, 8[rdi]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	xor	eax, eax
	call	ptw32_oll_ShouldArriveAtTree@PLT
	test	eax, eax
	jne	.L4
	mov	rdx, rbx
	mov	rsi, rbx
	mov	edi, r12d
	call	PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE@PLT
	cmp	rax, rbx
	je	.L10
.L5:
	mov	rax, QWORD PTR 16[rbp]
	cmp	QWORD PTR ptw32_oll_snziRoot_open[rip], rax
	mov	rbx, QWORD PTR 8[rbp]
	je	.L2
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	xor	edx, edx
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rbx, QWORD PTR 0[rbp]
	xor	eax, eax
	call	ptw32_oll_GetLeafForThread@PLT
	lea	rbx, [rbx+rax*4]
	mov	rdi, rbx
	call	ptw32_oll_TreeArrive@PLT
	test	rax, rax
	mov	eax, 0
	cmovne	rax, rbx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	edx, edx
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdx, r12
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ptw32_oll_Arrive, .-ptw32_oll_Arrive
	.comm	ptw32_oll_snziRoot_open,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ptw32_OLL_lock.c_ptw32_oll_Arrive.c"
	.text
	.align	2
	.global	ptw32_oll_Arrive
	.syntax unified
	.arm
	.fpu softvfp
	.type	ptw32_oll_Arrive, %function
ptw32_oll_Arrive:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r8, r0
	ldr	r6, .L11
	add	r7, r1, #4
	b	.L5
.L2:
	bl	ptw32_oll_ShouldArriveAtTree
	cmp	r0, #0
	bne	.L4
	mov	r2, r4
	mov	r1, r4
	mov	r0, r7
	bl	PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE
	cmp	r0, r4
	beq	.L10
.L5:
	ldr	r2, [r6]
	ldr	r3, [r5, #8]
	ldr	r4, [r5, #4]
	cmp	r2, r3
	beq	.L2
	mov	r3, #0
	mov	r0, r8
	str	r3, [r8]
	str	r3, [r8, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r4, [r5]
	bl	ptw32_oll_GetLeafForThread
	add	r4, r4, r0, lsl #2
	mov	r0, r4
	bl	ptw32_oll_TreeArrive
	cmp	r0, #0
	moveq	r4, #0
	mov	r3, #0
	mov	r0, r8
	str	r4, [r8]
	str	r3, [r8, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	r3, #0
	mov	r0, r8
	stm	r8, {r3, r7}
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	ptw32_oll_snziRoot_open
	.size	ptw32_oll_Arrive, .-ptw32_oll_Arrive
	.comm	ptw32_oll_snziRoot_open,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
