	.file	"extr_lbc.c_lbc_banks_map.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lbc_banks_map, @function
lbc_banks_map:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	esi, 8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rdi, QWORD PTR [rdi]
	call	bzero@PLT
	mov	rbp, QWORD PTR LBC_DEV_MAX[rip]
	test	rbp, rbp
	je	.L2
	mov	r10, QWORD PTR 8[rbx]
	lea	rax, 0[rbp+rbp*2]
	xor	ebp, ebp
	lea	r13, [r10+rax*4]
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L3:
	add	r10, 12
	cmp	r10, r13
	je	.L2
.L16:
	mov	r11d, DWORD PTR [r10]
	test	r11d, r11d
	je	.L3
	mov	r8d, DWORD PTR 4[r10]
	mov	r12, QWORD PTR [rbx]
	test	rbp, rbp
	je	.L32
	lea	r15d, -1[r8]
	mov	rax, r12
	xor	edx, edx
	lea	r14d, [r11+r15]
	.p2align 4,,10
	.p2align 3
.L8:
	mov	esi, DWORD PTR [rax]
	mov	edi, DWORD PTR 4[rax]
	lea	ecx, -1[rsi]
	test	r8d, r8d
	jle	.L5
	lea	r9d, [rcx+rdi]
	cmp	r9d, r15d
	je	.L61
.L5:
	cmp	r14d, ecx
	jne	.L7
	test	esi, esi
	jg	.L63
.L7:
	add	rdx, 1
	add	rax, 12
	cmp	rdx, rbp
	jne	.L8
.L9:
	xor	edx, edx
	xor	ecx, ecx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	add	rcx, 1
	add	rdx, 12
	cmp	rcx, rbp
	je	.L64
.L10:
	cmp	DWORD PTR [r12+rdx], r8d
	jl	.L13
	cmp	rbp, rcx
	jbe	.L12
	lea	rax, 0[rbp+rbp*2]
	lea	rcx, [rcx+rcx*2]
	lea	rax, [r12+rax*4]
	lea	rsi, [r12+rcx*4]
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rcx, QWORD PTR -12[rax]
	sub	rax, 12
	mov	QWORD PTR 12[rax], rcx
	mov	ecx, DWORD PTR 8[rax]
	mov	DWORD PTR 20[rax], ecx
	cmp	rax, rsi
	jne	.L15
.L12:
	add	rdx, r12
	add	rbp, 1
	mov	DWORD PTR [rdx], r8d
	mov	DWORD PTR 4[rdx], r11d
.L69:
	add	r10, 12
	cmp	r10, r13
	jne	.L16
	.p2align 4,,10
	.p2align 3
.L2:
	lea	r10, 0[rbp+rbp*2]
	xor	r12d, r12d
	sal	r10, 2
.L17:
	lea	rax, [r12+r12*2]
	lea	r13, -1[rbp]
	sal	rax, 2
	cmp	r12, r13
	jnb	.L65
.L21:
	mov	rcx, QWORD PTR [rbx]
	lea	r8, 1[r12]
	lea	rdx, [rcx+rax]
	add	rax, 12
	mov	esi, DWORD PTR 4[rdx]
	mov	r9d, DWORD PTR [rdx]
	lea	rdi, [rcx+rax]
	add	r9d, esi
	cmp	DWORD PTR [rdi], r9d
	je	.L66
	mov	r12, r8
	cmp	r12, r13
	jb	.L21
.L65:
	test	rbp, rbp
	je	.L22
	mov	rdx, QWORD PTR [rbx]
	xor	r12d, r12d
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L68:
	mov	r8d, DWORD PTR 12[rsp]
	mov	edi, r15d
	add	r12, 1
	mov	esi, r8d
	call	pmap_mapdev@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	DWORD PTR 8[rdx+r13], eax
	cmp	rbp, r12
	je	.L67
.L24:
	lea	r13, [r12+r12*2]
	mov	edi, DWORD PTR OCP85XX_TGTIF_LBC[rip]
	sal	r13, 2
	add	rdx, r13
	mov	r15d, DWORD PTR [rdx]
	mov	r8d, DWORD PTR 4[rdx]
	mov	esi, r15d
	mov	edx, r8d
	mov	DWORD PTR 12[rsp], r8d
	call	law_enable@PLT
	mov	r14d, eax
	test	eax, eax
	je	.L68
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L63:
	.cfi_restore_state
	mov	DWORD PTR [rax], r8d
.L61:
	add	edi, r11d
	mov	DWORD PTR 4[rax], edi
	cmp	rbp, rdx
	jne	.L3
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L66:
	add	esi, DWORD PTR 4[rdi]
	lea	rbp, -12[r10]
	mov	DWORD PTR 4[rdx], esi
	cmp	r8, r13
	jnb	.L19
	lea	rax, [r8+r8*2]
	lea	rbp, -12[r10]
	lea	rax, [rcx+rax*4]
	lea	rsi, [rcx+rbp]
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdx, QWORD PTR 12[rax]
	add	rax, 12
	mov	QWORD PTR -12[rax], rdx
	mov	edx, DWORD PTR 8[rax]
	mov	DWORD PTR -4[rax], edx
	cmp	rsi, rax
	jne	.L20
	lea	rdi, [rcx+rbp]
