	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_wait_for_vblank          ## -- Begin function intel_wait_for_vblank
	.p2align	4, 0x90
_intel_wait_for_vblank:                 ## @intel_wait_for_vblank
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	%esi, %edi
	callq	_PIPESTAT
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_INTEL_INFO
	cmpl	$5, (%rax)
	jl	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ironlake_wait_for_vblank       ## TAILCALL
LBB0_1:
	movl	%r14d, %edi
	callq	_I915_READ
	movq	_PIPE_VBLANK_INTERRUPT_STATUS@GOTPCREL(%rip), %rbx
	orl	(%rbx), %eax
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movl	%r14d, %edi
	callq	_I915_READ
	andl	(%rbx), %eax
	movl	%eax, %edi
	movl	$50, %esi
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIPE_VBLANK_INTERRUPT_STATUS,4,2 ## @PIPE_VBLANK_INTERRUPT_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vblank wait timed out\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_wait_for_vblank          ; -- Begin function intel_wait_for_vblank
	.p2align	2
_intel_wait_for_vblank:                 ; @intel_wait_for_vblank
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_PIPESTAT
	mov	x19, x0
	mov	x0, x21
	bl	_INTEL_INFO
	ldr	w8, [x0]
	cmp	w8, #5
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ironlake_wait_for_vblank
LBB0_2:
	mov	x0, x19
	bl	_I915_READ
Lloh0:
	adrp	x20, _PIPE_VBLANK_INTERRUPT_STATUS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PIPE_VBLANK_INTERRUPT_STATUS@GOTPAGEOFF]
	ldr	w8, [x20]
	orr	w1, w8, w0
	mov	x0, x19
	bl	_I915_WRITE
	mov	x0, x19
	bl	_I915_READ
	ldr	w8, [x20]
	and	w0, w8, w0
	mov	w1, #50
	bl	_wait_for
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_DRM_DEBUG_KMS
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_PIPE_VBLANK_INTERRUPT_STATUS,4,2 ; @PIPE_VBLANK_INTERRUPT_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vblank wait timed out\n"

.subsections_via_symbols
