	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_hdmi_update_audio_settings ## -- Begin function r600_hdmi_update_audio_settings
	.p2align	4, 0x90
_r600_hdmi_update_audio_settings:       ## @r600_hdmi_update_audio_settings
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	callq	_to_radeon_encoder
	movq	(%rax), %r15
	leaq	-88(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_r600_audio_status
	movq	%rsp, %r13
	movq	_HDMI_INFOFRAME_HEADER_SIZE@GOTPCREL(%rip), %rax
	movq	_HDMI_AUDIO_INFOFRAME_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	addl	(%rax), %ebx
	leaq	(,%rbx,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	cmpl	$0, 4(%rax)
	je	LBB0_10
## %bb.2:
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_r600_hdmi_is_audio_buffer_filled
	testq	%rax, %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	-60(%rbp), %ecx
	movl	-88(%rbp), %edx
	movl	-64(%rbp), %r8d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	-80(%rbp), %edx
	movl	-72(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	-56(%rbp), %rdi
	callq	_hdmi_audio_infoframe_init
	testq	%rax, %rax
	js	LBB0_7
## %bb.3:
	movl	-88(%rbp), %eax
	movl	%eax, -56(%rbp)
	shll	$2, %ebx
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_hdmi_audio_infoframe_pack
	testq	%rax, %rax
	js	LBB0_8
## %bb.4:
	movq	_HDMI0_AUDIO_PACKET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	callq	_RREG32
	movq	_HDMI0_AUDIO_TEST_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	movq	_HDMI0_AUDIO_PACKET_CONTROL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	addl	%r15d, %edi
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, %esi
	callq	_WREG32
LBB0_6:
	movq	_HDMI0_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_HDMI0_ERROR_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32_OR
	movq	_HDMI0_INFOFRAME_CONTROL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r15d, %edi
	movq	_HDMI0_AUDIO_INFO_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	callq	_WREG32_AND
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_r600_hdmi_update_audio_infoframe
	movq	_HDMI0_INFOFRAME_CONTROL0@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	movq	_HDMI0_AUDIO_INFO_CONT@GOTPCREL(%rip), %rax
	movq	_HDMI0_AUDIO_INFO_UPDATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	%r15d, %edi
	callq	_WREG32_OR
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.5(%rip), %rdi
LBB0_9:
	callq	_DRM_ERROR
LBB0_10:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,4,2 ## @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_HDMI_AUDIO_INFOFRAME_SIZE,4,2  ## @HDMI_AUDIO_INFOFRAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s with %d channels, %d Hz sampling rate, %d bits per sample,\n"

L_.str.1:                               ## @.str.1
	.asciz	"playing"

L_.str.2:                               ## @.str.2
	.asciz	"stopped"

L_.str.3:                               ## @.str.3
	.asciz	"0x%02X IEC60958 status bits and 0x%02X category code\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to setup audio infoframe\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to pack audio infoframe\n"

	.comm	_HDMI0_AUDIO_PACKET_CONTROL,4,2 ## @HDMI0_AUDIO_PACKET_CONTROL
	.comm	_HDMI0_AUDIO_TEST_EN,4,2        ## @HDMI0_AUDIO_TEST_EN
	.comm	_HDMI0_CONTROL,4,2              ## @HDMI0_CONTROL
	.comm	_HDMI0_ERROR_ACK,4,2            ## @HDMI0_ERROR_ACK
	.comm	_HDMI0_INFOFRAME_CONTROL0,4,2   ## @HDMI0_INFOFRAME_CONTROL0
	.comm	_HDMI0_AUDIO_INFO_SOURCE,4,2    ## @HDMI0_AUDIO_INFO_SOURCE
	.comm	_HDMI0_AUDIO_INFO_CONT,4,2      ## @HDMI0_AUDIO_INFO_CONT
	.comm	_HDMI0_AUDIO_INFO_UPDATE,4,2    ## @HDMI0_AUDIO_INFO_UPDATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_hdmi_update_audio_settings ; -- Begin function r600_hdmi_update_audio_settings
	.p2align	2
_r600_hdmi_update_audio_settings:       ; @r600_hdmi_update_audio_settings
	.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
	sub	sp, sp, #48
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x8, [x0]
	ldr	x20, [x8]
	bl	_to_radeon_encoder
	ldr	x23, [x0]
	sub	x8, x29, #88
	mov	x0, x20
	bl	_r600_audio_status
	mov	x22, sp
Lloh3:
	adrp	x8, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x9, _HDMI_AUDIO_INFOFRAME_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HDMI_AUDIO_INFOFRAME_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	add	w21, w9, w8
	lsl	x9, x21, #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	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x23]
	cbz	x8, LBB0_10
; %bb.1:
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_10
; %bb.2:
	ldr	w23, [x8]
	mov	x0, x19
	bl	_r600_hdmi_is_audio_buffer_filled
Lloh11:
	adrp	x8, l_.str.1@PAGE
Lloh12:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh13:
	adrp	x9, l_.str.2@PAGE
Lloh14:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldp	w11, w9, [x29, #-64]
	ldur	w10, [x29, #-88]
	sub	sp, sp, #32
	stp	x9, x11, [sp, #16]
	stp	x8, x10, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	add	sp, sp, #32
	ldp	x9, x8, [x29, #-80]
	stp	x8, x9, [sp, #-16]!
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG
	add	sp, sp, #16
	sub	x0, x29, #96
	bl	_hdmi_audio_infoframe_init
	tbnz	x0, #63, LBB0_7
; %bb.3:
	ldur	w8, [x29, #-88]
	stur	w8, [x29, #-96]
	lsl	w21, w21, #2
	sub	x0, x29, #96
	mov	x1, x20
	mov	x2, x21
	bl	_hdmi_audio_infoframe_pack
	tbnz	x0, #63, LBB0_8
; %bb.4:
Lloh19:
	adrp	x24, _HDMI0_AUDIO_PACKET_CONTROL@GOTPAGE
Lloh20:
	ldr	x24, [x24, _HDMI0_AUDIO_PACKET_CONTROL@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w0, w8, w23
	bl	_RREG32
Lloh21:
	adrp	x8, _HDMI0_AUDIO_TEST_EN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HDMI0_AUDIO_TEST_EN@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x8]
	tst	w9, w0
	b.eq	LBB0_6
; %bb.5:
	ldr	w8, [x24]
	add	w8, w8, w23
	bic	w1, w0, w9
	mov	x0, x8
	bl	_WREG32
LBB0_6:
Lloh24:
	adrp	x8, _HDMI0_CONTROL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HDMI0_CONTROL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	add	w0, w8, w23
Lloh27:
	adrp	x8, _HDMI0_ERROR_ACK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HDMI0_ERROR_ACK@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_WREG32_OR
Lloh30:
	adrp	x24, _HDMI0_INFOFRAME_CONTROL0@GOTPAGE
Lloh31:
	ldr	x24, [x24, _HDMI0_INFOFRAME_CONTROL0@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w0, w8, w23
Lloh32:
	adrp	x8, _HDMI0_AUDIO_INFO_SOURCE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _HDMI0_AUDIO_INFO_SOURCE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	mvn	w1, w8
	bl	_WREG32_AND
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_r600_hdmi_update_audio_infoframe
	ldr	w8, [x24]
Lloh35:
	adrp	x9, _HDMI0_AUDIO_INFO_CONT@GOTPAGE
Lloh36:
	ldr	x9, [x9, _HDMI0_AUDIO_INFO_CONT@GOTPAGEOFF]
	add	w0, w8, w23
Lloh37:
	ldr	w8, [x9]
Lloh38:
	adrp	x9, _HDMI0_AUDIO_INFO_UPDATE@GOTPAGE
Lloh39:
	ldr	x9, [x9, _HDMI0_AUDIO_INFO_UPDATE@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_WREG32_OR
	b	LBB0_10
LBB0_7:
Lloh41:
	adrp	x0, l_.str.4@PAGE
Lloh42:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh43:
	adrp	x0, l_.str.5@PAGE
Lloh44:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_9:
	bl	_DRM_ERROR
LBB0_10:
	mov	sp, x22
	ldur	x8, [x29, #-56]
Lloh45:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh46:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #48
	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_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,4,2 ; @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_HDMI_AUDIO_INFOFRAME_SIZE,4,2  ; @HDMI_AUDIO_INFOFRAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s with %d channels, %d Hz sampling rate, %d bits per sample,\n"

l_.str.1:                               ; @.str.1
	.asciz	"playing"

l_.str.2:                               ; @.str.2
	.asciz	"stopped"

l_.str.3:                               ; @.str.3
	.asciz	"0x%02X IEC60958 status bits and 0x%02X category code\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to setup audio infoframe\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to pack audio infoframe\n"

	.comm	_HDMI0_AUDIO_PACKET_CONTROL,4,2 ; @HDMI0_AUDIO_PACKET_CONTROL
	.comm	_HDMI0_AUDIO_TEST_EN,4,2        ; @HDMI0_AUDIO_TEST_EN
	.comm	_HDMI0_CONTROL,4,2              ; @HDMI0_CONTROL
	.comm	_HDMI0_ERROR_ACK,4,2            ; @HDMI0_ERROR_ACK
	.comm	_HDMI0_INFOFRAME_CONTROL0,4,2   ; @HDMI0_INFOFRAME_CONTROL0
	.comm	_HDMI0_AUDIO_INFO_SOURCE,4,2    ; @HDMI0_AUDIO_INFO_SOURCE
	.comm	_HDMI0_AUDIO_INFO_CONT,4,2      ; @HDMI0_AUDIO_INFO_CONT
	.comm	_HDMI0_AUDIO_INFO_UPDATE,4,2    ; @HDMI0_AUDIO_INFO_UPDATE
.subsections_via_symbols
