	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_hdmi_mode_valid
_intel_hdmi_mode_valid:                 ## @intel_hdmi_mode_valid
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	callq	_intel_attached_hdmi
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_intel_hdmi_to_dev
	movq	%rax, %rdi
	callq	_to_i915
	movq	%rax, %r12
	movq	8(%r14), %rdi
	callq	_to_i915
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r14), %edi
	callq	_to_intel_digital_connector_state
	movl	(%rax), %edi
	callq	_READ_ONCE
	movq	_HDMI_AUDIO_OFF_DVI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	xorl	%r9d, %r9d
	cmpq	%rdi, %rax
	sete	%r8b
	movl	(%r13), %ebx
	movq	_DRM_MODE_FLAG_DBLSCAN@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_MODE_NO_DBLESCAN@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movl	4(%r13), %edx
	movq	_DRM_MODE_FLAG_3D_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	movq	_DRM_MODE_FLAG_3D_FRAME_PACKING@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %ecx
	sete	%cl
	shll	%cl, %edx
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	jle	LBB0_6
## %bb.3:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movb	%r8b, %r9b
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	_DRM_MODE_FLAG_DBLCLK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	setne	%cl
	shll	%cl, %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rdx, %rbx
	callq	_drm_mode_is_420_only
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%ebx, %eax
	sarl	%eax
	movl	%eax, %esi
	movq	%r15, %r13
	jmp	LBB0_9
LBB0_8:
	movq	%r15, %r13
	movq	%rbx, %rsi
LBB0_9:
	movq	%r13, %rdi
	movq	%rsi, %r14
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$1, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_hdmi_port_clock_valid
	movl	%eax, %ebx
	cmpq	$0, (%r13)
	je	LBB0_5
## %bb.10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_5
## %bb.11:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_13
## %bb.12:
	movq	%r12, %r15
	jmp	LBB0_15
LBB0_13:
	movq	%r12, %r15
	movq	%r12, %rdi
	movq	%rax, %r12
	callq	_HAS_GMCH
	testl	%eax, %eax
	movq	%r12, %rax
	jne	LBB0_15
## %bb.14:
	leal	(%r14,%r14,2), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%r13, %rdi
	movl	$1, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_hdmi_port_clock_valid
	movl	%eax, %ebx
	movq	%r12, %rax
LBB0_15:
	cmpl	(%rax), %ebx
	je	LBB0_5
## %bb.16:
	movq	%r15, %rdi
	callq	_INTEL_GEN
	cmpl	$11, %eax
	jl	LBB0_5
