	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_gphy_op_set_rx_antenna
_b43_gphy_op_set_rx_antenna:            ## @b43_gphy_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	%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, %r14d
	movq	%rdi, %rbx
	movq	_B43_ANTENNA_AUTO0@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	setne	%r13b
	movq	_B43_ANTENNA_AUTO1@GOTPCREL(%rip), %r12
	cmpl	%esi, (%r12)
	setne	%r15b
	callq	_b43_hf_read
	movq	_B43_HF_ANTDIVHELP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	%rbx, %rdi
	callq	_b43_hf_write
	movq	_B43_PHY_BBANDCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_B43_PHY_BBANDCFG_RXANT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	movl	%r14d, %eax
	testb	%r15b, %r13b
	jne	LBB0_2
## %bb.1:
	movl	(%r12), %eax
LBB0_2:
	movq	_B43_PHY_BBANDCFG_RXANT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_b43_phy_maskset
	testb	%r15b, %r13b
	je	LBB0_3
## %bb.4:
	movq	_B43_PHY_ANTWRSETT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_b43_phy_read
	movq	_B43_PHY_ANTWRSETT_ARXDIV@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_b43_phy_write
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_b43_phy_mask
	cmpl	$2, (%rbx)
	jge	LBB0_6
	jmp	LBB0_11
LBB0_3:
	movq	_B43_PHY_ANTDWELL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_b43_phy_read
	movq	_B43_PHY_ANTDWELL_AUTODIV1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %edx
	cmpl	%r14d, (%r12)
	cmovel	%ecx, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_b43_phy_write
	movq	_B43_PHY_ANTWRSETT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_b43_phy_read
	movq	_B43_PHY_ANTWRSETT_ARXDIV@GOTPCREL(%rip), %r15
	orl	(%r15), %eax
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_b43_phy_write
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_b43_phy_set
	cmpl	$2, (%rbx)
	jl	LBB0_11
LBB0_6:
	movq	_B43_PHY_OFDM61@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_B43_PHY_OFDM61_10@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_b43_phy_set
	movq	_B43_PHY_DIVSRCHGAINBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$65280, %edx                    ## imm = 0xFF00
	movl	$21, %ecx
	callq	_b43_phy_maskset
	cmpl	$2, (%rbx)
	movq	_B43_PHY_ADIVRELATED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	jne	LBB0_8
## %bb.7:
	movl	$8, %edx
	callq	_b43_phy_write
	cmpl	$6, (%rbx)
	jge	LBB0_10
	jmp	LBB0_11
LBB0_8:
	movl	$65280, %edx                    ## imm = 0xFF00
	movl	$8, %ecx
	callq	_b43_phy_maskset
	cmpl	$6, (%rbx)
	jl	LBB0_11
LBB0_10:
	movq	_B43_PHY_OFDM9B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$220, %edx
	callq	_b43_phy_write
LBB0_11:
	movq	%rbx, %rdi
	callq	_b43_hf_read
	movq	_B43_HF_ANTDIVHELP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_b43_hf_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_ANTENNA_AUTO0,4,2          ## @B43_ANTENNA_AUTO0
	.comm	_B43_ANTENNA_AUTO1,4,2          ## @B43_ANTENNA_AUTO1
	.comm	_B43_HF_ANTDIVHELP,4,2          ## @B43_HF_ANTDIVHELP
	.comm	_B43_PHY_BBANDCFG,4,2           ## @B43_PHY_BBANDCFG
	.comm	_B43_PHY_BBANDCFG_RXANT,4,2     ## @B43_PHY_BBANDCFG_RXANT
	.comm	_B43_PHY_BBANDCFG_RXANT_SHIFT,4,2 ## @B43_PHY_BBANDCFG_RXANT_SHIFT
	.comm	_B43_PHY_ANTDWELL,4,2           ## @B43_PHY_ANTDWELL
	.comm	_B43_PHY_ANTDWELL_AUTODIV1,4,2  ## @B43_PHY_ANTDWELL_AUTODIV1
	.comm	_B43_PHY_ANTWRSETT,4,2          ## @B43_PHY_ANTWRSETT
	.comm	_B43_PHY_ANTWRSETT_ARXDIV,4,2   ## @B43_PHY_ANTWRSETT_ARXDIV
	.comm	_B43_PHY_OFDM61,4,2             ## @B43_PHY_OFDM61
	.comm	_B43_PHY_OFDM61_10,4,2          ## @B43_PHY_OFDM61_10
	.comm	_B43_PHY_DIVSRCHGAINBACK,4,2    ## @B43_PHY_DIVSRCHGAINBACK
	.comm	_B43_PHY_ADIVRELATED,4,2        ## @B43_PHY_ADIVRELATED
	.comm	_B43_PHY_OFDM9B,4,2             ## @B43_PHY_OFDM9B
	.no_dead_strip	_b43_gphy_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_gphy_op_set_rx_antenna
