	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_gphy_op_adjust_txpower
_b43_gphy_op_adjust_txpower:            ## @b43_gphy_op_adjust_txpower
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r12
	callq	_b43_mac_suspend
	movl	8(%r12), %eax
	addl	24(%r12), %eax
	movl	%eax, -36(%rbp)
	movl	4(%r12), %eax
	addl	16(%r12), %eax
	movl	%eax, -40(%rbp)
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_b43_put_attenuation_into_ranges
	movl	(%r12), %eax
	cmpl	$8272, 16(%rbx)                 ## imm = 0x2050
	jne	LBB0_13
## %bb.1:
	cmpl	$2, 20(%rbx)
	jne	LBB0_13
## %bb.2:
	movl	-40(%rbp), %ecx
	cmpl	$1, %ecx
	jg	LBB0_7
## %bb.3:
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	8(%rbx), %rdx
	movq	(%rdx), %rdx
	movq	_B43_BFL_PACTRL@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rdx)
	je	LBB0_13
## %bb.6:
	movl	-36(%rbp), %edx
	leal	(%rdx,%rcx,4), %ecx
	addl	$-8, %ecx
	movl	%ecx, -36(%rbp)
	movl	$2, -40(%rbp)
	jmp	LBB0_13
LBB0_7:
	cmpl	$5, %ecx
	jb	LBB0_13
## %bb.8:
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movl	-36(%rbp), %eax
	cmpl	$2, %eax
	jg	LBB0_11
## %bb.10:
	addl	$-3, %ecx
	movl	%ecx, -40(%rbp)
	addl	$2, %eax
	jmp	LBB0_12
LBB0_4:
	movq	_B43_TXCTL_PA2DB@GOTPCREL(%rip), %rdx
	movq	_B43_TXCTL_TXMIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdx), %eax
	addl	$2, %ecx
	movl	%ecx, -40(%rbp)
	addl	$2, -36(%rbp)
	jmp	LBB0_13
LBB0_11:
	addl	$-2, %ecx
	movl	%ecx, -40(%rbp)
	addl	$-2, %eax
LBB0_12:
	movl	%eax, -36(%rbp)
	xorl	%eax, %eax
LBB0_13:
	leaq	8(%r12), %r14
	leaq	4(%r12), %r15
	movl	%eax, (%r12)
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_b43_put_attenuation_into_ranges
	movl	-40(%rbp), %eax
	movl	%eax, 4(%r12)
	movl	-36(%rbp), %eax
	movl	%eax, 8(%r12)
	movq	_B43_DBG_XMITPOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_b43_debug
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_b43dbg
LBB0_15:
	movq	%rbx, %rdi
	callq	_b43_phy_lock
	movq	%rbx, %rdi
	callq	_b43_radio_lock
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_b43_set_txpower_g
	movq	%rbx, %rdi
	callq	_b43_radio_unlock
	movq	%rbx, %rdi
	callq	_b43_phy_unlock
	movq	%rbx, %rdi
	callq	_b43_mac_enable
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_TXCTL_PA2DB,4,2            ## @B43_TXCTL_PA2DB
	.comm	_B43_TXCTL_TXMIX,4,2            ## @B43_TXCTL_TXMIX
	.comm	_B43_BFL_PACTRL,4,2             ## @B43_BFL_PACTRL
	.comm	_B43_DBG_XMITPOWER,4,2          ## @B43_DBG_XMITPOWER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adjusting TX power\n"

	.no_dead_strip	_b43_gphy_op_adjust_txpower
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43_gphy_op_adjust_txpower
_b43_gphy_op_adjust_txpower:            ; @b43_gphy_op_adjust_txpower
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x22, [x0, #24]
	bl	_b43_mac_suspend
	mov	x20, x22
	ldr	w8, [x20, #8]!
	ldr	w9, [x22, #24]
	add	w8, w8, w9
	str	w8, [sp, #8]
	mov	x21, x22
	ldr	w8, [x21, #4]!
	ldr	w9, [x22, #16]
	add	w8, w8, w9
	str	w8, [sp, #12]
	add	x1, sp, #8
	add	x2, sp, #12
	mov	x0, x19
	bl	_b43_put_attenuation_into_ranges
	ldr	w8, [x22]
	ldr	w9, [x19, #16]
	mov	w10, #8272
	cmp	w9, w10
	b.ne	LBB0_12
; %bb.1:
	ldr	w9, [x19, #20]
	cmp	w9, #2
	b.ne	LBB0_12
; %bb.2:
	ldr	w9, [sp, #12]
	cmp	w9, #1
	b.gt	LBB0_6
; %bb.3:
	cbz	w8, LBB0_10
; %bb.4:
	ldr	x10, [x19, #8]
	ldr	x10, [x10]
	ldr	w10, [x10]
Lloh0:
	adrp	x11, _B43_BFL_PACTRL@GOTPAGE
Lloh1:
	ldr	x11, [x11, _B43_BFL_PACTRL@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_12
; %bb.5:
	ldr	w10, [sp, #8]
	add	w9, w10, w9, lsl #2
	sub	w10, w9, #8
	mov	w9, #2
	stp	w10, w9, [sp, #8]
	b	LBB0_12
LBB0_6:
	cmp	w9, #5
	b.lo	LBB0_12
; %bb.7:
	cbz	w8, LBB0_12
; %bb.8:
	ldr	w10, [sp, #8]
	mov	w8, #0
	subs	w11, w10, #2
	b.gt	LBB0_11
; %bb.9:
	sub	w11, w9, #3
	add	w9, w10, #2
	stp	w9, w11, [sp, #8]
	b	LBB0_12
LBB0_10:
Lloh3:
	adrp	x8, _B43_TXCTL_PA2DB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B43_TXCTL_PA2DB@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _B43_TXCTL_TXMIX@GOTPAGE
Lloh7:
	ldr	x10, [x10, _B43_TXCTL_TXMIX@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w8, w10, w8
	add	w10, w9, #2
	ldr	w9, [sp, #8]
	add	w9, w9, #2
	stp	w9, w10, [sp, #8]
	b	LBB0_12
LBB0_11:
	sub	w9, w9, #2
	stp	w11, w9, [sp, #8]
LBB0_12:
	str	w8, [x22]
	add	x1, sp, #8
	add	x2, sp, #12
	mov	x0, x19
	bl	_b43_put_attenuation_into_ranges
	ldp	w9, w8, [sp, #8]
	stp	w8, w9, [x22, #4]
Lloh9:
	adrp	x8, _B43_DBG_XMITPOWER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _B43_DBG_XMITPOWER@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43_debug
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_b43dbg
LBB0_14:
	mov	x0, x19
	bl	_b43_phy_lock
	mov	x0, x19
	bl	_b43_radio_lock
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_b43_set_txpower_g
	mov	x0, x19
	bl	_b43_radio_unlock
	mov	x0, x19
	bl	_b43_phy_unlock
	mov	x0, x19
	bl	_b43_mac_enable
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_TXCTL_PA2DB,4,2            ; @B43_TXCTL_PA2DB
	.comm	_B43_TXCTL_TXMIX,4,2            ; @B43_TXCTL_TXMIX
	.comm	_B43_BFL_PACTRL,4,2             ; @B43_BFL_PACTRL
	.comm	_B43_DBG_XMITPOWER,4,2          ; @B43_DBG_XMITPOWER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adjusting TX power\n"

	.no_dead_strip	_b43_gphy_op_adjust_txpower
.subsections_via_symbols
