	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_tv_get_modes
_radeon_tv_get_modes:                   ## @radeon_tv_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	(%rdi), %r14
	movq	(%r14), %r15
	callq	_radeon_best_single_encoder
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%r15), %rcx
	movq	_CHIP_RS600@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_3
## %bb.4:
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movl	$800, %esi                      ## imm = 0x320
	movl	$600, %edx                      ## imm = 0x258
	movl	$60, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_drm_cvt_mode
	movq	_DRM_MODE_TYPE_DRIVER@GOTPCREL(%rip), %rcx
	movq	_DRM_MODE_TYPE_PREFERRED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, (%rax)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_drm_mode_probed_add
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_radeon_add_common_modes
LBB0_5:
	movl	$1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_RS600,8,3                 ## @CHIP_RS600
	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ## @DRM_MODE_TYPE_DRIVER
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ## @DRM_MODE_TYPE_PREFERRED
	.no_dead_strip	_radeon_tv_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_tv_get_modes
_radeon_tv_get_modes:                   ; @radeon_tv_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	x20, [x0]
	ldr	x21, [x20]
	bl	_radeon_best_single_encoder
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _CHIP_RS600@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_RS600@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	w1, #800
	mov	w2, #600
	mov	w3, #60
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_drm_cvt_mode
	mov	x1, x0
Lloh3:
	adrp	x8, _DRM_MODE_TYPE_DRIVER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_MODE_TYPE_DRIVER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _DRM_MODE_TYPE_PREFERRED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRM_MODE_TYPE_PREFERRED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x0]
	mov	x0, x19
	bl	_drm_mode_probed_add
	b	LBB0_4
LBB0_3:
	mov	x1, x19
	bl	_radeon_add_common_modes
LBB0_4:
	mov	w0, #1
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_RS600,8,3                 ; @CHIP_RS600
	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ; @DRM_MODE_TYPE_DRIVER
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ; @DRM_MODE_TYPE_PREFERRED
	.no_dead_strip	_radeon_tv_get_modes
.subsections_via_symbols
