	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcmgenet_mii_register
_bcmgenet_mii_register:                 ## @bcmgenet_mii_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
	subq	$104, %rsp
	.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), %rbx
	movq	8(%rbx), %r15
	movq	24(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rax, %r12
	leaq	-144(%rbp), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_bcmgenet_mii_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	%r14, -64(%rbp)
	leaq	L_.str(%rip), %rax
	movq	%rax, -96(%rbp)
	movq	_GENET_UMAC_OFF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	16(%r12), %rax
	movq	_UMAC_MDIO_CMD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rax,%rcx), %rdx
	movq	%rdx, -128(%rbp)
	leaq	8(%rcx,%rax), %rax
	movq	%rax, -120(%rbp)
	movl	(%r13), %eax
	movl	%eax, -136(%rbp)
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_alias_get_id
	movl	%eax, %esi
	jmp	LBB0_3
LBB0_2:
	movl	(%rbx), %esi
LBB0_3:
	movq	_UNIMAC_MDIO_DRV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_platform_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	addq	$8, %rbx
	movq	%rax, (%r14)
	movq	%rbx, 16(%rax)
	movq	%r14, %rdi
	callq	_bcmgenet_mii_of_find_mdio
	movq	%rax, 8(%r15)
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_7
## %bb.6:
	leaq	-96(%rbp), %rsi
	movq	%r14, %rdi
	callq	_bcmgenet_mii_pdata_init
LBB0_7:
	leaq	-144(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_platform_device_add_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	leaq	-96(%rbp), %rsi
	movq	%r15, %rdi
	movl	$48, %edx
	callq	_platform_device_add_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	callq	_platform_device_add
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	%r15, %rdi
	callq	_platform_device_put
	jmp	LBB0_12
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_bcmgenet_mii_wait,4,2          ## @bcmgenet_mii_wait
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bcmgenet MII bus"

	.comm	_GENET_UMAC_OFF,8,3             ## @GENET_UMAC_OFF
	.comm	_UMAC_MDIO_CMD,8,3              ## @UMAC_MDIO_CMD
L_.str.1:                               ## @.str.1
	.asciz	"eth"

	.comm	_UNIMAC_MDIO_DRV_NAME,4,2       ## @UNIMAC_MDIO_DRV_NAME
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_bcmgenet_mii_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcmgenet_mii_register
_bcmgenet_mii_register:                 ; @bcmgenet_mii_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x21, [x0, #8]
	mov	x24, x21
	ldr	x20, [x24, #8]!
	ldr	x23, [x21, #24]
Lloh0:
	adrp	x25, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x21
	mov	w2, #0
	bl	_platform_get_resource
	mov	x22, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh2:
	adrp	x8, _bcmgenet_mii_wait@GOTPAGE
Lloh3:
	ldr	x8, [x8, _bcmgenet_mii_wait@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #88]
Lloh5:
	adrp	x8, l_.str@PAGE
Lloh6:
	add	x8, x8, l_.str@PAGEOFF
	str	x19, [sp, #80]
	str	x8, [sp, #48]
Lloh7:
	adrp	x8, _GENET_UMAC_OFF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GENET_UMAC_OFF@GOTPAGEOFF]
	ldr	x9, [x22, #16]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x10, _UMAC_MDIO_CMD@GOTPAGE
Lloh11:
	ldr	x10, [x10, _UMAC_MDIO_CMD@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	add	x8, x8, x9
	add	x8, x8, x10
	add	x9, x8, #8
	stp	x8, x9, [sp, #16]
	ldr	w8, [x25]
	str	w8, [sp, #8]
	cbz	x20, LBB0_2
; %bb.1:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_of_alias_get_id
	mov	x1, x0
	b	LBB0_3
LBB0_2:
	ldr	w1, [x21]
LBB0_3:
Lloh15:
	adrp	x8, _UNIMAC_MDIO_DRV_NAME@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UNIMAC_MDIO_DRV_NAME@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_platform_device_alloc
	cbz	x0, LBB0_10
; %bb.4:
	mov	x20, x0
	str	x0, [x19]
	str	x24, [x0, #16]
	mov	x0, x19
	bl	_bcmgenet_mii_of_find_mdio
	str	x0, [x20, #8]
	cbz	x23, LBB0_6
; %bb.5:
	add	x1, sp, #48
	mov	x0, x19
	bl	_bcmgenet_mii_pdata_init
LBB0_6:
	mov	x1, sp
	mov	x0, x20
	mov	w2, #1
	bl	_platform_device_add_resources
	mov	x19, x0
	cbnz	w0, LBB0_9
; %bb.7:
	add	x1, sp, #48
	mov	x0, x20
	mov	w2, #48
	bl	_platform_device_add_data
	mov	x19, x0
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_platform_device_add
	mov	x19, x0
	cbz	w0, LBB0_11
LBB0_9:
	mov	x0, x20
	bl	_platform_device_put
	b	LBB0_11
LBB0_10:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_bcmgenet_mii_wait,4,2          ; @bcmgenet_mii_wait
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bcmgenet MII bus"

	.comm	_GENET_UMAC_OFF,8,3             ; @GENET_UMAC_OFF
	.comm	_UMAC_MDIO_CMD,8,3              ; @UMAC_MDIO_CMD
l_.str.1:                               ; @.str.1
	.asciz	"eth"

	.comm	_UNIMAC_MDIO_DRV_NAME,4,2       ; @UNIMAC_MDIO_DRV_NAME
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_bcmgenet_mii_register
.subsections_via_symbols
