	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_intel_lvds_mode_valid      ## -- Begin function psb_intel_lvds_mode_valid
	.p2align	4, 0x90
_psb_intel_lvds_mode_valid:             ## @psb_intel_lvds_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r14
	callq	_gma_attached_encoder
	movq	(%rax), %rcx
	movq	_INTEL_OUTPUT_MIPI2@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	setne	%cl
	movl	(%rbx), %edx
	movq	_DRM_MODE_FLAG_DBLSCAN@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_2
## %bb.1:
	movq	_MODE_NO_DBLESCAN@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_4
## %bb.3:
	movq	_MODE_NO_INTERLACE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movb	%cl, %al
	movq	(%r14,%rax,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:
	movq	8(%rbx), %rdx
	movq	_MODE_PANEL@GOTPCREL(%rip), %rax
	cmpq	8(%rcx), %rdx
	jg	LBB0_8
## %bb.6:
	movq	16(%rbx), %rdx
	cmpq	16(%rcx), %rdx
	jg	LBB0_8
LBB0_7:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_MIPI2,8,3         ## @INTEL_OUTPUT_MIPI2
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ## @DRM_MODE_FLAG_DBLSCAN
	.comm	_MODE_NO_DBLESCAN,4,2           ## @MODE_NO_DBLESCAN
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_MODE_NO_INTERLACE,4,2          ## @MODE_NO_INTERLACE
	.comm	_MODE_PANEL,4,2                 ## @MODE_PANEL
	.comm	_MODE_OK,4,2                    ## @MODE_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_intel_lvds_mode_valid      ; -- Begin function psb_intel_lvds_mode_valid
	.p2align	2
_psb_intel_lvds_mode_valid:             ; @psb_intel_lvds_mode_valid
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	x8, [x0]
	ldr	x20, [x8]
	bl	_gma_attached_encoder
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _INTEL_OUTPUT_MIPI2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INTEL_OUTPUT_MIPI2@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
	ldr	w9, [x19]
Lloh3:
	adrp	x10, _DRM_MODE_FLAG_DBLSCAN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DRM_MODE_FLAG_DBLSCAN@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _MODE_NO_DBLESCAN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MODE_NO_DBLESCAN@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
Lloh8:
	adrp	x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _MODE_NO_INTERLACE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MODE_NO_INTERLACE@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	ldr	x8, [x20, w8, uxtw #3]
	cbz	x8, LBB0_8
; %bb.5:
	ldr	x9, [x19, #8]
	ldr	x10, [x8, #8]
	cmp	x9, x10
	b.gt	LBB0_7
; %bb.6:
	ldr	x9, [x19, #16]
	ldr	x8, [x8, #16]
	cmp	x9, x8
	b.le	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _MODE_PANEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MODE_PANEL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_MIPI2,8,3         ; @INTEL_OUTPUT_MIPI2
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ; @DRM_MODE_FLAG_DBLSCAN
	.comm	_MODE_NO_DBLESCAN,4,2           ; @MODE_NO_DBLESCAN
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_MODE_NO_INTERLACE,4,2          ; @MODE_NO_INTERLACE
	.comm	_MODE_PANEL,4,2                 ; @MODE_PANEL
	.comm	_MODE_OK,4,2                    ; @MODE_OK
.subsections_via_symbols
