	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_p2_nic_set_promisc
_netxen_p2_nic_set_promisc:             ## @netxen_p2_nic_set_promisc
	.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
	movslq	(%rdi), %r13
	movq	_NETXEN_NIU_MAX_XG_PORTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	8(%rdi), %r12
	movq	_NETXEN_NIU_XGE_CONFIG_0@GOTPCREL(%rip), %rbx
	movq	%r13, %r14
	shlq	$16, %r14
	movq	(%rbx), %rsi
	addq	%r14, %rsi
	callq	_NXRD32
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %edx
	andl	$-5, %edx
	movq	(%rbx), %rsi
	addq	%r14, %rsi
	movq	%r15, %rdi
	callq	_NXWR32
	movq	_NETXEN_BRDTYPE_P2_SB31_10G_IMEZ@GOTPCREL(%rip), %rax
	movl	$32, %esi
	movl	%r13d, %ecx
	shll	%cl, %esi
	movq	_NETXEN_BRDTYPE_P2_SB31_10G_HMEZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r12
	movl	$512, %edx                      ## imm = 0x200
	cmovel	%esi, %edx
	cmpq	(%rax), %r12
	cmovel	%esi, %edx
	movq	_NETXEN_NIU_FRAME_COUNT_SELECT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_NXWR32
	movl	$10, %edi
	callq	_mdelay
	movq	_NETXEN_NIU_FRAME_COUNT@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	%r15, %rdi
	callq	_NXRD32
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movl	$20, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$10, %edi
	callq	_mdelay
	movq	(%r13), %rsi
	movq	%r15, %rdi
	callq	_NXRD32
	testl	%eax, %eax
	jne	LBB0_4
LBB0_6:
	movq	_NETXEN_NIU_XGE_CONFIG_1@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movq	%r15, %rdi
	callq	_NXRD32
	movq	_NETXEN_NIU_PROMISC_MODE@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	cmpl	%edi, (%rcx)
	sete	%sil
	andl	$-12289, %eax                   ## imm = 0xCFFF
	shll	$13, %esi
	orl	%eax, %esi
	movq	_NETXEN_NIU_ALLMULTI_MODE@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	cmpl	%edi, (%rax)
	sete	%dl
	shll	$12, %edx
	orl	%esi, %edx
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movq	%r15, %rdi
	callq	_NXWR32
LBB0_7:
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	orl	$4, %edx
	movq	_NETXEN_NIU_XGE_CONFIG_0@GOTPCREL(%rip), %rax
	addq	(%rax), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_NXWR32
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_CONFIG_0,8,3    ## @NETXEN_NIU_XGE_CONFIG_0
	.comm	_NETXEN_BRDTYPE_P2_SB31_10G_IMEZ,8,3 ## @NETXEN_BRDTYPE_P2_SB31_10G_IMEZ
	.comm	_NETXEN_BRDTYPE_P2_SB31_10G_HMEZ,8,3 ## @NETXEN_BRDTYPE_P2_SB31_10G_HMEZ
	.comm	_NETXEN_NIU_FRAME_COUNT_SELECT,8,3 ## @NETXEN_NIU_FRAME_COUNT_SELECT
	.comm	_NETXEN_NIU_FRAME_COUNT,8,3     ## @NETXEN_NIU_FRAME_COUNT
	.comm	_NETXEN_NIU_XGE_CONFIG_1,8,3    ## @NETXEN_NIU_XGE_CONFIG_1
	.comm	_NETXEN_NIU_PROMISC_MODE,4,2    ## @NETXEN_NIU_PROMISC_MODE
	.comm	_NETXEN_NIU_ALLMULTI_MODE,4,2   ## @NETXEN_NIU_ALLMULTI_MODE
	.no_dead_strip	_netxen_p2_nic_set_promisc
.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_promisc
_netxen_p2_nic_set_promisc:             ; @netxen_p2_nic_set_promisc
	.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
	ldrsw	x24, [x0]
