	.file	"extr_cancel6a.c_mythread.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mythread
	.type	mythread, @function
mythread:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR PTHREAD_CANCELED[rip]
	lea	r12d, 1[rax]
	mov	rax, QWORD PTR [rdi]
	xor	edi, edi
	movsx	r12, r12d
	sal	rax, 4
	add	rax, QWORD PTR threadbag[rip]
	cmp	rbx, rax
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR 8[rbx]
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	assert@PLT
	mov	DWORD PTR 8[rbx], 1
	mov	edi, DWORD PTR PTHREAD_CANCEL_ENABLE[rip]
	xor	esi, esi
	call	pthread_setcancelstate@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	assert@PLT
	mov	edi, DWORD PTR PTHREAD_CANCEL_ASYNCHRONOUS[rip]
	xor	esi, esi
	call	pthread_setcanceltype@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	assert@PLT
	mov	DWORD PTR 12[rbx], 0
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, 100
	call	Sleep@PLT
	mov	eax, DWORD PTR 12[rbx]
	add	eax, 1
	mov	DWORD PTR 12[rbx], eax
	cmp	eax, 99
	jle	.L2
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mythread, .-mythread
	.comm	threadbag,8,8
	.comm	PTHREAD_CANCEL_ENABLE,4,4
	.comm	PTHREAD_CANCEL_ASYNCHRONOUS,4,4
	.comm	PTHREAD_CANCELED,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_cancel6a.c_mythread.c"
	.text
	.align	2
	.global	mythread
	.syntax unified
	.arm
	.fpu softvfp
	.type	mythread, %function
mythread:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, .L6
	ldr	r0, [r0]
	ldr	r3, [r3]
	add	r0, r0, r0, lsl #1
	add	r0, r3, r0, lsl #2
	sub	r0, r4, r0
	clz	r0, r0
	ldr	r2, .L6+4
	lsr	r0, r0, #5
	ldr	r5, [r2]
	bl	assert
	ldr	r0, [r4, #4]
	add	r5, r5, #1
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	mov	r2, #1
	ldr	r3, .L6+8
	str	r2, [r4, #4]
	mov	r1, #0
	ldr	r0, [r3]
	bl	pthread_setcancelstate
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, .L6+12
	mov	r1, #0
	ldr	r0, [r3]
	bl	pthread_setcanceltype
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	mov	r3, #0
	str	r3, [r4, #8]
.L2:
	mov	r0, #100
	bl	Sleep
	ldr	r3, [r4, #8]
	add	r3, r3, #1
	cmp	r3, #99
	str	r3, [r4, #8]
	ble	.L2
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L7:
	.align	2
.L6:
	.word	threadbag
	.word	PTHREAD_CANCELED
	.word	PTHREAD_CANCEL_ENABLE
	.word	PTHREAD_CANCEL_ASYNCHRONOUS
	.size	mythread, .-mythread
	.comm	threadbag,4,4
	.comm	PTHREAD_CANCEL_ENABLE,4,4
	.comm	PTHREAD_CANCEL_ASYNCHRONOUS,4,4
	.comm	PTHREAD_CANCELED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
