	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8xxxu_gen1_enable_rf        ## -- Begin function rtl8xxxu_gen1_enable_rf
	.p2align	4, 0x90
_rtl8xxxu_gen1_enable_rf:               ## @rtl8xxxu_gen1_enable_rf
	.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
	movq	%rdi, %r14
	movq	_REG_SPS0_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_rtl8xxxu_read8
	movl	%eax, %r15d
	xorl	%edi, %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	$3, %edi
	callq	_BIT
	orl	%eax, %ebx
	orl	%r15d, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_rtl8xxxu_write8
	movq	_REG_FPGA0_XAB_RF_PARM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_read32
	movl	%eax, %r15d
	movl	$4, %edi
	callq	_BIT
	movl	%eax, %r12d
	movl	$5, %edi
	callq	_BIT
	movl	%eax, %ebx
	orl	%r12d, %ebx
	notl	%ebx
	andl	%r15d, %ebx
	movl	$3, %edi
	callq	_BIT
	movl	%eax, %r15d
	orl	%ebx, %r15d
	cmpl	$2, (%r14)
	jne	LBB0_2
## %bb.1:
	movl	$20, %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	$21, %edi
	callq	_BIT
	orl	%ebx, %eax
	notl	%eax
	andl	%eax, %r15d
	movl	$19, %edi
	callq	_BIT
	orl	%eax, %r15d
LBB0_2:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_rtl8xxxu_write32
	movq	_REG_OFDM0_TRX_PATH_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_read32
	movq	_OFDM_RF_PATH_TX_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	cmpl	$2, 4(%r14)
	jne	LBB0_4
## %bb.3:
	movq	_OFDM_RF_PATH_TX_A@GOTPCREL(%rip), %rax
	movq	_OFDM_RF_PATH_TX_B@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	jmp	LBB0_9
LBB0_4:
	movq	8(%r14), %rax
	movq	_RTL8192C@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_6
## %bb.5:
	movq	_RTL8191C@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_6
## %bb.7:
	movq	_OFDM_RF_PATH_TX_A@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_OFDM_RF_PATH_TX_B@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %edx
LBB0_9:
	orl	%ecx, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_write32
	movq	_REG_FPGA0_RF_MODE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_read32
	movq	_FPGA_RF_MODE_JAPAN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_write32
	cmpl	$2, (%r14)
	movq	_REG_RX_WAIT_CCA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1675306400, %eax               ## imm = 0x63DB25A0
	movl	$1662723488, %edx               ## imm = 0x631B25A0
	cmovel	%eax, %edx
	movq	%r14, %rdi
	callq	_rtl8xxxu_write32
	movq	_RF_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF6052_REG_AC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$208277, %ecx                   ## imm = 0x32D95
	callq	_rtl8xxxu_write_rfreg
	cmpl	$2, (%r14)
	jne	LBB0_11
## %bb.10:
	movq	_RF_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$208277, %ecx                   ## imm = 0x32D95
	callq	_rtl8xxxu_write_rfreg
LBB0_11:
	movq	_REG_TXPAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl8xxxu_write8                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_SPS0_CTRL,4,2              ## @REG_SPS0_CTRL
	.comm	_REG_FPGA0_XAB_RF_PARM,4,2      ## @REG_FPGA0_XAB_RF_PARM
	.comm	_REG_OFDM0_TRX_PATH_ENABLE,4,2  ## @REG_OFDM0_TRX_PATH_ENABLE
	.comm	_OFDM_RF_PATH_TX_MASK,4,2       ## @OFDM_RF_PATH_TX_MASK
	.comm	_OFDM_RF_PATH_TX_A,4,2          ## @OFDM_RF_PATH_TX_A
	.comm	_OFDM_RF_PATH_TX_B,4,2          ## @OFDM_RF_PATH_TX_B
	.comm	_RTL8192C,8,3                   ## @RTL8192C
	.comm	_RTL8191C,8,3                   ## @RTL8191C
	.comm	_REG_FPGA0_RF_MODE,4,2          ## @REG_FPGA0_RF_MODE
	.comm	_FPGA_RF_MODE_JAPAN,4,2         ## @FPGA_RF_MODE_JAPAN
	.comm	_REG_RX_WAIT_CCA,4,2            ## @REG_RX_WAIT_CCA
	.comm	_RF_A,4,2                       ## @RF_A
	.comm	_RF6052_REG_AC,4,2              ## @RF6052_REG_AC
	.comm	_RF_B,4,2                       ## @RF_B
	.comm	_REG_TXPAUSE,4,2                ## @REG_TXPAUSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8xxxu_gen1_enable_rf        ; -- Begin function rtl8xxxu_gen1_enable_rf
	.p2align	2
_rtl8xxxu_gen1_enable_rf:               ; @rtl8xxxu_gen1_enable_rf
	.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
Lloh0:
	adrp	x22, _REG_SPS0_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_SPS0_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_rtl8xxxu_read8
	mov	x20, x0
	mov	w0, #0
	bl	_BIT
	mov	x21, x0
	mov	w0, #3
	bl	_BIT
	orr	w8, w21, w20
	orr	w2, w8, w0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl8xxxu_write8
Lloh2:
	adrp	x22, _REG_FPGA0_XAB_RF_PARM@GOTPAGE
