	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pipe_update_start        ## -- Begin function intel_pipe_update_start
	.p2align	4, 0x90
_intel_pipe_update_start:               ## @intel_pipe_update_start
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_to_intel_crtc
	movq	%rax, %r12
	leaq	20(%rax), %rbx
	movl	20(%rax), %edi
	callq	_to_i915
	movq	%rax, %r14
	movl	$1, %edi
	callq	_msecs_to_jiffies_timeout
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_drm_crtc_vblank_waitqueue
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_IS_VALLEYVIEW
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	_INTEL_OUTPUT_DSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_intel_crtc_has_type
	testq	%rax, %rax
	setne	%bl
LBB0_4:
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	movl	(%r15), %r14d
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_6
## %bb.5:
	movl	%r14d, %edi
	movl	$2, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %r14d
LBB0_6:
	movq	_VBLANK_EVASION_TIME_US@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_intel_usecs_to_scanlines
	cmpl	$2, %r14d
	jl	LBB0_22
## %bb.7:
	movl	%r14d, %r13d
	subl	%eax, %r13d
	testl	%r13d, %r13d
	jle	LBB0_22
## %bb.8:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_crtc_vblank_get
	movl	%eax, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_9
LBB0_22:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_local_irq_disable              ## TAILCALL
LBB0_9:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	leal	-1(%r14), %ebx
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_intel_psr_wait_for_idle
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	-56(%rbp), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_11:
	xorl	%eax, %eax
	callq	_local_irq_disable
	movl	%r13d, (%r12)
	movl	%ebx, 4(%r12)
	movq	%r12, %rdi
	callq	_trace_i915_pipe_update_start
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_prepare_to_wait
	movq	%r12, %rdi
	callq	_intel_get_crtc_scanline
	movl	%eax, %ebx
	cmpl	%r13d, %eax
	jl	LBB0_18
## %bb.12:
	cmpl	%r14d, %ebx
	jge	LBB0_18
## %bb.13:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	xorl	%eax, %eax
	callq	_local_irq_enable
	movq	%r15, %rdi
	callq	_schedule_timeout
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_local_irq_disable
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_prepare_to_wait
	movq	%r12, %rdi
	callq	_intel_get_crtc_scanline
	movl	%eax, %ebx
	cmpl	%r13d, %eax
	jl	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	%r14d, %ebx
	jl	LBB0_14
	jmp	LBB0_18
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_17:
	movl	24(%r12), %edi
	callq	_pipe_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_18:
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_finish_wait
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_crtc_vblank_put
	cmpl	%r14d, %ebx
	sete	%al
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	andb	%al, %cl
	cmpb	$1, %cl
	jne	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_intel_get_crtc_scanline
	cmpl	%r14d, %eax
	je	LBB0_19
## %bb.20:
	movl	%eax, %ebx
LBB0_21:
	movl	%ebx, 8(%r12)
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, 16(%r12)
	movq	%r12, %rdi
	callq	_intel_crtc_get_vblank_counter
	movl	%eax, 12(%r12)
	movq	%r12, %rdi
	callq	_trace_i915_pipe_update_vblank_evaded
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_DSI,4,2           ## @INTEL_OUTPUT_DSI
	.comm	_wait,4,2                       ## @wait
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_VBLANK_EVASION_TIME_US,4,2     ## @VBLANK_EVASION_TIME_US
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PSR idle timed out 0x%x, atomic update may fail\n"

	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
L_.str.1:                               ## @.str.1
	.asciz	"Potential atomic update failure on pipe %c\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pipe_update_start        ; -- Begin function intel_pipe_update_start
	.p2align	2
