	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1_setup_mac_ctrl
_atl1_setup_mac_ctrl:                   ## @atl1_setup_mac_ctrl
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_MAC_CTRL_TX_EN@GOTPCREL(%rip), %rcx
	movq	_MAC_CTRL_RX_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_FULL_DUPLEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdi), %rdx
	jne	LBB0_2
## %bb.1:
	movq	_MAC_CTRL_DUPLX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	orl	%ecx, %eax
	movq	32(%rbx), %r14
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	8(%rbx), %rcx
	jne	LBB0_3
## %bb.4:
	movq	_MAC_CTRL_SPEED_1000@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_MAC_CTRL_SPEED_10_100@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %edx
	movq	_MAC_CTRL_SPEED_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	%eax, %edx
	movq	_MAC_CTRL_TX_FLOW@GOTPCREL(%rip), %rax
	movq	_MAC_CTRL_RX_FLOW@GOTPCREL(%rip), %rcx
	orl	(%rax), %edx
	orl	(%rcx), %edx
	movq	_MAC_CTRL_ADD_CRC@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_MAC_CTRL_PAD@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_MAC_CTRL_PRMLEN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	24(%rbx), %eax
	movq	_MAC_CTRL_PRMLEN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	4(%r14), %edi
	leaq	-20(%rbp), %rsi
	callq	___atlx_vlan_mode
	movq	_MAC_CTRL_BC_EN@GOTPCREL(%rip), %rax
	movl	-20(%rbp), %edi
	orl	(%rax), %edi
	movl	%edi, -20(%rbp)
	movl	(%r14), %eax
	movq	_IFF_PROMISC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_MAC_CTRL_PROMIS_EN@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_IFF_ALLMULTI@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.8:
	movq	_MAC_CTRL_MC_ALL_EN@GOTPCREL(%rip), %rax
LBB0_9:
	orl	(%rax), %edi
	movl	%edi, -20(%rbp)
LBB0_10:
	movq	_REG_MAC_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	callq	_iowrite32
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_CTRL_TX_EN,4,2             ## @MAC_CTRL_TX_EN
	.comm	_MAC_CTRL_RX_EN,4,2             ## @MAC_CTRL_RX_EN
	.comm	_FULL_DUPLEX,8,3                ## @FULL_DUPLEX
	.comm	_MAC_CTRL_DUPLX,4,2             ## @MAC_CTRL_DUPLX
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_MAC_CTRL_SPEED_1000,8,3        ## @MAC_CTRL_SPEED_1000
	.comm	_MAC_CTRL_SPEED_10_100,8,3      ## @MAC_CTRL_SPEED_10_100
	.comm	_MAC_CTRL_SPEED_SHIFT,4,2       ## @MAC_CTRL_SPEED_SHIFT
	.comm	_MAC_CTRL_TX_FLOW,4,2           ## @MAC_CTRL_TX_FLOW
	.comm	_MAC_CTRL_RX_FLOW,4,2           ## @MAC_CTRL_RX_FLOW
	.comm	_MAC_CTRL_ADD_CRC,4,2           ## @MAC_CTRL_ADD_CRC
	.comm	_MAC_CTRL_PAD,4,2               ## @MAC_CTRL_PAD
	.comm	_MAC_CTRL_PRMLEN_MASK,4,2       ## @MAC_CTRL_PRMLEN_MASK
	.comm	_MAC_CTRL_PRMLEN_SHIFT,4,2      ## @MAC_CTRL_PRMLEN_SHIFT
	.comm	_MAC_CTRL_BC_EN,4,2             ## @MAC_CTRL_BC_EN
	.comm	_IFF_PROMISC,4,2                ## @IFF_PROMISC
	.comm	_MAC_CTRL_PROMIS_EN,4,2         ## @MAC_CTRL_PROMIS_EN
	.comm	_IFF_ALLMULTI,4,2               ## @IFF_ALLMULTI
	.comm	_MAC_CTRL_MC_ALL_EN,4,2         ## @MAC_CTRL_MC_ALL_EN
	.comm	_REG_MAC_CTRL,8,3               ## @REG_MAC_CTRL
	.no_dead_strip	_atl1_setup_mac_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1_setup_mac_ctrl
_atl1_setup_mac_ctrl:                   ; @atl1_setup_mac_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _MAC_CTRL_TX_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAC_CTRL_TX_EN@GOTPAGEOFF]
	ldr	x20, [x0, #32]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MAC_CTRL_RX_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAC_CTRL_RX_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _FULL_DUPLEX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FULL_DUPLEX@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _MAC_CTRL_DUPLX@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MAC_CTRL_DUPLX@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	ldp	x11, x12, [x0]
	cmp	x9, x11
	csel	w9, w10, wzr, eq
Lloh12:
	adrp	x10, _SPEED_1000@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SPEED_1000@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh14:
	ldr	x9, [x10]
Lloh15:
	adrp	x10, _MAC_CTRL_SPEED_1000@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MAC_CTRL_SPEED_1000@GOTPAGEOFF]
Lloh17:
	adrp	x11, _MAC_CTRL_SPEED_10_100@GOTPAGE
