	.file	"extr_thread_call.c_sched_call_thread.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sched_call_thread, @function
sched_call_thread:
.LFB0:
	.cfi_startproc
	endbr64
	movabs	rdx, -6148914691236517205
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, edi
	xor	edi, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbp, QWORD PTR [rsi]
	mov	rax, rbp
	sub	rax, QWORD PTR thread_call_groups[rip]
	sar	rax, 2
	imul	rax, rdx
	movsx	rdx, DWORD PTR THREAD_CALL_INDEX_MAX[rip]
	cmp	rax, rdx
	setl	dil
	call	assert@PLT
	xor	eax, eax
	call	thread_call_lock_spin@PLT
	cmp	ebx, 128
	je	.L2
	cmp	ebx, 129
	jne	.L3
	mov	edi, DWORD PTR 0[rbp]
	call	assert@PLT
	mov	eax, DWORD PTR 8[rbp]
	sub	DWORD PTR 0[rbp], 1
	add	DWORD PTR 4[rbp], 1
	test	eax, eax
	jg	.L6
.L3:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	thread_call_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbp]
	call	assert@PLT
	sub	DWORD PTR 4[rbp], 1
	xor	eax, eax
	add	DWORD PTR 0[rbp], 1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	thread_call_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rdi, rbp
	call	thread_call_wake@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	thread_call_unlock@PLT
	.cfi_endproc
.LFE0:
	.size	sched_call_thread, .-sched_call_thread
	.comm	thread_call_groups,8,8
	.comm	THREAD_CALL_INDEX_MAX,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_thread_call.c_sched_call_thread.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sched_call_thread, %function
sched_call_thread:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r3, .L7
	ldr	r4, [r1]
	ldr	r3, [r3]
	ldr	r1, .L7+4
	sub	r2, r4, r3
	bic	r3, r2, #3
	add	r3, r3, r2, asr #2
	add	r3, r3, r3, lsl #4
	add	r3, r3, r3, lsl #8
	add	r3, r3, r3, lsl #16
	ldr	r0, [r1]
	lsl	r3, r3, #1
	add	r3, r3, r2, asr #2
	cmp	r3, r0
	movge	r0, #0
	movlt	r0, #1
	bl	assert
	bl	thread_call_lock_spin
	cmp	r5, #128
	beq	.L2
	cmp	r5, #129
	bne	.L3
	ldr	r0, [r4]
	bl	assert
	ldm	r4, {r2, r3}
	ldr	r1, [r4, #8]
	sub	r2, r2, #1
	add	r3, r3, #1
	cmp	r1, #0
	stm	r4, {r2, r3}
	bgt	.L6
.L3:
	pop	{r4, r5, r6, lr}
	b	thread_call_unlock
.L2:
	ldr	r0, [r4, #4]
	bl	assert
	ldr	r2, [r4, #4]
	ldr	r3, [r4]
	sub	r2, r2, #1
	add	r3, r3, #1
	str	r2, [r4, #4]
	str	r3, [r4]
	pop	{r4, r5, r6, lr}
	b	thread_call_unlock
.L6:
	mov	r0, r4
	bl	thread_call_wake
	pop	{r4, r5, r6, lr}
	b	thread_call_unlock
.L8:
	.align	2
.L7:
	.word	thread_call_groups
	.word	THREAD_CALL_INDEX_MAX
	.size	sched_call_thread, .-sched_call_thread
	.comm	thread_call_groups,4,4
	.comm	THREAD_CALL_INDEX_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
