	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8225z2_b_rf_set_tx_power
_rtl8225z2_b_rf_set_tx_power:           ## @rtl8225z2_b_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
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	24(%r12), %rax
	movslq	%esi, %rcx
	movl	-4(%rax,%rcx,4), %ebx
	movl	%ebx, %eax
	andl	$15, %eax
	movq	(%r12), %rcx
	movq	_RTL8187BvB@GOTPCREL(%rip), %r15
	leal	7(%rax), %edx
	cmpq	(%r15), %rcx
	cmovel	%eax, %edx
	movl	8(%r12), %edi
	andl	$15, %edi
	addl	%edx, %edi
	movl	$35, %esi
	callq	_min
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmpl	$256, %ebx                      ## imm = 0x100
	jl	LBB0_2
## %bb.1:
	movq	(%r12), %rax
	xorl	%ecx, %ecx
	cmpq	(%r15), %rax
	setne	%cl
	leal	17(,%rcx,8), %eax
	jmp	LBB0_3
LBB0_2:
	sarl	$4, %ebx
	movq	(%r12), %rax
	xorl	%ecx, %ecx
	cmpq	(%r15), %rax
	setne	%cl
	leal	(%rbx,%rcx,8), %eax
	addl	$2, %eax
LBB0_3:
	movl	8(%r12), %edi
	shrl	$4, %edi
	andl	$15, %edi
	addl	%eax, %edi
	movl	$35, %esi
	callq	_min
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$14, %r13d
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	jne	LBB0_5
## %bb.4:
	movq	_rtl8225z2_tx_power_cck_ch14@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_rtl8225z2_tx_power_cck@GOTPCREL(%rip), %rax
LBB0_6:
	movq	_RTL8187BvB@GOTPCREL(%rip), %r13
	movq	(%rax), %rbx
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.7:
	cmpl	$7, %r15d
	jl	LBB0_17
## %bb.8:
	cmpl	$11, %r15d
	ja	LBB0_13
	jmp	LBB0_9
LBB0_10:
	cmpl	$6, %r15d
	jl	LBB0_17
## %bb.11:
	cmpl	$11, %r15d
	ja	LBB0_14
LBB0_9:
	addq	$32, %rbx
	jmp	LBB0_17
LBB0_14:
	cmpl	$17, %r15d
	ja	LBB0_16
LBB0_13:
	addq	$64, %rbx
	jmp	LBB0_17
LBB0_16:
	addq	$96, %rbx
LBB0_17:
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$68, %esi
	callq	_rtl8225_write_phy_cck
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$69, %esi
	callq	_rtl8225_write_phy_cck
	movl	8(%rbx), %edx
	movq	%r14, %rdi
	movl	$70, %esi
	callq	_rtl8225_write_phy_cck
	movl	12(%rbx), %edx
	movq	%r14, %rdi
	movl	$71, %esi
	callq	_rtl8225_write_phy_cck
	movl	16(%rbx), %edx
	movq	%r14, %rdi
	movl	$72, %esi
	callq	_rtl8225_write_phy_cck
	movl	20(%rbx), %edx
	movq	%r14, %rdi
	movl	$73, %esi
	callq	_rtl8225_write_phy_cck
	movl	24(%rbx), %edx
	movq	%r14, %rdi
	movl	$74, %esi
	callq	_rtl8225_write_phy_cck
	movl	28(%rbx), %edx
	movq	%r14, %rdi
	movl	$75, %esi
	callq	_rtl8225_write_phy_cck
	movq	16(%r12), %rsi
	addq	$4, %rsi
	movq	_rtl8225z2_tx_gain_cck_ofdm@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,4), %edx
	addl	%edx, %edx
	movq	%r12, %rdi
	callq	_rtl818x_iowrite8
	movl	$1, %edi
	callq	_msleep
	movq	16(%r12), %rsi
	movq	(%rbx), %rax
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,4), %edx
	addl	%edx, %edx
	movq	%r12, %rdi
	callq	_rtl818x_iowrite8
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	jne	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	cmpl	$12, %r15d
	setl	%al
	leal	92(,%rax,4), %ebx
	jmp	LBB0_21
LBB0_19:
	movl	$92, %ebx
	cmpl	$12, %r15d
	jl	LBB0_21
## %bb.20:
	xorl	%eax, %eax
	cmpl	$18, %r15d
	setb	%al
	leal	80(,%rax,4), %ebx
LBB0_21:
	movq	%r14, %rdi
	movl	$135, %esi
	movl	%ebx, %edx
	callq	_rtl8225_write_phy_ofdm
	movq	%r14, %rdi
	movl	$137, %esi
	movl	%ebx, %edx
	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	_RTL8187BvB,8,3                 ## @RTL8187BvB
	.comm	_rtl8225z2_tx_power_cck_ch14,8,3 ## @rtl8225z2_tx_power_cck_ch14
	.comm	_rtl8225z2_tx_power_cck,8,3     ## @rtl8225z2_tx_power_cck
	.comm	_rtl8225z2_tx_gain_cck_ofdm,8,3 ## @rtl8225z2_tx_gain_cck_ofdm
	.no_dead_strip	_rtl8225z2_b_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 rtl8225z2_b_rf_set_tx_power
