	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_overlay_src
_check_overlay_src:                     ## @check_overlay_src
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movl	(%rsi), %edi
	callq	_uv_hsubsampling
	movl	%eax, %r12d
	movl	(%r13), %edi
	callq	_uv_vsubsampling
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_IS_845G
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_IS_I830
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movl	4(%r13), %ecx
	movq	_IMAGE_MAX_HEIGHT_LEGACY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jg	LBB0_36
## %bb.3:
	movl	8(%r13), %eax
	movq	_IMAGE_MAX_WIDTH_LEGACY@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jg	LBB0_36
LBB0_7:
	movq	_N_VERT_Y_TAPS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	shll	$2, %edx
	cmpl	%edx, %ecx
	jl	LBB0_36
## %bb.8:
	movq	_N_HORIZ_Y_TAPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$2, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_36
## %bb.9:
	movl	(%r13), %edi
	movq	_I915_OVERLAY_TYPE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%edi, %ecx
	cmpl	$128, %ecx
	je	LBB0_16
## %bb.10:
	cmpl	$129, %ecx
	je	LBB0_12
## %bb.11:
	cmpl	$130, %ecx
	jmp	LBB0_36
LBB0_4:
	movl	4(%r13), %ecx
	movq	_IMAGE_MAX_HEIGHT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jg	LBB0_36
## %bb.5:
	movl	8(%r13), %eax
	movq	_IMAGE_MAX_WIDTH@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jle	LBB0_7
LBB0_36:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_37:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	testl	%r15d, %r15d
	js	LBB0_36
## %bb.17:
	testl	%r12d, %r12d
	js	LBB0_36
LBB0_18:
	cltd
	idivl	%r12d
	testl	%edx, %edx
	jne	LBB0_36
## %bb.19:
	movq	%r14, %rdi
	callq	_IS_I830
	movl	$255, %ecx
	testq	%rax, %rax
	jne	LBB0_21
## %bb.20:
	movq	%r14, %rdi
	callq	_IS_845G
	testq	%rax, %rax
	movl	$63, %eax
	movl	$255, %ecx
	cmovel	%eax, %ecx
LBB0_21:
	testl	%ecx, 20(%r13)
	jne	LBB0_36
## %bb.22:
	testl	%ecx, 12(%r13)
	jne	LBB0_36
## %bb.23:
	movq	%r14, %rdi
	callq	_IS_GEN4
	movl	20(%r13), %ecx
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	cmpl	$511, %ecx                      ## imm = 0x1FF
	jle	LBB0_36
LBB0_25:
	movl	(%r13), %edi
	movq	_I915_OVERLAY_TYPE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	xorl	%edx, %edx
	cmpl	$128, %eax
	setne	%dl
	shll	$12, %edx
	addl	$4096, %edx                     ## imm = 0x1000
	cmpl	%edx, %ecx
	jg	LBB0_36
## %bb.26:
	movl	12(%r13), %esi
	cmpl	$2049, %esi                     ## imm = 0x801
	jge	LBB0_36
## %bb.27:
	movq	%rbx, %r14
	xorl	%ebx, %ebx
	leal	-129(%rax), %edx
	cmpl	$2, %edx
	jae	LBB0_28
## %bb.34:
	movl	8(%r13), %esi
	callq	_packed_width_bytes
	movl	20(%r13), %ecx
	cmpl	%ecx, %eax
	jg	LBB0_36
## %bb.35:
	imull	4(%r13), %ecx
	addl	16(%r13), %ecx
	cmpl	(%r14), %ecx
	jg	LBB0_36
	jmp	LBB0_37
LBB0_12:
	cmpl	$1, %r15d
	jne	LBB0_36
## %bb.13:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	callq	_packed_depth_bytes
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_37
## %bb.14:
	movl	$0, 12(%r13)
	movq	$0, 24(%r13)
	movl	16(%r13), %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	LBB0_36
## %bb.15:
	movl	8(%r13), %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_28:
	cmpl	$128, %eax
	jne	LBB0_37
## %bb.29:
	movl	8(%r13), %eax
	cmpl	%ecx, %eax
	jg	LBB0_36
## %bb.30:
	cltd
	idivl	%r12d
	cmpl	%esi, %eax
	jg	LBB0_36
