	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_du_vsp_plane_setup
_rcar_du_vsp_plane_setup:               ## @rcar_du_vsp_plane_setup
	.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, %r15
	movq	16(%rdi), %rdi
	callq	_to_rcar_vsp_plane_state
	movq	%rax, %r14
	movl	40(%rax), %edi
	callq	_to_rcar_crtc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movq	$0, -96(%rbp)
	movl	16(%r14), %ecx
	sarl	$8, %ecx
	movl	%ecx, -104(%rbp)
	movl	36(%r14), %ecx
	movl	%ecx, -56(%rbp)
	movq	8(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	leaq	28(%r14), %r12
	movsd	28(%r14), %xmm0                 ## xmm0 = mem[0],zero
	movaps	%xmm0, -128(%rbp)               ## 16-byte Spill
	movq	%r12, %rdi
	callq	_drm_rect_width
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_drm_rect_height
	movdqa	-128(%rbp), %xmm0               ## 16-byte Reload
	pinsrd	$2, %r13d, %xmm0
	pinsrd	$3, %eax, %xmm0
	psrad	$16, %xmm0
	movdqu	%xmm0, -72(%rbp)
	leaq	20(%r14), %r12
	movl	20(%r14), %eax
	movl	%eax, -88(%rbp)
	movl	24(%r14), %eax
	movl	%eax, -84(%rbp)
	movq	%r12, %rdi
	callq	_drm_rect_width
	movl	%eax, -80(%rbp)
	movq	%r12, %rdi
	callq	_drm_rect_height
	movl	%eax, -76(%rbp)
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_sg_dma_address
	incq	%rbx
	movq	(%r14), %rax
	movl	(%rax), %ecx
	cmpq	%rcx, %rbx
	jb	LBB0_2
LBB0_3:
	movl	4(%rax), %edi
	callq	_rcar_du_format_info
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	-104(%rbp), %rcx
	callq	_vsp1_du_atomic_update
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rcar_du_vsp_plane_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_du_vsp_plane_setup
_rcar_du_vsp_plane_setup:               ; @rcar_du_vsp_plane_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	ldr	x0, [x0, #16]
	bl	_to_rcar_vsp_plane_state
	mov	x21, x0
	ldr	w0, [x0, #40]
	bl	_to_rcar_crtc
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	str	xzr, [sp, #16]
	ldr	w9, [x21, #16]
	asr	w9, w9, #8
	str	w9, [sp, #8]
	ldr	w9, [x21, #36]
	str	w9, [sp, #56]
	ldr	x8, [x8, #8]
	ldr	w8, [x8]
	str	w8, [sp, #60]
	mov	x22, x21
	ldr	d0, [x22, #28]!
	sshr.2s	v0, v0, #16
	str	d0, [sp, #40]
	mov	x0, x22
	bl	_drm_rect_width
	asr	w8, w0, #16
	str	w8, [sp, #48]
	mov	x0, x22
	bl	_drm_rect_height
	asr	w8, w0, #16
	str	w8, [sp, #52]
	mov	x22, x21
	ldr	d0, [x22, #20]!
	str	d0, [sp, #24]
	mov	x0, x22
	bl	_drm_rect_width
	str	w0, [sp, #32]
	mov	x0, x22
	bl	_drm_rect_height
	str	w0, [sp, #36]
	ldr	x8, [x21]
	ldr	w9, [x8]
	cbz	w9, LBB0_3
; %bb.1:
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x22, lsl #2]
	bl	_sg_dma_address
	add	x22, x22, #1
	ldr	x8, [x21]
	ldr	w9, [x8]
	cmp	x22, x9
	b.lo	LBB0_2
LBB0_3:
	ldr	w0, [x8, #4]
	bl	_rcar_du_format_info
	ldr	w8, [x0]
	str	w8, [sp, #12]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x20]
	ldr	w2, [x19]
	add	x3, sp, #8
	bl	_vsp1_du_atomic_update
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rcar_du_vsp_plane_setup
.subsections_via_symbols
