	.file	"extr_pthread_set.c_pthread_setspecific.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pthread_setspecific
	.type	pthread_setspecific, @function
pthread_setspecific:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR pte_selfThreadKey[rip], rdi
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	je	.L2
	xor	eax, eax
	call	pthread_self@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L34
.L3:
	test	rbx, rbx
	je	.L14
.L15:
	cmp	QWORD PTR 8[rbx], 0
	je	.L10
	test	r12, r12
	je	.L10
	lea	r14, 4[rbx]
	mov	rdi, r14
	call	pthread_mutex_lock@PLT
	test	rax, rax
	je	.L9
.L33:
	mov	rdi, r14
	call	pthread_mutex_unlock@PLT
.L10:
	mov	edi, DWORD PTR [rbx]
	mov	rsi, r12
	call	pte_osTlsSetValue@PLT
	cmp	rax, QWORD PTR PTE_OS_OK[rip]
	mov	r13d, DWORD PTR EAGAIN[rip]
	jne	.L1
.L14:
	xor	r13d, r13d
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	call	pthread_getspecific@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L3
	test	r12, r12
	je	.L34
	mov	rbp, QWORD PTR [r12]
	test	rbx, rbx
	je	.L14
	test	rbp, rbp
	je	.L10
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L34:
	mov	r13d, DWORD PTR ENOENT[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, rbp
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR 8[rbp]
	test	rax, rax
	jne	.L13
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L36:
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L11
.L13:
	cmp	QWORD PTR 8[rax], rbx
	jne	.L36
	mov	rdi, rbp
	call	pthread_mutex_unlock@PLT
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rsi, rbx
	mov	rdi, rbp
	call	pte_tkAssocCreate@PLT
	mov	rdi, rbp
	mov	r13d, eax
	call	pthread_mutex_unlock@PLT
	mov	rdi, r14
	call	pthread_mutex_unlock@PLT
	test	r13d, r13d
	jne	.L1
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	pthread_setspecific, .-pthread_setspecific
	.comm	pte_selfThreadKey,8,8
	.comm	PTE_OS_OK,8,8
	.comm	ENOENT,4,4
	.comm	EAGAIN,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_pthread_set.c_pthread_setspecific.c"
	.text
	.align	2
	.global	pthread_setspecific
	.syntax unified
	.arm
	.fpu softvfp
	.type	pthread_setspecific, %function
pthread_setspecific:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L35
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r3]
	mov	r4, r0
	cmp	r3, r0
	mov	r6, r1
	beq	.L2
	bl	pthread_self
	subs	r5, r0, #0
	beq	.L31
.L3:
	cmp	r4, #0
	beq	.L14
.L15:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	cmpne	r6, #0
	bne	.L33
.L10:
	mov	r1, r6
	ldr	r0, [r4]
	bl	pte_osTlsSetValue
	ldr	r3, .L35+4
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L14
	ldr	r3, .L35+8
	ldr	r7, [r3]
.L1:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	mov	r7, #0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	bl	pthread_getspecific
	cmp	r0, #0
	movne	r5, r0
	bne	.L3
	cmp	r6, #0
	beq	.L31
	cmp	r4, #0
	ldr	r5, [r6]
	beq	.L14
	cmp	r5, #0
	beq	.L10
	b	.L15
.L33:
	add	r8, r4, #4
	mov	r0, r8
	bl	pthread_mutex_lock
	cmp	r0, #0
	beq	.L9
.L30:
	mov	r0, r8
	bl	pthread_mutex_unlock
	b	.L10
.L31:
	ldr	r3, .L35+12
	ldr	r7, [r3]
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r0, r5
	bl	pthread_mutex_lock
	ldr	r3, [r5, #4]
	cmp	r3, #0
	bne	.L13
	b	.L11
.L34:
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
.L13:
	ldr	r2, [r3, #4]
	cmp	r2, r4
	bne	.L34
	mov	r0, r5
	bl	pthread_mutex_unlock
	b	.L30
.L11:
	mov	r1, r4
	mov	r0, r5
	bl	pte_tkAssocCreate
	mov	r7, r0
	mov	r0, r5
	bl	pthread_mutex_unlock
	mov	r0, r8
	bl	pthread_mutex_unlock
	cmp	r7, #0
	bne	.L1
	b	.L10
.L36:
	.align	2
.L35:
	.word	pte_selfThreadKey
	.word	PTE_OS_OK
	.word	EAGAIN
	.word	ENOENT
	.size	pthread_setspecific, .-pthread_setspecific
	.comm	pte_selfThreadKey,4,4
	.comm	PTE_OS_OK,4,4
	.comm	ENOENT,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
