	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r8169_mdio_register
_r8169_mdio_register:                   ## @r8169_mdio_register
	.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	%rdi, %r14
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_devm_mdiobus_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	movq	%r14, 40(%rbx)
	movq	%r15, 32(%rbx)
	movq	_PHY_IGNORE_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	16(%rbx), %r12d
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r15, %rdi
	callq	_pci_dev_id
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %ecx
	callq	_snprintf
	movq	_r8169_mdio_read_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_r8169_mdio_write_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_mdiobus_register
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_mdiobus_get_phy
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %edi
	callq	_phy_suspend
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	%rbx, %rdi
	callq	_mdiobus_unregister
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r8169"

	.comm	_PHY_IGNORE_INTERRUPT,4,2       ## @PHY_IGNORE_INTERRUPT
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"r8169-%x"

	.comm	_r8169_mdio_read_reg,4,2        ## @r8169_mdio_read_reg
	.comm	_r8169_mdio_write_reg,4,2       ## @r8169_mdio_write_reg
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_r8169_mdio_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r8169_mdio_register
_r8169_mdio_register:                   ; @r8169_mdio_register
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x21, [x0, #8]
	mov	x0, x21
	bl	_devm_mdiobus_alloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0]
	stp	x21, x19, [x0, #32]
Lloh2:
	adrp	x8, _PHY_IGNORE_INTERRUPT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PHY_IGNORE_INTERRUPT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [x0, #24]
	str	w8, [x9]
	ldr	w22, [x0, #16]
Lloh5:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	mov	x0, x21
	bl	_pci_dev_id
	mov	x3, x0
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	bl	_snprintf
Lloh10:
	adrp	x8, _r8169_mdio_read_reg@GOTPAGE
Lloh11:
	ldr	x8, [x8, _r8169_mdio_read_reg@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _r8169_mdio_write_reg@GOTPAGE
Lloh14:
	ldr	x9, [x9, _r8169_mdio_write_reg@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #8]
	mov	x0, x20
	bl	_mdiobus_register
	cbnz	w0, LBB0_7
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	bl	_mdiobus_get_phy
	str	w0, [x19]
	cbz	w0, LBB0_5
; %bb.3:
	bl	_phy_suspend
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_mdiobus_unregister
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r8169"

	.comm	_PHY_IGNORE_INTERRUPT,4,2       ; @PHY_IGNORE_INTERRUPT
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"r8169-%x"

	.comm	_r8169_mdio_read_reg,4,2        ; @r8169_mdio_read_reg
	.comm	_r8169_mdio_write_reg,4,2       ; @r8169_mdio_write_reg
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_r8169_mdio_register
.subsections_via_symbols
