	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_lvds_detect
_radeon_lvds_detect:                    ## @radeon_lvds_detect
	.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, %r14
	callq	_to_radeon_connector
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_radeon_best_single_encoder
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rdi
	callq	_to_radeon_encoder
	cmpl	$320, (%rax)                    ## imm = 0x140
	jl	LBB0_4
## %bb.2:
	cmpl	$240, 4(%rax)
	jl	LBB0_4
## %bb.3:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	cmpq	$0, (%r15)
	je	LBB0_5
LBB0_7:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_connector_update_scratch_regs
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	addq	$16, %rdi
	callq	_drm_get_edid
	movq	%rax, (%r15)
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_connector_status_disconnected,4,2 ## @connector_status_disconnected
	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.no_dead_strip	_radeon_lvds_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_lvds_detect
_radeon_lvds_detect:                    ; @radeon_lvds_detect
	.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
	mov	x21, x0
	mov	x0, x19
	bl	_radeon_best_single_encoder
Lloh0:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh1:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_to_radeon_encoder
	ldr	w8, [x0]
	cmp	w8, #320
	b.lt	LBB0_3
; %bb.2:
	ldr	w8, [x0, #4]
Lloh3:
	adrp	x9, _connector_status_connected@GOTPAGE
Lloh4:
	ldr	x9, [x9, _connector_status_connected@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, #239
	csel	w20, w9, w20, gt
LBB0_3:
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh7:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	b	LBB0_7
LBB0_5:
	ldr	x1, [x21, #8]
	cbz	x1, LBB0_7
; %bb.6:
	add	x0, x21, #16
	bl	_drm_get_edid
	str	x0, [x21]
Lloh9:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh10:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, w20, w8, eq
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_connector_update_scratch_regs
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_connector_status_disconnected,4,2 ; @connector_status_disconnected
	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.no_dead_strip	_radeon_lvds_detect
.subsections_via_symbols
