	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_atomic_setup_scaler
_intel_atomic_setup_scaler:             ## @intel_atomic_setup_scaler
	.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	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r13d
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r15
	movl	8(%rdx), %edi
	callq	_to_i915
	movq	%rax, %r14
	movl	(%r15), %edi
	testl	%edi, %edi
	js	LBB0_12
LBB0_1:
	movl	%r13d, %r15d
LBB0_2:
	shrl	$31, %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_WARN
	testq	%rax, %rax
	jne	LBB0_21
## %bb.3:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.4:
	movq	16(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.5:
	movq	(%rax), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_16
## %bb.6:
	cmpl	$2, (%rax)
	jl	LBB0_16
## %bb.7:
	movl	8(%rcx), %edi
	callq	_to_intel_plane
	movq	%rax, %r13
	movq	%r14, %rdi
	movl	$9, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_IS_GEMINILAKE
	testq	%rax, %rax
	je	LBB0_28
LBB0_9:
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_icl_is_hdr_plane
	testq	%rax, %rax
	jne	LBB0_18
## %bb.10:
	movq	_PS_SCALER_MODE_PLANAR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.11:
	movl	(%rax), %edi
	callq	_PS_PLANE_Y_SEL
	orl	%eax, %r14d
	jmp	LBB0_20
LBB0_12:
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.13:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	movl	%r13d, %r15d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rcx,%rdx,8)
	je	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_14
	jmp	LBB0_2
LBB0_16:
	movq	%r14, %rdi
	callq	_INTEL_GEN
	cmpl	$9, %eax
	jg	LBB0_18
## %bb.17:
	movq	%r14, %rdi
	callq	_IS_GEMINILAKE
	testq	%rax, %rax
	je	LBB0_24
LBB0_18:
	movq	_PS_SCALER_MODE_NORMAL@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %r14d
LBB0_20:
	movl	4(%rbx), %esi
	movq	16(%rbp), %rbx
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rcx
	movl	%r15d, %r8d
	callq	_DRM_DEBUG_KMS
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	(%rbx), %rcx
	movl	%r14d, 4(%rax,%rcx,8)
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	16(%rbp), %rax
	movl	%edx, (%rax)
	movl	$1, (%rcx,%rdx,8)
	movl	(%rax), %edi
	jmp	LBB0_2
