	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltq_etop_init
_ltq_etop_init:                         ## @ltq_etop_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_ltq_etop_hw_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	%r14, %rdi
	movl	$1500, %esi                     ## imm = 0x5DC
	callq	_ltq_etop_change_mtu
	movq	(%r15), %rsi
	leaq	-32(%rbp), %rdi
	movl	$4, %edx
	callq	_memcpy
	movl	-32(%rbp), %edi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	je	LBB0_2
## %bb.6:
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ltq_etop_set_mac_address
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	movl	-32(%rbp), %edi
	callq	_eth_random_addr
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ltq_etop_set_mac_address
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_NET_ADDR_RANDOM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
LBB0_4:
	movq	%r14, %rdi
	callq	_ltq_etop_set_multicast_list
	movq	%r14, %rdi
	callq	_ltq_etop_mdio_init
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	movq	%r14, %rdi
	callq	_unregister_netdev
	movq	%r14, %rdi
	callq	_free_netdev
LBB0_8:
	movq	%r14, %rdi
	callq	_ltq_etop_hw_exit
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"etop: invalid MAC, using random\n"

	.comm	_NET_ADDR_RANDOM,4,2            ## @NET_ADDR_RANDOM
	.no_dead_strip	_ltq_etop_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltq_etop_init
_ltq_etop_init:                         ; @ltq_etop_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_netdev_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_ltq_etop_hw_init
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	w1, #1500
	bl	_ltq_etop_change_mtu
	ldr	x1, [x21]
	add	x0, sp, #8
	mov	w2, #4
	bl	_memcpy
	ldr	w0, [sp, #8]
	bl	_is_valid_ether_addr
	cbz	w0, LBB0_3
; %bb.2:
	add	x1, sp, #8
	mov	x0, x19
	bl	_ltq_etop_set_mac_address
	mov	x20, x0
	cbnz	w0, LBB0_6
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	ldr	w0, [sp, #8]
	bl	_eth_random_addr
	add	x1, sp, #8
	mov	x0, x19
	bl	_ltq_etop_set_mac_address
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.4:
Lloh5:
	adrp	x8, _NET_ADDR_RANDOM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NET_ADDR_RANDOM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_5:
	mov	x0, x19
	bl	_ltq_etop_set_multicast_list
	mov	x0, x19
	bl	_ltq_etop_mdio_init
	mov	x20, x0
	cbz	w0, LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_unregister_netdev
	mov	x0, x19
	bl	_free_netdev
LBB0_7:
	mov	x0, x19
	bl	_ltq_etop_hw_exit
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"etop: invalid MAC, using random\n"

	.comm	_NET_ADDR_RANDOM,4,2            ; @NET_ADDR_RANDOM
	.no_dead_strip	_ltq_etop_init
.subsections_via_symbols
