	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcma_mdio_mii_register         ## -- Begin function bcma_mdio_mii_register
	.p2align	4, 0x90
_bcma_mdio_mii_register:                ## @bcma_mdio_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	movl	48(%rbx), %edi
	movq	8(%r14), %rax
	movl	(%rax), %ecx
	movl	(%r14), %r8d
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	callq	_sprintf
	movq	%r15, 40(%rbx)
	movq	_bcma_mdio_mii_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_bcma_mdio_mii_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_bcma_mdio_phy_reset@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	addq	$4, %r14
	movq	%r14, 16(%rbx)
	movb	(%r15), %cl
	movl	$-2, %eax
	roll	%cl, %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_mdiobus_register
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_mdiobus_free
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_4:
	movl	%r12d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bcma_mdio mii bus"

L_.str.1:                               ## @.str.1
	.asciz	"%s-%d-%d"

L_.str.2:                               ## @.str.2
	.asciz	"bcma_mdio"

	.comm	_bcma_mdio_mii_read,4,2         ## @bcma_mdio_mii_read
	.comm	_bcma_mdio_mii_write,4,2        ## @bcma_mdio_mii_write
	.comm	_bcma_mdio_phy_reset,4,2        ## @bcma_mdio_phy_reset
L_.str.3:                               ## @.str.3
	.asciz	"Registration of mii bus failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcma_mdio_mii_register         ; -- Begin function bcma_mdio_mii_register
	.p2align	2
_bcma_mdio_mii_register:                ; @bcma_mdio_mii_register
	.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, x0
	ldr	x21, [x0, #8]
	bl	_mdiobus_alloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0]
	ldr	w0, [x0, #48]
	ldr	x8, [x21, #8]
	ldr	w3, [x8]
	ldr	w4, [x21], #4
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh4:
	adrp	x2, l_.str.2@PAGE
Lloh5:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_sprintf
Lloh6:
	adrp	x8, _bcma_mdio_mii_read@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bcma_mdio_mii_read@GOTPAGEOFF]
	str	x20, [x19, #40]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh9:
	adrp	x8, _bcma_mdio_mii_write@GOTPAGE
Lloh10:
	ldr	x8, [x8, _bcma_mdio_mii_write@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _bcma_mdio_phy_reset@GOTPAGE
Lloh13:
	ldr	x9, [x9, _bcma_mdio_phy_reset@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
	str	x21, [x19, #16]
	ldr	w8, [x20]
	mov	w9, #1
	lsl	w8, w9, w8
	mvn	w8, w8
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_mdiobus_register
	cbz	w0, LBB0_5
; %bb.2:
	mov	x20, x0
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	x0, x19
	bl	_mdiobus_free
	b	LBB0_4
LBB0_3:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	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
	b	_ERR_PTR
LBB0_5:
	mov	x0, x19
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bcma_mdio mii bus"

l_.str.1:                               ; @.str.1
	.asciz	"%s-%d-%d"

l_.str.2:                               ; @.str.2
	.asciz	"bcma_mdio"

	.comm	_bcma_mdio_mii_read,4,2         ; @bcma_mdio_mii_read
	.comm	_bcma_mdio_mii_write,4,2        ; @bcma_mdio_mii_write
	.comm	_bcma_mdio_phy_reset,4,2        ; @bcma_mdio_phy_reset
l_.str.3:                               ; @.str.3
	.asciz	"Registration of mii bus failed\n"

.subsections_via_symbols
