	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oxnas_dwmac_init
_oxnas_dwmac_init:                      ## @oxnas_dwmac_init
	.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
	movq	%rsi, %r12
	movl	8(%rsi), %edi
	callq	_device_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	4(%r12), %edi
	callq	_clk_prepare_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	(%r12), %edi
	movq	_OXNAS_DWMAC_CTRL_REGOFFSET@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_DWMAC_CKEN_GTX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_DWMAC_SIMPLE_MUX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	_DWMAC_AUTO_TX_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r14d
	movq	_DWMAC_CKEN_TX_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r14d
	orl	%ebx, %r14d
	movq	_DWMAC_CKEN_TXN_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r15d
	movq	_DWMAC_CKEN_TX_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r15d
	movq	_DWMAC_CKEN_RX_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r15d
	orl	%r14d, %r15d
	movq	_DWMAC_CKEN_RXN_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_DWMAC_CKEN_RX_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	orl	%r15d, %ebx
	orl	-44(%rbp), %ebx
	movl	%ebx, -44(%rbp)
	movl	(%r12), %edi
	movl	(%r13), %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	$4, %edi
	callq	_DWMAC_TX_VARDELAY
	movl	%eax, %r14d
	movl	$2, %edi
	callq	_DWMAC_TXN_VARDELAY
	orl	%eax, %r14d
	movl	$10, %edi
	callq	_DWMAC_RX_VARDELAY
	movl	%eax, %ebx
	movl	$8, %edi
	callq	_DWMAC_RXN_VARDELAY
	orl	%eax, %ebx
	orl	%r14d, %ebx
	movl	%ebx, -44(%rbp)
	movl	(%r12), %edi
	movq	_OXNAS_DWMAC_DELAY_REGOFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_regmap_write
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %ebx
	movl	4(%r12), %edi
	callq	_clk_disable_unprepare
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OXNAS_DWMAC_CTRL_REGOFFSET,4,2 ## @OXNAS_DWMAC_CTRL_REGOFFSET
	.comm	_DWMAC_CKEN_GTX,4,2             ## @DWMAC_CKEN_GTX
	.comm	_DWMAC_SIMPLE_MUX,4,2           ## @DWMAC_SIMPLE_MUX
	.comm	_DWMAC_AUTO_TX_SOURCE,4,2       ## @DWMAC_AUTO_TX_SOURCE
	.comm	_DWMAC_CKEN_TX_OUT,4,2          ## @DWMAC_CKEN_TX_OUT
	.comm	_DWMAC_CKEN_TXN_OUT,4,2         ## @DWMAC_CKEN_TXN_OUT
	.comm	_DWMAC_CKEN_TX_IN,4,2           ## @DWMAC_CKEN_TX_IN
	.comm	_DWMAC_CKEN_RX_OUT,4,2          ## @DWMAC_CKEN_RX_OUT
	.comm	_DWMAC_CKEN_RXN_OUT,4,2         ## @DWMAC_CKEN_RXN_OUT
	.comm	_DWMAC_CKEN_RX_IN,4,2           ## @DWMAC_CKEN_RX_IN
	.comm	_OXNAS_DWMAC_DELAY_REGOFFSET,4,2 ## @OXNAS_DWMAC_DELAY_REGOFFSET
	.no_dead_strip	_oxnas_dwmac_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oxnas_dwmac_init
_oxnas_dwmac_init:                      ; @oxnas_dwmac_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	ldr	w0, [x1, #8]
	bl	_device_reset
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x19]
Lloh0:
	adrp	x21, _OXNAS_DWMAC_CTRL_REGOFFSET@GOTPAGE
Lloh1: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bl	_BIT
	orr	w20, w20, w0
Lloh23:
	adrp	x8, _DWMAC_CKEN_RXN_OUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DWMAC_CKEN_RXN_OUT@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_BIT
	orr	w20, w20, w0
Lloh26:
	adrp	x8, _DWMAC_CKEN_RX_IN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DWMAC_CKEN_RX_IN@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_BIT
	orr	w8, w20, w0
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w0, [x19]
	ldr	w1, [x21]
	bl	_regmap_write
	mov	w0, #4
	bl	_DWMAC_TX_VARDELAY
	mov	x20, x0
	mov	w0, #2
	bl	_DWMAC_TXN_VARDELAY
	orr	w20, w0, w20
	mov	w0, #10
	bl	_DWMAC_RX_VARDELAY
	orr	w20, w20, w0
	mov	w0, #8
	bl	_DWMAC_RXN_VARDELAY
	orr	w2, w20, w0
	str	w2, [sp, #12]
	ldr	w0, [x19]
Lloh29:
	adrp	x8, _OXNAS_DWMAC_DELAY_REGOFFSET@GOTPAGE
Lloh30:
	ldr	x8, [x8, _OXNAS_DWMAC_DELAY_REGOFFSET@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	w20, #0
	b	LBB0_5
LBB0_4:
	mov	x20, x0
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_OXNAS_DWMAC_CTRL_REGOFFSET,4,2 ; @OXNAS_DWMAC_CTRL_REGOFFSET
	.comm	_DWMAC_CKEN_GTX,4,2             ; @DWMAC_CKEN_GTX
	.comm	_DWMAC_SIMPLE_MUX,4,2           ; @DWMAC_SIMPLE_MUX
	.comm	_DWMAC_AUTO_TX_SOURCE,4,2       ; @DWMAC_AUTO_TX_SOURCE
	.comm	_DWMAC_CKEN_TX_OUT,4,2          ; @DWMAC_CKEN_TX_OUT
	.comm	_DWMAC_CKEN_TXN_OUT,4,2         ; @DWMAC_CKEN_TXN_OUT
	.comm	_DWMAC_CKEN_TX_IN,4,2           ; @DWMAC_CKEN_TX_IN
	.comm	_DWMAC_CKEN_RX_OUT,4,2          ; @DWMAC_CKEN_RX_OUT
	.comm	_DWMAC_CKEN_RXN_OUT,4,2         ; @DWMAC_CKEN_RXN_OUT
	.comm	_DWMAC_CKEN_RX_IN,4,2           ; @DWMAC_CKEN_RX_IN
	.comm	_OXNAS_DWMAC_DELAY_REGOFFSET,4,2 ; @OXNAS_DWMAC_DELAY_REGOFFSET
	.no_dead_strip	_oxnas_dwmac_init
.subsections_via_symbols
