	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esw_probe
_esw_probe:                             ## @esw_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, %r14
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rax, %r12
	movq	(%r14), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$88, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r13
	movq	%r14, 80(%rax)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_irq_of_parse_and_map
	movl	%eax, 20(%r13)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 76(%r13)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	76(%r13), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, (%r13)
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, 4(%r13)
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, 8(%r13)
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, 12(%r13)
LBB0_14:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, 16(%r13)
LBB0_16:
	leaq	24(%r13), %r12
	movq	(%r14), %rax
	movq	%rax, 64(%r13)
	leaq	L_.str.5(%rip), %rax
	movq	%rax, 24(%r13)
	leaq	L_.str.6(%rip), %rax
	movq	%rax, 32(%r13)
	movq	_RT305X_ESW_PORT6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r13)
	movq	_RT305X_ESW_NUM_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r13)
	movq	_RT305X_ESW_NUM_VIDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r13)
	movq	_esw_ops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r13)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_register_switch
	testl	%eax, %eax
	js	LBB0_22
## %bb.17:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_platform_set_drvdata
	movq	%r13, %rdi
	addq	$72, %rdi
	callq	_spin_lock_init
	movq	%r13, %rdi
	callq	_esw_hw_init
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movl	(%rax), %edi
	callq	_be32_to_cpu
	cmpl	$1, %eax
	jne	LBB0_20
## %bb.19:
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r12, %rdi
	callq	_unregister_switch
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_set_drvdata
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_20:
	movl	20(%r13), %esi
	movq	_esw_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.10(%rip), %r8
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	movq	%r13, %r9
	callq	_devm_request_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.21:
	movq	_RT305X_ESW_PORT_ST_CHG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_RT305X_ESW_REG_ISR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_esw_w32
	movl	(%rbx), %esi
	notl	%esi
	movq	_RT305X_ESW_REG_IMR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_esw_w32
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_22:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mediatek,portmap"

L_.str.1:                               ## @.str.1
	.asciz	"mediatek,portdisable"

L_.str.2:                               ## @.str.2
	.asciz	"ralink,fct2"

L_.str.3:                               ## @.str.3
	.asciz	"ralink,fpa2"

L_.str.4:                               ## @.str.4
	.asciz	"mediatek,led_polarity"

L_.str.5:                               ## @.str.5
	.asciz	"rt305x-esw"

L_.str.6:                               ## @.str.6
	.asciz	"rt305x"

	.comm	_RT305X_ESW_PORT6,4,2           ## @RT305X_ESW_PORT6
	.comm	_RT305X_ESW_NUM_PORTS,4,2       ## @RT305X_ESW_NUM_PORTS
	.comm	_RT305X_ESW_NUM_VIDS,4,2        ## @RT305X_ESW_NUM_VIDS
	.comm	_esw_ops,4,2                    ## @esw_ops
L_.str.7:                               ## @.str.7
	.asciz	"register_switch failed\n"

L_.str.8:                               ## @.str.8
	.asciz	"ralink,rgmii"

L_.str.9:                               ## @.str.9
	.asciz	"RGMII mode, not exporting switch device.\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_esw_interrupt,4,2              ## @esw_interrupt
L_.str.10:                              ## @.str.10
	.asciz	"esw"

	.comm	_RT305X_ESW_PORT_ST_CHG,4,2     ## @RT305X_ESW_PORT_ST_CHG
	.comm	_RT305X_ESW_REG_ISR,4,2         ## @RT305X_ESW_REG_ISR
	.comm	_RT305X_ESW_REG_IMR,4,2         ## @RT305X_ESW_REG_IMR
	.no_dead_strip	_esw_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esw_probe
