	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_phy_set_baseband_attenuation ## -- Begin function b43legacy_phy_set_baseband_attenuation
	.p2align	4, 0x90
_b43legacy_phy_set_baseband_attenuation: ## @b43legacy_phy_set_baseband_attenuation
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	(%rdi), %r15d
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.2:
	movl	$96, %esi
	callq	_b43legacy_phy_read
	cmpl	$2, %r15d
	setge	%cl
	movl	$65475, %edx                    ## imm = 0xFFC3
	movl	$65415, %esi                    ## imm = 0xFF87
	cmovgel	%edx, %esi
	movl	$60, %edx
	movl	$120, %edi
	cmovgel	%edx, %edi
	xorb	$3, %cl
	shll	%cl, %ebx
	andl	%eax, %esi
	andl	%edi, %ebx
	orl	%esi, %ebx
	movq	%r14, %rdi
	movl	$96, %esi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_b43legacy_phy_write            ## TAILCALL
LBB0_1:
	movl	$998, %esi                      ## imm = 0x3E6
	callq	_b43legacy_read16
	andl	$65520, %eax                    ## imm = 0xFFF0
	andl	$15, %ebx
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	$998, %esi                      ## imm = 0x3E6
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_b43legacy_write16              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_phy_set_baseband_attenuation ; -- Begin function b43legacy_phy_set_baseband_attenuation
	.p2align	2
_b43legacy_phy_set_baseband_attenuation: ; @b43legacy_phy_set_baseband_attenuation
	.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	x20, x1
	mov	x19, x0
	ldr	w21, [x0]
	cbz	w21, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #96
	bl	_b43legacy_phy_read
	mov	w8, #65415
	mov	w9, #65475
	cmp	w21, #1
	csel	w8, w9, w8, gt
	mov	w9, #2
	cinc	w9, w9, le
	mov	w10, #120
	mov	w11, #60
	csel	w10, w11, w10, gt
	and	w8, w0, w8
	lsl	w9, w20, w9
	and	w9, w9, w10
	orr	w2, w8, w9
	mov	x0, x19
	mov	w1, #96
	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	_b43legacy_phy_write
LBB0_2:
	mov	x0, x19
	mov	w1, #998
	bl	_b43legacy_read16
	and	w2, w0, #0xfff0
	bfxil	w2, w20, #0, #4
	mov	x0, x19
	mov	w1, #998
	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	_b43legacy_write16
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
