	.file	"extr_cs.c_bcm63xx_set_cs_base.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	bcm63xx_set_cs_base
	.type	bcm63xx_set_cs_base, @function
bcm63xx_set_cs_base:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	is_valid_cs@PLT
	test	eax, eax
	jne	.L2
.L5:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, ebx
	call	roundup_pow_of_two@PLT
	mov	edi, eax
	cmp	eax, ebx
	jne	.L5
	lea	eax, -8192[rax]
	cmp	eax, 268427264
	ja	.L5
	and	r12d, DWORD PTR MPI_CSBASE_BASE_MASK[rip]
	xor	r13d, r13d
	call	ilog2@PLT
	mov	edi, 8192
	mov	ebx, eax
	call	ilog2@PLT
	mov	ecx, DWORD PTR MPI_CSBASE_SIZE_SHIFT[rip]
	mov	rsi, r13
	lea	rdi, bcm63xx_cs_lock[rip]
	sub	ebx, eax
	sal	ebx, cl
	call	spin_lock_irqsave@PLT
	mov	edi, ebp
	or	r12d, ebx
	call	MPI_CSBASE_REG@PLT
	mov	edi, r12d
	mov	esi, eax
	call	bcm_mpi_writel@PLT
	mov	rsi, r13
	lea	rdi, bcm63xx_cs_lock[rip]
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	bcm63xx_set_cs_base, .-bcm63xx_set_cs_base
	.comm	bcm63xx_cs_lock,4,4
	.comm	MPI_CSBASE_SIZE_SHIFT,4,4
	.comm	MPI_CSBASE_BASE_MASK,4,4
	.comm	EINVAL,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_cs.c_bcm63xx_set_cs_base.c"
	.text
	.align	2
	.global	bcm63xx_set_cs_base
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcm63xx_set_cs_base, %function
bcm63xx_set_cs_base:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r4, r2
	mov	r6, r0
	bl	is_valid_cs
	cmp	r0, #0
	bne	.L2
.L5:
	ldr	r3, .L8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r4
	bl	roundup_pow_of_two
	cmp	r0, r4
	bne	.L5
	ldr	r2, .L8+4
	sub	r3, r0, #8192
	cmp	r3, r2
	bhi	.L5
	ldr	r3, .L8+8
	mov	r7, #0
	ldr	r1, [r3]
	and	r5, r5, r1
	bl	ilog2
	mov	r4, r0
	mov	r0, #8192
	bl	ilog2
	ldr	r3, .L8+12
	sub	r4, r4, r0
	ldr	r0, [r3]
	mov	r1, r7
	orr	r5, r5, r4, lsl r0
	ldr	r0, .L8+16
	bl	spin_lock_irqsave
	mov	r0, r6
	bl	MPI_CSBASE_REG
	mov	r1, r0
	mov	r0, r5
	bl	bcm_mpi_writel
	mov	r1, r7
	ldr	r0, .L8+16
	bl	spin_unlock_irqrestore
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	.align	2
.L8:
	.word	EINVAL
	.word	268427264
	.word	MPI_CSBASE_BASE_MASK
	.word	MPI_CSBASE_SIZE_SHIFT
	.word	bcm63xx_cs_lock
	.size	bcm63xx_set_cs_base, .-bcm63xx_set_cs_base
	.comm	bcm63xx_cs_lock,4,4
	.comm	MPI_CSBASE_SIZE_SHIFT,4,4
	.comm	MPI_CSBASE_BASE_MASK,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
