	.file	"extr_process_64.c_flush_thread.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	flush_thread
	.type	flush_thread, @function
flush_thread:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	xor	eax, eax
	call	current_thread_info@PLT
	mov	esi, DWORD PTR TIF_ABI_PENDING[rip]
	mov	rdi, rax
	mov	rbx, rax
	call	test_ti_thread_flag@PLT
	test	rax, rax
	jne	.L18
.L2:
	mov	rax, QWORD PTR 32[rbx]
	mov	rdi, QWORD PTR [rax]
	test	rdi, rdi
	je	.L4
	call	tsb_context_switch@PLT
.L4:
	xor	edi, edi
	call	set_thread_wsaved@PLT
	mov	edi, DWORD PTR TIF_PERFCTR[rip]
	call	test_and_clear_thread_flag@PLT
	test	rax, rax
	jne	.L19
.L5:
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR [rax], 0
	xor	eax, eax
	call	get_thread_current_ds@PLT
	cmp	rax, QWORD PTR ASI_AIUS[rip]
	jne	.L20
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	edi, DWORD PTR USER_DS[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	set_fs@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	QWORD PTR 16[rbx], 0
	xor	edi, edi
	mov	DWORD PTR 24[rbx], 0
	mov	QWORD PTR 8[rbx], 0
	call	write_pcr@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR TIF_ABI_PENDING[rip]
	mov	rdi, rbx
	call	clear_ti_thread_flag@PLT
	mov	esi, DWORD PTR TIF_32BIT[rip]
	mov	rdi, rbx
	call	test_ti_thread_flag@PLT
	mov	esi, DWORD PTR TIF_32BIT[rip]
	mov	rdi, rbx
	test	rax, rax
	je	.L3
	call	clear_ti_thread_flag@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	call	set_ti_thread_flag@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	flush_thread, .-flush_thread
	.comm	USER_DS,4,4
	.comm	TIF_PERFCTR,4,4
	.comm	TIF_ABI_PENDING,4,4
	.comm	TIF_32BIT,4,4
	.comm	ASI_AIUS,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_process_64.c_flush_thread.c"
	.text
	.align	2
	.global	flush_thread
	.syntax unified
	.arm
	.fpu softvfp
	.type	flush_thread, %function
flush_thread:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	bl	current_thread_info
	ldr	r5, .L20
	mov	r4, r0
	ldr	r1, [r5]
	bl	test_ti_thread_flag
	cmp	r0, #0
	bne	.L18
.L2:
	ldr	r3, [r4, #16]
	ldr	r0, [r3]
	cmp	r0, #0
	beq	.L4
	bl	tsb_context_switch
.L4:
	mov	r0, #0
	bl	set_thread_wsaved
	ldr	r3, .L20+4
	ldr	r0, [r3]
	bl	test_and_clear_thread_flag
	cmp	r0, #0
	bne	.L19
.L5:
	mov	r2, #0
	ldr	r3, [r4]
	str	r2, [r3]
	bl	get_thread_current_ds
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r0, r3
	popeq	{r4, r5, r6, pc}
	ldr	r3, .L20+12
	pop	{r4, r5, r6, lr}
	ldr	r0, [r3]
	b	set_fs
.L19:
	mov	r0, #0
	str	r0, [r4, #8]
	str	r0, [r4, #12]
	str	r0, [r4, #4]
	bl	write_pcr
	b	.L5
.L18:
	ldr	r6, .L20+16
	ldr	r1, [r5]
	mov	r0, r4
	bl	clear_ti_thread_flag
	ldr	r1, [r6]
	mov	r0, r4
	bl	test_ti_thread_flag
	cmp	r0, #0
	ldr	r1, [r6]
	mov	r0, r4
	beq	.L3
	bl	clear_ti_thread_flag
	b	.L2
.L3:
	bl	set_ti_thread_flag
	b	.L2
.L21:
	.align	2
.L20:
	.word	TIF_ABI_PENDING
	.word	TIF_PERFCTR
	.word	ASI_AIUS
	.word	USER_DS
	.word	TIF_32BIT
	.size	flush_thread, .-flush_thread
	.comm	USER_DS,4,4
	.comm	TIF_PERFCTR,4,4
	.comm	TIF_ABI_PENDING,4,4
	.comm	TIF_32BIT,4,4
	.comm	ASI_AIUS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
