	.file	"extr_rt2500pci.c_rt2500pci_validate_eeprom.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Antenna: 0x%04x\n"
.LC1:
	.string	"NIC: 0x%04x\n"
.LC2:
	.string	"Calibrate offset: 0x%04x\n"
	.text
	.p2align 4
	.type	rt2500pci_validate_eeprom, @function
rt2500pci_validate_eeprom:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 88
	.cfi_def_cfa_offset 112
	mov	esi, DWORD PTR CSR21[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	rt2x00mmio_register_read@PLT
	mov	esi, DWORD PTR CSR21_TYPE_93C46[rip]
	mov	QWORD PTR 64[rsp], rbp
	mov	edi, eax
	mov	eax, DWORD PTR rt2500pci_eepromregister_read[rip]
	mov	DWORD PTR 56[rsp], eax
	mov	eax, DWORD PTR rt2500pci_eepromregister_write[rip]
	mov	DWORD PTR 52[rsp], eax
	call	rt2x00_get_field32@PLT
	movsx	rcx, DWORD PTR EEPROM_SIZE[rip]
	mov	edx, DWORD PTR 0[rbp]
	lea	rdi, 16[rsp]
	test	rax, rax
	mov	esi, DWORD PTR EEPROM_BASE[rip]
	mov	eax, DWORD PTR PCI_EEPROM_WIDTH_93C46[rip]
	mov	QWORD PTR 40[rsp], 0
	mov	QWORD PTR 32[rsp], 0
	cmove	eax, DWORD PTR PCI_EEPROM_WIDTH_93C66[rip]
	shr	rcx, 2
	mov	QWORD PTR 24[rsp], 0
	mov	DWORD PTR 48[rsp], eax
	mov	QWORD PTR 16[rsp], 0
	call	eeprom_93cx6_multiread@PLT
	mov	esi, DWORD PTR EEPROM_MAC_ADDR_0[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_addr@PLT
	mov	rdi, rbp
	mov	rsi, rax
	call	rt2x00lib_set_mac_address@PLT
	mov	esi, DWORD PTR EEPROM_ANTENNA[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_read@PLT
	mov	DWORD PTR 12[rsp], eax
	cmp	eax, 65535
	je	.L10
.L4:
	mov	esi, DWORD PTR EEPROM_NIC[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_read@PLT
	mov	DWORD PTR 12[rsp], eax
	cmp	eax, 65535
	je	.L11
.L5:
	mov	esi, DWORD PTR EEPROM_CALIBRATE_OFFSET[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_read@PLT
	mov	DWORD PTR 12[rsp], eax
	cmp	eax, 65535
	je	.L12
.L6:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	r12, 12[rsp]
	mov	esi, DWORD PTR EEPROM_ANTENNA_NUM[rip]
	mov	edx, 2
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	edx, DWORD PTR ANTENNA_SW_DIVERSITY[rip]
	mov	esi, DWORD PTR EEPROM_ANTENNA_TX_DEFAULT[rip]
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	edx, DWORD PTR ANTENNA_SW_DIVERSITY[rip]
	mov	esi, DWORD PTR EEPROM_ANTENNA_RX_DEFAULT[rip]
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	edx, DWORD PTR LED_MODE_DEFAULT[rip]
	mov	esi, DWORD PTR EEPROM_ANTENNA_LED_MODE[rip]
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	esi, DWORD PTR EEPROM_ANTENNA_DYN_TXAGC[rip]
	xor	edx, edx
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	esi, DWORD PTR EEPROM_ANTENNA_HARDWARE_RADIO[rip]
	xor	edx, edx
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	edx, DWORD PTR RF2522[rip]
	mov	esi, DWORD PTR EEPROM_ANTENNA_RF_TYPE[rip]
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR EEPROM_ANTENNA[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_write@PLT
	mov	edx, DWORD PTR 12[rsp]
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_dbg@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, DWORD PTR DEFAULT_RSSI_OFFSET[rip]
	mov	esi, DWORD PTR EEPROM_CALIBRATE_OFFSET_RSSI[rip]
	lea	rdi, 12[rsp]
	call	rt2x00_set_field16@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR EEPROM_CALIBRATE_OFFSET[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_write@PLT
	mov	edx, DWORD PTR 12[rsp]
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_dbg@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	lea	r12, 12[rsp]
	mov	esi, DWORD PTR EEPROM_NIC_CARDBUS_ACCEL[rip]
	xor	edx, edx
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	esi, DWORD PTR EEPROM_NIC_DYN_BBP_TUNE[rip]
	xor	edx, edx
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	esi, DWORD PTR EEPROM_NIC_CCK_TX_POWER[rip]
	xor	edx, edx
	mov	rdi, r12
	call	rt2x00_set_field16@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR EEPROM_NIC[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_write@PLT
	mov	edx, DWORD PTR 12[rsp]
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	rt2x00_eeprom_dbg@PLT
	jmp	.L5
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rt2500pci_validate_eeprom, .-rt2500pci_validate_eeprom
	.comm	rt2500pci_eepromregister_write,4,4
	.comm	rt2500pci_eepromregister_read,4,4
	.comm	RF2522,4,4
	.comm	PCI_EEPROM_WIDTH_93C66,4,4
	.comm	PCI_EEPROM_WIDTH_93C46,4,4
	.comm	LED_MODE_DEFAULT,4,4
	.comm	EEPROM_SIZE,4,4
	.comm	EEPROM_NIC_DYN_BBP_TUNE,4,4
	.comm	EEPROM_NIC_CCK_TX_POWER,4,4
	.comm	EEPROM_NIC_CARDBUS_ACCEL,4,4
	.comm	EEPROM_NIC,4,4
	.comm	EEPROM_MAC_ADDR_0,4,4
	.comm	EEPROM_CALIBRATE_OFFSET_RSSI,4,4
	.comm	EEPROM_CALIBRATE_OFFSET,4,4
	.comm	EEPROM_BASE,4,4
	.comm	EEPROM_ANTENNA_TX_DEFAULT,4,4
	.comm	EEPROM_ANTENNA_RX_DEFAULT,4,4
	.comm	EEPROM_ANTENNA_RF_TYPE,4,4
	.comm	EEPROM_ANTENNA_NUM,4,4
	.comm	EEPROM_ANTENNA_LED_MODE,4,4
	.comm	EEPROM_ANTENNA_HARDWARE_RADIO,4,4
	.comm	EEPROM_ANTENNA_DYN_TXAGC,4,4
	.comm	EEPROM_ANTENNA,4,4
	.comm	DEFAULT_RSSI_OFFSET,4,4
	.comm	CSR21_TYPE_93C46,4,4
	.comm	CSR21,4,4
	.comm	ANTENNA_SW_DIVERSITY,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_rt2500pci.c_rt2500pci_validate_eeprom.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Antenna: 0x%04x\012\000"
	.align	2
.LC1:
	.ascii	"NIC: 0x%04x\012\000"
	.align	2
.LC2:
	.ascii	"Calibrate offset: 0x%04x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rt2500pci_validate_eeprom, %function
rt2500pci_validate_eeprom:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	ldr	r3, .L14
	ldr	r2, .L14+4
	sub	sp, sp, #44
	ldr	r1, [r3]
	ldr	r2, [r2]
	str	r2, [sp, #36]
	mov	r2,#0
	bl	rt2x00mmio_register_read
	ldr	r2, .L14+8
	ldr	r3, .L14+12
	ldr	r1, .L14+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1]
	str	r3, [sp, #24]
	str	r2, [sp, #28]
	str	r4, [sp, #32]
	bl	rt2x00_get_field32
	mov	r5, #0
	cmp	r0, #0
	ldrne	r3, .L14+20
	ldreq	r3, .L14+24
	ldr	r2, .L14+28
	ldr	ip, [r3]
	ldr	r3, .L14+32
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r4]
	lsr	r3, r3, #2
	add	r0, sp, #4
	str	ip, [sp, #20]
	str	r5, [sp, #16]
	str	r5, [sp, #12]
	str	r5, [sp, #8]
	str	r5, [sp, #4]
	bl	eeprom_93cx6_multiread
	ldr	r3, .L14+36
	mov	r0, r4
	ldr	r1, [r3]
	bl	rt2x00_eeprom_addr
	ldr	r6, .L14+40
	mov	r1, r0
	mov	r0, r4
	bl	rt2x00lib_set_mac_address
	mov	r0, r4
	ldr	r1, [r6]
	bl	rt2x00_eeprom_read
	ldr	r3, .L14+44
	str	r0, [sp]
	cmp	r0, r3
	beq	.L10
.L4:
	ldr	r5, .L14+48
	mov	r0, r4
	ldr	r1, [r5]
	bl	rt2x00_eeprom_read
	ldr	r3, .L14+44
	str	r0, [sp]
	cmp	r0, r3
	beq	.L11
.L5:
	ldr	r5, .L14+52
	mov	r0, r4
	ldr	r1, [r5]
	bl	rt2x00_eeprom_read
	ldr	r3, .L14+44
	str	r0, [sp]
	cmp	r0, r3
	beq	.L12
.L6:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, #0
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L10:
	ldr	r3, .L14+56
	mov	r0, sp
	ldr	r1, [r3]
	mov	r2, #2
	bl	rt2x00_set_field16
	ldr	r7, .L14+60
	ldr	r3, .L14+64
	ldr	r2, [r7]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field16
	ldr	r3, .L14+68
	ldr	r2, [r7]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field16
	ldr	r3, .L14+72
	ldr	r2, .L14+76
	ldr	r1, [r3]
	mov	r0, sp
	ldr	r2, [r2]
	bl	rt2x00_set_field16
	ldr	r3, .L14+80
	mov	r2, r5
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field16
	ldr	r3, .L14+84
	mov	r2, r5
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field16
	ldr	r3, .L14+88
	ldr	r2, .L14+92
	ldr	r1, [r3]
	mov	r0, sp
	ldr	r2, [r2]
	bl	rt2x00_set_field16
	ldr	r1, [r6]
	ldr	r2, [sp]
	mov	r0, r4
	bl	rt2x00_eeprom_write
	mov	r0, r4
	ldr	r2, [sp]
	ldr	r1, .L14+96
	bl	rt2x00_eeprom_dbg
	b	.L4
.L12:
	ldr	r3, .L14+100
	ldr	r2, .L14+104
	ldr	r1, [r3]
	mov	r0, sp
	ldr	r2, [r2]
	bl	rt2x00_set_field16
	ldr	r1, [r5]
	ldr	r2, [sp]
	mov	r0, r4
	bl	rt2x00_eeprom_write
	mov	r0, r4
	ldr	r2, [sp]
	ldr	r1, .L14+108
	bl	rt2x00_eeprom_dbg
	b	.L6
.L11:
	ldr	r3, .L14+112
	mov	r0, sp
	ldr	r1, [r3]
	mov	r2, #0
	bl	rt2x00_set_field16
	ldr	r3, .L14+116
	mov	r0, sp
	ldr	r1, [r3]
	mov	r2, #0
	bl	rt2x00_set_field16
	ldr	r3, .L14+120
	mov	r0, sp
	ldr	r1, [r3]
	mov	r2, #0
	bl	rt2x00_set_field16
	ldr	r1, [r5]
	ldr	r2, [sp]
	mov	r0, r4
	bl	rt2x00_eeprom_write
	mov	r0, r4
	ldr	r2, [sp]
	ldr	r1, .L14+124
	bl	rt2x00_eeprom_dbg
	b	.L5
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	CSR21
	.word	.LC3
	.word	rt2500pci_eepromregister_read
	.word	rt2500pci_eepromregister_write
	.word	CSR21_TYPE_93C46
	.word	PCI_EEPROM_WIDTH_93C46
	.word	PCI_EEPROM_WIDTH_93C66
	.word	EEPROM_BASE
	.word	EEPROM_SIZE
	.word	EEPROM_MAC_ADDR_0
	.word	EEPROM_ANTENNA
	.word	65535
	.word	EEPROM_NIC
	.word	EEPROM_CALIBRATE_OFFSET
	.word	EEPROM_ANTENNA_NUM
	.word	ANTENNA_SW_DIVERSITY
	.word	EEPROM_ANTENNA_TX_DEFAULT
	.word	EEPROM_ANTENNA_RX_DEFAULT
	.word	EEPROM_ANTENNA_LED_MODE
	.word	LED_MODE_DEFAULT
	.word	EEPROM_ANTENNA_DYN_TXAGC
	.word	EEPROM_ANTENNA_HARDWARE_RADIO
	.word	EEPROM_ANTENNA_RF_TYPE
	.word	RF2522
	.word	.LC0
	.word	EEPROM_CALIBRATE_OFFSET_RSSI
	.word	DEFAULT_RSSI_OFFSET
	.word	.LC2
	.word	EEPROM_NIC_CARDBUS_ACCEL
	.word	EEPROM_NIC_DYN_BBP_TUNE
	.word	EEPROM_NIC_CCK_TX_POWER
	.word	.LC1
	.size	rt2500pci_validate_eeprom, .-rt2500pci_validate_eeprom
	.comm	rt2500pci_eepromregister_write,4,4
	.comm	rt2500pci_eepromregister_read,4,4
	.comm	RF2522,4,4
	.comm	PCI_EEPROM_WIDTH_93C66,4,4
	.comm	PCI_EEPROM_WIDTH_93C46,4,4
	.comm	LED_MODE_DEFAULT,4,4
	.comm	EEPROM_SIZE,4,4
	.comm	EEPROM_NIC_DYN_BBP_TUNE,4,4
	.comm	EEPROM_NIC_CCK_TX_POWER,4,4
	.comm	EEPROM_NIC_CARDBUS_ACCEL,4,4
	.comm	EEPROM_NIC,4,4
	.comm	EEPROM_MAC_ADDR_0,4,4
	.comm	EEPROM_CALIBRATE_OFFSET_RSSI,4,4
	.comm	EEPROM_CALIBRATE_OFFSET,4,4
	.comm	EEPROM_BASE,4,4
	.comm	EEPROM_ANTENNA_TX_DEFAULT,4,4
	.comm	EEPROM_ANTENNA_RX_DEFAULT,4,4
	.comm	EEPROM_ANTENNA_RF_TYPE,4,4
	.comm	EEPROM_ANTENNA_NUM,4,4
	.comm	EEPROM_ANTENNA_LED_MODE,4,4
	.comm	EEPROM_ANTENNA_HARDWARE_RADIO,4,4
	.comm	EEPROM_ANTENNA_DYN_TXAGC,4,4
	.comm	EEPROM_ANTENNA,4,4
	.comm	DEFAULT_RSSI_OFFSET,4,4
	.comm	CSR21_TYPE_93C46,4,4
	.comm	CSR21,4,4
	.comm	ANTENNA_SW_DIVERSITY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
