	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sti_hqvdp_atomic_check
_sti_hqvdp_atomic_check:                ## @sti_hqvdp_atomic_check
	.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	%rsi, %r14
	movq	%rdi, %r15
	callq	_to_sti_plane
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_sti_hqvdp
	movq	48(%r14), %rsi
	xorl	%r12d, %r12d
	testq	%rsi, %rsi
	je	LBB0_28
## %bb.1:
	movq	40(%r14), %r13
	testq	%r13, %r13
	je	LBB0_28
## %bb.2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movl	32(%r14), %edi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	callq	_drm_atomic_get_crtc_state
	movq	%rax, %rbx
	movslq	(%r14), %rax
	movslq	4(%r14), %r15
	movl	28(%r14), %edi
	movq	16(%rbx), %rdx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	subq	%rax, %rdx
	xorl	%esi, %esi
	callq	_clamp_val
	movl	%eax, %r12d
	movl	24(%r14), %edi
	movq	8(%rbx), %rdx
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	subq	%r15, %rdx
	xorl	%esi, %esi
	callq	_clamp_val
	movl	%eax, %r15d
	movswl	10(%r14), %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movswl	14(%r14), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movswl	18(%r14), %edx
	movswl	22(%r14), %r14d
	cmpq	$0, (%rbx)
	je	LBB0_8
## %bb.3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	movq	%rdx, %rbx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	callq	_sti_hqvdp_check_hw_scaling
	movq	%rbx, %rdx
	testl	%eax, %eax
	je	LBB0_4
LBB0_8:
	movl	%r12d, %ebx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_drm_fb_cma_get_gem_obj
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%ebx, %edi
	movl	$2, %esi
	callq	_ALIGN
	movl	%eax, %ebx
	movl	%r15d, %edi
	movl	$2, %esi
	callq	_ALIGN
	movl	%eax, %r8d
	movq	_MAX_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	cmpl	%eax, %esi
	jg	LBB0_18
## %bb.11:
	movq	_MIN_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %esi
	jl	LBB0_18
## %bb.12:
	movq	_MAX_HEIGHT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %r14d
	jle	LBB0_13
LBB0_18:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_7
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rdi
LBB0_5:
	xorl	%r12d, %r12d
LBB0_6:
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_28:
	movl	%r12d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_MIN_HEIGHT@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	cmpl	%edi, %r14d
	jl	LBB0_18
## %bb.14:
	cmpl	%eax, %ebx
	jg	LBB0_18
## %bb.15:
	cmpl	%ecx, %ebx
	jl	LBB0_18
## %bb.16:
	cmpl	%edx, %r8d
	jg	LBB0_18
## %bb.17:
	cmpl	%edi, %r8d
	jl	LBB0_18
## %bb.19:
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 16(%rax)
	jne	LBB0_21
## %bb.20:
	movq	%rax, %rdi
	callq	_sti_hqvdp_start_xp70
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_21:
	cmpl	$0, (%rax)
	movq	-120(%rbp), %r15                ## 8-byte Reload
	je	LBB0_22