_b43_gphy_op_set_rx_antenna:            ; @b43_gphy_op_set_rx_antenna
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _B43_ANTENNA_AUTO0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B43_ANTENNA_AUTO0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	cset	w23, ne
Lloh3:
	adrp	x22, _B43_ANTENNA_AUTO1@GOTPAGE
Lloh4:
	ldr	x22, [x22, _B43_ANTENNA_AUTO1@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w1
	cset	w24, ne
	bl	_b43_hf_read
Lloh5:
	adrp	x21, _B43_HF_ANTDIVHELP@GOTPAGE
Lloh6:
	ldr	x21, [x21, _B43_HF_ANTDIVHELP@GOTPAGEOFF]
	ldr	w8, [x21]
	bic	w1, w0, w8
	mov	x0, x19
	bl	_b43_hf_write
Lloh7:
	adrp	x8, _B43_PHY_BBANDCFG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _B43_PHY_BBANDCFG@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _B43_PHY_BBANDCFG_RXANT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _B43_PHY_BBANDCFG_RXANT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	mvn	w2, w8
	ldr	w8, [x22]
	ands	w23, w23, w24
	csel	w8, w20, w8, ne
Lloh13:
	adrp	x9, _B43_PHY_BBANDCFG_RXANT_SHIFT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _B43_PHY_BBANDCFG_RXANT_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	lsl	w3, w8, w9
	mov	x0, x19
	bl	_b43_phy_maskset
	tbz	w23, #0, LBB0_2
; %bb.1:
Lloh16:
	adrp	x20, _B43_PHY_ANTWRSETT@GOTPAGE
Lloh17:
	ldr	x20, [x20, _B43_PHY_ANTWRSETT@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_b43_phy_read
Lloh18:
	adrp	x22, _B43_PHY_ANTWRSETT_ARXDIV@GOTPAGE
Lloh19:
	ldr	x22, [x22, _B43_PHY_ANTWRSETT_ARXDIV@GOTPAGEOFF]
	ldr	w8, [x22]
	bic	w2, w0, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_b43_phy_write
	ldr	w1, [x20]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_b43_phy_mask
	b	LBB0_3
LBB0_2:
Lloh20:
	adrp	x23, _B43_PHY_ANTDWELL@GOTPAGE
Lloh21:
	ldr	x23, [x23, _B43_PHY_ANTDWELL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_b43_phy_read
	ldr	w8, [x22]
Lloh22:
	adrp	x9, _B43_PHY_ANTDWELL_AUTODIV1@GOTPAGE
Lloh23:
	ldr	x9, [x9, _B43_PHY_ANTDWELL_AUTODIV1@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	bic	w10, w0, w9
	orr	w9, w9, w0
	cmp	w8, w20
	csel	w2, w10, w9, eq
	ldr	w1, [x23]
	mov	x0, x19
	bl	_b43_phy_write
Lloh25:
	adrp	x20, _B43_PHY_ANTWRSETT@GOTPAGE
Lloh26:
	ldr	x20, [x20, _B43_PHY_ANTWRSETT@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_b43_phy_read
Lloh27:
	adrp	x22, _B43_PHY_ANTWRSETT_ARXDIV@GOTPAGE
Lloh28:
	ldr	x22, [x22, _B43_PHY_ANTWRSETT_ARXDIV@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_b43_phy_write
	ldr	w1, [x20]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_b43_phy_set
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_9
; %bb.4:
Lloh29:
	adrp	x8, _B43_PHY_OFDM61@GOTPAGE
Lloh30:
	ldr	x8, [x8, _B43_PHY_OFDM61@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _B43_PHY_OFDM61_10@GOTPAGE
Lloh33:
	ldr	x8, [x8, _B43_PHY_OFDM61_10@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_b43_phy_set
Lloh35:
	adrp	x8, _B43_PHY_DIVSRCHGAINBACK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _B43_PHY_DIVSRCHGAINBACK@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65280
	mov	w3, #21
	bl	_b43_phy_maskset
	ldr	w8, [x19]
Lloh38:
	adrp	x9, _B43_PHY_ADIVRELATED@GOTPAGE
Lloh39:
	ldr	x9, [x9, _B43_PHY_ADIVRELATED@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x9]
	mov	x0, x19
	cmp	w8, #2
	b.ne	LBB0_6
; %bb.5:
	mov	w2, #8
	bl	_b43_phy_write
	b	LBB0_7
LBB0_6:
	mov	w2, #65280
	mov	w3, #8
	bl	_b43_phy_maskset
LBB0_7:
	ldr	w8, [x19]
	cmp	w8, #6
	b.lt	LBB0_9
; %bb.8:
Lloh41:
	adrp	x8, _B43_PHY_OFDM9B@GOTPAGE
Lloh42:
	ldr	x8, [x8, _B43_PHY_OFDM9B@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #220
	bl	_b43_phy_write
LBB0_9:
	mov	x0, x19
	bl	_b43_hf_read
	ldr	w8, [x21]
	orr	w1, w8, w0
	mov	x0, x19
	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	_b43_hf_write
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_ANTENNA_AUTO0,4,2          ; @B43_ANTENNA_AUTO0
	.comm	_B43_ANTENNA_AUTO1,4,2          ; @B43_ANTENNA_AUTO1
	.comm	_B43_HF_ANTDIVHELP,4,2          ; @B43_HF_ANTDIVHELP
	.comm	_B43_PHY_BBANDCFG,4,2           ; @B43_PHY_BBANDCFG
	.comm	_B43_PHY_BBANDCFG_RXANT,4,2     ; @B43_PHY_BBANDCFG_RXANT
	.comm	_B43_PHY_BBANDCFG_RXANT_SHIFT,4,2 ; @B43_PHY_BBANDCFG_RXANT_SHIFT
	.comm	_B43_PHY_ANTDWELL,4,2           ; @B43_PHY_ANTDWELL
	.comm	_B43_PHY_ANTDWELL_AUTODIV1,4,2  ; @B43_PHY_ANTDWELL_AUTODIV1
	.comm	_B43_PHY_ANTWRSETT,4,2          ; @B43_PHY_ANTWRSETT
	.comm	_B43_PHY_ANTWRSETT_ARXDIV,4,2   ; @B43_PHY_ANTWRSETT_ARXDIV
	.comm	_B43_PHY_OFDM61,4,2             ; @B43_PHY_OFDM61
	.comm	_B43_PHY_OFDM61_10,4,2          ; @B43_PHY_OFDM61_10
	.comm	_B43_PHY_DIVSRCHGAINBACK,4,2    ; @B43_PHY_DIVSRCHGAINBACK
	.comm	_B43_PHY_ADIVRELATED,4,2        ; @B43_PHY_ADIVRELATED
	.comm	_B43_PHY_OFDM9B,4,2             ; @B43_PHY_OFDM9B
	.no_dead_strip	_b43_gphy_op_set_rx_antenna
.subsections_via_symbols
