	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __intel_get_crtc_scanline
___intel_get_crtc_scanline:             ## @__intel_get_crtc_scanline
	.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	%rdi, %r12
	movq	8(%rdi), %rdi
	callq	_to_i915
	cmpl	$0, 16(%r12)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	8(%r12), %rdi
	movl	(%r12), %r14d
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	callq	_drm_crtc_index
	leaq	(%rax,%rax,2), %rax
	movq	_I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx,%rax,4)
	je	LBB0_3
## %bb.17:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___intel_get_crtc_scanline_from_timestamp ## TAILCALL
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_16
LBB0_3:
	movl	4(%rbx,%rax,4), %edx
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rbx,%rax,4)
	je	LBB0_4
## %bb.5:
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_6
LBB0_4:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
LBB0_6:
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_IS_GEN
	movq	%rax, %r13
	movl	%r14d, %edi
	callq	_PIPEDSL
	movl	%eax, %edi
	callq	_I915_READ_FW
	movl	%eax, %ebx
	testq	%r13, %r13
	jne	LBB0_7
## %bb.8:
	movq	_DSL_LINEMASK_GEN3@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_DSL_LINEMASK_GEN2@GOTPCREL(%rip), %rax
LBB0_9:
	andl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_HAS_DDI
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	testl	%ebx, %ebx
	jne	LBB0_15
## %bb.11:
	movl	$100, %r15d
	movq	_DSL_LINEMASK_GEN3@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	%r14d, %edi
	callq	_PIPEDSL
	movl	%eax, %edi
	callq	_I915_READ_FW
	movl	%eax, %ebx
	andl	(%r13), %ebx
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	decl	%r15d
	jne	LBB0_12
## %bb.14:
	xorl	%ebx, %ebx
LBB0_15:
	addl	4(%r12), %ebx
	movl	%ebx, %eax
	cltd
	idivl	-44(%rbp)                       ## 4-byte Folded Reload
	movl	%edx, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP,4,2 ## @I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_DSL_LINEMASK_GEN2,4,2          ## @DSL_LINEMASK_GEN2
	.comm	_DSL_LINEMASK_GEN3,4,2          ## @DSL_LINEMASK_GEN3
	.no_dead_strip	___intel_get_crtc_scanline
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __intel_get_crtc_scanline
___intel_get_crtc_scanline:             ; @__intel_get_crtc_scanline
	.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	x19, x0
	mov	x22, x0
	ldr	x0, [x22, #8]!
	bl	_to_i915
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w20, [x19]
	ldr	x8, [x22]
	ldr	x23, [x8]
	mov	x0, x22
	bl	_drm_crtc_index
	mov	w8, #12
	mul	x8, x0, x8
	ldr	w8, [x23, x8]
Lloh0:
	adrp	x9, _I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	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
	b	___intel_get_crtc_scanline_from_timestamp
LBB0_3:
	mov	w0, #-1
	b	LBB0_11
LBB0_4:
	mov	w8, #12
	madd	x8, x0, x8, x23
	ldp	w9, w8, [x8, #4]
Lloh3:
	adrp	x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, #0
	cinc	w11, w9, lt
	asr	w11, w11, #1
	tst	w10, w8
	csel	w23, w9, w11, eq
	mov	x0, x21
	mov	w1, #2
	bl	_IS_GEN
	mov	x22, x0
	mov	x0, x20
	bl	_PIPEDSL
	bl	_I915_READ_FW
Lloh6:
	adrp	x24, _DSL_LINEMASK_GEN3@GOTPAGE
Lloh7:
	ldr	x24, [x24, _DSL_LINEMASK_GEN3@GOTPAGEOFF]
Lloh8:
	adrp	x8, _DSL_LINEMASK_GEN2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DSL_LINEMASK_GEN2@GOTPAGEOFF]
	cmp	x22, #0
	csel	x8, x24, x8, eq
	ldr	w8, [x8]
	and	w22, w8, w0
	mov	x0, x21
	bl	_HAS_DDI
	cbz	x0, LBB0_10
; %bb.5:
	cbnz	w22, LBB0_10
; %bb.6:
	mov	w21, #100
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_udelay
	mov	x0, x20
	bl	_PIPEDSL
	bl	_I915_READ_FW
	ldr	w8, [x24]
	ands	w22, w8, w0
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	subs	w21, w21, #1
	b.ne	LBB0_7
; %bb.9:
	mov	w22, #0
LBB0_10:
	ldr	w8, [x19, #4]
	add	w8, w8, w22
	sdiv	w9, w8, w23
	msub	w0, w9, w23, w8
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP,4,2 ; @I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_DSL_LINEMASK_GEN2,4,2          ; @DSL_LINEMASK_GEN2
	.comm	_DSL_LINEMASK_GEN3,4,2          ; @DSL_LINEMASK_GEN3
	.no_dead_strip	___intel_get_crtc_scanline
.subsections_via_symbols
