	.file	"extr_dev.c_rtl8187b_init_hw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rtl8187b_init_hw, @function
rtl8187b_init_hw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	esi, 1
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR [rdi]
	mov	rdi, rbp
	call	rtl8187_set_anaparam@PLT
	mov	edx, 16
	mov	esi, 65377
	mov	rdi, rbp
	call	rtl818x_iowrite8@PLT
	mov	esi, 65378
	mov	rdi, rbp
	call	rtl818x_ioread8@PLT
	mov	esi, 65378
	mov	rdi, rbp
	mov	ebx, eax
	mov	edx, eax
	and	edx, -33
	or	ebx, 32
	call	rtl818x_iowrite8@PLT
	mov	edx, ebx
	mov	esi, 65378
	mov	rdi, rbp
	call	rtl818x_iowrite8@PLT
	mov	rdi, r12
	call	rtl8187_cmd_reset@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L7
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, 1
	mov	rdi, rbp
	xor	ebx, ebx
	call	rtl8187_set_anaparam@PLT
	mov	edx, 4095
	mov	esi, 65332
	mov	rdi, rbp
	call	rtl818x_iowrite16@PLT
	mov	rsi, QWORD PTR 16[rbp]
	mov	rdi, rbp
	call	rtl818x_ioread8@PLT
	mov	rsi, QWORD PTR 16[rbp]
	or	eax, DWORD PTR RTL818X_CW_CONF_PERPACKET_RETRY_SHIFT[rip]
	mov	rdi, rbp
	mov	edx, eax
	call	rtl818x_iowrite8@PLT
	mov	ecx, 1
	mov	edx, 4095
	mov	rdi, rbp
	mov	esi, 65504
	call	rtl818x_iowrite16_idx@PLT
	mov	ecx, 1
	xor	edx, edx
	mov	rdi, rbp
	mov	esi, 65506
	call	rtl818x_iowrite8_idx@PLT
	mov	ecx, 1
	mov	edx, 65535
	mov	rdi, rbp
	mov	esi, 65492
	call	rtl818x_iowrite16_idx@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR RTL818X_EEPROM_CMD_CONFIG[rip]
	mov	rdi, rbp
	lea	rsi, 4[rax]
	call	rtl818x_iowrite8@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	lea	rsi, 8[rax]
	call	rtl818x_ioread8@PLT
	mov	rdi, rbp
	and	eax, 63
	mov	edx, eax
	mov	rax, QWORD PTR 16[rbp]
	or	dl, -128
	lea	rsi, 8[rax]
	call	rtl818x_iowrite8@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR RTL818X_EEPROM_CMD_NORMAL[rip]
	mov	rdi, rbp
	lea	rsi, 4[rax]
	call	rtl818x_iowrite8@PLT
	mov	rax, QWORD PTR 16[rbp]
	xor	edx, edx
	mov	rdi, rbp
	lea	rsi, 12[rax]
	call	rtl818x_iowrite8@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR rtl8187b_reg_table[rip]
	mov	rdi, rbp
	mov	rax, QWORD PTR [rax+rbx*8]
	add	rbx, 1
	mov	esi, DWORD PTR [rax]
	mov	ecx, DWORD PTR 8[rax]
	mov	edx, DWORD PTR 4[rax]
	or	esi, 65280
	movsx	rsi, esi
	call	rtl818x_iowrite8_idx@PLT
