	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venc_set_ntsc
_venc_set_ntsc:                         ## @venc_set_ntsc
	.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), %r13
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rcx
	movl	$2, %esi
	movq	%r15, %rdx
	callq	_v4l2_dbg
	movq	_VPSS_VENC_CLOCK_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_vpss_enable_clock
	movq	_VPBE_ENC_STD@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	*(%r13)
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	(%rbx), %rdi
	movl	(%r14), %esi
	movl	(%r12), %edx
	callq	_venc_enable_vpss_clock
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_venc_enabledigitaloutput
	movq	(%rbx), %rax
	movq	_VPBE_VERSION_3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	_VENC_CLKCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_venc_write
	movq	_VENC_VIDCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_write
	movq	_VDAC_CONFIG_SD_V3@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_5:
	movq	_VPBE_VERSION_2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_VENC_CLKCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_venc_write
	movq	_VENC_VIDCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_write
	movq	_VDAC_CONFIG_SD_V2@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vdaccfg_write
	jmp	LBB0_8
LBB0_7:
	movq	_VENC_VIDCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	$2, %ecx
	callq	_venc_modify
	movq	_VENC_YCCCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_venc_write
	movq	_VENC_VDPRO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_VENC_VDPRO_DAFRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_modify
	movl	(%rbx), %esi
	movq	_VENC_VDPRO_DAUPS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_modify
LBB0_8:
	movq	_VENC_VMOD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_write
	movq	_VENC_VMOD_VIE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movl	(%rbx), %esi
	movq	_VENC_VMOD_VIE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_venc_modify
	movl	(%rbx), %esi
	movq	_VENC_VMOD_VMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_modify
	movl	(%rbx), %esi
	movq	_VENC_VMOD_TVTYP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_modify
	movq	_VENC_DACTST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_venc_write
	movl	(%rbx), %esi
	movq	_VENC_VMOD_VENC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_venc_modify
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_ntsc\n"

	.comm	_VPSS_VENC_CLOCK_SEL,4,2        ## @VPSS_VENC_CLOCK_SEL
	.comm	_VPBE_ENC_STD,4,2               ## @VPBE_ENC_STD
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VPBE_VERSION_3,8,3             ## @VPBE_VERSION_3
	.comm	_VENC_CLKCTL,4,2                ## @VENC_CLKCTL
	.comm	_VENC_VIDCTL,4,2                ## @VENC_VIDCTL
	.comm	_VDAC_CONFIG_SD_V3,4,2          ## @VDAC_CONFIG_SD_V3
	.comm	_VPBE_VERSION_2,8,3             ## @VPBE_VERSION_2
	.comm	_VDAC_CONFIG_SD_V2,4,2          ## @VDAC_CONFIG_SD_V2
	.comm	_VENC_YCCCTL,4,2                ## @VENC_YCCCTL
	.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_VMD,4,2              ## @VENC_VMOD_VMD
	.comm	_VENC_VMOD_TVTYP_SHIFT,4,2      ## @VENC_VMOD_TVTYP_SHIFT
	.comm	_VENC_VMOD_TVTYP,4,2            ## @VENC_VMOD_TVTYP
	.comm	_VENC_DACTST,4,2                ## @VENC_DACTST
	.comm	_VENC_VMOD_VENC,4,2             ## @VENC_VMOD_VENC
	.no_dead_strip	_venc_set_ntsc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venc_set_ntsc
