	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atombios_apply_encoder_quirks
_atombios_apply_encoder_quirks:         ## @atombios_apply_encoder_quirks
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	8(%r14), %r13
	callq	_to_radeon_encoder
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_to_radeon_crtc
	movq	%rax, %r15
	movq	(%r14), %rax
	cmpl	$29125, (%rax)                  ## imm = 0x71C5
	jne	LBB0_5
## %bb.1:
	cmpl	$4203, 4(%rax)                  ## imm = 0x106B
	jne	LBB0_5
## %bb.2:
	cmpl	$128, 8(%rax)
	jne	LBB0_5
## %bb.3:
	movq	_ATOM_DEVICE_LCD1_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.4:
	movq	_AVIVO_LVTMA_BIT_DEPTH_CONTROL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_RREG32
	movq	_AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN@GOTPCREL(%rip), %rcx
	movq	_AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	(%rbx), %rdi
	callq	_WREG32
LBB0_5:
	movq	%r13, %rdi
	callq	_ASIC_IS_AVIVO
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movq	_ATOM_DEVICE_TV_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_7
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r13, %rdi
	callq	_ASIC_IS_DCE4
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	andl	(%rdx), %ecx
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	_EVERGREEN_DATA_FORMAT@GOTPCREL(%rip), %rax
	movq	(%r15), %rdi
	addq	(%rax), %rdi
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.9:
	movq	_EVERGREEN_INTERLEAVE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_12
LBB0_13:
	movq	_AVIVO_D1MODE_DATA_FORMAT@GOTPCREL(%rip), %rax
	movq	(%r15), %rdi
	addq	(%rax), %rdi
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.14:
	movq	_AVIVO_D1MODE_INTERLEAVE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_12
LBB0_11:
	xorl	%esi, %esi
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_DEVICE_LCD1_SUPPORT,4,2   ## @ATOM_DEVICE_LCD1_SUPPORT
	.comm	_AVIVO_LVTMA_BIT_DEPTH_CONTROL,8,3 ## @AVIVO_LVTMA_BIT_DEPTH_CONTROL
	.comm	_AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN,4,2 ## @AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN
	.comm	_AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN,4,2 ## @AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN
	.comm	_ATOM_DEVICE_TV_SUPPORT,4,2     ## @ATOM_DEVICE_TV_SUPPORT
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_EVERGREEN_DATA_FORMAT,8,3      ## @EVERGREEN_DATA_FORMAT
	.comm	_EVERGREEN_INTERLEAVE_EN,4,2    ## @EVERGREEN_INTERLEAVE_EN
	.comm	_AVIVO_D1MODE_DATA_FORMAT,8,3   ## @AVIVO_D1MODE_DATA_FORMAT
	.comm	_AVIVO_D1MODE_INTERLEAVE_EN,4,2 ## @AVIVO_D1MODE_INTERLEAVE_EN
	.no_dead_strip	_atombios_apply_encoder_quirks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atombios_apply_encoder_quirks
_atombios_apply_encoder_quirks:         ; @atombios_apply_encoder_quirks
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0, #8]
	ldr	x21, [x23, #8]
	bl	_to_radeon_encoder
	mov	x22, x0
	ldr	w0, [x20]
	bl	_to_radeon_crtc
	mov	x20, x0
	ldr	x8, [x23]
	ldr	w9, [x8]
	mov	w10, #29125
	cmp	w9, w10
	b.ne	LBB0_5
; %bb.1:
	ldr	w9, [x8, #4]
	mov	w10, #4203
	cmp	w9, w10
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x8, #8]
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.3:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _ATOM_DEVICE_LCD1_SUPPORT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATOM_DEVICE_LCD1_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh3:
	adrp	x23, _AVIVO_LVTMA_BIT_DEPTH_CONTROL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _AVIVO_LVTMA_BIT_DEPTH_CONTROL@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_RREG32
Lloh5:
	adrp	x8, _AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w1, w0, w8
	ldr	x0, [x23]
	bl	_WREG32
LBB0_5:
	mov	x0, x21
	bl	_ASIC_IS_AVIVO
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w8, [x22, #4]
Lloh11:
	adrp	x9, _ATOM_DEVICE_TV_SUPPORT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATOM_DEVICE_TV_SUPPORT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x21
	bl	_ASIC_IS_DCE4
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbz	x0, LBB0_11
; %bb.9:
Lloh17:
	adrp	x9, _EVERGREEN_DATA_FORMAT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EVERGREEN_DATA_FORMAT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	x10, [x20]
	add	x0, x10, x9
	cbz	w8, LBB0_13
; %bb.10:
Lloh20:
	adrp	x8, _EVERGREEN_INTERLEAVE_EN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EVERGREEN_INTERLEAVE_EN@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	b	LBB0_14
LBB0_11:
Lloh23:
	adrp	x9, _AVIVO_D1MODE_DATA_FORMAT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AVIVO_D1MODE_DATA_FORMAT@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	ldr	x10, [x20]
	add	x0, x10, x9
	cbz	w8, LBB0_13
; %bb.12:
Lloh26:
	adrp	x8, _AVIVO_D1MODE_INTERLEAVE_EN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AVIVO_D1MODE_INTERLEAVE_EN@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	b	LBB0_14
LBB0_13:
	mov	w1, #0
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_DEVICE_LCD1_SUPPORT,4,2   ; @ATOM_DEVICE_LCD1_SUPPORT
	.comm	_AVIVO_LVTMA_BIT_DEPTH_CONTROL,8,3 ; @AVIVO_LVTMA_BIT_DEPTH_CONTROL
	.comm	_AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN,4,2 ; @AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN
	.comm	_AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN,4,2 ; @AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN
	.comm	_ATOM_DEVICE_TV_SUPPORT,4,2     ; @ATOM_DEVICE_TV_SUPPORT
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_EVERGREEN_DATA_FORMAT,8,3      ; @EVERGREEN_DATA_FORMAT
	.comm	_EVERGREEN_INTERLEAVE_EN,4,2    ; @EVERGREEN_INTERLEAVE_EN
	.comm	_AVIVO_D1MODE_DATA_FORMAT,8,3   ; @AVIVO_D1MODE_DATA_FORMAT
	.comm	_AVIVO_D1MODE_INTERLEAVE_EN,4,2 ; @AVIVO_D1MODE_INTERLEAVE_EN
	.no_dead_strip	_atombios_apply_encoder_quirks
.subsections_via_symbols