## %bb.31:
	movl	4(%r13), %eax
	imull	%eax, %ecx
	addl	16(%r13), %ecx
	movl	(%r14), %edi
	cmpl	%edi, %ecx
	jg	LBB0_36
## %bb.32:
	cltd
	idivl	%r15d
	imull	%esi, %eax
	movl	28(%r13), %ecx
	addl	%eax, %ecx
	cmpl	%edi, %ecx
	jg	LBB0_36
## %bb.33:
	addl	24(%r13), %eax
	cmpl	%edi, %eax
	jg	LBB0_36
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.comm	_IMAGE_MAX_HEIGHT_LEGACY,4,2    ## @IMAGE_MAX_HEIGHT_LEGACY
	.comm	_IMAGE_MAX_WIDTH_LEGACY,4,2     ## @IMAGE_MAX_WIDTH_LEGACY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IMAGE_MAX_HEIGHT,4,2           ## @IMAGE_MAX_HEIGHT
	.comm	_IMAGE_MAX_WIDTH,4,2            ## @IMAGE_MAX_WIDTH
	.comm	_N_VERT_Y_TAPS,4,2              ## @N_VERT_Y_TAPS
	.comm	_N_HORIZ_Y_TAPS,4,2             ## @N_HORIZ_Y_TAPS
	.comm	_I915_OVERLAY_TYPE_MASK,4,2     ## @I915_OVERLAY_TYPE_MASK
	.no_dead_strip	_check_overlay_src
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_overlay_src
_check_overlay_src:                     ; @check_overlay_src
	.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	x20, x2
	mov	x19, x1
	mov	x23, x0
	ldr	w0, [x1]
	bl	_uv_hsubsampling
	mov	x22, x0
	ldr	w0, [x19]
	bl	_uv_vsubsampling
	mov	x21, x0
	mov	x0, x23
	bl	_IS_845G
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x23
	bl	_IS_I830
	cbz	x0, LBB0_10
LBB0_2:
	ldr	w9, [x19, #4]
Lloh0:
	adrp	x8, _IMAGE_MAX_HEIGHT_LEGACY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMAGE_MAX_HEIGHT_LEGACY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w9, w8
	b.gt	LBB0_11
; %bb.3:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x10, _IMAGE_MAX_WIDTH_LEGACY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IMAGE_MAX_WIDTH_LEGACY@GOTPAGEOFF]
LBB0_4:
	ldr	w10, [x10]
	cmp	w8, w10
	b.gt	LBB0_11
; %bb.5:
Lloh5:
	adrp	x10, _N_VERT_Y_TAPS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _N_VERT_Y_TAPS@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w9, w10, lsl #2
	b.lt	LBB0_11
; %bb.6:
Lloh8:
	adrp	x9, _N_HORIZ_Y_TAPS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _N_HORIZ_Y_TAPS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9, lsl #2
	b.lt	LBB0_11
; %bb.7:
	ldr	w0, [x19]
Lloh11:
	adrp	x24, _I915_OVERLAY_TYPE_MASK@GOTPAGE
Lloh12:
	ldr	x24, [x24, _I915_OVERLAY_TYPE_MASK@GOTPAGEOFF]
	ldr	w9, [x24]
	and	w9, w9, w0
	cmp	w9, #128
	b.eq	LBB0_14
; %bb.8:
	cmp	w9, #129
	b.eq	LBB0_28
; %bb.9:
	cmp	w9, #130
	b	LBB0_11
