	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8225_rf_set_tx_power
_rtl8225_rf_set_tx_power:               ## @rtl8225_rf_set_tx_power
	.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	(%rdi), %r15
	movq	8(%r15), %rax
	movslq	%esi, %r12
	movl	-4(%rax,%r12,4), %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	andl	$15, %edi
	movl	$11, %esi
	callq	_min
	movl	%eax, %ebx
	movq	(%r15), %rsi
	addq	$16, %rsi
	movq	_rtl8225_tx_gain_cck_ofdm@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	imulq	$715827883, %rcx, %r13          ## imm = 0x2AAAAAAB
	movq	%r13, %rcx
	shrq	$63, %rcx
	shrq	$32, %r13
	addl	%ecx, %r13d
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %edx
	sarl	%edx
	movq	%r15, %rdi
	callq	_rtl818x_iowrite8
	cmpl	$14, %r12d
	jne	LBB0_1
## %bb.2:
	movq	_rtl8225_tx_power_cck_ch14@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_rtl8225_tx_power_cck@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %r12
	addl	%r13d, %r13d
	leal	(%r13,%r13,2), %eax
	subl	%eax, %ebx
	shll	$3, %ebx
	movslq	%ebx, %rbx
	movl	(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$68, %esi
	callq	_rtl8225_write_phy_cck
	movl	4(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$69, %esi
	callq	_rtl8225_write_phy_cck
	movl	8(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$70, %esi
	callq	_rtl8225_write_phy_cck
	movl	12(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$71, %esi
	callq	_rtl8225_write_phy_cck
	movl	16(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$72, %esi
	callq	_rtl8225_write_phy_cck
	movl	20(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$73, %esi
	callq	_rtl8225_write_phy_cck
	movl	24(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$74, %esi
	callq	_rtl8225_write_phy_cck
	movl	28(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$75, %esi
	callq	_rtl8225_write_phy_cck
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %eax
	sarl	$4, %eax
	addl	$10, %eax
	cmpl	$256, %ecx                      ## imm = 0x100
	movl	$25, %r13d
	cmovll	%eax, %r13d
	movl	$1, %edi
	callq	_msleep
	movq	(%r15), %rsi
	addq	$4, %rsi
	movq	_RTL818X_EEPROM_CMD_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_rtl818x_iowrite8
	movq	(%r15), %rsi
	addq	$8, %rsi
	movq	%r15, %rdi
	callq	_rtl818x_ioread8
	movl	%eax, %ebx
	movq	(%r15), %rsi
	addq	$8, %rsi
	movq	_RTL818X_CONFIG3_ANAPARAM_WRITE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	%eax, %edx
	movq	%r15, %rdi
	callq	_rtl818x_iowrite8
	movq	(%r15), %rsi
	addq	$12, %rsi
	movq	_RTL8187_RTL8225_ANAPARAM2_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_rtl818x_iowrite32
	movq	(%r15), %rsi
	addq	$8, %rsi
	movl	(%r12), %edx
	notl	%edx
	andl	%ebx, %edx
	movq	%r15, %rdi
	callq	_rtl818x_iowrite8
	movq	(%r15), %rsi
	addq	$4, %rsi
	movq	_RTL818X_EEPROM_CMD_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_rtl818x_iowrite8
	movq	%r14, %rdi
	movl	$2, %esi
	movl	$66, %edx
	callq	_rtl8225_write_phy_ofdm
	movq	%r14, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	callq	_rtl8225_write_phy_ofdm
	movq	%r14, %rdi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_rtl8225_write_phy_ofdm
	movq	(%r15), %rsi
	movq	_rtl8225_tx_gain_cck_ofdm@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r13d, %r12
	imulq	$715827883, %r12, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %rbx
	movl	(%rax,%rbx,4), %edx
	sarl	%edx
	movq	%r15, %rdi
	callq	_rtl818x_iowrite8
	movq	_rtl8225_tx_power_ofdm@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	addl	%ebx, %ebx
	leal	(%rbx,%rbx,2), %eax
	subl	%eax, %r12d
	movslq	%r12d, %rbx
	movl	(%r15,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_rtl8225_write_phy_ofdm
	movl	(%r15,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$7, %esi
	callq	_rtl8225_write_phy_ofdm
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_rtl8225_tx_gain_cck_ofdm,8,3   ## @rtl8225_tx_gain_cck_ofdm
	.comm	_rtl8225_tx_power_cck_ch14,8,3  ## @rtl8225_tx_power_cck_ch14
	.comm	_rtl8225_tx_power_cck,8,3       ## @rtl8225_tx_power_cck
	.comm	_RTL818X_EEPROM_CMD_CONFIG,4,2  ## @RTL818X_EEPROM_CMD_CONFIG
	.comm	_RTL818X_CONFIG3_ANAPARAM_WRITE,4,2 ## @RTL818X_CONFIG3_ANAPARAM_WRITE
	.comm	_RTL8187_RTL8225_ANAPARAM2_ON,4,2 ## @RTL8187_RTL8225_ANAPARAM2_ON
	.comm	_RTL818X_EEPROM_CMD_NORMAL,4,2  ## @RTL818X_EEPROM_CMD_NORMAL
	.comm	_rtl8225_tx_power_ofdm,8,3      ## @rtl8225_tx_power_ofdm
	.no_dead_strip	_rtl8225_rf_set_tx_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8225_rf_set_tx_power
_rtl8225_rf_set_tx_power:               ; @rtl8225_rf_set_tx_power
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0]
	ldr	x8, [x20, #8]
	add	x8, x8, w1, sxtw #2
	ldur	w26, [x8, #-4]
	and	w0, w26, #0xf
	mov	w1, #11
	bl	_min
	mov	x22, x0
	ldr	x8, [x20]
	add	x1, x8, #16
Lloh0:
	adrp	x23, _rtl8225_tx_gain_cck_ofdm@GOTPAGE
Lloh1:
	ldr	x23, [x23, _rtl8225_tx_gain_cck_ofdm@GOTPAGEOFF]
	ldr	x8, [x23]
	mov	w24, #43691
	movk	w24, #10922, lsl #16
	smull	x9, w0, w24
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w27, w9, w10
	ldr	w8, [x8, w27, sxtw #2]
	asr	w2, w8, #1
	mov	x0, x20
	bl	_rtl818x_iowrite8
Lloh2:
	adrp	x8, _rtl8225_tx_power_cck_ch14@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rtl8225_tx_power_cck_ch14@GOTPAGEOFF]
Lloh4:
	adrp	x9, _rtl8225_tx_power_cck@GOTPAGE
Lloh5:
	ldr	x9, [x9, _rtl8225_tx_power_cck@GOTPAGEOFF]
	cmp	w21, #14
	csel	x8, x8, x9, eq
	ldr	x8, [x8]
	mov	w25, #6
	msub	w9, w27, w25, w22
	lsl	w9, w9, #3
	add	x21, x8, w9, sxtw #2
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #68
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x21, #4]
	mov	x0, x19
	mov	w1, #69
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x21, #8]
	mov	x0, x19
	mov	w1, #70
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x21, #12]
	mov	x0, x19
	mov	w1, #71
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x21, #16]
	mov	x0, x19
	mov	w1, #72
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x21, #20]
	mov	x0, x19
	mov	w1, #73
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x21, #24]
	mov	x0, x19
	mov	w1, #74
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x21, #28]
	mov	x0, x19
	mov	w1, #75
	bl	_rtl8225_write_phy_cck
	asr	w8, w26, #4
	add	w8, w8, #10
	mov	w9, #25
	cmp	w26, #255
	csel	w22, w9, w8, gt
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
Lloh6:
	adrp	x8, _RTL818X_EEPROM_CMD_CONFIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RTL818X_EEPROM_CMD_CONFIG@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_rtl818x_iowrite8
	ldr	x8, [x20]
	add	x1, x8, #8
	mov	x0, x20
	bl	_rtl818x_ioread8
	mov	x21, x0
	ldr	x8, [x20]
	add	x1, x8, #8
Lloh9:
	adrp	x26, _RTL818X_CONFIG3_ANAPARAM_WRITE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _RTL818X_CONFIG3_ANAPARAM_WRITE@GOTPAGEOFF]
	ldr	w8, [x26]
	orr	w2, w8, w0
	mov	x0, x20
	bl	_rtl818x_iowrite8
	ldr	x8, [x20]
	add	x1, x8, #12
Lloh11:
	adrp	x8, _RTL8187_RTL8225_ANAPARAM2_ON@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RTL8187_RTL8225_ANAPARAM2_ON@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_rtl818x_iowrite32
	ldr	x8, [x20]
	add	x1, x8, #8
	ldr	w8, [x26]
	bic	w2, w21, w8
	mov	x0, x20
	bl	_rtl818x_iowrite8
	ldr	x8, [x20]
	add	x1, x8, #4
Lloh14:
	adrp	x8, _RTL818X_EEPROM_CMD_NORMAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RTL818X_EEPROM_CMD_NORMAL@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_rtl818x_iowrite8
	mov	x0, x19
	mov	w1, #2
	mov	w2, #66
	bl	_rtl8225_write_phy_ofdm
	mov	x0, x19
	mov	w1, #6
	mov	w2, #0
	bl	_rtl8225_write_phy_ofdm
	mov	x0, x19
	mov	w1, #8
	mov	w2, #0
	bl	_rtl8225_write_phy_ofdm
	ldr	x1, [x20]
	ldr	x8, [x23]
	smull	x9, w22, w24
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w21, w9, w10
	ldr	w8, [x8, w21, sxtw #2]
	asr	w2, w8, #1
	mov	x0, x20
	bl	_rtl818x_iowrite8
Lloh17:
	adrp	x8, _rtl8225_tx_power_ofdm@GOTPAGE
Lloh18:
	ldr	x8, [x8, _rtl8225_tx_power_ofdm@GOTPAGEOFF]
Lloh19:
	ldr	x20, [x8]
	msub	w8, w21, w25, w22
	sbfiz	x21, x8, #2, #32
	ldr	w2, [x20, x21]
	mov	x0, x19
	mov	w1, #5
	bl	_rtl8225_write_phy_ofdm
	ldr	w2, [x20, x21]
	mov	x0, x19
	mov	w1, #7
	bl	_rtl8225_write_phy_ofdm
	mov	w0, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_msleep
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_rtl8225_tx_gain_cck_ofdm,8,3   ; @rtl8225_tx_gain_cck_ofdm
	.comm	_rtl8225_tx_power_cck_ch14,8,3  ; @rtl8225_tx_power_cck_ch14
	.comm	_rtl8225_tx_power_cck,8,3       ; @rtl8225_tx_power_cck
	.comm	_RTL818X_EEPROM_CMD_CONFIG,4,2  ; @RTL818X_EEPROM_CMD_CONFIG
	.comm	_RTL818X_CONFIG3_ANAPARAM_WRITE,4,2 ; @RTL818X_CONFIG3_ANAPARAM_WRITE
	.comm	_RTL8187_RTL8225_ANAPARAM2_ON,4,2 ; @RTL8187_RTL8225_ANAPARAM2_ON
	.comm	_RTL818X_EEPROM_CMD_NORMAL,4,2  ; @RTL818X_EEPROM_CMD_NORMAL
	.comm	_rtl8225_tx_power_ofdm,8,3      ; @rtl8225_tx_power_ofdm
	.no_dead_strip	_rtl8225_rf_set_tx_power
.subsections_via_symbols
