	.file	"extr_sky2.c_sky2_init_netdev.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Invalid MAC address, defaulting to random\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Failed to set MAC address.\n"
	.text
	.p2align 4
	.type	sky2_init_netdev, @function
sky2_init_netdev:
.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
	mov	r14, rdi
	mov	edi, 72
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	DWORD PTR 12[rsp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	alloc_etherdev@PLT
	mov	r12, rax
	test	rax, rax
	je	.L1
	mov	rsi, QWORD PTR 24[r14]
	mov	rdi, rax
	mov	r15d, ebp
	call	SET_NETDEV_DEV@PLT
	mov	rax, QWORD PTR 24[r14]
	mov	rdi, r12
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR 48[r12], eax
	lea	rax, sky2_ethtool_ops[rip]
	mov	QWORD PTR 40[r12], rax
	mov	eax, DWORD PTR TX_WATCHDOG[rip]
	mov	DWORD PTR 32[r12], eax
	mov	rax, QWORD PTR sky2_netdev_ops[rip]
	lea	rax, [rax+r15*4]
	mov	QWORD PTR 24[r12], rax
	call	netdev_priv@PLT
	mov	esi, DWORD PTR default_msg[rip]
	mov	edi, DWORD PTR debug[rip]
	mov	QWORD PTR 64[rax], r12
	mov	rbx, rax
	mov	QWORD PTR 56[rax], r14
	call	netif_msg_init@PLT
	lea	rdi, 48[rbx]
	mov	DWORD PTR 52[rbx], eax
	call	u64_stats_init@PLT
	lea	rdi, 44[rbx]
	call	u64_stats_init@PLT
	mov	eax, DWORD PTR SKY2_FLAG_AUTO_SPEED[rip]
	or	eax, DWORD PTR SKY2_FLAG_AUTO_PAUSE[rip]
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR CHIP_ID_YUKON_XL[rip]
	cmp	QWORD PTR [r14], rax
	je	.L3
	mov	eax, DWORD PTR NETIF_F_RXCSUM[rip]
	or	DWORD PTR [r12], eax
.L3:
	mov	eax, DWORD PTR FC_BOTH[rip]
	mov	QWORD PTR 4[rbx], -1
	mov	rdi, r14
	mov	DWORD PTR 40[rbx], eax
	call	sky2_supported_modes@PLT
	lea	rdi, 32[rbx]
	mov	DWORD PTR 36[rbx], eax
	mov	eax, DWORD PTR 12[rsp]
	mov	DWORD PTR 12[rbx], eax
	call	spin_lock_init@PLT
	mov	edi, DWORD PTR TX_DEF_PENDING[rip]
	mov	DWORD PTR 28[rbx], edi
	call	roundup_ring_size@PLT
	mov	edx, DWORD PTR 4[r12]
	mov	DWORD PTR 24[rbx], eax
	mov	eax, DWORD PTR RX_DEF_PENDING[rip]
	mov	DWORD PTR 20[rbx], eax
	mov	rax, QWORD PTR 32[r14]
	mov	QWORD PTR [rax+r15*8], r12
	mov	eax, DWORD PTR NETIF_F_IP_CSUM[rip]
	or	eax, DWORD PTR NETIF_F_SG[rip]
	or	eax, DWORD PTR NETIF_F_TSO[rip]
	mov	DWORD PTR 16[rbx], ebp
	or	eax, DWORD PTR [r12]
	mov	DWORD PTR [r12], eax
	test	r13d, r13d
	je	.L5
	or	edx, DWORD PTR NETIF_F_HIGHDMA[rip]
	mov	DWORD PTR 4[r12], edx
.L5:
	mov	ecx, DWORD PTR 8[r14]
	test	DWORD PTR SKY2_HW_RSS_BROKEN[rip], ecx
	jne	.L6
	or	eax, DWORD PTR NETIF_F_RXHASH[rip]
	mov	DWORD PTR [r12], eax
.L6:
	test	DWORD PTR SKY2_HW_VLAN_BROKEN[rip], ecx
	je	.L23
.L7:
	or	eax, edx
	mov	DWORD PTR 4[r12], eax
	mov	eax, DWORD PTR ETH_ZLEN[rip]
	mov	DWORD PTR 16[r12], eax
	mov	rax, QWORD PTR [r14]
	cmp	rax, QWORD PTR CHIP_ID_YUKON_FE[rip]
	je	.L8
	cmp	rax, QWORD PTR CHIP_ID_YUKON_FE_P[rip]
	mov	edx, DWORD PTR ETH_JUMBO_MTU[rip]
	je	.L8
.L10:
	mov	rax, QWORD PTR 24[r14]
	mov	DWORD PTR 12[r12], edx
	mov	edi, DWORD PTR [rax]
	call	of_get_mac_address@PLT
	mov	rdi, rax
	mov	r13, rax
	call	IS_ERR@PLT
	test	eax, eax
	je	.L24
	mov	rsi, QWORD PTR B2_MAC_1[rip]
	mov	rax, QWORD PTR 16[r14]
	mov	edi, DWORD PTR 8[r12]
	mov	edx, DWORD PTR ETH_ALEN[rip]
	add	rax, rsi
	lea	esi, 0[0+rbp*8]
	add	rsi, rax
	call	memcpy_fromio@PLT
.L12:
	mov	edi, DWORD PTR 8[r12]
	call	is_valid_ether_addr@PLT
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR AF_UNSPEC[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	mov	DWORD PTR 20[rsp], 0
	mov	DWORD PTR 16[rsp], eax
	call	netdev_warn@PLT
	mov	rdi, r12
	call	eth_hw_addr_random@PLT
	mov	esi, DWORD PTR 8[r12]
	mov	edi, DWORD PTR 16[rsp]
	mov	edx, DWORD PTR ETH_ALEN[rip]
	call	memcpy@PLT
	lea	rsi, 16[rsp]
	mov	rdi, r12
	call	sky2_set_mac_address@PLT
	test	rax, rax
	jne	.L25
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[r12]
	mov	rsi, r13
	call	ether_addr_copy@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L23:
	mov	ecx, DWORD PTR NETIF_F_HW_VLAN_CTAG_TX[rip]
	or	ecx, DWORD PTR NETIF_F_HW_VLAN_CTAG_RX[rip]
	or	eax, ecx
	mov	ecx, DWORD PTR SKY2_VLAN_OFFLOADS[rip]
	or	DWORD PTR 20[r12], ecx
	mov	DWORD PTR [r12], eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, DWORD PTR ETH_DATA_LEN[rip]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	netdev_warn@PLT
	jmp	.L1
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sky2_init_netdev, .-sky2_init_netdev
	.comm	sky2_netdev_ops,8,8
	.comm	sky2_ethtool_ops,4,4
	.comm	default_msg,4,4
	.comm	debug,4,4
	.comm	TX_WATCHDOG,4,4
	.comm	TX_DEF_PENDING,4,4
	.comm	SKY2_VLAN_OFFLOADS,4,4
	.comm	SKY2_HW_VLAN_BROKEN,4,4
	.comm	SKY2_HW_RSS_BROKEN,4,4
	.comm	SKY2_FLAG_AUTO_SPEED,4,4
	.comm	SKY2_FLAG_AUTO_PAUSE,4,4
	.comm	RX_DEF_PENDING,4,4
	.comm	NETIF_F_TSO,4,4
	.comm	NETIF_F_SG,4,4
	.comm	NETIF_F_RXHASH,4,4
	.comm	NETIF_F_RXCSUM,4,4
	.comm	NETIF_F_IP_CSUM,4,4
	.comm	NETIF_F_HW_VLAN_CTAG_TX,4,4
	.comm	NETIF_F_HW_VLAN_CTAG_RX,4,4
	.comm	NETIF_F_HIGHDMA,4,4
	.comm	FC_BOTH,4,4
	.comm	ETH_ZLEN,4,4
	.comm	ETH_JUMBO_MTU,4,4
	.comm	ETH_DATA_LEN,4,4
	.comm	ETH_ALEN,4,4
	.comm	CHIP_ID_YUKON_XL,8,8
	.comm	CHIP_ID_YUKON_FE_P,8,8
	.comm	CHIP_ID_YUKON_FE,8,8
	.comm	B2_MAC_1,8,8
	.comm	AF_UNSPEC,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_sky2.c_sky2_init_netdev.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid MAC address, defaulting to random\012\000"
	.align	2
.LC1:
	.ascii	"Failed to set MAC address.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sky2_init_netdev, %function
sky2_init_netdev:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r9, r3
	ldr	r3, .L26
	sub	sp, sp, #20
	mov	r6, r0
	mov	r0, #64
	mov	r7, r1
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	alloc_etherdev
	subs	r4, r0, #0
	beq	.L1
	ldr	r1, [r6, #12]
	bl	SET_NETDEV_DEV
	ldr	r3, .L26+4
	ldr	r1, [r6, #12]
	ldr	r2, .L26+8
	ldr	r3, [r3]
	ldr	r0, [r1, #4]
	ldr	r1, [r2]
	ldr	r2, .L26+12
	add	r3, r3, r7, lsl #2
	str	r3, [r4, #24]
	str	r0, [r4, #36]
	str	r1, [r4, #28]
	str	r2, [r4, #32]
	mov	r0, r4
	bl	netdev_priv
	ldr	r2, .L26+16
	ldr	r3, .L26+20
	mov	r5, r0
	ldr	r1, [r2]
	str	r4, [r0, #60]
	str	r6, [r0, #56]
	ldr	r0, [r3]
	bl	netif_msg_init
	mov	r3, r0
	add	r0, r5, #48
	str	r3, [r5, #52]
	bl	u64_stats_init
	add	r0, r5, #44
	bl	u64_stats_init
	ldr	r3, .L26+24
	ldr	r1, .L26+28
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, .L26+32
	orr	r3, r3, r1
	ldr	r2, [r2]
	ldr	r1, [r6]
	str	r3, [r5]
	cmp	r1, r2
	ldrne	r2, .L26+36
	ldrne	r3, [r4]
	ldrne	r2, [r2]
	mov	r0, r6
	orrne	r3, r3, r2
	strne	r3, [r4]
	mvn	r3, #0
	ldr	r2, .L26+40
	str	r3, [r5, #4]
	ldr	r2, [r2]
	str	r3, [r5, #8]
	str	r2, [r5, #40]
	bl	sky2_supported_modes
	str	r9, [r5, #12]
	str	r0, [r5, #36]
	add	r0, r5, #32
	bl	spin_lock_init
	ldr	r3, .L26+44
	ldr	r0, [r3]
	str	r0, [r5, #28]
	bl	roundup_ring_size
	ldr	r2, .L26+48
	ldr	r3, .L26+52
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L26+56
	orr	r3, r3, r1
	ldr	r1, [r2]
	ldr	r2, .L26+60
	orr	r3, r3, r1
	ldr	r1, [r2]
	ldr	r2, [r6, #16]
	cmp	r8, #0
	ldr	ip, [r4]
	str	r1, [r5, #20]
	str	r0, [r5, #24]
	str	r4, [r2, r7, lsl #2]
	ldrne	r2, .L26+64
	ldrne	r1, [r4, #4]
	ldrne	r2, [r2]
	ldr	r0, .L26+68
	orrne	r2, r1, r2
	ldr	r0, [r0]
	ldr	r1, [r6, #4]
	str	r7, [r5, #16]
	ldreq	r2, [r4, #4]
	strne	r2, [r4, #4]
	tst	r1, r0
	ldreq	r0, .L26+72
	orr	r3, r3, ip
	ldreq	r0, [r0]
	str	r3, [r4]
	orreq	r3, r3, r0
	ldr	r0, .L26+76
	streq	r3, [r4]
	ldr	r0, [r0]
	tst	r1, r0
	beq	.L23
.L7:
	ldr	r0, .L26+80
	ldr	r1, .L26+84
	orr	r3, r2, r3
	ldr	r0, [r0]
	ldr	r2, [r6]
	ldr	r1, [r1]
	cmp	r2, r0
	str	r3, [r4, #4]
	str	r1, [r4, #16]
	beq	.L8
	ldr	r3, .L26+88
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L8
	ldr	r3, .L26+92
	ldr	r2, [r3]
.L10:
	ldr	r3, [r6, #12]
	str	r2, [r4, #12]
	ldr	r0, [r3]
	bl	of_get_mac_address
	mov	r5, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L11
	mov	r1, r5
	ldr	r0, [r4, #8]
	bl	ether_addr_copy
.L12:
	ldr	r0, [r4, #8]
	bl	is_valid_ether_addr
	subs	r3, r0, #0
	bne	.L1
	ldr	r2, .L26+96
	ldr	r1, .L26+100
	ldr	r2, [r2]
	mov	r0, r4
	stmib	sp, {r2, r3}
	bl	netdev_warn
	mov	r0, r4
	bl	eth_hw_addr_random
	ldr	r3, .L26+104
	ldr	r1, [r4, #8]
	ldr	r2, [r3]
	ldr	r0, [sp, #4]
	bl	memcpy
	mov	r0, r4
	add	r1, sp, #4
	bl	sky2_set_mac_address
	cmp	r0, #0
	bne	.L24
.L1:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L23:
	ldr	r0, .L26+108
	ldr	r1, .L26+112
	ldr	r0, [r0]
	ldr	r1, [r1]
	ldr	ip, .L26+116
	orr	r0, r0, r1
	ldr	ip, [ip]
	ldr	r1, [r4, #20]
	orr	r3, r3, r0
	orr	r1, r1, ip
	str	r3, [r4]
	str	r1, [r4, #20]
	b	.L7
.L8:
	ldr	r3, .L26+120
	ldr	r2, [r3]
	b	.L10
.L11:
	ldr	r3, .L26+124
	ldr	r1, [r6, #8]
	ldr	r2, [r3]
	ldr	r3, .L26+104
	add	r1, r1, r2
	ldr	r0, [r4, #8]
	ldr	r2, [r3]
	add	r1, r1, r7, lsl #3
	bl	memcpy_fromio
	b	.L12
.L24:
	mov	r0, r4
	ldr	r1, .L26+128
	bl	netdev_warn
	b	.L1
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC2
	.word	sky2_netdev_ops
	.word	TX_WATCHDOG
	.word	sky2_ethtool_ops
	.word	default_msg
	.word	debug
	.word	SKY2_FLAG_AUTO_SPEED
	.word	SKY2_FLAG_AUTO_PAUSE
	.word	CHIP_ID_YUKON_XL
	.word	NETIF_F_RXCSUM
	.word	FC_BOTH
	.word	TX_DEF_PENDING
	.word	NETIF_F_SG
	.word	NETIF_F_IP_CSUM
	.word	NETIF_F_TSO
	.word	RX_DEF_PENDING
	.word	NETIF_F_HIGHDMA
	.word	SKY2_HW_RSS_BROKEN
	.word	NETIF_F_RXHASH
	.word	SKY2_HW_VLAN_BROKEN
	.word	CHIP_ID_YUKON_FE
	.word	ETH_ZLEN
	.word	CHIP_ID_YUKON_FE_P
	.word	ETH_JUMBO_MTU
	.word	AF_UNSPEC
	.word	.LC0
	.word	ETH_ALEN
	.word	NETIF_F_HW_VLAN_CTAG_TX
	.word	NETIF_F_HW_VLAN_CTAG_RX
	.word	SKY2_VLAN_OFFLOADS
	.word	ETH_DATA_LEN
	.word	B2_MAC_1
	.word	.LC1
	.size	sky2_init_netdev, .-sky2_init_netdev
	.comm	sky2_netdev_ops,4,4
	.comm	sky2_ethtool_ops,4,4
	.comm	default_msg,4,4
	.comm	debug,4,4
	.comm	TX_WATCHDOG,4,4
	.comm	TX_DEF_PENDING,4,4
	.comm	SKY2_VLAN_OFFLOADS,4,4
	.comm	SKY2_HW_VLAN_BROKEN,4,4
	.comm	SKY2_HW_RSS_BROKEN,4,4
	.comm	SKY2_FLAG_AUTO_SPEED,4,4
	.comm	SKY2_FLAG_AUTO_PAUSE,4,4
	.comm	RX_DEF_PENDING,4,4
	.comm	NETIF_F_TSO,4,4
	.comm	NETIF_F_SG,4,4
	.comm	NETIF_F_RXHASH,4,4
	.comm	NETIF_F_RXCSUM,4,4
	.comm	NETIF_F_IP_CSUM,4,4
	.comm	NETIF_F_HW_VLAN_CTAG_TX,4,4
	.comm	NETIF_F_HW_VLAN_CTAG_RX,4,4
	.comm	NETIF_F_HIGHDMA,4,4
	.comm	FC_BOTH,4,4
	.comm	ETH_ZLEN,4,4
	.comm	ETH_JUMBO_MTU,4,4
	.comm	ETH_DATA_LEN,4,4
	.comm	ETH_ALEN,4,4
	.comm	CHIP_ID_YUKON_XL,4,4
	.comm	CHIP_ID_YUKON_FE_P,4,4
	.comm	CHIP_ID_YUKON_FE,4,4
	.comm	B2_MAC_1,4,4
	.comm	AF_UNSPEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
