	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dce_v8_0_afmt_setmode
_dce_v8_0_afmt_setmode:                 ## @dce_v8_0_afmt_setmode
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	callq	_to_amdgpu_encoder
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_amdgpu_get_connector_for_encoder
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_HDMI_INFOFRAME_HEADER_SIZE@GOTPCREL(%rip), %rax
	movq	_HDMI_AVI_INFOFRAME_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	addl	(%rax), %r12d
	leaq	(,%r12,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.1:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.2:
	cmpl	$0, 8(%rax)
	je	LBB0_20
## %bb.3:
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r15d
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.5:
	callq	_to_amdgpu_crtc
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_6
LBB0_4:
	movl	$8, -52(%rbp)                   ## 4-byte Folded Spill
LBB0_6:
	movq	%r14, %rdi
	callq	_dce_v8_0_audio_get_pin
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rcx
	movl	%eax, 4(%rcx)
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_dce_v8_0_audio_enable
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_dce_v8_0_audio_set_dto
	movq	_mmHDMI_VBI_PACKET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	movq	_mmAFMT_AUDIO_CRC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_WREG32
	movq	_mmHDMI_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	addl	%r15d, %edi
	callq	_RREG32
	movq	_HDMI_CONTROL__HDMI_DEEP_COLOR_ENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	%esi, %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %eax
	rorl	%eax
	cmpl	$5, %eax
	je	LBB0_9
## %bb.7:
	cmpl	$6, %eax
	jne	LBB0_8
## %bb.10:
	movq	_HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$2, %eax
	shll	%cl, %eax
	orl	%esi, %ebx
	orl	%eax, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_11
LBB0_9:
	orl	%esi, %ebx
	movq	_HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_11:
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_12
LBB0_8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
LBB0_12:
	movl	(%r14), %edi
	addl	%r15d, %edi
	movl	%ebx, %esi
	callq	_WREG32
	movq	_mmHDMI_VBI_PACKET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HDMI_VBI_PACKET_CONTROL__HDMI_GC_SEND_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	addl	%r15d, %edi
	movq	_HDMI_VBI_PACKET_CONTROL__HDMI_GC_CONT_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_WREG32
	movq	_mmHDMI_INFOFRAME_CONTROL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_SEND_MASK@GOTPCREL(%rip), %rax
	movq	_HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_CONT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_WREG32
	movq	_mmAFMT_INFOFRAME_CONTROL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_AFMT_INFOFRAME_CONTROL0__AFMT_AUDIO_INFO_UPDATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	movq	_mmHDMI_INFOFRAME_CONTROL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_HDMI_INFOFRAME_CONTROL1__HDMI_AUDIO_INFO_LINE__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$2, %r14d
	movl	$2, %esi
	shll	%cl, %esi
	callq	_WREG32
	movq	_mmHDMI_GC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_WREG32
	movq	_mmHDMI_AUDIO_PACKET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_DELAY_EN__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	_HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_PACKETS_PER_LINE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$3, %esi
	shll	%cl, %esi
	btsl	%eax, %esi
	callq	_WREG32
	movq	_mmAFMT_AUDIO_PACKET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_AFMT_AUDIO_PACKET_CONTROL__AFMT_60958_CS_UPDATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	movq	_mmHDMI_ACR_PACKET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_HDMI_ACR_PACKET_CONTROL__HDMI_ACR_AUTO_SEND_MASK@GOTPCREL(%rip), %rax
	cmpl	$9, -52(%rbp)                   ## 4-byte Folded Reload
	jge	LBB0_14
## %bb.13:
	movq	_HDMI_ACR_PACKET_CONTROL__HDMI_ACR_SOURCE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_14:
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_WREG32
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_dce_v8_0_afmt_update_ACR
	movq	_mmAFMT_60958_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %esi
	shll	%cl, %esi
	callq	_WREG32
	movq	_mmAFMT_60958_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_AFMT_60958_1__AFMT_60958_CS_CHANNEL_NUMBER_R__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	movl	%r14d, %esi
	callq	_WREG32
	movq	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_2__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$3, %esi
	shll	%cl, %esi
	movq	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_3__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$4, %eax
	shll	%cl, %eax
	movq	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_4__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$5, %edx
	shll	%cl, %edx
	movq	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_5__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$6, %ebx
	shll	%cl, %ebx
	orl	%esi, %eax
	orl	%edx, %ebx
	movq	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_6__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$7, %edx
	shll	%cl, %edx
	movq	_mmAFMT_60958_2@GOTPCREL(%rip), %rdi
	orl	%eax, %ebx
	movq	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_7__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$8, %esi
	shll	%cl, %esi
	movl	(%rdi), %edi
	addl	%r15d, %edi
	orl	%edx, %esi
	orl	%ebx, %esi
	callq	_WREG32
	movq	%r13, %rdi
	callq	_dce_v8_0_audio_write_speaker_allocation
	movq	_mmAFMT_AUDIO_PACKET_CONTROL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_AFMT_AUDIO_PACKET_CONTROL2__AFMT_AUDIO_CHANNEL_ENABLE__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$255, %esi
	shll	%cl, %esi
	callq	_WREG32
	movq	%r13, %rdi
	callq	_dce_v8_0_afmt_audio_select_pin
	movq	%r13, %rdi
	callq	_dce_v8_0_audio_write_sad_regs
	movq	%r13, %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_dce_v8_0_audio_write_latency_fields
	leaq	-80(%rbp), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_drm_hdmi_avi_infoframe_from_display_mode
	testq	%rax, %rax
	js	LBB0_15
## %bb.17:
	shll	$2, %r12d
	leaq	-80(%rbp), %rdi
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_hdmi_avi_infoframe_pack
	testq	%rax, %rax
	js	LBB0_18
## %bb.19:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_dce_v8_0_afmt_update_avi_infoframe
	movq	_mmHDMI_INFOFRAME_CONTROL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_SEND_MASK@GOTPCREL(%rip), %rax
	movq	_HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_CONT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_WREG32_OR
	movq	_mmHDMI_INFOFRAME_CONTROL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$2, %esi
	shll	%cl, %esi
	addl	%r15d, %edi
	movq	_HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	callq	_WREG32_P
	movq	_mmAFMT_AUDIO_PACKET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_AFMT_AUDIO_PACKET_CONTROL__AFMT_AUDIO_SAMPLE_SEND_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32_OR
	movq	_mmAFMT_RAMP_CONTROL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movl	$16777215, %esi                 ## imm = 0xFFFFFF
	callq	_WREG32
	movq	_mmAFMT_RAMP_CONTROL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movl	$8388607, %esi                  ## imm = 0x7FFFFF
	callq	_WREG32
	movq	_mmAFMT_RAMP_CONTROL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movl	$1, %esi
	callq	_WREG32
	movq	_mmAFMT_RAMP_CONTROL3@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_WREG32
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	4(%rax), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %edx
	callq	_dce_v8_0_audio_enable
	jmp	LBB0_20
LBB0_15:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_16
LBB0_18:
	leaq	L_.str.4(%rip), %rdi
LBB0_16:
	movq	%rax, %rsi
	callq	_DRM_ERROR
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,4,2 ## @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_HDMI_AVI_INFOFRAME_SIZE,4,2    ## @HDMI_AVI_INFOFRAME_SIZE
	.comm	_mmHDMI_VBI_PACKET_CONTROL,4,2  ## @mmHDMI_VBI_PACKET_CONTROL
	.comm	_HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK,4,2 ## @HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK
	.comm	_mmAFMT_AUDIO_CRC_CONTROL,4,2   ## @mmAFMT_AUDIO_CRC_CONTROL
	.comm	_mmHDMI_CONTROL,4,2             ## @mmHDMI_CONTROL
	.comm	_HDMI_CONTROL__HDMI_DEEP_COLOR_ENABLE_MASK,4,2 ## @HDMI_CONTROL__HDMI_DEEP_COLOR_ENABLE_MASK
	.comm	_HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH_MASK,4,2 ## @HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Disabling hdmi deep color for %d bpc.\n"

	.comm	_HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT,4,2 ## @HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"%s: Enabling hdmi deep color 30 for 10 bpc.\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: Enabling hdmi deep color 36 for 12 bpc.\n"

	.comm	_HDMI_VBI_PACKET_CONTROL__HDMI_GC_SEND_MASK,4,2 ## @HDMI_VBI_PACKET_CONTROL__HDMI_GC_SEND_MASK
	.comm	_HDMI_VBI_PACKET_CONTROL__HDMI_GC_CONT_MASK,4,2 ## @HDMI_VBI_PACKET_CONTROL__HDMI_GC_CONT_MASK
	.comm	_mmHDMI_INFOFRAME_CONTROL0,4,2  ## @mmHDMI_INFOFRAME_CONTROL0
	.comm	_HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_SEND_MASK,4,2 ## @HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_SEND_MASK
	.comm	_HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_CONT_MASK,4,2 ## @HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_CONT_MASK
	.comm	_mmAFMT_INFOFRAME_CONTROL0,4,2  ## @mmAFMT_INFOFRAME_CONTROL0
	.comm	_AFMT_INFOFRAME_CONTROL0__AFMT_AUDIO_INFO_UPDATE_MASK,4,2 ## @AFMT_INFOFRAME_CONTROL0__AFMT_AUDIO_INFO_UPDATE_MASK
	.comm	_mmHDMI_INFOFRAME_CONTROL1,4,2  ## @mmHDMI_INFOFRAME_CONTROL1
	.comm	_HDMI_INFOFRAME_CONTROL1__HDMI_AUDIO_INFO_LINE__SHIFT,4,2 ## @HDMI_INFOFRAME_CONTROL1__HDMI_AUDIO_INFO_LINE__SHIFT
	.comm	_mmHDMI_GC,4,2                  ## @mmHDMI_GC
	.comm	_mmHDMI_AUDIO_PACKET_CONTROL,4,2 ## @mmHDMI_AUDIO_PACKET_CONTROL
	.comm	_HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_DELAY_EN__SHIFT,4,2 ## @HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_DELAY_EN__SHIFT
	.comm	_HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_PACKETS_PER_LINE__SHIFT,4,2 ## @HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_PACKETS_PER_LINE__SHIFT
	.comm	_mmAFMT_AUDIO_PACKET_CONTROL,4,2 ## @mmAFMT_AUDIO_PACKET_CONTROL
	.comm	_AFMT_AUDIO_PACKET_CONTROL__AFMT_60958_CS_UPDATE_MASK,4,2 ## @AFMT_AUDIO_PACKET_CONTROL__AFMT_60958_CS_UPDATE_MASK
	.comm	_mmHDMI_ACR_PACKET_CONTROL,4,2  ## @mmHDMI_ACR_PACKET_CONTROL
	.comm	_HDMI_ACR_PACKET_CONTROL__HDMI_ACR_AUTO_SEND_MASK,4,2 ## @HDMI_ACR_PACKET_CONTROL__HDMI_ACR_AUTO_SEND_MASK
	.comm	_HDMI_ACR_PACKET_CONTROL__HDMI_ACR_SOURCE_MASK,4,2 ## @HDMI_ACR_PACKET_CONTROL__HDMI_ACR_SOURCE_MASK
	.comm	_mmAFMT_60958_0,4,2             ## @mmAFMT_60958_0
	.comm	_AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L__SHIFT,4,2 ## @AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L__SHIFT
	.comm	_mmAFMT_60958_1,4,2             ## @mmAFMT_60958_1
	.comm	_AFMT_60958_1__AFMT_60958_CS_CHANNEL_NUMBER_R__SHIFT,4,2 ## @AFMT_60958_1__AFMT_60958_CS_CHANNEL_NUMBER_R__SHIFT
	.comm	_mmAFMT_60958_2,4,2             ## @mmAFMT_60958_2
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_2__SHIFT,4,2 ## @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_2__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_3__SHIFT,4,2 ## @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_3__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_4__SHIFT,4,2 ## @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_4__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_5__SHIFT,4,2 ## @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_5__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_6__SHIFT,4,2 ## @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_6__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_7__SHIFT,4,2 ## @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_7__SHIFT
	.comm	_mmAFMT_AUDIO_PACKET_CONTROL2,4,2 ## @mmAFMT_AUDIO_PACKET_CONTROL2
	.comm	_AFMT_AUDIO_PACKET_CONTROL2__AFMT_AUDIO_CHANNEL_ENABLE__SHIFT,4,2 ## @AFMT_AUDIO_PACKET_CONTROL2__AFMT_AUDIO_CHANNEL_ENABLE__SHIFT
L_.str.3:                               ## @.str.3
	.asciz	"failed to setup AVI infoframe: %zd\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to pack AVI infoframe: %zd\n"

	.comm	_HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_SEND_MASK,4,2 ## @HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_SEND_MASK
	.comm	_HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_CONT_MASK,4,2 ## @HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_CONT_MASK
	.comm	_HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE__SHIFT,4,2 ## @HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE__SHIFT
	.comm	_HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE_MASK,4,2 ## @HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE_MASK
	.comm	_AFMT_AUDIO_PACKET_CONTROL__AFMT_AUDIO_SAMPLE_SEND_MASK,4,2 ## @AFMT_AUDIO_PACKET_CONTROL__AFMT_AUDIO_SAMPLE_SEND_MASK
	.comm	_mmAFMT_RAMP_CONTROL0,4,2       ## @mmAFMT_RAMP_CONTROL0
	.comm	_mmAFMT_RAMP_CONTROL1,4,2       ## @mmAFMT_RAMP_CONTROL1
	.comm	_mmAFMT_RAMP_CONTROL2,4,2       ## @mmAFMT_RAMP_CONTROL2
	.comm	_mmAFMT_RAMP_CONTROL3,4,2       ## @mmAFMT_RAMP_CONTROL3
	.no_dead_strip	_dce_v8_0_afmt_setmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dce_v8_0_afmt_setmode
_dce_v8_0_afmt_setmode:                 ; @dce_v8_0_afmt_setmode
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0, #8]
	ldr	x28, [x8]
	bl	_to_amdgpu_encoder
	ldr	x25, [x0]
	mov	x0, x20
	bl	_amdgpu_get_connector_for_encoder
Lloh3:
	adrp	x8, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x9, _HDMI_AVI_INFOFRAME_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HDMI_AVI_INFOFRAME_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	add	w27, w9, w8
	lsl	x9, x27, #2
	add	x8, x9, #15
	and	x8, x8, #0x7fffffff0
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x8
	mov	sp, x22
	cbz	x25, LBB0_18
; %bb.1:
	ldr	x8, [x25]
	cbz	x8, LBB0_18
; %bb.2:
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_18
; %bb.3:
	mov	x19, x0
	ldr	w26, [x8]
	ldr	x0, [x20]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_to_amdgpu_crtc
	ldr	w23, [x0]
	b	LBB0_6
LBB0_5:
	mov	w23, #8
LBB0_6:
	mov	x0, x28
	bl	_dce_v8_0_audio_get_pin
	mov	x1, x0
	ldr	x8, [x25]
	str	w0, [x8, #4]
	mov	x0, x28
	mov	w2, #0
	bl	_dce_v8_0_audio_enable
	ldr	w1, [x21]
	mov	x0, x20
	bl	_dce_v8_0_audio_set_dto
Lloh11:
	adrp	x8, _mmHDMI_VBI_PACKET_CONTROL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mmHDMI_VBI_PACKET_CONTROL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh14:
	adrp	x8, _HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_WREG32
Lloh17:
	adrp	x8, _mmAFMT_AUDIO_CRC_CONTROL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mmAFMT_AUDIO_CRC_CONTROL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	add	w0, w8, w26
	mov	w1, #4096
	bl	_WREG32
Lloh20:
	adrp	x8, _mmHDMI_CONTROL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _mmHDMI_CONTROL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	add	w0, w8, w26
	bl	_RREG32
Lloh23:
	adrp	x8, _HDMI_CONTROL__HDMI_DEEP_COLOR_ENABLE_MASK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HDMI_CONTROL__HDMI_DEEP_COLOR_ENABLE_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH_MASK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w9, w9, w8
	bic	w24, w0, w9
	ror	w9, w23, #1
	cmp	w9, #5
	stp	x28, x23, [x29, #-112]          ; 16-byte Folded Spill
	b.eq	LBB0_9
; %bb.7:
	cmp	w9, #6
	b.ne	LBB0_11
; %bb.8:
Lloh29:
	adrp	x9, _HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT@GOTPAGEOFF]
	orr	w8, w24, w8
Lloh31:
	ldr	w9, [x9]
	mov	w10, #2
	lsl	w9, w10, w9
	orr	w24, w8, w9
	mov	x23, x19
	ldr	w1, [x19]
Lloh32:
	adrp	x0, l_.str.2@PAGE
Lloh33:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh34:
	adrp	x9, _HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT@GOTPAGEOFF]
	orr	w8, w24, w8
Lloh36:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w24, w8, w9
	mov	x23, x19
	ldr	w1, [x19]
Lloh37:
	adrp	x0, l_.str.1@PAGE
Lloh38:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	bl	_DRM_DEBUG
	b	LBB0_12
LBB0_11:
	ldr	w1, [x19]
	str	x23, [sp, #-16]!
	mov	x23, x19
Lloh39:
	adrp	x0, l_.str@PAGE
Lloh40:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	add	sp, sp, #16
LBB0_12:
Lloh41:
	adrp	x8, _mmHDMI_CONTROL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _mmHDMI_CONTROL@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	add	w0, w8, w26
	mov	x1, x24
	bl	_WREG32
Lloh44:
	adrp	x8, _mmHDMI_VBI_PACKET_CONTROL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _mmHDMI_VBI_PACKET_CONTROL@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh47:
	adrp	x8, _HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK@GOTPAGE
Lloh48:
	ldr	x8, [x8, _HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
Lloh50:
	adrp	x9, _HDMI_VBI_PACKET_CONTROL__HDMI_GC_SEND_MASK@GOTPAGE
Lloh51:
	ldr	x9, [x9, _HDMI_VBI_PACKET_CONTROL__HDMI_GC_SEND_MASK@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh53:
	adrp	x9, _HDMI_VBI_PACKET_CONTROL__HDMI_GC_CONT_MASK@GOTPAGE
Lloh54:
	ldr	x9, [x9, _HDMI_VBI_PACKET_CONTROL__HDMI_GC_CONT_MASK@GOTPAGEOFF]
Lloh55:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_WREG32
Lloh56:
	adrp	x8, _mmHDMI_INFOFRAME_CONTROL0@GOTPAGE
Lloh57:
	ldr	x8, [x8, _mmHDMI_INFOFRAME_CONTROL0@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
Lloh59:
	adrp	x9, _HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_SEND_MASK@GOTPAGE
Lloh60:
	ldr	x9, [x9, _HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_SEND_MASK@GOTPAGEOFF]
	add	w0, w8, w26
Lloh61:
	ldr	w8, [x9]
Lloh62:
	adrp	x9, _HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_CONT_MASK@GOTPAGE
Lloh63:
	ldr	x9, [x9, _HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_CONT_MASK@GOTPAGEOFF]
Lloh64:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_WREG32
Lloh65:
	adrp	x8, _mmAFMT_INFOFRAME_CONTROL0@GOTPAGE
Lloh66:
	ldr	x8, [x8, _mmAFMT_INFOFRAME_CONTROL0@GOTPAGEOFF]
Lloh67:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh68:
	adrp	x8, _AFMT_INFOFRAME_CONTROL0__AFMT_AUDIO_INFO_UPDATE_MASK@GOTPAGE
Lloh69:
	ldr	x8, [x8, _AFMT_INFOFRAME_CONTROL0__AFMT_AUDIO_INFO_UPDATE_MASK@GOTPAGEOFF]
Lloh70:
	ldr	w1, [x8]
	bl	_WREG32
Lloh71:
	adrp	x8, _mmHDMI_INFOFRAME_CONTROL1@GOTPAGE
Lloh72:
	ldr	x8, [x8, _mmHDMI_INFOFRAME_CONTROL1@GOTPAGEOFF]
Lloh73:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh74:
	adrp	x8, _HDMI_INFOFRAME_CONTROL1__HDMI_AUDIO_INFO_LINE__SHIFT@GOTPAGE
Lloh75:
	ldr	x8, [x8, _HDMI_INFOFRAME_CONTROL1__HDMI_AUDIO_INFO_LINE__SHIFT@GOTPAGEOFF]
Lloh76:
	ldr	w8, [x8]
	mov	w24, #2
	lsl	w1, w24, w8
	bl	_WREG32
Lloh77:
	adrp	x8, _mmHDMI_GC@GOTPAGE
Lloh78:
	ldr	x8, [x8, _mmHDMI_GC@GOTPAGEOFF]
Lloh79:
	ldr	w8, [x8]
	add	w0, w8, w26
	mov	w1, #0
	bl	_WREG32
Lloh80:
	adrp	x8, _mmHDMI_AUDIO_PACKET_CONTROL@GOTPAGE
Lloh81:
	ldr	x8, [x8, _mmHDMI_AUDIO_PACKET_CONTROL@GOTPAGEOFF]
Lloh82:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh83:
	adrp	x8, _HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_DELAY_EN__SHIFT@GOTPAGE
Lloh84:
	ldr	x8, [x8, _HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_DELAY_EN__SHIFT@GOTPAGEOFF]
Lloh85:
	ldr	w8, [x8]
	mov	w28, #1
	lsl	w8, w28, w8
Lloh86:
	adrp	x9, _HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_PACKETS_PER_LINE__SHIFT@GOTPAGE
Lloh87:
	ldr	x9, [x9, _HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_PACKETS_PER_LINE__SHIFT@GOTPAGEOFF]
Lloh88:
	ldr	w9, [x9]
	mov	w19, #3
	lsl	w9, w19, w9
	orr	w1, w9, w8
	bl	_WREG32
Lloh89:
	adrp	x8, _mmAFMT_AUDIO_PACKET_CONTROL@GOTPAGE
Lloh90:
	ldr	x8, [x8, _mmAFMT_AUDIO_PACKET_CONTROL@GOTPAGEOFF]
Lloh91:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh92:
	adrp	x8, _AFMT_AUDIO_PACKET_CONTROL__AFMT_60958_CS_UPDATE_MASK@GOTPAGE
Lloh93:
	ldr	x8, [x8, _AFMT_AUDIO_PACKET_CONTROL__AFMT_60958_CS_UPDATE_MASK@GOTPAGEOFF]
Lloh94:
	ldr	w1, [x8]
	bl	_WREG32
Lloh95:
	adrp	x8, _mmHDMI_ACR_PACKET_CONTROL@GOTPAGE
Lloh96:
	ldr	x8, [x8, _mmHDMI_ACR_PACKET_CONTROL@GOTPAGEOFF]
Lloh97:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh98:
	adrp	x8, _HDMI_ACR_PACKET_CONTROL__HDMI_ACR_SOURCE_MASK@GOTPAGE
Lloh99:
	ldr	x8, [x8, _HDMI_ACR_PACKET_CONTROL__HDMI_ACR_SOURCE_MASK@GOTPAGEOFF]
Lloh100:
	ldr	w8, [x8]
Lloh101:
	adrp	x9, _HDMI_ACR_PACKET_CONTROL__HDMI_ACR_AUTO_SEND_MASK@GOTPAGE
Lloh102:
	ldr	x9, [x9, _HDMI_ACR_PACKET_CONTROL__HDMI_ACR_AUTO_SEND_MASK@GOTPAGEOFF]
Lloh103:
	ldr	w9, [x9]
	ldur	x10, [x29, #-104]               ; 8-byte Folded Reload
	cmp	w10, #8
	csel	w8, wzr, w8, gt
	orr	w1, w9, w8
	bl	_WREG32
	ldr	w1, [x21]
	mov	x0, x20
	bl	_dce_v8_0_afmt_update_ACR
Lloh104:
	adrp	x8, _mmAFMT_60958_0@GOTPAGE
Lloh105:
	ldr	x8, [x8, _mmAFMT_60958_0@GOTPAGEOFF]
Lloh106:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh107:
	adrp	x8, _AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L__SHIFT@GOTPAGE
Lloh108:
	ldr	x8, [x8, _AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L__SHIFT@GOTPAGEOFF]
Lloh109:
	ldr	w8, [x8]
	lsl	w1, w28, w8
	bl	_WREG32
Lloh110:
	adrp	x8, _mmAFMT_60958_1@GOTPAGE
Lloh111:
	ldr	x8, [x8, _mmAFMT_60958_1@GOTPAGEOFF]
Lloh112:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh113:
	adrp	x8, _AFMT_60958_1__AFMT_60958_CS_CHANNEL_NUMBER_R__SHIFT@GOTPAGE
Lloh114:
	ldr	x8, [x8, _AFMT_60958_1__AFMT_60958_CS_CHANNEL_NUMBER_R__SHIFT@GOTPAGEOFF]
Lloh115:
	ldr	w8, [x8]
	lsl	w1, w24, w8
	bl	_WREG32
Lloh116:
	adrp	x8, _mmAFMT_60958_2@GOTPAGE
Lloh117:
	ldr	x8, [x8, _mmAFMT_60958_2@GOTPAGEOFF]
Lloh118:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh119:
	adrp	x8, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_2__SHIFT@GOTPAGE
Lloh120:
	ldr	x8, [x8, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_2__SHIFT@GOTPAGEOFF]
Lloh121:
	ldr	w8, [x8]
	lsl	w8, w19, w8
Lloh122:
	adrp	x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_3__SHIFT@GOTPAGE
Lloh123:
	ldr	x9, [x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_3__SHIFT@GOTPAGEOFF]
Lloh124:
	ldr	w9, [x9]
	mov	w10, #4
	lsl	w9, w10, w9
	orr	w8, w9, w8
Lloh125:
	adrp	x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_4__SHIFT@GOTPAGE
Lloh126:
	ldr	x9, [x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_4__SHIFT@GOTPAGEOFF]
Lloh127:
	ldr	w9, [x9]
	mov	w10, #5
	lsl	w9, w10, w9
	orr	w8, w8, w9
Lloh128:
	adrp	x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_5__SHIFT@GOTPAGE
Lloh129:
	ldr	x9, [x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_5__SHIFT@GOTPAGEOFF]
Lloh130:
	ldr	w9, [x9]
	mov	w10, #6
	lsl	w9, w10, w9
	orr	w8, w8, w9
Lloh131:
	adrp	x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_6__SHIFT@GOTPAGE
Lloh132:
	ldr	x9, [x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_6__SHIFT@GOTPAGEOFF]
Lloh133:
	ldr	w9, [x9]
	mov	w10, #7
	lsl	w9, w10, w9
	orr	w8, w8, w9
Lloh134:
	adrp	x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_7__SHIFT@GOTPAGE
Lloh135:
	ldr	x9, [x9, _AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_7__SHIFT@GOTPAGEOFF]
Lloh136:
	ldr	w9, [x9]
	mov	w10, #8
	lsl	w9, w10, w9
	orr	w1, w8, w9
	bl	_WREG32
	mov	x0, x20
	bl	_dce_v8_0_audio_write_speaker_allocation
Lloh137:
	adrp	x8, _mmAFMT_AUDIO_PACKET_CONTROL2@GOTPAGE
Lloh138:
	ldr	x8, [x8, _mmAFMT_AUDIO_PACKET_CONTROL2@GOTPAGEOFF]
Lloh139:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh140:
	adrp	x8, _AFMT_AUDIO_PACKET_CONTROL2__AFMT_AUDIO_CHANNEL_ENABLE__SHIFT@GOTPAGE
Lloh141:
	ldr	x8, [x8, _AFMT_AUDIO_PACKET_CONTROL2__AFMT_AUDIO_CHANNEL_ENABLE__SHIFT@GOTPAGEOFF]
Lloh142:
	ldr	w8, [x8]
	mov	w9, #255
	lsl	w1, w9, w8
	bl	_WREG32
	mov	x0, x20
	bl	_dce_v8_0_afmt_audio_select_pin
	mov	x0, x20
	bl	_dce_v8_0_audio_write_sad_regs
	mov	x0, x20
	mov	x1, x21
	bl	_dce_v8_0_audio_write_latency_fields
	sub	x0, x29, #96
	mov	x1, x23
	mov	x2, x21
	bl	_drm_hdmi_avi_infoframe_from_display_mode
	tbnz	x0, #63, LBB0_15
; %bb.13:
	lsl	w21, w27, #2
	sub	x0, x29, #96
	mov	x1, x22
	mov	x2, x21
	bl	_hdmi_avi_infoframe_pack
	tbnz	x0, #63, LBB0_16
; %bb.14:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_dce_v8_0_afmt_update_avi_infoframe
Lloh143:
	adrp	x8, _mmHDMI_INFOFRAME_CONTROL0@GOTPAGE
Lloh144:
	ldr	x8, [x8, _mmHDMI_INFOFRAME_CONTROL0@GOTPAGEOFF]
Lloh145:
	ldr	w8, [x8]
Lloh146:
	adrp	x9, _HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_SEND_MASK@GOTPAGE
Lloh147:
	ldr	x9, [x9, _HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_SEND_MASK@GOTPAGEOFF]
	add	w0, w8, w26
Lloh148:
	ldr	w8, [x9]
Lloh149:
	adrp	x9, _HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_CONT_MASK@GOTPAGE
Lloh150:
	ldr	x9, [x9, _HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_CONT_MASK@GOTPAGEOFF]
Lloh151:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_WREG32_OR
Lloh152:
	adrp	x8, _mmHDMI_INFOFRAME_CONTROL1@GOTPAGE
Lloh153:
	ldr	x8, [x8, _mmHDMI_INFOFRAME_CONTROL1@GOTPAGEOFF]
Lloh154:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh155:
	adrp	x8, _HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE__SHIFT@GOTPAGE
Lloh156:
	ldr	x8, [x8, _HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE__SHIFT@GOTPAGEOFF]
Lloh157:
	ldr	w8, [x8]
	mov	w9, #2
	lsl	w1, w9, w8
Lloh158:
	adrp	x8, _HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE_MASK@GOTPAGE
Lloh159:
	ldr	x8, [x8, _HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE_MASK@GOTPAGEOFF]
Lloh160:
	ldr	w8, [x8]
	mvn	w2, w8
	bl	_WREG32_P
Lloh161:
	adrp	x8, _mmAFMT_AUDIO_PACKET_CONTROL@GOTPAGE
Lloh162:
	ldr	x8, [x8, _mmAFMT_AUDIO_PACKET_CONTROL@GOTPAGEOFF]
Lloh163:
	ldr	w8, [x8]
	add	w0, w8, w26
Lloh164:
	adrp	x8, _AFMT_AUDIO_PACKET_CONTROL__AFMT_AUDIO_SAMPLE_SEND_MASK@GOTPAGE
Lloh165:
	ldr	x8, [x8, _AFMT_AUDIO_PACKET_CONTROL__AFMT_AUDIO_SAMPLE_SEND_MASK@GOTPAGEOFF]
Lloh166:
	ldr	w1, [x8]
	bl	_WREG32_OR
Lloh167:
	adrp	x8, _mmAFMT_RAMP_CONTROL0@GOTPAGE
Lloh168:
	ldr	x8, [x8, _mmAFMT_RAMP_CONTROL0@GOTPAGEOFF]
Lloh169:
	ldr	w8, [x8]
	add	w0, w8, w26
	mov	w1, #16777215
	bl	_WREG32
Lloh170:
	adrp	x8, _mmAFMT_RAMP_CONTROL1@GOTPAGE
Lloh171:
	ldr	x8, [x8, _mmAFMT_RAMP_CONTROL1@GOTPAGEOFF]
Lloh172:
	ldr	w8, [x8]
	add	w0, w8, w26
	mov	w1, #8388607
	bl	_WREG32
Lloh173:
	adrp	x8, _mmAFMT_RAMP_CONTROL2@GOTPAGE
Lloh174:
	ldr	x8, [x8, _mmAFMT_RAMP_CONTROL2@GOTPAGEOFF]
Lloh175:
	ldr	w8, [x8]
	add	w0, w8, w26
	mov	w1, #1
	bl	_WREG32
Lloh176:
	adrp	x8, _mmAFMT_RAMP_CONTROL3@GOTPAGE
Lloh177:
	ldr	x8, [x8, _mmAFMT_RAMP_CONTROL3@GOTPAGEOFF]
Lloh178:
	ldr	w8, [x8]
	add	w0, w8, w26
	mov	w1, #1
	bl	_WREG32
	ldr	x8, [x25]
	ldr	w1, [x8, #4]
	ldur	x0, [x29, #-112]                ; 8-byte Folded Reload
	mov	w2, #1
	bl	_dce_v8_0_audio_enable
	b	LBB0_18
LBB0_15:
	mov	x1, x0
Lloh179:
	adrp	x0, l_.str.3@PAGE
Lloh180:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_16:
	mov	x1, x0
Lloh181:
	adrp	x0, l_.str.4@PAGE
Lloh182:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_17:
	bl	_DRM_ERROR
LBB0_18:
	ldur	x8, [x29, #-88]
Lloh183:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh184:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh185:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh140, Lloh141, Lloh142
	.loh AdrpLdrGotLdr	Lloh137, Lloh138, Lloh139
	.loh AdrpLdrGotLdr	Lloh134, Lloh135, Lloh136
	.loh AdrpLdrGotLdr	Lloh131, Lloh132, Lloh133
	.loh AdrpLdrGotLdr	Lloh128, Lloh129, Lloh130
	.loh AdrpLdrGotLdr	Lloh125, Lloh126, Lloh127
	.loh AdrpLdrGotLdr	Lloh122, Lloh123, Lloh124
	.loh AdrpLdrGotLdr	Lloh119, Lloh120, Lloh121
	.loh AdrpLdrGotLdr	Lloh116, Lloh117, Lloh118
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpLdrGotLdr	Lloh110, Lloh111, Lloh112
	.loh AdrpLdrGotLdr	Lloh107, Lloh108, Lloh109
	.loh AdrpLdrGotLdr	Lloh104, Lloh105, Lloh106
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh176, Lloh177, Lloh178
	.loh AdrpLdrGotLdr	Lloh173, Lloh174, Lloh175
	.loh AdrpLdrGotLdr	Lloh170, Lloh171, Lloh172
	.loh AdrpLdrGotLdr	Lloh167, Lloh168, Lloh169
	.loh AdrpLdrGotLdr	Lloh164, Lloh165, Lloh166
	.loh AdrpLdrGotLdr	Lloh161, Lloh162, Lloh163
	.loh AdrpLdrGotLdr	Lloh158, Lloh159, Lloh160
	.loh AdrpLdrGotLdr	Lloh155, Lloh156, Lloh157
	.loh AdrpLdrGotLdr	Lloh152, Lloh153, Lloh154
	.loh AdrpLdrGotLdr	Lloh149, Lloh150, Lloh151
	.loh AdrpLdrGotLdr	Lloh146, Lloh147, Lloh148
	.loh AdrpLdrGotLdr	Lloh143, Lloh144, Lloh145
	.loh AdrpAdd	Lloh179, Lloh180
	.loh AdrpAdd	Lloh181, Lloh182
	.loh AdrpLdrGotLdr	Lloh183, Lloh184, Lloh185
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,4,2 ; @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_HDMI_AVI_INFOFRAME_SIZE,4,2    ; @HDMI_AVI_INFOFRAME_SIZE
	.comm	_mmHDMI_VBI_PACKET_CONTROL,4,2  ; @mmHDMI_VBI_PACKET_CONTROL
	.comm	_HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK,4,2 ; @HDMI_VBI_PACKET_CONTROL__HDMI_NULL_SEND_MASK
	.comm	_mmAFMT_AUDIO_CRC_CONTROL,4,2   ; @mmAFMT_AUDIO_CRC_CONTROL
	.comm	_mmHDMI_CONTROL,4,2             ; @mmHDMI_CONTROL
	.comm	_HDMI_CONTROL__HDMI_DEEP_COLOR_ENABLE_MASK,4,2 ; @HDMI_CONTROL__HDMI_DEEP_COLOR_ENABLE_MASK
	.comm	_HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH_MASK,4,2 ; @HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Disabling hdmi deep color for %d bpc.\n"

	.comm	_HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT,4,2 ; @HDMI_CONTROL__HDMI_DEEP_COLOR_DEPTH__SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"%s: Enabling hdmi deep color 30 for 10 bpc.\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: Enabling hdmi deep color 36 for 12 bpc.\n"

	.comm	_HDMI_VBI_PACKET_CONTROL__HDMI_GC_SEND_MASK,4,2 ; @HDMI_VBI_PACKET_CONTROL__HDMI_GC_SEND_MASK
	.comm	_HDMI_VBI_PACKET_CONTROL__HDMI_GC_CONT_MASK,4,2 ; @HDMI_VBI_PACKET_CONTROL__HDMI_GC_CONT_MASK
	.comm	_mmHDMI_INFOFRAME_CONTROL0,4,2  ; @mmHDMI_INFOFRAME_CONTROL0
	.comm	_HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_SEND_MASK,4,2 ; @HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_SEND_MASK
	.comm	_HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_CONT_MASK,4,2 ; @HDMI_INFOFRAME_CONTROL0__HDMI_AUDIO_INFO_CONT_MASK
	.comm	_mmAFMT_INFOFRAME_CONTROL0,4,2  ; @mmAFMT_INFOFRAME_CONTROL0
	.comm	_AFMT_INFOFRAME_CONTROL0__AFMT_AUDIO_INFO_UPDATE_MASK,4,2 ; @AFMT_INFOFRAME_CONTROL0__AFMT_AUDIO_INFO_UPDATE_MASK
	.comm	_mmHDMI_INFOFRAME_CONTROL1,4,2  ; @mmHDMI_INFOFRAME_CONTROL1
	.comm	_HDMI_INFOFRAME_CONTROL1__HDMI_AUDIO_INFO_LINE__SHIFT,4,2 ; @HDMI_INFOFRAME_CONTROL1__HDMI_AUDIO_INFO_LINE__SHIFT
	.comm	_mmHDMI_GC,4,2                  ; @mmHDMI_GC
	.comm	_mmHDMI_AUDIO_PACKET_CONTROL,4,2 ; @mmHDMI_AUDIO_PACKET_CONTROL
	.comm	_HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_DELAY_EN__SHIFT,4,2 ; @HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_DELAY_EN__SHIFT
	.comm	_HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_PACKETS_PER_LINE__SHIFT,4,2 ; @HDMI_AUDIO_PACKET_CONTROL__HDMI_AUDIO_PACKETS_PER_LINE__SHIFT
	.comm	_mmAFMT_AUDIO_PACKET_CONTROL,4,2 ; @mmAFMT_AUDIO_PACKET_CONTROL
	.comm	_AFMT_AUDIO_PACKET_CONTROL__AFMT_60958_CS_UPDATE_MASK,4,2 ; @AFMT_AUDIO_PACKET_CONTROL__AFMT_60958_CS_UPDATE_MASK
	.comm	_mmHDMI_ACR_PACKET_CONTROL,4,2  ; @mmHDMI_ACR_PACKET_CONTROL
	.comm	_HDMI_ACR_PACKET_CONTROL__HDMI_ACR_AUTO_SEND_MASK,4,2 ; @HDMI_ACR_PACKET_CONTROL__HDMI_ACR_AUTO_SEND_MASK
	.comm	_HDMI_ACR_PACKET_CONTROL__HDMI_ACR_SOURCE_MASK,4,2 ; @HDMI_ACR_PACKET_CONTROL__HDMI_ACR_SOURCE_MASK
	.comm	_mmAFMT_60958_0,4,2             ; @mmAFMT_60958_0
	.comm	_AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L__SHIFT,4,2 ; @AFMT_60958_0__AFMT_60958_CS_CHANNEL_NUMBER_L__SHIFT
	.comm	_mmAFMT_60958_1,4,2             ; @mmAFMT_60958_1
	.comm	_AFMT_60958_1__AFMT_60958_CS_CHANNEL_NUMBER_R__SHIFT,4,2 ; @AFMT_60958_1__AFMT_60958_CS_CHANNEL_NUMBER_R__SHIFT
	.comm	_mmAFMT_60958_2,4,2             ; @mmAFMT_60958_2
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_2__SHIFT,4,2 ; @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_2__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_3__SHIFT,4,2 ; @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_3__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_4__SHIFT,4,2 ; @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_4__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_5__SHIFT,4,2 ; @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_5__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_6__SHIFT,4,2 ; @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_6__SHIFT
	.comm	_AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_7__SHIFT,4,2 ; @AFMT_60958_2__AFMT_60958_CS_CHANNEL_NUMBER_7__SHIFT
	.comm	_mmAFMT_AUDIO_PACKET_CONTROL2,4,2 ; @mmAFMT_AUDIO_PACKET_CONTROL2
	.comm	_AFMT_AUDIO_PACKET_CONTROL2__AFMT_AUDIO_CHANNEL_ENABLE__SHIFT,4,2 ; @AFMT_AUDIO_PACKET_CONTROL2__AFMT_AUDIO_CHANNEL_ENABLE__SHIFT
l_.str.3:                               ; @.str.3
	.asciz	"failed to setup AVI infoframe: %zd\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to pack AVI infoframe: %zd\n"

	.comm	_HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_SEND_MASK,4,2 ; @HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_SEND_MASK
	.comm	_HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_CONT_MASK,4,2 ; @HDMI_INFOFRAME_CONTROL0__HDMI_AVI_INFO_CONT_MASK
	.comm	_HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE__SHIFT,4,2 ; @HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE__SHIFT
	.comm	_HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE_MASK,4,2 ; @HDMI_INFOFRAME_CONTROL1__HDMI_AVI_INFO_LINE_MASK
	.comm	_AFMT_AUDIO_PACKET_CONTROL__AFMT_AUDIO_SAMPLE_SEND_MASK,4,2 ; @AFMT_AUDIO_PACKET_CONTROL__AFMT_AUDIO_SAMPLE_SEND_MASK
	.comm	_mmAFMT_RAMP_CONTROL0,4,2       ; @mmAFMT_RAMP_CONTROL0
	.comm	_mmAFMT_RAMP_CONTROL1,4,2       ; @mmAFMT_RAMP_CONTROL1
	.comm	_mmAFMT_RAMP_CONTROL2,4,2       ; @mmAFMT_RAMP_CONTROL2
	.comm	_mmAFMT_RAMP_CONTROL3,4,2       ; @mmAFMT_RAMP_CONTROL3
	.no_dead_strip	_dce_v8_0_afmt_setmode
.subsections_via_symbols
