	.file	"extr_cancel1.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Thread %d: started %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR NUMTHREADS[rip]
	mov	rsi, rsp
	add	eax, 1
	cdqe
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L19:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L19
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L20
.L4:
	lea	r13, 7[rsp]
	xor	eax, eax
	call	pthread_self@PLT
	mov	rbx, r13
	xor	edi, edi
	and	r13, -8
	shr	rbx, 3
	test	rax, rax
	mov	QWORD PTR 0[0+rbx*8], rax
	setne	dil
	call	assert@PLT
	mov	edi, DWORD PTR NUMTHREADS[rip]
	test	edi, edi
	jle	.L5
	mov	r12d, 8
	mov	ebx, 1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rcx, QWORD PTR threadbag[rip]
	mov	edx, DWORD PTR mythread[rip]
	lea	rdi, 0[r13+r12]
	xor	esi, esi
	add	rcx, r12
	mov	DWORD PTR 4[rcx], ebx
	mov	DWORD PTR [rcx], 0
	call	pthread_create@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	add	ebx, 1
	add	r12, 8
	call	assert@PLT
	mov	edi, DWORD PTR NUMTHREADS[rip]
	cmp	edi, ebx
	jge	.L6
.L5:
	imul	edi, edi, 100
	call	Sleep@PLT
	mov	eax, DWORD PTR NUMTHREADS[rip]
	test	eax, eax
	jle	.L11
	mov	r12d, 8
	mov	ebx, 1
	lea	r14, .LC0[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	add	ebx, 1
	add	r12, 8
	cmp	DWORD PTR NUMTHREADS[rip], ebx
	jl	.L21
.L9:
	mov	rax, QWORD PTR threadbag[rip]
	mov	r13d, DWORD PTR [rax+r12]
	test	r13d, r13d
	jne	.L8
	mov	edi, DWORD PTR stderr[rip]
	xor	ecx, ecx
	mov	edx, ebx
	mov	rsi, r14
	add	ebx, 1
	add	r12, 8
	call	fprintf@PLT
	cmp	DWORD PTR NUMTHREADS[rip], ebx
	jge	.L9
.L21:
	xor	r12d, r12d
	test	r13d, r13d
	sete	r12b
.L7:
	xor	r12d, 1
	mov	edi, r12d
	call	assert@PLT
	mov	edi, r12d
	call	assert@PLT
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	lea	rsp, -32[rbp]
	xor	eax, eax
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L20:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L11:
	xor	r12d, r12d
	jmp	.L7
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	threadbag,8,8
	.comm	stderr,4,4
	.comm	mythread,4,4
	.comm	NUMTHREADS,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_cancel1.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Thread %d: started %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #8
	ldr	r6, .L15
	ldr	r3, .L15+4
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r3, [r6]
	lsl	r3, r3, #2
	add	r3, r3, #11
	bic	r3, r3, #7
	sub	sp, sp, r3
	bl	pthread_self
	mov	r5, sp
	str	r0, [r5]
	subs	r0, r0, #0
	movne	r0, #1
	bl	assert
	ldr	r0, [r6]
	cmp	r0, #0
	ble	.L2
	mov	r4, #1
	mov	r9, #0
	ldr	r7, .L15+8
	ldr	r8, .L15+12
	add	r5, r5, #4
.L3:
	ldr	r1, [r7]
	ldr	r2, [r8]
	add	r3, r1, r4, lsl #3
	str	r9, [r1, r4, lsl #3]
	mov	r0, r5
	str	r4, [r3, #4]
	mov	r1, #0
	bl	pthread_create
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r0, [r6]
	add	r4, r4, #1
	cmp	r0, r4
	add	r5, r5, #4
	bge	.L3
.L2:
	add	r0, r0, r0, lsl #2
	add	r0, r0, r0, lsl #2
	lsl	r0, r0, #2
	bl	Sleep
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L8
	mov	r4, #1
	ldr	r7, .L15+8
	ldr	r8, .L15+16
	ldr	r9, .L15+20
	b	.L6
.L5:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	blt	.L13
.L6:
	ldr	r3, [r7]
	ldr	r5, [r3, r4, lsl #3]
	cmp	r5, #0
	bne	.L5
	mov	r3, r5
	mov	r2, r4
	mov	r1, r9
	ldr	r0, [r8]
	bl	fprintf
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bge	.L6
.L13:
	clz	r5, r5
	lsr	r5, r5, #5
.L4:
	eor	r5, r5, #1
	mov	r0, r5
	bl	assert
	mov	r0, r5
	bl	assert
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, #0
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L8:
	mov	r5, #0
	b	.L4
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	NUMTHREADS
	.word	.LC1
	.word	threadbag
	.word	mythread
	.word	stderr
	.word	.LC0
	.size	main, .-main
	.comm	threadbag,4,4
	.comm	stderr,4,4
	.comm	mythread,4,4
	.comm	NUMTHREADS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
