	.file	"extr_rt61pci.c_rt61pci_init_bbp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rt61pci_init_bbp, @function
rt61pci_init_bbp:
.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
	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
	call	rt61pci_wait_bbp_ready@PLT
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR EACCES[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
	xor	edx, edx
	mov	esi, 3
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 48
	mov	esi, 15
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 200
	mov	esi, 21
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 56
	mov	esi, 22
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 6
	mov	esi, 23
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 254
	mov	esi, 24
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 10
	mov	esi, 25
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 13
	mov	esi, 26
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 18
	mov	esi, 34
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 7
	mov	esi, 37
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 248
	mov	esi, 39
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 96
	mov	esi, 41
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 16
	mov	esi, 53
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 24
	mov	esi, 54
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 16
	mov	esi, 60
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 4
	mov	esi, 61
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 4
	mov	esi, 62
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 254
	mov	esi, 75
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 254
	mov	esi, 86
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 254
	mov	esi, 88
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 15
	mov	esi, 90
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	xor	edx, edx
	mov	esi, 99
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 22
	mov	esi, 102
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	edx, 4
	mov	esi, 107
	mov	rdi, rbx
	call	rt61pci_bbp_write@PLT
	mov	eax, DWORD PTR EEPROM_BBP_SIZE[rip]
	test	eax, eax
	je	.L4
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, r12d
	mov	rdi, rbx
	add	rsi, QWORD PTR EEPROM_BBP_START[rip]
	call	rt2x00_eeprom_read@PLT
	mov	ebp, eax
	cmp	eax, 65535
	je	.L5
	test	eax, eax
	je	.L5
	mov	esi, DWORD PTR EEPROM_BBP_REG_ID[rip]
	mov	edi, eax
	call	rt2x00_get_field16@PLT
	mov	esi, DWORD PTR EEPROM_BBP_VALUE[rip]
	mov	edi, ebp
	mov	r13d, eax
	call	rt2x00_get_field16@PLT
	mov	esi, r13d
	mov	rdi, rbx
	mov	edx, eax
	call	rt61pci_bbp_write@PLT
.L5:
	add	r12d, 1
	cmp	DWORD PTR EEPROM_BBP_SIZE[rip], r12d
	ja	.L6
.L4:
	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	rt61pci_init_bbp, .-rt61pci_init_bbp
	.comm	EEPROM_BBP_VALUE,4,4
	.comm	EEPROM_BBP_START,8,8
	.comm	EEPROM_BBP_SIZE,4,4
	.comm	EEPROM_BBP_REG_ID,4,4
	.comm	EACCES,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_rt61pci.c_rt61pci_init_bbp.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rt61pci_init_bbp, %function
rt61pci_init_bbp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	bl	rt61pci_wait_bbp_ready
	bl	unlikely
	subs	r6, r0, #0
	beq	.L2
	ldr	r3, .L16
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L1:
	mov	r0, r6
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r2, r6
	mov	r1, #3
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #48
	mov	r1, #15
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #200
	mov	r1, #21
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #56
	mov	r1, #22
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #6
	mov	r1, #23
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #254
	mov	r1, #24
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #10
	mov	r1, #25
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #13
	mov	r1, #26
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #18
	mov	r1, #34
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #7
	mov	r1, #37
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #248
	mov	r1, #39
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #96
	mov	r1, #41
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #16
	mov	r1, #53
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #24
	mov	r1, #54
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #16
	mov	r1, #60
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #4
	mov	r1, #61
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #4
	mov	r1, #62
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #254
	mov	r1, #75
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #254
	mov	r1, #86
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #254
	mov	r1, #88
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #15
	mov	r1, #90
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, r6
	mov	r1, #99
	mov	r0, r4
	bl	rt61pci_bbp_write
	ldr	r7, .L16+4
	mov	r2, #22
	mov	r1, #102
	mov	r0, r4
	bl	rt61pci_bbp_write
	mov	r2, #4
	mov	r1, #107
	mov	r0, r4
	bl	rt61pci_bbp_write
	ldr	r3, [r7]
	cmp	r3, #0
	beq	.L1
	mov	r5, r6
	ldr	r9, .L16+8
	ldr	r8, .L16+12
	b	.L6
.L5:
	ldr	r3, [r7]
	cmp	r3, r5
	bls	.L1
.L6:
	ldr	r1, [r9]
	mov	r0, r4
	add	r1, r5, r1
	bl	rt2x00_eeprom_read
	cmp	r0, r8
	cmpne	r0, #0
	mov	fp, r0
	add	r5, r5, #1
	beq	.L5
	ldr	r3, .L16+16
	ldr	r1, [r3]
	bl	rt2x00_get_field16
	ldr	r3, .L16+20
	mov	r10, r0
	ldr	r1, [r3]
	mov	r0, fp
	bl	rt2x00_get_field16
	mov	r1, r10
	mov	r2, r0
	mov	r0, r4
	bl	rt61pci_bbp_write
	b	.L5
.L17:
	.align	2
.L16:
	.word	EACCES
	.word	EEPROM_BBP_SIZE
	.word	EEPROM_BBP_START
	.word	65535
	.word	EEPROM_BBP_REG_ID
	.word	EEPROM_BBP_VALUE
	.size	rt61pci_init_bbp, .-rt61pci_init_bbp
	.comm	EEPROM_BBP_VALUE,4,4
	.comm	EEPROM_BBP_START,4,4
	.comm	EEPROM_BBP_SIZE,4,4
	.comm	EEPROM_BBP_REG_ID,4,4
	.comm	EACCES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
