	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pasemi_mac_set_mac_addr
_pasemi_mac_set_mac_addr:               ## @pasemi_mac_set_mac_addr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	(%r15), %rdi
	movl	(%rbx), %esi
	movl	8(%r15), %edx
	callq	_memcpy
	movq	(%r15), %rax
	movl	8(%rax), %ecx
	movl	12(%rax), %edx
	shll	$24, %ecx
	shll	$16, %edx
	orl	%ecx, %edx
	movl	16(%rax), %ebx
	shll	$8, %ebx
	orl	%edx, %ebx
	orl	20(%rax), %ebx
	movq	_PAS_MAC_CFG_ADR1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_read_mac_reg
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	movq	(%r15), %rcx
	movl	(%rcx), %r15d
	shll	$8, %r15d
	orl	4(%rcx), %eax
	orl	%eax, %r15d
	movq	%r14, %rdi
	callq	_pasemi_mac_intf_disable
	movq	_PAS_MAC_CFG_ADR0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_write_mac_reg
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_write_mac_reg
	movq	%r14, %rdi
	callq	_pasemi_mac_intf_enable
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAS_MAC_CFG_ADR1,4,2           ## @PAS_MAC_CFG_ADR1
	.comm	_PAS_MAC_CFG_ADR0,4,2           ## @PAS_MAC_CFG_ADR0
	.no_dead_strip	_pasemi_mac_set_mac_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pasemi_mac_set_mac_addr
_pasemi_mac_set_mac_addr:               ; @pasemi_mac_set_mac_addr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	w0, [x21]
	bl	_is_valid_ether_addr
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x0, [x20]
	ldr	w1, [x21]
	ldr	w2, [x20, #8]
	bl	_memcpy
	ldr	x8, [x20]
	ldp	w9, w10, [x8, #8]
	lsl	w10, w10, #16
	orr	w9, w10, w9, lsl #24
	ldp	w10, w8, [x8, #16]
	orr	w9, w9, w10, lsl #8
	orr	w21, w9, w8
Lloh0:
	adrp	x22, _PAS_MAC_CFG_ADR1@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PAS_MAC_CFG_ADR1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_read_mac_reg
	and	w8, w0, #0xffff0000
	ldr	x9, [x20]
	ldp	w10, w9, [x9]
	orr	w8, w9, w8
	orr	w20, w8, w10, lsl #8
	mov	x0, x19
	bl	_pasemi_mac_intf_disable
Lloh2:
	adrp	x8, _PAS_MAC_CFG_ADR0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAS_MAC_CFG_ADR0@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_write_mac_reg
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_write_mac_reg
	mov	x0, x19
	bl	_pasemi_mac_intf_enable
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAS_MAC_CFG_ADR1,4,2           ; @PAS_MAC_CFG_ADR1
	.comm	_PAS_MAC_CFG_ADR0,4,2           ; @PAS_MAC_CFG_ADR0
	.no_dead_strip	_pasemi_mac_set_mac_addr
.subsections_via_symbols
