	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_lpphy_op_set_rx_antenna
_b43_lpphy_op_set_rx_antenna:           ## @b43_lpphy_op_set_rx_antenna
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$1, (%rdi)
	jg	LBB0_3
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_B43_ANTENNA_AUTO1@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%esi, (%rax)
	setl	%dil
	callq	_B43_WARN_ON
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_b43_hf_read
	movq	_B43_HF_ANTDIVHELP@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	notl	%esi
	andl	%eax, %esi
	movq	%rbx, %rdi
	callq	_b43_hf_write
	movq	_B43_LPPHY_CRSGAIN_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%r14d, %ecx
	andl	$2, %ecx
	movq	%rbx, %rdi
	movl	$65533, %edx                    ## imm = 0xFFFD
	callq	_b43_phy_maskset
	movl	(%r12), %esi
	movl	%r14d, %ecx
	andl	$1, %ecx
	movq	%rbx, %rdi
	movl	$65534, %edx                    ## imm = 0xFFFE
	callq	_b43_phy_maskset
	movq	%rbx, %rdi
	callq	_b43_hf_read
	orl	(%r15), %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_b43_hf_write
	movq	8(%rbx), %rax
	movl	%r14d, (%rax)
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_ANTENNA_AUTO1,4,2          ## @B43_ANTENNA_AUTO1
	.comm	_B43_HF_ANTDIVHELP,4,2          ## @B43_HF_ANTDIVHELP
	.comm	_B43_LPPHY_CRSGAIN_CTL,4,2      ## @B43_LPPHY_CRSGAIN_CTL
	.no_dead_strip	_b43_lpphy_op_set_rx_antenna
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43_lpphy_op_set_rx_antenna
_b43_lpphy_op_set_rx_antenna:           ; @b43_lpphy_op_set_rx_antenna
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.gt	LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _B43_ANTENNA_AUTO1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B43_ANTENNA_AUTO1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	cset	w0, lt
	bl	_B43_WARN_ON
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_b43_hf_read
Lloh3:
	adrp	x21, _B43_HF_ANTDIVHELP@GOTPAGE
Lloh4:
	ldr	x21, [x21, _B43_HF_ANTDIVHELP@GOTPAGEOFF]
	ldr	w8, [x21]
	bic	w1, w0, w8
	mov	x0, x20
	bl	_b43_hf_write
Lloh5:
	adrp	x22, _B43_LPPHY_CRSGAIN_CTL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _B43_LPPHY_CRSGAIN_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	and	w3, w19, #0x2
	mov	x0, x20
	mov	w2, #65533
	bl	_b43_phy_maskset
	ldr	w1, [x22]
	and	w3, w19, #0x1
	mov	x0, x20
	mov	w2, #65534
	bl	_b43_phy_maskset
	mov	x0, x20
	bl	_b43_hf_read
	ldr	w8, [x21]
	orr	w1, w8, w0
	mov	x0, x20
	bl	_b43_hf_write
	ldr	x8, [x20, #8]
	str	w19, [x8]
LBB0_3:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_ANTENNA_AUTO1,4,2          ; @B43_ANTENNA_AUTO1
	.comm	_B43_HF_ANTDIVHELP,4,2          ; @B43_HF_ANTDIVHELP
	.comm	_B43_LPPHY_CRSGAIN_CTL,4,2      ; @B43_LPPHY_CRSGAIN_CTL
	.no_dead_strip	_b43_lpphy_op_set_rx_antenna
.subsections_via_symbols
