	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_p2_nic_set_mac_addr
_netxen_p2_nic_set_mac_addr:            ## @netxen_p2_nic_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %ebx
	movq	_NETXEN_NIU_MAX_XG_PORTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movl	(%rsi), %eax
	movl	4(%rsi), %r12d
	shll	$16, %eax
	shll	$24, %r12d
	orl	%eax, %r12d
	movl	12(%rsi), %r15d
	shll	$8, %r15d
	orl	8(%rsi), %r15d
	movl	16(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	20(%rsi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_NETXEN_NIU_XGE_STATION_ADDR_0_1@GOTPCREL(%rip), %rax
	shll	$16, %ebx
	movl	(%rax), %r13d
	addl	%ebx, %r13d
	movq	_NETXEN_NIU_XGE_STATION_ADDR_0_HI@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_NXWR32
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	shll	$16, %ecx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	shll	$24, %eax
	orl	%ecx, %eax
	orl	%eax, %r15d
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_NXWR32
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_NXWR32
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_NXWR32
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_NETXEN_NIU_MAX_XG_PORTS,4,2    ## @NETXEN_NIU_MAX_XG_PORTS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NETXEN_NIU_XGE_STATION_ADDR_0_1,4,2 ## @NETXEN_NIU_XGE_STATION_ADDR_0_1
	.comm	_NETXEN_NIU_XGE_STATION_ADDR_0_HI,4,2 ## @NETXEN_NIU_XGE_STATION_ADDR_0_HI
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_netxen_p2_nic_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 netxen_p2_nic_set_mac_addr
_netxen_p2_nic_set_mac_addr:            ; @netxen_p2_nic_set_mac_addr
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _NETXEN_NIU_MAX_XG_PORTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NETXEN_NIU_MAX_XG_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_6
; %bb.1:
	mov	x19, x0
	ldp	w9, w10, [x1]
	lsl	w10, w10, #24
	orr	w20, w10, w9, lsl #16
	ldp	w22, w23, [x1, #8]
	ldp	w24, w25, [x1, #16]
Lloh3:
	adrp	x9, _NETXEN_NIU_XGE_STATION_ADDR_0_1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NETXEN_NIU_XGE_STATION_ADDR_0_1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w26, w8, #16
	add	w21, w9, w26
Lloh6:
	adrp	x8, _NETXEN_NIU_XGE_STATION_ADDR_0_HI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NETXEN_NIU_XGE_STATION_ADDR_0_HI@GOTPAGEOFF]
Lloh8:
	ldr	w27, [x8]
	mov	x1, x21
	mov	x2, x20
	bl	_NXWR32
	cbnz	x0, LBB0_5
; %bb.2:
	orr	w8, w22, w23, lsl #8
	orr	w8, w8, w24, lsl #16
	orr	w22, w8, w25, lsl #24
	add	w23, w27, w26
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_NXWR32
	cbnz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_NXWR32
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_NXWR32
	cbz	x0, LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NETXEN_NIU_MAX_XG_PORTS,4,2    ; @NETXEN_NIU_MAX_XG_PORTS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NETXEN_NIU_XGE_STATION_ADDR_0_1,4,2 ; @NETXEN_NIU_XGE_STATION_ADDR_0_1
	.comm	_NETXEN_NIU_XGE_STATION_ADDR_0_HI,4,2 ; @NETXEN_NIU_XGE_STATION_ADDR_0_HI
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_netxen_p2_nic_set_mac_addr
.subsections_via_symbols
