	.file	"extr_smc91c92_cs.c_smc_set_xcvr.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	smc_set_xcvr, @function
smc_set_xcvr:
.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
	mov	r12d, esi
	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, 8
	.cfi_def_cfa_offset 64
	call	netdev_priv@PLT
	mov	r13d, DWORD PTR 0[rbp]
	mov	rdi, QWORD PTR BANK_SELECT[rip]
	mov	rbx, rax
	add	rdi, r13
	call	inw@PLT
	mov	edi, 1
	mov	r14d, eax
	call	SMC_SELECT_BANK@PLT
	mov	rsi, QWORD PTR CONFIG[rip]
	mov	edi, DWORD PTR [rbx]
	add	rsi, r13
	cmp	r12d, 2
	je	.L12
	call	outw@PLT
	mov	rax, QWORD PTR MANFID_OSITECH[rip]
	cmp	QWORD PTR 8[rbx], rax
	je	.L13
.L6:
	cmp	QWORD PTR 8[rbp], 1
	sbb	eax, eax
	and	eax, -16367
	add	eax, 16385
	mov	DWORD PTR 24[rbx], eax
.L5:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edi, r14d
	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
	jmp	SMC_SELECT_BANK@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rax, QWORD PTR PRODID_OSITECH_SEVEN[rip]
	cmp	QWORD PTR 16[rbx], rax
	je	.L6
	mov	edi, DWORD PTR OSI_AUI_PWR[rip]
	lea	esi, -16[r13]
	add	rsi, QWORD PTR OSITECH_AUI_PWR[rip]
	not	edi
	call	mask_bits@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	or	edi, DWORD PTR CFG_AUI_SELECT[rip]
	call	outw@PLT
	mov	rax, QWORD PTR MANFID_OSITECH[rip]
	cmp	QWORD PTR 8[rbx], rax
	je	.L14
.L3:
	cmp	QWORD PTR 8[rbp], 0
	mov	eax, 1
	cmove	r12d, eax
	mov	DWORD PTR 24[rbx], r12d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR PRODID_OSITECH_SEVEN[rip]
	cmp	QWORD PTR 16[rbx], rax
	je	.L3
	mov	edi, DWORD PTR OSI_AUI_PWR[rip]
	lea	esi, -16[r13]
	add	rsi, QWORD PTR OSITECH_AUI_PWR[rip]
	call	set_bits@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	smc_set_xcvr, .-smc_set_xcvr
	.comm	PRODID_OSITECH_SEVEN,8,8
	.comm	OSI_AUI_PWR,4,4
	.comm	OSITECH_AUI_PWR,8,8
	.comm	MANFID_OSITECH,8,8
	.comm	CONFIG,8,8
	.comm	CFG_AUI_SELECT,4,4
	.comm	BANK_SELECT,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_smc91c92_cs.c_smc_set_xcvr.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	smc_set_xcvr, %function
smc_set_xcvr:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	mov	r5, r1
	bl	netdev_priv
	ldr	r3, .L15
	ldr	r7, [r6]
	ldr	r3, [r3]
	mov	r4, r0
	add	r0, r7, r3
	bl	inw
	mov	r8, r0
	mov	r0, #1
	bl	SMC_SELECT_BANK
	cmp	r5, #2
	beq	.L12
	ldr	r3, .L15+4
	ldr	r0, [r4]
	ldr	r1, [r3]
	add	r1, r7, r1
	bl	outw
	ldr	r3, .L15+8
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L13
.L6:
	ldr	r2, [r6, #4]
	ldr	r3, .L15+12
	cmp	r2, #0
	moveq	r3, #18
	mov	r0, r8
	str	r3, [r4, #12]
	pop	{r4, r5, r6, r7, r8, lr}
	b	SMC_SELECT_BANK
.L13:
	ldr	r3, .L15+16
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L6
	ldr	r2, .L15+20
	ldr	r3, .L15+24
	ldr	r1, [r2]
	ldr	r0, [r3]
	sub	r1, r1, #16
	add	r1, r1, r7
	mvn	r0, r0
	bl	mask_bits
	b	.L6
.L12:
	ldr	r2, .L15+4
	ldr	r3, .L15+28
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r0, [r4]
	add	r1, r7, r1
	orr	r0, r0, r3
	bl	outw
	ldr	r3, .L15+8
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L14
.L3:
	ldr	r3, [r6, #4]
	mov	r0, r8
	cmp	r3, #0
	moveq	r5, #1
	str	r5, [r4, #12]
	pop	{r4, r5, r6, r7, r8, lr}
	b	SMC_SELECT_BANK
.L14:
	ldr	r3, .L15+16
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L3
	ldr	r2, .L15+20
	ldr	r3, .L15+24
	ldr	r1, [r2]
	ldr	r0, [r3]
	sub	r1, r1, #16
	add	r1, r1, r7
	bl	set_bits
	b	.L3
.L16:
	.align	2
.L15:
	.word	BANK_SELECT
	.word	CONFIG
	.word	MANFID_OSITECH
	.word	16385
	.word	PRODID_OSITECH_SEVEN
	.word	OSITECH_AUI_PWR
	.word	OSI_AUI_PWR
	.word	CFG_AUI_SELECT
	.size	smc_set_xcvr, .-smc_set_xcvr
	.comm	PRODID_OSITECH_SEVEN,4,4
	.comm	OSI_AUI_PWR,4,4
	.comm	OSITECH_AUI_PWR,4,4
	.comm	MANFID_OSITECH,4,4
	.comm	CONFIG,4,4
	.comm	CFG_AUI_SELECT,4,4
	.comm	BANK_SELECT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
