	.file	"extr_if_urtw.c_urtw_get_rfchip.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"rtl8225u"
.LC1:
	.string	"none"
.LC2:
	.string	"rtl8187l"
.LC3:
	.string	"rtl8187b"
.LC4:
	.string	"rtl8225z2"
.LC5:
	.string	"e"
.LC6:
	.string	"b"
.LC7:
	.string	"d"
.LC8:
	.string	"unknown type: %#x\n"
.LC9:
	.string	"unknown RTL8187L type: %#x\n"
.LC10:
	.string	"unsupported RF chip %d\n"
.LC11:
	.string	"%s rf %s hwrev %s\n"
	.text
	.p2align 4
	.type	urtw_get_rfchip, @function
urtw_get_rfchip:
.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, 40
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR URTW_RTL8187B[rip], eax
	je	.L2
	lea	rdx, 16[rsp]
	mov	esi, 225
	call	urtw_read8_m@PLT
	mov	edx, DWORD PTR 16[rsp]
	cmp	edx, 1
	je	.L3
	cmp	edx, 2
	je	.L4
	test	edx, edx
	je	.L40
	mov	edi, DWORD PTR 4[rbp]
	lea	rsi, .LC8[rip]
	xor	eax, eax
	call	device_printf@PLT
.L40:
	mov	eax, DWORD PTR URTW_RTL8187B_REV_B[rip]
	or	DWORD PTR 0[rbp], eax
	lea	r12, 20[rsp]
.L6:
	mov	esi, DWORD PTR URTW_EPROM_RFCHIPID[rip]
	mov	rdx, r12
	mov	rdi, rbp
	call	urtw_eprom_read32@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L1
	movzx	ecx, BYTE PTR 20[rsp]
	cmp	ecx, 130
	je	.L10
	cmp	ecx, 131
	je	.L43
	mov	esi, DWORD PTR URTW_DEBUG_STATE[rip]
	lea	rdx, .LC10[rip]
	mov	rdi, rbp
	call	DPRINTF@PLT
	mov	r12, QWORD PTR USB_ERR_INVAL[rip]
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L44
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR URTW_TX_CONF[rip]
	lea	r12, 20[rsp]
	mov	rdx, r12
	call	urtw_read32_m@PLT
	mov	edx, DWORD PTR 20[rsp]
	and	edx, DWORD PTR URTW_TX_HWMASK[rip]
	cmp	edx, 128
	je	.L7
	cmp	edx, 129
	je	.L6
	mov	edi, DWORD PTR 4[rbp]
	lea	rsi, .LC9[rip]
	xor	eax, eax
	call	device_printf@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L43:
	lea	rsi, 12[rsp]
	mov	rdi, rbp
	call	urtw_8225_isv2@PLT
	test	rax, rax
	jne	.L23
	mov	edx, DWORD PTR 12[rsp]
	mov	rax, QWORD PTR urtw_8225_rf_stop[rip]
	test	edx, edx
	jne	.L12
	mov	edx, DWORD PTR urtw_8225_rf_init[rip]
	mov	QWORD PTR 8[rbp], rax
	mov	DWORD PTR 36[rbp], edx
	mov	edx, DWORD PTR urtw_8225_rf_set_sens[rip]
	mov	DWORD PTR 40[rbp], edx
	mov	edx, DWORD PTR urtw_8225_rf_set_chan[rip]
	mov	DWORD PTR 32[rbp], edx
