	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdp5_smp_calculate             ## -- Begin function mdp5_smp_calculate
	.p2align	4, 0x90
_mdp5_smp_calculate:                    ## @mdp5_smp_calculate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	8(%rsi), %edi
	callq	_drm_format_info
	movq	%rax, %rbx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_get_kms
	movl	(%rax), %edi
	callq	_mdp5_cfg_get_hw_rev
	movl	(%rbx), %esi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %r15d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movq	(%r12), %rcx
	movq	_CHROMA_FULL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jle	LBB0_7
## %bb.2:
	cmpl	$2, %r15d
	movl	$1, %eax
	cmovll	%r15d, %eax
	testl	%r14d, %r14d
	cmovnel	%eax, %r15d
	movl	$2, %esi
	jmp	LBB0_3
LBB0_7:
	testl	%esi, %esi
	jle	LBB0_8
LBB0_3:
	movl	%esi, %r12d
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %ecx
	shll	%cl, %eax
	orl	%eax, %r14d
	incq	%r13
	addl	$8, %ebx
	cmpq	%r13, %r12
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax,%r13,4), %eax
	imull	-48(%rbp), %eax                 ## 4-byte Folded Reload
	testq	%r13, %r13
	movl	%r15d, %ecx
	movl	$1, %edx
	cmovel	%edx, %ecx
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	callq	_DIV_ROUND_UP
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %edi
	callq	_roundup_pow_of_two
	jmp	LBB0_6
LBB0_8:
	xorl	%r14d, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHROMA_FULL,8,3                ## @CHROMA_FULL
	.comm	_DRM_FORMAT_NV24,4,2            ## @DRM_FORMAT_NV24
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdp5_smp_calculate             ; -- Begin function mdp5_smp_calculate
	.p2align	2
_mdp5_smp_calculate:                    ; @mdp5_smp_calculate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x3
	mov	x19, x2
	mov	x24, x1
	mov	x20, x0
	ldr	w0, [x1, #8]
	bl	_drm_format_info
	mov	x21, x0
	mov	x0, x20
	bl	_get_kms
	ldr	w0, [x0]
	bl	_mdp5_cfg_get_hw_rev
	mov	x22, x0
	ldp	w8, w25, [x21]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	x9, [x24]
Lloh0:
	adrp	x10, _CHROMA_FULL@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CHROMA_FULL@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.le	LBB0_3
; %bb.2:
	cmp	w25, #1
	ccmp	w23, #0, #4, gt
	csinc	w25, w25, wzr, eq
	mov	w8, #2
	b	LBB0_4
LBB0_3:
	cmp	w8, #1
	b.lt	LBB0_8
LBB0_4:
	mov	w24, #0
	mov	x26, #0
	mov	w23, #0
	mov	w27, w8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	lsl	w8, w0, w24
	orr	w23, w8, w23
	add	x26, x26, #1
	add	w24, w24, #8
	cmp	x27, x26
	b.eq	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w8, [x8, x26, lsl #2]
	mul	w8, w8, w19
	cmp	x26, #0
	csinc	w9, w25, wzr, ne
	sdiv	w8, w8, w9
	lsl	w0, w8, #1
	ldr	w1, [x20]
	bl	_DIV_ROUND_UP
	cbnz	w22, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_roundup_pow_of_two
	b	LBB0_5
LBB0_8:
	mov	w23, #0
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CHROMA_FULL,8,3                ; @CHROMA_FULL
	.comm	_DRM_FORMAT_NV24,4,2            ; @DRM_FORMAT_NV24
.subsections_via_symbols
