	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_set_txpower_g
_b43_set_txpower_g:                     ## @b43_set_txpower_g
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	16(%r14), %rax
	movl	(%rsi), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rdx), %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	(%rax), %r13d
	movl	4(%rax), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	cmpl	$255, %r13d
	sete	%dil
	callq	_unlikely
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovel	%r13d, %ecx
	movl	%ecx, %r13d
	movl	%r15d, (%r14)
	leaq	8(%r14), %rdi
	movq	%r12, %rsi
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	movl	$4, %edx
	callq	_memmove
	movq	_B43_TXCTL_TXMIX@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r15d, %eax
	setne	%cl
	movl	%ecx, 8(%r14)
	addq	$4, %r14
	movq	%r14, %rdi
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	$4, %edx
	callq	_memmove
	movq	_B43_DBG_XMITPOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_b43_debug
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	movl	%r14d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	callq	_b43dbg
LBB0_2:
	leaq	8(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_b43_gphy_set_baseband_attenuation
	movq	_B43_SHM_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_B43_SHM_SH_RFATT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r12d, %ecx
	callq	_b43_shm_write16
	cmpl	$8272, 8(%rbx)                  ## imm = 0x2050
	jne	LBB0_5
## %bb.3:
	cmpl	$8, 12(%rbx)
	jne	LBB0_5
## %bb.4:
	andl	$15, %r12d
	andl	$112, %r15d
	orl	%r12d, %r15d
	movq	%rbx, %rdi
	movl	$67, %esi
	movl	%r15d, %edx
	callq	_b43_radio_write16
	jmp	LBB0_6
LBB0_5:
	andl	$15, %r12d
	movq	%rbx, %rdi
	movl	$67, %esi
	movl	$65520, %edx                    ## imm = 0xFFF0
	movl	%r12d, %ecx
	callq	_b43_radio_maskset
	andl	$112, %r15d
	movq	%rbx, %rdi
	movl	$82, %esi
	movl	$-113, %edx
	movl	%r15d, %ecx
	callq	_b43_radio_maskset
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_has_tx_magnification
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	orl	%r14d, %r13d
	movq	%rbx, %rdi
	movl	$82, %esi
	movl	%r13d, %edx
	callq	_b43_radio_write16
	jmp	LBB0_9
LBB0_8:
	andl	$15, %r13d
	movq	%rbx, %rdi
	movl	$82, %esi
	movl	$65520, %edx                    ## imm = 0xFFF0
	movl	%r13d, %ecx
	callq	_b43_radio_maskset
LBB0_9:
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_b43_lo_g_adjust                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_TXCTL_TXMIX,4,2            ## @B43_TXCTL_TXMIX
	.comm	_B43_DBG_XMITPOWER,4,2          ## @B43_DBG_XMITPOWER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tuning TX-power to bbatt(%u), rfatt(%u), tx_control(0x%02X), tx_bias(0x%02X), tx_magn(0x%02X)\n"

	.comm	_B43_SHM_SHARED,4,2             ## @B43_SHM_SHARED
	.comm	_B43_SHM_SH_RFATT,4,2           ## @B43_SHM_SH_RFATT
	.no_dead_strip	_b43_set_txpower_g
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43_set_txpower_g
_b43_set_txpower_g:                     ; @b43_set_txpower_g
	.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	x23, x3
	mov	x26, x2
	mov	x27, x1
	mov	x19, x0
	add	x20, x0, #8
	ldr	x28, [x0, #16]
	ldr	x8, [x28, #16]
	ldr	w25, [x1]
	ldr	w24, [x2]
	ldp	w22, w21, [x8]
	cmp	w22, #255
	cset	w0, eq
	bl	_unlikely
	cmp	x0, #0
	csel	w22, w22, wzr, eq
	str	w23, [x28]
	add	x0, x28, #8
	mov	x1, x26
	mov	w2, #4
	bl	_memmove
Lloh0:
	adrp	x8, _B43_TXCTL_TXMIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B43_TXCTL_TXMIX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w23
	cset	w8, ne
	str	w8, [x28, #8]
	add	x0, x28, #4
	mov	x1, x27
	mov	w2, #4
	bl	_memmove
Lloh3:
	adrp	x8, _B43_DBG_XMITPOWER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B43_DBG_XMITPOWER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43_debug
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	mov	x5, x22
	mov	x6, x21
	bl	_b43dbg
LBB0_2:
	mov	x0, x19
	mov	x1, x25
	bl	_b43_gphy_set_baseband_attenuation
Lloh8:
	adrp	x8, _B43_SHM_SHARED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _B43_SHM_SHARED@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _B43_SHM_SH_RFATT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _B43_SHM_SH_RFATT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x24
	bl	_b43_shm_write16
	ldr	w8, [x19, #8]
	mov	w9, #8272
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	ldr	w8, [x19, #12]
	cmp	w8, #8
	b.ne	LBB0_5
; %bb.4:
	and	w2, w23, #0x70
	bfxil	w2, w24, #0, #4
	mov	x0, x19
	mov	w1, #67
	bl	_b43_radio_write16
	b	LBB0_6
LBB0_5:
	and	w3, w24, #0xf
	mov	x0, x19
	mov	w1, #67
	mov	w2, #65520
	bl	_b43_radio_maskset
	and	w3, w23, #0x70
	mov	x0, x19
	mov	w1, #82
	mov	w2, #-113
	bl	_b43_radio_maskset
LBB0_6:
	mov	x0, x20
	bl	_has_tx_magnification
	cbz	x0, LBB0_8
; %bb.7:
	orr	w2, w22, w21
	mov	x0, x19
	mov	w1, #82
	bl	_b43_radio_write16
	b	LBB0_9
LBB0_8:
	and	w3, w22, #0xf
	mov	x0, x19
	mov	w1, #82
	mov	w2, #65520
	bl	_b43_radio_maskset
LBB0_9:
	mov	x0, x19
	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	_b43_lo_g_adjust
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_TXCTL_TXMIX,4,2            ; @B43_TXCTL_TXMIX
	.comm	_B43_DBG_XMITPOWER,4,2          ; @B43_DBG_XMITPOWER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tuning TX-power to bbatt(%u), rfatt(%u), tx_control(0x%02X), tx_bias(0x%02X), tx_magn(0x%02X)\n"

	.comm	_B43_SHM_SHARED,4,2             ; @B43_SHM_SHARED
	.comm	_B43_SHM_SH_RFATT,4,2           ; @B43_SHM_SH_RFATT
	.no_dead_strip	_b43_set_txpower_g
.subsections_via_symbols
