	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_dp_get_panel_mode       ## -- Begin function radeon_dp_get_panel_mode
	.p2align	4, 0x90
_radeon_dp_get_panel_mode:              ## @radeon_dp_get_panel_mode
	.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
	movq	(%rdi), %rax
	movq	(%rax), %r13
	movq	%rsi, %rdi
	callq	_to_radeon_connector
	movq	%rax, %r12
	movq	_DP_PANEL_MODE_EXTERNAL_DP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_radeon_connector_encoder_get_dp_bridge_encoder_id
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_ASIC_IS_DCE4
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	cmpq	$0, 8(%r12)
	je	LBB0_14
## %bb.2:
	movq	_ENCODER_OBJECT_ID_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_3
## %bb.9:
	movq	(%rbx), %rax
	movq	_DRM_MODE_CONNECTOR_eDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.10:
	movq	(%r12), %rdi
	movq	_DP_EDP_CONFIGURATION_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_drm_dp_dpcd_readb
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.11:
	testb	$1, -44(%rbp)
	jne	LBB0_12
	jmp	LBB0_14
LBB0_3:
	movq	(%r12), %rdi
	movq	_DP_EDP_CONFIGURATION_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_drm_dp_dpcd_readb
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.4:
	testb	$1, -44(%rbp)
	jne	LBB0_12
## %bb.5:
	movq	_ENCODER_OBJECT_ID_NUTMEG@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_7
## %bb.6:
	movq	_ENCODER_OBJECT_ID_TRAVIS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_7
## %bb.8:
	movq	_DP_PANEL_MODE_EXTERNAL_DP_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_DP_PANEL_MODE_INTERNAL_DP2_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_7:
	movq	_DP_PANEL_MODE_INTERNAL_DP1_MODE@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_PANEL_MODE_EXTERNAL_DP_MODE,4,2 ## @DP_PANEL_MODE_EXTERNAL_DP_MODE
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ## @ENCODER_OBJECT_ID_NONE
	.comm	_DP_EDP_CONFIGURATION_CAP,4,2   ## @DP_EDP_CONFIGURATION_CAP
	.comm	_DP_PANEL_MODE_INTERNAL_DP2_MODE,4,2 ## @DP_PANEL_MODE_INTERNAL_DP2_MODE
	.comm	_ENCODER_OBJECT_ID_NUTMEG,8,3   ## @ENCODER_OBJECT_ID_NUTMEG
	.comm	_ENCODER_OBJECT_ID_TRAVIS,8,3   ## @ENCODER_OBJECT_ID_TRAVIS
	.comm	_DP_PANEL_MODE_INTERNAL_DP1_MODE,4,2 ## @DP_PANEL_MODE_INTERNAL_DP1_MODE
	.comm	_DRM_MODE_CONNECTOR_eDP,8,3     ## @DRM_MODE_CONNECTOR_eDP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_dp_get_panel_mode       ; -- Begin function radeon_dp_get_panel_mode
	.p2align	2
_radeon_dp_get_panel_mode:              ; @radeon_dp_get_panel_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	ldr	x8, [x0]
	ldr	x23, [x8]
	mov	x0, x1
	bl	_to_radeon_connector
	mov	x22, x0
Lloh0:
	adrp	x24, _DP_PANEL_MODE_EXTERNAL_DP_MODE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DP_PANEL_MODE_EXTERNAL_DP_MODE@GOTPAGEOFF]
	ldr	w19, [x24]
	mov	x0, x21
	bl	_radeon_connector_encoder_get_dp_bridge_encoder_id
	mov	x20, x0
	mov	x0, x23
	bl	_ASIC_IS_DCE4
	cbz	w0, LBB0_12
; %bb.1:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_12
; %bb.2:
Lloh2:
	adrp	x8, _ENCODER_OBJECT_ID_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENCODER_OBJECT_ID_NONE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _DRM_MODE_CONNECTOR_eDP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DRM_MODE_CONNECTOR_eDP@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.4:
	ldr	x0, [x22]
Lloh8:
	adrp	x8, _DP_EDP_CONFIGURATION_CAP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DP_EDP_CONFIGURATION_CAP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_drm_dp_dpcd_readb
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.5:
Lloh11:
	adrp	x8, _DP_PANEL_MODE_INTERNAL_DP2_MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DP_PANEL_MODE_INTERNAL_DP2_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldrb	w9, [sp, #12]
	tst	w9, #0x1
	csel	w19, w19, w8, eq
	b	LBB0_12
LBB0_6:
	ldr	x0, [x22]
Lloh14:
	adrp	x8, _DP_EDP_CONFIGURATION_CAP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DP_EDP_CONFIGURATION_CAP@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_drm_dp_dpcd_readb
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.7:
	ldrb	w8, [sp, #12]
	tbnz	w8, #0, LBB0_10
; %bb.8:
Lloh17:
	adrp	x8, _ENCODER_OBJECT_ID_NUTMEG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENCODER_OBJECT_ID_NUTMEG@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _ENCODER_OBJECT_ID_TRAVIS@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ENCODER_OBJECT_ID_TRAVIS@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x20, x8
	ccmp	x20, x9, #4, ne
	b.ne	LBB0_11
; %bb.9:
Lloh23:
	adrp	x8, _DP_PANEL_MODE_INTERNAL_DP1_MODE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DP_PANEL_MODE_INTERNAL_DP1_MODE@GOTPAGEOFF]
Lloh25:
	ldr	w19, [x8]
	b	LBB0_12
LBB0_10:
Lloh26:
	adrp	x8, _DP_PANEL_MODE_INTERNAL_DP2_MODE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DP_PANEL_MODE_INTERNAL_DP2_MODE@GOTPAGEOFF]
Lloh28:
	ldr	w19, [x8]
	b	LBB0_12
LBB0_11:
	ldr	w19, [x24]
LBB0_12:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_PANEL_MODE_EXTERNAL_DP_MODE,4,2 ; @DP_PANEL_MODE_EXTERNAL_DP_MODE
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ; @ENCODER_OBJECT_ID_NONE
	.comm	_DP_EDP_CONFIGURATION_CAP,4,2   ; @DP_EDP_CONFIGURATION_CAP
	.comm	_DP_PANEL_MODE_INTERNAL_DP2_MODE,4,2 ; @DP_PANEL_MODE_INTERNAL_DP2_MODE
	.comm	_ENCODER_OBJECT_ID_NUTMEG,8,3   ; @ENCODER_OBJECT_ID_NUTMEG
	.comm	_ENCODER_OBJECT_ID_TRAVIS,8,3   ; @ENCODER_OBJECT_ID_TRAVIS
	.comm	_DP_PANEL_MODE_INTERNAL_DP1_MODE,4,2 ; @DP_PANEL_MODE_INTERNAL_DP1_MODE
	.comm	_DRM_MODE_CONNECTOR_eDP,8,3     ; @DRM_MODE_CONNECTOR_eDP
.subsections_via_symbols
