	.file	"extr_if_ural.c_ural_set_txantenna.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ural_set_txantenna, @function
ural_set_txantenna:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	mov	esi, DWORD PTR RAL_BBP_TX[rip]
	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
	call	ural_bbp_read@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR RAL_BBP_ANTMASK[rip]
	not	eax
	and	eax, r8d
	cmp	r12d, 1
	je	.L9
	mov	ebx, DWORD PTR RAL_BBP_DIVERSITY[rip]
	or	ebx, eax
	cmp	r12d, 2
	je	.L10
.L3:
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR RAL_RF_2525E[rip]
	je	.L5
	cmp	rax, QWORD PTR RAL_RF_2526[rip]
	je	.L5
	cmp	rax, QWORD PTR RAL_RF_5222[rip]
	jne	.L6
.L5:
	or	ebx, DWORD PTR RAL_BBP_FLIPIQ[rip]
.L6:
	mov	esi, DWORD PTR RAL_BBP_TX[rip]
	mov	edx, ebx
	mov	rdi, rbp
	and	ebx, 7
	call	ural_bbp_write@PLT
	mov	esi, DWORD PTR RAL_PHY_CSR5[rip]
	mov	rdi, rbp
	call	ural_read@PLT
	mov	esi, DWORD PTR RAL_PHY_CSR5[rip]
	mov	rdi, rbp
	and	eax, -8
	mov	edx, eax
	or	edx, ebx
	call	ural_write@PLT
	mov	esi, DWORD PTR RAL_PHY_CSR6[rip]
	mov	rdi, rbp
	call	ural_read@PLT
	mov	esi, DWORD PTR RAL_PHY_CSR6[rip]
	mov	rdi, rbp
	and	eax, -8
	mov	edx, eax
	or	edx, ebx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ural_write@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	or	eax, DWORD PTR RAL_BBP_ANTB[rip]
	mov	ebx, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	or	eax, DWORD PTR RAL_BBP_ANTA[rip]
	mov	ebx, eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	ural_set_txantenna, .-ural_set_txantenna
	.comm	RAL_RF_5222,8,8
	.comm	RAL_RF_2526,8,8
	.comm	RAL_RF_2525E,8,8
	.comm	RAL_PHY_CSR6,4,4
	.comm	RAL_PHY_CSR5,4,4
	.comm	RAL_BBP_TX,4,4
	.comm	RAL_BBP_FLIPIQ,4,4
	.comm	RAL_BBP_DIVERSITY,4,4
	.comm	RAL_BBP_ANTMASK,4,4
	.comm	RAL_BBP_ANTB,4,4
	.comm	RAL_BBP_ANTA,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_if_ural.c_ural_set_txantenna.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ural_set_txantenna, %function
ural_set_txantenna:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r8, .L10
	mov	r5, r1
	ldr	r1, [r8]
	mov	r6, r0
	bl	ural_bbp_read
	ldr	r3, .L10+4
	cmp	r5, #1
	ldr	r4, [r3]
	bic	r0, r0, r4
	beq	.L9
	cmp	r5, #2
	ldreq	r3, .L10+8
	ldrne	r3, .L10+12
	ldr	r4, [r3]
	orr	r4, r0, r4
.L3:
	ldr	r2, .L10+16
	ldr	r3, [r6]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L5
	ldr	r2, .L10+20
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L5
	ldr	r2, .L10+24
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L6
.L5:
	ldr	r3, .L10+28
	ldr	r3, [r3]
	orr	r4, r4, r3
.L6:
	ldr	r7, .L10+32
	mov	r2, r4
	ldr	r1, [r8]
	mov	r0, r6
	bl	ural_bbp_write
	ldr	r1, [r7]
	mov	r0, r6
	bl	ural_read
	ldr	r5, .L10+36
	and	r4, r4, #7
	bic	r2, r0, #7
	orr	r2, r2, r4
	ldr	r1, [r7]
	mov	r0, r6
	bl	ural_write
	ldr	r1, [r5]
	mov	r0, r6
	bl	ural_read
	bic	r2, r0, #7
	ldr	r1, [r5]
	mov	r0, r6
	orr	r2, r2, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	ural_write
.L9:
	ldr	r3, .L10+40
	ldr	r4, [r3]
	orr	r4, r0, r4
	b	.L3
.L11:
	.align	2
.L10:
	.word	RAL_BBP_TX
	.word	RAL_BBP_ANTMASK
	.word	RAL_BBP_ANTB
	.word	RAL_BBP_DIVERSITY
	.word	RAL_RF_2525E
	.word	RAL_RF_2526
	.word	RAL_RF_5222
	.word	RAL_BBP_FLIPIQ
	.word	RAL_PHY_CSR5
	.word	RAL_PHY_CSR6
	.word	RAL_BBP_ANTA
	.size	ural_set_txantenna, .-ural_set_txantenna
	.comm	RAL_RF_5222,4,4
	.comm	RAL_RF_2526,4,4
	.comm	RAL_RF_2525E,4,4
	.comm	RAL_PHY_CSR6,4,4
	.comm	RAL_PHY_CSR5,4,4
	.comm	RAL_BBP_TX,4,4
	.comm	RAL_BBP_FLIPIQ,4,4
	.comm	RAL_BBP_DIVERSITY,4,4
	.comm	RAL_BBP_ANTMASK,4,4
	.comm	RAL_BBP_ANTB,4,4
	.comm	RAL_BBP_ANTA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
