	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdiobus_register_device        ## -- Begin function mdiobus_register_device
	.p2align	4, 0x90
_mdiobus_register_device:               ## @mdiobus_register_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	16(%rdi), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	movq	%rdi, %rbx
	movq	_MDIO_DEVICE_FLAG_PHY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rdi)
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_mdiobus_register_gpiod
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_mdiobus_register_reset
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mdio_device_reset
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rcx
LBB0_6:
	movq	%rbx, (%rcx,%rax,8)
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MDIO_DEVICE_FLAG_PHY,4,2       ## @MDIO_DEVICE_FLAG_PHY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdiobus_register_device        ; -- Begin function mdiobus_register_device
	.p2align	2
_mdiobus_register_device:               ; @mdiobus_register_device
	.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
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	x9, [x0]
	ldr	x10, [x8, x9, lsl #3]
	cbz	x10, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x19, x0
	ldr	w10, [x0, #8]
Lloh3:
	adrp	x11, _MDIO_DEVICE_FLAG_PHY@GOTPAGE
Lloh4:
	ldr	x11, [x11, _MDIO_DEVICE_FLAG_PHY@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_mdiobus_register_gpiod
	cbnz	w0, LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_mdiobus_register_reset
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_mdio_device_reset
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x9, [x19]
LBB0_6:
	mov	w0, #0
	str	x19, [x8, x9, lsl #3]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MDIO_DEVICE_FLAG_PHY,4,2       ; @MDIO_DEVICE_FLAG_PHY
.subsections_via_symbols