.L3:
	mov	rdi, QWORD PTR rtl8187b_reg_table[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jg	.L4
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	edx, 64080
	movabs	rbx, 8589934594
	lea	rsi, 56[rax]
	call	rtl818x_iowrite16@PLT
	mov	rax, QWORD PTR 16[rbp]
	xor	edx, edx
	mov	rdi, rbp
	lea	rsi, 52[rax]
	call	rtl818x_iowrite16@PLT
	xor	edx, edx
	mov	rdi, rbp
	mov	ecx, 1
	mov	esi, 65520
	call	rtl818x_iowrite32_idx@PLT
	xor	edx, edx
	mov	rdi, rbp
	mov	ecx, 1
	mov	esi, 65524
	call	rtl818x_iowrite32_idx@PLT
	mov	ecx, 1
	xor	edx, edx
	mov	rdi, rbp
	mov	esi, 65528
	call	rtl818x_iowrite8_idx@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	edx, 16385
	lea	rsi, 48[rax]
	call	rtl818x_iowrite32@PLT
	mov	ecx, 2
	mov	rdi, rbp
	mov	edx, 22170
	mov	esi, 65394
	call	rtl818x_iowrite16_idx@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	edx, 1152
	lea	rsi, 44[rax]
	call	rtl818x_iowrite16@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	edx, 9352
	lea	rsi, 40[rax]
	call	rtl818x_iowrite16@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, 8191
	mov	rdi, rbp
	lea	rsi, 36[rax]
	call	rtl818x_iowrite16@PLT
	mov	edi, 100
	call	msleep@PLT
	mov	rax, QWORD PTR 24[rbp]
	mov	rdi, r12
	call	[QWORD PTR [rax]]
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	edx, DWORD PTR RTL818X_CMD_TX_ENABLE[rip]
	or	edx, DWORD PTR RTL818X_CMD_RX_ENABLE[rip]
	lea	rsi, 16[rax]
	call	rtl818x_iowrite8@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	edx, 65535
	lea	rsi, 32[rax]
	call	rtl818x_iowrite16@PLT
	mov	rdi, rbp
	mov	edx, 244
	mov	esi, 65089
	call	rtl818x_iowrite8@PLT
	xor	edx, edx
	mov	rdi, rbp
	mov	esi, 65088
	call	rtl818x_iowrite8@PLT
	xor	edx, edx
	mov	rdi, rbp
	mov	esi, 65090
	call	rtl818x_iowrite8@PLT
	mov	rdi, rbp
	mov	edx, 1
	mov	esi, 65090
	call	rtl818x_iowrite8@PLT
	mov	rdi, rbp
	mov	edx, 15
	mov	esi, 65088
	call	rtl818x_iowrite8@PLT
	xor	edx, edx
	mov	rdi, rbp
	mov	esi, 65090
	call	rtl818x_iowrite8@PLT
	mov	edx, 1
	mov	rdi, rbp
	mov	esi, 65090
	call	rtl818x_iowrite8@PLT
	mov	rdi, rbp
	mov	esi, 65499
	call	rtl818x_ioread8@PLT
	mov	rdi, rbp
	mov	esi, 65499
	or	eax, 4
	mov	edx, eax
	call	rtl818x_iowrite8@PLT
	mov	rdi, rbp
	mov	ecx, 3
	mov	edx, 23034
	mov	esi, 65394
	call	rtl818x_iowrite16_idx@PLT
	mov	rdi, rbp
	mov	ecx, 3
	mov	edx, 22994
	mov	esi, 65396
	call	rtl818x_iowrite16_idx@PLT
	mov	rdi, rbp
	mov	ecx, 3
	mov	edx, 22994
	mov	esi, 65398
	call	rtl818x_iowrite16_idx@PLT
	mov	rdi, rbp
	mov	ecx, 3
	mov	edx, 6650
	mov	esi, 65400
	call	rtl818x_iowrite16_idx@PLT
	mov	rdi, rbp
	mov	ecx, 3
	mov	edx, 6650
	mov	esi, 65402
	call	rtl818x_iowrite16_idx@PLT
	mov	ecx, 3
	mov	rdi, rbp
	mov	edx, 208
	mov	esi, 65404
	call	rtl818x_iowrite16_idx@PLT
	mov	rdi, rbp
	xor	edx, edx
	mov	esi, 65377
	call	rtl818x_iowrite8@PLT
	mov	rdi, rbp
	mov	ecx, 1
	mov	edx, 15
	mov	esi, 65408
	call	rtl818x_iowrite8_idx@PLT
	mov	ecx, 1
	mov	rdi, rbp
	mov	edx, 3
	mov	esi, 65411
	call	rtl818x_iowrite8_idx@PLT
	mov	rdi, rbp
	mov	edx, 16
	mov	esi, 65498
	call	rtl818x_iowrite8@PLT
	mov	ecx, 2
	mov	rdi, rbp
	mov	edx, 8
	mov	esi, 65357
	call	rtl818x_iowrite8_idx@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	edx, 100676123
	lea	rsi, 28[rax]
	call	rtl818x_iowrite32@PLT
	mov	ecx, 1
	mov	rdi, rbp
	mov	edx, 2048
	mov	esi, 65516
	call	rtl818x_iowrite16_idx@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, rbp
	xor	edx, edx
	mov	DWORD PTR 0[rbp], 9
	mov	QWORD PTR [rax], rbx
	movabs	rbx, 12884901895
	mov	QWORD PTR 8[rax], rbx
	mov	rax, QWORD PTR 16[rbp]
	lea	rsi, 20[rax]
	call	rtl818x_iowrite8@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR RTL818X_MSR_ENEDCA[rip]
	mov	rdi, rbp
	lea	rsi, 24[rax]
	call	rtl818x_iowrite8@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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	rtl8187b_init_hw, .-rtl8187b_init_hw
	.comm	rtl8187b_reg_table,8,8
	.comm	RTL818X_MSR_ENEDCA,4,4
	.comm	RTL818X_EEPROM_CMD_NORMAL,4,4
	.comm	RTL818X_EEPROM_CMD_CONFIG,4,4
	.comm	RTL818X_CW_CONF_PERPACKET_RETRY_SHIFT,4,4
	.comm	RTL818X_CMD_TX_ENABLE,4,4
	.comm	RTL818X_CMD_RX_ENABLE,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_dev.c_rtl8187b_init_hw.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtl8187b_init_hw, %function
rtl8187b_init_hw:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r0]
	mov	r8, r0
	mov	r1, #1
	mov	r0, r4
	bl	rtl8187_set_anaparam
	mov	r2, #16
	ldr	r1, .L8
	mov	r0, r4
	bl	rtl818x_iowrite8
	ldr	r1, .L8+4
	mov	r0, r4
	bl	rtl818x_ioread8
	mov	r5, r0
	ldr	r1, .L8+4
	bic	r2, r5, #32
	mov	r0, r4
	bl	rtl818x_iowrite8
	ldr	r1, .L8+4
	orr	r2, r5, #32
	mov	r0, r4
	bl	rtl818x_iowrite8
	mov	r0, r8
	bl	rtl8187_cmd_reset
	subs	r7, r0, #0
	beq	.L7
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r1, #1
	mov	r0, r4
	bl	rtl8187_set_anaparam
	ldr	r2, .L8+8
	ldr	r1, .L8+12
	mov	r0, r4
	bl	rtl818x_iowrite16
	ldr	r1, [r4, #8]
	mov	r0, r4
	bl	rtl818x_ioread8
	mov	r2, r0
	ldr	r3, .L8+16
	ldr	r1, [r4, #8]
	ldr	r3, [r3]
	mov	r0, r4
	orr	r2, r2, r3
	bl	rtl818x_iowrite8
	mov	r3, #1
	ldr	r2, .L8+8
	ldr	r1, .L8+20
	mov	r0, r4
	bl	rtl818x_iowrite16_idx
	mov	r3, #1
	mov	r2, r7
	ldr	r1, .L8+24
	mov	r0, r4
	bl	rtl818x_iowrite8_idx
	mov	r3, #1
	ldr	r2, .L8+28
	ldr	r1, .L8+32
	mov	r0, r4
	bl	rtl818x_iowrite16_idx
	ldr	r3, .L8+36
	ldr	r1, [r4, #8]
	ldr	r2, [r3]
	add	r1, r1, #4
	mov	r0, r4
	bl	rtl818x_iowrite8
	ldr	r1, [r4, #8]
	mov	r0, r4
	add	r1, r1, #8
	bl	rtl818x_ioread8
	ldr	r1, [r4, #8]
	and	r2, r0, #63
	orr	r2, r2, #128
	add	r1, r1, #8
	mov	r0, r4
	bl	rtl818x_iowrite8
	ldr	r3, .L8+40
	ldr	r1, [r4, #8]
	ldr	r2, [r3]
	add	r1, r1, #4
	mov	r0, r4
	bl	rtl818x_iowrite8
	ldr	r1, [r4, #8]
	mov	r2, r7
	mov	r0, r4
	add	r1, r1, #12
	bl	rtl818x_iowrite8
	mov	r5, r7
	ldr	r6, .L8+44
	b	.L3
.L4:
	ldr	r3, [r6]
	mov	r0, r4
	ldr	r2, [r3, r5, lsl #2]
	add	r5, r5, #1
	ldr	r1, [r2]
	ldr	r3, [r2, #8]
	orr	r1, r1, #65280
	ldr	r2, [r2, #4]
	bl	rtl818x_iowrite8_idx
.L3:
	ldr	r0, [r6]
	bl	ARRAY_SIZE
	cmp	r0, r5
	bgt	.L4
	ldr	r1, [r4, #8]
	mov	r0, r4
	ldr	r2, .L8+48
	add	r1, r1, #56
	bl	rtl818x_iowrite16
	ldr	r1, [r4, #8]
	mov	r2, #0
	mov	r0, r4
	add	r1, r1, #52
	bl	rtl818x_iowrite16
	mov	r3, #1
	mov	r2, #0
	mov	r0, r4
	ldr	r1, .L8+52
	bl	rtl818x_iowrite32_idx
	mov	r3, #1
	mov	r2, #0
	mov	r0, r4
	ldr	r1, .L8+56
	bl	rtl818x_iowrite32_idx
	mov	r3, #1
	mov	r2, #0
	mov	r0, r4
	ldr	r1, .L8+60
	bl	rtl818x_iowrite8_idx
	ldr	r1, [r4, #8]
	mov	r0, r4
	ldr	r2, .L8+64
	add	r1, r1, #48
	bl	rtl818x_iowrite32
	mov	r3, #2
	mov	r0, r4
	ldr	r2, .L8+68
	ldr	r1, .L8+72
	bl	rtl818x_iowrite16_idx
	ldr	r1, [r4, #8]
	mov	r2, #1152
	mov	r0, r4
	add	r1, r1, #44
	bl	rtl818x_iowrite16
	ldr	r1, [r4, #8]
	mov	r0, r4
	ldr	r2, .L8+76
	add	r1, r1, #40
	bl	rtl818x_iowrite16
	ldr	r1, [r4, #8]
	ldr	r2, .L8+80
	add	r1, r1, #36
	mov	r0, r4
	bl	rtl818x_iowrite16
	mov	r0, #100
	bl	msleep
	ldr	r3, [r4, #12]
	mov	r0, r8
	ldr	r3, [r3]
	blx	r3
	ldr	r2, .L8+84
	ldr	r3, .L8+88
	ldr	r1, [r4, #8]
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r0, r4
	orr	r2, r2, r3
	add	r1, r1, #16
	bl	rtl818x_iowrite8
	ldr	r1, [r4, #8]
	mov	r0, r4
	ldr	r2, .L8+28
	add	r1, r1, #32
	bl	rtl818x_iowrite16
	mov	r2, #244
	mov	r0, r4
	ldr	r1, .L8+92
	bl	rtl818x_iowrite8
	mov	r2, #0
	mov	r0, r4
	ldr	r1, .L8+96
	bl	rtl818x_iowrite8
	mov	r2, #0
	mov	r0, r4
	ldr	r1, .L8+100
	bl	rtl818x_iowrite8
	mov	r2, #1
	mov	r0, r4
	ldr	r1, .L8+100
	bl	rtl818x_iowrite8
	mov	r2, #15
	mov	r0, r4
	ldr	r1, .L8+96
	bl	rtl818x_iowrite8
	mov	r2, #0
	mov	r0, r4
	ldr	r1, .L8+100
	bl	rtl818x_iowrite8
	mov	r2, #1
	mov	r0, r4
	ldr	r1, .L8+100
	bl	rtl818x_iowrite8
	mov	r0, r4
	ldr	r1, .L8+104
	bl	rtl818x_ioread8
	ldr	r1, .L8+104
	orr	r2, r0, #4
	mov	r0, r4
	bl	rtl818x_iowrite8
	mov	r3, #3
	mov	r0, r4
	ldr	r2, .L8+108
	ldr	r1, .L8+72
	bl	rtl818x_iowrite16_idx
	mov	r3, #3
	mov	r0, r4
	ldr	r2, .L8+112
	ldr	r1, .L8+116
	bl	rtl818x_iowrite16_idx
	mov	r3, #3
	mov	r0, r4
	ldr	r2, .L8+112
	ldr	r1, .L8+120
	bl	rtl818x_iowrite16_idx
	mov	r3, #3
	mov	r0, r4
	ldr	r2, .L8+124
	ldr	r1, .L8+128
	bl	rtl818x_iowrite16_idx
	mov	r3, #3
	mov	r0, r4
	ldr	r2, .L8+124
	ldr	r1, .L8+132
	bl	rtl818x_iowrite16_idx
	mov	r3, #3
	mov	r2, #208
	mov	r0, r4
	ldr	r1, .L8+136
	bl	rtl818x_iowrite16_idx
	mov	r2, #0
	mov	r0, r4
	ldr	r1, .L8
	bl	rtl818x_iowrite8
	mov	r3, #1
	mov	r2, #15
	mov	r0, r4
	ldr	r1, .L8+140
	bl	rtl818x_iowrite8_idx
	mov	r3, #1
	mov	r2, #3
	mov	r0, r4
	ldr	r1, .L8+144
	bl	rtl818x_iowrite8_idx
	mov	r2, #16
	mov	r0, r4
	ldr	r1, .L8+148
	bl	rtl818x_iowrite8
	mov	r3, #2
	mov	r2, #8
	mov	r0, r4
	ldr	r1, .L8+152
	bl	rtl818x_iowrite8_idx
	ldr	r1, [r4, #8]
	mov	r0, r4
	ldr	r2, .L8+156
	add	r1, r1, #28
	bl	rtl818x_iowrite32
	mov	r3, #1
	mov	r2, #2048
	mov	r0, r4
	ldr	r1, .L8+160
	bl	rtl818x_iowrite16_idx
	mov	lr, #9
	mov	ip, #7
	mov	r2, #2
	mov	r0, #3
	ldr	r3, [r4, #4]
	ldr	r1, [r4, #8]
	str	lr, [r4]
	add	r1, r1, #20
	stmib	r3, {r2, ip}
	str	r2, [r3]
	str	r0, [r3, #12]
	mov	r2, #0
	mov	r0, r4
	bl	rtl818x_iowrite8
	ldr	r3, .L8+164
	ldr	r1, [r4, #8]
	mov	r0, r4
	ldr	r2, [r3]
	add	r1, r1, #24
	bl	rtl818x_iowrite8
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	.align	2
.L8:
	.word	65377
	.word	65378
	.word	4095
	.word	65332
	.word	RTL818X_CW_CONF_PERPACKET_RETRY_SHIFT
	.word	65504
	.word	65506
	.word	65535
	.word	65492
	.word	RTL818X_EEPROM_CMD_CONFIG
	.word	RTL818X_EEPROM_CMD_NORMAL
	.word	rtl8187b_reg_table
	.word	64080
	.word	65520
	.word	65524
	.word	65528
	.word	16385
	.word	22170
	.word	65394
	.word	9352
	.word	8191
	.word	RTL818X_CMD_TX_ENABLE
	.word	RTL818X_CMD_RX_ENABLE
	.word	65089
	.word	65088
	.word	65090
	.word	65499
	.word	23034
	.word	22994
	.word	65396
	.word	65398
	.word	6650
	.word	65400
	.word	65402
	.word	65404
	.word	65408
	.word	65411
	.word	65498
	.word	65357
	.word	100676123
	.word	65516
	.word	RTL818X_MSR_ENEDCA
	.size	rtl8187b_init_hw, .-rtl8187b_init_hw
	.comm	rtl8187b_reg_table,4,4
	.comm	RTL818X_MSR_ENEDCA,4,4
	.comm	RTL818X_EEPROM_CMD_NORMAL,4,4
	.comm	RTL818X_EEPROM_CMD_CONFIG,4,4
	.comm	RTL818X_CW_CONF_PERPACKET_RETRY_SHIFT,4,4
	.comm	RTL818X_CMD_TX_ENABLE,4,4
	.comm	RTL818X_CMD_RX_ENABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
