	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0900_initialize
_stv0900_initialize:                    ## @stv0900_initialize
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r12
	movq	_R0900_MID@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_stv0900_read_reg
	movl	%eax, (%r12)
	movq	8(%r12), %rax
	movq	_STV0900_NO_ERROR@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_11
## %bb.3:
	movq	_R0900_P1_DMDISTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$92, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P2_DMDISTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$92, %edx
	callq	_stv0900_write_reg
	movl	$3, %edi
	callq	_msleep
	movq	_R0900_P1_TNRCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$108, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P2_TNRCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$111, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P1_I2CRPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$32, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P2_I2CRPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$32, %edx
	callq	_stv0900_write_reg
	movq	_R0900_NCOARSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$19, %edx
	callq	_stv0900_write_reg
	movl	$3, %edi
	callq	_msleep
	movq	_R0900_I2CCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$8, %edx
	callq	_stv0900_write_reg
	movl	16(%r12), %edx
	testl	$-3, %edx
	je	LBB0_5
## %bb.4:
	movq	_R0900_SYNTCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_stv0900_read_reg
	movl	%eax, %edx
	andl	$2, %edx
LBB0_5:
	movq	_R0900_SYNTCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	$32, %edx
	movq	%r12, %rdi
	callq	_stv0900_write_reg
	movl	$3, %edi
	callq	_msleep
	xorl	%ebx, %ebx
	movq	_STV0900_InitVal@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	movq	%r12, %rdi
	callq	_stv0900_write_reg
	incq	%rbx
	cmpq	$181, %rbx
	jne	LBB0_6
## %bb.7:
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_stv0900_read_reg
	cmpl	$32, %eax
	jl	LBB0_10
## %bb.8:
	movq	_R0900_TSGENERAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$12, %edx
	callq	_stv0900_write_reg
	xorl	%ebx, %ebx
	movq	_STV0900_Cut20_AddOnVal@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	movq	%r12, %rdi
	callq	_stv0900_write_reg
	incq	%rbx
	cmpq	$32, %rbx
	jne	LBB0_9
LBB0_10:
	movq	_R0900_P1_FSPYCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$108, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P2_FSPYCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$108, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P1_PDELCTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P2_PDELCTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$33, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P1_PDELCTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$32, %edx
	callq	_stv0900_write_reg
	movq	_R0900_P2_PDELCTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$32, %edx
	callq	_stv0900_write_reg
	movq	_R0900_TSTRES0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$128, %edx
	callq	_stv0900_write_reg
	movl	(%rbx), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_stv0900_write_reg
	movl	(%r14), %eax
	jmp	LBB0_11
LBB0_1:
	movq	_STV0900_INVALID_HANDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STV0900_INVALID_HANDLE,4,2     ## @STV0900_INVALID_HANDLE
	.comm	_R0900_MID,4,2                  ## @R0900_MID
	.comm	_STV0900_NO_ERROR,8,3           ## @STV0900_NO_ERROR
	.comm	_R0900_P1_DMDISTATE,4,2         ## @R0900_P1_DMDISTATE
	.comm	_R0900_P2_DMDISTATE,4,2         ## @R0900_P2_DMDISTATE
	.comm	_R0900_P1_TNRCFG,4,2            ## @R0900_P1_TNRCFG
	.comm	_R0900_P2_TNRCFG,4,2            ## @R0900_P2_TNRCFG
	.comm	_R0900_P1_I2CRPT,4,2            ## @R0900_P1_I2CRPT
	.comm	_R0900_P2_I2CRPT,4,2            ## @R0900_P2_I2CRPT
	.comm	_R0900_NCOARSE,4,2              ## @R0900_NCOARSE
	.comm	_R0900_I2CCFG,4,2               ## @R0900_I2CCFG
	.comm	_R0900_SYNTCTRL,4,2             ## @R0900_SYNTCTRL
	.comm	_STV0900_InitVal,8,3            ## @STV0900_InitVal
	.comm	_R0900_TSGENERAL,4,2            ## @R0900_TSGENERAL
	.comm	_STV0900_Cut20_AddOnVal,8,3     ## @STV0900_Cut20_AddOnVal
	.comm	_R0900_P1_FSPYCFG,4,2           ## @R0900_P1_FSPYCFG
	.comm	_R0900_P2_FSPYCFG,4,2           ## @R0900_P2_FSPYCFG
	.comm	_R0900_P1_PDELCTRL2,4,2         ## @R0900_P1_PDELCTRL2
	.comm	_R0900_P2_PDELCTRL2,4,2         ## @R0900_P2_PDELCTRL2
	.comm	_R0900_P1_PDELCTRL3,4,2         ## @R0900_P1_PDELCTRL3
	.comm	_R0900_P2_PDELCTRL3,4,2         ## @R0900_P2_PDELCTRL3
	.comm	_R0900_TSTRES0,4,2              ## @R0900_TSTRES0
	.no_dead_strip	_stv0900_initialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0900_initialize