Lloh3:
	ldr	x22, [x22, _REG_FPGA0_XAB_RF_PARM@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl8xxxu_read32
	mov	x20, x0
	mov	w0, #4
	bl	_BIT
	mov	x21, x0
	mov	w0, #5
	bl	_BIT
	orr	w8, w0, w21
	bic	w20, w20, w8
	mov	w0, #3
	bl	_BIT
	orr	w20, w20, w0
	ldr	w8, [x19]
	cmp	w8, #2
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #20
	bl	_BIT
	mov	x21, x0
	mov	w0, #21
	bl	_BIT
	orr	w8, w0, w21
	bic	w20, w20, w8
	mov	w0, #19
	bl	_BIT
	orr	w20, w20, w0
LBB0_2:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_rtl8xxxu_write32
Lloh4:
	adrp	x20, _REG_OFDM0_TRX_PATH_ENABLE@GOTPAGE
Lloh5:
	ldr	x20, [x20, _REG_OFDM0_TRX_PATH_ENABLE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl8xxxu_read32
Lloh6:
	adrp	x8, _OFDM_RF_PATH_TX_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OFDM_RF_PATH_TX_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	bic	w8, w0, w8
	ldr	w9, [x19, #4]
	cmp	w9, #2
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x9, _OFDM_RF_PATH_TX_A@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OFDM_RF_PATH_TX_A@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _OFDM_RF_PATH_TX_B@GOTPAGE
Lloh13:
	ldr	x10, [x10, _OFDM_RF_PATH_TX_B@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w10, w9
	b	LBB0_9
LBB0_4:
	ldr	x9, [x19, #8]
Lloh15:
	adrp	x10, _RTL8192C@GOTPAGE
Lloh16:
	ldr	x10, [x10, _RTL8192C@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_7
; %bb.5:
Lloh18:
	adrp	x10, _RTL8191C@GOTPAGE
Lloh19:
	ldr	x10, [x10, _RTL8191C@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_7
; %bb.6:
Lloh21:
	adrp	x9, _OFDM_RF_PATH_TX_A@GOTPAGE
Lloh22:
	ldr	x9, [x9, _OFDM_RF_PATH_TX_A@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh23:
	adrp	x9, _OFDM_RF_PATH_TX_B@GOTPAGE
Lloh24:
	ldr	x9, [x9, _OFDM_RF_PATH_TX_B@GOTPAGEOFF]
LBB0_8:
	ldr	w9, [x9]
LBB0_9:
	orr	w2, w9, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl8xxxu_write32
Lloh25:
	adrp	x20, _REG_FPGA0_RF_MODE@GOTPAGE
Lloh26:
	ldr	x20, [x20, _REG_FPGA0_RF_MODE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl8xxxu_read32
Lloh27:
	adrp	x8, _FPGA_RF_MODE_JAPAN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FPGA_RF_MODE_JAPAN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl8xxxu_write32
Lloh30:
	adrp	x8, _REG_RX_WAIT_CCA@GOTPAGE
Lloh31:
	ldr	x8, [x8, _REG_RX_WAIT_CCA@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh32:
	ldr	w1, [x8]
	mov	w8, #9632
	movk	w8, #25371, lsl #16
	orr	w10, w8, #0xc00000
	cmp	w9, #2
	csel	w2, w10, w8, eq
	mov	x0, x19
	bl	_rtl8xxxu_write32
Lloh33:
	adrp	x8, _RF_A@GOTPAGE
Lloh34:
	ldr	x8, [x8, _RF_A@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x20, _RF6052_REG_AC@GOTPAGE
Lloh37:
	ldr	x20, [x20, _RF6052_REG_AC@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #11669
	movk	w3, #3, lsl #16
	bl	_rtl8xxxu_write_rfreg
	ldr	w8, [x19]
	cmp	w8, #2
	b.ne	LBB0_11
; %bb.10:
Lloh38:
	adrp	x8, _RF_B@GOTPAGE
Lloh39:
	ldr	x8, [x8, _RF_B@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #11669
	movk	w3, #3, lsl #16
	bl	_rtl8xxxu_write_rfreg
LBB0_11:
Lloh41:
	adrp	x8, _REG_TXPAUSE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _REG_TXPAUSE@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x19
	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	_rtl8xxxu_write8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_SPS0_CTRL,4,2              ; @REG_SPS0_CTRL
	.comm	_REG_FPGA0_XAB_RF_PARM,4,2      ; @REG_FPGA0_XAB_RF_PARM
	.comm	_REG_OFDM0_TRX_PATH_ENABLE,4,2  ; @REG_OFDM0_TRX_PATH_ENABLE
	.comm	_OFDM_RF_PATH_TX_MASK,4,2       ; @OFDM_RF_PATH_TX_MASK
	.comm	_OFDM_RF_PATH_TX_A,4,2          ; @OFDM_RF_PATH_TX_A
	.comm	_OFDM_RF_PATH_TX_B,4,2          ; @OFDM_RF_PATH_TX_B
	.comm	_RTL8192C,8,3                   ; @RTL8192C
	.comm	_RTL8191C,8,3                   ; @RTL8191C
	.comm	_REG_FPGA0_RF_MODE,4,2          ; @REG_FPGA0_RF_MODE
	.comm	_FPGA_RF_MODE_JAPAN,4,2         ; @FPGA_RF_MODE_JAPAN
	.comm	_REG_RX_WAIT_CCA,4,2            ; @REG_RX_WAIT_CCA
	.comm	_RF_A,4,2                       ; @RF_A
	.comm	_RF6052_REG_AC,4,2              ; @RF6052_REG_AC
	.comm	_RF_B,4,2                       ; @RF_B
	.comm	_REG_TXPAUSE,4,2                ; @REG_TXPAUSE
.subsections_via_symbols
