	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8723e_dm_rf_saving          ## -- Begin function rtl8723e_dm_rf_saving
	.p2align	4, 0x90
_rtl8723e_dm_rf_saving:                 ## @rtl8723e_dm_rf_saving
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_rtl_priv
	movq	%rax, %r14
	cmpb	$0, _rtl8723e_dm_rf_saving.initialize(%rip)
	jne	LBB0_2
## %bb.1:
	movq	_RFPGA0_XCD_RFINTERFACESW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASKDWORD@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rdi
	callq	_rtl_get_bbreg
	shrl	$14, %eax
	andl	$115, %eax
	movl	%eax, _rtl8723e_dm_rf_saving.reg_874(%rip)
	movq	_ROFDM0_AGCPARAMETER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r12, %rdi
	callq	_rtl_get_bbreg
	movl	%eax, %ebx
	movl	$3, %edi
	callq	_BIT
	andl	%ebx, %eax
	sarl	$3, %eax
	movl	%eax, _rtl8723e_dm_rf_saving.reg_c70(%rip)
	movq	_RFPGA0_XCD_SWITCHCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r12, %rdi
	callq	_rtl_get_bbreg
	shrl	$24, %eax
	movl	%eax, _rtl8723e_dm_rf_saving.reg_85c(%rip)
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	$2676, %esi                     ## imm = 0xA74
	callq	_rtl_get_bbreg
	shrl	$12, %eax
	andl	$15, %eax
	movl	%eax, _rtl8723e_dm_rf_saving.reg_a74(%rip)
	movb	$1, _rtl8723e_dm_rf_saving.initialize(%rip)
LBB0_2:
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.11:
	movq	_RF_NORMAL@GOTPCREL(%rip), %rax
LBB0_12:
	movq	(%rax), %rax
LBB0_13:
	movq	%rax, 16(%r14)
	cmpq	%rax, 8(%r14)
	je	LBB0_18
## %bb.14:
	movq	_RF_SAVE@GOTPCREL(%rip), %rcx
	movq	_RFPGA0_XCD_RFINTERFACESW@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movl	$5, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$1835008, %edx                  ## imm = 0x1C0000
	movl	$2, %ecx
	callq	_rtl_set_bbreg
	movq	_ROFDM0_AGCPARAMETER1@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$3, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_rtl_set_bbreg
	movq	_RFPGA0_XCD_SWITCHCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$-16777216, %edx                ## imm = 0xFF000000
	movl	$99, %ecx
	callq	_rtl_set_bbreg
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$49152, %edx                    ## imm = 0xC000
	movl	$2, %ecx
	callq	_rtl_set_bbreg
	movq	%r12, %rdi
	movl	$2676, %esi                     ## imm = 0xA74
	movl	$61440, %edx                    ## imm = 0xF000
	movl	$3, %ecx
	callq	_rtl_set_bbreg
	movl	$28, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	$2072, %esi                     ## imm = 0x818
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_rtl_set_bbreg
	movl	$28, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	$2072, %esi                     ## imm = 0x818
	movl	%eax, %edx
	movl	$1, %ecx
	jmp	LBB0_17
LBB0_3:
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.4:
	movq	8(%r14), %rax
	movq	_RF_NORMAL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_7
## %bb.5:
	cmpl	$30, %ecx
	jl	LBB0_13
## %bb.6:
	movq	_RF_SAVE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_16:
	movl	_rtl8723e_dm_rf_saving.reg_874(%rip), %ecx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$1884160, %edx                  ## imm = 0x1CC000
	callq	_rtl_set_bbreg
	movq	_ROFDM0_AGCPARAMETER1@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$3, %edi
	callq	_BIT
	movl	_rtl8723e_dm_rf_saving.reg_c70(%rip), %ecx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_rtl_set_bbreg
	movq	_RFPGA0_XCD_SWITCHCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	_rtl8723e_dm_rf_saving.reg_85c(%rip), %ecx
	movq	%r12, %rdi
	movl	$-16777216, %edx                ## imm = 0xFF000000
	callq	_rtl_set_bbreg
	movl	_rtl8723e_dm_rf_saving.reg_a74(%rip), %ecx
	movq	%r12, %rdi
	movl	$2676, %esi                     ## imm = 0xA74
	movl	$61440, %edx                    ## imm = 0xF000
	callq	_rtl_set_bbreg
	movl	$28, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	$2072, %esi                     ## imm = 0x818
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_rtl_set_bbreg
	movl	(%r13), %ebx
	movl	$5, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
LBB0_17:
	callq	_rtl_set_bbreg
	movq	16(%r14), %rax
	movq	%rax, 8(%r14)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_RF_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	cmpl	$26, %ecx
	jl	LBB0_9
## %bb.8:
	movq	_RF_SAVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
