	.file	"extr_main.c_b43legacy_phy_versioning.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"FOUND UNSUPPORTED PHY (Analog %u, Type %u, Revision %u)\n"
	.align 8
.LC1:
	.string	"Found PHY: Analog %u, Type %u, Revision %u\n"
	.align 8
.LC2:
	.string	"Found Radio: Manuf 0x%X, Version 0x%X, Revision %u\n"
	.align 8
.LC3:
	.string	"FOUND UNSUPPORTED RADIO (Manuf 0x%X, Version 0x%X, Revision %u)\n"
	.text
	.p2align 4
	.type	b43legacy_phy_versioning, @function
b43legacy_phy_versioning:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR B43legacy_MMIO_PHY_VER[rip]
	call	b43legacy_read16@PLT
	mov	r15d, DWORD PTR B43legacy_PHYVER_ANALOG[rip]
	mov	ecx, DWORD PTR B43legacy_PHYVER_ANALOG_SHIFT[rip]
	mov	r12d, DWORD PTR B43legacy_PHYVER_TYPE[rip]
	and	r15d, eax
	sar	r15d, cl
	mov	ecx, DWORD PTR B43legacy_PHYVER_TYPE_SHIFT[rip]
	and	r12d, eax
	and	eax, DWORD PTR B43legacy_PHYVER_VERSION[rip]
	mov	ebx, eax
	sar	r12d, cl
	cmp	r12d, 128
	je	.L2
	cmp	r12d, 129
	jne	.L3
	lea	eax, -2[rax]
	and	eax, -3
	jne	.L26
.L4:
	mov	edi, DWORD PTR 0[rbp]
	mov	r8d, ebx
	mov	ecx, r12d
	mov	edx, r15d
	lea	rsi, .LC1[rip]
	call	b43legacydbg@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	DWORD PTR [rax], 17175
	jne	.L6
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L27
	mov	r13d, 3
	mov	ecx, 8272
	mov	r14d, 383
	cmp	r12d, 128
	je	.L12
	cmp	r12d, 129
	je	.L12
.L10:
	mov	edi, 1
	mov	DWORD PTR 12[rsp], ecx
	call	B43legacy_BUG_ON@PLT
	mov	ecx, DWORD PTR 12[rsp]
.L12:
	mov	edi, DWORD PTR 0[rbp]
	mov	r8d, r13d
	mov	edx, r14d
	lea	rsi, .LC2[rip]
	mov	DWORD PTR 12[rsp], ecx
	call	b43legacydbg@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	DWORD PTR 16[rbp], r14d
	xor	eax, eax
	mov	DWORD PTR 24[rbp], r13d
	mov	DWORD PTR 28[rbp], r15d
	mov	DWORD PTR 32[rbp], r12d
	mov	DWORD PTR 36[rbp], ebx
	mov	DWORD PTR 20[rbp], ecx
	add	rsp, 24
	.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
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	lea	eax, -6[rbx]
	cmp	eax, 1
	jbe	.L4
