	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_audio_write_speaker_allocation
_radeon_audio_write_speaker_allocation: ## @radeon_audio_write_speaker_allocation
	.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, %r15
	callq	_radeon_get_connector_for_encoder
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_to_radeon_encoder
	movq	$0, -32(%rbp)
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_radeon_connector_edid
	leaq	-32(%rbp), %rsi
	movl	%eax, %edi
	callq	_drm_edid_to_speaker_allocation
	testl	%eax, %eax
	jns	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG
	xorl	%eax, %eax
LBB0_3:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	-32(%rbp), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	*%rcx
LBB0_6:
	movq	-32(%rbp), %rdi
	callq	_kfree
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't read Speaker Allocation Data Block: %d\n"

	.no_dead_strip	_radeon_audio_write_speaker_allocation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_audio_write_speaker_allocation
_radeon_audio_write_speaker_allocation: ; @radeon_audio_write_speaker_allocation
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_radeon_get_connector_for_encoder
	mov	x21, x0
	mov	x0, x19
	bl	_to_radeon_encoder
	str	xzr, [sp, #8]
	cbz	x21, LBB0_7
; %bb.1:
	mov	x20, x0
	mov	x0, x21
	bl	_radeon_connector_edid
	add	x1, sp, #8
	bl	_drm_edid_to_speaker_allocation
	mov	x2, x0
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	x8, [x20]
	cbnz	x8, LBB0_4
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	bl	_DRM_DEBUG
	mov	w2, #0
	ldr	x8, [x20]
	cbz	x8, LBB0_6
LBB0_4:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x1, [sp, #8]
	mov	x0, x19
	blr	x8
LBB0_6:
	ldr	x0, [sp, #8]
	bl	_kfree
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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't read Speaker Allocation Data Block: %d\n"

	.no_dead_strip	_radeon_audio_write_speaker_allocation
.subsections_via_symbols