.L13:
	mov	rax, QWORD PTR URTW_8225_RF_MAX_SENS[rip]
	movzx	esi, BYTE PTR 20[rsp]
	mov	QWORD PTR 24[rbp], rax
	mov	rax, QWORD PTR URTW_8225_RF_DEF_SENS[rip]
	mov	QWORD PTR 16[rbp], rax
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR URTW_RTL8187B[rip], eax
	je	.L45
	mov	eax, DWORD PTR 16[rsp]
	test	eax, eax
	je	.L26
	cmp	eax, 1
	je	.L46
	lea	rcx, .LC0[rip]
	lea	r8, .LC5[rip]
	lea	rdx, .LC3[rip]
	cmp	esi, 131
	jne	.L41
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR 4[rbp]
	lea	rsi, .LC11[rip]
	xor	eax, eax
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR urtw_8225v2b_rf_init[rip]
	lea	rcx, .LC4[rip]
	lea	r8, .LC1[rip]
	lea	rdx, .LC2[rip]
	mov	DWORD PTR 36[rbp], eax
	mov	eax, DWORD PTR urtw_8225v2b_rf_set_chan[rip]
	mov	DWORD PTR 32[rbp], eax
	mov	rax, QWORD PTR URTW_8225_RF_MAX_SENS[rip]
	mov	QWORD PTR 24[rbp], rax
	mov	rax, QWORD PTR URTW_8225_RF_DEF_SENS[rip]
	mov	QWORD PTR 16[rbp], rax
	mov	rax, QWORD PTR urtw_8225_rf_stop[rip]
	mov	QWORD PTR 8[rbp], rax
	mov	eax, DWORD PTR URTW_RTL8187B[rip]
	test	DWORD PTR 0[rbp], eax
	je	.L17
	mov	eax, DWORD PTR 16[rsp]
	test	eax, eax
	je	.L24
	lea	r8, .LC5[rip]
	lea	rcx, .LC4[rip]
	cmp	eax, 1
	je	.L47
.L19:
	lea	rdx, .LC3[rip]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR URTW_RTL8187B[rip]
	or	DWORD PTR 0[rbp], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR URTW_RTL8187B_REV_E[rip]
	lea	r12, 20[rsp]
	or	DWORD PTR 0[rbp], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR URTW_RTL8187B_REV_D[rip]
	lea	r12, 20[rsp]
	or	DWORD PTR 0[rbp], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L23:
.L9:
	endbr64
	mov	r12, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L45:
	cmp	esi, 131
	lea	rcx, .LC0[rip]
	lea	rax, .LC4[rip]
	cmovne	rcx, rax
	lea	r8, .LC1[rip]
	lea	rdx, .LC2[rip]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, DWORD PTR urtw_8225v2_rf_init[rip]
	mov	QWORD PTR 8[rbp], rax
	mov	DWORD PTR 36[rbp], edx
	mov	edx, DWORD PTR urtw_8225v2_rf_set_chan[rip]
	mov	DWORD PTR 32[rbp], edx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L24:
	lea	r8, .LC6[rip]
.L41:
	lea	rcx, .LC4[rip]
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L26:
	lea	r8, .LC6[rip]
.L20:
	lea	rcx, .LC0[rip]
	cmp	esi, 131
	je	.L19
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L47:
	lea	r8, .LC7[rip]
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L46:
	lea	r8, .LC7[rip]
	jmp	.L20
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	urtw_get_rfchip, .-urtw_get_rfchip
	.comm	urtw_8225v2b_rf_set_chan,4,4
	.comm	urtw_8225v2b_rf_init,4,4
	.comm	urtw_8225v2_rf_set_chan,4,4
	.comm	urtw_8225v2_rf_init,4,4
	.comm	urtw_8225_rf_stop,8,8
	.comm	urtw_8225_rf_set_sens,4,4
	.comm	urtw_8225_rf_set_chan,4,4
	.comm	urtw_8225_rf_init,4,4
	.comm	USB_ERR_INVAL,8,8
	.comm	URTW_TX_HWMASK,4,4
	.comm	URTW_TX_CONF,4,4
	.comm	URTW_RTL8187B_REV_E,4,4
	.comm	URTW_RTL8187B_REV_D,4,4
	.comm	URTW_RTL8187B_REV_B,4,4
	.comm	URTW_RTL8187B,4,4
	.comm	URTW_EPROM_RFCHIPID,4,4
	.comm	URTW_DEBUG_STATE,4,4
	.comm	URTW_8225_RF_MAX_SENS,8,8
	.comm	URTW_8225_RF_DEF_SENS,8,8
	.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_urtw.c_urtw_get_rfchip.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rtl8225z2\000"
	.align	2
.LC1:
	.ascii	"rtl8225u\000"
	.align	2
.LC2:
	.ascii	"rtl8187l\000"
	.align	2
.LC3:
	.ascii	"none\000"
	.align	2
