	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function haswell_get_ddi_port_state
_haswell_get_ddi_port_state:            ## @haswell_get_ddi_port_state
	.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	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r13
	movl	24(%r15), %edi
	callq	_TRANS_DDI_FUNC_CTL
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_INTEL_GEN
	movl	%ebx, %edi
	cmpl	$12, %eax
	jl	LBB0_2
## %bb.1:
	callq	_TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT
	jmp	LBB0_3
LBB0_2:
	callq	_TRANS_DDI_FUNC_CTL_VAL_TO_PORT
LBB0_3:
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_INTEL_GEN
	movq	%r13, %rdi
	cmpl	$11, %eax
	jl	LBB0_5
## %bb.4:
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_icelake_get_ddi_pll
	jmp	LBB0_12
LBB0_5:
	callq	_IS_CANNONLAKE
	movq	%r13, %rdi
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_cannonlake_get_ddi_pll
	jmp	LBB0_12
LBB0_7:
	callq	_IS_GEN9_BC
	movq	%r13, %rdi
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_skylake_get_ddi_pll
	jmp	LBB0_12
LBB0_9:
	callq	_IS_GEN9_LP
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	callq	_bxt_get_ddi_pll
	jmp	LBB0_12
LBB0_11:
	callq	_haswell_get_ddi_pll
LBB0_12:
	movq	16(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.13:
	movq	(%rsi), %rax
	movq	(%rax), %rax
	leaq	8(%r15), %rdx
	movq	%r13, %rdi
	callq	*(%rax)
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
LBB0_14:
	movq	%r13, %rdi
	callq	_INTEL_GEN
	cmpl	$8, %eax
	jg	LBB0_17
## %bb.15:
	movq	_PORT_E@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_17
## %bb.16:
	movq	_LPT_TRANSCONF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_TRANS_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.18:
	movl	$1, (%r15)
	movq	_PIPE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FDI_RX_CTL
	movl	%eax, %edi
	callq	_I915_READ
	movq	_FDI_DP_PORT_WIDTH_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_FDI_DP_PORT_WIDTH_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	incl	%eax
	movl	%eax, 4(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ironlake_get_fdi_m_n_config    ## TAILCALL
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_E,4,2                     ## @PORT_E
	.comm	_LPT_TRANSCONF,4,2              ## @LPT_TRANSCONF
	.comm	_TRANS_ENABLE,4,2               ## @TRANS_ENABLE
	.comm	_PIPE_A,4,2                     ## @PIPE_A
	.comm	_FDI_DP_PORT_WIDTH_MASK,4,2     ## @FDI_DP_PORT_WIDTH_MASK
	.comm	_FDI_DP_PORT_WIDTH_SHIFT,4,2    ## @FDI_DP_PORT_WIDTH_SHIFT
	.no_dead_strip	_haswell_get_ddi_port_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function haswell_get_ddi_port_state
_haswell_get_ddi_port_state:            ; @haswell_get_ddi_port_state
	.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	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_i915
	mov	x21, x0
	ldr	w0, [x19, #24]
	bl	_TRANS_DDI_FUNC_CTL
	bl	_I915_READ
	mov	x22, x0
	mov	x0, x21
	bl	_INTEL_GEN
	cmp	w0, #12
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT
	b	LBB0_3
LBB0_2:
	mov	x0, x22
	bl	_TRANS_DDI_FUNC_CTL_VAL_TO_PORT
LBB0_3:
	mov	x22, x0
	mov	x0, x21
	bl	_INTEL_GEN
	cmp	w0, #11
	b.lt	LBB0_5
; %bb.4:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_icelake_get_ddi_pll
	ldr	x1, [x19, #16]
	cbnz	x1, LBB0_11
	b	LBB0_12
LBB0_5:
	mov	x0, x21
	bl	_IS_CANNONLAKE
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_cannonlake_get_ddi_pll
	ldr	x1, [x19, #16]
	cbnz	x1, LBB0_11
	b	LBB0_12
LBB0_7:
	mov	x0, x21
	bl	_IS_GEN9_BC
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_skylake_get_ddi_pll
	ldr	x1, [x19, #16]
	cbnz	x1, LBB0_11
	b	LBB0_12
LBB0_9:
	mov	x0, x21
	bl	_IS_GEN9_LP
	cbz	x0, LBB0_17
; %bb.10:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_bxt_get_ddi_pll
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_12
LBB0_11:
	ldr	x8, [x1]
	ldr	x8, [x8]
	ldr	x8, [x8]
	add	x2, x19, #8
	mov	x0, x21
	blr	x8
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
LBB0_12:
	mov	x0, x21
	bl	_INTEL_GEN
	cmp	w0, #8
	b.gt	LBB0_16
; %bb.13:
Lloh0:
	adrp	x8, _PORT_E@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PORT_E@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_16
; %bb.14:
Lloh3:
	adrp	x8, _LPT_TRANSCONF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LPT_TRANSCONF@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh6:
	adrp	x8, _TRANS_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TRANS_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.15:
	mov	w8, #1
	str	w8, [x19]
Lloh9:
	adrp	x8, _PIPE_A@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PIPE_A@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_FDI_RX_CTL
	bl	_I915_READ
Lloh12:
	adrp	x8, _FDI_DP_PORT_WIDTH_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FDI_DP_PORT_WIDTH_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh15:
	adrp	x9, _FDI_DP_PORT_WIDTH_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FDI_DP_PORT_WIDTH_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	asr	w8, w8, w9
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x20
	mov	x1, x19
	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_get_fdi_m_n_config
LBB0_16:
	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
LBB0_17:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_haswell_get_ddi_pll
	ldr	x1, [x19, #16]
	cbnz	x1, LBB0_11
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_E,4,2                     ; @PORT_E
	.comm	_LPT_TRANSCONF,4,2              ; @LPT_TRANSCONF
	.comm	_TRANS_ENABLE,4,2               ; @TRANS_ENABLE
	.comm	_PIPE_A,4,2                     ; @PIPE_A
	.comm	_FDI_DP_PORT_WIDTH_MASK,4,2     ; @FDI_DP_PORT_WIDTH_MASK
	.comm	_FDI_DP_PORT_WIDTH_SHIFT,4,2    ; @FDI_DP_PORT_WIDTH_SHIFT
	.no_dead_strip	_haswell_get_ddi_port_state
.subsections_via_symbols