Lloh18:
	ldr	x11, [x11, _MAC_CTRL_SPEED_10_100@GOTPAGEOFF]
	cmp	x9, x12
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _MAC_CTRL_SPEED_SHIFT@GOTPAGE
Lloh20:
	ldr	x10, [x10, _MAC_CTRL_SPEED_SHIFT@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _MAC_CTRL_TX_FLOW@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MAC_CTRL_TX_FLOW@GOTPAGEOFF]
Lloh24:
	adrp	x10, _MAC_CTRL_RX_FLOW@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MAC_CTRL_RX_FLOW@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w8, w8, w10
Lloh28:
	adrp	x9, _MAC_CTRL_ADD_CRC@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MAC_CTRL_ADD_CRC@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
Lloh31:
	adrp	x10, _MAC_CTRL_PAD@GOTPAGE
Lloh32:
	ldr	x10, [x10, _MAC_CTRL_PAD@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w8, w8, w10
	ldr	w9, [x0, #24]
Lloh34:
	adrp	x10, _MAC_CTRL_PRMLEN_MASK@GOTPAGE
Lloh35:
	ldr	x10, [x10, _MAC_CTRL_PRMLEN_MASK@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
Lloh37:
	adrp	x11, _MAC_CTRL_PRMLEN_SHIFT@GOTPAGE
Lloh38:
	ldr	x11, [x11, _MAC_CTRL_PRMLEN_SHIFT@GOTPAGEOFF]
	and	w9, w10, w9
Lloh39:
	ldr	w10, [x11]
	lsl	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w0, [x20, #4]
	add	x1, sp, #12
	bl	___atlx_vlan_mode
Lloh40:
	adrp	x8, _MAC_CTRL_BC_EN@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MAC_CTRL_BC_EN@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w0, w9, w8
	str	w0, [sp, #12]
	ldr	w8, [x20]
Lloh43:
	adrp	x9, _IFF_PROMISC@GOTPAGE
Lloh44:
	ldr	x9, [x9, _IFF_PROMISC@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh46:
	adrp	x8, _MAC_CTRL_PROMIS_EN@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MAC_CTRL_PROMIS_EN@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh48:
	adrp	x9, _IFF_ALLMULTI@GOTPAGE
Lloh49:
	ldr	x9, [x9, _IFF_ALLMULTI@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
Lloh51:
	adrp	x8, _MAC_CTRL_MC_ALL_EN@GOTPAGE
Lloh52:
	ldr	x8, [x8, _MAC_CTRL_MC_ALL_EN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	orr	w0, w8, w0
	str	w0, [sp, #12]
LBB0_5:
	ldr	x8, [x19, #16]
Lloh53:
	adrp	x9, _REG_MAC_CTRL@GOTPAGE
Lloh54:
	ldr	x9, [x9, _REG_MAC_CTRL@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_CTRL_TX_EN,4,2             ; @MAC_CTRL_TX_EN
	.comm	_MAC_CTRL_RX_EN,4,2             ; @MAC_CTRL_RX_EN
	.comm	_FULL_DUPLEX,8,3                ; @FULL_DUPLEX
	.comm	_MAC_CTRL_DUPLX,4,2             ; @MAC_CTRL_DUPLX
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_MAC_CTRL_SPEED_1000,8,3        ; @MAC_CTRL_SPEED_1000
	.comm	_MAC_CTRL_SPEED_10_100,8,3      ; @MAC_CTRL_SPEED_10_100
	.comm	_MAC_CTRL_SPEED_SHIFT,4,2       ; @MAC_CTRL_SPEED_SHIFT
	.comm	_MAC_CTRL_TX_FLOW,4,2           ; @MAC_CTRL_TX_FLOW
	.comm	_MAC_CTRL_RX_FLOW,4,2           ; @MAC_CTRL_RX_FLOW
	.comm	_MAC_CTRL_ADD_CRC,4,2           ; @MAC_CTRL_ADD_CRC
	.comm	_MAC_CTRL_PAD,4,2               ; @MAC_CTRL_PAD
	.comm	_MAC_CTRL_PRMLEN_MASK,4,2       ; @MAC_CTRL_PRMLEN_MASK
	.comm	_MAC_CTRL_PRMLEN_SHIFT,4,2      ; @MAC_CTRL_PRMLEN_SHIFT
	.comm	_MAC_CTRL_BC_EN,4,2             ; @MAC_CTRL_BC_EN
	.comm	_IFF_PROMISC,4,2                ; @IFF_PROMISC
	.comm	_MAC_CTRL_PROMIS_EN,4,2         ; @MAC_CTRL_PROMIS_EN
	.comm	_IFF_ALLMULTI,4,2               ; @IFF_ALLMULTI
	.comm	_MAC_CTRL_MC_ALL_EN,4,2         ; @MAC_CTRL_MC_ALL_EN
	.comm	_REG_MAC_CTRL,8,3               ; @REG_MAC_CTRL
	.no_dead_strip	_atl1_setup_mac_ctrl
.subsections_via_symbols