LBB0_24:
	cmpl	$1, -52(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_27
## %bb.25:
	cmpl	$2, (%rbx)
	jl	LBB0_27
## %bb.26:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	16(%rbp), %rdx
	movslq	(%rdx), %rcx
	movl	$0, (%rax,%rcx,8)
	movl	$0, (%rdx)
	movl	$1, (%rax)
	movq	_SKL_PS_SCALER_MODE_HQ@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_27:
	movq	_SKL_PS_SCALER_MODE_DYN@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_28:
	movq	_SKL_PS_SCALER_MODE_NV12@GOTPCREL(%rip), %rax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot find scaler for %s:%d\n"

	.comm	_SKL_PS_SCALER_MODE_NV12,4,2    ## @SKL_PS_SCALER_MODE_NV12
	.comm	_PS_SCALER_MODE_NORMAL,4,2      ## @PS_SCALER_MODE_NORMAL
	.comm	_PS_SCALER_MODE_PLANAR,4,2      ## @PS_SCALER_MODE_PLANAR
	.comm	_SKL_PS_SCALER_MODE_HQ,4,2      ## @SKL_PS_SCALER_MODE_HQ
	.comm	_SKL_PS_SCALER_MODE_DYN,4,2     ## @SKL_PS_SCALER_MODE_DYN
L_.str.1:                               ## @.str.1
	.asciz	"Attached scaler id %u.%u to %s:%d\n"

	.no_dead_strip	_intel_atomic_setup_scaler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_atomic_setup_scaler
_intel_atomic_setup_scaler:             ; @intel_atomic_setup_scaler
	.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, x6
	mov	x24, x5
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x26, x1
	mov	x21, x0
	ldr	w0, [x2, #8]
	bl	_to_i915
	mov	x25, x0
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_11
LBB0_1:
	lsr	w0, w8, #31
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x20
	bl	_WARN
	cbnz	x0, LBB0_20
; %bb.2:
	cbz	x24, LBB0_15
; %bb.3:
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_15
; %bb.4:
	ldr	x8, [x8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_15
; %bb.5:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_15
; %bb.6:
	ldr	w0, [x24, #8]
	bl	_to_intel_plane
	mov	x26, x0
	mov	x0, x25
	mov	w1, #9
	bl	_IS_GEN
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x25
	bl	_IS_GEMINILAKE
	cbz	x0, LBB0_26
LBB0_8:
	ldr	w1, [x26]
	mov	x0, x25
	bl	_icl_is_hdr_plane
	cbnz	x0, LBB0_17
; %bb.9:
Lloh2:
	adrp	x8, _PS_SCALER_MODE_PLANAR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PS_SCALER_MODE_PLANAR@GOTPAGEOFF]
Lloh4:
	ldr	w25, [x8]
	ldr	x8, [x24]
	cbz	x8, LBB0_19
; %bb.10:
	ldr	w0, [x8]
	bl	_PS_PLANE_Y_SEL
	orr	w25, w0, w25
	b	LBB0_19
LBB0_11:
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_1
; %bb.12:
	mov	x11, #0
	ldr	x10, [x21]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10]
	cbz	w12, LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x11, x11, #1
	add	x10, x10, #8
	cmp	x9, x11
	b.ne	LBB0_13
	b	LBB0_1
LBB0_15:
	mov	x0, x25
	bl	_INTEL_GEN
	cmp	w0, #9
	b.gt	LBB0_17
; %bb.16:
	mov	x0, x25
	bl	_IS_GEMINILAKE
	cbz	x0, LBB0_22
LBB0_17:
Lloh5:
	adrp	x8, _PS_SCALER_MODE_NORMAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PS_SCALER_MODE_NORMAL@GOTPAGEOFF]
LBB0_18:
	ldr	w25, [x8]
LBB0_19:
	ldr	w1, [x23, #4]
	ldr	w2, [x19]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x22
	mov	x4, x20
	bl	_DRM_DEBUG_KMS
	ldr	x8, [x21]
	ldrsw	x9, [x19]
	add	x8, x8, x9, lsl #3
	str	w25, [x8, #4]
LBB0_20:
	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_21:
	str	w11, [x19]
	mov	w8, #1
	str	w8, [x10]
	ldr	w8, [x19]
	b	LBB0_1
LBB0_22:
	cmp	w26, #1
	b.ne	LBB0_25
; %bb.23:
	ldr	w8, [x23]
	cmp	w8, #2
	b.lt	LBB0_25
; %bb.24:
	ldr	x8, [x21]
	ldrsw	x9, [x19]
	lsl	x9, x9, #3
	str	wzr, [x8, x9]
	str	wzr, [x19]
	mov	w9, #1
	str	w9, [x8]
Lloh9:
	adrp	x8, _SKL_PS_SCALER_MODE_HQ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SKL_PS_SCALER_MODE_HQ@GOTPAGEOFF]
	b	LBB0_18
LBB0_25:
Lloh11:
	adrp	x8, _SKL_PS_SCALER_MODE_DYN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SKL_PS_SCALER_MODE_DYN@GOTPAGEOFF]
	b	LBB0_18
LBB0_26:
Lloh13:
	adrp	x8, _SKL_PS_SCALER_MODE_NV12@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SKL_PS_SCALER_MODE_NV12@GOTPAGEOFF]
	b	LBB0_18
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot find scaler for %s:%d\n"

	.comm	_SKL_PS_SCALER_MODE_NV12,4,2    ; @SKL_PS_SCALER_MODE_NV12
	.comm	_PS_SCALER_MODE_NORMAL,4,2      ; @PS_SCALER_MODE_NORMAL
	.comm	_PS_SCALER_MODE_PLANAR,4,2      ; @PS_SCALER_MODE_PLANAR
	.comm	_SKL_PS_SCALER_MODE_HQ,4,2      ; @SKL_PS_SCALER_MODE_HQ
	.comm	_SKL_PS_SCALER_MODE_DYN,4,2     ; @SKL_PS_SCALER_MODE_DYN
l_.str.1:                               ; @.str.1
	.asciz	"Attached scaler id %u.%u to %s:%d\n"

	.no_dead_strip	_intel_atomic_setup_scaler
.subsections_via_symbols
