	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_optc1_set_vtg_params           ## -- Begin function optc1_set_vtg_params
	.p2align	4, 0x90
_optc1_set_vtg_params:                  ## @optc1_set_vtg_params
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_DCN10TG_FROM_TG
	movq	%rax, %r15
	movups	(%rbx), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	16(%rbx), %rax
	movq	%rax, -48(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_apply_front_porch_workaround
	movl	-64(%rbp), %r14d
	movl	-56(%rbp), %eax
	subl	-60(%rbp), %r14d
	addl	-52(%rbp), %eax
	addl	-48(%rbp), %eax
	movl	%r14d, %r12d
	subl	%eax, %r12d
	movl	%r12d, %eax
	subl	(%r15), %eax
	cmpl	$-1, %eax
	movl	$-1, %ebx
	cmovll	%eax, %ebx
	notl	%ebx
	movq	_OTG_INTERLACE_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpl	$1, -44(%rbp)
	jne	LBB0_3
## %bb.2:
	movl	%r14d, %eax
	shrl	$31, %eax
	addl	%r14d, %eax
	sarl	%eax
	movl	(%r15), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	andl	$-2, %edx
	cmpl	%r12d, %edx
	setg	%cl
	shrl	%cl, %ebx
	movl	%eax, %r14d
LBB0_3:
	movq	_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VTG0_FP2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VTG0_VCOUNT_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %edx
	movl	%r14d, %r8d
	callq	_REG_UPDATE_2
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OTG_INTERLACE_CONTROL,4,2      ## @OTG_INTERLACE_CONTROL
	.comm	_CONTROL,4,2                    ## @CONTROL
	.comm	_VTG0_FP2,4,2                   ## @VTG0_FP2
	.comm	_VTG0_VCOUNT_INIT,4,2           ## @VTG0_VCOUNT_INIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_optc1_set_vtg_params           ; -- Begin function optc1_set_vtg_params
	.p2align	2
_optc1_set_vtg_params:                  ; @optc1_set_vtg_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	bl	_DCN10TG_FROM_TG
	mov	x21, x0
	ldr	q0, [x19]
	str	q0, [sp]
	ldr	x8, [x19, #16]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_apply_front_porch_workaround
	ldp	w8, w9, [sp]
	ldp	w10, w11, [sp, #8]
	ldr	w12, [sp, #16]
	add	w10, w10, w11
	add	w10, w10, w12
	sub	w19, w8, w9
	sub	w22, w19, w10
	ldr	w8, [x21]
	sub	w8, w22, w8
	cmn	w8, #1
	csinv	w8, w8, wzr, lt
	mvn	w20, w8
Lloh0:
	adrp	x8, _OTG_INTERLACE_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OTG_INTERLACE_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_REG
	ldr	w8, [sp, #20]
	cmp	x0, #0
	ccmp	w8, #1, #0, ne
	b.ne	LBB0_2
; %bb.1:
	cmp	w19, #0
	cinc	w8, w19, lt
	asr	w19, w8, #1
	ldr	w8, [x21]
	cmp	w8, #0
	cinc	w8, w8, lt
	and	w8, w8, #0xfffffffe
	cmp	w8, w22
	cset	w8, gt
	lsr	w20, w20, w8
LBB0_2:
Lloh3:
	adrp	x8, _CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _VTG0_FP2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VTG0_FP2@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _VTG0_VCOUNT_INIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VTG0_VCOUNT_INIT@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x2, x20
	mov	x4, x19
	bl	_REG_UPDATE_2
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_OTG_INTERLACE_CONTROL,4,2      ; @OTG_INTERLACE_CONTROL
	.comm	_CONTROL,4,2                    ; @CONTROL
	.comm	_VTG0_FP2,4,2                   ; @VTG0_FP2
	.comm	_VTG0_VCOUNT_INIT,4,2           ; @VTG0_VCOUNT_INIT
.subsections_via_symbols