.L3:
	mov	edi, DWORD PTR 0[rbp]
	mov	r8d, ebx
	mov	ecx, r12d
	mov	edx, r15d
	lea	rsi, .LC0[rip]
	call	b43legacyerr@PLT
	mov	eax, DWORD PTR EOPNOTSUPP[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
.L2:
	.cfi_restore_state
	cmp	eax, 8
	jle	.L4
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edx, DWORD PTR B43legacy_RADIOCTL_ID[rip]
	mov	esi, DWORD PTR B43legacy_MMIO_RADIO_CONTROL[rip]
	mov	rdi, rbp
	call	b43legacy_write16@PLT
	mov	esi, DWORD PTR B43legacy_MMIO_RADIO_DATA_HIGH[rip]
	mov	rdi, rbp
	call	b43legacy_read16@PLT
	mov	edx, DWORD PTR B43legacy_RADIOCTL_ID[rip]
	mov	esi, DWORD PTR B43legacy_MMIO_RADIO_CONTROL[rip]
	mov	rdi, rbp
	sal	eax, 16
	mov	r13d, eax
	call	b43legacy_write16@PLT
	mov	esi, DWORD PTR B43legacy_MMIO_RADIO_DATA_LOW[rip]
	mov	rdi, rbp
	call	b43legacy_read16@PLT
	or	r13d, eax
	and	eax, 4095
	mov	r14d, eax
	mov	eax, r13d
	shr	r13d, 28
	sar	eax, 12
	movzx	ecx, ax
	cmp	r12d, 128
	je	.L9
.L24:
	cmp	r12d, 129
	jne	.L10
	and	eax, 65520
	cmp	eax, 8272
	je	.L12
.L11:
	mov	edi, DWORD PTR 0[rbp]
	mov	r8d, r13d
	mov	edx, r14d
	lea	rsi, .LC3[rip]
	call	b43legacyerr@PLT
	mov	eax, DWORD PTR EOPNOTSUPP[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
.L27:
	.cfi_restore_state
	xor	r13d, r13d
	cmp	eax, 1
	mov	edx, 335952
	mov	ecx, 8272
	setne	r13b
	mov	r14d, 383
	add	r13d, 4
	cmp	eax, 1
	mov	eax, 270416
	cmovne	eax, edx
	cmp	r12d, 128
	jne	.L24
	mov	ecx, 8272
	mov	r14d, 383
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	cmp	ecx, 8272
	jne	.L11
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	b43legacy_phy_versioning, .-b43legacy_phy_versioning
	.comm	EOPNOTSUPP,4,4
	.comm	B43legacy_RADIOCTL_ID,4,4
	.comm	B43legacy_PHYVER_VERSION,4,4
	.comm	B43legacy_PHYVER_TYPE_SHIFT,4,4
	.comm	B43legacy_PHYVER_TYPE,4,4
	.comm	B43legacy_PHYVER_ANALOG_SHIFT,4,4
	.comm	B43legacy_PHYVER_ANALOG,4,4
	.comm	B43legacy_MMIO_RADIO_DATA_LOW,4,4
	.comm	B43legacy_MMIO_RADIO_DATA_HIGH,4,4
	.comm	B43legacy_MMIO_RADIO_CONTROL,4,4
	.comm	B43legacy_MMIO_PHY_VER,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_main.c_b43legacy_phy_versioning.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"FOUND UNSUPPORTED PHY (Analog %u, Type %u, Revision"
	.ascii	" %u)\012\000"
	.align	2
.LC1:
	.ascii	"Found PHY: Analog %u, Type %u, Revision %u\012\000"
	.align	2
.LC2:
	.ascii	"Found Radio: Manuf 0x%X, Version 0x%X, Revision %u\012"
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"FOUND UNSUPPORTED RADIO (Manuf 0x%X, Version 0x%X, "
	.ascii	"Revision %u)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	b43legacy_phy_versioning, %function
b43legacy_phy_versioning:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L29
	sub	sp, sp, #8
	ldr	r1, [r3]
	mov	r7, r0
	bl	b43legacy_read16
	ldr	r2, .L29+4
	ldr	r3, .L29+8
	ldr	r4, [r2]
	ldr	r2, [r3]
	ldr	r1, .L29+12
	and	r4, r4, r0
	asr	r4, r4, r2
	ldr	r3, .L29+16
	ldr	r2, .L29+20
	ldr	r5, [r1]
	ldr	r3, [r3]
	ldr	r6, [r2]
	and	r5, r5, r0
	cmp	r4, #128
	asr	r5, r5, r3
	and	r6, r6, r0
	beq	.L2
	cmp	r4, #129
	bne	.L3
	sub	r3, r6, #2
	bics	r3, r3, #2
	bne	.L26
.L4:
	str	r6, [sp]
	mov	r3, r4
	mov	r2, r5
	ldr	r1, .L29+24
	ldr	r0, [r7]
	bl	b43legacydbg
	ldr	r3, [r7, #4]
	ldr	r2, .L29+28
	ldr	r3, [r3]
	ldr	r1, [r3]
	cmp	r1, r2
	bne	.L6
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L27
	cmp	r4, #128
	mov	r8, #3
	ldr	r10, .L29+32
	ldr	r9, .L29+36
	beq	.L12
	cmp	r4, #129
	beq	.L12
.L10:
	mov	r0, #1
	bl	B43legacy_BUG_ON
.L12:
	str	r8, [sp]
	mov	r3, r10
	mov	r2, r9
	ldr	r1, .L29+40
	ldr	r0, [r7]
	bl	b43legacydbg
	mov	r0, #0
	str	r9, [r7, #8]
	str	r10, [r7, #12]
	str	r8, [r7, #16]
	str	r5, [r7, #20]
	str	r4, [r7, #24]
	str	r6, [r7, #28]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L26:
	sub	r3, r6, #6
	cmp	r3, #1
	bls	.L4
.L3:
	str	r6, [sp]
	mov	r3, r4
	mov	r2, r5
	ldr	r0, [r7]
	ldr	r1, .L29+44
	bl	b43legacyerr
	ldr	r3, .L29+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	cmp	r6, #8
	ble	.L4
	b	.L3
.L6:
	ldr	r10, .L29+52
	ldr	r9, .L29+56
	ldr	r2, [r10]
	ldr	r1, [r9]
	mov	r0, r7
	bl	b43legacy_write16
	ldr	r3, .L29+60
	mov	r0, r7
	ldr	r1, [r3]
	bl	b43legacy_read16
	ldr	r2, [r10]
	ldr	r1, [r9]
	mov	r8, r0
	mov	r0, r7
	bl	b43legacy_write16
	ldr	r3, .L29+64
	mov	r0, r7
	ldr	r1, [r3]
	bl	b43legacy_read16
	ldr	r10, .L29+68
	lsl	r8, r8, #16
	orr	r8, r8, r0
	lsl	r9, r0, #20
	cmp	r4, #128
	asr	r2, r8, #12
	and	r10, r10, r8, asr #12
	lsr	r9, r9, #20
	lsr	r8, r8, #28
	beq	.L9
	cmp	r4, #129
	bne	.L10
.L13:
	ldr	r3, .L29+72
	ldr	r1, .L29+32
	and	r3, r3, r2
	cmp	r3, r1
	beq	.L12
.L11:
	str	r8, [sp]
	mov	r3, r10
	mov	r2, r9
	ldr	r0, [r7]
	ldr	r1, .L29+76
	bl	b43legacyerr
	ldr	r3, .L29+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L27:
	ldr	r1, .L29+80
	cmp	r3, #1
	moveq	r8, #4
	movne	r8, #5
	ldr	r2, .L29+84
	movne	r2, r1
	cmp	r4, #128
	beq	.L28
	cmp	r4, #129
	ldr	r10, .L29+32
	ldr	r9, .L29+36
	beq	.L13
	b	.L10
.L9:
	ldr	r3, .L29+32
	cmp	r10, r3
	bne	.L11
	b	.L12
.L28:
	ldr	r10, .L29+32
	ldr	r9, .L29+36
	b	.L12
.L30:
	.align	2
.L29:
	.word	B43legacy_MMIO_PHY_VER
	.word	B43legacy_PHYVER_TYPE
	.word	B43legacy_PHYVER_TYPE_SHIFT
	.word	B43legacy_PHYVER_ANALOG
	.word	B43legacy_PHYVER_ANALOG_SHIFT
	.word	B43legacy_PHYVER_VERSION
	.word	.LC1
	.word	17175
	.word	8272
	.word	383
	.word	.LC2
	.word	.LC0
	.word	EOPNOTSUPP
	.word	B43legacy_RADIOCTL_ID
	.word	B43legacy_MMIO_RADIO_CONTROL
	.word	B43legacy_MMIO_RADIO_DATA_HIGH
	.word	B43legacy_MMIO_RADIO_DATA_LOW
	.word	65535
	.word	65520
	.word	.LC3
	.word	335952
	.word	270416
	.size	b43legacy_phy_versioning, .-b43legacy_phy_versioning
	.comm	EOPNOTSUPP,4,4
	.comm	B43legacy_RADIOCTL_ID,4,4
	.comm	B43legacy_PHYVER_VERSION,4,4
	.comm	B43legacy_PHYVER_TYPE_SHIFT,4,4
	.comm	B43legacy_PHYVER_TYPE,4,4
	.comm	B43legacy_PHYVER_ANALOG_SHIFT,4,4
	.comm	B43legacy_PHYVER_ANALOG,4,4
	.comm	B43legacy_MMIO_RADIO_DATA_LOW,4,4
	.comm	B43legacy_MMIO_RADIO_DATA_HIGH,4,4
	.comm	B43legacy_MMIO_RADIO_CONTROL,4,4
	.comm	B43legacy_MMIO_PHY_VER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
