	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_axienet_mdio_setup             ## -- Begin function axienet_mdio_setup
	.p2align	4, 0x90
_axienet_mdio_setup:                    ## @axienet_mdio_setup
	.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
	callq	_axienet_mdio_enable
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movl	32(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r14), %rcx
	leaq	L_.str(%rip), %rdx
	callq	_snprintf
	movq	%r14, 24(%rbx)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rbx)
	movq	_axienet_mdio_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_axienet_mdio_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	8(%r14), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, (%r14)
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_of_get_child_by_name
	movq	%rax, %r13
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_of_mdiobus_register
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_of_node_put
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_mdiobus_free
	movq	$0, (%r14)
	movl	%r12d, %r15d
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %r15d
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_6:
	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
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"axienet-%.8llx"

L_.str.1:                               ## @.str.1
	.asciz	"Xilinx Axi Ethernet MDIO"

	.comm	_axienet_mdio_read,4,2          ## @axienet_mdio_read
	.comm	_axienet_mdio_write,4,2         ## @axienet_mdio_write
L_.str.2:                               ## @.str.2
	.asciz	"mdio"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_axienet_mdio_setup             ; -- Begin function axienet_mdio_setup
	.p2align	2
_axienet_mdio_setup:                    ; @axienet_mdio_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_axienet_mdio_enable
	tbnz	w0, #31, LBB0_4
; %bb.1:
	bl	_mdiobus_alloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	w0, [x0, #32]
Lloh0:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x3, [x19, #16]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_snprintf
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh7:
	adrp	x9, _axienet_mdio_read@GOTPAGE
Lloh8:
	ldr	x9, [x9, _axienet_mdio_read@GOTPAGEOFF]
	str	x19, [x20, #24]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _axienet_mdio_write@GOTPAGE
Lloh11:
	ldr	x10, [x10, _axienet_mdio_write@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	stp	w10, w9, [x20, #16]
	ldr	x9, [x19, #8]
	stp	x8, x9, [x20]
	str	x20, [x19]
	ldr	w0, [x9]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_of_get_child_by_name
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	bl	_of_mdiobus_register
	mov	x21, x0
	mov	x0, x22
	bl	_of_node_put
	cbz	w21, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_mdiobus_free
	str	xzr, [x19]
	b	LBB0_6
LBB0_4:
	mov	x21, x0
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"axienet-%.8llx"

l_.str.1:                               ; @.str.1
	.asciz	"Xilinx Axi Ethernet MDIO"

	.comm	_axienet_mdio_read,4,2          ; @axienet_mdio_read
	.comm	_axienet_mdio_write,4,2         ; @axienet_mdio_write
l_.str.2:                               ; @.str.2
	.asciz	"mdio"

.subsections_via_symbols
