	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv6110_init
_stv6110_init:                          ## @stv6110_init
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %r15
	movaps	l___const.stv6110_init.buf0+16(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	l___const.stv6110_init.buf0(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	(%r15), %rdi
	leaq	-64(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r15), %rax
	movq	_RSTV6110_CTRL1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	leaq	(%rax,%rdx,4), %rsi
	movl	$-249, %ecx
	andl	(%rax,%rdx,4), %ecx
	movl	%ecx, (%rax,%rdx,4)
	movslq	8(%r15), %rdi
	imulq	$1125899907, %rdi, %rdi         ## imm = 0x431BDE83
	movq	%rdi, %rbx
	shrq	$63, %rbx
	shrq	$50, %rdi
	addl	%ebx, %edi
	leal	128(,%rdi,8), %edi
	movzbl	%dil, %edi
	orl	%ecx, %edi
	movl	%edi, (%rax,%rdx,4)
	movq	_RSTV6110_CTRL2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$-193, %edi
	andl	(%rax,%rcx,4), %edi
	movl	%edi, (%rax,%rcx,4)
	movl	12(%r15), %ebx
	shll	$6, %ebx
	orl	%edi, %ebx
	movl	%ebx, (%rax,%rcx,4)
	movq	%r14, %rdi
	movl	$8, %ecx
	callq	_stv6110_write_regs
	movl	$1, %edi
	callq	_msleep
	movq	%r14, %rdi
	movl	$72000000, %esi                 ## imm = 0x44AA200
	callq	_stv6110_set_bandwidth
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.stv6110_init.buf0
l___const.stv6110_init.buf0:
	.long	7                               ## 0x7
	.long	17                              ## 0x11
	.long	220                             ## 0xdc
	.long	133                             ## 0x85
	.long	23                              ## 0x17
	.long	1                               ## 0x1
	.long	230                             ## 0xe6
	.long	30                              ## 0x1e

	.comm	_RSTV6110_CTRL1,8,3             ## @RSTV6110_CTRL1
	.comm	_RSTV6110_CTRL2,8,3             ## @RSTV6110_CTRL2
	.no_dead_strip	_stv6110_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv6110_init
_stv6110_init:                          ; @stv6110_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, l___const.stv6110_init.buf0@PAGE
Lloh4:
	add	x8, x8, l___const.stv6110_init.buf0@PAGEOFF
	ldr	x20, [x0]
	ldp	q0, q1, [x8]
	stp	q0, q1, [sp]
	ldr	x0, [x20]
	mov	x1, sp
	mov	w2, #8
	bl	_memcpy
Lloh5:
	adrp	x8, _RSTV6110_CTRL1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RSTV6110_CTRL1@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh7:
	ldr	x2, [x8]
	add	x1, x9, x2, lsl #2
	ldr	w8, [x1]
	and	w8, w8, #0xffffff07
	str	w8, [x1]
	ldrsw	x10, [x20, #8]
	mov	w11, #56963
	movk	w11, #17179, lsl #16
	mul	x10, x10, x11
	lsr	x11, x10, #63
	lsr	x10, x10, #50
	add	w10, w10, w11
	lsl	w10, w10, #3
	add	w10, w10, #128
	and	w10, w10, #0xf8
	orr	w8, w10, w8
Lloh8:
	adrp	x10, _RSTV6110_CTRL2@GOTPAGE
Lloh9:
	ldr	x10, [x10, _RSTV6110_CTRL2@GOTPAGEOFF]
	str	w8, [x1]
Lloh10:
	ldr	x8, [x10]
	lsl	x8, x8, #2
	ldr	w10, [x9, x8]
	and	w10, w10, #0xffffff3f
	str	w10, [x9, x8]
	ldr	w11, [x20, #12]
	orr	w10, w10, w11, lsl #6
	str	w10, [x9, x8]
	mov	x0, x19
	mov	w3, #8
	bl	_stv6110_write_regs
	mov	w0, #1
	bl	_msleep
	mov	x0, x19
	mov	w1, #41472
	movk	w1, #1098, lsl #16
	bl	_stv6110_set_bandwidth
	ldur	x8, [x29, #-24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.stv6110_init.buf0
l___const.stv6110_init.buf0:
	.long	7                               ; 0x7
	.long	17                              ; 0x11
	.long	220                             ; 0xdc
	.long	133                             ; 0x85
	.long	23                              ; 0x17
	.long	1                               ; 0x1
	.long	230                             ; 0xe6
	.long	30                              ; 0x1e

	.comm	_RSTV6110_CTRL1,8,3             ; @RSTV6110_CTRL1
	.comm	_RSTV6110_CTRL2,8,3             ; @RSTV6110_CTRL2
	.no_dead_strip	_stv6110_init
.subsections_via_symbols
