	.file	"extr_sched_4bsd.c_updatepri.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	updatepri, @function
updatepri:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	td_get_sched@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR averunnable[rip]
	mov	edi, DWORD PTR [rax]
	call	loadfactor@PLT
	mov	edx, DWORD PTR [rbx]
	mov	ebp, eax
	lea	eax, [rax+rax*4]
	cmp	edx, eax
	jle	.L2
	mov	DWORD PTR 4[rbx], 0
	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
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR 4[rbx]
	sub	edx, 1
	mov	DWORD PTR [rbx], edx
	test	esi, esi
	jne	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	xor	esi, esi
	mov	DWORD PTR 4[rbx], esi
.L14:
	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
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, ebp
	call	decay_cpu@PLT
	mov	esi, eax
	test	eax, eax
	je	.L6
	mov	edx, DWORD PTR [rbx]
.L4:
	sub	edx, 1
	mov	DWORD PTR [rbx], edx
	jne	.L7
	mov	DWORD PTR 4[rbx], esi
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	updatepri, .-updatepri
	.comm	averunnable,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_sched_4bsd.c_updatepri.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	updatepri, %function
updatepri:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	bl	td_get_sched
	ldr	r3, .L14
	mov	r4, r0
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	loadfactor
	ldr	r3, [r4]
	add	r2, r0, r0, lsl #2
	cmp	r3, r2
	ble	.L2
	mov	r3, #0
	str	r3, [r4, #4]
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r1, [r4, #4]
	sub	r3, r3, #1
	cmp	r1, #0
	mov	r5, r0
	str	r3, [r4]
	bne	.L4
.L6:
	mov	r1, #0
	str	r1, [r4, #4]
	pop	{r4, r5, r6, pc}
.L7:
	mov	r0, r5
	bl	decay_cpu
	subs	r1, r0, #0
	beq	.L6
	ldr	r3, [r4]
.L4:
	sub	r3, r3, #1
	cmp	r3, #0
	str	r3, [r4]
	bne	.L7
	str	r1, [r4, #4]
	pop	{r4, r5, r6, pc}
.L15:
	.align	2
.L14:
	.word	averunnable
	.size	updatepri, .-updatepri
	.comm	averunnable,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
