	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function _rtl92s_write_ofdm_powerreg
LCPI0_0:
	.long	127                             ## 0x7f
	.long	127                             ## 0x7f
	.long	127                             ## 0x7f
	.long	127                             ## 0x7f
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
__rtl92s_write_ofdm_powerreg:           ## @_rtl92s_write_ofdm_powerreg
	.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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_rtl_priv
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_efuse
	movq	(%rbx), %rcx
	movq	_RF_2T2R@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.1:
	movq	(%rax), %rax
	movl	(%rax), %esi
	cmpl	$7, %esi
	jle	LBB0_2
## %bb.7:
	movl	$16, %eax
	subl	%esi, %eax
	movq	_RF6052_MAX_TX_PWR@GOTPCREL(%rip), %rcx
	movl	%r12d, %edx
	shrl	$8, %edx
	movl	%r12d, %esi
	shrl	$16, %esi
	movd	%r12d, %xmm0
	shrl	$24, %r12d
	pinsrd	$1, %esi, %xmm0
	pinsrd	$2, %edx, %xmm0
	pinsrd	$3, %r12d, %xmm0
	pand	LCPI0_0(%rip), %xmm0
	movd	(%rcx), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	pshufd	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	pminsd	%xmm0, %xmm1
	movd	%eax, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	pmaxsd	%xmm1, %xmm0
	jmp	LBB0_8
LBB0_4:
	movl	%r12d, %eax
	shrl	$8, %eax
	movl	%r12d, %ecx
	shrl	$16, %ecx
	movd	%r12d, %xmm1
	shrl	$24, %r12d
	pinsrd	$1, %ecx, %xmm1
	pinsrd	$2, %eax, %xmm1
	pinsrd	$3, %r12d, %xmm1
	pand	LCPI0_0(%rip), %xmm1
	movq	_RF6052_MAX_TX_PWR@GOTPCREL(%rip), %rax
	movd	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	jmp	LBB0_5
LBB0_2:
	movq	_RF6052_MAX_TX_PWR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %eax
	andl	$127, %eax
	cmpl	%ecx, %eax
	cmovgel	%ecx, %eax
	testl	%esi, %esi
	jle	LBB0_3
## %bb.6:
	movl	%ecx, %edx
	subl	%esi, %edx
	movl	%r12d, %esi
	shrl	$8, %esi
	andl	$127, %esi
	cmpl	%ecx, %esi
	cmovgel	%ecx, %esi
	movl	%r12d, %edi
	shrl	$16, %edi
	andl	$127, %edi
	cmpl	%ecx, %edi
	cmovgel	%ecx, %edi
	shrl	$24, %r12d
	andl	$127, %r12d
	cmpl	%ecx, %r12d
	cmovgel	%ecx, %r12d
	movd	%eax, %xmm1
	pinsrd	$1, %edi, %xmm1
	pinsrd	$2, %esi, %xmm1
	pinsrd	$3, %r12d, %xmm1
	movd	%edx, %xmm0
LBB0_5:
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	pminsd	%xmm1, %xmm0
LBB0_8:
	pextrd	$3, %xmm0, %eax
	shll	$24, %eax
	pextrd	$1, %xmm0, %edx
	shll	$16, %edx
	orl	%eax, %edx
	pextrd	$2, %xmm0, %eax
	shll	$8, %eax
	movd	%xmm0, %ecx
	orl	%eax, %ecx
	orl	%edx, %ecx
	movslq	%r14d, %rax
	leaq	l___const._rtl92s_write_ofdm_powerreg.regoffset(%rip), %rdx
	movl	(%rdx,%rax,4), %esi
	movq	%r15, %rdi
	movl	$2139062143, %edx               ## imm = 0x7F7F7F7F
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl_set_bbreg                  ## TAILCALL
LBB0_3:
	movl	%r12d, %edx
	shrl	$8, %edx
	andl	$127, %edx
	cmpl	%ecx, %edx
	cmovgel	%ecx, %edx
	movl	%r12d, %esi
	shrl	$16, %esi
	andl	$127, %esi
	cmpl	%ecx, %esi
	cmovgel	%ecx, %esi
	shrl	$24, %r12d
	andl	$127, %r12d
	cmpl	%ecx, %r12d
	cmovgel	%ecx, %r12d
	movd	%eax, %xmm0
	pinsrd	$1, %esi, %xmm0
	pinsrd	$2, %edx, %xmm0
	pinsrd	$3, %r12d, %xmm0
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const._rtl92s_write_ofdm_powerreg.regoffset
l___const._rtl92s_write_ofdm_powerreg.regoffset:
	.long	3584                            ## 0xe00
	.long	3588                            ## 0xe04
	.long	3600                            ## 0xe10
	.long	3604                            ## 0xe14
	.long	3608                            ## 0xe18
	.long	3612                            ## 0xe1c

	.comm	_RF_2T2R,8,3                    ## @RF_2T2R
	.comm	_RF6052_MAX_TX_PWR,4,2          ## @RF6052_MAX_TX_PWR
	.no_dead_strip	__rtl92s_write_ofdm_powerreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function _rtl92s_write_ofdm_powerreg
