	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_probe_rt
_rt2800_probe_rt:                       ## @rt2800_probe_rt
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$137, %esi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_MAC_CSR0@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MAC_CSR0_3290@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2800_register_read
	movl	%eax, %ebx
	movq	_MAC_CSR0_CHIPSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field32
	movl	%eax, %r12d
	movq	_MAC_CSR0_REVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field32
	movl	%eax, %r14d
	movl	%r12d, %eax
	andl	$-16, %eax
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.5:
	cmpl	$130, %r12d
	jne	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	callq	_rt2x00_is_soc
	movl	$130, %r12d
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_RT6352@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_8:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_rt2x00_set_rt
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	callq	_rt2x00_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_CSR0_3290,4,2              ## @MAC_CSR0_3290
	.comm	_MAC_CSR0,4,2                   ## @MAC_CSR0
	.comm	_MAC_CSR0_CHIPSET,4,2           ## @MAC_CSR0_CHIPSET
	.comm	_MAC_CSR0_REVISION,4,2          ## @MAC_CSR0_REVISION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid RT chipset 0x%04x, rev %04x detected\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_RT6352,4,2                     ## @RT6352
	.no_dead_strip	_rt2800_probe_rt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_probe_rt
_rt2800_probe_rt:                       ; @rt2800_probe_rt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	w1, #137
	bl	_rt2x00_rt
Lloh0:
	adrp	x8, _MAC_CSR0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAC_CSR0@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MAC_CSR0_3290@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAC_CSR0_3290@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2800_register_read
	mov	x20, x0
Lloh4:
	adrp	x8, _MAC_CSR0_CHIPSET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MAC_CSR0_CHIPSET@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_rt2x00_get_field32
	mov	x21, x0
Lloh7:
	adrp	x8, _MAC_CSR0_REVISION@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAC_CSR0_REVISION@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field32
	mov	x20, x0
	and	w8, w21, #0xfffffff0
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
	cmp	w21, #130
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_rt2x00_is_soc
Lloh10:
	adrp	x8, _RT6352@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RT6352@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	x0, #0
	mov	w9, #130
	csel	w21, w9, w8, eq
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_rt2x00_set_rt
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_rt2x00_err
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_CSR0_3290,4,2              ; @MAC_CSR0_3290
	.comm	_MAC_CSR0,4,2                   ; @MAC_CSR0
	.comm	_MAC_CSR0_CHIPSET,4,2           ; @MAC_CSR0_CHIPSET
	.comm	_MAC_CSR0_REVISION,4,2          ; @MAC_CSR0_REVISION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid RT chipset 0x%04x, rev %04x detected\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_RT6352,4,2                     ; @RT6352
	.no_dead_strip	_rt2800_probe_rt
.subsections_via_symbols
