	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fm_tx_set_freq                 ## -- Begin function fm_tx_set_freq
	.p2align	4, 0x90
_fm_tx_set_freq:                        ## @fm_tx_set_freq
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_FM_CORE_TX_XMITING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_enable_xmit
	movl	(%rbx), %edi
	movq	%r12, %rsi
	callq	_clear_bit
LBB0_2:
	movq	_FM_FR_EVENT@GOTPCREL(%rip), %rax
	movq	_FM_BL_EVENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -44(%rbp)
	movq	_INT_MASK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_WR@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	$0, (%rsp)
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	movl	$4, %r8d
	xorl	%r9d, %r9d
	callq	_fmc_send_cmd
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	movslq	%r15d, %rbx
	movq	%rbx, 8(%r12)
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_fmdbg
	imulq	$1717986919, %rbx, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movl	%eax, -44(%rbp)
	movq	_CHANL_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	$0, (%rsp)
	xorl	%r14d, %r14d
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	movl	$4, %r8d
	xorl	%r9d, %r9d
	callq	_fmc_send_cmd
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movl	32(%r12), %esi
	movq	%r12, %rdi
	callq	_fm_tx_set_pwr_lvl
	movl	28(%r12), %esi
	movq	%r12, %rdi
	callq	_fm_tx_set_preemph_filter
	movl	$1, 16(%r12)
	movq	%r12, %rdi
	callq	_set_audio_io
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_enable_xmit
	movq	_FM_STEREO_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movq	_FM_RDS_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	jmp	LBB0_7
LBB0_6:
	movl	%eax, %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FM_CORE_TX_XMITING,4,2         ## @FM_CORE_TX_XMITING
	.comm	_FM_FR_EVENT,4,2                ## @FM_FR_EVENT
	.comm	_FM_BL_EVENT,4,2                ## @FM_BL_EVENT
	.comm	_INT_MASK_SET,4,2               ## @INT_MASK_SET
	.comm	_REG_WR,4,2                     ## @REG_WR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx: freq_to_set %ld\n"

	.comm	_CHANL_SET,4,2                  ## @CHANL_SET
	.comm	_FM_STEREO_MODE,4,2             ## @FM_STEREO_MODE
	.comm	_FM_RDS_DISABLE,4,2             ## @FM_RDS_DISABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fm_tx_set_freq                 ; -- Begin function fm_tx_set_freq
	.p2align	2
_fm_tx_set_freq:                        ; @fm_tx_set_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _FM_CORE_TX_XMITING@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FM_CORE_TX_XMITING@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_enable_xmit
	ldr	w0, [x21]
	mov	x1, x19
	bl	_clear_bit
LBB0_2:
Lloh2:
	adrp	x8, _FM_FR_EVENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FM_FR_EVENT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _FM_BL_EVENT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FM_BL_EVENT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #12]
Lloh8:
	adrp	x8, _INT_MASK_SET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INT_MASK_SET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x21, _REG_WR@GOTPAGE
Lloh12:
	ldr	x21, [x21, _REG_WR@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	mov	x5, #0
	mov	x6, #0
	bl	_fmc_send_cmd
	tbnz	w0, #31, LBB0_5
; %bb.3:
	sxtw	x1, w20
	str	x1, [x19, #8]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fmdbg
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	smull	x8, w20, w8
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	str	w8, [sp, #12]
Lloh15:
	adrp	x8, _CHANL_SET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CHANL_SET@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w2, [x21]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	mov	x5, #0
	mov	x6, #0
	bl	_fmc_send_cmd
	tbnz	w0, #31, LBB0_5
; %bb.4:
	ldr	w1, [x19, #32]
	mov	x0, x19
	bl	_fm_tx_set_pwr_lvl
	ldr	w1, [x19, #28]
	mov	x0, x19
	bl	_fm_tx_set_preemph_filter
	mov	w8, #1
	str	w8, [x19, #16]
	mov	x0, x19
	bl	_set_audio_io
	mov	x0, x19
	mov	w1, #1
	bl	_enable_xmit
	mov	w0, #0
Lloh18:
	adrp	x8, _FM_STEREO_MODE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FM_STEREO_MODE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _FM_RDS_DISABLE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _FM_RDS_DISABLE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #20]
LBB0_5:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_FM_CORE_TX_XMITING,4,2         ; @FM_CORE_TX_XMITING
	.comm	_FM_FR_EVENT,4,2                ; @FM_FR_EVENT
	.comm	_FM_BL_EVENT,4,2                ; @FM_BL_EVENT
	.comm	_INT_MASK_SET,4,2               ; @INT_MASK_SET
	.comm	_REG_WR,4,2                     ; @REG_WR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx: freq_to_set %ld\n"

	.comm	_CHANL_SET,4,2                  ; @CHANL_SET
	.comm	_FM_STEREO_MODE,4,2             ; @FM_STEREO_MODE
	.comm	_FM_RDS_DISABLE,4,2             ; @FM_RDS_DISABLE
.subsections_via_symbols
