	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vtg_set_hsync_vsync_pos
_vtg_set_hsync_vsync_pos:               ## @vtg_set_hsync_vsync_pos
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdx), %r10
	subq	16(%rdx), %r10
	movq	(%rdx), %r9
	movslq	%esi, %r8
	addq	%r8, %r10
	xorl	%eax, %eax
	cmpq	%r8, %r9
	movq	%r9, %rcx
	cmovgq	%rax, %rcx
	negq	%rcx
	testl	%r8d, %r8d
	cmovsq	%r9, %rcx
	addq	%r8, %rcx
	cmpq	%r9, %r10
	cmovgeq	%r9, %rax
	negq	%rax
	testq	%r10, %r10
	cmovsq	%r9, %rax
	addq	%r10, %rax
	shlq	$16, %rax
	orq	%rcx, %rax
	movq	%rax, (%rdi)
	testl	%r8d, %r8d
	js	LBB0_2
## %bb.1:
	movl	24(%rdx), %ecx
	subl	28(%rdx), %ecx
	incl	%ecx
	movl	$1, %r8d
	jmp	LBB0_3
LBB0_2:
	movl	24(%rdx), %ecx
	movl	32(%rdx), %r8d
	subl	28(%rdx), %ecx
	addl	%esi, %r9d
	movl	%r9d, %esi
LBB0_3:
	shll	$16, %ecx
	orl	%r8d, %ecx
	movl	%ecx, 8(%rdi)
	movl	%esi, %eax
	shll	$16, %eax
	orl	%esi, %eax
	movl	%eax, 12(%rdi)
	movl	%ecx, 16(%rdi)
	movl	%eax, 20(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vtg_set_hsync_vsync_pos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vtg_set_hsync_vsync_pos
_vtg_set_hsync_vsync_pos:               ; @vtg_set_hsync_vsync_pos
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
	ldp	x8, x9, [x2]
	ldr	x10, [x2, #16]
	sxtw	x11, w1
	sub	x9, x9, x10
	add	x9, x9, x11
	cmp	x8, x11
	csel	x10, xzr, x8, gt
	cmp	w1, #0
	csneg	x10, x8, x10, lt
	add	x10, x10, x11
	cmp	x9, x8
	csel	x11, xzr, x8, lt
	cmp	x9, #0
	csneg	x11, x8, x11, lt
	add	x9, x11, x9
	orr	x9, x10, x9, lsl #16
	str	x9, [x0]
	tbnz	w1, #31, LBB0_2
; %bb.1:
	ldp	w8, w9, [x2, #24]
	sub	w8, w8, w9
	add	w10, w8, #1
	mov	w9, #1
	b	LBB0_3
LBB0_2:
	ldp	w11, w9, [x2, #28]
	ldr	w10, [x2, #24]
	sub	w10, w10, w11
	add	w1, w8, w1
LBB0_3:
	orr	w8, w9, w10, lsl #16
	orr	w9, w1, w1, lsl #16
	stp	w8, w9, [x0, #8]
	stp	w8, w9, [x0, #16]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vtg_set_hsync_vsync_pos
.subsections_via_symbols
