	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mdiobus_register             ## -- Begin function __mdiobus_register
	.p2align	4, 0x90
___mdiobus_register:                    ## @__mdiobus_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r15
	cmpq	$0, 56(%rdi)
	je	LBB0_4
## %bb.2:
	cmpq	$0, 104(%r15)
	je	LBB0_4
## %bb.3:
	cmpq	$0, 96(%r15)
	je	LBB0_4
## %bb.5:
	movq	%rsi, %rbx
	movq	(%r15), %rax
	movq	_MDIOBUS_ALLOCATED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%cl
	movq	_MDIOBUS_UNREGISTERED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_BUG_ON
	movq	%rbx, 88(%r15)
	movl	76(%r15), %edx
	movl	84(%r15), %eax
	leaq	16(%r15), %r14
	movl	%eax, 32(%r15)
	movq	_mdio_bus_class@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r15)
	movq	$0, 16(%r15)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_set_name
	movq	%r14, %rdi
	callq	_device_register
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	76(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	80(%r15), %rdi
	callq	_mutex_init
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.28:
	movl	76(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_device_del
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_8:
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:
	movq	%rbx, 40(%r15)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	72(%r15), %edi
	callq	_udelay
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
LBB0_10:
	movq	64(%r15), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	callq	*%rax
LBB0_12:
	movq	_PHY_MAX_ADDR@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_26
## %bb.13:
	xorl	%r12d, %r12d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%r12
	cmpl	(%r13), %r12d
	jge	LBB0_26
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%r15), %eax
	btl	%r12d, %eax
	jb	LBB0_25
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_mdiobus_scan
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_25
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_25
## %bb.17:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	testl	%r12d, %r12d
	je	LBB0_22
## %bb.18:
	incq	%r12
	jmp	LBB0_19
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	decq	%r12
	cmpq	$1, %r12
	jbe	LBB0_22
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r15), %rax
	movq	-16(%rax,%r12,8), %r13
	testq	%r13, %r13
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r13, %rdi
	callq	*8(%r13)
	movq	%r13, %rdi
	callq	*(%r13)
	jmp	LBB0_21
LBB0_26:
	movq	_mdiobus_create_device@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mdiobus_setup_mdiodev_from_board_info
	movq	_MDIOBUS_REGISTERED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	56(%r15), %rsi
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_info
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_22:
	movq	40(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
LBB0_24:
	movq	%r14, %rdi
	callq	_device_del
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MDIOBUS_ALLOCATED,8,3          ## @MDIOBUS_ALLOCATED
	.comm	_MDIOBUS_UNREGISTERED,8,3       ## @MDIOBUS_UNREGISTERED
	.comm	_mdio_bus_class,4,2             ## @mdio_bus_class
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"mii_bus %s failed to register\n"

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

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
L_.str.3:                               ## @.str.3
	.asciz	"mii_bus %s couldn't get reset GPIO\n"

	.comm	_PHY_MAX_ADDR,4,2               ## @PHY_MAX_ADDR
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_mdiobus_create_device,4,2      ## @mdiobus_create_device
	.comm	_MDIOBUS_REGISTERED,8,3         ## @MDIOBUS_REGISTERED
L_.str.4:                               ## @.str.4
	.asciz	"%s: probed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mdiobus_register             ; -- Begin function __mdiobus_register
	.p2align	2
___mdiobus_register:                    ; @__mdiobus_register
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #56]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x8, [x19, #104]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x21, x1
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _MDIOBUS_ALLOCATED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MDIOBUS_ALLOCATED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x9, _MDIOBUS_UNREGISTERED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MDIOBUS_UNREGISTERED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, ne
	bl	_BUG_ON
	mov	x20, x19
	str	xzr, [x20, #16]!
	str	x21, [x20, #72]
	ldr	w8, [x20, #68]
	str	w8, [x20, #16]
Lloh6:
	adrp	x8, _mdio_bus_class@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mdio_bus_class@GOTPAGEOFF]
	str	x8, [x20, #8]
	ldr	w2, [x20, #60]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_set_name
	mov	x0, x20
	bl	_device_register
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w1, [x19, #76]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	add	x0, x19, #80
	bl	_mutex_init
Lloh15:
	adrp	x8, _GPIOD_OUT_LOW@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GPIOD_OUT_LOW@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_devm_gpiod_get_optional
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w2, [x19, #76]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x20
	bl	_device_del
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_10:
	cbz	x21, LBB0_12
; %bb.11:
	str	x21, [x19, #40]
	mov	x0, x21
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	ldr	w0, [x19, #72]
	bl	_udelay
	mov	x0, x21
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
LBB0_12:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x19
	blr	x8
LBB0_14:
Lloh22:
	adrp	x23, _PHY_MAX_ADDR@GOTPAGE
Lloh23:
	ldr	x23, [x23, _PHY_MAX_ADDR@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.15:
	mov	x22, #0
Lloh24:
	adrp	x24, _ENODEV@GOTPAGE
Lloh25:
	ldr	x24, [x24, _ENODEV@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x23]
	add	x22, x22, #1
	cmp	w22, w8
	b.ge	LBB0_25
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #8]
	lsr	w8, w8, w22
	tbnz	w8, #0, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_mdiobus_scan
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x21
	bl	_PTR_ERR
	ldr	w8, [x24]
	cmn	w0, w8
	b.eq	LBB0_16
; %bb.20:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x21, x0
	cbz	w22, LBB0_26
; %bb.21:
	sub	x23, x22, #1
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x8, x23, #1
	sub	x23, x23, #1
	cmp	x8, #1
	b.ls	LBB0_26
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #48]
	ldr	x22, [x8, x23, lsl #3]
	cbz	x22, LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x8, [x22, #8]
	mov	x0, x22
	blr	x8
	ldr	x8, [x22]
	mov	x0, x22
	blr	x8
	b	LBB0_22
LBB0_25:
Lloh26:
	adrp	x8, _mdiobus_create_device@GOTPAGE
Lloh27:
	ldr	x8, [x8, _mdiobus_create_device@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mdiobus_setup_mdiodev_from_board_info
Lloh29:
	adrp	x8, _MDIOBUS_REGISTERED@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MDIOBUS_REGISTERED@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	str	x8, [x19]
	ldr	x1, [x19, #56]
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_info
	mov	w21, #0
	b	LBB0_7
LBB0_26:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_28
; %bb.27:
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
LBB0_28:
	mov	x0, x20
	bl	_device_del
	b	LBB0_7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MDIOBUS_ALLOCATED,8,3          ; @MDIOBUS_ALLOCATED
	.comm	_MDIOBUS_UNREGISTERED,8,3       ; @MDIOBUS_UNREGISTERED
	.comm	_mdio_bus_class,4,2             ; @mdio_bus_class
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"mii_bus %s failed to register\n"

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

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
l_.str.3:                               ; @.str.3
	.asciz	"mii_bus %s couldn't get reset GPIO\n"

	.comm	_PHY_MAX_ADDR,4,2               ; @PHY_MAX_ADDR
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_mdiobus_create_device,4,2      ; @mdiobus_create_device
	.comm	_MDIOBUS_REGISTERED,8,3         ; @MDIOBUS_REGISTERED
l_.str.4:                               ; @.str.4
	.asciz	"%s: probed\n"

.subsections_via_symbols