.L19:
	mov	esi, 12
	call	bzero@PLT
	mov	r10, rbp
	mov	rbp, r13
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L67:
	mov	rax, QWORD PTR LBC_DEV_MAX[rip]
	test	rax, rax
	je	.L1
	mov	r9, QWORD PTR 8[rbx]
	lea	rax, [rax+rax*2]
	lea	r11, [r9+rax*4]
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L26:
	add	r9, 12
	cmp	r11, r9
	je	.L1
.L30:
	mov	esi, DWORD PTR [r9]
	test	esi, esi
	je	.L26
	mov	r8d, DWORD PTR 4[r9]
	mov	rax, rdx
	xor	ecx, ecx
	lea	r10d, -1[rsi+r8]
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L27:
	add	rcx, 1
	add	rax, 12
	cmp	rbp, rcx
	je	.L26
.L29:
	mov	esi, DWORD PTR [rax]
	mov	edi, DWORD PTR 4[rax]
	cmp	esi, r8d
	jg	.L27
	lea	esi, -1[rsi+rdi]
	cmp	r10d, esi
	jg	.L27
	cmp	rbp, rcx
	jbe	.L26
	lea	rax, [rcx+rcx*2]
	sub	r8d, DWORD PTR [rdx+rax*4]
	add	r8d, DWORD PTR 8[rdx+rax*4]
	mov	DWORD PTR 8[r9], r8d
	jmp	.L26
.L64:
	lea	rdx, 0[rbp+rbp*2]
	add	rbp, 1
	sal	rdx, 2
	add	rdx, r12
	mov	DWORD PTR [rdx], r8d
	mov	DWORD PTR 4[rdx], r11d
	jmp	.L69
.L22:
	mov	r14d, DWORD PTR EINVAL[rip]
	jmp	.L1
.L32:
	xor	edx, edx
	add	rbp, 1
	add	rdx, r12
	mov	DWORD PTR [rdx], r8d
	mov	DWORD PTR 4[rdx], r11d
	jmp	.L69
	.cfi_endproc
.LFE0:
	.size	lbc_banks_map, .-lbc_banks_map
	.comm	OCP85XX_TGTIF_LBC,4,4
	.comm	LBC_DEV_MAX,8,8
	.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_lbc.c_lbc_banks_map.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lbc_banks_map, %function
