	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vsp1_video_calculate_partition
_vsp1_video_calculate_partition:        ## @vsp1_video_calculate_partition
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rdi
	movl	(%rdi), %esi
	movq	_RWPF_PAD_SINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_vsp1_entity_get_pad_format
	movl	(%r12), %esi
	cmpl	$1, %esi
	jg	LBB0_2
## %bb.1:
	movl	$0, -40(%rbp)
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	jmp	LBB0_10
LBB0_2:
	movl	%r15d, %ecx
	imull	%ebx, %ecx
	movl	%ecx, -40(%rbp)
	movl	%ebx, -36(%rbp)
	movl	(%rax), %eax
	xorl	%edx, %edx
	divl	%ebx
	testl	%edx, %edx
	je	LBB0_10
## %bb.3:
	leal	-1(%rsi), %eax
	shrl	%ebx
	cmpl	%ebx, %edx
	jae	LBB0_8
## %bb.4:
	addl	$-2, %esi
	cmpl	%r15d, %esi
	jne	LBB0_6
## %bb.5:
	movl	%ebx, -36(%rbp)
	jmp	LBB0_10
LBB0_8:
	cmpl	%r15d, %eax
	jne	LBB0_10
## %bb.9:
	movl	%edx, -36(%rbp)
	jmp	LBB0_10
LBB0_6:
	cmpl	%r15d, %eax
	jne	LBB0_10
## %bb.7:
	addl	%ebx, %edx
	movl	%edx, -36(%rbp)
	subl	%ebx, %ecx
	movl	%ecx, -40(%rbp)
LBB0_10:
	leaq	-40(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_vsp1_pipeline_propagate_partition
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RWPF_PAD_SINK,4,2              ## @RWPF_PAD_SINK
	.no_dead_strip	_vsp1_video_calculate_partition
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vsp1_video_calculate_partition
_vsp1_video_calculate_partition:        ; @vsp1_video_calculate_partition
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x0, [x0, #8]
	ldr	w1, [x0]
Lloh0:
	adrp	x8, _RWPF_PAD_SINK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RWPF_PAD_SINK@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_vsp1_entity_get_pad_format
	ldr	w11, [x21]
	subs	w9, w11, #1
	b.gt	LBB0_2
; %bb.1:
	ldr	w8, [x0]
	stp	wzr, w8, [sp, #8]
	b	LBB0_10
LBB0_2:
	mul	w8, w19, w22
	stp	w8, w22, [sp, #8]
	ldr	w10, [x0]
	udiv	w12, w10, w22
	msub	w10, w12, w22, w10
	cbz	w10, LBB0_10
; %bb.3:
	lsr	w12, w22, #1
	cmp	w10, w12
	b.hs	LBB0_6
; %bb.4:
	sub	w11, w11, #2
	cmp	w11, w19
	b.ne	LBB0_8
; %bb.5:
	str	w12, [sp, #12]
	b	LBB0_10
LBB0_6:
	cmp	w9, w19
	b.ne	LBB0_10
; %bb.7:
	str	w10, [sp, #12]
	b	LBB0_10
LBB0_8:
	cmp	w9, w19
	b.ne	LBB0_10
; %bb.9:
	add	w9, w10, w12
	sub	w8, w8, w12
	stp	w8, w9, [sp, #8]
LBB0_10:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_vsp1_pipeline_propagate_partition
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RWPF_PAD_SINK,4,2              ; @RWPF_PAD_SINK
	.no_dead_strip	_vsp1_video_calculate_partition
.subsections_via_symbols
