	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dwxgmac2_setup                 ## -- Begin function dwxgmac2_setup
	.p2align	4, 0x90
_dwxgmac2_setup:                        ## @dwxgmac2_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	32(%rdi), %rbx
	movl	24(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	_IFF_UNICAST_FLT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r14), %rcx
	orl	%eax, (%rcx)
	movl	8(%r14), %eax
	movl	%eax, 108(%rbx)
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	movq	%rdi, 88(%rbx)
	movl	(%rax), %eax
	movl	%eax, 104(%rbx)
	movq	$0, 96(%rbx)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_ilog2
	movq	%rax, 96(%rbx)
LBB0_2:
	movq	$0, 80(%rbx)
	movq	_XGMAC_CONFIG_SS_10_MII@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 76(%rbx)
	movq	_XGMAC_CONFIG_SS_100_MII@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	movq	_XGMAC_CONFIG_SS_1000_GMII@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rbx)
	movq	_XGMAC_CONFIG_SS_2500_GMII@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	_XGMAC_CONFIG_SS_2500@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movq	_XGMAC_CONFIG_SS_5000@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_XGMAC_CONFIG_SS_10000@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_XGMAC_CONFIG_SS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_XGMAC_MDIO_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_XGMAC_MDIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	$16, (%rbx)
	movl	$20, %edi
	movl	$16, %esi
	callq	_GENMASK
	movq	%rax, 32(%rbx)
	movq	$0, 24(%rbx)
	movl	$15, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movq	%rax, 16(%rbx)
	movl	$19, 4(%rbx)
	movl	$21, %edi
	movl	$19, %esi
	callq	_GENMASK
	movq	%rax, 8(%rbx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\tXGMAC2\n"

	.comm	_IFF_UNICAST_FLT,4,2            ## @IFF_UNICAST_FLT
	.comm	_XGMAC_CONFIG_SS_10_MII,4,2     ## @XGMAC_CONFIG_SS_10_MII
	.comm	_XGMAC_CONFIG_SS_100_MII,4,2    ## @XGMAC_CONFIG_SS_100_MII
	.comm	_XGMAC_CONFIG_SS_1000_GMII,4,2  ## @XGMAC_CONFIG_SS_1000_GMII
	.comm	_XGMAC_CONFIG_SS_2500_GMII,4,2  ## @XGMAC_CONFIG_SS_2500_GMII
	.comm	_XGMAC_CONFIG_SS_2500,4,2       ## @XGMAC_CONFIG_SS_2500
	.comm	_XGMAC_CONFIG_SS_5000,4,2       ## @XGMAC_CONFIG_SS_5000
	.comm	_XGMAC_CONFIG_SS_10000,4,2      ## @XGMAC_CONFIG_SS_10000
	.comm	_XGMAC_CONFIG_SS_MASK,4,2       ## @XGMAC_CONFIG_SS_MASK
	.comm	_XGMAC_MDIO_ADDR,4,2            ## @XGMAC_MDIO_ADDR
	.comm	_XGMAC_MDIO_DATA,4,2            ## @XGMAC_MDIO_DATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dwxgmac2_setup                 ; -- Begin function dwxgmac2_setup
	.p2align	2
_dwxgmac2_setup:                        ; @dwxgmac2_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #32]
	ldr	w0, [x0, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
Lloh2:
	adrp	x8, _IFF_UNICAST_FLT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IFF_UNICAST_FLT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	ldr	w8, [x19, #8]
	ldr	x9, [x19]
	ldr	x0, [x9, #8]
	ldr	w9, [x9]
	stp	w9, w8, [x20, #104]
	stp	x0, xzr, [x20, #88]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_ilog2
	str	x0, [x20, #96]
LBB0_2:
	str	xzr, [x20, #80]
Lloh5:
	adrp	x8, _XGMAC_CONFIG_SS_10_MII@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XGMAC_CONFIG_SS_10_MII@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _XGMAC_CONFIG_SS_100_MII@GOTPAGE
Lloh9:
	ldr	x9, [x9, _XGMAC_CONFIG_SS_100_MII@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #72]
Lloh11:
	adrp	x8, _XGMAC_CONFIG_SS_1000_GMII@GOTPAGE
Lloh12:
	ldr	x8, [x8, _XGMAC_CONFIG_SS_1000_GMII@GOTPAGEOFF]
Lloh13:
	adrp	x9, _XGMAC_CONFIG_SS_2500_GMII@GOTPAGE
Lloh14:
	ldr	x9, [x9, _XGMAC_CONFIG_SS_2500_GMII@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #64]
Lloh17:
	adrp	x8, _XGMAC_CONFIG_SS_2500@GOTPAGE
Lloh18:
	ldr	x8, [x8, _XGMAC_CONFIG_SS_2500@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _XGMAC_CONFIG_SS_5000@GOTPAGE
Lloh21:
	ldr	x9, [x9, _XGMAC_CONFIG_SS_5000@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #56]
Lloh23:
	adrp	x8, _XGMAC_CONFIG_SS_10000@GOTPAGE
Lloh24:
	ldr	x8, [x8, _XGMAC_CONFIG_SS_10000@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _XGMAC_CONFIG_SS_MASK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _XGMAC_CONFIG_SS_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #48]
Lloh29:
	adrp	x8, _XGMAC_MDIO_ADDR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _XGMAC_MDIO_ADDR@GOTPAGEOFF]
Lloh31:
	adrp	x9, _XGMAC_MDIO_DATA@GOTPAGE
Lloh32:
	ldr	x9, [x9, _XGMAC_MDIO_DATA@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
	mov	w8, #16
	str	w8, [x20]
	mov	w0, #20
	mov	w1, #16
	bl	_GENMASK
	stp	xzr, x0, [x20, #24]
	mov	w0, #15
	mov	w1, #0
	bl	_GENMASK
	str	x0, [x20, #16]
	mov	w8, #19
	str	w8, [x20, #4]
	mov	w0, #21
	mov	w1, #19
	bl	_GENMASK
	str	x0, [x20, #8]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh33
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\tXGMAC2\n"

	.comm	_IFF_UNICAST_FLT,4,2            ; @IFF_UNICAST_FLT
	.comm	_XGMAC_CONFIG_SS_10_MII,4,2     ; @XGMAC_CONFIG_SS_10_MII
	.comm	_XGMAC_CONFIG_SS_100_MII,4,2    ; @XGMAC_CONFIG_SS_100_MII
	.comm	_XGMAC_CONFIG_SS_1000_GMII,4,2  ; @XGMAC_CONFIG_SS_1000_GMII
	.comm	_XGMAC_CONFIG_SS_2500_GMII,4,2  ; @XGMAC_CONFIG_SS_2500_GMII
	.comm	_XGMAC_CONFIG_SS_2500,4,2       ; @XGMAC_CONFIG_SS_2500
	.comm	_XGMAC_CONFIG_SS_5000,4,2       ; @XGMAC_CONFIG_SS_5000
	.comm	_XGMAC_CONFIG_SS_10000,4,2      ; @XGMAC_CONFIG_SS_10000
	.comm	_XGMAC_CONFIG_SS_MASK,4,2       ; @XGMAC_CONFIG_SS_MASK
	.comm	_XGMAC_MDIO_ADDR,4,2            ; @XGMAC_MDIO_ADDR
	.comm	_XGMAC_MDIO_DATA,4,2            ; @XGMAC_MDIO_DATA
.subsections_via_symbols
