	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function change_mac
_change_mac:                            ## @change_mac
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_VLAN_N_VID@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	(%rdi), %r15
	movq	(%r15), %rdi
	movq	_MAC_SET@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_HINIC_PORT_CMD_SET_MAC@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	8(%rdi), %rdx
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	callq	_netif_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_3:
	movq	_HINIC_PORT_CMD_DEL_MAC@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rdi), %r14
	movl	(%rax), %r13d
	callq	_HINIC_HWIF_FUNC_IDX
	movl	%eax, -56(%rbp)
	movq	%rbx, -64(%rbp)
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rsi
	callq	_memcpy
	leaq	-80(%rbp), %rdx
	leaq	-48(%rbp), %r9
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	$32, %ecx
	movq	%rdx, %r8
	callq	_hinic_port_msg_cmd
	movq	-80(%rbp), %rdx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	cmpq	$32, -48(%rbp)
	jne	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	testq	%rdx, %rdx
	je	LBB0_10
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VLAN_N_VID,8,3                 ## @VLAN_N_VID
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid VLAN number\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAC_SET,4,2                    ## @MAC_SET
	.comm	_HINIC_PORT_CMD_SET_MAC,4,2     ## @HINIC_PORT_CMD_SET_MAC
	.comm	_HINIC_PORT_CMD_DEL_MAC,4,2     ## @HINIC_PORT_CMD_DEL_MAC
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
L_.str.1:                               ## @.str.1
	.asciz	"Failed to change MAC, ret = %d\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_change_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function change_mac
_change_mac:                            ; @change_mac
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _VLAN_N_VID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VLAN_N_VID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	b.le	LBB0_5
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	ldr	x22, [x0]
	ldr	x0, [x22]
	ldr	x19, [x0]
Lloh3:
	adrp	x8, _MAC_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAC_SET@GOTPAGEOFF]
Lloh5:
	adrp	x9, _HINIC_PORT_CMD_SET_MAC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HINIC_PORT_CMD_SET_MAC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x10, _HINIC_PORT_CMD_DEL_MAC@GOTPAGE
Lloh9:
	ldr	x10, [x10, _HINIC_PORT_CMD_DEL_MAC@GOTPAGEOFF]
	cmp	w8, w3
	csel	x8, x9, x10, eq
	ldr	w23, [x8]
	bl	_HINIC_HWIF_FUNC_IDX
	str	w0, [sp, #40]
	str	x21, [sp, #32]
Lloh10:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_memcpy
	add	x2, sp, #16
	add	x4, sp, #16
	add	x5, sp, #8
	mov	x0, x22
	mov	x1, x23
	mov	w3, #32
	bl	_hinic_port_msg_cmd
	ldr	x2, [sp, #16]
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	x8, [sp, #8]
	cmp	x8, #32
	b.ne	LBB0_6
; %bb.3:
	cbnz	x2, LBB0_6
; %bb.4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	ldr	x2, [x0, #8]
Lloh13:
	adrp	x8, _drv@GOTPAGE
Lloh14:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x3, l_.str@PAGE
Lloh17:
	add	x3, x3, l_.str@PAGEOFF
	bl	_netif_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh22:
	adrp	x8, _EFAULT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_VLAN_N_VID,8,3                 ; @VLAN_N_VID
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid VLAN number\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAC_SET,4,2                    ; @MAC_SET
	.comm	_HINIC_PORT_CMD_SET_MAC,4,2     ; @HINIC_PORT_CMD_SET_MAC
	.comm	_HINIC_PORT_CMD_DEL_MAC,4,2     ; @HINIC_PORT_CMD_DEL_MAC
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
l_.str.1:                               ; @.str.1
	.asciz	"Failed to change MAC, ret = %d\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_change_mac
.subsections_via_symbols
