	.file	"extr_if_msk.c_msk_set_rambuffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	msk_set_rambuffer, @function
msk_set_rambuffer:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR MSK_FLAG_RAMBUF[rip], eax
	jne	.L8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR 24[rdi]
	mov	edi, DWORD PTR 20[rdi]
	mov	esi, DWORD PTR RB_CTRL[rip]
	mov	r12d, DWORD PTR RB_RST_CLR[rip]
	call	RB_ADDR@PLT
	mov	edx, r12d
	mov	rdi, rbp
	mov	esi, eax
	call	CSR_WRITE_1@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR RB_START[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	lea	r12d, 7[rdx]
	cmovns	r12d, edx
	call	RB_ADDR@PLT
	mov	rdi, rbp
	sar	r12d, 3
	mov	esi, eax
	mov	edx, r12d
	call	CSR_WRITE_4@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR RB_END[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	lea	r12d, 7[rdx]
	cmovns	r12d, edx
	call	RB_ADDR@PLT
	mov	rdi, rbp
	sar	r12d, 3
	mov	esi, eax
	mov	edx, r12d
	call	CSR_WRITE_4@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR RB_WP[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	lea	r12d, 7[rdx]
	cmovns	r12d, edx
	call	RB_ADDR@PLT
	mov	rdi, rbp
	sar	r12d, 3
	mov	esi, eax
	mov	edx, r12d
	call	CSR_WRITE_4@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR RB_RP[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	lea	r12d, 7[rdx]
	cmovns	r12d, edx
	call	RB_ADDR@PLT
	mov	rdi, rbp
	sar	r12d, 3
	mov	esi, eax
	mov	edx, r12d
	call	CSR_WRITE_4@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 8[rbp]
	mov	rcx, QWORD PTR 0[rbp]
	mov	eax, DWORD PTR [rax+rdx*4]
	add	eax, 1
	sub	eax, DWORD PTR [rcx+rdx*4]
	mov	ecx, DWORD PTR MSK_RB_LLPP_B[rip]
	mov	edx, eax
	sub	edx, DWORD PTR MSK_RB_ULPP[rip]
	lea	r13d, 7[rdx]
	cmovns	r13d, edx
	sar	r13d, 3
	sub	eax, ecx
	lea	r12d, 7[rax]
	cmovns	r12d, eax
	mov	rax, QWORD PTR MSK_MIN_RXQ_SIZE[rip]
	sar	r12d, 3
	cmp	QWORD PTR 16[rbp], rax
	jge	.L3
	sub	ecx, DWORD PTR MSK_RB_LLPP_S[rip]
	lea	eax, 7[rcx]
	cmovs	ecx, eax
	sar	ecx, 3
	add	r12d, ecx
.L3:
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR RB_RX_UTPP[rip]
	call	RB_ADDR@PLT
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, eax
	call	CSR_WRITE_4@PLT
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR RB_RX_LTPP[rip]
	call	RB_ADDR@PLT
	mov	edx, r12d
	mov	rdi, rbp
	mov	esi, eax
	call	CSR_WRITE_4@PLT
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR RB_CTRL[rip]
	mov	r12d, DWORD PTR RB_ENA_OP_MD[rip]
	call	RB_ADDR@PLT
	mov	rdi, rbp
	mov	edx, r12d
	mov	esi, eax
	call	CSR_WRITE_1@PLT
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR RB_CTRL[rip]
	call	RB_ADDR@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	CSR_READ_1@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RB_CTRL[rip]
	mov	r12d, DWORD PTR RB_RST_CLR[rip]
	call	RB_ADDR@PLT
	mov	rdi, rbp
	mov	edx, r12d
	mov	esi, eax
	call	CSR_WRITE_1@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RB_START[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	lea	r12d, 7[rdx]
	cmovns	r12d, edx
	call	RB_ADDR@PLT
	mov	rdi, rbp
	sar	r12d, 3
	mov	esi, eax
	mov	edx, r12d
	call	CSR_WRITE_4@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 32[rbp]
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RB_END[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	lea	r12d, 7[rdx]
	cmovns	r12d, edx
	call	RB_ADDR@PLT
	mov	rdi, rbp
	sar	r12d, 3
	mov	esi, eax
	mov	edx, r12d
	call	CSR_WRITE_4@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RB_WP[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	lea	r12d, 7[rdx]
	cmovns	r12d, edx
	call	RB_ADDR@PLT
	mov	rdi, rbp
	sar	r12d, 3
	mov	esi, eax
	mov	edx, r12d
	call	CSR_WRITE_4@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RB_RP[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	lea	r12d, 7[rdx]
	cmovns	r12d, edx
	call	RB_ADDR@PLT
	mov	rdi, rbp
	sar	r12d, 3
	mov	esi, eax
	mov	edx, r12d
	call	CSR_WRITE_4@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RB_CTRL[rip]
	mov	r12d, DWORD PTR RB_ENA_STFWD[rip]
	call	RB_ADDR@PLT
	mov	rdi, rbp
	mov	edx, r12d
	mov	esi, eax
	call	CSR_WRITE_1@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RB_CTRL[rip]
	mov	r12d, DWORD PTR RB_ENA_OP_MD[rip]
	call	RB_ADDR@PLT
	mov	rdi, rbp
	mov	edx, r12d
	mov	esi, eax
	call	CSR_WRITE_1@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RB_CTRL[rip]
	call	RB_ADDR@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 32
	mov	esi, eax
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 8
	jmp	CSR_READ_1@PLT
	.cfi_endproc
.LFE0:
	.size	msk_set_rambuffer, .-msk_set_rambuffer
	.comm	RB_WP,4,4
	.comm	RB_START,4,4
	.comm	RB_RX_UTPP,4,4
	.comm	RB_RX_LTPP,4,4
	.comm	RB_RST_CLR,4,4
	.comm	RB_RP,4,4
	.comm	RB_END,4,4
	.comm	RB_ENA_STFWD,4,4
	.comm	RB_ENA_OP_MD,4,4
	.comm	RB_CTRL,4,4
	.comm	MSK_RB_ULPP,4,4
	.comm	MSK_RB_LLPP_S,4,4
	.comm	MSK_RB_LLPP_B,4,4
	.comm	MSK_MIN_RXQ_SIZE,8,8
	.comm	MSK_FLAG_RAMBUF,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_if_msk.c_msk_set_rambuffer.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msk_set_rambuffer, %function
msk_set_rambuffer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L8
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	bxeq	lr
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r6, .L8+4
	sub	sp, sp, #12
	ldr	r1, [r6]
	ldr	r0, [r0, #12]
	ldr	r5, [r4, #16]
	bl	RB_ADDR
	ldr	fp, .L8+8
	ldr	r10, .L8+12
	mov	r1, r0
	ldr	r2, [fp]
	mov	r0, r5
	bl	CSR_WRITE_1
	ldr	r1, [r10]
	ldr	r0, [r4, #12]
	bl	RB_ADDR
	ldr	r3, [r5]
	ldr	r2, [r4, #4]
	ldr	r9, .L8+16
	ldr	r2, [r3, r2, lsl #2]
	mov	r1, r0
	add	r3, r2, #7
	cmp	r2, #0
	movlt	r2, r3
	mov	r0, r5
	asr	r2, r2, #3
	bl	CSR_WRITE_4
	ldr	r1, [r9]
	ldr	r0, [r4, #12]
	bl	RB_ADDR
	ldr	r3, [r5, #4]
	ldr	r2, [r4, #4]
	ldr	r8, .L8+20
	ldr	r2, [r3, r2, lsl #2]
	mov	r1, r0
	add	r3, r2, #7
	cmp	r2, #0
	movlt	r2, r3
	mov	r0, r5
	asr	r2, r2, #3
	bl	CSR_WRITE_4
	ldr	r1, [r8]
	ldr	r0, [r4, #12]
	bl	RB_ADDR
	ldr	r3, [r5]
	ldr	r2, [r4, #4]
	ldr	r7, .L8+24
	ldr	r2, [r3, r2, lsl #2]
	mov	r1, r0
	add	r3, r2, #7
	cmp	r2, #0
	movlt	r2, r3
	mov	r0, r5
	asr	r2, r2, #3
	bl	CSR_WRITE_4
	ldr	r1, [r7]
	ldr	r0, [r4, #12]
	bl	RB_ADDR
	ldr	r3, [r5]
	ldr	r2, [r4, #4]
	mov	r1, r0
	ldr	r2, [r3, r2, lsl #2]
	mov	r0, r5
	add	r3, r2, #7
	cmp	r2, #0
	movlt	r2, r3
	asr	r2, r2, #3
	bl	CSR_WRITE_4
	ldr	r2, [r4, #4]
	ldr	r3, [r5, #4]
	ldr	r0, [r5]
	ldr	r3, [r3, r2, lsl #2]
	ldr	ip, .L8+28
	ldr	r0, [r0, r2, lsl #2]
	ldr	r1, .L8+32
	ldr	r2, [ip]
	add	r3, r3, #1
	sub	r3, r3, r0
	ldr	r1, [r1]
	sub	r2, r3, r2
	add	ip, r2, #7
	sub	r3, r3, r1
	cmp	r2, #0
	movlt	r2, ip
	add	r0, r3, #7
	cmp	r3, #0
	movlt	r3, r0
	ldr	r0, .L8+36
	ldr	ip, [r5, #8]
	ldr	r0, [r0]
	asr	r2, r2, #3
	cmp	ip, r0
	asr	r3, r3, #3
	bge	.L3
	ldr	r0, .L8+40
	ldr	r0, [r0]
	sub	r1, r1, r0
	add	r0, r1, #7
	cmp	r1, #0
	movlt	r1, r0
	add	r3, r3, r1, asr #3
.L3:
	ldr	r1, .L8+44
	ldr	r0, [r4, #12]
	ldr	r1, [r1]
	str	r3, [sp]
	str	r2, [sp, #4]
	bl	RB_ADDR
	ldr	r2, [sp, #4]
	mov	r1, r0
	mov	r0, r5
	bl	CSR_WRITE_4
	ldr	r2, .L8+48
	ldr	r0, [r4, #12]
	ldr	r1, [r2]
	bl	RB_ADDR
	ldr	r3, [sp]
	mov	r1, r0
	mov	r2, r3
	mov	r0, r5
	bl	CSR_WRITE_4
	ldr	r1, [r6]
	ldr	r0, [r4, #12]
	bl	RB_ADDR
	ldr	r3, .L8+52
	mov	r1, r0
	ldr	r2, [r3]
	mov	r0, r5
	bl	CSR_WRITE_1
	ldr	r1, [r6]
	ldr	r0, [r4, #12]
	bl	RB_ADDR
	mov	r1, r0
	mov	r0, r5
	bl	CSR_READ_1
	ldr	r1, [r6]
	ldr	r0, [r4, #8]
	bl	RB_ADDR
	ldr	r2, [fp]
	mov	r1, r0
	mov	r0, r5
	bl	CSR_WRITE_1
	ldr	r1, [r10]
	ldr	r0, [r4, #8]
	bl	RB_ADDR
	ldr	ip, [r4, #4]
	ldr	r2, [r5, #12]
	mov	r1, r0
	ldr	r2, [r2, ip, lsl #2]
	mov	r0, r5
	add	ip, r2, #7
	cmp	r2, #0
	movlt	r2, ip
	asr	r2, r2, #3
	bl	CSR_WRITE_4
	ldr	r1, [r9]
	ldr	r0, [r4, #8]
	bl	RB_ADDR
	ldr	ip, [r4, #4]
	ldr	r2, [r5, #16]
	mov	r1, r0
	ldr	r2, [r2, ip, lsl #2]
	mov	r0, r5
	add	ip, r2, #7
	cmp	r2, #0
	movlt	r2, ip
	asr	r2, r2, #3
	bl	CSR_WRITE_4
	ldr	r1, [r8]
	ldr	r0, [r4, #8]
	bl	RB_ADDR
	ldr	ip, [r4, #4]
	ldr	r2, [r5, #12]
	mov	r1, r0
	ldr	r2, [r2, ip, lsl #2]
	mov	r0, r5
	add	ip, r2, #7
	cmp	r2, #0
	movlt	r2, ip
	asr	r2, r2, #3
	bl	CSR_WRITE_4
	ldr	r1, [r7]
	ldr	r0, [r4, #8]
	bl	RB_ADDR
	ldr	ip, [r4, #4]
	ldr	r2, [r5, #12]
	mov	r1, r0
	ldr	r2, [r2, ip, lsl #2]
	mov	r0, r5
	add	ip, r2, #7
	cmp	r2, #0
	movlt	r2, ip
	asr	r2, r2, #3
	bl	CSR_WRITE_4
	ldr	r1, [r6]
	ldr	r0, [r4, #8]
	bl	RB_ADDR
	ldr	r2, .L8+56
	mov	r1, r0
	ldr	r2, [r2]
	mov	r0, r5
	bl	CSR_WRITE_1
	ldr	r1, [r6]
	ldr	r0, [r4, #8]
	bl	RB_ADDR
	ldr	r3, .L8+52
	mov	r1, r0
	ldr	r2, [r3]
	mov	r0, r5
	bl	CSR_WRITE_1
	ldr	r1, [r6]
	ldr	r0, [r4, #8]
	bl	RB_ADDR
	mov	r1, r0
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	CSR_READ_1
.L9:
	.align	2
.L8:
	.word	MSK_FLAG_RAMBUF
	.word	RB_CTRL
	.word	RB_RST_CLR
	.word	RB_START
	.word	RB_END
	.word	RB_WP
	.word	RB_RP
	.word	MSK_RB_ULPP
	.word	MSK_RB_LLPP_B
	.word	MSK_MIN_RXQ_SIZE
	.word	MSK_RB_LLPP_S
	.word	RB_RX_UTPP
	.word	RB_RX_LTPP
	.word	RB_ENA_OP_MD
	.word	RB_ENA_STFWD
	.size	msk_set_rambuffer, .-msk_set_rambuffer
	.comm	RB_WP,4,4
	.comm	RB_START,4,4
	.comm	RB_RX_UTPP,4,4
	.comm	RB_RX_LTPP,4,4
	.comm	RB_RST_CLR,4,4
	.comm	RB_RP,4,4
	.comm	RB_END,4,4
	.comm	RB_ENA_STFWD,4,4
	.comm	RB_ENA_OP_MD,4,4
	.comm	RB_CTRL,4,4
	.comm	MSK_RB_ULPP,4,4
	.comm	MSK_RB_LLPP_S,4,4
	.comm	MSK_RB_LLPP_B,4,4
	.comm	MSK_MIN_RXQ_SIZE,4,4
	.comm	MSK_FLAG_RAMBUF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
