	.file	"extr_thr_once.c__thr_once.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	_thr_once
	.type	_thr_once, @function
_thr_once:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	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
	mov	rbx, rsi
	call	_thr_check_init@PLT
	.p2align 4,,10
	.p2align 3
.L17:
	mov	esi, DWORD PTR 0[rbp]
	cmp	DWORD PTR ONCE_DONE[rip], esi
	je	.L19
.L2:
	cmp	DWORD PTR ONCE_NEVER_DONE[rip], esi
	mov	edx, DWORD PTR ONCE_IN_PROGRESS[rip]
	je	.L20
	mov	r8d, DWORD PTR ONCE_WAIT[rip]
	cmp	edx, esi
	je	.L21
	cmp	r8d, esi
	jne	.L10
	xor	ecx, ecx
	xor	edx, edx
	mov	rdi, rbp
	call	_thr_umtx_wait_uint@PLT
	mov	esi, DWORD PTR 0[rbp]
	cmp	DWORD PTR ONCE_DONE[rip], esi
	jne	.L2
.L19:
	xor	eax, eax
	xor	r12d, r12d
	call	atomic_thread_fence_acq@PLT
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	rdi, rbp
	call	atomic_cmpset_int@PLT
	test	rax, rax
	je	.L17
	xor	eax, eax
	call	_get_curthread@PLT
	mov	esi, DWORD PTR once_cancel_handler[rip]
	mov	rdx, rbp
	mov	r12, rax
	mov	rdi, rax
	call	THR_CLEANUP_PUSH@PLT
	call	rbx
	mov	rdi, r12
	xor	esi, esi
	xor	r12d, r12d
	call	THR_CLEANUP_POP@PLT
	mov	edx, DWORD PTR ONCE_DONE[rip]
	mov	esi, DWORD PTR ONCE_IN_PROGRESS[rip]
	mov	rdi, rbp
	call	atomic_cmpset_rel_int@PLT
	test	rax, rax
	jne	.L1
	mov	esi, DWORD PTR ONCE_DONE[rip]
	mov	rdi, rbp
	call	atomic_store_rel_int@PLT
	mov	esi, DWORD PTR INT_MAX[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	_thr_umtx_wake@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edx, r8d
	mov	rdi, rbp
	call	atomic_cmpset_int@PLT
	test	rax, rax
	je	.L17
	mov	esi, DWORD PTR ONCE_WAIT[rip]
	xor	ecx, ecx
	xor	edx, edx
	mov	rdi, rbp
	call	_thr_umtx_wait_uint@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r12d, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	_thr_once, .-_thr_once
	.comm	once_cancel_handler,4,4
	.comm	ONCE_WAIT,4,4
	.comm	ONCE_NEVER_DONE,4,4
	.comm	ONCE_IN_PROGRESS,4,4
	.comm	ONCE_DONE,4,4
	.comm	INT_MAX,4,4
	.comm	EINVAL,4,4
	.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_thr_once.c__thr_once.c"
	.text
	.align	2
	.global	_thr_once
	.syntax unified
	.arm
	.fpu softvfp
	.type	_thr_once, %function
_thr_once:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r5, .L19
	mov	r9, r1
	bl	_thr_check_init
	ldr	r1, [r4]
	ldr	r3, [r5]
	cmp	r3, r1
	beq	.L4
	ldr	r6, .L19+4
	ldr	r7, .L19+8
	ldr	r8, .L19+12
	b	.L2
.L5:
	cmp	r2, r1
	ldr	r2, [r8]
	beq	.L18
	cmp	r2, r1
	bne	.L10
	mov	r3, #0
	mov	r0, r4
	mov	r2, r3
	bl	_thr_umtx_wait_uint
.L9:
	ldr	r1, [r4]
	ldr	r3, [r5]
	cmp	r3, r1
	beq	.L4
.L2:
	ldr	r3, [r7]
	ldr	r2, [r6]
	cmp	r3, r1
	bne	.L5
	mov	r0, r4
	bl	atomic_cmpset_int
	cmp	r0, #0
	beq	.L9
	bl	_get_curthread
	mov	r7, r0
	ldr	r3, .L19+16
	mov	r2, r4
	ldr	r1, [r3]
	bl	THR_CLEANUP_PUSH
	blx	r9
	mov	r1, #0
	mov	r0, r7
	bl	THR_CLEANUP_POP
	ldr	r1, [r6]
	mov	r0, r4
	ldr	r2, [r5]
	bl	atomic_cmpset_rel_int
	subs	r6, r0, #0
	movne	r6, #0
	bne	.L1
	ldr	r1, [r5]
	mov	r0, r4
	bl	atomic_store_rel_int
	ldr	r3, .L19+20
	mov	r0, r4
	mov	r2, r6
	ldr	r1, [r3]
	bl	_thr_umtx_wake
	b	.L1
.L18:
	mov	r0, r4
	bl	atomic_cmpset_int
	cmp	r0, #0
	beq	.L9
	mov	r3, #0
	ldr	r1, [r8]
	mov	r2, r3
	mov	r0, r4
	bl	_thr_umtx_wait_uint
	ldr	r1, [r4]
	ldr	r3, [r5]
	cmp	r3, r1
	bne	.L2
.L4:
	bl	atomic_thread_fence_acq
	mov	r6, #0
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	ldr	r3, .L19+24
	ldr	r6, [r3]
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	.align	2
.L19:
	.word	ONCE_DONE
	.word	ONCE_IN_PROGRESS
	.word	ONCE_NEVER_DONE
	.word	ONCE_WAIT
	.word	once_cancel_handler
	.word	INT_MAX
	.word	EINVAL
	.size	_thr_once, .-_thr_once
	.comm	once_cancel_handler,4,4
	.comm	ONCE_WAIT,4,4
	.comm	ONCE_NEVER_DONE,4,4
	.comm	ONCE_IN_PROGRESS,4,4
	.comm	ONCE_DONE,4,4
	.comm	INT_MAX,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