LBB0_9:
	movq	%rdx, %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.initialize,1,2 ## @rtl8723e_dm_rf_saving.initialize
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.reg_874,4,2 ## @rtl8723e_dm_rf_saving.reg_874
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.reg_c70,4,2 ## @rtl8723e_dm_rf_saving.reg_c70
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.reg_85c,4,2 ## @rtl8723e_dm_rf_saving.reg_85c
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.reg_a74,4,2 ## @rtl8723e_dm_rf_saving.reg_a74
	.comm	_RFPGA0_XCD_RFINTERFACESW,4,2   ## @RFPGA0_XCD_RFINTERFACESW
	.comm	_MASKDWORD,4,2                  ## @MASKDWORD
	.comm	_ROFDM0_AGCPARAMETER1,4,2       ## @ROFDM0_AGCPARAMETER1
	.comm	_RFPGA0_XCD_SWITCHCONTROL,4,2   ## @RFPGA0_XCD_SWITCHCONTROL
	.comm	_RF_NORMAL,8,3                  ## @RF_NORMAL
	.comm	_RF_SAVE,8,3                    ## @RF_SAVE
	.comm	_RF_MAX,8,3                     ## @RF_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8723e_dm_rf_saving          ; -- Begin function rtl8723e_dm_rf_saving
	.p2align	2
_rtl8723e_dm_rf_saving:                 ; @rtl8723e_dm_rf_saving
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x20, x0
	bl	_rtl_priv
	mov	x19, x0
	adrp	x24, _rtl8723e_dm_rf_saving.initialize@PAGE
	ldrb	w8, [x24, _rtl8723e_dm_rf_saving.initialize@PAGEOFF]
Lloh0:
	adrp	x23, _RFPGA0_XCD_RFINTERFACESW@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RFPGA0_XCD_RFINTERFACESW@GOTPAGEOFF]
	tbnz	w8, #0, LBB0_2
; %bb.1:
	ldr	w1, [x23]
Lloh2:
	adrp	x25, _MASKDWORD@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MASKDWORD@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	x0, x20
	bl	_rtl_get_bbreg
	mov	w8, #115
	and	w8, w8, w0, lsr #14
	adrp	x9, _rtl8723e_dm_rf_saving.reg_874@PAGE
	str	w8, [x9, _rtl8723e_dm_rf_saving.reg_874@PAGEOFF]
Lloh4:
	adrp	x8, _ROFDM0_AGCPARAMETER1@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ROFDM0_AGCPARAMETER1@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w2, [x25]
	mov	x0, x20
	bl	_rtl_get_bbreg
	mov	x22, x0
	mov	w0, #3
	bl	_BIT
	and	w8, w0, w22
	asr	w8, w8, #3
	adrp	x9, _rtl8723e_dm_rf_saving.reg_c70@PAGE
	str	w8, [x9, _rtl8723e_dm_rf_saving.reg_c70@PAGEOFF]
Lloh7:
	adrp	x8, _RFPGA0_XCD_SWITCHCONTROL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RFPGA0_XCD_SWITCHCONTROL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x25]
	mov	x0, x20
	bl	_rtl_get_bbreg
	lsr	w8, w0, #24
	adrp	x9, _rtl8723e_dm_rf_saving.reg_85c@PAGE
	str	w8, [x9, _rtl8723e_dm_rf_saving.reg_85c@PAGEOFF]
	ldr	w2, [x25]
	mov	x0, x20
	mov	w1, #2676
	bl	_rtl_get_bbreg
	ubfx	w8, w0, #12, #4
	adrp	x9, _rtl8723e_dm_rf_saving.reg_a74@PAGE
	str	w8, [x9, _rtl8723e_dm_rf_saving.reg_a74@PAGEOFF]
	mov	w8, #1
	strb	w8, [x24, _rtl8723e_dm_rf_saving.initialize@PAGEOFF]
LBB0_2:
	cbz	w21, LBB0_8
; %bb.3:
Lloh10:
	adrp	x8, _RF_NORMAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RF_NORMAL@GOTPAGEOFF]
LBB0_4:
	ldr	x8, [x8]
