	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_update_plane
_intel_update_plane:                    ## @intel_update_plane
	.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
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r13
	movq	%rsi, %rdi
	callq	_to_intel_crtc
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_intel_plane
	movq	%rax, %r14
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intel_pipe_to_cpu_transcoder
	movl	%eax, %ebx
	movl	(%r15), %r13d
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %r15d
	movq	%r12, -120(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_to_intel_framebuffer
	movq	(%rax), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movq	16(%r14), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	callq	_PIPECONF
	movl	%eax, %edi
	callq	_I915_READ
	movq	_PIPECONF_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.1:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r13d
	jle	LBB0_14
## %bb.2:
	cmpl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	jle	LBB0_14
## %bb.3:
	movl	(%r14), %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpl	(%rdx), %eax
	jne	LBB0_14
## %bb.4:
	movl	%r13d, %edi
	movq	-128(%rbp), %r13                ## 8-byte Reload
	movl	(%r13), %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_14
## %bb.5:
	movq	%r15, %r8
	xorl	%r15d, %r15d
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %esi
	addl	%ecx, %esi
	cmovel	%eax, %esi
	movl	$0, %ebx
	cmovel	%ecx, %ebx
	testl	%ecx, %ecx
	cmovnsl	%eax, %esi
	cmovnsl	%ecx, %ebx
	movl	%ebx, %eax
	addl	%esi, %eax
	je	LBB0_16
## %bb.6:
	movl	16(%rbp), %r9d
	movl	%edi, %edx
	subl	%ebx, %edx
	cmpl	%edi, %eax
	cmoval	%edx, %esi
	xorl	%r15d, %r15d
	movl	%r9d, %r12d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%eax, %r12d
	cmovel	%r9d, %r12d
	movl	$0, %ecx
	cmovel	%eax, %ecx
	testl	%eax, %eax
	cmovnsl	%r9d, %r12d
	cmovnsl	%eax, %ecx
	movl	%ecx, %eax
	addl	%r12d, %eax
	je	LBB0_16
## %bb.7:
	movq	%r8, %r9
	movl	%r9d, %edx
	subl	%ecx, %edx
	cmpl	%r9d, %eax
	cmoval	%edx, %r12d
	testl	%esi, %esi
	je	LBB0_16
## %bb.8:
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.9:
	movswl	42(%rbp), %r10d
	movswl	50(%rbp), %r11d
	cmpl	$0, 24(%r14)
	jne	LBB0_12
## %bb.10:
	cmpl	%r10d, %esi
	jne	LBB0_14
## %bb.11:
	cmpl	%r11d, %r12d
	jne	LBB0_14
LBB0_12:
	movl	%r11d, %eax
	imull	%r10d, %eax
	movl	%r12d, %r9d
	imull	%esi, %r9d
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	divl	%r9d
	cmpl	4(%r14), %eax
	jbe	LBB0_17
## %bb.13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_15:
	subl	(%rax), %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r11, -96(%rbp)                 ## 8-byte Spill
	movq	%r10, -104(%rbp)                ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	%edi, -64(%rbp)                 ## 4-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_intel_pin_and_fence_fb_obj
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.18:
	movswl	26(%rbp), %r10d
	movswl	34(%rbp), %r11d
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r8d, %eax
	orl	%ebx, %eax
	movq	%r13, 16(%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	-64(%rbp), %r9d                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	jne	LBB0_22
## %bb.19:
	cmpl	%r9d, %esi
	jne	LBB0_22
## %bb.20:
	cmpl	%eax, %r12d
	jne	LBB0_22
## %bb.21:
	subq	$8, %rsp
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	movq	%r13, %rdx
	movl	%ebx, %ecx
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	pushq	%r11
	pushq	%r10
	pushq	%rax
	callq	*8(%r14)
	addq	$48, %rsp
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_intel_disable_primary
	jmp	LBB0_23
LBB0_22:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r10, -64(%rbp)                 ## 8-byte Spill
	movq	%r11, -56(%rbp)                 ## 8-byte Spill
	callq	_intel_enable_primary
	subq	$8, %rsp
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	movq	%r13, %rdx
	movl	%ebx, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	%r12
	callq	*8(%r14)
	addq	$48, %rsp
LBB0_23:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	movq	-128(%rbp), %rax                ## 8-byte Reload
	je	LBB0_27
## %bb.24:
	cmpq	%rax, -80(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_26
## %bb.25:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_to_intel_crtc
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_intel_wait_for_vblank
	movq	%rbx, %rdi
	callq	_mutex_lock
LBB0_26:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_intel_unpin_fb_obj
LBB0_27:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_PIPECONF_ENABLE,4,2            ## @PIPECONF_ENABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_intel_update_plane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_update_plane
_intel_update_plane:                    ; @intel_update_plane
	.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
	str	w7, [sp, #36]                   ; 4-byte Folded Spill
	str	w6, [sp, #64]                   ; 4-byte Folded Spill
	mov	x21, x5
	mov	x23, x4
	mov	x19, x3
	mov	x28, x2
	mov	x20, x1
	mov	x24, x0
	ldr	x8, [x0]
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	ldr	x26, [x8, #8]
	mov	x0, x1
	bl	_to_intel_crtc
	mov	x27, x0
	mov	x0, x24
	bl	_to_intel_plane
	mov	x25, x0
	ldr	w1, [x0]
	mov	x0, x26
	bl	_intel_pipe_to_cpu_transcoder
	mov	x22, x0
	ldp	w26, w8, [x20]
	str	w8, [sp, #76]                   ; 4-byte Folded Spill
	str	x28, [sp, #40]                  ; 8-byte Folded Spill
	mov	x0, x28
	bl	_to_intel_framebuffer
	ldr	x28, [x0]
	ldr	x8, [x25, #16]
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	mov	x0, x22
	bl	_PIPECONF
	bl	_I915_READ
Lloh0:
	adrp	x8, _PIPECONF_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIPECONF_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_13
; %bb.1:
	cmp	w26, w19
	b.le	LBB0_13
; %bb.2:
	ldr	w8, [sp, #76]                   ; 4-byte Folded Reload
	cmp	w8, w23
	b.le	LBB0_13
; %bb.3:
	ldr	w8, [x25]
	ldr	w9, [x27]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.4:
	ldr	w8, [x28]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.5:
	adds	w8, w21, w19
	csel	w8, w21, w8, eq
	csel	w9, w19, wzr, eq
	cmp	w19, #0
	csel	w8, w8, w21, lt
	csel	w12, w9, w19, lt
	adds	w9, w12, w8
	b.eq	LBB0_15
; %bb.6:
	sub	w10, w26, w12
	cmp	w9, w26
	csel	w14, w10, w8, hi
	ldr	w10, [sp, #64]                  ; 4-byte Folded Reload
	adds	w8, w10, w23
	csel	w8, w10, w8, eq
	csel	w9, w23, wzr, eq
	cmp	w23, #0
	csel	w8, w8, w10, lt
	csel	w13, w9, w23, lt
	adds	w9, w13, w8
	b.eq	LBB0_15
; %bb.7:
	str	x28, [sp, #64]                  ; 8-byte Folded Spill
	mov	w28, #0
	ldr	w11, [sp, #76]                  ; 4-byte Folded Reload
	sub	w10, w11, w13
	cmp	w9, w11
	csel	w23, w10, w8, hi
	cbz	w14, LBB0_14
; %bb.8:
	cbz	w23, LBB0_14
; %bb.9:
	ldrsh	w21, [x29, #22]
	ldrsh	w22, [x29, #26]
	ldr	w8, [x25, #24]
	cbnz	w8, LBB0_12
; %bb.10:
	cmp	w14, w21
	b.ne	LBB0_13
; %bb.11:
	cmp	w23, w22
	b.ne	LBB0_13
LBB0_12:
	mul	w8, w22, w21
	mul	w9, w23, w14
	udiv	w8, w8, w9
	ldr	w9, [x25, #4]
	cmp	w8, w9
	b.ls	LBB0_16
LBB0_13:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w28, w8
LBB0_14:
	mov	x0, x28
	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_15:
	mov	w28, #0
	b	LBB0_14
LBB0_16:
	stp	w12, w14, [sp, #28]             ; 8-byte Folded Spill
	str	w13, [sp, #24]                  ; 4-byte Folded Spill
	ldr	x19, [sp, #56]                  ; 8-byte Folded Reload
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	ldr	x27, [sp, #64]                  ; 8-byte Folded Reload
	mov	x1, x27
	mov	x2, #0
	bl	_intel_pin_and_fence_fb_obj
	mov	x28, x0
	cbnz	w0, LBB0_26
; %bb.17:
	ldrsh	w19, [x29, #18]
	ldp	w9, w8, [sp, #32]               ; 8-byte Folded Reload
	asr	w7, w8, #16
	str	x27, [x25, #16]
	ldp	w4, w27, [sp, #24]              ; 8-byte Folded Reload
	orr	w8, w4, w27
	cbnz	w8, LBB0_21
; %bb.18:
	cmp	w9, w26
	b.ne	LBB0_21
; %bb.19:
	ldr	w8, [sp, #76]                   ; 4-byte Folded Reload
	cmp	w23, w8
	b.ne	LBB0_21
; %bb.20:
	ldr	x8, [x25, #8]
	stp	w21, w22, [sp, #4]
	str	w19, [sp]
	mov	x0, x24
	ldr	x1, [sp, #40]                   ; 8-byte Folded Reload
	ldr	x2, [sp, #64]                   ; 8-byte Folded Reload
	mov	x3, x27
	mov	x5, x26
	ldr	w6, [sp, #76]                   ; 4-byte Folded Reload
	blr	x8
	mov	x0, x20
	bl	_intel_disable_primary
	b	LBB0_22
LBB0_21:
	mov	x0, x20
	mov	x26, x4
	str	w7, [sp, #76]                   ; 4-byte Folded Spill
	bl	_intel_enable_primary
	ldr	x8, [x25, #8]
	stp	w21, w22, [sp, #4]
	str	w19, [sp]
	mov	x0, x24
	ldr	x1, [sp, #40]                   ; 8-byte Folded Reload
	ldr	x2, [sp, #64]                   ; 8-byte Folded Reload
	mov	x3, x27
	mov	x4, x26
	ldr	w5, [sp, #32]                   ; 4-byte Folded Reload
	mov	x6, x23
	ldr	w7, [sp, #76]                   ; 4-byte Folded Reload
	blr	x8
LBB0_22:
	ldp	x8, x19, [sp, #48]              ; 16-byte Folded Reload
	ldr	x9, [sp, #64]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_26
; %bb.23:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	cmp	x8, x9
	b.eq	LBB0_25
; %bb.24:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	bl	_to_intel_crtc
	ldr	w1, [x0]
	mov	x0, x19
	bl	_intel_wait_for_vblank
	mov	x0, x19
	bl	_mutex_lock
LBB0_25:
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
	bl	_intel_unpin_fb_obj
LBB0_26:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PIPECONF_ENABLE,4,2            ; @PIPECONF_ENABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_intel_update_plane
.subsections_via_symbols