lbc_banks_map:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r1, #4
	mov	r7, r0
	sub	sp, sp, #12
	ldr	r0, [r0]
	bl	bzero
	ldr	r3, .L66
	ldr	r4, [r3]
	cmp	r4, #0
	beq	.L2
	ldr	r6, [r7, #4]
	add	r3, r4, r4, lsl #1
	add	r3, r6, r3, lsl #2
	add	r3, r3, #4
	str	r7, [sp, #4]
	mov	r4, #0
	mov	r7, r3
	add	r6, r6, #4
	b	.L16
.L3:
	add	r6, r6, #12
	cmp	r6, r7
	beq	.L57
.L16:
	ldr	r5, [r6, #-4]
	cmp	r5, #0
	beq	.L3
	ldr	r3, [sp, #4]
	cmp	r4, #0
	ldr	lr, [r6]
	ldr	r8, [r3]
	beq	.L32
	mov	r2, r8
	mov	r1, #0
	sub	fp, lr, #1
	add	r10, r5, fp
.L8:
	ldr	r0, [r2]
	cmp	lr, #0
	ldr	ip, [r2, #4]
	sub	r3, r0, #1
	ble	.L5
	add	r9, r3, ip
	cmp	r9, fp
	beq	.L58
.L5:
	sub	r3, r10, r3
	clz	r3, r3
	cmp	r0, #0
	lsr	r3, r3, #5
	movle	r3, #0
	cmp	r3, #0
	bne	.L59
	add	r1, r1, #1
	cmp	r1, r4
	add	r2, r2, #12
	bne	.L8
.L9:
	mov	r9, #0
	mov	ip, r9
	b	.L10
.L13:
	add	ip, ip, #1
	cmp	ip, r4
	add	r9, r9, #12
	beq	.L60
.L10:
	ldr	r3, [r8, r9]
	cmp	r3, lr
	blt	.L13
	cmp	r4, ip
	addhi	ip, ip, ip, lsl #1
	addhi	r3, r4, r4, lsl #1
	addhi	ip, r8, ip, lsl #2
	addhi	r3, r8, r3, lsl #2
	bls	.L12
.L15:
	sub	r10, r3, #12
	cmp	r10, ip
	ldm	r10, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	mov	r3, r10
	bne	.L15
.L12:
	add	r3, r8, r9
	str	lr, [r8, r9]
	add	r4, r4, #1
	str	r5, [r3, #4]
.L65:
	add	r6, r6, #12
	cmp	r6, r7
	bne	.L16
.L57:
	ldr	r7, [sp, #4]
.L2:
	mov	r5, #0
	add	r6, r4, r4, lsl #1
	lsl	r6, r6, #2
.L17:
	sub	r8, r4, #1
	add	r2, r5, r5, lsl #1
	cmp	r5, r8
	lsl	r2, r2, #2
	bcs	.L61
.L21:
	ldr	lr, [r7]
	add	r3, r5, #1
	add	ip, lr, r2
	ldr	r9, [ip, #4]
	add	r2, r2, #12
	ldr	r1, [ip]
	ldr	r0, [lr, r2]
	add	r1, r9, r1
	cmp	r0, r1
	add	r0, lr, r2
	beq	.L62
	mov	r5, r3
	cmp	r5, r8
	bcc	.L21
.L61:
	cmp	r4, #0
	beq	.L22
	mov	r6, #0
	ldr	r10, .L66+4
	mov	r9, r6
	b	.L24
.L64:
	ldr	r3, [r7]
	mov	r1, r8
	mov	r0, fp
	add	r8, r3, r6
	bl	pmap_mapdev
	cmp	r4, r9
	str	r0, [r8, #8]
	add	r6, r6, #12
	beq	.L63
.L24:
	ldr	r3, [r7]
	ldr	r0, [r10]
	add	r2, r3, r6
	ldr	r8, [r2, #4]
	ldr	fp, [r3, r6]
	mov	r2, r8
	mov	r1, fp
	bl	law_enable
	subs	r5, r0, #0
	add	r9, r9, #1
	beq	.L64
.L1:
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L62:
	ldr	r2, [r0, #4]
	cmp	r3, r8
	add	r9, r2, r9
	str	r9, [ip, #4]
	subcs	r6, r6, #12
	bcs	.L19
	add	r3, r3, r3, lsl #1
	sub	r6, r6, #12
	add	r3, lr, r3, lsl #2
	add	r4, lr, r6
.L20:
	add	ip, r3, #12
	cmp	r4, ip
	ldm	ip, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	mov	r3, ip
	bne	.L20
	add	r0, lr, r6
.L19:
	mov	r1, #12
	mov	r4, r8
	bl	bzero
	b	.L17
.L58:
	add	ip, ip, r5
	str	ip, [r2, #4]
.L6:
	cmp	r4, r1
	bne	.L3
	b	.L9
.L59:
	add	ip, ip, r5
	str	ip, [r2, #4]
	str	lr, [r2]
	b	.L6
.L63:
	ldr	r3, .L66
	ldr	r8, [r3]
	cmp	r8, #0
	beq	.L1
	ldr	r6, [r7, #4]
	add	r8, r8, r8, lsl #1
	add	r8, r6, r8, lsl #2
	b	.L30
.L26:
	add	r6, r6, #12
	cmp	r8, r6
	beq	.L1
.L30:
	ldr	r2, [r6]
	cmp	r2, #0
	beq	.L26
	ldr	lr, [r6, #4]
	ldr	r9, [r7]
	sub	r10, lr, #1
	mov	r1, #0
	mov	r3, r9
	add	r10, r10, r2
	b	.L29
.L27:
	add	r1, r1, #1
	cmp	r4, r1
	add	r3, r3, #12
	beq	.L26
.L29:
	ldm	r3, {r0, ip}
	sub	r2, r0, #1
	cmp	r0, lr
	add	r2, r2, ip
	bgt	.L27
	cmp	r10, r2
	bgt	.L27
	cmp	r4, r1
	bls	.L26
	add	r1, r1, r1, lsl #1
	ldr	r3, [r9, r1, lsl #2]
	add	r2, r9, r1, lsl #2
	ldr	r2, [r2, #8]
	sub	r3, lr, r3
	add	r3, r3, r2
	str	r3, [r6, #8]
	b	.L26
.L60:
	add	r9, r4, r4, lsl #1
	lsl	r9, r9, #2
	add	r3, r8, r9
	str	lr, [r8, r9]
	add	r4, r4, #1
	str	r5, [r3, #4]
	b	.L65
.L22:
	ldr	r3, .L66+8
	ldr	r5, [r3]
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	mov	r9, r4
	add	r3, r8, r9
	str	lr, [r8, r9]
	add	r4, r4, #1
	str	r5, [r3, #4]
	b	.L65
.L67:
	.align	2
.L66:
	.word	LBC_DEV_MAX
	.word	OCP85XX_TGTIF_LBC
	.word	EINVAL
	.size	lbc_banks_map, .-lbc_banks_map
	.comm	OCP85XX_TGTIF_LBC,4,4
	.comm	LBC_DEV_MAX,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
