	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_dp_get_modes
_radeon_dp_get_modes:                   ## @radeon_dp_get_modes
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_radeon_connector
	movq	(%rax), %r12
	movq	%rbx, %rdi
	callq	_radeon_best_single_encoder
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	_DRM_MODE_CONNECTOR_eDP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_2
## %bb.1:
	movq	_DRM_MODE_CONNECTOR_LVDS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_2
## %bb.19:
	movq	%rbx, %rdi
	callq	_radeon_connector_encoder_get_dp_bridge_encoder_id
	movq	_ENCODER_OBJECT_ID_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_22
## %bb.20:
	testq	%r14, %r14
	je	LBB0_22
## %bb.21:
	movq	%r14, %rdi
	callq	_radeon_atom_ext_encoder_setup_ddc
LBB0_22:
	movq	%rbx, %rdi
	callq	_radeon_connector_get_edid
	movq	%rbx, %rdi
	callq	_radeon_ddc_get_modes
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_radeon_get_native_mode
	movl	%r14d, %eax
	jmp	LBB0_23
LBB0_2:
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.3:
	cmpl	$0, (%r12)
	jne	LBB0_5
## %bb.4:
	movq	_ATOM_TRANSMITTER_ACTION_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_atombios_set_edp_panel_power
LBB0_5:
	movq	%rbx, %rdi
	callq	_radeon_connector_get_edid
	movq	%rbx, %rdi
	callq	_radeon_ddc_get_modes
	movl	%eax, %r15d
	cmpl	$0, (%r12)
	jne	LBB0_11
## %bb.6:
	movq	_ATOM_TRANSMITTER_ACTION_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_atombios_set_edp_panel_power
LBB0_11:
	testl	%r15d, %r15d
	jle	LBB0_14
LBB0_12:
	testq	%r14, %r14
	je	LBB0_18
## %bb.13:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_radeon_fixup_lvds_native_mode
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_radeon_add_common_modes
	movl	%r15d, %eax
	jmp	LBB0_23
LBB0_7:
	movq	%rbx, %rdi
	callq	_radeon_connector_encoder_get_dp_bridge_encoder_id
	movq	_ENCODER_OBJECT_ID_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.8:
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_radeon_atom_ext_encoder_setup_ddc
LBB0_10:
	movq	%rbx, %rdi
	callq	_radeon_connector_get_edid
	movq	%rbx, %rdi
	callq	_radeon_ddc_get_modes
	movl	%eax, %r15d
	testl	%r15d, %r15d
	jg	LBB0_12
LBB0_14:
	testq	%r14, %r14
	je	LBB0_15
## %bb.16:
	movq	%r14, %rdi
	callq	_radeon_fp_native_mode
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_drm_mode_probed_add
	movl	4(%r12), %eax
	movl	%eax, 12(%rbx)
	movl	(%r12), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_radeon_add_common_modes
	movl	$1, %r15d
LBB0_18:
	movl	%r15d, %eax
	jmp	LBB0_23
LBB0_15:
	xorl	%eax, %eax
LBB0_23:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_CONNECTOR_eDP,8,3     ## @DRM_MODE_CONNECTOR_eDP
	.comm	_DRM_MODE_CONNECTOR_LVDS,8,3    ## @DRM_MODE_CONNECTOR_LVDS
	.comm	_ATOM_TRANSMITTER_ACTION_POWER_ON,4,2 ## @ATOM_TRANSMITTER_ACTION_POWER_ON
	.comm	_ATOM_TRANSMITTER_ACTION_POWER_OFF,4,2 ## @ATOM_TRANSMITTER_ACTION_POWER_OFF
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ## @ENCODER_OBJECT_ID_NONE
	.no_dead_strip	_radeon_dp_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_dp_get_modes
_radeon_dp_get_modes:                   ; @radeon_dp_get_modes
	.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, x0
	bl	_to_radeon_connector
	ldr	x22, [x0]
	mov	x0, x19
	bl	_radeon_best_single_encoder
	mov	x20, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _DRM_MODE_CONNECTOR_eDP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_MODE_CONNECTOR_eDP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _DRM_MODE_CONNECTOR_LVDS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DRM_MODE_CONNECTOR_LVDS@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_9
; %bb.1:
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.2:
	ldr	w8, [x22]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _ATOM_TRANSMITTER_ACTION_POWER_ON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATOM_TRANSMITTER_ACTION_POWER_ON@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atombios_set_edp_panel_power
LBB0_4:
	mov	x0, x19
	bl	_radeon_connector_get_edid
	mov	x0, x19
	bl	_radeon_ddc_get_modes
	mov	x21, x0
	ldr	w8, [x22]
	cbnz	w8, LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _ATOM_TRANSMITTER_ACTION_POWER_OFF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATOM_TRANSMITTER_ACTION_POWER_OFF@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atombios_set_edp_panel_power
LBB0_6:
	cmp	w21, #1
	b.lt	LBB0_15
LBB0_7:
	cbz	x20, LBB0_18
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_fixup_lvds_native_mode
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_add_common_modes
	mov	x0, x21
	b	LBB0_20
LBB0_9:
	mov	x0, x19
	bl	_radeon_connector_encoder_get_dp_bridge_encoder_id
Lloh12:
	adrp	x8, _ENCODER_OBJECT_ID_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENCODER_OBJECT_ID_NONE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	ccmp	x20, #0, #4, ne
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_radeon_atom_ext_encoder_setup_ddc
LBB0_11:
	mov	x0, x19
	bl	_radeon_connector_get_edid
	mov	x0, x19
	bl	_radeon_ddc_get_modes
	mov	x20, x0
	mov	x0, x19
	bl	_radeon_get_native_mode
	mov	x0, x20
	b	LBB0_20
LBB0_12:
	mov	x0, x19
	bl	_radeon_connector_encoder_get_dp_bridge_encoder_id
Lloh15:
	adrp	x8, _ENCODER_OBJECT_ID_NONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENCODER_OBJECT_ID_NONE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x8
	ccmp	x20, #0, #4, ne
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x20
	bl	_radeon_atom_ext_encoder_setup_ddc
LBB0_14:
	mov	x0, x19
	bl	_radeon_connector_get_edid
	mov	x0, x19
	bl	_radeon_ddc_get_modes
	mov	x21, x0
	cmp	w21, #1
	b.ge	LBB0_7
LBB0_15:
	cbz	x20, LBB0_19
; %bb.16:
	mov	x0, x20
	bl	_radeon_fp_native_mode
	cbz	x0, LBB0_18
; %bb.17:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_drm_mode_probed_add
	ldr	d0, [x22]
	str	d0, [x19, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_add_common_modes
	mov	w21, #1
LBB0_18:
	mov	x0, x21
	b	LBB0_20
LBB0_19:
	mov	w21, #0
	mov	w0, #0
LBB0_20:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_CONNECTOR_eDP,8,3     ; @DRM_MODE_CONNECTOR_eDP
	.comm	_DRM_MODE_CONNECTOR_LVDS,8,3    ; @DRM_MODE_CONNECTOR_LVDS
	.comm	_ATOM_TRANSMITTER_ACTION_POWER_ON,4,2 ; @ATOM_TRANSMITTER_ACTION_POWER_ON
	.comm	_ATOM_TRANSMITTER_ACTION_POWER_OFF,4,2 ; @ATOM_TRANSMITTER_ACTION_POWER_OFF
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ; @ENCODER_OBJECT_ID_NONE
	.no_dead_strip	_radeon_dp_get_modes
.subsections_via_symbols
