	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venc_set_576p50
_venc_set_576p50:                       ## @venc_set_576p50
	.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
	movq	%rdi, %r15
	callq	_to_state
	movq	%rax, %rbx
	movq	8(%rax), %r12
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rcx
	movl	$2, %esi
	movq	%r15, %rdx
	callq	_v4l2_dbg
	movq	(%rbx), %rax
	movq	_VPBE_VERSION_1@GOTPCREL(%rip), %rcx
	movq	_VPBE_VERSION_2@GOTPCREL(%rip), %r14
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	cmpq	(%r14), %rax
	jne	LBB0_2
LBB0_3:
	movq	_VPBE_ENC_DV_TIMINGS@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	$27000000, %esi                 ## imm = 0x19BFCC0
	callq	*(%r12)
	testq	%rax, %rax
	js	LBB0_2
## %bb.4:
	movq	(%rbx), %rdi
	movl	(%r13), %esi
	movl	$27000000, %edx                 ## imm = 0x19BFCC0
	callq	_venc_enable_vpss_clock
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_venc_enabledigitaloutput
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_6
## %bb.5:
	movq	_VDAC_CONFIG_HD_V2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vdaccfg_write
LBB0_6:
	movq	_VENC_OSDCLK0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_write
	movq	_VENC_OSDCLK1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %r12d
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_venc_write
	movq	(%rbx), %rax
	movq	_VPBE_VERSION_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_VENC_VDPRO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_VENC_VDPRO_DAFRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_venc_modify
	movl	(%rbx), %esi
	movq	_VENC_VDPRO_DAUPS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_venc_modify
