	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rtl88ee_smart_antenna
__rtl88ee_smart_antenna:                ## @_rtl88ee_smart_antenna
	.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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_rtl_priv
	movl	%eax, %edi
	callq	_rtl_dm
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_rtl_priv
	movl	%eax, %edi
	callq	_rtl_efuse
	movq	(%rax), %rax
	movq	_CG_TRX_SMART_ANTDIV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	(%r15), %rax
	movq	_FAT_TRAINING_STATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.2:
	cmpq	$0, 16(%r14)
	je	LBB0_8
## %bb.3:
	movl	8(%r15), %eax
	movl	12(%r15), %ecx
	shll	$2, %eax
	addl	%ecx, %ecx
	orl	%eax, %ecx
	orl	16(%r15), %ecx
	movslq	%ecx, %rax
	movl	(%r14), %ecx
	movq	32(%r15), %rdx
	addl	%ecx, (%rdx,%rax,4)
	movq	24(%r15), %rcx
	incl	(%rcx,%rax,4)
	jmp	LBB0_8
LBB0_4:
	movq	_CG_TRX_HW_ANTDIV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_CGCS_RX_HW_ANTDIV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 16(%r14)
	jne	LBB0_9
## %bb.7:
	cmpq	$0, 8(%r14)
	je	LBB0_8
LBB0_9:
	movl	8(%r15), %eax
	movl	12(%r15), %ecx
	shll	$2, %eax
	addl	%ecx, %ecx
	orl	%eax, %ecx
	orl	16(%r15), %ecx
	movslq	%ecx, %rsi
	movl	(%r14), %ecx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl88e_dm_ant_sel_statistics   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CG_TRX_SMART_ANTDIV,8,3        ## @CG_TRX_SMART_ANTDIV
	.comm	_FAT_TRAINING_STATE,8,3         ## @FAT_TRAINING_STATE
	.comm	_CG_TRX_HW_ANTDIV,8,3           ## @CG_TRX_HW_ANTDIV
	.comm	_CGCS_RX_HW_ANTDIV,8,3          ## @CGCS_RX_HW_ANTDIV
	.no_dead_strip	__rtl88ee_smart_antenna
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _rtl88ee_smart_antenna
__rtl88ee_smart_antenna:                ; @_rtl88ee_smart_antenna
	.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, x1
	mov	x21, x0
	bl	_rtl_priv
	bl	_rtl_dm
	mov	x20, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_efuse
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CG_TRX_SMART_ANTDIV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CG_TRX_SMART_ANTDIV@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _FAT_TRAINING_STATE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FAT_TRAINING_STATE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.3:
	ldp	w8, w9, [x20, #8]
	lsl	w9, w9, #1
	orr	w8, w9, w8, lsl #2
	ldr	w9, [x20, #16]
	orr	w8, w8, w9
	ldr	w9, [x19]
	sbfiz	x8, x8, #2, #32
	ldp	x11, x10, [x20, #24]
	ldr	w12, [x10, x8]
	add	w9, w12, w9
	str	w9, [x10, x8]
	ldr	w9, [x11, x8]
	add	w9, w9, #1
	str	w9, [x11, x8]
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x9, _CG_TRX_HW_ANTDIV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CG_TRX_HW_ANTDIV@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _CGCS_RX_HW_ANTDIV@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CGCS_RX_HW_ANTDIV@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.5:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
LBB0_7:
	ldp	w8, w9, [x20, #8]
	lsl	w9, w9, #1
	orr	w8, w9, w8, lsl #2
	ldr	w9, [x20, #16]
	orr	w8, w8, w9
	sxtw	x1, w8
	ldr	w3, [x19]
	mov	x0, x21
	mov	w2, #0
	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
	b	_rtl88e_dm_ant_sel_statistics
LBB0_8:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CG_TRX_SMART_ANTDIV,8,3        ; @CG_TRX_SMART_ANTDIV
	.comm	_FAT_TRAINING_STATE,8,3         ; @FAT_TRAINING_STATE
	.comm	_CG_TRX_HW_ANTDIV,8,3           ; @CG_TRX_HW_ANTDIV
	.comm	_CGCS_RX_HW_ANTDIV,8,3          ; @CGCS_RX_HW_ANTDIV
	.no_dead_strip	__rtl88ee_smart_antenna
.subsections_via_symbols
