	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_plane_compute_gtt
_intel_plane_compute_gtt:               ## @intel_plane_compute_gtt
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_to_intel_framebuffer
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r12
	movl	(%rbx), %r15d
	movq	8(%rax), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_intel_plane_needs_remap
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_intel_plane_remap_gtt
	jmp	LBB0_11
LBB0_12:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leaq	24(%rbx), %rdi
	movq	%r12, %rsi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %edx
	callq	_intel_fill_fb_ggtt_view
	testl	%r14d, %r14d
	jle	LBB0_9
## %bb.4:
	shlq	$3, %r14
	leaq	(%r14,%r14,2), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	16(%r12), %rax
	movl	4(%rax,%r13), %edx
	addq	%r13, %rax
	movq	16(%r15), %rcx
	movl	%edx, 4(%rcx,%r14)
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rax), %eax
	movl	%eax, (%rcx,%r14)
	incq	%rbx
	addq	$24, %r14
	addq	$8, %r13
	cmpq	%r14, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	callq	_intel_fb_pitch
	movq	16(%r15), %rcx
	movl	%eax, 16(%rcx,%r14)
	movq	$0, 8(%rcx,%r14)
	movl	%r12d, %edi
	callq	_drm_rotation_90_or_270
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	24(%r12), %rax
	movl	4(%rax,%r13), %edx
	movq	16(%r15), %rcx
	movl	%edx, 4(%rcx,%r14)
	leaq	(%rax,%rbx,8), %rax
	jmp	LBB0_8
LBB0_9:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_drm_rotation_90_or_270
	testq	%rax, %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_11
## %bb.10:
	leaq	4(%rbx), %rdi
	movl	(%r12), %esi
	movl	4(%r12), %edx
	shll	$16, %esi
	shll	$16, %edx
	movq	_DRM_MODE_ROTATE_270@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_drm_rect_rotate
LBB0_11:
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_plane_check_stride       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_ROTATE_270,4,2        ## @DRM_MODE_ROTATE_270
	.no_dead_strip	_intel_plane_compute_gtt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_plane_compute_gtt
_intel_plane_compute_gtt:               ; @intel_plane_compute_gtt
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_to_intel_framebuffer
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	w21, [x19]
	ldr	x8, [x0, #8]
	ldr	w24, [x8]
	mov	x0, x19
	bl	_intel_plane_needs_remap
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_intel_plane_remap_gtt
	b	LBB0_12
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	add	x0, x19, #24
	mov	x1, x20
	mov	x2, x21
	bl	_intel_fill_fb_ggtt_view
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x23, #0
	mov	x22, #0
	add	x8, x24, x24, lsl #1
	lsl	x24, x8, #3
	mov	w25, #4
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20, #16]
	add	x9, x8, x25
	ldr	w10, [x9], #-4
	ldr	x8, [x19, #16]
	add	x11, x8, x23
	str	w10, [x11, #4]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x9]
	str	w9, [x8, x23]
	add	x22, x22, #1
	add	x23, x23, #24
	add	x25, x25, #8
	cmp	x24, x23
	b.eq	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_intel_fb_pitch
	ldr	x8, [x19, #16]
	add	x8, x8, x23
	str	w0, [x8, #16]
	str	xzr, [x8, #8]
	mov	x0, x21
	bl	_drm_rotation_90_or_270
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x20, #24]
	ldr	w10, [x9, x25]
	ldr	x8, [x19, #16]
	add	x11, x8, x23
	str	w10, [x11, #4]
	add	x9, x9, x22, lsl #3
	b	LBB0_7
LBB0_10:
	mov	x0, x21
	bl	_drm_rotation_90_or_270
	cbz	x0, LBB0_12
; %bb.11:
	add	x0, x19, #4
	ldp	w8, w9, [x20]
	lsl	w1, w8, #16
	lsl	w2, w9, #16
Lloh0:
	adrp	x8, _DRM_MODE_ROTATE_270@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_ROTATE_270@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	bl	_drm_rect_rotate
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_intel_plane_check_stride
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_ROTATE_270,4,2        ; @DRM_MODE_ROTATE_270
	.no_dead_strip	_intel_plane_compute_gtt
.subsections_via_symbols
