	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0299_set_tone
_stv0299_set_tone:                      ## @stv0299_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$100, %esi
	callq	_stv0299_wait_diseqc_idle
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_stv0299_readreg
	cmpl	$129, %r14d
	je	LBB0_6
## %bb.3:
	cmpl	$128, %r14d
	jne	LBB0_7
## %bb.4:
	orl	$3, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_6:
	andl	$-4, %eax
	orl	$2, %eax
LBB0_5:
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	%eax, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_stv0299_writeregI              ## TAILCALL
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_stv0299_set_tone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0299_set_tone
_stv0299_set_tone:                      ; @stv0299_set_tone
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	mov	w1, #100
	bl	_stv0299_wait_diseqc_idle
	tbnz	x0, #63, LBB0_4
; %bb.1:
	mov	x0, x19
	mov	w1, #8
	bl	_stv0299_readreg
	cmp	w20, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w20, #128
	b.ne	LBB0_7
; %bb.3:
	orr	w2, w0, #0x3
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	and	w8, w0, #0xfffffffc
	orr	w2, w8, #0x2
LBB0_6:
	mov	x0, x19
	mov	w1, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_stv0299_writeregI
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_stv0299_set_tone
.subsections_via_symbols
