	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7530_sw_detect
_mt7530_sw_detect:                      ## @mt7530_sw_detect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	_CHIP_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mt753x_reg_read
	movq	_CHIP_NAME_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	movq	_CHIP_NAME_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	movq	_MT7530@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_3
## %bb.1:
	xorl	%ecx, %ecx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.2:
	movq	_CHIP_REV_M@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	movl	%eax, (%rbx)
	leaq	L_.str(%rip), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_4
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_4:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_REV,4,2                   ## @CHIP_REV
	.comm	_CHIP_NAME_M,4,2                ## @CHIP_NAME_M
	.comm	_CHIP_NAME_S,4,2                ## @CHIP_NAME_S
	.comm	_MT7530,4,2                     ## @MT7530
	.comm	_CHIP_REV_M,4,2                 ## @CHIP_REV_M
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MT7530"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_mt7530_sw_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7530_sw_detect
_mt7530_sw_detect:                      ; @mt7530_sw_detect
	.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, x1
Lloh0:
	adrp	x8, _CHIP_REV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHIP_REV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mt753x_reg_read
Lloh3:
	adrp	x8, _CHIP_NAME_M@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHIP_NAME_M@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _CHIP_NAME_S@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHIP_NAME_S@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh9:
	adrp	x9, _MT7530@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MT7530@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	mov	w8, #0
	cbz	x19, LBB0_4
; %bb.2:
Lloh12:
	adrp	x9, _CHIP_REV_M@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CHIP_REV_M@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w9, w9, w0
	str	w9, [x19]
Lloh15:
	adrp	x9, l_.str@PAGE
Lloh16:
	add	x9, x9, l_.str@PAGEOFF
	str	x9, [x19, #8]
	b	LBB0_4
LBB0_3:
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_4:
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_REV,4,2                   ; @CHIP_REV
	.comm	_CHIP_NAME_M,4,2                ; @CHIP_NAME_M
	.comm	_CHIP_NAME_S,4,2                ; @CHIP_NAME_S
	.comm	_MT7530,4,2                     ; @MT7530
	.comm	_CHIP_REV_M,4,2                 ; @CHIP_REV_M
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MT7530"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_mt7530_sw_detect
.subsections_via_symbols
