	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_tv_detect
_radeon_tv_detect:                      ## @radeon_tv_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
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_radeon_best_single_encoder
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	(%r15), %rax
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	*(%rax)
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_radeon_connector_analog_encoder_conflict_solve
	movl	%eax, %ebx
LBB0_7:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_connector_update_scratch_regs
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_tv_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_tv_detect
_radeon_tv_detect:                      ; @radeon_tv_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
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_radeon_best_single_encoder
	mov	x21, x0
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x19
	blr	x8
	mov	x20, x0
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh1:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_8
LBB0_4:
Lloh3:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh4:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
LBB0_5:
Lloh6:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh7:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_radeon_connector_analog_encoder_conflict_solve
	mov	x20, x0
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_connector_update_scratch_regs
LBB0_8:
	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
	.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_tv_detect
.subsections_via_symbols