_venc_set_ntsc:                         ; @venc_set_ntsc
	.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	x19, x0
	bl	_to_state
	mov	x20, x0
	ldr	x21, [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
Lloh5:
	adrp	x8, _VPSS_VENC_CLOCK_SEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VPSS_VENC_CLOCK_SEL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_vpss_enable_clock
	ldr	x8, [x21]
Lloh8:
	adrp	x21, _VPBE_ENC_STD@GOTPAGE
Lloh9:
	ldr	x21, [x21, _VPBE_ENC_STD@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh10:
	adrp	x22, _V4L2_STD_525_60@GOTPAGE
Lloh11:
	ldr	x22, [x22, _V4L2_STD_525_60@GOTPAGEOFF]
	ldr	w1, [x22]
	blr	x8
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	x0, [x20]
	ldr	w1, [x21]
	ldr	w2, [x22]
	bl	_venc_enable_vpss_clock
	mov	x0, x19
	mov	w1, #0
	bl	_venc_enabledigitaloutput
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _VPBE_VERSION_3@GOTPAGE
Lloh13:
	ldr	x9, [x9, _VPBE_VERSION_3@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh15:
	adrp	x8, _VENC_CLKCTL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VENC_CLKCTL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_venc_write
Lloh18:
	adrp	x8, _VENC_VIDCTL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VENC_VIDCTL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_write
Lloh21:
	adrp	x8, _VDAC_CONFIG_SD_V3@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VDAC_CONFIG_SD_V3@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_4:
Lloh26:
	adrp	x9, _VPBE_VERSION_2@GOTPAGE
Lloh27:
	ldr	x9, [x9, _VPBE_VERSION_2@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
Lloh29:
	adrp	x8, _VENC_CLKCTL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _VENC_CLKCTL@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_venc_write
Lloh32:
	adrp	x8, _VENC_VIDCTL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _VENC_VIDCTL@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_write
Lloh35:
	adrp	x8, _VDAC_CONFIG_SD_V2@GOTPAGE
Lloh36:
	ldr	x8, [x8, _VDAC_CONFIG_SD_V2@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vdaccfg_write
	b	LBB0_8
LBB0_7:
Lloh37:
	adrp	x8, _VENC_VIDCTL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _VENC_VIDCTL@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #2
	bl	_venc_modify
Lloh40:
	adrp	x8, _VENC_YCCCTL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _VENC_YCCCTL@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_venc_write
Lloh43:
	adrp	x20, _VENC_VDPRO@GOTPAGE
Lloh44:
	ldr	x20, [x20, _VENC_VDPRO@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh45:
	adrp	x8, _VENC_VDPRO_DAFRQ@GOTPAGE
Lloh46:
	ldr	x8, [x8, _VENC_VDPRO_DAFRQ@GOTPAGEOFF]
Lloh47:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_modify
	ldr	w1, [x20]
Lloh48:
	adrp	x8, _VENC_VDPRO_DAUPS@GOTPAGE
Lloh49:
	ldr	x8, [x8, _VENC_VDPRO_DAUPS@GOTPAGEOFF]
Lloh50:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_modify
LBB0_8:
Lloh51:
	adrp	x20, _VENC_VMOD@GOTPAGE
Lloh52:
	ldr	x20, [x20, _VENC_VMOD@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_write
	ldr	w1, [x20]
Lloh53:
	adrp	x8, _VENC_VMOD_VIE_SHIFT@GOTPAGE
Lloh54:
	ldr	x8, [x8, _VENC_VMOD_VIE_SHIFT@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w2, w9, w8
Lloh56:
	adrp	x8, _VENC_VMOD_VIE@GOTPAGE
Lloh57:
	ldr	x8, [x8, _VENC_VMOD_VIE@GOTPAGEOFF]
Lloh58:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_venc_modify
	ldr	w1, [x20]
Lloh59:
	adrp	x8, _VENC_VMOD_VMD@GOTPAGE
Lloh60:
	ldr	x8, [x8, _VENC_VMOD_VMD@GOTPAGEOFF]
Lloh61:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_modify
	ldr	w1, [x20]
Lloh62:
	adrp	x8, _VENC_VMOD_TVTYP@GOTPAGE
Lloh63:
	ldr	x8, [x8, _VENC_VMOD_TVTYP@GOTPAGEOFF]
Lloh64:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_modify
Lloh65:
	adrp	x8, _VENC_DACTST@GOTPAGE
Lloh66:
	ldr	x8, [x8, _VENC_DACTST@GOTPAGEOFF]
Lloh67:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_write
	ldr	w1, [x20]
Lloh68:
	adrp	x8, _VENC_VMOD_VENC@GOTPAGE
Lloh69:
	ldr	x8, [x8, _VENC_VMOD_VENC@GOTPAGEOFF]
Lloh70:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_venc_modify
	mov	w0, #0
LBB0_9:
	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	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"venc_set_ntsc\n"

	.comm	_VPSS_VENC_CLOCK_SEL,4,2        ; @VPSS_VENC_CLOCK_SEL
	.comm	_VPBE_ENC_STD,4,2               ; @VPBE_ENC_STD
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VPBE_VERSION_3,8,3             ; @VPBE_VERSION_3
	.comm	_VENC_CLKCTL,4,2                ; @VENC_CLKCTL
	.comm	_VENC_VIDCTL,4,2                ; @VENC_VIDCTL
	.comm	_VDAC_CONFIG_SD_V3,4,2          ; @VDAC_CONFIG_SD_V3
	.comm	_VPBE_VERSION_2,8,3             ; @VPBE_VERSION_2
	.comm	_VDAC_CONFIG_SD_V2,4,2          ; @VDAC_CONFIG_SD_V2
	.comm	_VENC_YCCCTL,4,2                ; @VENC_YCCCTL
	.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_VMD,4,2              ; @VENC_VMOD_VMD
	.comm	_VENC_VMOD_TVTYP_SHIFT,4,2      ; @VENC_VMOD_TVTYP_SHIFT
	.comm	_VENC_VMOD_TVTYP,4,2            ; @VENC_VMOD_TVTYP
	.comm	_VENC_DACTST,4,2                ; @VENC_DACTST
	.comm	_VENC_VMOD_VENC,4,2             ; @VENC_VMOD_VENC
	.no_dead_strip	_venc_set_ntsc
.subsections_via_symbols