_stv0900_initialize:                    ; @stv0900_initialize
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _R0900_MID@GOTPAGE
Lloh1:
	ldr	x21, [x21, _R0900_MID@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_stv0900_read_reg
	str	w0, [x19]
	ldr	x0, [x19, #8]
Lloh2:
	adrp	x20, _STV0900_NO_ERROR@GOTPAGE
Lloh3:
	ldr	x20, [x20, _STV0900_NO_ERROR@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.2:
Lloh4:
	adrp	x8, _R0900_P1_DMDISTATE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _R0900_P1_DMDISTATE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #92
	bl	_stv0900_write_reg
Lloh7:
	adrp	x8, _R0900_P2_DMDISTATE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _R0900_P2_DMDISTATE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #92
	bl	_stv0900_write_reg
	mov	w0, #3
	bl	_msleep
Lloh10:
	adrp	x8, _R0900_P1_TNRCFG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _R0900_P1_TNRCFG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #108
	bl	_stv0900_write_reg
Lloh13:
	adrp	x8, _R0900_P2_TNRCFG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _R0900_P2_TNRCFG@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #111
	bl	_stv0900_write_reg
Lloh16:
	adrp	x8, _R0900_P1_I2CRPT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _R0900_P1_I2CRPT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32
	bl	_stv0900_write_reg
Lloh19:
	adrp	x8, _R0900_P2_I2CRPT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _R0900_P2_I2CRPT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32
	bl	_stv0900_write_reg
Lloh22:
	adrp	x8, _R0900_NCOARSE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _R0900_NCOARSE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #19
	bl	_stv0900_write_reg
	mov	w0, #3
	bl	_msleep
Lloh25:
	adrp	x8, _R0900_I2CCFG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _R0900_I2CCFG@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #8
	bl	_stv0900_write_reg
	ldr	w8, [x19, #16]
	orr	w9, w8, #0x2
Lloh28:
	adrp	x22, _R0900_SYNTCTRL@GOTPAGE
Lloh29:
	ldr	x22, [x22, _R0900_SYNTCTRL@GOTPAGEOFF]
	cmp	w9, #2
	b.eq	LBB0_4
; %bb.3:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_stv0900_read_reg
	and	w8, w0, #0x2
LBB0_4:
	ldr	w1, [x22]
	orr	w2, w8, #0x20
	mov	x0, x19
	bl	_stv0900_write_reg
	mov	w0, #3
	bl	_msleep
	mov	x22, #0
Lloh30:
	adrp	x23, _STV0900_InitVal@GOTPAGE
Lloh31:
	ldr	x23, [x23, _STV0900_InitVal@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x8, [x8, x22]
	ldp	w1, w2, [x8]
	mov	x0, x19
	bl	_stv0900_write_reg
	add	x22, x22, #8
	cmp	x22, #1448
	b.ne	LBB0_5
; %bb.6:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stv0900_read_reg
	cmp	w0, #32
	b.lt	LBB0_9
; %bb.7:
Lloh32:
	adrp	x8, _R0900_TSGENERAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _R0900_TSGENERAL@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #12
	bl	_stv0900_write_reg
	mov	x21, #0
Lloh35:
	adrp	x22, _STV0900_Cut20_AddOnVal@GOTPAGE
Lloh36:
	ldr	x22, [x22, _STV0900_Cut20_AddOnVal@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x8, [x8, x21]
	ldp	w1, w2, [x8]
	mov	x0, x19
	bl	_stv0900_write_reg
	add	x21, x21, #8
	cmp	x21, #256
	b.ne	LBB0_8
LBB0_9:
Lloh37:
	adrp	x8, _R0900_P1_FSPYCFG@GOTPAGE
Lloh38:
	ldr	x8, [x8, _R0900_P1_FSPYCFG@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #108
	bl	_stv0900_write_reg
Lloh40:
	adrp	x8, _R0900_P2_FSPYCFG@GOTPAGE
Lloh41:
	ldr	x8, [x8, _R0900_P2_FSPYCFG@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #108
	bl	_stv0900_write_reg
Lloh43:
	adrp	x8, _R0900_P1_PDELCTRL2@GOTPAGE
Lloh44:
	ldr	x8, [x8, _R0900_P1_PDELCTRL2@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_stv0900_write_reg
Lloh46:
	adrp	x8, _R0900_P2_PDELCTRL2@GOTPAGE
Lloh47:
	ldr	x8, [x8, _R0900_P2_PDELCTRL2@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #33
	bl	_stv0900_write_reg
Lloh49:
	adrp	x8, _R0900_P1_PDELCTRL3@GOTPAGE
Lloh50:
	ldr	x8, [x8, _R0900_P1_PDELCTRL3@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32
	bl	_stv0900_write_reg
Lloh52:
	adrp	x8, _R0900_P2_PDELCTRL3@GOTPAGE
Lloh53:
	ldr	x8, [x8, _R0900_P2_PDELCTRL3@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32
	bl	_stv0900_write_reg
Lloh55:
	adrp	x21, _R0900_TSTRES0@GOTPAGE
Lloh56:
	ldr	x21, [x21, _R0900_TSTRES0@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #128
	bl	_stv0900_write_reg
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_stv0900_write_reg
	ldr	w0, [x20]
	b	LBB0_11
LBB0_10:
Lloh57:
	adrp	x8, _STV0900_INVALID_HANDLE@GOTPAGE
Lloh58:
	ldr	x8, [x8, _STV0900_INVALID_HANDLE@GOTPAGEOFF]
Lloh59:
	ldr	w0, [x8]
LBB0_11:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_STV0900_INVALID_HANDLE,4,2     ; @STV0900_INVALID_HANDLE
	.comm	_R0900_MID,4,2                  ; @R0900_MID
	.comm	_STV0900_NO_ERROR,8,3           ; @STV0900_NO_ERROR
	.comm	_R0900_P1_DMDISTATE,4,2         ; @R0900_P1_DMDISTATE
	.comm	_R0900_P2_DMDISTATE,4,2         ; @R0900_P2_DMDISTATE
	.comm	_R0900_P1_TNRCFG,4,2            ; @R0900_P1_TNRCFG
	.comm	_R0900_P2_TNRCFG,4,2            ; @R0900_P2_TNRCFG
	.comm	_R0900_P1_I2CRPT,4,2            ; @R0900_P1_I2CRPT
	.comm	_R0900_P2_I2CRPT,4,2            ; @R0900_P2_I2CRPT
	.comm	_R0900_NCOARSE,4,2              ; @R0900_NCOARSE
	.comm	_R0900_I2CCFG,4,2               ; @R0900_I2CCFG
	.comm	_R0900_SYNTCTRL,4,2             ; @R0900_SYNTCTRL
	.comm	_STV0900_InitVal,8,3            ; @STV0900_InitVal
	.comm	_R0900_TSGENERAL,4,2            ; @R0900_TSGENERAL
	.comm	_STV0900_Cut20_AddOnVal,8,3     ; @STV0900_Cut20_AddOnVal
	.comm	_R0900_P1_FSPYCFG,4,2           ; @R0900_P1_FSPYCFG
	.comm	_R0900_P2_FSPYCFG,4,2           ; @R0900_P2_FSPYCFG
	.comm	_R0900_P1_PDELCTRL2,4,2         ; @R0900_P1_PDELCTRL2
	.comm	_R0900_P2_PDELCTRL2,4,2         ; @R0900_P2_PDELCTRL2
	.comm	_R0900_P1_PDELCTRL3,4,2         ; @R0900_P1_PDELCTRL3
	.comm	_R0900_P2_PDELCTRL3,4,2         ; @R0900_P2_PDELCTRL3
	.comm	_R0900_TSTRES0,4,2              ; @R0900_TSTRES0
	.no_dead_strip	_stv0900_initialize
.subsections_via_symbols
