	.file	"extr_hw.c_ath9k_hw_read_revisions.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Failed to read SREV register"
	.text
	.p2align 4
	.type	ath9k_hw_read_revisions, @function
ath9k_hw_read_revisions:
.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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rdx, QWORD PTR [rdi]
	test	rdx, rdx
	je	.L2
	xor	eax, eax
	call	rdx
	mov	DWORD PTR 12[rbp], eax
.L2:
	mov	eax, DWORD PTR 16[rbp]
	add	eax, -128
	cmp	eax, 5
	ja	.L3
	lea	rdx, .L5[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L5:
	.long	.L10-.L5
	.long	.L9-.L5
	.long	.L8-.L5
	.long	.L7-.L5
	.long	.L6-.L5
	.long	.L4-.L5
	.text
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR AR_SREV_VERSION_9100[rip]
	mov	DWORD PTR 20[rbp], eax
.L3:
	mov	esi, DWORD PTR AR_SREV[rip]
	mov	rdi, rbp
	call	REG_READ@PLT
	mov	ebx, eax
	add	eax, DWORD PTR EIO[rip]
	je	.L29
	mov	r12d, DWORD PTR AR_SREV_ID[rip]
	and	r12d, ebx
	cmp	r12d, 255
	je	.L30
	mov	rdi, rbp
	call	AR_SREV_9100@PLT
	test	eax, eax
	je	.L19
	mov	edx, DWORD PTR 20[rbp]
.L20:
	and	r12d, DWORD PTR AR_SREV_REVISION[rip]
	cmp	DWORD PTR AR_SREV_VERSION_5416_PCIE[rip], edx
	mov	DWORD PTR 12[rbp], r12d
	je	.L16
.L27:
	mov	eax, 1
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR AR_SREV_VERSION_9561[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	DWORD PTR 20[rbp], eax
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	eax, DWORD PTR AR_SREV_VERSION_9550[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	DWORD PTR 20[rbp], eax
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	eax, DWORD PTR AR_SREV_VERSION_9531[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	DWORD PTR 20[rbp], eax
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	eax, DWORD PTR AR_SREV_VERSION_9340[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	DWORD PTR 20[rbp], eax
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	eax, DWORD PTR AR_SREV_VERSION_9330[rip]
	cmp	QWORD PTR 0[rbp], 0
	mov	DWORD PTR 20[rbp], eax
	jne	.L27
	mov	esi, DWORD PTR AR_SREV[rip]
	mov	rdi, rbp
	call	REG_READ@PLT
	mov	esi, DWORD PTR AR_SREV_REVISION2[rip]
	mov	edi, eax
	call	MS@PLT
	mov	DWORD PTR 12[rbp], eax
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	eax, DWORD PTR AR_SREV_VERSION2[rip]
	mov	ecx, DWORD PTR AR_SREV_TYPE2_S[rip]
	mov	edi, ebx
	mov	esi, DWORD PTR AR_SREV_REVISION2[rip]
	and	eax, ebx
	sar	eax, cl
	mov	DWORD PTR 20[rbp], eax
	call	MS@PLT
	mov	rdi, rbp
	mov	DWORD PTR 12[rbp], eax
	call	AR_SREV_9462@PLT
	test	rax, rax
	je	.L31
.L16:
	mov	DWORD PTR 8[rbp], 1
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, DWORD PTR AR_SREV_VERSION[rip]
	mov	edi, r12d
	call	MS@PLT
	mov	DWORD PTR 20[rbp], eax
	mov	edx, eax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, rbp
	call	ath9k_hw_common@PLT
	lea	rsi, .LC0[rip]
	mov	edi, eax
	call	ath_err@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, rbp
	call	AR_SREV_9565@PLT
	test	rax, rax
	jne	.L16
	xor	eax, eax
	test	DWORD PTR AR_SREV_TYPE2_HOST_MODE[rip], ebx
	sete	al
	mov	DWORD PTR 8[rbp], eax
	mov	eax, 1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ath9k_hw_read_revisions, .-ath9k_hw_read_revisions
	.comm	EIO,4,4
	.comm	AR_SREV_VERSION_9561,4,4
	.comm	AR_SREV_VERSION_9550,4,4
	.comm	AR_SREV_VERSION_9531,4,4
	.comm	AR_SREV_VERSION_9340,4,4
	.comm	AR_SREV_VERSION_9330,4,4
	.comm	AR_SREV_VERSION_9100,4,4
	.comm	AR_SREV_VERSION_5416_PCIE,4,4
	.comm	AR_SREV_VERSION2,4,4
	.comm	AR_SREV_VERSION,4,4
	.comm	AR_SREV_TYPE2_S,4,4
	.comm	AR_SREV_TYPE2_HOST_MODE,4,4
	.comm	AR_SREV_REVISION2,4,4
	.comm	AR_SREV_REVISION,4,4
	.comm	AR_SREV_ID,4,4
	.comm	AR_SREV,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_hw.c_ath9k_hw_read_revisions.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to read SREV register\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath9k_hw_read_revisions, %function
ath9k_hw_read_revisions:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, lr}
	cmp	r3, #0
	mov	r4, r0
	beq	.L2
	blx	r3
	str	r0, [r4, #8]
.L2:
	ldr	r3, [r4, #12]
	sub	r3, r3, #128
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L3
.L5:
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L4
.L4:
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [r4, #16]
.L3:
	ldr	r3, .L31+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	REG_READ
	ldr	r3, .L31+8
	mov	r5, r0
	ldr	r3, [r3]
	cmn	r0, r3
	beq	.L28
	ldr	r3, .L31+12
	ldr	r3, [r3]
	and	r6, r0, r3
	cmp	r6, #255
	beq	.L29
	mov	r0, r4
	bl	AR_SREV_9100
	cmp	r0, #0
	beq	.L19
	ldr	r0, [r4, #16]
.L20:
	ldr	r3, .L31+16
	ldr	r2, .L31+20
	ldr	r3, [r3]
	ldr	r2, [r2]
	and	r3, r3, r6
	cmp	r2, r0
	str	r3, [r4, #8]
	beq	.L16
.L21:
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r3, .L31+24
	mov	r0, #1
	ldr	r3, [r3]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, pc}
.L9:
	ldr	r3, .L31+28
	mov	r0, #1
	ldr	r3, [r3]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r3, .L31+32
	mov	r0, #1
	ldr	r3, [r3]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, pc}
.L7:
	ldr	r3, .L31+36
	mov	r0, #1
	ldr	r3, [r3]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r3, .L31+40
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, #0
	str	r3, [r4, #16]
	bne	.L21
	ldr	r3, .L31+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	REG_READ
	ldr	r3, .L31+44
	ldr	r1, [r3]
	bl	MS
	mov	r3, r0
	mov	r0, #1
	str	r3, [r4, #8]
	pop	{r4, r5, r6, pc}
.L29:
	ldr	r3, .L31+48
	ldr	r2, .L31+52
	ldr	r3, [r3]
	ldr	r1, [r2]
	and	r3, r3, r0
	ldr	r2, .L31+44
	asr	r3, r3, r1
	str	r3, [r4, #16]
	ldr	r1, [r2]
	bl	MS
	mov	r3, r0
	mov	r0, r4
	str	r3, [r4, #8]
	bl	AR_SREV_9462
	cmp	r0, #0
	beq	.L30
.L16:
	mov	r0, #1
	str	r0, [r4, #4]
	pop	{r4, r5, r6, pc}
.L19:
	ldr	r3, .L31+56
	mov	r0, r6
	ldr	r1, [r3]
	bl	MS
	str	r0, [r4, #16]
	b	.L20
.L28:
	mov	r0, r4
	bl	ath9k_hw_common
	ldr	r1, .L31+60
	bl	ath_err
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L30:
	mov	r0, r4
	bl	AR_SREV_9565
	cmp	r0, #0
	bne	.L16
	mov	r0, #1
	ldr	r3, .L31+64
	ldr	r3, [r3]
	tst	r5, r3
	moveq	r3, r0
	movne	r3, #0
	str	r3, [r4, #4]
	pop	{r4, r5, r6, pc}
.L32:
	.align	2
.L31:
	.word	AR_SREV_VERSION_9100
	.word	AR_SREV
	.word	EIO
	.word	AR_SREV_ID
	.word	AR_SREV_REVISION
	.word	AR_SREV_VERSION_5416_PCIE
	.word	AR_SREV_VERSION_9561
	.word	AR_SREV_VERSION_9550
	.word	AR_SREV_VERSION_9531
	.word	AR_SREV_VERSION_9340
	.word	AR_SREV_VERSION_9330
	.word	AR_SREV_REVISION2
	.word	AR_SREV_VERSION2
	.word	AR_SREV_TYPE2_S
	.word	AR_SREV_VERSION
	.word	.LC0
	.word	AR_SREV_TYPE2_HOST_MODE
	.size	ath9k_hw_read_revisions, .-ath9k_hw_read_revisions
	.comm	EIO,4,4
	.comm	AR_SREV_VERSION_9561,4,4
	.comm	AR_SREV_VERSION_9550,4,4
	.comm	AR_SREV_VERSION_9531,4,4
	.comm	AR_SREV_VERSION_9340,4,4
	.comm	AR_SREV_VERSION_9330,4,4
	.comm	AR_SREV_VERSION_9100,4,4
	.comm	AR_SREV_VERSION_5416_PCIE,4,4
	.comm	AR_SREV_VERSION2,4,4
	.comm	AR_SREV_VERSION,4,4
	.comm	AR_SREV_TYPE2_S,4,4
	.comm	AR_SREV_TYPE2_HOST_MODE,4,4
	.comm	AR_SREV_REVISION2,4,4
	.comm	AR_SREV_REVISION,4,4
	.comm	AR_SREV_ID,4,4
	.comm	AR_SREV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