.LC4:
	.ascii	"rtl8187b\000"
	.align	2
.LC5:
	.ascii	"b\000"
	.align	2
.LC6:
	.ascii	"e\000"
	.align	2
.LC7:
	.ascii	"d\000"
	.align	2
.LC8:
	.ascii	"unknown type: %#x\012\000"
	.align	2
.LC9:
	.ascii	"unknown RTL8187L type: %#x\012\000"
	.align	2
.LC10:
	.ascii	"unsupported RF chip %d\012\000"
	.align	2
.LC11:
	.ascii	"%s rf %s hwrev %s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	urtw_get_rfchip, %function
urtw_get_rfchip:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L37
	ldr	r2, [r0]
	ldr	r3, [r6]
	ldr	r1, .L37+4
	sub	sp, sp, #24
	tst	r2, r3
	mov	r4, r0
	ldr	r1, [r1]
	str	r1, [sp, #20]
	mov	r1,#0
	beq	.L2
	add	r2, sp, #12
	mov	r1, #225
	bl	urtw_read8_m
	ldr	r2, [sp, #12]
	cmp	r2, #1
	beq	.L3
	cmp	r2, #2
	beq	.L4
	cmp	r2, #0
	beq	.L31
	ldr	r1, .L37+8
	ldr	r0, [r4, #4]
	bl	device_printf
.L31:
	ldr	r2, .L37+12
.L32:
	ldr	r3, [r4]
	ldr	r2, [r2]
	add	r5, sp, #16
	orr	r3, r3, r2
	str	r3, [r4]
.L6:
	ldr	r3, .L37+16
	mov	r2, r5
	mov	r0, r4
	ldr	r1, [r3]
	bl	urtw_eprom_read32
	subs	r5, r0, #0
	bne	.L1
	ldrb	r3, [sp, #16]	@ zero_extendqisi2
	cmp	r3, #130
	beq	.L10
	cmp	r3, #131
	beq	.L34
	ldr	r2, .L37+20
	mov	r0, r4
	ldr	r1, [r2]
	ldr	r2, .L37+24
	bl	DPRINTF
	ldr	r3, .L37+28
	ldr	r5, [r3]
.L1:
	ldr	r3, .L37+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	mov	r0, r5
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r3, .L37+32
	add	r5, sp, #16
	mov	r2, r5
	ldr	r1, [r3]
	bl	urtw_read32_m
	ldr	r3, .L37+36
	ldr	r2, [sp, #16]
	ldr	r3, [r3]
	and	r2, r2, r3
	cmp	r2, #128
	beq	.L7
	cmp	r2, #129
	beq	.L6
	ldr	r1, .L37+40
	ldr	r0, [r4, #4]
	bl	device_printf
	b	.L6
.L34:
.L9:
	mov	r0, r4
	add	r1, sp, #8
	bl	urtw_8225_isv2
	cmp	r0, #0
	movne	r5, r0
	bne	.L1
	ldr	r2, [sp, #8]
	ldr	r3, .L37+44
	cmp	r2, #0
	ldr	r3, [r3]
	bne	.L12
	ldr	r0, .L37+48
	ldr	r1, .L37+52
	ldr	r2, .L37+56
	ldr	r0, [r0]
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r3, [r4, #8]
	str	r0, [r4, #24]
	str	r1, [r4, #28]
	str	r2, [r4, #20]
.L13:
	ldr	r2, .L37+60
	ldr	r3, .L37+64
	ldr	r0, [r4]
	ldr	r1, [r6]
	ldr	r3, [r3]
	ldr	r2, [r2]
	tst	r0, r1
	str	r3, [r4, #12]
	ldr	r0, [r4, #4]
	ldrb	r3, [sp, #16]	@ zero_extendqisi2
	str	r2, [r4, #16]
	beq	.L36
	ldr	r1, .L37+68
	ldr	r2, .L37+72
	cmp	r3, #131
	movne	r3, r1
	moveq	r3, r2
.L16:
	ldr	ip, [sp, #12]
	cmp	ip, #0
	beq	.L21
	ldr	lr, .L37+76
	cmp	ip, #1
	ldr	r1, .L37+80
	movne	r1, lr
	ldr	r2, .L37+84
.L17:
	str	r1, [sp]
	ldr	r1, .L37+88
	bl	device_printf
	b	.L1
.L10:
	ldr	r3, [r6]
	ldr	r2, [r4]
	ldr	ip, .L37+92
	tst	r2, r3
	ldr	r0, .L37+96
	ldr	r1, .L37+60
	ldr	r2, .L37+64
	ldr	r3, .L37+44
	ldr	r0, [r0]
	ldr	r3, [r3]
	ldr	ip, [ip]
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r0, [r4, #20]
	str	r3, [r4, #8]
	ldr	r0, [r4, #4]
	ldr	r3, .L37+68
	str	ip, [r4, #24]
	str	r1, [r4, #16]
	str	r2, [r4, #12]
	bne	.L16
	ldr	r2, .L37+100
	ldr	r1, .L37+104
	b	.L17
.L7:
	ldr	r3, [r4]
	ldr	r2, [r6]
	orr	r3, r3, r2
	str	r3, [r4]
	b	.L6
.L4:
	ldr	r2, .L37+108
	b	.L32
.L3:
	ldr	r2, .L37+112
	b	.L32
.L21:
	ldr	r2, .L37+84
	ldr	r1, .L37+116
	b	.L17
.L36:
	ldr	r1, .L37+68
	ldr	ip, .L37+72
	cmp	r3, #131
	movne	r3, r1
	moveq	r3, ip
	ldr	r2, .L37+100
	ldr	r1, .L37+104
	b	.L17
.L12:
	ldr	r1, .L37+120
	ldr	r2, .L37+124
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r3, [r4, #8]
	str	r1, [r4, #24]
	str	r2, [r4, #20]
	b	.L13
.L35:
	bl	__stack_chk_fail
.L38:
	.align	2
.L37:
	.word	URTW_RTL8187B
	.word	.LC12
	.word	.LC8
	.word	URTW_RTL8187B_REV_B
	.word	URTW_EPROM_RFCHIPID
	.word	URTW_DEBUG_STATE
	.word	.LC10
	.word	USB_ERR_INVAL
	.word	URTW_TX_CONF
	.word	URTW_TX_HWMASK
	.word	.LC9
	.word	urtw_8225_rf_stop
	.word	urtw_8225_rf_init
	.word	urtw_8225_rf_set_sens
	.word	urtw_8225_rf_set_chan
	.word	URTW_8225_RF_MAX_SENS
	.word	URTW_8225_RF_DEF_SENS
	.word	.LC0
	.word	.LC1
	.word	.LC6
	.word	.LC7
	.word	.LC4
	.word	.LC11
	.word	urtw_8225v2b_rf_init
	.word	urtw_8225v2b_rf_set_chan
	.word	.LC2
	.word	.LC3
	.word	URTW_RTL8187B_REV_E
	.word	URTW_RTL8187B_REV_D
	.word	.LC5
	.word	urtw_8225v2_rf_init
	.word	urtw_8225v2_rf_set_chan
	.size	urtw_get_rfchip, .-urtw_get_rfchip
	.comm	urtw_8225v2b_rf_set_chan,4,4
	.comm	urtw_8225v2b_rf_init,4,4
	.comm	urtw_8225v2_rf_set_chan,4,4
	.comm	urtw_8225v2_rf_init,4,4
	.comm	urtw_8225_rf_stop,4,4
	.comm	urtw_8225_rf_set_sens,4,4
	.comm	urtw_8225_rf_set_chan,4,4
	.comm	urtw_8225_rf_init,4,4
	.comm	USB_ERR_INVAL,4,4
	.comm	URTW_TX_HWMASK,4,4
	.comm	URTW_TX_CONF,4,4
	.comm	URTW_RTL8187B_REV_E,4,4
	.comm	URTW_RTL8187B_REV_D,4,4
	.comm	URTW_RTL8187B_REV_B,4,4
	.comm	URTW_RTL8187B,4,4
	.comm	URTW_EPROM_RFCHIPID,4,4
	.comm	URTW_DEBUG_STATE,4,4
	.comm	URTW_8225_RF_MAX_SENS,4,4
	.comm	URTW_8225_RF_DEF_SENS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
