	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function liquidio_set_mac
_liquidio_set_mac:                      ## @liquidio_set_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_GET_LIO
	movq	%rax, %r14
	movq	24(%rax), %r13
	movl	(%r15), %edi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	(%r15), %edi
	movl	4(%r12), %esi
	callq	_ether_addr_equal
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.2:
	cmpq	$0, 16(%r14)
	je	LBB0_8
## %bb.3:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	-104(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	$0, -48(%rbp)
	movq	_OCTNET_CMD_CHANGE_MACADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	movl	$1, -72(%rbp)
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	%r12, -88(%rbp)
	movq	-96(%rbp), %rdi
	movq	$0, (%rdi)
	addq	$8, %rdi
	movl	(%r15), %esi
	callq	_ether_addr_copy
	movq	24(%r14), %rdi
	leaq	-104(%rbp), %rsi
	callq	_octnet_send_nic_ctrl_pkt
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	movq	-104(%rbp), %rbx
	movq	_OCTEON_REQUEST_NO_PERMISSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FIRMWARE_STATUS_CODE
	cmpq	%rax, %rbx
	jne	LBB0_12
## %bb.10:
	movq	(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_11:
	movq	(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_12:
	movl	(%r12), %edx
	movl	4(%r12), %edi
	movl	(%r15), %esi
	callq	_memcpy
	addq	$8, %r14
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ether_addr_copy
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_OCTNET_CMD_CHANGE_MACADDR,4,2  ## @OCTNET_CMD_CHANGE_MACADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAC Address change failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCTEON_REQUEST_NO_PERMISSION,4,2 ## @OCTEON_REQUEST_NO_PERMISSION
L_.str.1:                               ## @.str.1
	.asciz	"MAC Address change failed: no permission\n"

	.no_dead_strip	_liquidio_set_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function liquidio_set_mac
_liquidio_set_mac:                      ; @liquidio_set_mac
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_GET_LIO
	mov	x20, x0
	ldr	x22, [x0, #24]
	ldr	w0, [x19]
	bl	_is_valid_ether_addr
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x19]
	ldr	w1, [x21, #4]
	bl	_ether_addr_equal
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #0
	b	LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_8
LBB0_5:
Lloh2:
	adrp	x8, _EPERM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	str	xzr, [sp, #56]
Lloh4:
	adrp	x8, _OCTNET_CMD_CHANGE_MACADDR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _OCTNET_CMD_CHANGE_MACADDR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [sp, #48]
	str	xzr, [sp, #40]
	mov	w8, #1
	str	w8, [sp, #32]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	str	w8, [sp, #24]
	str	x21, [sp, #16]
	ldr	x0, [sp, #8]
	str	xzr, [x0], #8
	ldr	w1, [x19]
	bl	_ether_addr_copy
	ldr	x0, [x20, #24]
	mov	x1, sp
	bl	_octnet_send_nic_ctrl_pkt
	tbnz	w0, #31, LBB0_11
; %bb.9:
	ldr	x23, [sp]
Lloh7:
	adrp	x8, _OCTEON_REQUEST_NO_PERMISSION@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OCTEON_REQUEST_NO_PERMISSION@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_FIRMWARE_STATUS_CODE
	cmp	x23, x0
	b.ne	LBB0_12
; %bb.10:
	ldr	x0, [x22]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_11:
	ldr	x0, [x22]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_12:
	ldr	w1, [x19]
	ldp	w2, w0, [x21]
	bl	_memcpy
	add	x0, x20, #8
	ldr	w1, [x19]
	bl	_ether_addr_copy
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_OCTNET_CMD_CHANGE_MACADDR,4,2  ; @OCTNET_CMD_CHANGE_MACADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAC Address change failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCTEON_REQUEST_NO_PERMISSION,4,2 ; @OCTEON_REQUEST_NO_PERMISSION
l_.str.1:                               ; @.str.1
	.asciz	"MAC Address change failed: no permission\n"

	.no_dead_strip	_liquidio_set_mac
.subsections_via_symbols
