	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atombios_crtc_mode_set         ## -- Begin function atombios_crtc_mode_set
	.p2align	4, 0x90
_atombios_crtc_mode_set:                ## @atombios_crtc_mode_set
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r14
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_to_radeon_crtc
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	(%rax), %r13
	movl	8(%r12), %edi
	callq	_to_radeon_encoder
	movq	_ATOM_DEVICE_TV_SUPPORT@GOTPCREL(%rip), %rcx
	movq	_ATOM_DEVICE_CV_SUPPORT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	orl	(%rcx), %r15d
	andl	(%rax), %r15d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_atombios_crtc_set_pll
	movq	%r13, %rdi
	callq	_ASIC_IS_DCE4
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_atombios_set_crtc_dtd_timing
LBB0_2:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_3:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rdi
	callq	_atombios_crtc_set_base
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_atombios_overscan_setup
	movq	%rbx, %rdi
	callq	_atombios_scaler_setup
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r13, %rdi
	callq	_ASIC_IS_AVIVO
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_atombios_crtc_set_timing
	jmp	LBB0_2
LBB0_7:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_atombios_crtc_set_timing
	cmpq	$0, (%r12)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_atombios_set_crtc_dtd_timing
LBB0_9:
	movq	%rbx, %rdi
	callq	_radeon_legacy_atom_fixup
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_DEVICE_TV_SUPPORT,4,2     ## @ATOM_DEVICE_TV_SUPPORT
	.comm	_ATOM_DEVICE_CV_SUPPORT,4,2     ## @ATOM_DEVICE_CV_SUPPORT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atombios_crtc_mode_set         ; -- Begin function atombios_crtc_mode_set
	.p2align	2
_atombios_crtc_mode_set:                ; @atombios_crtc_mode_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x5
	mov	x24, x4
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_to_radeon_crtc
	mov	x25, x0
	ldr	x8, [x19]
	ldr	x26, [x8]
	ldr	w0, [x0, #8]
	bl	_to_radeon_encoder
	ldr	w27, [x0]
Lloh0:
	adrp	x8, _ATOM_DEVICE_TV_SUPPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATOM_DEVICE_TV_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w28, [x8]
Lloh3:
	adrp	x8, _ATOM_DEVICE_CV_SUPPORT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATOM_DEVICE_CV_SUPPORT@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_atombios_crtc_set_pll
	mov	x0, x26
	bl	_ASIC_IS_DCE4
	cbz	x0, LBB0_3
LBB0_1:
	mov	x0, x19
	mov	x1, x20
	bl	_atombios_set_crtc_dtd_timing
LBB0_2:
	mov	x3, x23
	mov	x2, x24
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	mov	x0, x19
	bl	_atombios_crtc_set_base
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_atombios_overscan_setup
	mov	x0, x19
	bl	_atombios_scaler_setup
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	mov	x0, x26
	bl	_ASIC_IS_AVIVO
	cbz	x0, LBB0_6
; %bb.4:
	orr	w8, w21, w28
	and	w8, w8, w27
	cbz	w8, LBB0_1
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_atombios_crtc_set_timing
	b	LBB0_2
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_atombios_crtc_set_timing
	ldr	x8, [x25]
	cbnz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_atombios_set_crtc_dtd_timing
LBB0_8:
	mov	x0, x19
	bl	_radeon_legacy_atom_fixup
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_DEVICE_TV_SUPPORT,4,2     ; @ATOM_DEVICE_TV_SUPPORT
	.comm	_ATOM_DEVICE_CV_SUPPORT,4,2     ; @ATOM_DEVICE_CV_SUPPORT
.subsections_via_symbols
