	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt312_set_tone
_mt312_set_tone:                        ## @mt312_set_tone
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SEC_TONE_OFF@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jae	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	movl	%esi, %ebx
	movq	(%rdi), %r14
	movq	_DISEQC_MODE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_mt312_readreg
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movl	(%r15), %esi
	movl	-28(%rbp), %edx
	andl	$64, %edx
	movl	%ebx, %eax
	leaq	l___const.mt312_set_tone.tone_tab(%rip), %rcx
	orl	(%rcx,%rax,4), %edx
	movq	%r14, %rdi
	callq	_mt312_writereg
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @__const.mt312_set_tone.tone_tab
l___const.mt312_set_tone.tone_tab:
	.long	1                               ## 0x1
	.long	0                               ## 0x0

	.comm	_SEC_TONE_OFF,4,2               ## @SEC_TONE_OFF
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DISEQC_MODE,4,2                ## @DISEQC_MODE
	.no_dead_strip	_mt312_set_tone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt312_set_tone
_mt312_set_tone:                        ; @mt312_set_tone
	.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
Lloh0:
	adrp	x8, _SEC_TONE_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEC_TONE_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
	mov	x19, x1
	ldr	x20, [x0]
Lloh6:
	adrp	x21, _DISEQC_MODE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _DISEQC_MODE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_mt312_readreg
	tbnz	w0, #31, LBB0_4
; %bb.3:
	ldr	w1, [x21]
	ldr	w8, [sp, #12]
	and	w8, w8, #0x40
Lloh8:
	adrp	x9, l___const.mt312_set_tone.tone_tab@PAGE
Lloh9:
	add	x9, x9, l___const.mt312_set_tone.tone_tab@PAGEOFF
	ldr	w9, [x9, w19, uxtw #2]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_mt312_writereg
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_4:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.mt312_set_tone.tone_tab
l___const.mt312_set_tone.tone_tab:
	.long	1                               ; 0x1
	.long	0                               ; 0x0

	.comm	_SEC_TONE_OFF,4,2               ; @SEC_TONE_OFF
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DISEQC_MODE,4,2                ; @DISEQC_MODE
	.no_dead_strip	_mt312_set_tone
.subsections_via_symbols
