	.file	"150982.c"
	.intel_syntax noprefix
	.text
	.globl	num_threads
	.bss
	.align 4
	.type	num_threads, @object
	.size	num_threads, 4
num_threads:
	.zero	4
	.globl	exit_thread
	.align 4
	.type	exit_thread, @object
	.size	exit_thread, 4
exit_thread:
	.zero	4
	.globl	func_type
	.align 8
	.type	func_type, @object
	.size	func_type, 8
func_type:
	.zero	8
	.globl	thread
	.align 32
	.type	thread, @object
	.size	thread, 4800
thread:
	.zero	4800
	.globl	sigwait_list
	.data
	.align 16
	.type	sigwait_list, @object
	.size	sigwait_list, 20
sigwait_list:
	.long	10
	.long	12
	.long	28
	.long	30
	.long	-1
	.globl	start
	.bss
	.align 16
	.type	start, @object
	.size	start, 16
start:
	.zero	16
	.section	.rodata
.LC0:
	.string	"%s: tid: %d, self: %p\n"
	.text
	.globl	atexit_handler
	.type	atexit_handler, @function
atexit_handler:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	call	pthread_self@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], -1
	mov	DWORD PTR -16[rbp], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, thread[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_equal@PLT
	test	eax, eax
	je	.L3
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L4
.L3:
	add	DWORD PTR -16[rbp], 1
.L2:
	mov	eax, DWORD PTR num_threads[rip]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L5
.L4:
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	rcx, rdx
	mov	edx, eax
	lea	rsi, __func__.7[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	atexit_handler, .-atexit_handler
	.section	.rodata
	.align 8
.LC1:
	.string	"cleanup handler in wrong thread: expected: %p, actual: %p\n"
	.text
	.globl	cleanup_handler
	.type	cleanup_handler, @function
cleanup_handler:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	call	pthread_self@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_equal@PLT
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rdx]
	mov	rcx, rax
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L7:
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rcx, rdx
	mov	edx, eax
	lea	rsi, __func__.6[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cleanup_handler, .-cleanup_handler
	.section	.rodata
	.align 8
.LC2:
	.string	"tid: %d, self: %p -- begin %s\n"
	.text
	.globl	run_test_cancel
	.type	run_test_cancel, @function
run_test_cancel:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	lea	rcx, __func__.5[rip]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	call	pthread_testcancel@PLT
	jmp	.L9
	.cfi_endproc
.LFE8:
	.size	run_test_cancel, .-run_test_cancel
	.section	.rodata
.LC6:
	.string	"sum is negative: %g\n"
	.text
	.globl	run_cycles
	.type	run_cycles, @function
run_cycles:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -28[rbp], eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -28[rbp]
	lea	rcx, __func__.4[rip]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	pxor	xmm0, xmm0
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC4[rip]
	movsd	QWORD PTR -24[rbp], xmm0
	jmp	.L11
.L12:
	movsd	xmm0, QWORD PTR -16[rbp]
	addsd	xmm0, QWORD PTR -24[rbp]
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm1, QWORD PTR -24[rbp]
	movsd	xmm0, QWORD PTR .LC4[rip]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -24[rbp], xmm0
.L11:
	movsd	xmm0, QWORD PTR .LC5[rip]
	comisd	xmm0, QWORD PTR -24[rbp]
	ja	.L12
	pxor	xmm0, xmm0
	comisd	xmm0, QWORD PTR -16[rbp]
	jbe	.L13
	mov	rax, QWORD PTR -16[rbp]
	movq	xmm0, rax
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
.L13:
	jmp	.L15
	.cfi_endproc
.LFE9:
	.size	run_cycles, .-run_cycles
	.section	.rodata
.LC7:
	.string	"pthread_sigmask failed"
	.text
	.globl	run_mask
	.type	run_mask, @function
run_mask:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -152[rbp], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -172[rbp], eax
	mov	rdx, QWORD PTR -152[rbp]
	mov	eax, DWORD PTR -172[rbp]
	lea	rcx, __func__.3[rip]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	sigfillset@PLT
	lea	rax, -144[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 0
	call	pthread_sigmask@PLT
	test	eax, eax
	je	.L18
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L18:
	pxor	xmm0, xmm0
	movsd	QWORD PTR -160[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC4[rip]
	movsd	QWORD PTR -168[rbp], xmm0
	jmp	.L19
.L20:
	movsd	xmm0, QWORD PTR -160[rbp]
	addsd	xmm0, QWORD PTR -168[rbp]
	movsd	QWORD PTR -160[rbp], xmm0
	movsd	xmm1, QWORD PTR -168[rbp]
	movsd	xmm0, QWORD PTR .LC4[rip]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -168[rbp], xmm0
.L19:
	movsd	xmm0, QWORD PTR .LC5[rip]
	comisd	xmm0, QWORD PTR -168[rbp]
	ja	.L20
	pxor	xmm0, xmm0
	comisd	xmm0, QWORD PTR -160[rbp]
	jbe	.L21
	mov	rax, QWORD PTR -160[rbp]
	movq	xmm0, rax
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
.L21:
	jmp	.L18
	.cfi_endproc
.LFE10:
	.size	run_mask, .-run_mask
	.section	.rodata
.LC8:
	.string	"tid: %d, self: %p -- begin %s"
.LC9:
	.string	"%c %d"
	.align 8
.LC10:
	.string	"%s: tid: %d, signal: %d, ret: %d\n"
	.text
	.globl	run_sigwait
	.type	run_sigwait, @function
run_sigwait:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 688
	mov	QWORD PTR -680[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -680[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -648[rbp], rax
	mov	rax, QWORD PTR -680[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -656[rbp], eax
	lea	rax, -640[rbp]
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	rcx, QWORD PTR -648[rbp]
	mov	edx, DWORD PTR -656[rbp]
	lea	rax, -512[rbp]
	lea	r8, __func__.2[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR -660[rbp], eax
	mov	BYTE PTR -669[rbp], 58
	mov	DWORD PTR -664[rbp], 0
	jmp	.L26
.L27:
	mov	eax, DWORD PTR -664[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sigwait_list[rip]
	mov	edx, DWORD PTR [rdx+rax]
	lea	rax, -640[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	sigaddset@PLT
	mov	eax, DWORD PTR -664[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sigwait_list[rip]
	mov	edx, DWORD PTR [rdx+rax]
	movsx	eax, BYTE PTR -669[rbp]
	lea	rsi, -512[rbp]
	mov	ecx, DWORD PTR -660[rbp]
	movsx	rcx, ecx
	lea	rdi, [rsi+rcx]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC9[rip]
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -660[rbp], eax
	mov	BYTE PTR -669[rbp], 44
	add	DWORD PTR -664[rbp], 1
.L26:
	mov	eax, DWORD PTR -664[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sigwait_list[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jg	.L27
	lea	rax, -512[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rax, -640[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 0
	call	pthread_sigmask@PLT
	test	eax, eax
	je	.L28
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L28:
	lea	rdx, -668[rbp]
	lea	rax, -640[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	sigwait@PLT
	mov	DWORD PTR -652[rbp], eax
	mov	edx, DWORD PTR -668[rbp]
	mov	ecx, DWORD PTR -652[rbp]
	mov	eax, DWORD PTR -656[rbp]
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, __func__.2[rip]
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L28
	.cfi_endproc
.LFE11:
	.size	run_sigwait, .-run_sigwait
	.section	.rodata
	.align 8
.LC11:
	.string	"------------------------------"
	.align 8
.LC12:
	.string	"%s: tid: %d -- calling exit(%d)\n"
	.text
	.globl	run_exit
	.type	run_exit, @function
run_exit:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -60[rbp], eax
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -60[rbp]
	lea	rcx, __func__.1[rip]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR start[rip]
	add	rax, 6
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR exit_thread[rip]
	cmp	DWORD PTR -60[rbp], eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR -64[rbp], eax
.L34:
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	cmp	DWORD PTR -64[rbp], 0
	je	.L31
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	sub	rdx, 3
	cmp	rax, rdx
	jl	.L31
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	DWORD PTR -64[rbp], 0
.L31:
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	cmp	rdx, rax
	jge	.L37
	jmp	.L34
.L37:
	nop
	mov	edx, DWORD PTR -60[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, __func__.1[rip]
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE12:
	.size	run_exit, .-run_exit
	.section	.rodata
	.align 8
.LC13:
	.string	"%s: tid: %d -- calling _exit(%d)\n"
	.text
	.globl	run_u_exit
	.type	run_u_exit, @function
run_u_exit:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -60[rbp], eax
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -60[rbp]
	lea	rcx, __func__.0[rip]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR start[rip]
	add	rax, 6
	mov	QWORD PTR -32[rbp], rax
.L41:
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	cmp	rdx, rax
	jge	.L44
	jmp	.L41
.L44:
	nop
	mov	edx, DWORD PTR -60[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, __func__.0[rip]
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	_exit@PLT
	.cfi_endproc
.LFE13:
	.size	run_u_exit, .-run_u_exit
	.section	.rodata
.LC14:
	.string	"cancel"
.LC15:
	.string	"testcancel"
.LC16:
	.string	"cycles"
.LC17:
	.string	"mask"
.LC18:
	.string	"sigwait"
.LC19:
	.string	"exit"
.LC20:
	.string	"_exit"
	.align 8
.LC21:
	.string	"==> end of thread %d, should not get here\n"
	.text
	.globl	my_thread
	.type	my_thread, @function
my_thread:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	QWORD PTR -152[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -152[rbp]
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -144[rbp], eax
	call	pthread_self@PLT
	mov	rdx, QWORD PTR -136[rbp]
	mov	QWORD PTR [rdx], rax
	lea	rax, cleanup_handler[rip]
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	mov	QWORD PTR -120[rbp], rax
	lea	rax, -112[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	__sigsetjmp@PLT
	endbr64
	mov	DWORD PTR -140[rbp], eax
	mov	eax, DWORD PTR -140[rbp]
	cdqe
	test	rax, rax
	je	.L47
	mov	rax, QWORD PTR -120[rbp]
	mov	rdx, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	rdx
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	__pthread_unwind_next@PLT
.L47:
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	__pthread_register_cancel@PLT
	mov	eax, DWORD PTR exit_thread[rip]
	cmp	DWORD PTR -144[rbp], eax
	jne	.L48
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_exit
	jmp	.L49
.L48:
	mov	rax, QWORD PTR func_type[rip]
	mov	edx, 3
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L50
	mov	rax, QWORD PTR func_type[rip]
	mov	edx, 3
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L51
.L50:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_test_cancel
	jmp	.L49
.L51:
	mov	rax, QWORD PTR func_type[rip]
	mov	edx, 3
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L52
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_cycles
	jmp	.L49
.L52:
	mov	rax, QWORD PTR func_type[rip]
	mov	edx, 3
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L53
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_mask
	jmp	.L49
.L53:
	mov	rax, QWORD PTR func_type[rip]
	mov	edx, 3
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L54
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_sigwait
	jmp	.L49
.L54:
	mov	rax, QWORD PTR func_type[rip]
	mov	edx, 3
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L55
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_exit
	jmp	.L49
.L55:
	mov	rax, QWORD PTR func_type[rip]
	mov	edx, 3
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L56
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_u_exit
	jmp	.L49
.L56:
	cmp	DWORD PTR -144[rbp], 1
	jg	.L57
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_cycles
	jmp	.L49
.L57:
	cmp	DWORD PTR -144[rbp], 2
	jne	.L58
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_mask
	jmp	.L49
.L58:
	cmp	DWORD PTR -144[rbp], 3
	jne	.L59
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_sigwait
	jmp	.L49
.L59:
	cmp	DWORD PTR -144[rbp], 4
	jne	.L60
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_test_cancel
	jmp	.L49
.L60:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	run_u_exit
.L49:
	mov	eax, DWORD PTR -144[rbp]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	__pthread_unregister_cancel@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	my_thread, .-my_thread
	.section	.rodata
.LC22:
	.string	"%d"
.LC23:
	.string	"various"
	.align 8
.LC24:
	.string	"num threads: %d, function type: %s\n"
.LC25:
	.string	"atexit failed"
.LC26:
	.string	"pthread_create failed"
	.align 8
.LC27:
	.string	"==> end of main, should not get here"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 1
	jle	.L64
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, num_threads[rip]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	test	eax, eax
	jg	.L65
.L64:
	mov	DWORD PTR num_threads[rip], 8
.L65:
	lea	rax, .LC23[rip]
	mov	QWORD PTR func_type[rip], rax
	mov	DWORD PTR -28[rbp], 8
	cmp	DWORD PTR -36[rbp], 2
	jle	.L66
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR func_type[rip], rax
	mov	DWORD PTR -28[rbp], 2
.L66:
	mov	eax, DWORD PTR num_threads[rip]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L67
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR num_threads[rip], eax
.L67:
	mov	eax, DWORD PTR num_threads[rip]
	sub	eax, 1
	mov	DWORD PTR exit_thread[rip], eax
	mov	rdx, QWORD PTR func_type[rip]
	mov	eax, DWORD PTR num_threads[rip]
	mov	esi, eax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, atexit_handler[rip]
	call	atexit@PLT
	test	eax, eax
	je	.L68
	lea	rsi, .LC25[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L68:
	mov	esi, 0
	lea	rdi, start[rip]
	call	gettimeofday@PLT
	mov	DWORD PTR -32[rbp], 1
	jmp	.L69
.L71:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, thread[rip]
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	lea	rdx, my_thread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L70
	lea	rsi, .LC26[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L70:
	mov	edi, 50000
	call	usleep@PLT
	add	DWORD PTR -32[rbp], 1
.L69:
	mov	eax, DWORD PTR num_threads[rip]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L71
	lea	rax, thread[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	my_thread
	lea	rdi, .LC27[rip]
	call	puts@PLT
	mov	eax, 42
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L73
	call	__stack_chk_fail@PLT
.L73:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__func__.7, @object
	.size	__func__.7, 15
__func__.7:
	.string	"atexit_handler"
	.align 16
	.type	__func__.6, @object
	.size	__func__.6, 16
__func__.6:
	.string	"cleanup_handler"
	.align 16
	.type	__func__.5, @object
	.size	__func__.5, 16
__func__.5:
	.string	"run_test_cancel"
	.align 8
	.type	__func__.4, @object
	.size	__func__.4, 11
__func__.4:
	.string	"run_cycles"
	.align 8
	.type	__func__.3, @object
	.size	__func__.3, 9
__func__.3:
	.string	"run_mask"
	.align 8
	.type	__func__.2, @object
	.size	__func__.2, 12
__func__.2:
	.string	"run_sigwait"
	.align 8
	.type	__func__.1, @object
	.size	__func__.1, 9
__func__.1:
	.string	"run_exit"
	.align 8
	.type	__func__.0, @object
	.size	__func__.0, 11
__func__.0:
	.string	"run_u_exit"
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.align 8
.LC5:
	.long	0
	.long	1095963344
	.weak	__pthread_unwind_next
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"150982.c"
	.text
	.comm	num_threads,4,4
	.comm	exit_thread,4,4
	.comm	func_type,4,4
	.comm	thread,2400,4
	.global	sigwait_list
	.data
	.align	2
	.type	sigwait_list, %object
	.size	sigwait_list, 20
sigwait_list:
	.word	10
	.word	12
	.word	28
	.word	30
	.word	-1
	.comm	start,8,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s: tid: %d, self: %p\012\000"
	.text
	.align	2
	.global	atexit_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	atexit_handler, %function
atexit_handler:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	bl	pthread_self
	str	r0, [fp, #-8]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L5:
	ldr	r2, .L6
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	pthread_equal
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	b	.L4
.L3:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, .L6+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L5
.L4:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r1, .L6+8
	ldr	r0, .L6+12
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	thread
	.word	num_threads
	.word	__func__.6816
	.word	.LC0
	.size	atexit_handler, .-atexit_handler
	.section	.rodata
	.align	2
.LC1:
	.ascii	"cleanup handler in wrong thread: expected: %p, actu"
	.ascii	"al: %p\012\000"
	.text
	.align	2
	.global	cleanup_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	cleanup_handler, %function
cleanup_handler:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	bl	pthread_self
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	pthread_equal
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-12]
	ldr	r1, .L10
	mov	r0, #1
	bl	errx
.L9:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r1, .L10+4
	ldr	r0, .L10+8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	__func__.6823
	.word	.LC0
	.size	cleanup_handler, .-cleanup_handler
	.section	.rodata
	.align	2
.LC2:
	.ascii	"tid: %d, self: %p -- begin %s\012\000"
	.text
	.align	2
	.global	run_test_cancel
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_test_cancel, %function
run_test_cancel:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, .L14
	ldr	r1, [fp, #-8]
	ldr	r0, .L14+4
	bl	printf
.L13:
	bl	pthread_testcancel
	b	.L13
.L15:
	.align	2
.L14:
	.word	__func__.6829
	.word	.LC2
	.size	run_test_cancel, .-run_test_cancel
	.global	__aeabi_dadd
	.global	__aeabi_dcmplt
	.section	.rodata
	.align	2
.LC3:
	.ascii	"sum is negative: %g\012\000"
	.text
	.align	2
	.global	run_cycles
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_cycles, %function
run_cycles:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	ldr	r3, .L23
	ldr	r1, [fp, #-24]
	ldr	r0, .L23+4
	bl	printf
.L21:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	mov	r2, #0
	ldr	r3, .L23+8
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L17
.L18:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	mov	r2, #0
	ldr	r3, .L23+8
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
.L17:
	mov	r2, #0
	ldr	r3, .L23+12
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	bne	.L18
	mov	r2, #0
	mov	r3, #0
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L23+16
	bl	printf
.L19:
	b	.L21
.L24:
	.align	2
.L23:
	.word	__func__.6838
	.word	.LC2
	.word	1072693248
	.word	1095963344
	.word	.LC3
	.size	run_cycles, .-run_cycles
	.section	.rodata
	.align	2
.LC4:
	.ascii	"pthread_sigmask failed\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	run_mask
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_mask, %function
run_mask:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	str	r0, [fp, #-168]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-168]
	ldr	r3, [r3]
	str	r3, [fp, #-164]
	ldr	r3, [fp, #-168]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-160]
	ldr	r2, [fp, #-164]
	ldr	r3, .L33+4
	ldr	r1, [fp, #-160]
	ldr	r0, .L33+8
	bl	printf
	sub	r3, fp, #136
	mov	r0, r3
	bl	sigfillset
	sub	r3, fp, #136
	mov	r2, #0
	mov	r1, r3
	mov	r0, #0
	bl	pthread_sigmask
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	ldr	r1, .L33+12
	mov	r0, #1
	bl	err
.L26:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-148]
	str	r3, [fp, #-144]
	mov	r2, #0
	ldr	r3, .L33+16
	str	r2, [fp, #-156]
	str	r3, [fp, #-152]
	b	.L27
.L28:
	sub	r3, fp, #156
	ldmia	r3, {r2-r3}
	sub	r1, fp, #148
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-148]
	str	r3, [fp, #-144]
	mov	r2, #0
	ldr	r3, .L33+16
	sub	r1, fp, #156
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-156]
	str	r3, [fp, #-152]
.L27:
	mov	r2, #0
	ldr	r3, .L33+20
	sub	r1, fp, #156
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	bne	.L28
	mov	r2, #0
	mov	r3, #0
	sub	r1, fp, #148
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L29
	sub	r3, fp, #148
	ldmia	r3, {r2-r3}
	ldr	r0, .L33+24
	bl	printf
.L29:
	b	.L26
.L34:
	.align	2
.L33:
	.word	.LC5
	.word	__func__.6851
	.word	.LC2
	.word	.LC4
	.word	1072693248
	.word	1095963344
	.word	.LC3
	.size	run_mask, .-run_mask
	.section	.rodata
	.align	2
.LC6:
	.ascii	"tid: %d, self: %p -- begin %s\000"
	.align	2
.LC7:
	.ascii	"%c %d\000"
	.align	2
.LC8:
	.ascii	"%s: tid: %d, signal: %d, ret: %d\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	run_sigwait
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_sigwait, %function
run_sigwait:
	@ args = 0, pretend = 0, frame = 672
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #680
	str	r0, [fp, #-672]
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-672]
	ldr	r3, [r3]
	str	r3, [fp, #-648]
	ldr	r3, [fp, #-672]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-644]
	sub	r3, fp, #636
	mov	r0, r3
	bl	sigemptyset
	ldr	r3, [fp, #-648]
	sub	r0, fp, #508
	ldr	r2, .L40+4
	str	r2, [sp]
	ldr	r2, [fp, #-644]
	ldr	r1, .L40+8
	bl	sprintf
	str	r0, [fp, #-652]
	mov	r3, #58
	strb	r3, [fp, #-661]
	mov	r3, #0
	str	r3, [fp, #-656]
	b	.L36
.L37:
	ldr	r2, .L40+12
	ldr	r3, [fp, #-656]
	ldr	r2, [r2, r3, lsl #2]
	sub	r3, fp, #636
	mov	r1, r2
	mov	r0, r3
	bl	sigaddset
	sub	r2, fp, #508
	ldr	r3, [fp, #-652]
	add	r0, r2, r3
	ldrb	r2, [fp, #-661]	@ zero_extendqisi2
	ldr	r1, .L40+12
	ldr	r3, [fp, #-656]
	ldr	r3, [r1, r3, lsl #2]
	ldr	r1, .L40+16
	bl	sprintf
	mov	r2, r0
	ldr	r3, [fp, #-652]
	add	r3, r3, r2
	str	r3, [fp, #-652]
	mov	r3, #44
	strb	r3, [fp, #-661]
	ldr	r3, [fp, #-656]
	add	r3, r3, #1
	str	r3, [fp, #-656]
.L36:
	ldr	r2, .L40+12
	ldr	r3, [fp, #-656]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bgt	.L37
	sub	r3, fp, #508
	mov	r0, r3
	bl	puts
	sub	r3, fp, #636
	mov	r2, #0
	mov	r1, r3
	mov	r0, #0
	bl	pthread_sigmask
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	ldr	r1, .L40+20
	mov	r0, #1
	bl	err
.L38:
	sub	r2, fp, #660
	sub	r3, fp, #636
	mov	r1, r2
	mov	r0, r3
	bl	sigwait
	str	r0, [fp, #-640]
	ldr	r2, [fp, #-660]
	ldr	r3, [fp, #-640]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-644]
	ldr	r1, .L40+4
	ldr	r0, .L40+24
	bl	printf
	b	.L38
.L41:
	.align	2
.L40:
	.word	.LC9
	.word	__func__.6868
	.word	.LC6
	.word	sigwait_list
	.word	.LC7
	.word	.LC4
	.word	.LC8
	.size	run_sigwait, .-run_sigwait
	.section	.rodata
	.align	2
.LC10:
	.ascii	"------------------------------\000"
	.align	2
.LC11:
	.ascii	"%s: tid: %d -- calling exit(%d)\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	run_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_exit, %function
run_exit:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r3, .L50+4
	ldr	r1, [fp, #-28]
	ldr	r0, .L50+8
	bl	printf
	ldr	r3, .L50+12
	ldr	r3, [r3]
	add	r3, r3, #6
	str	r3, [fp, #-16]
	ldr	r3, .L50+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	str	r3, [fp, #-36]
.L46:
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L43
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #3
	cmp	r2, r3
	blt	.L43
	ldr	r0, .L50+20
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-36]
.L43:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bge	.L49
	b	.L46
.L49:
	nop
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-28]
	ldr	r1, .L50+4
	ldr	r0, .L50+24
	bl	printf
	ldr	r0, [fp, #-28]
	bl	exit
.L51:
	.align	2
.L50:
	.word	.LC12
	.word	__func__.6881
	.word	.LC2
	.word	start
	.word	exit_thread
	.word	.LC10
	.word	.LC11
	.size	run_exit, .-run_exit
	.section	.rodata
	.align	2
.LC13:
	.ascii	"%s: tid: %d -- calling _exit(%d)\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	run_u_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_u_exit, %function
run_u_exit:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L59
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r3, .L59+4
	ldr	r1, [fp, #-28]
	ldr	r0, .L59+8
	bl	printf
	ldr	r3, .L59+12
	ldr	r3, [r3]
	add	r3, r3, #6
	str	r3, [fp, #-16]
.L55:
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bge	.L58
	b	.L55
.L58:
	nop
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-28]
	ldr	r1, .L59+4
	ldr	r0, .L59+16
	bl	printf
	ldr	r0, [fp, #-28]
	bl	_exit
.L60:
	.align	2
.L59:
	.word	.LC14
	.word	__func__.6891
	.word	.LC2
	.word	start
	.word	.LC13
	.size	run_u_exit, .-run_u_exit
	.section	.rodata
	.align	2
.LC15:
	.ascii	"cancel\000"
	.align	2
.LC16:
	.ascii	"testcancel\000"
	.align	2
.LC17:
	.ascii	"cycles\000"
	.align	2
.LC18:
	.ascii	"mask\000"
	.align	2
.LC19:
	.ascii	"sigwait\000"
	.align	2
.LC20:
	.ascii	"exit\000"
	.align	2
.LC21:
	.ascii	"_exit\000"
	.align	2
.LC22:
	.ascii	"==> end of thread %d, should not get here\012\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	my_thread
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_thread, %function
my_thread:
	@ args = 0, pretend = 0, frame = 320
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #320
	str	r0, [fp, #-320]
	ldr	r3, .L79
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-320]
	str	r3, [fp, #-312]
	ldr	r3, [fp, #-312]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-308]
	bl	pthread_self
	mov	r2, r0
	ldr	r3, [fp, #-312]
	str	r2, [r3]
	ldr	r3, .L79+4
	str	r3, [fp, #-304]
	ldr	r3, [fp, #-312]
	str	r3, [fp, #-300]
	sub	r3, fp, #292
	mov	r1, #0
	mov	r0, r3
	bl	__sigsetjmp
	mov	r3, r0
	str	r3, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	beq	.L63
	ldr	r3, [fp, #-304]
	ldr	r0, [fp, #-300]
	blx	r3
	sub	r3, fp, #292
	mov	r0, r3
	bl	__pthread_unwind_next
.L63:
	sub	r3, fp, #292
	mov	r0, r3
	bl	__pthread_register_cancel
	ldr	r3, .L79+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-308]
	cmp	r2, r3
	bne	.L64
	ldr	r0, [fp, #-312]
	bl	run_exit
	b	.L65
.L64:
	ldr	r3, .L79+12
	ldr	r3, [r3]
	mov	r2, #3
	ldr	r1, .L79+16
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L66
	ldr	r3, .L79+12
	ldr	r3, [r3]
	mov	r2, #3
	ldr	r1, .L79+20
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L67
.L66:
	ldr	r0, [fp, #-312]
	bl	run_test_cancel
	b	.L65
.L67:
	ldr	r3, .L79+12
	ldr	r3, [r3]
	mov	r2, #3
	ldr	r1, .L79+24
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L68
	ldr	r0, [fp, #-312]
	bl	run_cycles
	b	.L65
.L68:
	ldr	r3, .L79+12
	ldr	r3, [r3]
	mov	r2, #3
	ldr	r1, .L79+28
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L69
	ldr	r0, [fp, #-312]
	bl	run_mask
	b	.L65
.L69:
	ldr	r3, .L79+12
	ldr	r3, [r3]
	mov	r2, #3
	ldr	r1, .L79+32
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L70
	ldr	r0, [fp, #-312]
	bl	run_sigwait
	b	.L65
.L70:
	ldr	r3, .L79+12
	ldr	r3, [r3]
	mov	r2, #3
	ldr	r1, .L79+36
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L71
	ldr	r0, [fp, #-312]
	bl	run_exit
	b	.L65
.L71:
	ldr	r3, .L79+12
	ldr	r3, [r3]
	mov	r2, #3
	ldr	r1, .L79+40
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L72
	ldr	r0, [fp, #-312]
	bl	run_u_exit
	b	.L65
.L72:
	ldr	r3, [fp, #-308]
	cmp	r3, #1
	bgt	.L73
	ldr	r0, [fp, #-312]
	bl	run_cycles
	b	.L65
.L73:
	ldr	r3, [fp, #-308]
	cmp	r3, #2
	bne	.L74
	ldr	r0, [fp, #-312]
	bl	run_mask
	b	.L65
.L74:
	ldr	r3, [fp, #-308]
	cmp	r3, #3
	bne	.L75
	ldr	r0, [fp, #-312]
	bl	run_sigwait
	b	.L65
.L75:
	ldr	r3, [fp, #-308]
	cmp	r3, #4
	bne	.L76
	ldr	r0, [fp, #-312]
	bl	run_test_cancel
	b	.L65
.L76:
	ldr	r0, [fp, #-312]
	bl	run_u_exit
.L65:
	ldr	r1, [fp, #-308]
	ldr	r0, .L79+44
	bl	printf
	sub	r3, fp, #292
	mov	r0, r3
	bl	__pthread_unregister_cancel
	mov	r3, #0
	ldr	r2, .L79
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L78
	bl	__stack_chk_fail
.L78:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L80:
	.align	2
.L79:
	.word	.LC23
	.word	cleanup_handler
	.word	exit_thread
	.word	func_type
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	my_thread, .-my_thread
	.section	.rodata
	.align	2
.LC24:
	.ascii	"%d\000"
	.align	2
.LC25:
	.ascii	"various\000"
	.align	2
.LC26:
	.ascii	"num threads: %d, function type: %s\012\000"
	.align	2
.LC27:
	.ascii	"atexit failed\000"
	.align	2
.LC28:
	.ascii	"pthread_create failed\000"
	.align	2
.LC29:
	.ascii	"==> end of main, should not get here\000"
	.align	2
.LC30:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L92
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	ble	.L82
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L92+4
	ldr	r1, .L92+8
	mov	r0, r3
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #0
	bgt	.L83
.L82:
	ldr	r3, .L92+4
	mov	r2, #8
	str	r2, [r3]
.L83:
	ldr	r3, .L92+12
	ldr	r2, .L92+16
	str	r2, [r3]
	mov	r3, #8
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	ble	.L84
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #8]
	ldr	r2, .L92+12
	str	r3, [r2]
	mov	r3, #2
	str	r3, [fp, #-16]
.L84:
	ldr	r3, .L92+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L85
	ldr	r2, .L92+4
	ldr	r3, [fp, #-16]
	str	r3, [r2]
.L85:
	ldr	r3, .L92+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L92+20
	str	r3, [r2]
	ldr	r3, .L92+4
	ldr	r3, [r3]
	ldr	r2, .L92+12
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L92+24
	bl	printf
	ldr	r0, .L92+28
	bl	atexit
	mov	r3, r0
	cmp	r3, #0
	beq	.L86
	ldr	r1, .L92+32
	mov	r0, #1
	bl	err
.L86:
	mov	r1, #0
	ldr	r0, .L92+36
	bl	gettimeofday
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L87
.L89:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, .L92+40
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #4]
	sub	r0, fp, #24
	ldr	r3, [fp, #-12]
	ldr	r2, .L92+44
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L88
	ldr	r1, .L92+48
	mov	r0, #1
	bl	err
.L88:
	ldr	r0, .L92+52
	bl	usleep
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L87:
	ldr	r3, .L92+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L89
	ldr	r3, .L92+40
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r0, [fp, #-12]
	bl	my_thread
	ldr	r0, .L92+56
	bl	puts
	mov	r3, #42
	ldr	r2, .L92
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L91
	bl	__stack_chk_fail
.L91:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L93:
	.align	2
.L92:
	.word	.LC30
	.word	num_threads
	.word	.LC24
	.word	func_type
	.word	.LC25
	.word	exit_thread
	.word	.LC26
	.word	atexit_handler
	.word	.LC27
	.word	start
	.word	thread
	.word	my_thread
	.word	.LC28
	.word	50000
	.word	.LC29
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__func__.6816, %object
	.size	__func__.6816, 15
__func__.6816:
	.ascii	"atexit_handler\000"
	.align	2
	.type	__func__.6823, %object
	.size	__func__.6823, 16
__func__.6823:
	.ascii	"cleanup_handler\000"
	.align	2
	.type	__func__.6829, %object
	.size	__func__.6829, 16
__func__.6829:
	.ascii	"run_test_cancel\000"
	.align	2
	.type	__func__.6838, %object
	.size	__func__.6838, 11
__func__.6838:
	.ascii	"run_cycles\000"
	.align	2
	.type	__func__.6851, %object
	.size	__func__.6851, 9
__func__.6851:
	.ascii	"run_mask\000"
	.align	2
	.type	__func__.6868, %object
	.size	__func__.6868, 12
__func__.6868:
	.ascii	"run_sigwait\000"
	.align	2
	.type	__func__.6881, %object
	.size	__func__.6881, 9
__func__.6881:
	.ascii	"run_exit\000"
	.align	2
	.type	__func__.6891, %object
	.size	__func__.6891, 11
__func__.6891:
	.ascii	"run_u_exit\000"
	.weak	__pthread_unwind_next
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
