	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_plane_calc_load
_vc4_plane_calc_load:                   ## @vc4_plane_calc_load
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	callq	_to_vc4_plane_state
	movq	%rax, %r13
	movl	(%r14), %esi
	movl	4(%r14), %edi
	callq	_drm_atomic_get_existing_crtc_state
	movq	%rax, %rdi
	callq	_drm_mode_vrefresh
	movl	%eax, %r14d
	movq	(%r13), %rcx
	movq	(%rcx), %rax
	movq	_VC4_SCALING_NONE@GOTPCREL(%rip), %rdx
	movl	$1, %r15d
	cmpq	(%rdx), %rax
	jne	LBB0_4
## %bb.1:
	cmpq	%rax, 8(%rcx)
	jne	LBB0_4
## %bb.2:
	movq	8(%r13), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_4
## %bb.3:
	xorl	%r15d, %r15d
	cmpq	%rax, 8(%rcx)
	sete	%r15b
	incl	%r15d
LBB0_4:
	movq	$0, 16(%r13)
	movq	(%r12), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.6:
	movq	24(%r13), %rcx
	movl	32(%r13), %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rbx,4), %edi
	callq	_DIV_ROUND_UP
	movq	40(%r13), %rdx
	movq	24(%r13), %rcx
	movq	(%r12), %rdi
	movq	8(%rdi), %rsi
	imull	(%rdx,%rbx,4), %eax
	imull	(%rcx,%rbx,4), %eax
	imull	(%rsi,%rbx,4), %eax
	addl	16(%r13), %eax
	movl	%eax, 16(%r13)
	movl	32(%r13), %esi
	movl	48(%r13), %edx
	imull	%esi, %edx
	addl	20(%r13), %edx
	movl	%edx, 20(%r13)
	incq	%rbx
	movl	(%rdi), %edi
	cmpq	%rdi, %rbx
	jb	LBB0_7
	jmp	LBB0_8
LBB0_5:
	xorl	%eax, %eax
	xorl	%edx, %edx
LBB0_8:
	imull	%r14d, %edx
	movl	%r15d, %ecx
	sarl	%cl, %edx
	movl	%edx, 20(%r13)
	imull	%r14d, %eax
	movl	%eax, 16(%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC4_SCALING_NONE,8,3           ## @VC4_SCALING_NONE
	.no_dead_strip	_vc4_plane_calc_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_plane_calc_load
_vc4_plane_calc_load:                   ; @vc4_plane_calc_load
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x21, [x0, #8]
	bl	_to_vc4_plane_state
	mov	x19, x0
	ldp	w1, w0, [x20]
	bl	_drm_atomic_get_existing_crtc_state
	bl	_drm_mode_vrefresh
	mov	x20, x0
	ldr	x9, [x19]
	ldr	x8, [x9]
Lloh0:
	adrp	x10, _VC4_SCALING_NONE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _VC4_SCALING_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_4
; %bb.1:
	ldr	x9, [x9, #8]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.2:
	ldr	x9, [x19, #8]
	ldr	x10, [x9]
	mov	w22, #1
	cmp	x10, x8
	b.ne	LBB0_5
; %bb.3:
	ldr	x9, [x9, #8]
	cmp	x9, x8
	cinc	w22, w22, eq
	b	LBB0_5
LBB0_4:
	mov	w22, #1
LBB0_5:
	str	xzr, [x19, #16]
	ldr	x8, [x21]
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.6:
	mov	x23, #0
	ldr	x8, [x19, #24]
	ldr	w1, [x19, #32]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x24, x23, #2
	ldr	w0, [x8, x24]
	bl	_DIV_ROUND_UP
	ldr	x8, [x19, #40]
	ldr	w9, [x8, x24]
	ldr	x8, [x19, #24]
	ldr	w10, [x8, x24]
	ldr	x11, [x21]
	ldr	x12, [x11, #8]
	ldr	w12, [x12, x24]
	mul	w9, w9, w0
	mul	w9, w9, w10
	ldp	w10, w13, [x19, #16]
	madd	w9, w9, w12, w10
	ldr	w1, [x19, #32]
	ldr	w10, [x19, #48]
	madd	w10, w10, w1, w13
	stp	w9, w10, [x19, #16]
	add	x23, x23, #1
	ldr	w11, [x11]
	cmp	x23, x11
	b.lo	LBB0_7
	b	LBB0_9
LBB0_8:
	mov	w9, #0
	mov	w10, #0
LBB0_9:
	mul	w8, w10, w20
	asr	w8, w8, w22
	mul	w9, w9, w20
	stp	w9, w8, [x19, #16]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VC4_SCALING_NONE,8,3           ; @VC4_SCALING_NONE
	.no_dead_strip	_vc4_plane_calc_load
.subsections_via_symbols
