	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_set_tone
_stv090x_set_tone:                      ## @stv090x_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	(%rdi), %r15
	movq	_DISTXCTL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %r12d
	cmpl	$129, %ebx
	je	LBB0_6
## %bb.1:
	cmpl	$128, %ebx
	jne	LBB0_7
## %bb.2:
	movq	_DISTX_MODE_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movl	%r12d, %edi
	xorl	%edx, %edx
	callq	_STV090x_SETFIELD_Px
	movq	_DISEQC_RESET_FIELD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r12d, %edi
	movl	$1, %edx
	callq	_STV090x_SETFIELD_Px
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_STV090x_WRITE_DEMOD
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movl	(%rbx), %esi
	movl	%r12d, %edi
	xorl	%edx, %edx
	jmp	LBB0_4
LBB0_6:
	movq	_DISTX_MODE_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movl	%r12d, %edi
	xorl	%edx, %edx
	callq	_STV090x_SETFIELD_Px
	movq	_DISEQC_RESET_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	movl	$1, %edx
LBB0_4:
	callq	_STV090x_SETFIELD_Px
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_STV090x_WRITE_DEMOD
	testl	%eax, %eax
	jns	LBB0_8
LBB0_5:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	$-1, %r14d
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DISTXCTL,4,2                   ## @DISTXCTL
	.comm	_DISTX_MODE_FIELD,4,2           ## @DISTX_MODE_FIELD
	.comm	_DISEQC_RESET_FIELD,4,2         ## @DISEQC_RESET_FIELD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_set_tone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_set_tone
_stv090x_set_tone:                      ; @stv090x_set_tone
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x22, _DISTXCTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DISTXCTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x20, x0
	cmp	w21, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_7
; %bb.2:
Lloh2:
	adrp	x8, _DISTX_MODE_FIELD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DISTX_MODE_FIELD@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_STV090x_SETFIELD_Px
Lloh5:
	adrp	x21, _DISEQC_RESET_FIELD@GOTPAGE
Lloh6:
	ldr	x21, [x21, _DISEQC_RESET_FIELD@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #1
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_STV090x_WRITE_DEMOD
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #0
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _DISTX_MODE_FIELD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DISTX_MODE_FIELD@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_STV090x_SETFIELD_Px
Lloh10:
	adrp	x8, _DISEQC_RESET_FIELD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DISEQC_RESET_FIELD@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
LBB0_5:
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_STV090x_WRITE_DEMOD
	mov	x8, x0
	mov	w0, #0
	tbz	w8, #31, LBB0_8
LBB0_6:
Lloh13:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #-1
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DISTXCTL,4,2                   ; @DISTXCTL
	.comm	_DISTX_MODE_FIELD,4,2           ; @DISTX_MODE_FIELD
	.comm	_DISEQC_RESET_FIELD,4,2         ; @DISEQC_RESET_FIELD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_set_tone
.subsections_via_symbols