LBB0_8:
	movq	_VENC_VMOD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_write
	movq	_VENC_VMOD_VIE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movl	(%rbx), %esi
	movq	_VENC_VMOD_VIE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_venc_modify
	movl	(%rbx), %esi
	movq	_VENC_VMOD_HDMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_venc_modify
	movq	_HDTV_625P@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_VENC_VMOD_TVTYP_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movl	(%rbx), %esi
	movq	_VENC_VMOD_TVTYP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_venc_modify
	movq	_VENC_VMOD_VDMD_YCBCR8@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_VENC_VMOD_VDMD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movl	(%rbx), %esi
	movq	_VENC_VMOD_VDMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_venc_modify
	movl	(%rbx), %esi
	movq	_VENC_VMOD_VENC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_venc_modify
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"venc_set_576p50\n"

	.comm	_VPBE_VERSION_1,8,3             ## @VPBE_VERSION_1
	.comm	_VPBE_VERSION_2,8,3             ## @VPBE_VERSION_2
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VPBE_ENC_DV_TIMINGS,4,2        ## @VPBE_ENC_DV_TIMINGS
	.comm	_VDAC_CONFIG_HD_V2,4,2          ## @VDAC_CONFIG_HD_V2
	.comm	_VENC_OSDCLK0,4,2               ## @VENC_OSDCLK0
	.comm	_VENC_OSDCLK1,4,2               ## @VENC_OSDCLK1
	.comm	_VENC_VDPRO,4,2                 ## @VENC_VDPRO
	.comm	_VENC_VDPRO_DAFRQ,4,2           ## @VENC_VDPRO_DAFRQ
	.comm	_VENC_VDPRO_DAUPS,4,2           ## @VENC_VDPRO_DAUPS
	.comm	_VENC_VMOD,4,2                  ## @VENC_VMOD
	.comm	_VENC_VMOD_VIE_SHIFT,4,2        ## @VENC_VMOD_VIE_SHIFT
	.comm	_VENC_VMOD_VIE,4,2              ## @VENC_VMOD_VIE
	.comm	_VENC_VMOD_HDMD,4,2             ## @VENC_VMOD_HDMD
	.comm	_HDTV_625P,4,2                  ## @HDTV_625P
	.comm	_VENC_VMOD_TVTYP_SHIFT,4,2      ## @VENC_VMOD_TVTYP_SHIFT
	.comm	_VENC_VMOD_TVTYP,4,2            ## @VENC_VMOD_TVTYP
	.comm	_VENC_VMOD_VDMD_YCBCR8,4,2      ## @VENC_VMOD_VDMD_YCBCR8
	.comm	_VENC_VMOD_VDMD_SHIFT,4,2       ## @VENC_VMOD_VDMD_SHIFT
	.comm	_VENC_VMOD_VDMD,4,2             ## @VENC_VMOD_VDMD
	.comm	_VENC_VMOD_VENC,4,2             ## @VENC_VMOD_VENC
	.no_dead_strip	_venc_set_576p50
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venc_set_576p50
_venc_set_576p50:                       ; @venc_set_576p50
	.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
	mov	x19, x0
	bl	_to_state
	mov	x20, x0
	ldr	x23, [x0, #8]
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w1, #2
	mov	x2, x19
	bl	_v4l2_dbg
	ldr	x8, [x20]
Lloh5:
	adrp	x21, _VPBE_VERSION_1@GOTPAGE
Lloh6:
	ldr	x21, [x21, _VPBE_VERSION_1@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh7:
	adrp	x22, _VPBE_VERSION_2@GOTPAGE
Lloh8:
	ldr	x22, [x22, _VPBE_VERSION_2@GOTPAGEOFF]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
; %bb.1:
	ldr	x8, [x23]
Lloh9:
	adrp	x23, _VPBE_ENC_DV_TIMINGS@GOTPAGE
Lloh10:
	ldr	x23, [x23, _VPBE_ENC_DV_TIMINGS@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #64704
	movk	w1, #411, lsl #16
	blr	x8
	tbnz	x0, #63, LBB0_7
; %bb.2:
	ldr	x0, [x20]
	ldr	w1, [x23]
	mov	w2, #64704
	movk	w2, #411, lsl #16
	bl	_venc_enable_vpss_clock
	mov	x0, x19
	mov	w1, #0
	bl	_venc_enabledigitaloutput
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _VDAC_CONFIG_HD_V2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VDAC_CONFIG_HD_V2@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vdaccfg_write
LBB0_4:
Lloh14:
	adrp	x8, _VENC_OSDCLK0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VENC_OSDCLK0@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_write
Lloh17:
	adrp	x8, _VENC_OSDCLK1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VENC_OSDCLK1@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w22, #1
	mov	x0, x19
	mov	w2, #1
	bl	_venc_write
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh20:
	adrp	x20, _VENC_VDPRO@GOTPAGE
Lloh21:
	ldr	x20, [x20, _VENC_VDPRO@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh22:
	adrp	x8, _VENC_VDPRO_DAFRQ@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VENC_VDPRO_DAFRQ@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_venc_modify
	ldr	w1, [x20]
Lloh25:
	adrp	x8, _VENC_VDPRO_DAUPS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _VENC_VDPRO_DAUPS@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_venc_modify
LBB0_6:
Lloh28:
	adrp	x20, _VENC_VMOD@GOTPAGE
Lloh29:
	ldr	x20, [x20, _VENC_VMOD@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_write
Lloh30:
	adrp	x8, _VENC_VMOD_VIE_SHIFT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VENC_VMOD_VIE_SHIFT@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh32:
	ldr	w8, [x8]
	lsl	w2, w22, w8
Lloh33:
	adrp	x8, _VENC_VMOD_VIE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _VENC_VMOD_VIE@GOTPAGEOFF]
Lloh35:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_venc_modify
	ldr	w1, [x20]
Lloh36:
	adrp	x8, _VENC_VMOD_HDMD@GOTPAGE
Lloh37:
	ldr	x8, [x8, _VENC_VMOD_HDMD@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_venc_modify
	ldr	w1, [x20]
Lloh39:
	adrp	x8, _HDTV_625P@GOTPAGE
Lloh40:
	ldr	x8, [x8, _HDTV_625P@GOTPAGEOFF]
Lloh41:
	adrp	x9, _VENC_VMOD_TVTYP_SHIFT@GOTPAGE
Lloh42:
	ldr	x9, [x9, _VENC_VMOD_TVTYP_SHIFT@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	ldr	w9, [x9]
	lsl	w2, w8, w9
Lloh45:
	adrp	x8, _VENC_VMOD_TVTYP@GOTPAGE
Lloh46:
	ldr	x8, [x8, _VENC_VMOD_TVTYP@GOTPAGEOFF]
Lloh47:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_venc_modify
	ldr	w1, [x20]
Lloh48:
	adrp	x8, _VENC_VMOD_VDMD_YCBCR8@GOTPAGE
Lloh49:
	ldr	x8, [x8, _VENC_VMOD_VDMD_YCBCR8@GOTPAGEOFF]
Lloh50:
	adrp	x9, _VENC_VMOD_VDMD_SHIFT@GOTPAGE
Lloh51:
	ldr	x9, [x9, _VENC_VMOD_VDMD_SHIFT@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
Lloh53:
	ldr	w9, [x9]
	lsl	w2, w8, w9
Lloh54:
	adrp	x8, _VENC_VMOD_VDMD@GOTPAGE
Lloh55:
	ldr	x8, [x8, _VENC_VMOD_VDMD@GOTPAGEOFF]
Lloh56:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_venc_modify
	ldr	w1, [x20]
Lloh57:
	adrp	x8, _VENC_VMOD_VENC@GOTPAGE
Lloh58:
	ldr	x8, [x8, _VENC_VMOD_VENC@GOTPAGEOFF]
Lloh59:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_venc_modify
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh60:
	adrp	x8, _EINVAL@GOTPAGE
Lloh61:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh52
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh43
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"venc_set_576p50\n"

	.comm	_VPBE_VERSION_1,8,3             ; @VPBE_VERSION_1
	.comm	_VPBE_VERSION_2,8,3             ; @VPBE_VERSION_2
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VPBE_ENC_DV_TIMINGS,4,2        ; @VPBE_ENC_DV_TIMINGS
	.comm	_VDAC_CONFIG_HD_V2,4,2          ; @VDAC_CONFIG_HD_V2
	.comm	_VENC_OSDCLK0,4,2               ; @VENC_OSDCLK0
	.comm	_VENC_OSDCLK1,4,2               ; @VENC_OSDCLK1
	.comm	_VENC_VDPRO,4,2                 ; @VENC_VDPRO
	.comm	_VENC_VDPRO_DAFRQ,4,2           ; @VENC_VDPRO_DAFRQ
	.comm	_VENC_VDPRO_DAUPS,4,2           ; @VENC_VDPRO_DAUPS
	.comm	_VENC_VMOD,4,2                  ; @VENC_VMOD
	.comm	_VENC_VMOD_VIE_SHIFT,4,2        ; @VENC_VMOD_VIE_SHIFT
	.comm	_VENC_VMOD_VIE,4,2              ; @VENC_VMOD_VIE
	.comm	_VENC_VMOD_HDMD,4,2             ; @VENC_VMOD_HDMD
	.comm	_HDTV_625P,4,2                  ; @HDTV_625P
	.comm	_VENC_VMOD_TVTYP_SHIFT,4,2      ; @VENC_VMOD_TVTYP_SHIFT
	.comm	_VENC_VMOD_TVTYP,4,2            ; @VENC_VMOD_TVTYP
	.comm	_VENC_VMOD_VDMD_YCBCR8,4,2      ; @VENC_VMOD_VDMD_YCBCR8
	.comm	_VENC_VMOD_VDMD_SHIFT,4,2       ; @VENC_VMOD_VDMD_SHIFT
	.comm	_VENC_VMOD_VDMD,4,2             ; @VENC_VMOD_VDMD
	.comm	_VENC_VMOD_VENC,4,2             ; @VENC_VMOD_VENC
	.no_dead_strip	_venc_set_576p50
.subsections_via_symbols
