	.file	"extr_pthread_testcancel.c_pthread_testcancel.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pthread_testcancel
	.type	pthread_testcancel, @function
pthread_testcancel:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	pthread_self@PLT
	test	rax, rax
	je	.L1
	mov	rbx, rax
	mov	rax, QWORD PTR PThreadStateCancelPending[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L11
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	lea	rbp, 4[rsp]
	lea	rdi, 20[rbx]
	mov	rsi, rbp
	call	ptw32_mcs_lock_acquire@PLT
	mov	rax, QWORD PTR PTHREAD_CANCEL_DISABLE[rip]
	cmp	QWORD PTR 8[rbx], rax
	jne	.L13
	mov	rdi, rbp
	call	ptw32_mcs_lock_release@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, DWORD PTR 16[rbx]
	call	ResetEvent@PLT
	mov	rax, QWORD PTR PThreadStateCanceling[rip]
	mov	rdi, rbp
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR PTHREAD_CANCEL_DISABLE[rip]
	mov	QWORD PTR 8[rbx], rax
	call	ptw32_mcs_lock_release@PLT
	mov	edi, DWORD PTR PTW32_EPS_CANCEL[rip]
	call	ptw32_throw@PLT
	mov	rdi, rbp
	call	ptw32_mcs_lock_release@PLT
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pthread_testcancel, .-pthread_testcancel
	.comm	PThreadStateCanceling,8,8
	.comm	PThreadStateCancelPending,8,8
	.comm	PTW32_EPS_CANCEL,4,4
	.comm	PTHREAD_CANCEL_DISABLE,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_pthread_testcancel.c_pthread_testcancel.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pthread_testcancel
	.syntax unified
	.arm
	.fpu softvfp
	.type	pthread_testcancel, %function
pthread_testcancel:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L14
	sub	sp, sp, #12
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	pthread_self
	subs	r4, r0, #0
	beq	.L1
	ldr	r3, .L14+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L11
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L11:
	ldr	r5, .L14+8
	mov	r1, sp
	add	r0, r4, #12
	bl	ptw32_mcs_lock_acquire
	ldr	r3, [r5]
	ldr	r2, [r4, #4]
	cmp	r2, r3
	bne	.L13
	mov	r0, sp
	bl	ptw32_mcs_lock_release
	b	.L1
.L13:
	ldr	r0, [r4, #8]
	bl	ResetEvent
	ldr	r3, .L14+12
	ldr	r2, [r5]
	ldr	r3, [r3]
	str	r2, [r4, #4]
	str	r3, [r4]
	mov	r0, sp
	bl	ptw32_mcs_lock_release
	ldr	r3, .L14+16
	ldr	r0, [r3]
	bl	ptw32_throw
	mov	r0, sp
	bl	ptw32_mcs_lock_release
	b	.L1
.L12:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	PThreadStateCancelPending
	.word	PTHREAD_CANCEL_DISABLE
	.word	PThreadStateCanceling
	.word	PTW32_EPS_CANCEL
	.size	pthread_testcancel, .-pthread_testcancel
	.comm	PThreadStateCanceling,4,4
	.comm	PThreadStateCancelPending,4,4
	.comm	PTW32_EPS_CANCEL,4,4
	.comm	PTHREAD_CANCEL_DISABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