## %bb.17:
	leal	(%r14,%r14,4), %eax
	leal	(%r14,%r14,4), %esi
	addl	$3, %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$2, %esi
	movq	%r13, %rdi
	movl	$1, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hdmi_port_clock_valid          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_AUDIO_OFF_DVI,8,3         ## @HDMI_AUDIO_OFF_DVI
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ## @DRM_MODE_FLAG_DBLSCAN
	.comm	_MODE_NO_DBLESCAN,4,2           ## @MODE_NO_DBLESCAN
	.comm	_DRM_MODE_FLAG_3D_MASK,4,2      ## @DRM_MODE_FLAG_3D_MASK
	.comm	_DRM_MODE_FLAG_3D_FRAME_PACKING,4,2 ## @DRM_MODE_FLAG_3D_FRAME_PACKING
	.comm	_MODE_CLOCK_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_DRM_MODE_FLAG_DBLCLK,4,2       ## @DRM_MODE_FLAG_DBLCLK
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_intel_hdmi_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_hdmi_mode_valid
_intel_hdmi_mode_valid:                 ; @intel_hdmi_mode_valid
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x1
	mov	x23, x0
	bl	_intel_attached_hdmi
	mov	x19, x0
	bl	_intel_hdmi_to_dev
	bl	_to_i915
	mov	x20, x0
	ldr	x0, [x23, #8]
	bl	_to_i915
	ldr	w26, [x0]
	ldr	w0, [x23, #4]
	bl	_to_intel_digital_connector_state
	ldr	w0, [x0]
	bl	_READ_ONCE
Lloh0:
	adrp	x8, _HDMI_AUDIO_OFF_DVI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDMI_AUDIO_OFF_DVI@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
	cmp	x0, x25
	cset	w21, eq
	ldr	w8, [x22]
Lloh3:
	adrp	x9, _DRM_MODE_FLAG_DBLSCAN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_FLAG_DBLSCAN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _MODE_NO_DBLESCAN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MODE_NO_DBLESCAN@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	w9, [x22, #4]
Lloh8:
	adrp	x10, _DRM_MODE_FLAG_3D_MASK@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DRM_MODE_FLAG_3D_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _DRM_MODE_FLAG_3D_FRAME_PACKING@GOTPAGE
Lloh12:
	ldr	x11, [x11, _DRM_MODE_FLAG_3D_FRAME_PACKING@GOTPAGEOFF]
	and	w10, w10, w8
Lloh13:
	ldr	w11, [x11]
	cmp	w10, w11
	cset	w10, eq
	lsl	w9, w9, w10
	cmp	w9, w26
	b.le	LBB0_6
; %bb.3:
Lloh14:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
LBB0_4:
	ldr	w23, [x8]
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x24, x0
Lloh16:
	adrp	x10, _DRM_MODE_FLAG_DBLCLK@GOTPAGE
Lloh17:
	ldr	x10, [x10, _DRM_MODE_FLAG_DBLCLK@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w8, ne
	lsl	w26, w9, w8
	mov	x0, x23
	mov	x1, x22
	bl	_drm_mode_is_420_only
	cmp	w26, #0
	cinc	w8, w26, lt
	asr	w8, w8, #1
	cmp	x0, #0
	csel	w22, w26, w8, eq
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1
	mov	x3, x21
	bl	_hdmi_port_clock_valid
	mov	x23, x0
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.7:
	cmp	x24, x25
	b.eq	LBB0_5
; %bb.8:
Lloh19:
	adrp	x24, _MODE_OK@GOTPAGE
Lloh20:
	ldr	x24, [x24, _MODE_OK@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w23, w8
	b.eq	LBB0_11
; %bb.9:
	mov	x0, x20
	bl	_HAS_GMCH
	cbnz	w0, LBB0_11
; %bb.10:
	add	w8, w22, w22, lsl #1
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x19
	mov	w2, #1
	mov	x3, x21
	bl	_hdmi_port_clock_valid
	mov	x23, x0
LBB0_11:
	ldr	w8, [x24]
	cmp	w23, w8
	b.eq	LBB0_5
; %bb.12:
	mov	x0, x20
	bl	_INTEL_GEN
	cmp	w0, #11
	b.lt	LBB0_5
; %bb.13:
	add	w8, w22, w22, lsl #2
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #2
	mov	x0, x19
	mov	w2, #1
	mov	x3, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_hdmi_port_clock_valid
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_AUDIO_OFF_DVI,8,3         ; @HDMI_AUDIO_OFF_DVI
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ; @DRM_MODE_FLAG_DBLSCAN
	.comm	_MODE_NO_DBLESCAN,4,2           ; @MODE_NO_DBLESCAN
	.comm	_DRM_MODE_FLAG_3D_MASK,4,2      ; @DRM_MODE_FLAG_3D_MASK
	.comm	_DRM_MODE_FLAG_3D_FRAME_PACKING,4,2 ; @DRM_MODE_FLAG_3D_FRAME_PACKING
	.comm	_MODE_CLOCK_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_DRM_MODE_FLAG_DBLCLK,4,2       ; @DRM_MODE_FLAG_DBLCLK
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_intel_hdmi_mode_valid
.subsections_via_symbols
