	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_ddc_get_modes           ## -- Begin function radeon_ddc_get_modes
	.p2align	4, 0x90
_radeon_ddc_get_modes:                  ## @radeon_ddc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	cmpq	$0, 40(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_radeon_router_select_ddc_port
LBB0_2:
	movq	%rbx, %rdi
	callq	_radeon_connector_encoder_get_dp_bridge_encoder_id
	movq	_ENCODER_OBJECT_ID_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movq	(%rbx), %rax
	movq	_DRM_MODE_CONNECTOR_DisplayPort@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_DRM_MODE_CONNECTOR_eDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_7:
	movq	32(%rbx), %rax
	movq	(%rax), %rcx
	movq	_CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_9
## %bb.8:
	movq	_CONNECTOR_OBJECT_ID_eDP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
LBB0_9:
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	jne	LBB0_4
LBB0_10:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.11:
	cmpq	$0, 16(%rbx)
	jne	LBB0_14
## %bb.12:
	leaq	16(%rbx), %r15
	movq	%rbx, %rdi
	callq	_drm_get_edid
	jmp	LBB0_13
LBB0_3:
	movq	32(%rbx), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_14
LBB0_4:
	movq	%rbx, %rdi
	callq	_drm_get_edid
	leaq	16(%rbx), %r15
LBB0_13:
	movq	%rax, (%r15)
LBB0_14:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	jne	LBB0_20
## %bb.15:
	cmpq	$0, (%r14)
	je	LBB0_18
## %bb.16:
	movq	(%rbx), %rax
	movq	_DRM_MODE_CONNECTOR_LVDS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
## %bb.17:
	movq	_DRM_MODE_CONNECTOR_eDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
LBB0_18:
	movq	%r14, %rdi
	callq	_radeon_bios_get_hardcoded_edid
	movq	%rax, %rsi
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_19
LBB0_20:
	movq	%rbx, %rdi
	callq	_drm_mode_connector_update_edid_property
	movq	16(%rbx), %rsi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_add_edid_modes             ## TAILCALL
LBB0_19:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_drm_mode_connector_update_edid_property
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ## @ENCODER_OBJECT_ID_NONE
	.comm	_DRM_MODE_CONNECTOR_DisplayPort,8,3 ## @DRM_MODE_CONNECTOR_DisplayPort
	.comm	_DRM_MODE_CONNECTOR_eDP,8,3     ## @DRM_MODE_CONNECTOR_eDP
	.comm	_CONNECTOR_OBJECT_ID_DISPLAYPORT,8,3 ## @CONNECTOR_OBJECT_ID_DISPLAYPORT
	.comm	_CONNECTOR_OBJECT_ID_eDP,8,3    ## @CONNECTOR_OBJECT_ID_eDP
	.comm	_DRM_MODE_CONNECTOR_LVDS,8,3    ## @DRM_MODE_CONNECTOR_LVDS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_ddc_get_modes           ; -- Begin function radeon_ddc_get_modes
	.p2align	2
_radeon_ddc_get_modes:                  ; @radeon_ddc_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
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_radeon_router_select_ddc_port
LBB0_2:
	mov	x0, x19
	bl	_radeon_connector_encoder_get_dp_bridge_encoder_id
Lloh0:
	adrp	x8, _ENCODER_OBJECT_ID_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENCODER_OBJECT_ID_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _DRM_MODE_CONNECTOR_DisplayPort@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_CONNECTOR_DisplayPort@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _DRM_MODE_CONNECTOR_eDP@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DRM_MODE_CONNECTOR_eDP@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x19, #32]
	ldr	x9, [x8]
Lloh9:
	adrp	x10, _CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _CONNECTOR_OBJECT_ID_eDP@GOTPAGE
Lloh13:
	ldr	x11, [x11, _CONNECTOR_OBJECT_ID_eDP@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	x1, [x8, #8]
	cbnz	x1, LBB0_10
LBB0_6:
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_12
; %bb.7:
	mov	x21, x19
	ldr	x8, [x21, #16]!
	cbnz	x8, LBB0_12
; %bb.8:
	mov	x0, x19
	bl	_drm_get_edid
	b	LBB0_11
LBB0_9:
	ldr	x8, [x19, #32]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_drm_get_edid
	add	x21, x19, #16
LBB0_11:
	str	x0, [x21]
LBB0_12:
	ldr	x1, [x19, #16]
	cbnz	x1, LBB0_16
; %bb.13:
	ldr	x8, [x20]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _DRM_MODE_CONNECTOR_LVDS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DRM_MODE_CONNECTOR_LVDS@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x10, _DRM_MODE_CONNECTOR_eDP@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DRM_MODE_CONNECTOR_eDP@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_17
LBB0_15:
	mov	x0, x20
	bl	_radeon_bios_get_hardcoded_edid
	mov	x1, x0
	str	x0, [x19, #16]
	cbz	x0, LBB0_17
LBB0_16:
	mov	x0, x19
	bl	_drm_mode_connector_update_edid_property
	ldr	x1, [x19, #16]
	mov	x0, 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	_drm_add_edid_modes
LBB0_17:
	mov	x0, x19
	mov	x1, #0
	bl	_drm_mode_connector_update_edid_property
	mov	w0, #0
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ; @ENCODER_OBJECT_ID_NONE
	.comm	_DRM_MODE_CONNECTOR_DisplayPort,8,3 ; @DRM_MODE_CONNECTOR_DisplayPort
	.comm	_DRM_MODE_CONNECTOR_eDP,8,3     ; @DRM_MODE_CONNECTOR_eDP
	.comm	_CONNECTOR_OBJECT_ID_DISPLAYPORT,8,3 ; @CONNECTOR_OBJECT_ID_DISPLAYPORT
	.comm	_CONNECTOR_OBJECT_ID_eDP,8,3    ; @CONNECTOR_OBJECT_ID_eDP
	.comm	_DRM_MODE_CONNECTOR_LVDS,8,3    ; @DRM_MODE_CONNECTOR_LVDS
.subsections_via_symbols
