	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_inits_and_adj_vp
_calculate_inits_and_adj_vp:            ## @calculate_inits_and_adj_vp
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	movq	8(%rdi), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	168(%rdi), %r12
	movl	24(%r13), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	28(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	32(%r13), %eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movl	36(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_PIXEL_FORMAT_420BPP8@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	_PIXEL_FORMAT_420BPP10@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	16(%r13), %esi
	movl	20(%r13), %edi
	leaq	-48(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	leaq	-56(%rbp), %r8
	callq	_get_vp_scan_direction
	xorl	%r14d, %r14d
	cmpl	$0, -56(%rbp)
	movl	$0, %r15d
	cmovel	-72(%rbp), %r15d                ## 4-byte Folded Reload
	cmpl	$0, -60(%rbp)
	cmovel	-88(%rbp), %r14d                ## 4-byte Folded Reload
	cmpl	$0, -48(%rbp)
	je	LBB0_1
## %bb.2:
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_swap
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_swap
	cmpl	$0, -48(%rbp)
	sete	%r8b
	jmp	LBB0_3
LBB0_1:
	movb	$1, %r8b
LBB0_3:
	movl	(%r13), %eax
	movl	8(%r13), %ecx
	subl	(%r12), %eax
	movl	20(%r12), %esi
	imull	%esi, %eax
	movl	4(%r12), %edi
	movl	12(%r12), %r10d
	cltd
	idivl	%edi
	movl	%eax, %r11d
	imull	4(%r13), %r15d
	movl	%r15d, %eax
	cltd
	idivl	-44(%rbp)                       ## 4-byte Folded Reload
	imull	%esi, %eax
	cltd
	idivl	%edi
	movl	%eax, %r9d
	addl	16(%r12), %r11d
	movl	160(%rbx), %r15d
	movl	164(%rbx), %edi
	subl	8(%r12), %ecx
	movl	28(%r12), %esi
	imull	%esi, %ecx
	movl	%ecx, %eax
	cltd
	idivl	%r10d
	movl	%eax, %ecx
	imull	12(%r13), %r14d
	subl	%r11d, %r15d
	movl	%r14d, %eax
	cltd
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	idivl	%r14d
	imull	%esi, %eax
	cltd
	idivl	%r10d
	addl	24(%r12), %ecx
	addl	%r9d, %r15d
	subl	%ecx, %edi
	addl	%eax, %edi
	movl	%edi, -76(%rbp)                 ## 4-byte Spill
	testb	%r8b, %r8b
	jne	LBB0_5
## %bb.4:
	movl	%r15d, %edi
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	callq	_swap
LBB0_5:
	addl	-88(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	addl	-72(%rbp), %r13d                ## 4-byte Folded Reload
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	cmpq	-104(%rbp), %rcx                ## 8-byte Folded Reload
	sete	%al
	cmpq	-96(%rbp), %rcx                 ## 8-byte Folded Reload
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %eax
	incl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rbx), %rdi
	movq	136(%rbx), %rsi
	incq	%rsi
	callq	_dc_fixpt_add_int
	movl	%eax, %edi
	movl	$2, %esi
	callq	_dc_fixpt_div_int
	movq	%rax, %rdi
	movl	$19, %esi
	callq	_dc_fixpt_truncate
	leaq	48(%rbx), %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	88(%rbx), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, 88(%rbx)
	leaq	80(%rbx), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	24(%rbx), %rdi
	movq	80(%rbx), %r12
	movq	120(%rbx), %rsi
	incq	%rsi
	callq	_dc_fixpt_add_int
	movl	%eax, %edi
	movl	$2, %esi
	callq	_dc_fixpt_div_int
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_dc_fixpt_add
	movq	%rax, %rdi
	movl	$19, %esi
	callq	_dc_fixpt_truncate
	movq	%rax, 80(%rbx)
	movq	32(%rbx), %rdi
	movq	128(%rbx), %rsi
	incq	%rsi
	callq	_dc_fixpt_add_int
	movl	%eax, %edi
	movl	$2, %esi
	callq	_dc_fixpt_div_int
	movq	%rax, %rdi
	movl	$19, %esi
	callq	_dc_fixpt_truncate
	leaq	64(%rbx), %r14
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	movq	%rax, 64(%rbx)
	movq	40(%rbx), %rdi
	movq	48(%rbx), %r12
	movq	112(%rbx), %rsi
	incq	%rsi
	callq	_dc_fixpt_add_int
	movl	%eax, %edi
	movl	$2, %esi
	callq	_dc_fixpt_div_int
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_dc_fixpt_add
	movq	%rax, %rdi
	movl	$19, %esi
	callq	_dc_fixpt_truncate
	movq	%rax, 48(%rbx)
	movl	-56(%rbp), %edi
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	cmpl	$0, -48(%rbp)
	setne	%al
	sete	%cl
	movq	128(%rbx,%rcx,8), %rcx
	cmoveq	-72(%rbp), %r14                 ## 8-byte Folded Reload
	shlq	$4, %rax
	movq	16(%rax,%rbx), %r8
	leaq	144(%rbx), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	156(%rbx), %r10
	leaq	152(%rbx), %rax
	movl	%r15d, %esi
	movl	%r13d, %edx
	movq	%r14, %r9
	pushq	%rax
	pushq	%r10
	callq	_adjust_vp_and_init_for_seamless_clip
	addq	$16, %rsp
	movl	-56(%rbp), %edi
	movl	%r13d, %eax
	cltd
	idivl	-44(%rbp)                       ## 4-byte Folded Reload
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	cmpl	$0, -48(%rbp)
	setne	%dl
	sete	%cl
	movq	112(%rbx,%rcx,8), %rcx
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r9
	movq	-112(%rbp), %r12                ## 8-byte Reload
	cmoveq	%r12, %r9
	shlq	$4, %rdx
	movq	24(%rdx,%rbx), %r8
	leaq	96(%rbx), %rdx
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	leaq	108(%rbx), %r10
	leaq	104(%rbx), %r11
	movl	%r15d, %esi
	movl	%eax, %edx
	pushq	%r11
	pushq	%r10
	callq	_adjust_vp_and_init_for_seamless_clip
	addq	$16, %rsp
	movl	-60(%rbp), %edi
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	cmpl	$0, -48(%rbp)
	sete	%al
	setne	%cl
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	cmoveq	-120(%rbp), %r9                 ## 8-byte Folded Reload
	movq	128(%rbx,%rcx,8), %rcx
	shlq	$4, %rax
	movq	16(%rax,%rbx), %r8
	leaq	148(%rbx), %rax
	movl	-76(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %esi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edx
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	pushq	%rax
	callq	_adjust_vp_and_init_for_seamless_clip
	addq	$16, %rsp
	movl	-60(%rbp), %edi
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	cmpl	$0, -48(%rbp)
	sete	%al
	setne	%cl
	movq	112(%rbx,%rcx,8), %rcx
	cmoveq	%r14, %r12
	shlq	$4, %rax
	movq	24(%rax,%rbx), %r8
	movl	%r13d, %eax
	cltd
	idivl	-44(%rbp)                       ## 4-byte Folded Reload
	leaq	100(%rbx), %r10
	movl	%r15d, %esi
	movl	%eax, %edx
	movq	%r12, %r9
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	%r10
	callq	_adjust_vp_and_init_for_seamless_clip
	addq	$16, %rsp
	movq	32(%rbx), %rsi
	movq	64(%rbx), %rdi
	callq	_dc_fixpt_add
	movq	%rax, 72(%rbx)
	movq	40(%rbx), %rsi
	movq	48(%rbx), %rdi
	callq	_dc_fixpt_add
	movq	%rax, 56(%rbx)
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIXEL_FORMAT_420BPP8,8,3       ## @PIXEL_FORMAT_420BPP8
	.comm	_PIXEL_FORMAT_420BPP10,8,3      ## @PIXEL_FORMAT_420BPP10
	.no_dead_strip	_calculate_inits_and_adj_vp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_inits_and_adj_vp
_calculate_inits_and_adj_vp:            ; @calculate_inits_and_adj_vp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x26, [x0, #168]
	ldp	x28, x24, [x0]
	ldp	w25, w23, [x28, #24]
	ldp	w27, w21, [x28, #32]
Lloh0:
	adrp	x8, _PIXEL_FORMAT_420BPP8@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIXEL_FORMAT_420BPP8@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh3:
	adrp	x8, _PIXEL_FORMAT_420BPP10@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PIXEL_FORMAT_420BPP10@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp]                        ; 8-byte Folded Spill
	ldp	w1, w0, [x28, #16]
	add	x2, sp, #28
	add	x3, sp, #24
	add	x4, sp, #20
	bl	_get_vp_scan_direction
	ldr	w8, [sp, #20]
	cmp	w8, #0
	csel	w22, w25, wzr, eq
	ldr	w8, [sp, #24]
	cmp	w8, #0
	csel	w20, w27, wzr, eq
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x20
	bl	_swap
	mov	x0, x23
	mov	x1, x21
	bl	_swap
	ldr	w8, [sp, #28]
	cmp	w8, #0
	cset	w8, eq
	b	LBB0_3
LBB0_2:
	mov	w8, #1
LBB0_3:
	ldp	w9, w10, [x26]
	ldp	w11, w12, [x28]
	sub	w9, w11, w9
	ldp	w11, w13, [x26, #16]
	mul	w9, w9, w13
	sdiv	w9, w9, w10
	mul	w12, w12, w22
	sdiv	w12, w12, w23
	mul	w12, w12, w13
	sdiv	w10, w12, w10
	ldp	w12, w13, [x19, #160]
	add	w9, w11, w9
	sub	w9, w12, w9
	add	w22, w9, w10
	ldp	w9, w10, [x26, #8]
	ldp	w11, w12, [x28, #8]
	sub	w9, w11, w9
	ldp	w11, w14, [x26, #24]
	mul	w9, w9, w14
	sdiv	w9, w9, w10
	mul	w12, w12, w20
	sdiv	w12, w12, w21
	mul	w12, w12, w14
	add	w9, w11, w9
	sub	w9, w13, w9
	sdiv	w10, w12, w10
	add	w20, w9, w10
	tbnz	w8, #0, LBB0_5
; %bb.4:
	mov	x0, x22
	mov	x1, x20
	bl	_swap
LBB0_5:
	add	w8, w21, w27
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	add	w23, w23, w25
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	cmp	x24, x8
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ccmp	x24, x8, #4, ne
	mov	w8, #1
	cinc	w8, w8, eq
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	ldr	x0, [x19, #16]
	ldr	x8, [x19, #136]
	add	x1, x8, #1
	bl	_dc_fixpt_add_int
	mov	w1, #2
	bl	_dc_fixpt_div_int
	mov	w1, #19
	bl	_dc_fixpt_truncate
	mov	x28, x19
	str	x0, [x28, #88]!
	mov	x27, x19
	ldr	x24, [x27, #80]!
	ldr	x0, [x19, #24]
	ldr	x8, [x19, #120]
	add	x1, x8, #1
	bl	_dc_fixpt_add_int
	mov	w1, #2
	bl	_dc_fixpt_div_int
	mov	x1, x0
	mov	x0, x24
	bl	_dc_fixpt_add
	mov	w1, #19
	bl	_dc_fixpt_truncate
	str	x0, [x27]
	ldr	x0, [x19, #32]
	ldr	x8, [x19, #128]
	add	x1, x8, #1
	bl	_dc_fixpt_add_int
	mov	w1, #2
	bl	_dc_fixpt_div_int
	mov	w1, #19
	bl	_dc_fixpt_truncate
	mov	x26, x19
	str	x0, [x26, #64]!
	mov	x21, x19
	ldr	x24, [x21, #48]!
	ldr	x0, [x19, #40]
	ldr	x8, [x19, #112]
	add	x1, x8, #1
	bl	_dc_fixpt_add_int
	mov	w1, #2
	bl	_dc_fixpt_div_int
	mov	x1, x0
	mov	x0, x24
	bl	_dc_fixpt_add
	mov	w1, #19
	bl	_dc_fixpt_truncate
	ldr	w8, [sp, #28]
	cmp	w8, #0
	mov	w8, #128
	mov	w9, #136
	csel	x8, x9, x8, eq
	ldr	x3, [x19, x8]
	str	x0, [x21]
	mov	w8, #32
	mov	w9, #16
	csel	x8, x9, x8, eq
	ldr	x4, [x19, x8]
	ldr	w0, [sp, #20]
	csel	x5, x28, x26, eq
	add	x24, x19, #144
	add	x6, x19, #156
	add	x7, x19, #152
	mov	x1, x22
	mov	x2, x23
	bl	_adjust_vp_and_init_for_seamless_clip
	ldr	w8, [sp, #28]
	cmp	w8, #0
	mov	w8, #112
	mov	w9, #120
	csel	x8, x9, x8, eq
	ldr	x3, [x19, x8]
	mov	w8, #40
	mov	w9, #24
	csel	x8, x9, x8, eq
	ldr	x4, [x19, x8]
	ldr	w0, [sp, #20]
	csel	x5, x27, x21, eq
	add	x25, x19, #96
	add	x6, x19, #108
	add	x7, x19, #104
	mov	x1, x22
	ldr	w22, [sp, #8]                   ; 4-byte Folded Reload
	sdiv	w2, w23, w22
	bl	_adjust_vp_and_init_for_seamless_clip
	ldp	w0, w8, [sp, #24]
	cmp	w8, #0
	mov	w8, #136
	mov	w9, #128
	csel	x8, x9, x8, eq
	ldr	x3, [x19, x8]
	mov	w8, #16
	mov	w9, #32
	csel	x8, x9, x8, eq
	ldr	x4, [x19, x8]
	csel	x5, x26, x28, eq
	add	x6, x19, #148
	mov	x1, x20
	ldr	w28, [sp, #16]                  ; 4-byte Folded Reload
	mov	x2, x28
	mov	x7, x24
	bl	_adjust_vp_and_init_for_seamless_clip
	ldp	w0, w8, [sp, #24]
	cmp	w8, #0
	mov	w8, #120
	mov	w9, #112
	csel	x8, x9, x8, eq
	ldr	x3, [x19, x8]
	mov	w8, #24
	mov	w9, #40
	csel	x8, x9, x8, eq
	ldr	x4, [x19, x8]
	csel	x5, x21, x27, eq
	add	x6, x19, #100
	sdiv	w2, w28, w22
	mov	x1, x20
	mov	x7, x25
	bl	_adjust_vp_and_init_for_seamless_clip
	ldr	x0, [x26]
	ldr	x1, [x19, #32]
	bl	_dc_fixpt_add
	str	x0, [x19, #72]
	ldr	x0, [x21]
	ldr	x1, [x19, #40]
	bl	_dc_fixpt_add
	str	x0, [x19, #56]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PIXEL_FORMAT_420BPP8,8,3       ; @PIXEL_FORMAT_420BPP8
	.comm	_PIXEL_FORMAT_420BPP10,8,3      ; @PIXEL_FORMAT_420BPP10
	.no_dead_strip	_calculate_inits_and_adj_vp
.subsections_via_symbols