Lloh0:
	adrp	x8, _NETXEN_NIU_MAX_XG_PORTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETXEN_NIU_MAX_XG_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ge	LBB0_7
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x25, [x0, #8]
Lloh3:
	adrp	x22, _NETXEN_NIU_XGE_CONFIG_0@GOTPAGE
Lloh4:
	ldr	x22, [x22, _NETXEN_NIU_XGE_CONFIG_0@GOTPAGEOFF]
	ldr	x8, [x22]
	lsl	x23, x24, #16
	add	x1, x8, x23
	bl	_NXRD32
	mov	x21, x0
	and	w2, w0, #0xfffffffb
	ldr	x8, [x22]
	add	x1, x8, x23
	mov	x0, x19
	bl	_NXWR32
Lloh5:
	adrp	x8, _NETXEN_BRDTYPE_P2_SB31_10G_IMEZ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NETXEN_BRDTYPE_P2_SB31_10G_IMEZ@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _NETXEN_BRDTYPE_P2_SB31_10G_HMEZ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NETXEN_BRDTYPE_P2_SB31_10G_HMEZ@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x25, x9
	ccmp	x25, x8, #4, ne
	mov	w8, #32
	lsl	w8, w8, w24
	mov	w9, #512
	csel	w2, w8, w9, eq
Lloh11:
	adrp	x8, _NETXEN_NIU_FRAME_COUNT_SELECT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NETXEN_NIU_FRAME_COUNT_SELECT@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_NXWR32
	mov	w0, #10
	bl	_mdelay
Lloh14:
	adrp	x24, _NETXEN_NIU_FRAME_COUNT@GOTPAGE
Lloh15:
	ldr	x24, [x24, _NETXEN_NIU_FRAME_COUNT@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	x0, x19
	bl	_NXRD32
	cbz	w0, LBB0_5
; %bb.2:
	mov	w25, #20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	subs	w25, w25, #1
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10
	bl	_mdelay
	ldr	x1, [x24]
	mov	x0, x19
	bl	_NXRD32
	cbnz	w0, LBB0_3
LBB0_5:
Lloh16:
	adrp	x24, _NETXEN_NIU_XGE_CONFIG_1@GOTPAGE
Lloh17:
	ldr	x24, [x24, _NETXEN_NIU_XGE_CONFIG_1@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x1, x8, x23
	mov	x0, x19
	bl	_NXRD32
Lloh18:
	adrp	x8, _NETXEN_NIU_PROMISC_MODE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NETXEN_NIU_PROMISC_MODE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w8, eq
	and	w2, w0, #0xffffcfff
	bfi	w2, w8, #13, #1
Lloh21:
	adrp	x8, _NETXEN_NIU_ALLMULTI_MODE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NETXEN_NIU_ALLMULTI_MODE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w8, eq
	bfi	w2, w8, #12, #1
	ldr	x8, [x24]
	add	x1, x8, x23
	mov	x0, x19
	bl	_NXWR32
LBB0_6:
	orr	w2, w21, #0x4
	ldr	x8, [x22]
	add	x1, x8, x23
	mov	x0, x19
	bl	_NXWR32
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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 AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.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_CONFIG_0,8,3    ; @NETXEN_NIU_XGE_CONFIG_0
	.comm	_NETXEN_BRDTYPE_P2_SB31_10G_IMEZ,8,3 ; @NETXEN_BRDTYPE_P2_SB31_10G_IMEZ
	.comm	_NETXEN_BRDTYPE_P2_SB31_10G_HMEZ,8,3 ; @NETXEN_BRDTYPE_P2_SB31_10G_HMEZ
	.comm	_NETXEN_NIU_FRAME_COUNT_SELECT,8,3 ; @NETXEN_NIU_FRAME_COUNT_SELECT
	.comm	_NETXEN_NIU_FRAME_COUNT,8,3     ; @NETXEN_NIU_FRAME_COUNT
	.comm	_NETXEN_NIU_XGE_CONFIG_1,8,3    ; @NETXEN_NIU_XGE_CONFIG_1
	.comm	_NETXEN_NIU_PROMISC_MODE,4,2    ; @NETXEN_NIU_PROMISC_MODE
	.comm	_NETXEN_NIU_ALLMULTI_MODE,4,2   ; @NETXEN_NIU_ALLMULTI_MODE
	.no_dead_strip	_netxen_p2_nic_set_promisc
.subsections_via_symbols