LBB0_27:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %ebx
	callq	_to_sti_mixer
	movl	%eax, %edi
	callq	_sti_mixer_to_str
	movl	%eax, %r13d
	movl	(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-112(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	callq	_sti_plane_to_str
	leaq	L_.str.5(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r15, %rdi
	callq	_sti_plane_to_str
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %esi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	-96(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	-104(%rbp), %r9                 ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%r14
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	callq	_DRM_DEBUG_KMS
	addq	$32, %rsp
	jmp	LBB0_28
LBB0_22:
	movl	4(%rax), %edi
	movq	%rax, %r13
	callq	_clk_prepare_enable
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_5
LBB0_24:
	movl	12(%r13), %edi
	movq	%r13, %rsi
	addq	$8, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_sti_vtg_register_client
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movl	4(%r13), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_7
LBB0_26:
	movl	$1, (%r13)
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Scaling beyond HW capabilities\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Can't get CMA GEM object for fb\n"

	.comm	_MAX_WIDTH,4,2                  ## @MAX_WIDTH
	.comm	_MIN_WIDTH,4,2                  ## @MIN_WIDTH
	.comm	_MAX_HEIGHT,4,2                 ## @MAX_HEIGHT
	.comm	_MIN_HEIGHT,4,2                 ## @MIN_HEIGHT
L_.str.2:                               ## @.str.2
	.asciz	"Invalid in/out size %dx%d -> %dx%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to prepare/enable pix main clk\n"

L_.str.4:                               ## @.str.4
	.asciz	"Cannot register VTG notifier\n"

L_.str.5:                               ## @.str.5
	.asciz	"CRTC:%d (%s) drm plane:%d (%s)\n"

L_.str.6:                               ## @.str.6
	.asciz	"%s dst=(%dx%d)@(%d,%d) - src=(%dx%d)@(%d,%d)\n"

	.no_dead_strip	_sti_hqvdp_atomic_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sti_hqvdp_atomic_check
_sti_hqvdp_atomic_check:                ; @sti_hqvdp_atomic_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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, x1
	mov	x21, x0
	bl	_to_sti_plane
	mov	x19, x0
	bl	_to_sti_hqvdp
	ldp	x26, x24, [x23, #40]
	cmp	x24, #0
	ccmp	x26, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_19
LBB0_2:
	mov	x25, x0
	ldr	w0, [x23, #32]
	mov	x1, x24
	bl	_drm_atomic_get_crtc_state
	mov	x20, x0
	ldpsw	x9, x22, [x23]
	ldr	w0, [x23, #28]
	ldr	x8, [x20, #16]
	str	x9, [sp, #72]                   ; 8-byte Folded Spill
	sub	x2, x8, x9
	mov	w1, #0
	bl	_clamp_val
	mov	x27, x0
	ldr	w0, [x23, #24]
	ldr	x8, [x20, #8]
	str	x22, [sp, #64]                  ; 8-byte Folded Spill
	sub	x2, x8, x22
	mov	w1, #0
	bl	_clamp_val
	mov	x28, x0
	ldrsh	w9, [x23, #10]
	ldrsh	w8, [x23, #14]
	stp	x8, x9, [sp, #48]               ; 16-byte Folded Spill
	ldrsh	w22, [x23, #18]
	ldrsh	w23, [x23, #22]
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x25
	mov	x1, x20
	mov	x2, x22
	mov	x3, x23
	mov	x4, x27
	mov	x5, x28
	bl	_sti_hqvdp_check_hw_scaling
	cbz	w0, LBB0_16
LBB0_4:
	mov	x0, x26
	mov	w1, #0
	bl	_drm_fb_cma_get_gem_obj
	cbz	w0, LBB0_15
; %bb.5:
	mov	x0, x27
	mov	w1, #2
	bl	_ALIGN
	mov	x26, x0
	mov	x0, x28
	mov	w1, #2
	bl	_ALIGN
	mov	x27, x0
Lloh0:
	adrp	x8, _MAX_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, w8
	b.gt	LBB0_14
; %bb.6:
Lloh3:
	adrp	x9, _MIN_WIDTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MIN_WIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w22, w9
	b.lt	LBB0_14
; %bb.7:
Lloh6:
	adrp	x10, _MAX_HEIGHT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MAX_HEIGHT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w23, w10
	b.gt	LBB0_14
; %bb.8:
Lloh9:
	adrp	x11, _MIN_HEIGHT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MIN_HEIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	cmp	w23, w11
	b.lt	LBB0_14
; %bb.9:
	cmp	w26, w8
	ccmp	w26, w9, #8, le
	ccmp	w27, w10, #0, ge
	ccmp	w27, w11, #8, le
	b.lt	LBB0_14
; %bb.10:
	ldr	w8, [x25, #16]
	cbnz	w8, LBB0_12
; %bb.11:
	mov	x0, x25
	bl	_sti_hqvdp_start_xp70
LBB0_12:
	ldr	w8, [x25]
	cbz	w8, LBB0_20
LBB0_13:
	ldr	w20, [x24]
	mov	x0, x24
	bl	_to_sti_mixer
	bl	_sti_mixer_to_str
	mov	x24, x0
	ldr	w21, [x21]
	mov	x0, x19
	bl	_sti_plane_to_str
	mov	x4, x0
Lloh12:
	adrp	x0, l_.str.5@PAGE
Lloh13:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x20
	mov	x2, x24
	mov	x3, x21
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_sti_plane_to_str
	mov	x1, x0
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	stp	x8, x9, [sp, #24]
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	ldp	x8, x4, [sp, #64]               ; 16-byte Folded Reload
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
Lloh14:
	adrp	x0, l_.str.6@PAGE
Lloh15:
	add	x0, x0, l_.str.6@PAGEOFF
	stp	x22, x23, [sp, #8]
	str	x8, [sp]
	mov	x2, x26
	mov	x3, x27
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_DRM_DEBUG_KMS
	b	LBB0_1
LBB0_14:
	stp	x26, x27, [sp, #16]
	stp	x22, x23, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_15:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_16:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
LBB0_17:
	bl	_DRM_ERROR
LBB0_18:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_20:
	ldr	w0, [x25, #4]
	bl	_clk_prepare_enable
	cbz	x0, LBB0_22
; %bb.21:
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_22:
	ldr	w0, [x25, #12]
	add	x1, x25, #8
	mov	x2, x24
	bl	_sti_vtg_register_client
	cbz	x0, LBB0_24
; %bb.23:
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
	ldr	w0, [x25, #4]
	bl	_clk_disable_unprepare
	b	LBB0_18
LBB0_24:
	mov	w8, #1
	str	w8, [x25]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Scaling beyond HW capabilities\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Can't get CMA GEM object for fb\n"

	.comm	_MAX_WIDTH,4,2                  ; @MAX_WIDTH
	.comm	_MIN_WIDTH,4,2                  ; @MIN_WIDTH
	.comm	_MAX_HEIGHT,4,2                 ; @MAX_HEIGHT
	.comm	_MIN_HEIGHT,4,2                 ; @MIN_HEIGHT
l_.str.2:                               ; @.str.2
	.asciz	"Invalid in/out size %dx%d -> %dx%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to prepare/enable pix main clk\n"

l_.str.4:                               ; @.str.4
	.asciz	"Cannot register VTG notifier\n"

l_.str.5:                               ; @.str.5
	.asciz	"CRTC:%d (%s) drm plane:%d (%s)\n"

l_.str.6:                               ; @.str.6
	.asciz	"%s dst=(%dx%d)@(%d,%d) - src=(%dx%d)@(%d,%d)\n"

	.no_dead_strip	_sti_hqvdp_atomic_check
.subsections_via_symbols
