	.file	"extr_r92e_rom.c_r92e_parse_rom.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	r92e_parse_rom
	.type	r92e_parse_rom, @function
r92e_parse_rom:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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, 40
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR 20[rsi]
	mov	r12, QWORD PTR 16[rdi]
	mov	QWORD PTR 16[rsp], rdi
	mov	DWORD PTR 8[rdi], eax
	mov	edi, DWORD PTR 16[rsi]
	mov	QWORD PTR 24[rsp], rsi
	mov	rsi, QWORD PTR R92E_ROM_CRYSTALCAP_DEF[rip]
	call	RTWN_GET_ROM_VAR@PLT
	mov	QWORD PTR 8[rsp], 0
	mov	QWORD PTR 56[r12], rax
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 8[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	mov	rbx, rax
	lea	rbp, 0[0+rax*8]
	sal	rbx, 5
	add	rbx, QWORD PTR 8[rdx]
	cmp	DWORD PTR R92E_GROUP_2G[rip], 1
	jle	.L15
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 40[r12]
	mov	rsi, QWORD PTR R92E_DEF_TX_PWR_2G[rip]
	lea	r14, 0[0+r13*8]
	mov	r15, QWORD PTR [rax+rbp]
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR [rax+r13*4]
	add	r15, r14
	call	RTWN_GET_ROM_VAR@PLT
	mov	QWORD PTR [r15], rax
	mov	rax, QWORD PTR 48[r12]
	mov	rsi, QWORD PTR R92E_DEF_TX_PWR_2G[rip]
	add	r14, QWORD PTR [rax+rbp]
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR [rax+r13*4]
	call	RTWN_GET_ROM_VAR@PLT
	lea	edx, 1[r13]
	add	r13, 1
	mov	QWORD PTR [r14], rax
	mov	eax, DWORD PTR R92E_GROUP_2G[rip]
	sub	eax, 1
	cmp	eax, r13d
	jg	.L4
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	sal	rdx, 3
.L3:
	mov	rax, QWORD PTR 40[r12]
	mov	rsi, QWORD PTR R92E_DEF_TX_PWR_2G[rip]
	add	rdx, QWORD PTR [rax+rbp]
	mov	rax, QWORD PTR 16[rbx]
	mov	r13, rdx
	mov	edi, DWORD PTR [rax+rcx]
	call	RTWN_GET_ROM_VAR@PLT
	mov	esi, DWORD PTR LOW_PART[rip]
	mov	edi, DWORD PTR 8[rbx]
	mov	QWORD PTR 0[r13], rax
	mov	rax, QWORD PTR 32[r12]
	mov	rax, QWORD PTR [rax+rbp]
	mov	QWORD PTR [rax], 0
	call	MS@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 24[r12]
	mov	r13, QWORD PTR [rax+rbp]
	call	RTWN_SIGN4TO8@PLT
	mov	esi, DWORD PTR HIGH_PART[rip]
	mov	edi, DWORD PTR 8[rbx]
	mov	QWORD PTR 0[r13], rax
	call	MS@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 16[r12]
	mov	r13, QWORD PTR [rax+rbp]
	call	RTWN_SIGN4TO8@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	rsi, QWORD PTR R92E_DEF_TX_PWR_HT20_DIFF[rip]
	mov	QWORD PTR 0[r13], rax
	mov	rax, QWORD PTR 8[r12]
	mov	rax, QWORD PTR [rax+rbp]
	mov	QWORD PTR [rax], 0
	call	RTWN_GET_ROM_VAR@PLT
	cmp	QWORD PTR R92E_DEF_TX_PWR_HT20_DIFF[rip], rax
	je	.L5
	mov	esi, DWORD PTR LOW_PART[rip]
	mov	edi, DWORD PTR 8[rbx]
	call	MS@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 24[r12]
	mov	r13, QWORD PTR [rax+rbp]
	call	RTWN_SIGN4TO8@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR HIGH_PART[rip]
	mov	QWORD PTR 0[r13], rax
	call	MS@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 16[r12]
	mov	r13, QWORD PTR [rax+rbp]
	call	RTWN_SIGN4TO8@PLT
	mov	QWORD PTR 0[r13], rax
.L7:
	xor	r13d, r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rax, QWORD PTR [rbx]
	mov	esi, DWORD PTR LOW_PART[rip]
	mov	edi, DWORD PTR [rax+r15]
	call	MS@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 16[r12]
	mov	rcx, QWORD PTR [rax+rbp]
	add	rcx, r14
	mov	QWORD PTR [rsp], rcx
	call	RTWN_SIGN4TO8@PLT
	mov	rcx, QWORD PTR [rsp]
	mov	esi, DWORD PTR HIGH_PART[rip]
	mov	QWORD PTR [rcx], rax
	mov	rax, QWORD PTR [rbx]
	mov	edi, DWORD PTR [rax+r15]
	call	MS@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 8[r12]
	add	r14, QWORD PTR [rax+rbp]
	call	RTWN_SIGN4TO8@PLT
	mov	QWORD PTR [r14], rax
.L11:
	add	r13, 1
.L6:
	mov	rdi, QWORD PTR [rbx]
	call	nitems@PLT
	cmp	eax, r13d
	jle	.L21
	mov	rax, QWORD PTR [rbx]
	lea	r15, 0[0+r13*8]
	mov	rsi, QWORD PTR R92E_DEF_TX_PWR_DIFF[rip]
	lea	r14, 8[r15]
	mov	edi, DWORD PTR 4[rax+r15]
	call	RTWN_GET_ROM_VAR@PLT
	cmp	QWORD PTR R92E_DEF_TX_PWR_DIFF[rip], rax
	mov	rsi, rax
	je	.L8
	mov	rax, QWORD PTR [rbx]
	mov	esi, DWORD PTR LOW_PART[rip]
	mov	edi, DWORD PTR 4[rax+r15]
	call	MS@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 32[r12]
	mov	rcx, QWORD PTR [rax+rbp]
	add	rcx, r14
	mov	QWORD PTR [rsp], rcx
	call	RTWN_SIGN4TO8@PLT
	mov	rcx, QWORD PTR [rsp]
	mov	esi, DWORD PTR HIGH_PART[rip]
	mov	QWORD PTR [rcx], rax
	mov	rax, QWORD PTR [rbx]
	mov	edi, DWORD PTR 4[rax+r15]
	call	MS@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 24[r12]
	mov	rcx, QWORD PTR [rax+rbp]
	add	rcx, r14
	mov	QWORD PTR [rsp], rcx
	call	RTWN_SIGN4TO8@PLT
	mov	rcx, QWORD PTR [rsp]
	mov	rsi, QWORD PTR R92E_DEF_TX_PWR_DIFF[rip]
	mov	QWORD PTR [rcx], rax
.L9:
	mov	rax, QWORD PTR [rbx]
	mov	edi, DWORD PTR [rax+r15]
	call	RTWN_GET_ROM_VAR@PLT
	cmp	QWORD PTR R92E_DEF_TX_PWR_DIFF[rip], rax
	jne	.L22
	mov	rcx, QWORD PTR 8[r12]
	mov	rcx, QWORD PTR [rcx+rbp]
	mov	QWORD PTR 8[rcx+r15], rax
	mov	rcx, QWORD PTR 16[r12]
	mov	rcx, QWORD PTR [rcx+rbp]
	mov	QWORD PTR 8[rcx+r15], rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR 24[r12]
	mov	rax, QWORD PTR [rax+rbp]
	mov	QWORD PTR 8[rax+r15], rsi
	mov	rax, QWORD PTR 32[r12]
	mov	rax, QWORD PTR [rax+rbp]
	mov	QWORD PTR 8[rax+r15], rsi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdx, QWORD PTR 16[rsp]
	add	QWORD PTR 8[rsp], 1
	mov	rax, QWORD PTR 8[rsp]
	cmp	DWORD PTR [rdx], eax
	jg	.L2
.L13:
	mov	rbx, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR R92C_ROM_RF1_REGULATORY[rip]
	mov	edi, DWORD PTR 4[rbx]
	call	MS@PLT
	mov	esi, DWORD PTR [rbx]
	mov	DWORD PTR [r12], eax
	mov	rax, QWORD PTR 16[rsp]
	mov	edi, DWORD PTR 4[rax]
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	jmp	IEEE80211_ADDR_COPY@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdx, QWORD PTR 16[r12]
	mov	rdx, QWORD PTR [rdx+rbp]
	mov	QWORD PTR [rdx], rax
	mov	rdx, QWORD PTR 24[r12]
	mov	rdx, QWORD PTR [rdx+rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	xor	edx, edx
	xor	ecx, ecx
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	r92e_parse_rom, .-r92e_parse_rom
	.comm	R92E_ROM_CRYSTALCAP_DEF,8,8
	.comm	R92E_GROUP_2G,4,4
	.comm	R92E_DEF_TX_PWR_HT20_DIFF,8,8
	.comm	R92E_DEF_TX_PWR_DIFF,8,8
	.comm	R92E_DEF_TX_PWR_2G,8,8
	.comm	R92C_ROM_RF1_REGULATORY,4,4
	.comm	LOW_PART,4,4
	.comm	HIGH_PART,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_r92e_rom.c_r92e_parse_rom.c"
	.text
	.align	2
	.global	r92e_parse_rom
	.syntax unified
	.arm
	.fpu softvfp
	.type	r92e_parse_rom, %function
r92e_parse_rom:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r2, [r1, #16]
	ldr	r3, .L21
	sub	sp, sp, #20
	str	r1, [sp, #12]
	str	r0, [sp, #8]
	str	r2, [r0, #8]
	ldr	r0, [r1, #12]
	ldr	r1, [r3]
	ldr	r6, [r4, #12]
	bl	RTWN_GET_ROM_VAR
	ldr	r3, [r4]
	str	r0, [r6, #28]
	cmp	r3, #0
	ble	.L13
	mov	r3, #0
	ldr	fp, .L21+4
	ldr	r9, .L21+8
	ldr	r8, .L21+12
	str	r3, [sp, #4]
.L2:
	ldr	r3, [fp]
	ldr	r2, [sp, #12]
	cmp	r3, #1
	ldr	r4, [r2, #8]
	ldr	r3, [sp, #4]
	mov	r7, #0
	add	r4, r4, r3, lsl #4
	lsl	r5, r3, #2
	ble	.L3
.L4:
	ldr	r2, [r4, #8]
	ldr	r3, [r6, #20]
	ldr	r0, [r2, r7, lsl #2]
	ldr	r1, [r9]
	ldr	r10, [r3, r5]
	bl	RTWN_GET_ROM_VAR
	ldr	r2, [r4, #12]
	ldr	r3, [r6, #24]
	str	r0, [r10, r7, lsl #2]
	ldr	r1, [r9]
	ldr	r0, [r2, r7, lsl #2]
	ldr	r10, [r3, r5]
	bl	RTWN_GET_ROM_VAR
	ldr	r3, [fp]
	str	r0, [r10, r7, lsl #2]
	sub	r3, r3, #1
	add	r7, r7, #1
	cmp	r3, r7
	bgt	.L4
	lsl	r7, r7, #2
.L3:
	ldr	r2, [r4, #8]
	ldr	r3, [r6, #20]
	ldr	r0, [r2, r7]
	ldr	r1, [r9]
	ldr	r10, [r3, r5]
	bl	RTWN_GET_ROM_VAR
	ldr	r2, [r6, #16]
	str	r0, [r10, r7]
	mov	r10, #0
	ldr	r3, [r2, r5]
	ldr	r2, .L21+16
	ldr	r0, [r4, #4]
	ldr	r1, [r2]
	str	r10, [r3]
	bl	MS
	ldr	r3, [r6, #12]
	ldr	r7, [r3, r5]
	bl	RTWN_SIGN4TO8
	ldr	r3, .L21+20
	ldr	r1, [r3]
	str	r0, [r7]
	ldr	r0, [r4, #4]
	bl	MS
	ldr	r3, [r6, #8]
	ldr	r7, [r3, r5]
	bl	RTWN_SIGN4TO8
	str	r0, [r7]
	ldr	r3, [r6, #4]
	ldr	r7, .L21+24
	ldr	r3, [r3, r5]
	ldr	r1, [r7]
	ldr	r0, [r4, #4]
	str	r10, [r3]
	bl	RTWN_GET_ROM_VAR
	ldr	r3, [r7]
	cmp	r3, r0
	beq	.L5
	ldr	r2, .L21+16
	ldr	r0, [r4, #4]
	ldr	r1, [r2]
	bl	MS
	ldr	r3, [r6, #12]
	ldr	r7, [r3, r5]
	bl	RTWN_SIGN4TO8
	ldr	r3, .L21+20
	str	r0, [r7]
	ldr	r1, [r3]
	ldr	r0, [r4, #4]
	bl	MS
	ldr	r3, [r6, #8]
	ldr	r7, [r3, r5]
	bl	RTWN_SIGN4TO8
	str	r0, [r7]
.L7:
	mov	r10, #0
.L6:
	ldr	r0, [r4]
	bl	nitems
	cmp	r0, r10
	ble	.L20
.L12:
	ldr	r3, [r4]
	ldr	r1, [r8]
	add	r3, r3, r10, lsl #3
	ldr	r0, [r3, #4]
	bl	RTWN_GET_ROM_VAR
	ldr	r3, [r8]
	lsl	r7, r10, #3
	cmp	r3, r0
	mov	r1, r0
	add	r10, r10, #1
	beq	.L8
	ldr	r3, [r4]
	ldr	r2, .L21+16
	add	r3, r3, r7
	ldr	r1, [r2]
	ldr	r0, [r3, #4]
	bl	MS
	ldr	r3, [r6, #16]
	ldr	r3, [r3, r5]
	str	r3, [sp]
	bl	RTWN_SIGN4TO8
	ldr	r3, [sp]
	ldr	r2, .L21+20
	str	r0, [r3, r10, lsl #2]
	ldr	r3, [r4]
	ldr	r1, [r2]
	add	r3, r3, r7
	ldr	r0, [r3, #4]
	bl	MS
	ldr	r3, [r6, #12]
	ldr	r3, [r3, r5]
	str	r3, [sp]
	bl	RTWN_SIGN4TO8
	ldr	r3, [sp]
	ldr	r1, [r8]
	str	r0, [r3, r10, lsl #2]
.L9:
	ldr	r3, [r4]
	ldr	r0, [r3, r7]
	bl	RTWN_GET_ROM_VAR
	ldr	r3, [r8]
	cmp	r3, r0
	beq	.L10
	ldr	r2, .L21+16
	ldr	r3, [r4]
	ldr	r1, [r2]
	ldr	r0, [r3, r7]
	bl	MS
	ldr	r3, [r6, #8]
	ldr	r3, [r3, r5]
	str	r3, [sp]
	bl	RTWN_SIGN4TO8
	ldr	r3, [sp]
	ldr	r2, .L21+20
	str	r0, [r3, r10, lsl #2]
	ldr	r3, [r4]
	ldr	r1, [r2]
	ldr	r0, [r3, r7]
	bl	MS
	ldr	r3, [r6, #4]
	ldr	r7, [r3, r5]
	bl	RTWN_SIGN4TO8
	str	r0, [r7, r10, lsl #2]
	ldr	r0, [r4]
	bl	nitems
	cmp	r0, r10
	bgt	.L12
.L20:
	ldr	r3, [sp, #8]
	ldr	r2, [sp, #4]
	ldr	r3, [r3]
	add	r2, r2, #1
	cmp	r3, r2
	str	r2, [sp, #4]
	bgt	.L2
.L13:
	ldr	r4, [sp, #12]
	ldr	r3, .L21+28
	ldr	r0, [r4, #4]
	ldr	r1, [r3]
	bl	MS
	ldr	r3, [sp, #8]
	ldr	r1, [r4]
	str	r0, [r6]
	ldr	r0, [r3, #4]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	IEEE80211_ADDR_COPY
.L10:
	ldr	r2, [r6, #4]
	ldr	r2, [r2, r5]
	str	r3, [r2, r10, lsl #2]
	ldr	r2, [r6, #8]
	ldr	r2, [r2, r5]
	str	r3, [r2, r10, lsl #2]
	b	.L6
.L8:
	ldr	r3, [r6, #12]
	ldr	r3, [r3, r5]
	str	r0, [r3, r10, lsl #2]
	ldr	r3, [r6, #16]
	ldr	r3, [r3, r5]
	str	r0, [r3, r10, lsl #2]
	b	.L9
.L5:
	ldr	r2, [r6, #8]
	ldr	r2, [r2, r5]
	str	r3, [r2]
	ldr	r2, [r6, #12]
	ldr	r2, [r2, r5]
	str	r3, [r2]
	b	.L7
.L22:
	.align	2
.L21:
	.word	R92E_ROM_CRYSTALCAP_DEF
	.word	R92E_GROUP_2G
	.word	R92E_DEF_TX_PWR_2G
	.word	R92E_DEF_TX_PWR_DIFF
	.word	LOW_PART
	.word	HIGH_PART
	.word	R92E_DEF_TX_PWR_HT20_DIFF
	.word	R92C_ROM_RF1_REGULATORY
	.size	r92e_parse_rom, .-r92e_parse_rom
	.comm	R92E_ROM_CRYSTALCAP_DEF,4,4
	.comm	R92E_GROUP_2G,4,4
	.comm	R92E_DEF_TX_PWR_HT20_DIFF,4,4
	.comm	R92E_DEF_TX_PWR_DIFF,4,4
	.comm	R92E_DEF_TX_PWR_2G,4,4
	.comm	R92C_ROM_RF1_REGULATORY,4,4
	.comm	LOW_PART,4,4
	.comm	HIGH_PART,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
