	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function audio_setup_infoframe
_audio_setup_infoframe:                 ## @audio_setup_infoframe
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	-88(%rbp), %r14
	movq	%r14, %rdi
	callq	_hdmi_audio_infoframe_init
	movl	4(%rbx), %eax
	movl	%eax, -88(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	movl	$56, %edx
	callq	_hdmi_audio_infoframe_pack
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-76(%rbp), %edx
	movl	-72(%rbp), %eax
	shll	$16, %eax
	shll	$8, %edx
	orl	%eax, %edx
	orl	-80(%rbp), %edx
	movq	%rbx, %rdi
	callq	_WR4
	movq	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %eax
	shll	$24, %eax
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %ecx
	shll	$16, %ecx
	orl	%eax, %ecx
	shll	$8, %edx
	orl	%ecx, %edx
	orl	-68(%rbp), %edx
	movq	%rbx, %rdi
	callq	_WR4
	movq	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edx
	shll	$8, %edx
	orl	-52(%rbp), %edx
	movq	%rbx, %rdi
	callq	_WR4
	movq	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AUDIO_INFOFRAME_CTRL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_WR4
	jmp	LBB0_3
LBB0_1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot pack audio infoframe\n"

	.comm	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER,4,2 ## @HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER
	.comm	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW,4,2 ## @HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW
	.comm	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH,4,2 ## @HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH
	.comm	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL,4,2 ## @HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL
	.comm	_AUDIO_INFOFRAME_CTRL_ENABLE,4,2 ## @AUDIO_INFOFRAME_CTRL_ENABLE
	.no_dead_strip	_audio_setup_infoframe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function audio_setup_infoframe
_audio_setup_infoframe:                 ; @audio_setup_infoframe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	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, #-24]
	add	x0, sp, #8
	bl	_hdmi_audio_infoframe_init
	ldr	w8, [x19, #4]
	str	w8, [sp, #8]
	add	x0, sp, #8
	add	x1, sp, #16
	mov	w2, #56
	bl	_hdmi_audio_infoframe_pack
	tbnz	x0, #63, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldp	w9, w8, [sp, #20]
	ldr	w10, [sp, #16]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
	orr	w2, w8, w10
	mov	x0, x19
	bl	_WR4
Lloh6:
	adrp	x8, _HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldp	w9, w8, [sp, #36]
	lsl	w9, w9, #16
	orr	w8, w9, w8, lsl #24
	ldp	w10, w9, [sp, #28]
	orr	w8, w8, w9, lsl #8
	orr	w2, w8, w10
	mov	x0, x19
	bl	_WR4
Lloh9:
	adrp	x8, _HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldp	w9, w8, [sp, #44]
	orr	w2, w9, w8, lsl #8
	mov	x0, x19
	bl	_WR4
Lloh12:
	adrp	x8, _HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _AUDIO_INFOFRAME_CTRL_ENABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AUDIO_INFOFRAME_CTRL_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_WR4
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
LBB0_3:
	ldur	x8, [x29, #-24]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot pack audio infoframe\n"

	.comm	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER,4,2 ; @HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_HEADER
	.comm	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW,4,2 ; @HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_LOW
	.comm	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH,4,2 ; @HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_SUBPACK0_HIGH
	.comm	_HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL,4,2 ; @HDMI_NV_PDISP_HDMI_AUDIO_INFOFRAME_CTRL
	.comm	_AUDIO_INFOFRAME_CTRL_ENABLE,4,2 ; @AUDIO_INFOFRAME_CTRL_ENABLE
	.no_dead_strip	_audio_setup_infoframe
.subsections_via_symbols
