	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_ddi_hdmi_level
_intel_ddi_hdmi_level:                  ## @intel_ddi_hdmi_level
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_intel_port_to_phy
	movl	%eax, %r14d
	movq	(%r15), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %r12d
	movq	%r15, %rdi
	callq	_INTEL_GEN
	movq	%r15, %rdi
	cmpl	$11, %eax
	jl	LBB0_3
## %bb.1:
	movl	%r14d, %esi
	callq	_intel_phy_is_combo
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_INTEL_OUTPUT_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rcx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_icl_get_combo_buf_trans
	jmp	LBB0_8
LBB0_3:
	callq	_IS_CANNONLAKE
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_cnl_get_buf_trans_hdmi
	jmp	LBB0_8
LBB0_5:
	movq	_icl_mg_phy_ddi_translations@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	movl	%eax, %r15d
	movl	%eax, -36(%rbp)
	jmp	LBB0_9
LBB0_6:
	movq	%r15, %rdi
	callq	_IS_GEN9_LP
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_bxt_get_buf_trans_hdmi
LBB0_8:
	movl	-36(%rbp), %r15d
LBB0_9:
	decl	%r15d
LBB0_10:
	movq	_HDMI_LEVEL_SHIFT_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	-36(%rbp), %ebx
	xorl	%edi, %edi
	testl	%ebx, %ebx
	sete	%dil
	callq	_WARN_ON_ONCE
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_12
## %bb.11:
	cmpl	%ebx, %r12d
	movl	%r15d, %ebx
	cmovll	%r12d, %ebx
	cmpl	%r14d, %r12d
	cmovel	%r15d, %ebx
	xorl	%edi, %edi
	cmpl	-36(%rbp), %ebx
	setge	%dil
	callq	_WARN_ON_ONCE
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	decl	%eax
	testq	%rcx, %rcx
	cmovel	%ebx, %eax
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r15, %rdi
	callq	_IS_GEN9_BC
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_intel_ddi_get_buf_trans_hdmi
	movl	$8, %r15d
	jmp	LBB0_10
LBB0_15:
	movq	%r15, %rdi
	callq	_IS_BROADWELL
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_intel_ddi_get_buf_trans_hdmi
	movl	$7, %r15d
	jmp	LBB0_10
LBB0_17:
	movq	%r15, %rdi
	callq	_IS_HASWELL
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_intel_ddi_get_buf_trans_hdmi
	movl	$6, %r15d
	jmp	LBB0_10
LBB0_19:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_HDMI,4,2          ## @INTEL_OUTPUT_HDMI
	.comm	_icl_mg_phy_ddi_translations,4,2 ## @icl_mg_phy_ddi_translations
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ddi translation table missing\n"

	.comm	_HDMI_LEVEL_SHIFT_UNKNOWN,4,2   ## @HDMI_LEVEL_SHIFT_UNKNOWN
	.no_dead_strip	_intel_ddi_hdmi_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_ddi_hdmi_level
_intel_ddi_hdmi_level:                  ; @intel_ddi_hdmi_level
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_intel_port_to_phy
	mov	x20, x0
	ldr	x8, [x19]
	ldr	w21, [x8, w21, uxtw #2]
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #11
	b.lt	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_intel_phy_is_combo
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _INTEL_OUTPUT_HDMI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_OUTPUT_HDMI@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #0
	bl	_icl_get_combo_buf_trans
	ldr	w0, [sp, #12]
	sub	w19, w0, #1
	b	LBB0_9
LBB0_3:
	mov	x0, x19
	bl	_IS_CANNONLAKE
	cbz	x0, LBB0_6
; %bb.4:
	add	x1, sp, #12
	mov	x0, x19
	bl	_cnl_get_buf_trans_hdmi
	b	LBB0_8
LBB0_5:
Lloh3:
	adrp	x8, _icl_mg_phy_ddi_translations@GOTPAGE
Lloh4:
	ldr	x8, [x8, _icl_mg_phy_ddi_translations@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	str	w0, [sp, #12]
	sub	w19, w0, #1
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_IS_GEN9_LP
	cbz	x0, LBB0_13
; %bb.7:
	add	x1, sp, #12
	mov	x0, x19
	bl	_bxt_get_buf_trans_hdmi
LBB0_8:
	ldr	w8, [sp, #12]
	sub	w19, w8, #1
LBB0_9:
Lloh6:
	adrp	x8, _HDMI_LEVEL_SHIFT_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HDMI_LEVEL_SHIFT_UNKNOWN@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	ldr	w22, [sp, #12]
	cmp	w22, #0
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
	cmp	w21, w22
	ccmp	w21, w20, #4, lt
	csel	w19, w21, w19, ne
	ldr	w8, [sp, #12]
	cmp	w19, w8
	cset	w0, ge
	bl	_WARN_ON_ONCE
	ldr	w8, [sp, #12]
	sub	w8, w8, #1
	cmp	x0, #0
	csel	w0, w19, w8, eq
LBB0_12:
	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
	add	sp, sp, #64
	ret
LBB0_13:
	mov	x0, x19
	bl	_IS_GEN9_BC
	cbz	x0, LBB0_15
; %bb.14:
	add	x1, sp, #12
	mov	x0, x19
	bl	_intel_ddi_get_buf_trans_hdmi
	mov	w19, #8
	b	LBB0_9
LBB0_15:
	mov	x0, x19
	bl	_IS_BROADWELL
	cbz	x0, LBB0_17
; %bb.16:
	add	x1, sp, #12
	mov	x0, x19
	bl	_intel_ddi_get_buf_trans_hdmi
	mov	w19, #7
	b	LBB0_9
LBB0_17:
	mov	x0, x19
	bl	_IS_HASWELL
	cbz	x0, LBB0_19
; %bb.18:
	add	x1, sp, #12
	mov	x0, x19
	bl	_intel_ddi_get_buf_trans_hdmi
	mov	w19, #6
	b	LBB0_9
LBB0_19:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_HDMI,4,2          ; @INTEL_OUTPUT_HDMI
	.comm	_icl_mg_phy_ddi_translations,4,2 ; @icl_mg_phy_ddi_translations
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ddi translation table missing\n"

	.comm	_HDMI_LEVEL_SHIFT_UNKNOWN,4,2   ; @HDMI_LEVEL_SHIFT_UNKNOWN
	.no_dead_strip	_intel_ddi_hdmi_level
.subsections_via_symbols
