	.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
	movl	%edi, %r15d
	movl	(%rsi), %edi
	xorl	%r14d, %r14d
	testl	%edi, %edi
	je	LBB0_9
## %bb.1:
	movq	%rsi, %r12
	movq	_ANT_C@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_2
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movslq	(%r12), %rsi
	movl	%r15d, %edi
	callq	_rs_is_valid_ant
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movq	_ant_toggle_lookup@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movslq	(%r12), %rcx
	movq	(%rax,%rcx,8), %rbx
	cmpq	%rcx, %rbx
	je	LBB0_9
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_rs_is_valid_ant
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jne	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %eax
LBB0_7:
	cltq
	cmpq	%rax, %rbx
	je	LBB0_9
## %bb.8:
	movl	%ebx, (%r12)
	movl	$1, %r14d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ANT_C,4,2                      ## @ANT_C
	.comm	_ant_toggle_lookup,8,3          ## @ant_toggle_lookup
	.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	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, [x1]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x9, _ANT_C@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ANT_C@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #0
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
LBB0_4:
	ldrsw	x1, [x19]
	mov	x0, x20
	bl	_rs_is_valid_ant
	cbz	w0, LBB0_3
; %bb.5:
Lloh3:
	adrp	x22, _ant_toggle_lookup@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ant_toggle_lookup@GOTPAGEOFF]
	ldr	x8, [x22]
	ldrsw	x9, [x19]
	ldr	x21, [x8, x9, lsl #3]
	cmp	x21, x9
	b.eq	LBB0_2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_rs_is_valid_ant
	cbnz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x22]
	ldr	x21, [x8, x21, lsl #3]
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.ne	LBB0_6
; %bb.8:
	cmp	x21, w8, sxtw
	b.eq	LBB0_2
	b	LBB0_10
LBB0_9:
	ldr	w8, [x19]
	cmp	x21, w8, sxtw
	b.eq	LBB0_2
LBB0_10:
	str	w21, [x19]
	mov	w0, #1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ANT_C,4,2                      ; @ANT_C
	.comm	_ant_toggle_lookup,8,3          ; @ant_toggle_lookup
	.no_dead_strip	_rs_toggle_antenna
.subsections_via_symbols
