	.file	"extr_kern_kthread.c_kthread_exit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kthread_exit
	.type	kthread_exit, @function
kthread_exit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbp, QWORD PTR curthread[rip]
	mov	r12, QWORD PTR 0[rbp]
	mov	rdi, rbp
	call	wakeup@PLT
	lea	rdi, tidhash_lock[rip]
	call	rw_wlock@PLT
	mov	rdi, r12
	call	PROC_LOCK@PLT
	cmp	DWORD PTR [r12], 1
	je	.L5
.L2:
	mov	esi, DWORD PTR td_hash[rip]
	mov	rdi, rbp
	call	LIST_REMOVE@PLT
	lea	rdi, tidhash_lock[rip]
	call	rw_wunlock@PLT
	mov	rdi, rbp
	call	umtx_thread_exit@PLT
	mov	rdi, rbp
	call	tdsigcleanup@PLT
	mov	rdi, r12
	call	PROC_SLOCK@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	thread_exit@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, r12
	call	PROC_UNLOCK@PLT
	lea	rdi, tidhash_lock[rip]
	call	rw_wunlock@PLT
	xor	edi, edi
	call	kproc_exit@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	kthread_exit, .-kthread_exit
	.comm	tidhash_lock,4,4
	.comm	td_hash,4,4
	.comm	curthread,8,8
	.comm	PMC_FN_THR_EXIT_LOG,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_kern_kthread.c_kthread_exit.c"
	.text
	.align	2
	.global	kthread_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	kthread_exit, %function
kthread_exit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L6
	push	{r4, r5, r6, lr}
	ldr	r4, [r3]
	ldr	r5, [r4]
	mov	r0, r4
	bl	wakeup
	ldr	r0, .L6+4
	bl	rw_wlock
	mov	r0, r5
	bl	PROC_LOCK
	ldr	r3, [r5]
	cmp	r3, #1
	beq	.L5
.L2:
	ldr	r3, .L6+8
	mov	r0, r4
	ldr	r1, [r3]
	bl	LIST_REMOVE
	ldr	r0, .L6+4
	bl	rw_wunlock
	mov	r0, r4
	bl	umtx_thread_exit
	mov	r0, r4
	bl	tdsigcleanup
	mov	r0, r5
	bl	PROC_SLOCK
	pop	{r4, r5, r6, lr}
	b	thread_exit
.L5:
	mov	r0, r5
	bl	PROC_UNLOCK
	ldr	r0, .L6+4
	bl	rw_wunlock
	mov	r0, #0
	bl	kproc_exit
	b	.L2
.L7:
	.align	2
.L6:
	.word	curthread
	.word	tidhash_lock
	.word	td_hash
	.size	kthread_exit, .-kthread_exit
	.comm	tidhash_lock,4,4
	.comm	td_hash,4,4
	.comm	curthread,4,4
	.comm	PMC_FN_THR_EXIT_LOG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
