	.file	"extr_ar9003_phy.c_ar9003_hw_set_rfmode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ar9003_hw_set_rfmode, @function
ar9003_hw_set_rfmode:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L1
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	mov	rdi, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	call	IS_CHAN_B@PLT
	test	rax, rax
	je	.L3
.L5:
	mov	r13d, DWORD PTR AR_PHY_MODE_DYNAMIC[rip]
.L4:
	mov	rsi, rbp
	mov	rdi, r12
	call	IS_CHAN_A_FAST_CLOCK@PLT
	test	rax, rax
	je	.L6
	mov	eax, DWORD PTR AR_PHY_MODE_DYNAMIC[rip]
	or	eax, DWORD PTR AR_PHY_MODE_DYN_CCK_DISABLE[rip]
	or	r13d, eax
.L6:
	mov	rdi, rbp
	call	IS_CHAN_QUARTER_RATE@PLT
	test	rax, rax
	je	.L7
	or	r13d, DWORD PTR AR_PHY_MODE_QUARTER[rip]
.L7:
	mov	rdi, rbp
	call	IS_CHAN_HALF_RATE@PLT
	test	rax, rax
	mov	eax, DWORD PTR AR_PHY_MODE_HALF[rip]
	je	.L9
	or	r13d, eax
.L9:
	or	eax, DWORD PTR AR_PHY_MODE_QUARTER[rip]
	test	eax, r13d
	jne	.L24
.L10:
	mov	esi, DWORD PTR AR_PHY_MODE[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_restore 6
	.cfi_def_cfa_offset 24
	mov	edx, r13d
	mov	rdi, r12
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 8
	jmp	REG_WRITE@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rdi, rbp
	call	IS_CHAN_G@PLT
	test	rax, rax
	jne	.L5
	mov	r13d, DWORD PTR AR_PHY_MODE_OFDM[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edx, DWORD PTR AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW[rip]
	mov	esi, DWORD PTR AR_PHY_FRAME_CTL[rip]
	mov	ecx, 3
	mov	rdi, r12
	call	REG_RMW_FIELD@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_def_cfa_offset 8
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.cfi_endproc
.LFE0:
	.size	ar9003_hw_set_rfmode, .-ar9003_hw_set_rfmode
	.comm	AR_PHY_MODE_QUARTER,4,4
	.comm	AR_PHY_MODE_OFDM,4,4
	.comm	AR_PHY_MODE_HALF,4,4
	.comm	AR_PHY_MODE_DYN_CCK_DISABLE,4,4
	.comm	AR_PHY_MODE_DYNAMIC,4,4
	.comm	AR_PHY_MODE,4,4
	.comm	AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW,4,4
	.comm	AR_PHY_FRAME_CTL,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_ar9003_phy.c_ar9003_hw_set_rfmode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar9003_hw_set_rfmode, %function
ar9003_hw_set_rfmode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r4, r1, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	mov	r5, r0
	mov	r0, r4
	bl	IS_CHAN_B
	cmp	r0, #0
	beq	.L3
.L5:
	ldr	r3, .L23
	ldr	r6, [r3]
.L4:
	mov	r1, r4
	mov	r0, r5
	bl	IS_CHAN_A_FAST_CLOCK
	cmp	r0, #0
	beq	.L6
	ldr	r3, .L23
	ldr	r2, .L23+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	orr	r6, r6, r3
.L6:
	mov	r0, r4
	bl	IS_CHAN_QUARTER_RATE
	ldr	r7, .L23+8
	cmp	r0, #0
	ldrne	r3, [r7]
	mov	r0, r4
	orrne	r6, r6, r3
	bl	IS_CHAN_HALF_RATE
	ldr	r3, .L23+12
	ldr	r2, [r7]
	ldr	r3, [r3]
	cmp	r0, #0
	orrne	r6, r6, r3
	orr	r3, r3, r2
	tst	r3, r6
	bne	.L22
.L10:
	ldr	r3, .L23+16
	mov	r2, r6
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r1, [r3]
	b	REG_WRITE
.L3:
	mov	r0, r4
	bl	IS_CHAN_G
	cmp	r0, #0
	bne	.L5
	ldr	r3, .L23+20
	ldr	r6, [r3]
	b	.L4
.L22:
	ldr	r3, .L23+24
	ldr	r2, .L23+28
	ldr	r1, [r3]
	mov	r0, r5
	mov	r3, #3
	ldr	r2, [r2]
	bl	REG_RMW_FIELD
	b	.L10
.L24:
	.align	2
.L23:
	.word	AR_PHY_MODE_DYNAMIC
	.word	AR_PHY_MODE_DYN_CCK_DISABLE
	.word	AR_PHY_MODE_QUARTER
	.word	AR_PHY_MODE_HALF
	.word	AR_PHY_MODE
	.word	AR_PHY_MODE_OFDM
	.word	AR_PHY_FRAME_CTL
	.word	AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW
	.size	ar9003_hw_set_rfmode, .-ar9003_hw_set_rfmode
	.comm	AR_PHY_MODE_QUARTER,4,4
	.comm	AR_PHY_MODE_OFDM,4,4
	.comm	AR_PHY_MODE_HALF,4,4
	.comm	AR_PHY_MODE_DYN_CCK_DISABLE,4,4
	.comm	AR_PHY_MODE_DYNAMIC,4,4
	.comm	AR_PHY_MODE,4,4
	.comm	AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW,4,4
	.comm	AR_PHY_FRAME_CTL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
