	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_ddi_get_hw_state         ## -- Begin function intel_ddi_get_hw_state
	.p2align	4, 0x90
_intel_ddi_get_hw_state:                ## @intel_ddi_get_hw_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, %rbx
	callq	_intel_ddi_get_encoder_port
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_DDI_BUF_CTL
	movl	%eax, %edi
	callq	_I915_READ
	movq	_DDI_BUF_CTL_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_PORT_A@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_10
## %bb.3:
	movq	_TRANSCODER_EDP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TRANS_DDI_FUNC_CTL
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ecx
	movq	_TRANS_DDI_EDP_INPUT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	movl	$1, %eax
	leal	-130(%rcx), %edx
	cmpl	$2, %edx
	jb	LBB0_7
## %bb.4:
	cmpl	$128, %ecx
	je	LBB0_9
## %bb.5:
	cmpl	$129, %ecx
	jne	LBB0_17
## %bb.6:
	movq	_PIPE_B@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_10:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_TRANSCODER_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_TRANSCODER_C@GOTPCREL(%rip), %r13
	cmpl	(%r13), %r12d
	jg	LBB0_15
## %bb.11:
	movq	_TRANS_DDI_PORT_MASK@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_TRANS_DDI_FUNC_CTL
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	andl	(%r14), %ebx
	movl	%r15d, %edi
	callq	_TRANS_DDI_SELECT_PORT
	cmpl	%eax, %ebx
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	leal	1(%r12), %eax
	cmpl	(%r13), %r12d
	movl	%eax, %r12d
	jl	LBB0_12
LBB0_15:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_16
LBB0_7:
	movq	_PIPE_A@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax)
LBB0_16:
	movl	$1, %eax
	jmp	LBB0_17
LBB0_9:
	movq	_PIPE_C@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %ecx
	movl	%ecx, (%rbx)
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DDI_BUF_CTL_ENABLE,4,2         ## @DDI_BUF_CTL_ENABLE
	.comm	_PORT_A,4,2                     ## @PORT_A
	.comm	_TRANSCODER_EDP,4,2             ## @TRANSCODER_EDP
	.comm	_TRANS_DDI_EDP_INPUT_MASK,4,2   ## @TRANS_DDI_EDP_INPUT_MASK
	.comm	_PIPE_A,4,2                     ## @PIPE_A
	.comm	_PIPE_B,4,2                     ## @PIPE_B
	.comm	_PIPE_C,4,2                     ## @PIPE_C
	.comm	_TRANSCODER_A,4,2               ## @TRANSCODER_A
	.comm	_TRANSCODER_C,4,2               ## @TRANSCODER_C
	.comm	_TRANS_DDI_PORT_MASK,4,2        ## @TRANS_DDI_PORT_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No pipe for ddi port %i found\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_ddi_get_hw_state         ; -- Begin function intel_ddi_get_hw_state
	.p2align	2
_intel_ddi_get_hw_state:                ; @intel_ddi_get_hw_state
	.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, x1
	bl	_intel_ddi_get_encoder_port
	mov	x20, x0
	bl	_DDI_BUF_CTL
	bl	_I915_READ
Lloh0:
	adrp	x8, _DDI_BUF_CTL_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DDI_BUF_CTL_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _PORT_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PORT_A@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_7
; %bb.2:
Lloh6:
	adrp	x8, _TRANSCODER_EDP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TRANSCODER_EDP@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_TRANS_DDI_FUNC_CTL
	bl	_I915_READ
Lloh9:
	adrp	x8, _TRANS_DDI_EDP_INPUT_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TRANS_DDI_EDP_INPUT_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w9, w8, #130
	cmp	w9, #2
	b.lo	LBB0_12
; %bb.3:
	cmp	w8, #128
	b.eq	LBB0_14
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_16
; %bb.5:
Lloh12:
	adrp	x8, _PIPE_B@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PIPE_B@GOTPAGEOFF]
	b	LBB0_15
LBB0_6:
	mov	w0, #0
	b	LBB0_17
LBB0_7:
Lloh14:
	adrp	x8, _TRANSCODER_A@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TRANSCODER_A@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
Lloh17:
	adrp	x22, _TRANSCODER_C@GOTPAGE
Lloh18:
	ldr	x22, [x22, _TRANSCODER_C@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w21, w8
	b.gt	LBB0_11
; %bb.8:
Lloh19:
	adrp	x23, _TRANS_DDI_PORT_MASK@GOTPAGE
Lloh20:
	ldr	x23, [x23, _TRANS_DDI_PORT_MASK@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_TRANS_DDI_FUNC_CTL
	bl	_I915_READ
	ldr	w8, [x23]
	and	w24, w8, w0
	mov	x0, x20
	bl	_TRANS_DDI_SELECT_PORT
	cmp	w24, w0
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w8, w21, #1
	ldr	w9, [x22]
	cmp	w21, w9
	mov	x21, x8
	b.lt	LBB0_9
LBB0_11:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DRM_DEBUG_KMS
	b	LBB0_16
LBB0_12:
Lloh23:
	adrp	x8, _PIPE_A@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PIPE_A@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	str	w21, [x19]
	b	LBB0_16
LBB0_14:
Lloh25:
	adrp	x8, _PIPE_C@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PIPE_C@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_16:
	mov	w0, #1
LBB0_17:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_DDI_BUF_CTL_ENABLE,4,2         ; @DDI_BUF_CTL_ENABLE
	.comm	_PORT_A,4,2                     ; @PORT_A
	.comm	_TRANSCODER_EDP,4,2             ; @TRANSCODER_EDP
	.comm	_TRANS_DDI_EDP_INPUT_MASK,4,2   ; @TRANS_DDI_EDP_INPUT_MASK
	.comm	_PIPE_A,4,2                     ; @PIPE_A
	.comm	_PIPE_B,4,2                     ; @PIPE_B
	.comm	_PIPE_C,4,2                     ; @PIPE_C
	.comm	_TRANSCODER_A,4,2               ; @TRANSCODER_A
	.comm	_TRANSCODER_C,4,2               ; @TRANSCODER_C
	.comm	_TRANS_DDI_PORT_MASK,4,2        ; @TRANS_DDI_PORT_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No pipe for ddi port %i found\n"

.subsections_via_symbols