LBB0_10:
	ldr	w9, [x19, #4]
Lloh13:
	adrp	x8, _IMAGE_MAX_HEIGHT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IMAGE_MAX_HEIGHT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w9, w8
	b.le	LBB0_13
LBB0_11:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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_13:
	ldr	w8, [x19, #8]
Lloh19:
	adrp	x10, _IMAGE_MAX_WIDTH@GOTPAGE
Lloh20:
	ldr	x10, [x10, _IMAGE_MAX_WIDTH@GOTPAGEOFF]
	b	LBB0_4
LBB0_14:
	tbnz	w21, #31, LBB0_11
; %bb.15:
	tbnz	w22, #31, LBB0_11
LBB0_16:
	sdiv	w9, w8, w22
	msub	w8, w9, w22, w8
	cbnz	w8, LBB0_11
; %bb.17:
	mov	x0, x23
	bl	_IS_I830
	mov	w25, #255
	cbnz	x0, LBB0_19
; %bb.18:
	mov	x0, x23
	bl	_IS_845G
	cmp	x0, #0
	mov	w8, #63
	csel	w25, w8, w25, eq
LBB0_19:
	ldr	w8, [x19, #20]
	tst	w8, w25
	b.ne	LBB0_11
; %bb.20:
	ldr	w8, [x19, #12]
	tst	w8, w25
	b.ne	LBB0_11
; %bb.21:
	mov	x0, x23
	bl	_IS_GEN4
	ldr	w8, [x19, #20]
	cbz	x0, LBB0_23
; %bb.22:
	cmp	w8, #511
	b.le	LBB0_11
LBB0_23:
	ldr	w0, [x19]
	ldr	w9, [x24]
	and	w10, w9, w0
	mov	w9, #8192
	mov	w11, #4096
	cmp	w10, #128
	csel	w9, w11, w9, eq
	cmp	w8, w9
	b.gt	LBB0_11
; %bb.24:
	ldr	w9, [x19, #12]
	cmp	w9, #2049
	b.ge	LBB0_11
; %bb.25:
	sub	w11, w10, #129
	cmp	w11, #2
	b.hs	LBB0_32
; %bb.26:
	ldr	w1, [x19, #8]
	bl	_packed_width_bytes
	ldr	w8, [x19, #20]
	cmp	w0, w8
	b.gt	LBB0_11
; %bb.27:
	ldr	w9, [x19, #4]
	ldr	w10, [x19, #16]
	madd	w8, w9, w8, w10
	ldr	w9, [x20]
	cmp	w8, w9
	b.gt	LBB0_11
	b	LBB0_38
LBB0_28:
	cmp	w21, #1
	b.ne	LBB0_11
; %bb.29:
	bl	_packed_depth_bytes
	tbnz	w0, #31, LBB0_12
; %bb.30:
	str	wzr, [x19, #12]
	str	xzr, [x19, #24]
	ldr	w8, [x19, #16]
	sdiv	w9, w8, w0
	msub	w8, w9, w0, w8
	cbnz	w8, LBB0_11
; %bb.31:
	ldr	w8, [x19, #8]
	b	LBB0_16
LBB0_32:
	cmp	w10, #128
	b.ne	LBB0_38
; %bb.33:
	ldr	w10, [x19, #8]
	cmp	w10, w8
	b.gt	LBB0_11
; %bb.34:
	sdiv	w10, w10, w22
	cmp	w10, w9
	b.gt	LBB0_11
; %bb.35:
	ldr	w10, [x19, #4]
	ldr	w11, [x19, #16]
	madd	w11, w10, w8, w11
	ldr	w8, [x20]
	cmp	w11, w8
	b.gt	LBB0_11
; %bb.36:
	sdiv	w10, w10, w21
	mul	w9, w10, w9
	ldr	w10, [x19, #28]
	add	w10, w10, w9
	cmp	w10, w8
	b.gt	LBB0_11
; %bb.37:
	ldr	w10, [x19, #24]
	add	w9, w10, w9
	cmp	w9, w8
	b.gt	LBB0_11
LBB0_38:
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IMAGE_MAX_HEIGHT_LEGACY,4,2    ; @IMAGE_MAX_HEIGHT_LEGACY
	.comm	_IMAGE_MAX_WIDTH_LEGACY,4,2     ; @IMAGE_MAX_WIDTH_LEGACY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IMAGE_MAX_HEIGHT,4,2           ; @IMAGE_MAX_HEIGHT
	.comm	_IMAGE_MAX_WIDTH,4,2            ; @IMAGE_MAX_WIDTH
	.comm	_N_VERT_Y_TAPS,4,2              ; @N_VERT_Y_TAPS
	.comm	_N_HORIZ_Y_TAPS,4,2             ; @N_HORIZ_Y_TAPS
	.comm	_I915_OVERLAY_TYPE_MASK,4,2     ; @I915_OVERLAY_TYPE_MASK
	.no_dead_strip	_check_overlay_src
.subsections_via_symbols
