	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpc52xx_fec_mdio_probe
_mpc52xx_fec_mdio_probe:                ## @mpc52xx_fec_mdio_probe
	.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, %r12
	movq	(%rdi), %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r13)
	movq	_mpc52xx_fec_mdio_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	movq	_mpc52xx_fec_mdio_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r13)
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_of_address_to_resource
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movl	-48(%rbp), %ebx
	leaq	-48(%rbp), %rdi
	callq	_resource_size
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioremap
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movl	24(%r13), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %ecx
	leaq	L_.str.1(%rip), %rdx
	callq	_snprintf
	movq	%r14, 16(%r13)
	movq	%r12, 8(%r13)
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_dev_set_drvdata
	movq	(%r14), %rbx
	movq	(%r12), %rdi
	callq	_mpc5xxx_get_bus_frequency
	sarl	$20, %eax
	imull	$26215, %eax, %eax              ## imm = 0x6667
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$17, %eax
	addl	%ecx, %eax
	movswl	%ax, %esi
	addl	%esi, %esi
	movq	%rbx, %rdi
	callq	_out_be32
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_of_mdiobus_register
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	callq	_iounmap
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_kfree
	movq	%r13, %rdi
	callq	_mdiobus_free
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mpc52xx MII bus"

	.comm	_mpc52xx_fec_mdio_read,4,2      ## @mpc52xx_fec_mdio_read
	.comm	_mpc52xx_fec_mdio_write,4,2     ## @mpc52xx_fec_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"%x"

	.no_dead_strip	_mpc52xx_fec_mdio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpc52xx_fec_mdio_probe
_mpc52xx_fec_mdio_probe:                ; @mpc52xx_fec_mdio_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x0
	ldr	x21, [x0]
	bl	_mdiobus_alloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.2:
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19]
Lloh5:
	adrp	x8, _mpc52xx_fec_mdio_read@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mpc52xx_fec_mdio_read@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _mpc52xx_fec_mdio_write@GOTPAGE
Lloh9:
	ldr	x9, [x9, _mpc52xx_fec_mdio_write@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #28]
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #0
	bl	_of_address_to_resource
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	w23, [sp, #8]
	add	x0, sp, #8
	bl	_resource_size
	mov	x1, x0
	mov	x0, x23
	bl	_ioremap
	str	x0, [x20]
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w0, [x19, #24]
Lloh11:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w3, [sp, #8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_snprintf
	stp	x22, x20, [x19, #8]
	mov	x0, x22
	mov	x1, x19
	bl	_dev_set_drvdata
	ldr	x23, [x20]
	ldr	x0, [x22]
	bl	_mpc5xxx_get_bus_frequency
	asr	w8, w0, #20
	mov	w9, #26215
	mul	w8, w8, w9
	asr	w9, w8, #17
	add	w8, w9, w8, lsr #31
	lsl	w1, w8, #1
	mov	x0, x23
	bl	_out_be32
	mov	x0, x19
	mov	x1, x21
	bl	_of_mdiobus_register
	mov	x23, x0
	cbz	w0, LBB0_9
; %bb.5:
	ldr	x0, [x20]
	bl	_iounmap
	b	LBB0_8
LBB0_6:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_9
LBB0_7:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_8:
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
	bl	_mdiobus_free
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mpc52xx MII bus"

	.comm	_mpc52xx_fec_mdio_read,4,2      ; @mpc52xx_fec_mdio_read
	.comm	_mpc52xx_fec_mdio_write,4,2     ; @mpc52xx_fec_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"%x"

	.no_dead_strip	_mpc52xx_fec_mdio_probe
.subsections_via_symbols
