	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_overlay_attrs_ioctl      ## -- Begin function intel_overlay_attrs_ioctl
	.p2align	4, 0x90
_intel_overlay_attrs_ioctl:             ## @intel_overlay_attrs_ioctl
	.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	%rsi, %r12
	movq	%rdi, %r14
	callq	_to_i915
	movq	(%rax), %r15
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%r14, %rdi
	callq	_drm_modeset_lock_all
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_I915_OVERLAY_UPDATE_ATTRS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	4(%r12), %eax
	movsbl	%al, %ecx
	cmpl	%eax, %ecx
	jne	LBB0_15
## %bb.6:
	movl	8(%r12), %ecx
	cmpl	$255, %ecx
	jg	LBB0_15
## %bb.7:
	movl	12(%r12), %edx
	cmpl	$1023, %edx                     ## imm = 0x3FF
	jg	LBB0_15
## %bb.8:
	movl	64(%r12), %esi
	movl	%esi, 28(%r15)
	movl	%eax, (%r15)
	movl	%ecx, 4(%r15)
	movl	%edx, 8(%r15)
	movl	24(%r15), %esi
	movq	%r15, %rdi
	callq	_update_reg_attrs
	movq	_I915_OVERLAY_UPDATE_GAMMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_14
## %bb.9:
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	jne	LBB0_15
## %bb.10:
	cmpq	$0, 16(%r15)
	je	LBB0_12
## %bb.11:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_3:
	movl	28(%r15), %eax
	movl	%eax, 64(%r12)
	movl	(%r15), %eax
	movl	%eax, 4(%r12)
	movl	4(%r15), %eax
	movl	%eax, 8(%r12)
	movl	8(%r15), %eax
	movl	%eax, 12(%r12)
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	jne	LBB0_14
## %bb.4:
	movq	_OGAMC0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	%rax, 56(%r12)
	movq	_OGAMC1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	%rax, 48(%r12)
	movq	_OGAMC2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	%rax, 40(%r12)
	movq	_OGAMC3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	%rax, 32(%r12)
	movq	_OGAMC4@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	%rax, 24(%r12)
	movq	_OGAMC5@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	%rax, 16(%r12)
LBB0_14:
	movq	_I915_OVERLAY_DISABLE_DEST_COLORKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r12), %eax
	sete	%cl
	movl	%ecx, 12(%r15)
	xorl	%ebx, %ebx
LBB0_15:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_drm_modeset_unlock_all
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r12, %rdi
	callq	_check_gamma
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	_OGAMC0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	56(%r12), %rsi
	callq	_I915_WRITE
	movq	_OGAMC1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	48(%r12), %rsi
	callq	_I915_WRITE
	movq	_OGAMC2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	40(%r12), %rsi
	callq	_I915_WRITE
	movq	_OGAMC3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%r12), %rsi
	callq	_I915_WRITE
	movq	_OGAMC4@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r12), %rsi
	callq	_I915_WRITE
	movq	_OGAMC5@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r12), %rsi
	callq	_I915_WRITE
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"userspace bug: no overlay\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I915_OVERLAY_UPDATE_ATTRS,4,2  ## @I915_OVERLAY_UPDATE_ATTRS
	.comm	_OGAMC0,4,2                     ## @OGAMC0
	.comm	_OGAMC1,4,2                     ## @OGAMC1
	.comm	_OGAMC2,4,2                     ## @OGAMC2
	.comm	_OGAMC3,4,2                     ## @OGAMC3
	.comm	_OGAMC4,4,2                     ## @OGAMC4
	.comm	_OGAMC5,4,2                     ## @OGAMC5
	.comm	_I915_OVERLAY_UPDATE_GAMMA,4,2  ## @I915_OVERLAY_UPDATE_GAMMA
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_I915_OVERLAY_DISABLE_DEST_COLORKEY,4,2 ## @I915_OVERLAY_DISABLE_DEST_COLORKEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_overlay_attrs_ioctl      ; -- Begin function intel_overlay_attrs_ioctl
	.p2align	2
_intel_overlay_attrs_ioctl:             ; @intel_overlay_attrs_ioctl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_to_i915
	ldr	x21, [x0]
	cbz	x21, LBB0_9
