	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgx_set_xcast_mode             ## -- Begin function bgx_set_xcast_mode
	.p2align	4, 0x90
_bgx_set_xcast_mode:                    ## @bgx_set_xcast_mode
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %ebx
	callq	_get_bgx
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	_BGX_CMRX_RX_DMAC_CTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_bgx_reg_read
	movq	_BGX_XCAST_BCAST_ACCEPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r12d, %ecx
	movq	_BCAST_ACCEPT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%ebx, %edx
	orl	%eax, %edx
	notl	%ebx
	andl	%eax, %ebx
	testl	%ecx, %ecx
	cmovnel	%edx, %ebx
	movq	_CAM_ACCEPT@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	_MCAST_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BGX_MCAST_MODE
	movl	%eax, %r13d
	orl	%r14d, %r13d
	notl	%r13d
	andl	%ebx, %r13d
	movq	_BGX_XCAST_MCAST_ACCEPT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
## %bb.2:
	movq	_MCAST_MODE_ACCEPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BGX_MCAST_MODE
	orl	%eax, %r13d
LBB0_3:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_4:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_5:
	movq	_BGX_CMRX_RX_DMAC_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	movl	%r13d, %ecx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bgx_reg_write                  ## TAILCALL
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_BGX_XCAST_MCAST_FILTER@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_3
## %bb.8:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movslq	%ebx, %r14
	movq	_MCAST_MODE_CAM_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BGX_MCAST_MODE
	orl	%eax, %r13d
	orl	(%r15), %r13d
	shlq	$4, %r14
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax,%r14)
	jle	LBB0_4
## %bb.9:
	leaq	(%rax,%r14), %r12
	movl	%ebx, %r15d
	addq	%rax, %r14
	addq	$8, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%ebx, %ecx
	callq	_bgx_set_dmac_cam_filter_mac
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_10
## %bb.11:
	movl	%r15d, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_BGX_CMRX_RX_DMAC_CTL,4,2       ## @BGX_CMRX_RX_DMAC_CTL
	.comm	_BGX_XCAST_BCAST_ACCEPT,4,2     ## @BGX_XCAST_BCAST_ACCEPT
	.comm	_BCAST_ACCEPT,4,2               ## @BCAST_ACCEPT
	.comm	_CAM_ACCEPT,4,2                 ## @CAM_ACCEPT
	.comm	_MCAST_MODE_MASK,4,2            ## @MCAST_MODE_MASK
	.comm	_BGX_XCAST_MCAST_ACCEPT,4,2     ## @BGX_XCAST_MCAST_ACCEPT
	.comm	_MCAST_MODE_ACCEPT,4,2          ## @MCAST_MODE_ACCEPT
	.comm	_BGX_XCAST_MCAST_FILTER,4,2     ## @BGX_XCAST_MCAST_FILTER
	.comm	_MCAST_MODE_CAM_FILTER,4,2      ## @MCAST_MODE_CAM_FILTER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgx_set_xcast_mode             ; -- Begin function bgx_set_xcast_mode
	.p2align	2
_bgx_set_xcast_mode:                    ; @bgx_set_xcast_mode
	.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
	mov	x22, x3
	mov	x19, x2
	bl	_get_bgx
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	x24, [x0]
Lloh0:
	adrp	x23, _BGX_CMRX_RX_DMAC_CTL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BGX_CMRX_RX_DMAC_CTL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x1, x19
	bl	_bgx_reg_read
Lloh2:
	adrp	x8, _BGX_XCAST_BCAST_ACCEPT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BGX_XCAST_BCAST_ACCEPT@GOTPAGEOFF]
Lloh4:
	adrp	x9, _BCAST_ACCEPT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _BCAST_ACCEPT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	orr	w10, w9, w0
	bic	w9, w0, w9
	tst	w8, w22
	csel	w21, w9, w10, eq
Lloh8:
	adrp	x25, _CAM_ACCEPT@GOTPAGE
Lloh9:
	ldr	x25, [x25, _CAM_ACCEPT@GOTPAGEOFF]
	ldr	w26, [x25]
Lloh10:
	adrp	x8, _MCAST_MODE_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MCAST_MODE_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_BGX_MCAST_MODE
	orr	w8, w0, w26
	bic	w21, w21, w8
Lloh13:
	adrp	x8, _BGX_XCAST_MCAST_ACCEPT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BGX_XCAST_MCAST_ACCEPT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_5
; %bb.2:
Lloh16:
	adrp	x8, _MCAST_MODE_ACCEPT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MCAST_MODE_ACCEPT@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_BGX_MCAST_MODE
	orr	w21, w0, w21
LBB0_3:
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x21
	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
	b	_bgx_reg_write
LBB0_4:
	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
LBB0_5:
Lloh19:
	adrp	x8, _BGX_XCAST_MCAST_FILTER@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BGX_XCAST_MCAST_FILTER@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_3
; %bb.6:
	sxtw	x22, w19
Lloh22:
	adrp	x8, _MCAST_MODE_CAM_FILTER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MCAST_MODE_CAM_FILTER@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_BGX_MCAST_MODE
	ldr	w8, [x25]
	orr	w9, w0, w21
	orr	w21, w9, w8
	add	x24, x24, x22, lsl #4
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.7:
	mov	x22, #0
	add	x25, x24, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	w2, [x8, x22, lsl #2]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	bl	_bgx_set_dmac_cam_filter_mac
	add	x22, x22, #1
	ldrsw	x8, [x24]
	cmp	x22, x8
	b.lt	LBB0_8
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BGX_CMRX_RX_DMAC_CTL,4,2       ; @BGX_CMRX_RX_DMAC_CTL
	.comm	_BGX_XCAST_BCAST_ACCEPT,4,2     ; @BGX_XCAST_BCAST_ACCEPT
	.comm	_BCAST_ACCEPT,4,2               ; @BCAST_ACCEPT
	.comm	_CAM_ACCEPT,4,2                 ; @CAM_ACCEPT
	.comm	_MCAST_MODE_MASK,4,2            ; @MCAST_MODE_MASK
	.comm	_BGX_XCAST_MCAST_ACCEPT,4,2     ; @BGX_XCAST_MCAST_ACCEPT
	.comm	_MCAST_MODE_ACCEPT,4,2          ; @MCAST_MODE_ACCEPT
	.comm	_BGX_XCAST_MCAST_FILTER,4,2     ; @BGX_XCAST_MCAST_FILTER
	.comm	_MCAST_MODE_CAM_FILTER,4,2      ; @MCAST_MODE_CAM_FILTER
.subsections_via_symbols