_rtl8225z2_b_rf_set_tx_power:           ; @rtl8225z2_b_rf_set_tx_power
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x23, x1
	mov	x19, x0
	ldr	x20, [x0]
	ldr	x8, [x20, #24]
	add	x8, x8, w1, sxtw #2
	ldur	w21, [x8, #-4]
	and	w8, w21, #0xf
	ldr	x9, [x20]
Lloh0:
	adrp	x24, _RTL8187BvB@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RTL8187BvB@GOTPAGEOFF]
	ldr	x10, [x24]
	cmp	x9, x10
	mov	w9, #7
	csel	w9, wzr, w9, eq
	ldr	w10, [x20, #8]
	and	w10, w10, #0xf
	add	w8, w9, w8
	add	w0, w8, w10
	mov	w1, #35
	bl	_min
	mov	x22, x0
	cmp	w21, #256
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	mov	w8, #25
	mov	w9, #17
	csel	w8, w9, w8, eq
	b	LBB0_3
LBB0_2:
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	mov	w8, #10
	mov	w9, #2
	csel	w8, w9, w8, eq
	add	w8, w8, w21, asr #4
LBB0_3:
	ldr	w9, [x20, #8]
	ubfx	w9, w9, #4, #4
	add	w0, w9, w8
	mov	w1, #35
	bl	_min
	mov	x21, x0
Lloh2:
	adrp	x8, _rtl8225z2_tx_power_cck_ch14@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rtl8225z2_tx_power_cck_ch14@GOTPAGEOFF]
Lloh4:
	adrp	x9, _rtl8225z2_tx_power_cck@GOTPAGE
Lloh5:
	ldr	x9, [x9, _rtl8225z2_tx_power_cck@GOTPAGEOFF]
	cmp	w23, #14
	csel	x8, x8, x9, eq
	ldr	x23, [x8]
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	cmp	w22, #7
	b.lt	LBB0_12
; %bb.5:
	cmp	w22, #11
	b.hi	LBB0_10
	b	LBB0_8
LBB0_6:
	cmp	w22, #6
	b.lt	LBB0_12
; %bb.7:
	cmp	w22, #11
	b.hi	LBB0_9
LBB0_8:
	add	x23, x23, #32
	b	LBB0_12
LBB0_9:
	cmp	w22, #17
	b.hi	LBB0_11
LBB0_10:
	add	x23, x23, #64
	b	LBB0_12
LBB0_11:
	add	x23, x23, #96
LBB0_12:
	ldr	w2, [x23]
	mov	x0, x19
	mov	w1, #68
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x23, #4]
	mov	x0, x19
	mov	w1, #69
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x23, #8]
	mov	x0, x19
	mov	w1, #70
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x23, #12]
	mov	x0, x19
	mov	w1, #71
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x23, #16]
	mov	x0, x19
	mov	w1, #72
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x23, #20]
	mov	x0, x19
	mov	w1, #73
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x23, #24]
	mov	x0, x19
	mov	w1, #74
	bl	_rtl8225_write_phy_cck
	ldr	w2, [x23, #28]
	mov	x0, x19
	mov	w1, #75
	bl	_rtl8225_write_phy_cck
	ldr	x8, [x20, #16]
	add	x1, x8, #4
Lloh6:
	adrp	x23, _rtl8225z2_tx_gain_cck_ofdm@GOTPAGE
Lloh7:
	ldr	x23, [x23, _rtl8225z2_tx_gain_cck_ofdm@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	w8, [x8, w22, sxtw #2]
	lsl	w2, w8, #1
	mov	x0, x20
	bl	_rtl818x_iowrite8
	mov	w0, #1
	bl	_msleep
	ldr	x1, [x20, #16]
	ldr	x8, [x23]
	ldr	w8, [x8, w21, sxtw #2]
	lsl	w2, w8, #1
	mov	x0, x20
	bl	_rtl818x_iowrite8
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	mov	w8, #92
	mov	w9, #96
	cmp	w21, #12
	csel	w20, w9, w8, lt
	b	LBB0_17
LBB0_14:
	cmp	w21, #12
	b.ge	LBB0_16
; %bb.15:
	mov	w20, #92
	b	LBB0_17
LBB0_16:
	mov	w8, #80
	mov	w9, #84
	cmp	w21, #18
	csel	w20, w9, w8, lo
LBB0_17:
	mov	x0, x19
	mov	w1, #135
	mov	x2, x20
	bl	_rtl8225_write_phy_ofdm
	mov	x0, x19
	mov	w1, #137
	mov	x2, x20
	bl	_rtl8225_write_phy_ofdm
	mov	w0, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_msleep
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8187BvB,8,3                 ; @RTL8187BvB
	.comm	_rtl8225z2_tx_power_cck_ch14,8,3 ; @rtl8225z2_tx_power_cck_ch14
	.comm	_rtl8225z2_tx_power_cck,8,3     ; @rtl8225z2_tx_power_cck
	.comm	_rtl8225z2_tx_gain_cck_ofdm,8,3 ; @rtl8225z2_tx_gain_cck_ofdm
	.no_dead_strip	_rtl8225z2_b_rf_set_tx_power
.subsections_via_symbols
