	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mdio_init
_sh_mdio_init:                          ## @sh_mdio_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	24(%rdi), %rbx
	leaq	12(%rbx), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	8(%r12), %rcx
	movq	_PIR@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	addq	16(%r12), %rcx
	movq	%rcx, 16(%rax)
	movl	16(%r15), %ecx
	movl	%ecx, 8(%rax)
	movq	_bb_ops@GOTPCREL(%rip), %rcx
	movq	%rcx, (%rax)
	movq	%rax, %rdi
	callq	_alloc_mdio_bitbang
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rcx
	movq	%rcx, (%rax)
	movq	%r14, 24(%rax)
	movl	16(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rcx
	movl	8(%rbx), %r8d
	leaq	L_.str.1(%rip), %rdx
	callq	_snprintf
	movq	(%r15), %rax
	movq	(%r12), %rdi
	testq	%rax, %rax
	jle	LBB0_5
## %bb.4:
	movq	8(%rdi), %rcx
	movq	8(%r15), %rdx
	movq	%rax, (%rcx,%rdx,8)
LBB0_5:
	movl	(%r14), %esi
	callq	_of_mdiobus_register
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movq	(%r12), %rdi
	callq	_free_mdio_bitbang
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PIR,8,3                        ## @PIR
	.comm	_bb_ops,4,2                     ## @bb_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sh_mii"

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

	.no_dead_strip	_sh_mdio_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_mdio_init
_sh_mdio_init:                          ; @sh_mdio_init
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #24]
	add	x21, x22, #12
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	ldp	x9, x8, [x19, #8]
Lloh3:
	adrp	x10, _PIR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PIR@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	add	x8, x9, x8
	str	x8, [x0, #16]
	ldr	w8, [x20, #16]
	str	w8, [x0, #8]
Lloh6:
	adrp	x8, _bb_ops@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bb_ops@GOTPAGEOFF]
	str	x8, [x0]
	bl	_alloc_mdio_bitbang
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.2:
Lloh8:
	adrp	x8, l_.str@PAGE
Lloh9:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0]
	str	x21, [x0, #24]
	ldr	w0, [x0, #16]
Lloh10:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x3, [x22]
	ldr	w4, [x22, #8]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_snprintf
	ldr	x8, [x20]
	ldr	x0, [x19]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.3:
	ldr	x9, [x0, #8]
	ldr	x10, [x20, #8]
	str	x8, [x9, x10, lsl #3]
LBB0_4:
	ldr	w1, [x21]
	bl	_of_mdiobus_register
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	x0, [x19]
	bl	_free_mdio_bitbang
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PIR,8,3                        ; @PIR
	.comm	_bb_ops,4,2                     ; @bb_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sh_mii"

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

	.no_dead_strip	_sh_mdio_init
.subsections_via_symbols
