	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vsc73xx_probe                  ## -- Begin function vsc73xx_probe
	.p2align	4, 0x90
_vsc73xx_probe:                         ## @vsc73xx_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, 24(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%rbx), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.3:
	movl	$20, %edi
	callq	_msleep
LBB0_4:
	movq	%rbx, %rdi
	callq	_vsc73xx_detect
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	addl	(%rcx), %edx
	jne	LBB0_6
## %bb.5:
	movq	16(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%rbx), %rdi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	$10, %edi
	movl	$100, %esi
	callq	_usleep_range
	movq	24(%rbx), %rdi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_vsc73xx_detect
LBB0_6:
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	8(%rbx), %rdi
	callq	_eth_random_addr
	movq	8(%rbx), %rax
	movq	16(%rbx), %rdi
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	movl	8(%rax), %r8d
	movl	12(%rax), %r9d
	movl	16(%rax), %r10d
	movl	20(%rax), %eax
	leaq	L_.str.4(%rip), %rsi
	pushq	%rax
	pushq	%r10
	callq	_dev_info
	addq	$16, %rsp
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_dsa_switch_alloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	%rbx, 8(%rax)
	movq	_vsc73xx_ds_ops@GOTPCREL(%rip), %rcx
	movq	%rcx, (%rax)
	movq	%rax, %rdi
	callq	_dsa_register_switch
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_14:
	movq	%rbx, %rdi
	callq	_vsc73xx_gpio_probe
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r15d
	movq	(%rbx), %rdi
	callq	_dsa_unregister_switch
	jmp	LBB0_9
LBB0_16:
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset"

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
L_.str.1:                               ## @.str.1
	.asciz	"failed to get RESET GPIO\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"Chip seems to be out of control. Assert reset and try again.\n"

L_.str.3:                               ## @.str.3
	.asciz	"no chip found (%d)\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.4:                               ## @.str.4
	.asciz	"MAC for control frames: %02X:%02X:%02X:%02X:%02X:%02X\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vsc73xx_ds_ops,4,2             ## @vsc73xx_ds_ops
L_.str.5:                               ## @.str.5
	.asciz	"unable to register switch (%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vsc73xx_probe                  ; -- Begin function vsc73xx_probe
	.p2align	2
_vsc73xx_probe:                         ; @vsc73xx_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x8, _GPIOD_OUT_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIOD_OUT_LOW@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_devm_gpiod_get_optional
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #24]
	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
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w0, #20
	bl	_msleep
LBB0_4:
	mov	x0, x19
	bl	_vsc73xx_detect
                                        ; kill: def $w0 killed $w0 def $x0
Lloh7:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_6
; %bb.5:
	ldr	x0, [x19, #16]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19, #24]
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	mov	w0, #10
	mov	w1, #100
	bl	_usleep_range
	ldr	x0, [x19, #24]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	mov	w0, #20
	bl	_msleep
	mov	x0, x19
	bl	_vsc73xx_detect
                                        ; kill: def $w0 killed $w0 def $x0
LBB0_6:
	cbz	w0, LBB0_10
; %bb.7:
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	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
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_eth_random_addr
	ldp	x8, x0, [x19, #8]
	ldp	w2, w3, [x8]
	ldp	w4, w5, [x8, #8]
	ldp	w6, w7, [x8, #16]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
	mov	x0, x20
	mov	w1, #8
	bl	_dsa_switch_alloc
	str	x0, [x19]
	cbz	x0, LBB0_13
; %bb.11:
Lloh18:
	adrp	x8, _vsc73xx_ds_ops@GOTPAGE
Lloh19:
	ldr	x8, [x8, _vsc73xx_ds_ops@GOTPAGEOFF]
	stp	x8, x19, [x0]
	bl	_dsa_register_switch
	cbz	w0, LBB0_14
; %bb.12:
	mov	x21, x0
	str	x21, [sp]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_9
LBB0_13:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_14:
	mov	x0, x19
	bl	_vsc73xx_gpio_probe
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.15:
	ldr	x0, [x19]
	bl	_dsa_unregister_switch
	b	LBB0_9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset"

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
l_.str.1:                               ; @.str.1
	.asciz	"failed to get RESET GPIO\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"Chip seems to be out of control. Assert reset and try again.\n"

l_.str.3:                               ; @.str.3
	.asciz	"no chip found (%d)\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.4:                               ; @.str.4
	.asciz	"MAC for control frames: %02X:%02X:%02X:%02X:%02X:%02X\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vsc73xx_ds_ops,4,2             ; @vsc73xx_ds_ops
l_.str.5:                               ; @.str.5
	.asciz	"unable to register switch (%d)\n"

.subsections_via_symbols
