	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fm_rx_set_channel_spacing
_fm_rx_set_channel_spacing:             ## @fm_rx_set_channel_spacing
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r14
	leal	-1(%rsi), %eax
	addl	$-50001, %esi                   ## imm = 0xFFFF3CAF
	cmpl	$50000, %esi                    ## imm = 0xC350
	jae	LBB0_1
## %bb.2:
	movq	_FM_CHANNEL_SPACING_100KHZ@GOTPCREL(%rip), %rcx
	cmpl	$50000, %eax                    ## imm = 0xC350
	jb	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_FM_CHANNEL_SPACING_200KHZ@GOTPCREL(%rip), %rcx
	cmpl	$50000, %eax                    ## imm = 0xC350
	jae	LBB0_5
LBB0_4:
	movq	_FM_CHANNEL_SPACING_50KHZ@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %ebx
	movl	%ebx, -20(%rbp)
	movq	_CHANL_BW_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	$0, (%rsp)
	leaq	-20(%rbp), %rcx
	movq	%r14, %rdi
	movl	$4, %r8d
	xorl	%r9d, %r9d
	callq	_fmc_send_cmd
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movq	_FM_FREQ_MUL@GOTPCREL(%rip), %rcx
	imull	(%rcx), %ebx
	movl	%ebx, (%r14)
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FM_CHANNEL_SPACING_50KHZ,4,2   ## @FM_CHANNEL_SPACING_50KHZ
	.comm	_FM_CHANNEL_SPACING_100KHZ,4,2  ## @FM_CHANNEL_SPACING_100KHZ
	.comm	_FM_CHANNEL_SPACING_200KHZ,4,2  ## @FM_CHANNEL_SPACING_200KHZ
	.comm	_CHANL_BW_SET,4,2               ## @CHANL_BW_SET
	.comm	_REG_WR,4,2                     ## @REG_WR
	.comm	_FM_FREQ_MUL,4,2                ## @FM_FREQ_MUL
	.no_dead_strip	_fm_rx_set_channel_spacing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fm_rx_set_channel_spacing
_fm_rx_set_channel_spacing:             ; @fm_rx_set_channel_spacing
	.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
	mov	x19, x0
	sub	w8, w1, #1
	mov	w9, #-50001
	add	w9, w1, w9
Lloh0:
	adrp	x10, _FM_CHANNEL_SPACING_50KHZ@GOTPAGE
Lloh1:
	ldr	x10, [x10, _FM_CHANNEL_SPACING_50KHZ@GOTPAGEOFF]
Lloh2:
	adrp	x11, _FM_CHANNEL_SPACING_100KHZ@GOTPAGE
Lloh3:
	ldr	x11, [x11, _FM_CHANNEL_SPACING_100KHZ@GOTPAGEOFF]
Lloh4:
	adrp	x12, _FM_CHANNEL_SPACING_200KHZ@GOTPAGE
Lloh5:
	ldr	x12, [x12, _FM_CHANNEL_SPACING_200KHZ@GOTPAGEOFF]
	lsr	w9, w9, #4
	cmp	w9, #3125
	csel	x9, x11, x12, lo
	lsr	w8, w8, #4
	cmp	w8, #3125
	csel	x8, x10, x9, lo
	ldr	w20, [x8]
	str	w20, [sp, #12]
Lloh6:
	adrp	x8, _CHANL_BW_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CHANL_BW_SET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _REG_WR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_WR@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	w4, #4
	mov	x5, #0
	mov	x6, #0
	bl	_fmc_send_cmd
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _FM_FREQ_MUL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FM_FREQ_MUL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mul	w8, w8, w20
	str	w8, [x19]
LBB0_2:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_FM_CHANNEL_SPACING_50KHZ,4,2   ; @FM_CHANNEL_SPACING_50KHZ
	.comm	_FM_CHANNEL_SPACING_100KHZ,4,2  ; @FM_CHANNEL_SPACING_100KHZ
	.comm	_FM_CHANNEL_SPACING_200KHZ,4,2  ; @FM_CHANNEL_SPACING_200KHZ
	.comm	_CHANL_BW_SET,4,2               ; @CHANL_BW_SET
	.comm	_REG_WR,4,2                     ; @REG_WR
	.comm	_FM_FREQ_MUL,4,2                ; @FM_FREQ_MUL
	.no_dead_strip	_fm_rx_set_channel_spacing
.subsections_via_symbols
