	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fm_tx_set_af                   ## -- Begin function fm_tx_set_af
	.p2align	4, 0x90
_fm_tx_set_af:                          ## @fm_tx_set_af
	.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
	movq	(%rdi), %rax
	movq	_FM_MODE_TX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_fmdbg
	addl	$-87500, %ebx                   ## imm = 0xFFFEAA34
	movslq	%ebx, %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	cltq
	movq	%rax, -24(%rbp)
	movq	_TA_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	$0, (%rsp)
	leaq	-24(%rbp), %rcx
	movq	%r14, %rdi
	movl	$8, %r8d
	xorl	%r9d, %r9d
	callq	_fmc_send_cmd
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FM_MODE_TX,8,3                 ## @FM_MODE_TX
	.comm	_EPERM,4,2                      ## @EPERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AF: %d\n"

	.comm	_TA_SET,4,2                     ## @TA_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_tx_set_af                   ; -- Begin function fm_tx_set_af
	.p2align	2
_fm_tx_set_af:                          ; @fm_tx_set_af
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _FM_MODE_TX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FM_MODE_TX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fmdbg
	sub	w8, w20, #21, lsl #12           ; =86016
	sub	w8, w8, #1484
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	sxtw	x8, w8
	str	x8, [sp, #8]
Lloh5:
	adrp	x8, _TA_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TA_SET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _REG_WR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_WR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w4, #8
	mov	x5, #0
	mov	x6, #0
	bl	_fmc_send_cmd
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x8, _EPERM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FM_MODE_TX,8,3                 ; @FM_MODE_TX
	.comm	_EPERM,4,2                      ; @EPERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AF: %d\n"

	.comm	_TA_SET,4,2                     ; @TA_SET
	.comm	_REG_WR,4,2                     ; @REG_WR
.subsections_via_symbols
