	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_enable_alt_mac
_niu_enable_alt_mac:                    ## @niu_enable_alt_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_niu_num_alt_addr
	cmpl	%r15d, %eax
	jle	LBB0_1
## %bb.2:
	movq	_NIU_FLAGS_XMAC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	andl	(%rbx), %eax
	sete	%r12b
	jne	LBB0_3
## %bb.4:
	movq	_BMAC_ADDR_CMPEN@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	movq	_XMAC_ADDR_CMPEN@GOTPCREL(%rip), %rax
LBB0_5:
	addl	%r15d, %r12d
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_nr64_mac
	movl	%eax, %esi
	btsl	%r12d, %esi
	btrl	%r12d, %eax
	testl	%r14d, %r14d
	cmovel	%eax, %esi
	movq	%rbx, %rdi
	callq	_nw64_mac
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NIU_FLAGS_XMAC,4,2             ## @NIU_FLAGS_XMAC
	.comm	_XMAC_ADDR_CMPEN,8,3            ## @XMAC_ADDR_CMPEN
	.comm	_BMAC_ADDR_CMPEN,8,3            ## @BMAC_ADDR_CMPEN
	.no_dead_strip	_niu_enable_alt_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_enable_alt_mac
_niu_enable_alt_mac:                    ; @niu_enable_alt_mac
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_niu_num_alt_addr
	cmp	w0, w20
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _NIU_FLAGS_XMAC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIU_FLAGS_XMAC@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w9
	cinc	w8, w20, eq
	mov	w9, #1
	lsl	w21, w9, w8
Lloh3:
	adrp	x8, _BMAC_ADDR_CMPEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMAC_ADDR_CMPEN@GOTPAGEOFF]
Lloh5:
	adrp	x9, _XMAC_ADDR_CMPEN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _XMAC_ADDR_CMPEN@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	x20, [x8]
	mov	x0, x20
	bl	_nr64_mac
	orr	w8, w21, w0
	bic	w9, w0, w21
	cmp	w19, #0
	csel	w1, w9, w8, eq
	mov	x0, x20
	bl	_nw64_mac
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NIU_FLAGS_XMAC,4,2             ; @NIU_FLAGS_XMAC
	.comm	_XMAC_ADDR_CMPEN,8,3            ; @XMAC_ADDR_CMPEN
	.comm	_BMAC_ADDR_CMPEN,8,3            ; @BMAC_ADDR_CMPEN
	.no_dead_strip	_niu_enable_alt_mac
.subsections_via_symbols
