	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_mac_addr
_set_mac_addr:                          ## @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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r14
	movq	24(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	(%r13), %edx
	movl	4(%r13), %edi
	xorl	%esi, %esi
	movq	%r15, %rcx
	callq	_dpni_get_port_mac_addr
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edx
	movl	4(%r13), %edi
	xorl	%esi, %esi
	movq	%r12, %rcx
	callq	_dpni_get_primary_mac_addr
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_is_zero_ether_addr
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:
	movq	%r12, %rdi
	callq	_is_zero_ether_addr
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_eth_hw_addr_random
	leaq	L_.str.3(%rip), %rsi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_dev_dbg_once
	movl	(%r13), %edx
	movl	4(%r13), %edi
	movq	8(%r12), %rcx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_dpni_set_primary_mac_addr
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	%r14d, %ebx
	jmp	LBB0_16
LBB0_6:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ether_addr_equal
	testl	%eax, %eax
	je	LBB0_7
LBB0_9:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movl	(%rax), %edx
	movq	%r15, %rsi
	jmp	LBB0_15
LBB0_14:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movl	(%rax), %edx
	movq	%r12, %rsi
LBB0_15:
	callq	_memcpy
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_13:
	movq	_NET_ADDR_PERM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	jmp	LBB0_16
LBB0_7:
	movl	(%r13), %edx
	movl	4(%r13), %edi
	xorl	%esi, %esi
	movq	%r15, %rcx
	callq	_dpni_set_primary_mac_addr
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dpni_get_port_mac_addr() failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"dpni_get_primary_mac_addr() failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"dpni_set_primary_mac_addr() failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"device(s) have all-zero hwaddr, replaced with random\n"

	.comm	_NET_ADDR_PERM,4,2              ## @NET_ADDR_PERM
	.no_dead_strip	_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 set_mac_addr
_set_mac_addr:                          ; @set_mac_addr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x20, [x0, #8]
	ldr	x19, [x20, #24]
Lloh3:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x22, x9, x12
	mov	sp, x22
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x24, x8, x12
	mov	sp, x24
	ldr	w0, [x0, #4]
	ldr	w2, [x21]
	mov	w1, #0
	mov	x3, x22
	bl	_dpni_get_port_mac_addr
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldp	w2, w0, [x21]
	mov	w1, #0
	mov	x3, x24
	bl	_dpni_get_primary_mac_addr
	cbz	w0, LBB0_7
; %bb.3:
	mov	x23, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
LBB0_5:
	ldur	x8, [x29, #-56]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.6:
	mov	x0, x23
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x22
	bl	_is_zero_ether_addr
	cbz	x0, LBB0_11
; %bb.8:
	mov	x0, x24
	bl	_is_zero_ether_addr
	cbz	x0, LBB0_13
; %bb.9:
	mov	x0, x20
	bl	_eth_hw_addr_random
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg_once
	ldp	w2, w0, [x21]
	ldr	x3, [x20, #8]
	mov	w1, #0
	bl	_dpni_set_primary_mac_addr
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.10:
Lloh19:
	adrp	x8, _NET_ADDR_PERM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _NET_ADDR_PERM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	b	LBB0_5
LBB0_11:
	mov	x0, x22
	mov	x1, x24
	bl	_ether_addr_equal
	cbz	w0, LBB0_15
LBB0_12:
	ldr	x0, [x20, #8]
	ldr	w2, [x20]
	mov	x1, x22
	b	LBB0_14
LBB0_13:
	ldr	x0, [x20, #8]
	ldr	w2, [x20]
	mov	x1, x24
LBB0_14:
	bl	_memcpy
	mov	w23, #0
	b	LBB0_5
LBB0_15:
	ldp	w2, w0, [x21]
	mov	w1, #0
	mov	x3, x22
	bl	_dpni_set_primary_mac_addr
	cbz	w0, LBB0_12
; %bb.16:
	mov	x23, x0
LBB0_17:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dpni_get_port_mac_addr() failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"dpni_get_primary_mac_addr() failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"dpni_set_primary_mac_addr() failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"device(s) have all-zero hwaddr, replaced with random\n"

	.comm	_NET_ADDR_PERM,4,2              ; @NET_ADDR_PERM
	.no_dead_strip	_set_mac_addr
.subsections_via_symbols