_intel_pipe_update_start:               ; @intel_pipe_update_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x24, x0
	ldr	w0, [x0, #8]
	bl	_to_intel_crtc
	mov	x19, x0
	mov	x20, x0
	ldr	w0, [x20, #20]!
	bl	_to_i915
	mov	x22, x0
	mov	w0, #1
	bl	_msecs_to_jiffies_timeout
	mov	x23, x0
	mov	x0, x20
	bl	_drm_crtc_vblank_waitqueue
	mov	x21, x0
	mov	x0, x22
	bl	_IS_VALLEYVIEW
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_IS_CHERRYVIEW
	cbz	x0, LBB0_23
LBB0_2:
Lloh0:
	adrp	x8, _INTEL_OUTPUT_DSI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_OUTPUT_DSI@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_intel_crtc_has_type
	cmp	x0, #0
	cset	w26, ne
LBB0_3:
Lloh3:
	adrp	x8, _wait@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_DEFINE_WAIT
	ldp	w22, w8, [x24]
Lloh6:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x22
	mov	w1, #2
	bl	_DIV_ROUND_UP
	mov	x22, x0
LBB0_5:
Lloh9:
	adrp	x8, _VBLANK_EVASION_TIME_US@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VBLANK_EVASION_TIME_US@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_intel_usecs_to_scanlines
	cmp	w22, #2
	b.lt	LBB0_8
; %bb.6:
	sub	w27, w22, w0
	cmp	w27, #1
	b.lt	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_drm_crtc_vblank_get
	bl	_WARN_ON
	cbz	x0, LBB0_9
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_local_irq_disable
LBB0_9:
	sub	w25, w22, #1
	add	x1, sp, #12
	mov	x0, x24
	bl	_intel_psr_wait_for_idle
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w1, [sp, #12]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_11:
	bl	_local_irq_disable
	stp	w27, w25, [x19]
	mov	x0, x19
	bl	_trace_i915_pipe_update_start
Lloh14:
	adrp	x28, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh15:
	ldr	x28, [x28, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
	ldr	w2, [x28]
Lloh16:
	adrp	x1, _wait@GOTPAGE
Lloh17:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x21
	bl	_prepare_to_wait
	mov	x0, x19
	bl	_intel_get_crtc_scanline
	mov	x24, x0
	cmp	w0, w27
	b.lt	LBB0_19
; %bb.12:
	cmp	w24, w22
	b.ge	LBB0_19
; %bb.13:
	cbz	x23, LBB0_18
; %bb.14:
Lloh18:
	adrp	x25, _wait@GOTPAGE
Lloh19:
	ldr	x25, [x25, _wait@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	bl	_local_irq_enable
	mov	x0, x23
	bl	_schedule_timeout
	mov	x23, x0
	bl	_local_irq_disable
	ldr	w2, [x28]
	mov	x0, x21
	mov	x1, x25
	bl	_prepare_to_wait
	mov	x0, x19
	bl	_intel_get_crtc_scanline
	mov	x24, x0
	cmp	w0, w27
	b.lt	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	cmp	w24, w22
	b.ge	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	cbnz	x23, LBB0_15
LBB0_18:
	ldr	w0, [x19, #24]
	bl	_pipe_name
	mov	x1, x0
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_19:
Lloh22:
	adrp	x1, _wait@GOTPAGE
Lloh23:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x21
	bl	_finish_wait
	mov	x0, x20
	bl	_drm_crtc_vblank_put
	cmp	w24, w22
	cset	w8, eq
	and	w8, w26, w8
	cmp	w8, #1
	b.ne	LBB0_22
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_intel_get_crtc_scanline
	cmp	w0, w22
	b.eq	LBB0_20
; %bb.21:
	mov	x24, x0
LBB0_22:
	str	w24, [x19, #8]
	bl	_ktime_get
	str	w0, [x19, #16]
	mov	x0, x19
	bl	_intel_crtc_get_vblank_counter
	str	w0, [x19, #12]
	mov	x0, x19
	bl	_trace_i915_pipe_update_vblank_evaded
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_23:
	mov	w26, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_DSI,4,2           ; @INTEL_OUTPUT_DSI
	.comm	_wait,4,2                       ; @wait
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_VBLANK_EVASION_TIME_US,4,2     ; @VBLANK_EVASION_TIME_US
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PSR idle timed out 0x%x, atomic update may fail\n"

	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
l_.str.1:                               ; @.str.1
	.asciz	"Potential atomic update failure on pipe %c\n"

.subsections_via_symbols
