	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_toggle_antenna
_rs_toggle_antenna:                     ## @rs_toggle_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
	movq	%rsi, %rbx
	movq	(%rdx), %rsi
	xorl	%r15d, %r15d
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.1:
	movq	_ANT_ABC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	ja	LBB0_8
## %bb.2:
	movq	%rdx, %r13
	movq	%rdi, %r12
	callq	_rs_is_valid_ant
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_ant_toggle_lookup@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%r13), %rcx
	movq	(%rax,%rcx,8), %rbx
	cmpq	%rcx, %rbx
	je	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_rs_is_valid_ant
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rbx
	cmpq	(%r13), %rbx
	jne	LBB0_4
	jmp	LBB0_8
LBB0_6:
	cmpq	(%r13), %rbx
	je	LBB0_8
## %bb.7:
	movq	%rbx, (%r13)
	movq	_RATE_MCS_ANT_ABC_MSK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	andq	(%rdx), %rax
	movq	%rax, (%rdx)
	movq	_RATE_MCS_ANT_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rbx
	orq	%rax, %rbx
	movq	%rbx, (%rdx)
	movl	$1, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ANT_ABC,8,3                    ## @ANT_ABC
	.comm	_ant_toggle_lookup,8,3          ## @ant_toggle_lookup
	.comm	_RATE_MCS_ANT_ABC_MSK,8,3       ## @RATE_MCS_ANT_ABC_MSK
	.comm	_RATE_MCS_ANT_POS,8,3           ## @RATE_MCS_ANT_POS
	.no_dead_strip	_rs_toggle_antenna
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_toggle_antenna
_rs_toggle_antenna:                     ; @rs_toggle_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	x19, x1
	ldr	x1, [x2]
Lloh0:
	adrp	x8, _ANT_ABC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ANT_ABC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, #0
	ccmp	x1, x8, #2, ne
	b.hi	LBB0_6
; %bb.1:
	mov	x20, x2
	mov	x21, x0
	bl	_rs_is_valid_ant
	cbz	w0, LBB0_7
; %bb.2:
Lloh3:
	adrp	x23, _ant_toggle_lookup@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ant_toggle_lookup@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x20]
	ldr	x22, [x8, x9, lsl #3]
	cmp	x22, x9
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_rs_is_valid_ant
	cbnz	w0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23]
	ldr	x22, [x8, x22, lsl #3]
	ldr	x8, [x20]
	cmp	x22, x8
	b.ne	LBB0_3
	b	LBB0_6
LBB0_5:
	ldr	x8, [x20]
	cmp	x22, x8
	b.ne	LBB0_8
LBB0_6:
	mov	w0, #0
LBB0_7:
	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
	ret
LBB0_8:
Lloh5:
	adrp	x8, _RATE_MCS_ANT_ABC_MSK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RATE_MCS_ANT_ABC_MSK@GOTPAGEOFF]
	str	x22, [x20]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x19]
	bic	x8, x9, x8
Lloh8:
	adrp	x9, _RATE_MCS_ANT_POS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RATE_MCS_ANT_POS@GOTPAGEOFF]
	str	x8, [x19]
Lloh10:
	ldr	x9, [x9]
	lsl	x9, x22, x9
	orr	x8, x9, x8
	str	x8, [x19]
	mov	w0, #1
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ANT_ABC,8,3                    ; @ANT_ABC
	.comm	_ant_toggle_lookup,8,3          ; @ant_toggle_lookup
	.comm	_RATE_MCS_ANT_ABC_MSK,8,3       ; @RATE_MCS_ANT_ABC_MSK
	.comm	_RATE_MCS_ANT_POS,8,3           ; @RATE_MCS_ANT_POS
	.no_dead_strip	_rs_toggle_antenna
.subsections_via_symbols
