	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm9161_config_init
_dm9161_config_init:                    ## @dm9161_config_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_MII_BMCR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_BMCR_ISOLATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_phy_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_8
## %bb.3:
	movq	_MII_DM9161_SCR_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_5
LBB0_4:
	movq	_MII_DM9161_SCR_INIT@GOTPCREL(%rip), %rax
	movq	_MII_DM9161_SCR_RMII@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
LBB0_5:
	movq	_MII_DM9161_SCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movq	_MII_DM9161_10BTCSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MII_DM9161_10BTCSR_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_phy_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:
	movl	(%r14), %esi
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_phy_write                      ## TAILCALL
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_ISOLATE,4,2               ## @BMCR_ISOLATE
	.comm	_MII_DM9161_SCR_INIT,4,2        ## @MII_DM9161_SCR_INIT
	.comm	_MII_DM9161_SCR_RMII,4,2        ## @MII_DM9161_SCR_RMII
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MII_DM9161_SCR,4,2             ## @MII_DM9161_SCR
	.comm	_MII_DM9161_10BTCSR,4,2         ## @MII_DM9161_10BTCSR
	.comm	_MII_DM9161_10BTCSR_INIT,4,2    ## @MII_DM9161_10BTCSR_INIT
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.no_dead_strip	_dm9161_config_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm9161_config_init
_dm9161_config_init:                    ; @dm9161_config_init
	.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
Lloh0:
	adrp	x20, _MII_BMCR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MII_BMCR@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _BMCR_ISOLATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BMCR_ISOLATE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_phy_write
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.3:
Lloh5:
	adrp	x8, _MII_DM9161_SCR_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MII_DM9161_SCR_INIT@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _MII_DM9161_SCR_INIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MII_DM9161_SCR_INIT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _MII_DM9161_SCR_RMII@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MII_DM9161_SCR_RMII@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
LBB0_5:
Lloh14:
	adrp	x8, _MII_DM9161_SCR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MII_DM9161_SCR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_write
	tbnz	w0, #31, LBB0_9
; %bb.6:
Lloh17:
	adrp	x8, _MII_DM9161_10BTCSR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MII_DM9161_10BTCSR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _MII_DM9161_10BTCSR_INIT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MII_DM9161_10BTCSR_INIT@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_phy_write
	tbnz	w0, #31, LBB0_9
; %bb.7:
	ldr	w1, [x20]
Lloh23:
	adrp	x8, _BMCR_ANENABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_phy_write
LBB0_8:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_ISOLATE,4,2               ; @BMCR_ISOLATE
	.comm	_MII_DM9161_SCR_INIT,4,2        ; @MII_DM9161_SCR_INIT
	.comm	_MII_DM9161_SCR_RMII,4,2        ; @MII_DM9161_SCR_RMII
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MII_DM9161_SCR,4,2             ; @MII_DM9161_SCR
	.comm	_MII_DM9161_10BTCSR,4,2         ; @MII_DM9161_10BTCSR
	.comm	_MII_DM9161_10BTCSR_INIT,4,2    ; @MII_DM9161_10BTCSR_INIT
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.no_dead_strip	_dm9161_config_init
.subsections_via_symbols
