	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ehea_set_mac_addr
_ehea_set_mac_addr:                     ## @ehea_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	%rsi, %r13
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	(%r13), %rdi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_zeroed_page
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	(%r13), %rsi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_memcpy
	movswl	2(%r15), %eax
	movl	%eax, (%r15)
	movq	16(%rbx), %rax
	movq	%rbx, %rcx
	movl	(%rax), %ebx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	12(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_H_PORT_CB0@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_H_PORT_CB0_MAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_EHEA_BMASK_SET
	movl	%ebx, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	movl	%eax, %ecx
	movq	%r15, %r8
	callq	_ehea_h_modify_ehea_port
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	(%r12), %rdi
	movq	(%r13), %rsi
	movl	8(%r12), %edx
	callq	_memcpy
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rax
	movq	_EHEA_PORT_UP@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_10
## %bb.8:
	movq	_H_DEREG_BCMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ehea_broadcast_reg_helper
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movq	(%r12), %rax
	movq	(%r14), %rcx
LBB0_10:
	movl	(%r15), %edx
	shll	$16, %edx
	movl	%edx, 8(%r12)
	cmpq	%rcx, %rax
	jne	LBB0_12
## %bb.11:
	movq	_H_REG_BCMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ehea_broadcast_reg_helper
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	xorl	%eax, %eax
	callq	_ehea_update_bcmc_registrations
	jmp	LBB0_14
LBB0_1:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	%r15, %rdi
	callq	_free_page
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no mem for cb0\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_H_PORT_CB0,4,2                 ## @H_PORT_CB0
	.comm	_H_PORT_CB0_MAC,4,2             ## @H_PORT_CB0_MAC
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EHEA_PORT_UP,8,3               ## @EHEA_PORT_UP
	.comm	_H_DEREG_BCMC,4,2               ## @H_DEREG_BCMC
	.comm	_H_REG_BCMC,4,2                 ## @H_REG_BCMC
	.no_dead_strip	_ehea_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 ehea_set_mac_addr
_ehea_set_mac_addr:                     ; @ehea_set_mac_addr
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x0, [x22]
	bl	_is_valid_ether_addr
	cbz	w0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_get_zeroed_page
	cbz	x0, LBB0_11
; %bb.2:
	mov	x19, x0
	ldr	x1, [x22]
Lloh3:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_memcpy
	ldrsh	w8, [x19, #2]
	str	w8, [x19]
	ldr	x8, [x20, #16]
	ldr	w23, [x8]
	ldr	w24, [x20, #12]
Lloh6:
	adrp	x8, _H_PORT_CB0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _H_PORT_CB0@GOTPAGEOFF]
Lloh8:
	ldr	w25, [x8]
Lloh9:
	adrp	x8, _H_PORT_CB0_MAC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _H_PORT_CB0_MAC@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_EHEA_BMASK_SET
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	mov	x4, x19
	bl	_ehea_h_modify_ehea_port
Lloh12:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.3:
	ldr	x0, [x21]
	ldr	x1, [x22]
	ldr	w2, [x21, #8]
	bl	_memcpy
	ldr	x8, [x20]
Lloh15:
	adrp	x22, _EHEA_PORT_UP@GOTPAGE
Lloh16:
	ldr	x22, [x22, _EHEA_PORT_UP@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
Lloh17:
	adrp	x8, _H_DEREG_BCMC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _H_DEREG_BCMC@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ehea_broadcast_reg_helper
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	x8, [x20]
	ldr	x9, [x22]
LBB0_6:
	ldr	w10, [x19]
	lsl	w10, w10, #16
	str	w10, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
Lloh20:
	adrp	x8, _H_REG_BCMC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _H_REG_BCMC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ehea_broadcast_reg_helper
	mov	x21, x0
	cbnz	w0, LBB0_9
LBB0_8:
	mov	w21, #0
LBB0_9:
	bl	_ehea_update_bcmc_registrations
	b	LBB0_14
LBB0_10:
Lloh23:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_13:
Lloh29:
	adrp	x8, _EIO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_14:
	mov	x0, x19
	bl	_free_page
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no mem for cb0\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_H_PORT_CB0,4,2                 ; @H_PORT_CB0
	.comm	_H_PORT_CB0_MAC,4,2             ; @H_PORT_CB0_MAC
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EHEA_PORT_UP,8,3               ; @EHEA_PORT_UP
	.comm	_H_DEREG_BCMC,4,2               ; @H_DEREG_BCMC
	.comm	_H_REG_BCMC,4,2                 ; @H_REG_BCMC
	.no_dead_strip	_ehea_set_mac_addr
.subsections_via_symbols