lCPI0_0:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967288                      ; 0xfffffff8
lCPI0_1:
	.long	16                              ; 0x10
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
__rtl92s_write_ofdm_powerreg:           ; @_rtl92s_write_ofdm_powerreg
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_rtl_priv
	mov	x22, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_efuse
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _RF_2T2R@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RF_2T2R@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x0]
	ldr	w10, [x8]
	cmp	w10, #7
	b.le	LBB0_5
; %bb.2:
	mov	w8, #16
Lloh3:
	adrp	x9, _RF6052_MAX_TX_PWR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RF6052_MAX_TX_PWR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w11, w21, #0x7f
	cmp	w11, w9
	csel	w11, w11, w9, lt
	sub	w10, w8, w10
	cmp	w11, w10
	csel	w8, w11, w10, gt
	dup.2s	v0, w21
Lloh6:
	adrp	x11, lCPI0_0@PAGE
Lloh7:
	ldr	d1, [x11, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi.2s	v1, #127
	and.8b	v0, v0, v1
	dup.2s	v1, w9
	smin.2s	v0, v0, v1
	dup.2s	v1, w10
	smax.2s	v0, v0, v1
	ubfx	w11, w21, #24, #7
	cmp	w11, w9
	csel	w9, w11, w9, lt
	cmp	w9, w10
	csel	w9, w9, w10, gt
	b	LBB0_7
LBB0_3:
Lloh8:
	adrp	x8, _RF6052_MAX_TX_PWR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RF6052_MAX_TX_PWR@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
	and	w8, w21, #0x7f
	dup.2s	v0, w21
	cmp	w8, w9
	csel	w8, w8, w9, lt
LBB0_4:
Lloh11:
	adrp	x10, lCPI0_0@PAGE
Lloh12:
	ldr	d1, [x10, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi.2s	v1, #127
	and.8b	v0, v0, v1
	dup.2s	v1, w9
	smin.2s	v0, v0, v1
	ubfx	w10, w21, #24, #7
	cmp	w10, w9
	csel	w9, w10, w9, lt
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x8, _RF6052_MAX_TX_PWR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RF6052_MAX_TX_PWR@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x8]
	and	w8, w21, #0x7f
	cmp	w8, w9
	csel	w8, w8, w9, lt
	cmp	w10, #0
	b.le	LBB0_8
; %bb.6:
	sub	w10, w9, w10
	cmp	w8, w10
	csel	w8, w8, w10, lt
	dup.2s	v0, w21
Lloh16:
	adrp	x11, lCPI0_0@PAGE
Lloh17:
	ldr	d1, [x11, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi.2s	v1, #127
	and.8b	v0, v0, v1
	dup.2s	v1, w9
	smin.2s	v0, v0, v1
	dup.2s	v1, w10
	smin.2s	v0, v0, v1
	ubfx	w11, w21, #24, #7
	cmp	w11, w9
	csel	w9, w11, w9, lt
	cmp	w9, w10
	csel	w9, w9, w10, lt
LBB0_7:
Lloh18:
	adrp	x10, lCPI0_1@PAGE
Lloh19:
	ldr	d1, [x10, lCPI0_1@PAGEOFF]
	ushl.2s	v0, v0, v1
	mov.s	w10, v0[1]
	fmov	w11, s0
	orr	w9, w11, w9, lsl #24
	orr	w9, w9, w10
	orr	w3, w9, w8
Lloh20:
	adrp	x8, l___const._rtl92s_write_ofdm_powerreg.regoffset@PAGE
Lloh21:
	add	x8, x8, l___const._rtl92s_write_ofdm_powerreg.regoffset@PAGEOFF
	ldr	w1, [x8, w20, sxtw #2]
	mov	x0, x19
	mov	w2, #2139062143
	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	_rtl_set_bbreg
LBB0_8:
	dup.2s	v0, w21
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdr	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const._rtl92s_write_ofdm_powerreg.regoffset
l___const._rtl92s_write_ofdm_powerreg.regoffset:
	.long	3584                            ; 0xe00
	.long	3588                            ; 0xe04
	.long	3600                            ; 0xe10
	.long	3604                            ; 0xe14
	.long	3608                            ; 0xe18
	.long	3612                            ; 0xe1c

	.comm	_RF_2T2R,8,3                    ; @RF_2T2R
	.comm	_RF6052_MAX_TX_PWR,4,2          ; @RF6052_MAX_TX_PWR
	.no_dead_strip	__rtl92s_write_ofdm_powerreg
.subsections_via_symbols