; %bb.1:
	mov	x23, x0
	mov	x0, x19
	bl	_drm_modeset_lock_all
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _I915_OVERLAY_UPDATE_ATTRS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I915_OVERLAY_UPDATE_ATTRS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	ldr	w8, [x20, #4]
	cmp	w8, w8, sxtb
	b.ne	LBB0_13
; %bb.3:
	ldr	w9, [x20, #8]
	cmp	w9, #255
	b.gt	LBB0_13
; %bb.4:
	ldr	w10, [x20, #12]
	cmp	w10, #1023
	b.gt	LBB0_13
; %bb.5:
	ldr	w11, [x20, #64]
	str	w11, [x21, #28]
	stp	w8, w9, [x21]
	str	w10, [x21, #8]
	ldr	w1, [x21, #24]
	mov	x0, x21
	bl	_update_reg_attrs
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _I915_OVERLAY_UPDATE_GAMMA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I915_OVERLAY_UPDATE_GAMMA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.6:
	mov	x0, x23
	mov	w1, #2
	bl	_IS_GEN
	cbnz	x0, LBB0_13
; %bb.7:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_15
; %bb.8:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_9:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_10:
	ldr	w8, [x21, #28]
	str	w8, [x20, #64]
	ldr	d0, [x21]
	stur	d0, [x20, #4]
	ldr	w8, [x21, #8]
	str	w8, [x20, #12]
	mov	x0, x23
	mov	w1, #2
	bl	_IS_GEN
	cbnz	x0, LBB0_12
; %bb.11:
Lloh17:
	adrp	x8, _OGAMC0@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OGAMC0@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_I915_READ
	str	x0, [x20, #56]
Lloh20:
	adrp	x8, _OGAMC1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OGAMC1@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_I915_READ
	str	x0, [x20, #48]
Lloh23:
	adrp	x8, _OGAMC2@GOTPAGE
Lloh24:
	ldr	x8, [x8, _OGAMC2@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_I915_READ
	str	x0, [x20, #40]
Lloh26:
	adrp	x8, _OGAMC3@GOTPAGE
Lloh27:
	ldr	x8, [x8, _OGAMC3@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_I915_READ
	str	x0, [x20, #32]
Lloh29:
	adrp	x8, _OGAMC4@GOTPAGE
Lloh30:
	ldr	x8, [x8, _OGAMC4@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_I915_READ
	str	x0, [x20, #24]
Lloh32:
	adrp	x8, _OGAMC5@GOTPAGE
Lloh33:
	ldr	x8, [x8, _OGAMC5@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_I915_READ
	str	x0, [x20, #16]
LBB0_12:
	mov	w22, #0
	ldr	w8, [x20]
Lloh35:
	adrp	x9, _I915_OVERLAY_DISABLE_DEST_COLORKEY@GOTPAGE
Lloh36:
	ldr	x9, [x9, _I915_OVERLAY_DISABLE_DEST_COLORKEY@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, eq
	str	w8, [x21, #12]
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x19
	bl	_drm_modeset_unlock_all
LBB0_14:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x20
	bl	_check_gamma
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.16:
Lloh38:
	adrp	x8, _OGAMC0@GOTPAGE
Lloh39:
	ldr	x8, [x8, _OGAMC0@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	ldr	x1, [x20, #56]
	bl	_I915_WRITE
Lloh41:
	adrp	x8, _OGAMC1@GOTPAGE
Lloh42:
	ldr	x8, [x8, _OGAMC1@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	ldr	x1, [x20, #48]
	bl	_I915_WRITE
Lloh44:
	adrp	x8, _OGAMC2@GOTPAGE
Lloh45:
	ldr	x8, [x8, _OGAMC2@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	ldr	x1, [x20, #40]
	bl	_I915_WRITE
Lloh47:
	adrp	x8, _OGAMC3@GOTPAGE
Lloh48:
	ldr	x8, [x8, _OGAMC3@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
	ldr	x1, [x20, #32]
	bl	_I915_WRITE
Lloh50:
	adrp	x8, _OGAMC4@GOTPAGE
Lloh51:
	ldr	x8, [x8, _OGAMC4@GOTPAGEOFF]
Lloh52:
	ldr	w0, [x8]
	ldr	x1, [x20, #24]
	bl	_I915_WRITE
Lloh53:
	adrp	x8, _OGAMC5@GOTPAGE
Lloh54:
	ldr	x8, [x8, _OGAMC5@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
	ldr	x1, [x20, #16]
	bl	_I915_WRITE
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"userspace bug: no overlay\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I915_OVERLAY_UPDATE_ATTRS,4,2  ; @I915_OVERLAY_UPDATE_ATTRS
	.comm	_OGAMC0,4,2                     ; @OGAMC0
	.comm	_OGAMC1,4,2                     ; @OGAMC1
	.comm	_OGAMC2,4,2                     ; @OGAMC2
	.comm	_OGAMC3,4,2                     ; @OGAMC3
	.comm	_OGAMC4,4,2                     ; @OGAMC4
	.comm	_OGAMC5,4,2                     ; @OGAMC5
	.comm	_I915_OVERLAY_UPDATE_GAMMA,4,2  ; @I915_OVERLAY_UPDATE_GAMMA
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_I915_OVERLAY_DISABLE_DEST_COLORKEY,4,2 ; @I915_OVERLAY_DISABLE_DEST_COLORKEY
.subsections_via_symbols
