	.file	"extr_ip_dn_io.c_red_drops.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	red_drops, @function
red_drops:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	r13, QWORD PTR 32[rdi]
	mov	rbx, rdi
	mov	rbp, QWORD PTR 24[rdi]
	mov	eax, DWORD PTR 52[r13]
	test	DWORD PTR DN_QSIZE_BYTES[rip], eax
	cmovne	rbp, QWORD PTR 16[rdi]
	test	rbp, rbp
	jne	.L26
	mov	esi, DWORD PTR [rdi]
	test	esi, esi
	jne	.L27
.L4:
	mov	rax, QWORD PTR 16[r13]
	cmp	rax, rbp
	jg	.L28
.L6:
	mov	edx, DWORD PTR 52[r13]
	cmp	QWORD PTR 24[r13], rbp
	jg	.L8
	mov	r14d, 1
	test	DWORD PTR DN_IS_ECN[rip], edx
	jne	.L1
	test	DWORD PTR DN_IS_GENTLE_RED[rip], edx
	jne	.L29
	mov	DWORD PTR 8[rbx], -1
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmp	rax, rbp
	jl	.L30
	xor	ebp, ebp
.L10:
	test	DWORD PTR DN_QSIZE_BYTES[rip], edx
	jne	.L31
.L11:
	mov	eax, DWORD PTR 8[rbx]
	lea	r14d, 1[rax]
	mov	DWORD PTR 8[rbx], r14d
	test	r14d, r14d
	jne	.L12
