	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qca8k_sw_probe
_qca8k_sw_probe:                        ## @qca8k_sw_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movl	4(%r14), %eax
	movl	%eax, 32(%rbx)
	movq	%r14, 24(%rbx)
	movq	_GPIOD_ASIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	16(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_4
## %bb.10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_4:
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	$20, %edi
	callq	_msleep
	movq	16(%rbx), %rdi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
LBB0_6:
	movq	_QCA8K_REG_MASK_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qca8k_read
	movq	_QCA8K_MASK_CTRL_ID_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_QCA8K_MASK_CTRL_ID_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_QCA8K_ID_QCA8337@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.8:
	movq	_QCA8K_NUM_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dsa_switch_alloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%rbx, 8(%rax)
	movq	_qca8k_switch_ops@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	12(%rbx), %rdx
	movl	%ecx, 12(%rbx)
	movq	%rdx, (%rax)
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_dev_set_drvdata
	movq	(%rbx), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dsa_register_switch            ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset"

	.comm	_GPIOD_ASIS,4,2                 ## @GPIOD_ASIS
	.comm	_QCA8K_REG_MASK_CTRL,4,2        ## @QCA8K_REG_MASK_CTRL
	.comm	_QCA8K_MASK_CTRL_ID_S,4,2       ## @QCA8K_MASK_CTRL_ID_S
	.comm	_QCA8K_MASK_CTRL_ID_M,4,2       ## @QCA8K_MASK_CTRL_ID_M
	.comm	_QCA8K_ID_QCA8337,4,2           ## @QCA8K_ID_QCA8337
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_QCA8K_NUM_PORTS,4,2            ## @QCA8K_NUM_PORTS
	.comm	_qca8k_switch_ops,4,2           ## @qca8k_switch_ops
	.no_dead_strip	_qca8k_sw_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qca8k_sw_probe
_qca8k_sw_probe:                        ; @qca8k_sw_probe
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	w8, [x19, #4]
	str	w8, [x0, #32]
	str	x19, [x0, #24]
Lloh3:
	adrp	x8, _GPIOD_ASIS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIOD_ASIS@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_optional
	str	x0, [x20, #16]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x20, #16]
	cbz	x8, LBB0_3
; %bb.2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_3:
	cbz	x0, LBB0_5
; %bb.4:
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	mov	w0, #20
	bl	_msleep
	ldr	x0, [x20, #16]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
LBB0_5:
Lloh8:
	adrp	x8, _QCA8K_REG_MASK_CTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QCA8K_REG_MASK_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_qca8k_read
Lloh11:
	adrp	x8, _QCA8K_MASK_CTRL_ID_S@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QCA8K_MASK_CTRL_ID_S@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	asr	w8, w0, w8
Lloh14:
	adrp	x9, _QCA8K_MASK_CTRL_ID_M@GOTPAGE
Lloh15:
	ldr	x9, [x9, _QCA8K_MASK_CTRL_ID_M@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w8, w8, w9
Lloh17:
	adrp	x9, _QCA8K_ID_QCA8337@GOTPAGE
Lloh18:
	ldr	x9, [x9, _QCA8K_ID_QCA8337@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.6:
Lloh20:
	adrp	x8, _QCA8K_NUM_PORTS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _QCA8K_NUM_PORTS@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dsa_switch_alloc
	str	x0, [x20]
	cbz	x0, LBB0_8
; %bb.7:
Lloh23:
	adrp	x8, _qca8k_switch_ops@GOTPAGE
Lloh24:
	ldr	x8, [x8, _qca8k_switch_ops@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	mov	x9, x20
	str	w8, [x9, #12]!
	stp	x9, x20, [x0]
	add	x0, x20, #8
	bl	_mutex_init
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
	ldr	x0, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dsa_register_switch
LBB0_8:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh28:
	adrp	x8, _ENODEV@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset"

	.comm	_GPIOD_ASIS,4,2                 ; @GPIOD_ASIS
	.comm	_QCA8K_REG_MASK_CTRL,4,2        ; @QCA8K_REG_MASK_CTRL
	.comm	_QCA8K_MASK_CTRL_ID_S,4,2       ; @QCA8K_MASK_CTRL_ID_S
	.comm	_QCA8K_MASK_CTRL_ID_M,4,2       ; @QCA8K_MASK_CTRL_ID_M
	.comm	_QCA8K_ID_QCA8337,4,2           ; @QCA8K_ID_QCA8337
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_QCA8K_NUM_PORTS,4,2            ; @QCA8K_NUM_PORTS
	.comm	_qca8k_switch_ops,4,2           ; @qca8k_switch_ops
	.no_dead_strip	_qca8k_sw_probe
.subsections_via_symbols
