	.file	"extr_alloc.c_invalidate_buckets_random.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	invalidate_buckets_random, @function
invalidate_buckets_random:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	lea	rbp, 24[rdi]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r12, rsp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR 8[r13]
	add	rbx, 1
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	cdqe
	cmp	rax, rbx
	jbe	.L13
.L2:
	mov	rdi, rbp
	call	fifo_full@PLT
	test	eax, eax
	jne	.L1
	mov	esi, 8
	mov	rdi, r12
	call	get_random_bytes@PLT
	movsx	rsi, DWORD PTR 12[r13]
	mov	ecx, DWORD PTR 8[r13]
	xor	edx, edx
	mov	rax, QWORD PTR [rsp]
	mov	rdi, r13
	sub	ecx, esi
	movsx	rcx, ecx
	div	rcx
	mov	rax, QWORD PTR 16[r13]
	add	rdx, rsi
	lea	r14, [rax+rdx*4]
	mov	QWORD PTR [rsp], rdx
	mov	rsi, r14
	call	bch_can_invalidate_bucket@PLT
	test	rax, rax
	je	.L3
	mov	rsi, r14
	mov	rdi, r13
	call	bch_invalidate_one_bucket@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	DWORD PTR 0[r13], 1
	mov	edi, DWORD PTR 4[r13]
	call	wake_up_gc@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	invalidate_buckets_random, .-invalidate_buckets_random
	.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_alloc.c_invalidate_buckets_random.c"
	.text
	.global	__aeabi_uidivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	invalidate_buckets_random, %function
invalidate_buckets_random:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L15
	sub	sp, sp, #8
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r6, #0
	add	r7, r0, #20
	b	.L2
.L3:
	ldr	r3, [r4, #8]
	add	r6, r6, #1
	add	r3, r3, r3, lsr #31
	cmp	r6, r3, asr #1
	bcs	.L13
.L2:
	mov	r0, r7
	bl	fifo_full
	cmp	r0, #0
	bne	.L1
	mov	r1, #4
	mov	r0, sp
	bl	get_random_bytes
	ldr	r8, [r4, #12]
	ldr	r1, [r4, #8]
	ldr	r0, [sp]
	sub	r1, r1, r8
	bl	__aeabi_uidivmod
	ldr	r5, [r4, #16]
	add	r3, r1, r8
	add	r5, r5, r3, lsl #2
	mov	r1, r5
	mov	r0, r4
	str	r3, [sp]
	bl	bch_can_invalidate_bucket
	cmp	r0, #0
	beq	.L3
	mov	r1, r5
	mov	r0, r4
	bl	bch_invalidate_one_bucket
	b	.L3
.L13:
	mov	r3, #1
	ldr	r0, [r4, #4]
	str	r3, [r4]
	bl	wake_up_gc
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC0
	.size	invalidate_buckets_random, .-invalidate_buckets_random
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