.L33:
	xor	eax, eax
	call	random@PLT
	movzx	eax, ax
	mov	DWORD PTR 12[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	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
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	mov	esi, DWORD PTR 72[r13]
	mov	edi, DWORD PTR dn_cfg[rip]
	sub	edi, DWORD PTR 4[rbx]
	call	div64@PLT
	xor	esi, esi
	cmp	QWORD PTR 0[r13], rax
	ja	.L32
	mov	DWORD PTR [rbx], esi
.L34:
	mov	rax, QWORD PTR 16[r13]
	cmp	rax, rbp
	jle	.L6
.L28:
	xor	r14d, r14d
	mov	DWORD PTR 8[rbx], -1
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	mov	edi, ebp
	call	SCALE@PLT
	mov	esi, DWORD PTR 80[r13]
	sub	eax, DWORD PTR [rbx]
	mov	edi, eax
	call	SCALE_MUL@PLT
	mov	esi, DWORD PTR [rbx]
	add	esi, eax
	mov	DWORD PTR [rbx], esi
	movsx	rbp, esi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L30:
	mov	r14d, 1
	test	DWORD PTR DN_IS_ECN[rip], edx
	jne	.L1
	mov	edi, DWORD PTR 56[r13]
	call	SCALE_MUL@PLT
	mov	edx, DWORD PTR 52[r13]
	mov	ebp, eax
	sub	ebp, DWORD PTR 40[r13]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, DWORD PTR 64[r13]
	call	SCALE_MUL@PLT
	mov	edx, DWORD PTR 52[r13]
	mov	ebp, eax
	sub	ebp, DWORD PTR 32[r13]
	test	DWORD PTR DN_QSIZE_BYTES[rip], edx
	je	.L11
.L31:
	mov	edi, ebp
	mov	esi, DWORD PTR 48[r13]
	imul	edi, r12d
	call	div64@PLT
	mov	ebp, eax
	mov	eax, DWORD PTR 8[rbx]
	lea	r14d, 1[rax]
	mov	DWORD PTR 8[rbx], r14d
	test	r14d, r14d
	je	.L33
.L12:
	mov	edi, r14d
	xor	r14d, r14d
	call	SCALE@PLT
	mov	edi, ebp
	mov	esi, eax
	call	SCALE_MUL@PLT
	mov	r8, rax
	movsx	rax, DWORD PTR 12[rbx]
	cmp	r8, rax
	jbe	.L1
	mov	DWORD PTR 8[rbx], 0
	xor	eax, eax
	mov	r14d, 1
	call	random@PLT
	movzx	eax, ax
	mov	DWORD PTR 12[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rdx, QWORD PTR 8[r13]
	mov	edi, DWORD PTR [rbx]
	mov	esi, DWORD PTR [rdx+rax*4]
	call	SCALE_MUL@PLT
	mov	esi, eax
	movsx	rbp, eax
	mov	DWORD PTR [rbx], esi
	jmp	.L34
	.cfi_endproc
.LFE0:
	.size	red_drops, .-red_drops
	.comm	dn_cfg,4,4
	.comm	DN_QSIZE_BYTES,4,4
	.comm	DN_IS_GENTLE_RED,4,4
	.comm	DN_IS_ECN,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_ip_dn_io.c_red_drops.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	red_drops, %function
red_drops:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r8, .L31
	ldr	r5, [r0, #24]
	ldr	r3, [r8]
	ldr	r2, [r5, #28]
	ldr	r6, [r0, #16]
	tst	r2, r3
	ldr	r3, [r0, #20]
	mov	r4, r0
	moveq	r6, r3
	cmp	r6, #0
	mov	r7, r1
	bne	.L25
	ldr	r1, [r0]
	cmp	r1, #0
	bne	.L26
.L4:
	ldr	r3, [r5, #8]
	cmp	r3, r1
	mvngt	r3, #0
	movgt	r5, #0
	strgt	r3, [r4, #8]
	bgt	.L1
	ldr	r2, [r5, #12]
	ldr	ip, [r5, #28]
	cmp	r2, r1
	bgt	.L8
	ldr	r3, .L31+4
	ldr	r3, [r3]
	tst	ip, r3
	bne	.L15
	ldr	r3, .L31+8
	ldr	r3, [r3]
	tst	ip, r3
	bne	.L27
	mvn	r3, #0
	mov	r5, #1
	str	r3, [r4, #8]
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	cmp	r3, r1
	blt	.L28
	mov	r6, #0
.L10:
	ldr	r3, [r8]
	tst	ip, r3
	bne	.L29
.L11:
	ldr	r5, [r4, #8]
	add	r5, r5, #1
	cmp	r5, #0
	str	r5, [r4, #8]
	bne	.L12
	bl	random
	lsl	r0, r0, #16
	lsr	r0, r0, #16
	str	r0, [r4, #12]
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L26:
	ldr	r2, .L31+12
	ldr	r3, [r0, #4]
	ldr	r0, [r2]
	ldr	r1, [r5, #40]
	sub	r0, r0, r3
	bl	div64
	ldr	r2, [r5]
	mov	r3, r0
	cmp	r2, r0
	bhi	.L30
.L5:
	mov	r1, r6
	str	r6, [r4]
	b	.L4
.L25:
	mov	r0, r6
	bl	SCALE
	ldr	r3, [r4]
	ldr	r1, [r5, #44]
	sub	r0, r0, r3
	bl	SCALE_MUL
	ldr	r1, [r4]
	add	r1, r0, r1
	str	r1, [r4]
	b	.L4
.L28:
	ldr	r3, .L31+4
	ldr	r3, [r3]
	tst	ip, r3
	bne	.L15
	ldr	r0, [r5, #32]
	bl	SCALE_MUL
	ldr	r6, [r5, #20]
	ldr	ip, [r5, #28]
	sub	r6, r0, r6
	b	.L10
.L27:
	ldr	r0, [r5, #36]
	bl	SCALE_MUL
	ldr	ip, [r5, #28]
	ldr	r3, [r8]
	ldr	r6, [r5, #16]
	tst	ip, r3
	sub	r6, r0, r6
	beq	.L11
.L29:
	mul	r0, r7, r6
	ldr	r1, [r5, #24]
	bl	div64
	mov	r6, r0
	b	.L11
.L30:
	ldr	r2, [r5, #4]
	ldr	r0, [r4]
	ldr	r1, [r2, r3, lsl #2]
	bl	SCALE_MUL
	mov	r6, r0
	b	.L5
.L15:
	mov	r5, #1
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	mov	r0, r5
	bl	SCALE
	mov	r1, r0
	mov	r0, r6
	bl	SCALE_MUL
	ldr	r3, [r4, #12]
	cmp	r0, r3
	movls	r5, #0
	bls	.L1
	mov	r3, #0
	str	r3, [r4, #8]
	bl	random
	lsl	r0, r0, #16
	lsr	r0, r0, #16
	mov	r5, #1
	str	r0, [r4, #12]
	b	.L1
.L32:
	.align	2
.L31:
	.word	DN_QSIZE_BYTES
	.word	DN_IS_ECN
	.word	DN_IS_GENTLE_RED
	.word	dn_cfg
	.size	red_drops, .-red_drops
	.comm	dn_cfg,4,4
	.comm	DN_QSIZE_BYTES,4,4
	.comm	DN_IS_GENTLE_RED,4,4
	.comm	DN_IS_ECN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
