	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fm_rx_set_rssi_threshold       ## -- Begin function fm_rx_set_rssi_threshold
	.p2align	4, 0x90
_fm_rx_set_rssi_threshold:              ## @fm_rx_set_rssi_threshold
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	_FM_RX_RSSI_THRESHOLD_MIN@GOTPCREL(%rip), %rax
	cmpw	%r15w, (%rax)
	jg	LBB0_2
## %bb.1:
	movq	_FM_RX_RSSI_THRESHOLD_MAX@GOTPCREL(%rip), %rax
	cmpw	%r15w, (%rax)
	jl	LBB0_2
## %bb.3:
	movq	%rdi, %r14
	movswq	%r15w, %rax
	movq	%rax, -32(%rbp)
	movq	_SEARCH_LVL_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	$0, (%rsp)
	xorl	%ebx, %ebx
	leaq	-32(%rbp), %rcx
	movl	$8, %r8d
	xorl	%r9d, %r9d
	callq	_fmc_send_cmd
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movw	%r15w, (%r14)
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_fmerr
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_4:
	movl	%eax, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FM_RX_RSSI_THRESHOLD_MIN,2,1   ## @FM_RX_RSSI_THRESHOLD_MIN
	.comm	_FM_RX_RSSI_THRESHOLD_MAX,2,1   ## @FM_RX_RSSI_THRESHOLD_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid RSSI threshold level\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SEARCH_LVL_SET,4,2             ## @SEARCH_LVL_SET
	.comm	_REG_WR,4,2                     ## @REG_WR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fm_rx_set_rssi_threshold       ; -- Begin function fm_rx_set_rssi_threshold
	.p2align	2
_fm_rx_set_rssi_threshold:              ; @fm_rx_set_rssi_threshold
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _FM_RX_RSSI_THRESHOLD_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FM_RX_RSSI_THRESHOLD_MIN@GOTPAGEOFF]
Lloh2:
	ldrsh	w8, [x8]
Lloh3:
	adrp	x9, _FM_RX_RSSI_THRESHOLD_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FM_RX_RSSI_THRESHOLD_MAX@GOTPAGEOFF]
Lloh5:
	ldrsh	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #8, le
	b.ge	LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fmerr
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	sxtw	x8, w19
	str	x8, [sp, #8]
Lloh11:
	adrp	x8, _SEARCH_LVL_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEARCH_LVL_SET@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _REG_WR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_WR@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	w4, #8
	mov	x5, #0
	mov	x6, #0
	bl	_fmc_send_cmd
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	w0, #0
	strh	w19, [x20]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FM_RX_RSSI_THRESHOLD_MIN,2,1   ; @FM_RX_RSSI_THRESHOLD_MIN
	.comm	_FM_RX_RSSI_THRESHOLD_MAX,2,1   ; @FM_RX_RSSI_THRESHOLD_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid RSSI threshold level\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SEARCH_LVL_SET,4,2             ; @SEARCH_LVL_SET
	.comm	_REG_WR,4,2                     ; @REG_WR
.subsections_via_symbols