LBB0_5:
	str	x8, [x19, #16]
	ldr	x9, [x19, #8]
	cmp	x9, x8
	b.eq	LBB0_13
; %bb.6:
Lloh12:
	adrp	x9, _RF_SAVE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RF_SAVE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w21, [x23]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
	mov	w0, #5
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #1
	bl	_rtl_set_bbreg
	ldr	w1, [x23]
	mov	x0, x20
	mov	w2, #1835008
	mov	w3, #2
	bl	_rtl_set_bbreg
Lloh15:
	adrp	x8, _ROFDM0_AGCPARAMETER1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ROFDM0_AGCPARAMETER1@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
	mov	w0, #3
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	bl	_rtl_set_bbreg
Lloh18:
	adrp	x8, _RFPGA0_XCD_SWITCHCONTROL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RFPGA0_XCD_SWITCHCONTROL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #-16777216
	mov	w3, #99
	bl	_rtl_set_bbreg
	ldr	w1, [x23]
	mov	x0, x20
	mov	w2, #49152
	mov	w3, #2
	bl	_rtl_set_bbreg
	mov	x0, x20
	mov	w1, #2676
	mov	w2, #61440
	mov	w3, #3
	bl	_rtl_set_bbreg
	mov	w0, #28
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	w1, #2072
	mov	w3, #0
	bl	_rtl_set_bbreg
	mov	w0, #28
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	w1, #2072
	mov	w3, #1
	b	LBB0_12
LBB0_8:
	ldr	w8, [x19]
	cbz	w8, LBB0_14
; %bb.9:
	ldr	x9, [x19, #8]
Lloh21:
	adrp	x10, _RF_NORMAL@GOTPAGE
Lloh22:
	ldr	x10, [x10, _RF_NORMAL@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_15
; %bb.10:
Lloh24:
	adrp	x10, _RF_SAVE@GOTPAGE
Lloh25:
	ldr	x10, [x10, _RF_SAVE@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	cmp	w8, #29
	csel	x8, x10, x9, gt
	b	LBB0_5
LBB0_11:
Lloh27:
	adrp	x8, _rtl8723e_dm_rf_saving.reg_874@PAGE
Lloh28:
	ldr	w3, [x8, _rtl8723e_dm_rf_saving.reg_874@PAGEOFF]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #49152
	movk	w2, #28, lsl #16
	bl	_rtl_set_bbreg
Lloh29:
	adrp	x8, _ROFDM0_AGCPARAMETER1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ROFDM0_AGCPARAMETER1@GOTPAGEOFF]
Lloh31:
	ldr	w21, [x8]
	mov	w0, #3
	bl	_BIT
	mov	x2, x0
Lloh32:
	adrp	x8, _rtl8723e_dm_rf_saving.reg_c70@PAGE
Lloh33:
	ldr	w3, [x8, _rtl8723e_dm_rf_saving.reg_c70@PAGEOFF]
	mov	x0, x20
	mov	x1, x21
	bl	_rtl_set_bbreg
Lloh34:
	adrp	x8, _RFPGA0_XCD_SWITCHCONTROL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _RFPGA0_XCD_SWITCHCONTROL@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	adrp	x8, _rtl8723e_dm_rf_saving.reg_85c@PAGE
Lloh38:
	ldr	w3, [x8, _rtl8723e_dm_rf_saving.reg_85c@PAGEOFF]
	mov	x0, x20
	mov	w2, #-16777216
	bl	_rtl_set_bbreg
Lloh39:
	adrp	x8, _rtl8723e_dm_rf_saving.reg_a74@PAGE
Lloh40:
	ldr	w3, [x8, _rtl8723e_dm_rf_saving.reg_a74@PAGEOFF]
	mov	x0, x20
	mov	w1, #2676
	mov	w2, #61440
	bl	_rtl_set_bbreg
	mov	w0, #28
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	w1, #2072
	mov	w3, #0
	bl	_rtl_set_bbreg
	ldr	w21, [x23]
	mov	w0, #5
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
LBB0_12:
	bl	_rtl_set_bbreg
	ldr	x8, [x19, #16]
	str	x8, [x19, #8]
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh41:
	adrp	x8, _RF_MAX@GOTPAGE
Lloh42:
	ldr	x8, [x8, _RF_MAX@GOTPAGEOFF]
	b	LBB0_4
LBB0_15:
Lloh43:
	adrp	x9, _RF_SAVE@GOTPAGE
Lloh44:
	ldr	x9, [x9, _RF_SAVE@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	w8, #26
	csel	x8, x10, x9, lt
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdr	Lloh39, Lloh40
	.loh AdrpLdr	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdr	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdr	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.initialize,1,2 ; @rtl8723e_dm_rf_saving.initialize
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.reg_874,4,2 ; @rtl8723e_dm_rf_saving.reg_874
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.reg_c70,4,2 ; @rtl8723e_dm_rf_saving.reg_c70
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.reg_85c,4,2 ; @rtl8723e_dm_rf_saving.reg_85c
.zerofill __DATA,__bss,_rtl8723e_dm_rf_saving.reg_a74,4,2 ; @rtl8723e_dm_rf_saving.reg_a74
	.comm	_RFPGA0_XCD_RFINTERFACESW,4,2   ; @RFPGA0_XCD_RFINTERFACESW
	.comm	_MASKDWORD,4,2                  ; @MASKDWORD
	.comm	_ROFDM0_AGCPARAMETER1,4,2       ; @ROFDM0_AGCPARAMETER1
	.comm	_RFPGA0_XCD_SWITCHCONTROL,4,2   ; @RFPGA0_XCD_SWITCHCONTROL
	.comm	_RF_NORMAL,8,3                  ; @RF_NORMAL
	.comm	_RF_SAVE,8,3                    ; @RF_SAVE
	.comm	_RF_MAX,8,3                     ; @RF_MAX
.subsections_via_symbols
