	.file	"extr_ctl.c_arena_reset_prepare_background_thread.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	arena_reset_prepare_background_thread, @function
arena_reset_prepare_background_thread:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR have_background_thread[rip], 0
	jne	.L13
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	call	tsd_tsdn@PLT
	lea	rsi, background_thread_lock[rip]
	mov	edi, eax
	call	malloc_mutex_lock@PLT
	xor	eax, eax
	call	background_thread_enabled@PLT
	test	rax, rax
	jne	.L14
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	eax, ebx
	xor	edx, edx
	xor	edi, edi
	div	DWORD PTR ncpus[rip]
	mov	rax, QWORD PTR background_thread_started[rip]
	mov	rbx, rdx
	sal	rbx, 4
	add	rbx, QWORD PTR background_thread_info[rip]
	cmp	QWORD PTR [rbx], rax
	lea	r12, 8[rbx]
	sete	dil
	call	assert@PLT
	mov	rdi, rbp
	call	tsd_tsdn@PLT
	mov	rsi, r12
	mov	edi, eax
	call	malloc_mutex_lock@PLT
	mov	rax, QWORD PTR background_thread_paused[rip]
	mov	rdi, rbp
	mov	QWORD PTR [rbx], rax
	call	tsd_tsdn@PLT
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 24
	mov	rsi, r12
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	mov	edi, eax
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	malloc_mutex_unlock@PLT
	.cfi_endproc
.LFE0:
	.size	arena_reset_prepare_background_thread, .-arena_reset_prepare_background_thread
	.comm	ncpus,4,4
	.comm	have_background_thread,8,8
	.comm	background_thread_started,8,8
	.comm	background_thread_paused,8,8
	.comm	background_thread_lock,4,4
	.comm	background_thread_info,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_ctl.c_arena_reset_prepare_background_thread.c"
	.text
	.global	__aeabi_uidivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	arena_reset_prepare_background_thread, %function
arena_reset_prepare_background_thread:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	ldr	r3, [r3]
	cmp	r3, #0
	bxeq	lr
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r5, r0
	bl	tsd_tsdn
	ldr	r1, .L13+4
	bl	malloc_mutex_lock
	bl	background_thread_enabled
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L13+8
	mov	r0, r4
	ldr	r1, [r3]
	bl	__aeabi_uidivmod
	ldr	r2, .L13+12
	ldr	r3, .L13+16
	ldr	r7, [r2]
	ldr	r3, [r3]
	ldr	r0, [r7, r1, lsl #3]
	mov	r4, r1
	sub	r0, r0, r3
	clz	r0, r0
	add	r6, r7, r1, lsl #3
	lsr	r0, r0, #5
	bl	assert
	add	r6, r6, #4
	mov	r0, r5
	bl	tsd_tsdn
	mov	r1, r6
	bl	malloc_mutex_lock
	ldr	r3, .L13+20
	mov	r0, r5
	ldr	r3, [r3]
	str	r3, [r7, r4, lsl #3]
	bl	tsd_tsdn
	mov	r1, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	malloc_mutex_unlock
.L14:
	.align	2
.L13:
	.word	have_background_thread
	.word	background_thread_lock
	.word	ncpus
	.word	background_thread_info
	.word	background_thread_started
	.word	background_thread_paused
	.size	arena_reset_prepare_background_thread, .-arena_reset_prepare_background_thread
	.comm	ncpus,4,4
	.comm	have_background_thread,4,4
	.comm	background_thread_started,4,4
	.comm	background_thread_paused,4,4
	.comm	background_thread_lock,4,4
	.comm	background_thread_info,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