_esw_probe:                             ; @esw_probe
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_platform_get_resource
	mov	x22, x0
	ldr	x21, [x19]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #88
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #80]
	mov	x0, x21
	mov	w1, #0
	bl	_irq_of_parse_and_map
	str	w0, [x20, #20]
	mov	x0, x19
	mov	x1, x22
	bl	_devm_ioremap_resource
	str	w0, [x20, #76]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w0, [x20, #76]
	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_3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_5:
	mov	x0, x23
	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_6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x0]
	bl	_be32_to_cpu
	str	w0, [x20]
LBB0_8:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w0, [x0]
	bl	_be32_to_cpu
	str	w0, [x20, #4]
LBB0_10:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w0, [x0]
	bl	_be32_to_cpu
	str	w0, [x20, #8]
LBB0_12:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w0, [x0]
	bl	_be32_to_cpu
	str	w0, [x20, #12]
LBB0_14:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_16
; %bb.15:
	ldr	w0, [x0]
	bl	_be32_to_cpu
	str	w0, [x20, #16]
LBB0_16:
Lloh18:
	adrp	x8, l_.str.5@PAGE
Lloh19:
	add	x8, x8, l_.str.5@PAGEOFF
	mov	x22, x20
	str	x8, [x22, #24]!
	ldr	x8, [x19]
	str	x8, [x22, #40]
Lloh20:
	adrp	x8, l_.str.6@PAGE
Lloh21:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh22:
	adrp	x9, _RT305X_ESW_PORT6@GOTPAGE
Lloh23:
	ldr	x9, [x9, _RT305X_ESW_PORT6@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	str	w9, [x22, #32]
Lloh25:
	adrp	x9, _RT305X_ESW_NUM_PORTS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _RT305X_ESW_NUM_PORTS@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
Lloh28:
	adrp	x10, _RT305X_ESW_NUM_VIDS@GOTPAGE
Lloh29:
	ldr	x10, [x10, _RT305X_ESW_NUM_VIDS@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	stp	w10, w9, [x22, #24]
Lloh31:
	adrp	x9, _esw_ops@GOTPAGE
Lloh32:
	ldr	x9, [x9, _esw_ops@GOTPAGEOFF]
	stp	x8, x9, [x22, #8]
	mov	x0, x22
	mov	x1, #0
	bl	_register_switch
	tbnz	w0, #31, LBB0_22
; %bb.17:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	add	x0, x20, #72
	bl	_spin_lock_init
	mov	x0, x20
	bl	_esw_hw_init
Lloh33:
	adrp	x1, l_.str.8@PAGE
Lloh34:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_20
; %bb.18:
	ldr	w0, [x0]
	bl	_be32_to_cpu
	cmp	w0, #1
	b.ne	LBB0_20
; %bb.19:
Lloh35:
	adrp	x1, l_.str.9@PAGE
Lloh36:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x22
	bl	_unregister_switch
	mov	x0, x19
	mov	x1, #0
	bl	_platform_set_drvdata
Lloh37:
	adrp	x8, _ENODEV@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_4
LBB0_20:
	ldr	w1, [x20, #20]
Lloh39:
	adrp	x8, _esw_interrupt@GOTPAGE
Lloh40:
	ldr	x8, [x8, _esw_interrupt@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
Lloh42:
	adrp	x4, l_.str.10@PAGE
Lloh43:
	add	x4, x4, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	w3, #0
	mov	x5, x20
	bl	_devm_request_irq
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.21:
Lloh44:
	adrp	x19, _RT305X_ESW_PORT_ST_CHG@GOTPAGE
Lloh45:
	ldr	x19, [x19, _RT305X_ESW_PORT_ST_CHG@GOTPAGEOFF]
	ldr	w1, [x19]
Lloh46:
	adrp	x8, _RT305X_ESW_REG_ISR@GOTPAGE
Lloh47:
	ldr	x8, [x8, _RT305X_ESW_REG_ISR@GOTPAGEOFF]
Lloh48:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_esw_w32
	ldr	w8, [x19]
	mvn	w1, w8
Lloh49:
	adrp	x8, _RT305X_ESW_REG_IMR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _RT305X_ESW_REG_IMR@GOTPAGEOFF]
Lloh51:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_esw_w32
	b	LBB0_5
LBB0_22:
	mov	x23, x0
Lloh52:
	adrp	x1, l_.str.7@PAGE
Lloh53:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mediatek,portmap"

l_.str.1:                               ; @.str.1
	.asciz	"mediatek,portdisable"

l_.str.2:                               ; @.str.2
	.asciz	"ralink,fct2"

l_.str.3:                               ; @.str.3
	.asciz	"ralink,fpa2"

l_.str.4:                               ; @.str.4
	.asciz	"mediatek,led_polarity"

l_.str.5:                               ; @.str.5
	.asciz	"rt305x-esw"

l_.str.6:                               ; @.str.6
	.asciz	"rt305x"

	.comm	_RT305X_ESW_PORT6,4,2           ; @RT305X_ESW_PORT6
	.comm	_RT305X_ESW_NUM_PORTS,4,2       ; @RT305X_ESW_NUM_PORTS
	.comm	_RT305X_ESW_NUM_VIDS,4,2        ; @RT305X_ESW_NUM_VIDS
	.comm	_esw_ops,4,2                    ; @esw_ops
l_.str.7:                               ; @.str.7
	.asciz	"register_switch failed\n"

l_.str.8:                               ; @.str.8
	.asciz	"ralink,rgmii"

l_.str.9:                               ; @.str.9
	.asciz	"RGMII mode, not exporting switch device.\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_esw_interrupt,4,2              ; @esw_interrupt
l_.str.10:                              ; @.str.10
	.asciz	"esw"

	.comm	_RT305X_ESW_PORT_ST_CHG,4,2     ; @RT305X_ESW_PORT_ST_CHG
	.comm	_RT305X_ESW_REG_ISR,4,2         ; @RT305X_ESW_REG_ISR
	.comm	_RT305X_ESW_REG_IMR,4,2         ; @RT305X_ESW_REG_IMR
	.no_dead_strip	_esw_probe
.subsections_via_symbols
