	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap_framebuffer_update_scanout ## -- Begin function omap_framebuffer_update_scanout
	.p2align	4, 0x90
_omap_framebuffer_update_scanout:       ## @omap_framebuffer_update_scanout
	.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
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_to_omap_framebuffer
	movq	8(%rax), %r12
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r13)
	movups	20(%r15), %xmm0
	movups	%xmm0, 48(%r13)
	movswl	2(%r15), %eax
	movl	%eax, (%r13)
	movswl	6(%r15), %eax
	movl	%eax, 4(%r13)
	movl	8(%r15), %edi
	callq	_drm_rotation_90_or_270
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	movl	4(%r13), %esi
	callq	_swap
LBB0_2:
	movswl	14(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movswl	18(%r15), %r14d
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_omap_gem_flags
	movq	_OMAP_BO_TILED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	je	LBB0_8
## %bb.3:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movswl	2(%r15), %r12d
	movswl	6(%r15), %r14d
	movl	8(%r15), %edi
	callq	_drm_rotation_to_tiler
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movq	_DRM_FORMAT_UYVY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.4:
	movq	_DRM_FORMAT_YUYV@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_7
LBB0_8:
	movl	8(%r15), %edx
	movq	_DRM_MODE_ROTATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edx, %eax
	testl	$-129, %eax
	je	LBB0_10
## %bb.9:
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_10:
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
	callq	_get_linear_addr
	movq	%rax, 40(%r13)
	movq	_OMAP_DSS_ROT_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
	movl	$128, 16(%r13)
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_6:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movzwl	%cx, %eax
	shrl	$15, %eax
	addl	%ecx, %eax
	movswl	%ax, %edx
	sarl	%edx
	movzwl	%r12w, %eax
	shrl	$15, %eax
	addl	%r12d, %eax
	movswl	%ax, %r12d
	sarl	%r12d
LBB0_7:
	movl	%r14d, %ecx
	movq	_MASK_Y_INVERT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	andl	%r14d, %eax
	decl	%ecx
	testl	%eax, %eax
	cmovel	%eax, %ecx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addl	%ecx, %eax
	movl	%eax, %ecx
	movq	_MASK_X_INVERT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	decl	%r12d
	testl	%eax, %eax
	cmovel	%eax, %r12d
	addl	%r12d, %edx
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	40(%r13), %r8
	movl	%r14d, %esi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	callq	_omap_gem_rotated_dma_addr
	movq	_OMAP_DSS_ROT_TILER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
	movl	8(%r15), %eax
	testl	%eax, %eax
	movl	$128, %ecx
	cmovnel	%eax, %ecx
	movl	%ecx, 16(%r13)
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_omap_gem_tiled_stride
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	movl	%eax, 32(%r13)
	movq	(%r12), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, 32(%r13)
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movq	_DRM_FORMAT_NV12@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.12:
	movq	8(%r13), %rax
	movq	_OMAP_DSS_ROT_TILER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.16:
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	callq	_omap_gem_flags
	xorl	%edi, %edi
	movq	_OMAP_BO_TILED@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	sete	%dil
	callq	_WARN_ON
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	addq	$24, %r13
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %r8
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_gem_rotated_dma_addr      ## TAILCALL
LBB0_14:
	movq	$0, 24(%r13)
	jmp	LBB0_15
LBB0_13:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_get_linear_addr
	movq	%rax, 24(%r13)
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_BO_TILED,4,2              ## @OMAP_BO_TILED
	.comm	_DRM_FORMAT_UYVY,4,2            ## @DRM_FORMAT_UYVY
	.comm	_DRM_FORMAT_YUYV,4,2            ## @DRM_FORMAT_YUYV
	.comm	_MASK_Y_INVERT,4,2              ## @MASK_Y_INVERT
	.comm	_MASK_X_INVERT,4,2              ## @MASK_X_INVERT
	.comm	_OMAP_DSS_ROT_TILER,8,3         ## @OMAP_DSS_ROT_TILER
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ## @DRM_MODE_ROTATE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rotation '%d' ignored for non-tiled fb\n"

	.comm	_OMAP_DSS_ROT_NONE,8,3          ## @OMAP_DSS_ROT_NONE
	.comm	_DRM_FORMAT_NV12,4,2            ## @DRM_FORMAT_NV12
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap_framebuffer_update_scanout ; -- Begin function omap_framebuffer_update_scanout
	.p2align	2
_omap_framebuffer_update_scanout:       ; @omap_framebuffer_update_scanout
	.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	x19, x2
	mov	x25, x1
	mov	x20, x0
	bl	_to_omap_framebuffer
	ldr	x21, [x0, #8]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	str	w8, [x19, #64]
	ldur	q0, [x25, #20]
	str	q0, [x19, #48]
	ldr	d0, [x25]
	sshr.2s	v0, v0, #16
	str	d0, [x19]
	ldr	w0, [x25, #8]
	bl	_drm_rotation_90_or_270
	cbz	x0, LBB0_2
; %bb.1:
	ldp	w0, w1, [x19]
	bl	_swap
LBB0_2:
	ldr	w28, [x25, #12]
	asr	w23, w28, #16
	ldrsh	w22, [x25, #18]
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_omap_gem_flags
Lloh0:
	adrp	x8, _OMAP_BO_TILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OMAP_BO_TILED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x27, _OMAP_DSS_ROT_TILER@GOTPAGE
Lloh4:
	ldr	x27, [x27, _OMAP_DSS_ROT_TILER@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.3:
	ldr	w27, [x25]
	ldrsh	w26, [x25, #6]
	ldr	w0, [x25, #8]
	bl	_drm_rotation_to_tiler
	mov	x24, x0
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _DRM_FORMAT_UYVY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DRM_FORMAT_UYVY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_9
; %bb.4:
Lloh8:
	adrp	x9, _DRM_FORMAT_YUYV@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DRM_FORMAT_YUYV@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_9
; %bb.5:
	asr	w8, w27, #16
	b	LBB0_10
LBB0_6:
	ldr	w2, [x25, #8]
Lloh11:
	adrp	x8, _DRM_MODE_ROTATE_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DRM_MODE_ROTATE_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w2
	orr	w8, w8, #0x80
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x20, #24]
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_8:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	mov	x3, x23
	mov	x4, x22
	bl	_get_linear_addr
	mov	w24, #0
	str	x0, [x19, #40]
Lloh16:
	adrp	x8, _OMAP_DSS_ROT_NONE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OMAP_DSS_ROT_NONE@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	w8, #128
	str	w8, [x19, #16]
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	b	LBB0_11
LBB0_9:
	lsr	w8, w27, #16
	lsr	w9, w28, #16
	add	w9, w9, w28, lsr #31
	sbfx	w23, w9, #1, #15
	add	w8, w8, w27, lsr #31
	sbfx	w8, w8, #1, #15
LBB0_10:
Lloh19:
	adrp	x27, _OMAP_DSS_ROT_TILER@GOTPAGE
Lloh20:
	ldr	x27, [x27, _OMAP_DSS_ROT_TILER@GOTPAGEOFF]
Lloh21:
	adrp	x9, _MASK_Y_INVERT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MASK_Y_INVERT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	sub	w10, w26, #1
	tst	w9, w24
	csel	w9, wzr, w10, eq
	add	w22, w9, w22
Lloh24:
	adrp	x9, _MASK_X_INVERT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MASK_X_INVERT@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	sub	w8, w8, #1
	tst	w9, w24
	csel	w8, wzr, w8, eq
	add	w23, w8, w23
	ldr	x8, [x20]
	ldr	w0, [x8]
	add	x4, x19, #40
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	bl	_omap_gem_rotated_dma_addr
	ldr	x8, [x27]
	str	x8, [x19, #8]
	ldr	w8, [x25, #8]
	mov	w9, #128
	cmp	w8, #0
	csel	w8, w9, w8, eq
	str	w8, [x19, #16]
	ldr	x8, [x20]
	ldr	w0, [x8]
	mov	x1, x24
	bl	_omap_gem_tiled_stride
LBB0_11:
	str	w0, [x19, #32]
	ldr	x8, [x21]
	ldr	w8, [x8]
	sdiv	w8, w0, w8
	str	w8, [x19, #32]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _DRM_FORMAT_NV12@GOTPAGE
Lloh28:
	ldr	x9, [x9, _DRM_FORMAT_NV12@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.12:
	ldr	x8, [x19, #8]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.13:
	ldr	x8, [x20]
	ldr	w0, [x8, #4]
	bl	_omap_gem_flags
Lloh30:
	adrp	x8, _OMAP_BO_TILED@GOTPAGE
Lloh31:
	ldr	x8, [x8, _OMAP_BO_TILED@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
	bl	_WARN_ON
	ldr	x8, [x20]
	ldr	w0, [x8, #4]
	cmp	w23, #0
	cinc	w8, w23, lt
	asr	w2, w8, #1
	cmp	w22, #0
	cinc	w8, w22, lt
	asr	w3, w8, #1
	add	x4, x19, #24
	mov	x1, x24
	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
	b	_omap_gem_rotated_dma_addr
LBB0_14:
	str	xzr, [x19, #24]
	b	LBB0_16
LBB0_15:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	mov	x3, x23
	mov	x4, x22
	bl	_get_linear_addr
	str	x0, [x19, #24]
LBB0_16:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_BO_TILED,4,2              ; @OMAP_BO_TILED
	.comm	_DRM_FORMAT_UYVY,4,2            ; @DRM_FORMAT_UYVY
	.comm	_DRM_FORMAT_YUYV,4,2            ; @DRM_FORMAT_YUYV
	.comm	_MASK_Y_INVERT,4,2              ; @MASK_Y_INVERT
	.comm	_MASK_X_INVERT,4,2              ; @MASK_X_INVERT
	.comm	_OMAP_DSS_ROT_TILER,8,3         ; @OMAP_DSS_ROT_TILER
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ; @DRM_MODE_ROTATE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rotation '%d' ignored for non-tiled fb\n"

	.comm	_OMAP_DSS_ROT_NONE,8,3          ; @OMAP_DSS_ROT_NONE
	.comm	_DRM_FORMAT_NV12,4,2            ; @DRM_FORMAT_NV12
.subsections_via_symbols
