	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdmi5_audio_config             ## -- Begin function hdmi5_audio_config
	.p2align	4, 0x90
_hdmi5_audio_config:                    ## @hdmi5_audio_config
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.1:
	movq	%rdx, %rbx
	movq	8(%rdx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rdi, %r14
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.5:
	movq	%rsi, %r15
	movq	%rax, -88(%rbp)
	movq	(%rax), %rax
	movl	16(%rax), %edx
	movq	_IEC958_AES4_CON_MAX_WORDLEN_24@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_6
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$88, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_IEC958_AES4_CON_WORDLEN_20_16@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_4
## %bb.7:
	movq	_IEC958_AES3_CON_FS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	12(%rax), %edx
	addl	$-128, %edx
	cmpl	$7, %edx
	jae	LBB0_4
## %bb.8:
	movslq	%edx, %rax
	leaq	l_switch.table.hdmi5_audio_config(%rip), %rdx
	movl	(%rdx,%rax,4), %esi
	leaq	-32(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movl	%ecx, %edi
	movq	%rax, %rcx
	callq	_hdmi_compute_acr
	movl	-32(%rbp), %eax
	movl	%eax, -104(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -100(%rbp)
	movq	(%rbx), %rcx
	movq	_CEA861_AUDIO_INFOFRAME_DB1CC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rcx), %eax
	cmpl	$5, %eax
	jne	LBB0_9
## %bb.10:
	movq	_HDMI_AUDIO_LAYOUT_6CH@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	_HDMI_AUDIO_LAYOUT_8CH@GOTPCREL(%rip), %rcx
LBB0_11:
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.12:
	movq	_HDMI_AUDIO_LAYOUT_2CH@GOTPCREL(%rip), %rcx
LBB0_13:
	movl	(%rcx), %eax
	movl	%eax, -96(%rbp)
	movabsq	$824633720848, %rax             ## imm = 0xC000000010
	movq	%rax, -48(%rbp)
	movq	_HDMI_AUDIO_TRANSF_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	$32, -40(%rbp)
	movq	_HDMI_AUDIO_ONEWORD_TWOSAMPLES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_HDMI_AUDIO_SAMPLE_16BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_HDMI_AUDIO_JUSTIFY_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_HDMI_AUDIO_SAMPLE_LEFT_FIRST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_HDMI_AUDIO_TYPE_LPCM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -64(%rbp)
	movq	%rax, -72(%rbp)
	movq	_HDMI_AUDIO_BLOCK_SIG_STARTEND_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_hdmi_wp_audio_config_dma
	leaq	-80(%rbp), %rsi
	movq	%r15, %rdi
	callq	_hdmi_wp_audio_config_format
	leaq	-104(%rbp), %rsi
	movq	%r14, %rdi
	callq	_hdmi5_core_audio_config
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_hdmi5_core_audio_infoframe_cfg
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEC958_AES4_CON_MAX_WORDLEN_24,4,2 ## @IEC958_AES4_CON_MAX_WORDLEN_24
	.comm	_IEC958_AES4_CON_WORDLEN_20_16,4,2 ## @IEC958_AES4_CON_WORDLEN_20_16
	.comm	_IEC958_AES3_CON_FS,4,2         ## @IEC958_AES3_CON_FS
	.comm	_CEA861_AUDIO_INFOFRAME_DB1CC,4,2 ## @CEA861_AUDIO_INFOFRAME_DB1CC
	.comm	_HDMI_AUDIO_LAYOUT_2CH,4,2      ## @HDMI_AUDIO_LAYOUT_2CH
	.comm	_HDMI_AUDIO_LAYOUT_6CH,4,2      ## @HDMI_AUDIO_LAYOUT_6CH
	.comm	_HDMI_AUDIO_LAYOUT_8CH,4,2      ## @HDMI_AUDIO_LAYOUT_8CH
	.comm	_HDMI_AUDIO_TRANSF_DMA,4,2      ## @HDMI_AUDIO_TRANSF_DMA
	.comm	_HDMI_AUDIO_ONEWORD_TWOSAMPLES,4,2 ## @HDMI_AUDIO_ONEWORD_TWOSAMPLES
	.comm	_HDMI_AUDIO_SAMPLE_16BITS,4,2   ## @HDMI_AUDIO_SAMPLE_16BITS
	.comm	_HDMI_AUDIO_JUSTIFY_LEFT,4,2    ## @HDMI_AUDIO_JUSTIFY_LEFT
	.comm	_HDMI_AUDIO_SAMPLE_LEFT_FIRST,8,3 ## @HDMI_AUDIO_SAMPLE_LEFT_FIRST
	.comm	_HDMI_AUDIO_TYPE_LPCM,4,2       ## @HDMI_AUDIO_TYPE_LPCM
	.comm	_HDMI_AUDIO_BLOCK_SIG_STARTEND_ON,4,2 ## @HDMI_AUDIO_BLOCK_SIG_STARTEND_ON
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.hdmi5_audio_config
l_switch.table.hdmi5_audio_config:
	.long	96000                           ## 0x17700
	.long	88200                           ## 0x15888
	.long	48000                           ## 0xbb80
	.long	44100                           ## 0xac44
	.long	32000                           ## 0x7d00
	.long	192000                          ## 0x2ee00
	.long	176400                          ## 0x2b110

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function hdmi5_audio_config
lCPI0_0:
	.long	16                              ; 0x10
	.long	192                             ; 0xc0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_hdmi5_audio_config
	.p2align	2
_hdmi5_audio_config:                    ; @hdmi5_audio_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	cbz	x2, LBB0_5
; %bb.1:
	mov	x20, x2
	ldr	x9, [x2, #8]
	cbz	x9, LBB0_5
; %bb.2:
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x10, [x20]
	cbz	x10, LBB0_5
; %bb.4:
	str	x9, [sp, #24]
	ldr	x9, [x9]
	ldr	w10, [x9, #16]
Lloh0:
	adrp	x11, _IEC958_AES4_CON_MAX_WORDLEN_24@GOTPAGE
Lloh1:
	ldr	x11, [x11, _IEC958_AES4_CON_MAX_WORDLEN_24@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_7
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
Lloh6:
	adrp	x11, _IEC958_AES4_CON_WORDLEN_20_16@GOTPAGE
Lloh7:
	ldr	x11, [x11, _IEC958_AES4_CON_WORDLEN_20_16@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_5
; %bb.8:
	ldr	w9, [x9, #12]
Lloh9:
	adrp	x10, _IEC958_AES3_CON_FS@GOTPAGE
Lloh10:
	ldr	x10, [x10, _IEC958_AES3_CON_FS@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w9, w10, w9
	sub	w9, w9, #128
	cmp	w9, #7
	b.hs	LBB0_5
; %bb.9:
	mov	x8, x3
	mov	x21, x1
Lloh12:
	adrp	x10, l_switch.table.hdmi5_audio_config@PAGE
Lloh13:
	add	x10, x10, l_switch.table.hdmi5_audio_config@PAGEOFF
	ldr	w1, [x10, w9, sxtw #2]
	add	x2, sp, #4
	mov	x3, sp
	mov	x0, x8
	bl	_hdmi_compute_acr
	ldp	w9, w8, [sp]
	stp	w8, w9, [sp, #8]
	ldr	x8, [x20]
Lloh14:
	adrp	x9, _CEA861_AUDIO_INFOFRAME_DB1CC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CEA861_AUDIO_INFOFRAME_DB1CC@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _HDMI_AUDIO_LAYOUT_2CH@GOTPAGE
Lloh18:
	ldr	x10, [x10, _HDMI_AUDIO_LAYOUT_2CH@GOTPAGEOFF]
Lloh19:
	adrp	x11, _HDMI_AUDIO_LAYOUT_6CH@GOTPAGE
Lloh20:
	ldr	x11, [x11, _HDMI_AUDIO_LAYOUT_6CH@GOTPAGEOFF]
	and	w8, w9, w8
Lloh21:
	adrp	x9, _HDMI_AUDIO_LAYOUT_8CH@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HDMI_AUDIO_LAYOUT_8CH@GOTPAGEOFF]
	cmp	w8, #5
	csel	x9, x11, x9, eq
	cmp	w8, #1
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh23:
	adrp	x8, lCPI0_0@PAGE
Lloh24:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #32]
Lloh25:
	adrp	x8, _HDMI_AUDIO_TRANSF_DMA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HDMI_AUDIO_TRANSF_DMA@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	mov	w9, #32
	stp	w9, w8, [sp, #40]
Lloh28:
	adrp	x8, _HDMI_AUDIO_ONEWORD_TWOSAMPLES@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HDMI_AUDIO_ONEWORD_TWOSAMPLES@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _HDMI_AUDIO_SAMPLE_16BITS@GOTPAGE
Lloh32:
	ldr	x9, [x9, _HDMI_AUDIO_SAMPLE_16BITS@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #72]
Lloh34:
	adrp	x8, _HDMI_AUDIO_JUSTIFY_LEFT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _HDMI_AUDIO_JUSTIFY_LEFT@GOTPAGEOFF]
Lloh36:
	adrp	x9, _HDMI_AUDIO_SAMPLE_LEFT_FIRST@GOTPAGE
Lloh37:
	ldr	x9, [x9, _HDMI_AUDIO_SAMPLE_LEFT_FIRST@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	ldr	x9, [x9]
Lloh40:
	adrp	x10, _HDMI_AUDIO_TYPE_LPCM@GOTPAGE
Lloh41:
	ldr	x10, [x10, _HDMI_AUDIO_TYPE_LPCM@GOTPAGEOFF]
Lloh42:
	ldr	w10, [x10]
	stp	w10, w8, [sp, #64]
	str	x9, [sp, #56]
Lloh43:
	adrp	x8, _HDMI_AUDIO_BLOCK_SIG_STARTEND_ON@GOTPAGE
Lloh44:
	ldr	x8, [x8, _HDMI_AUDIO_BLOCK_SIG_STARTEND_ON@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	str	w8, [sp, #48]
	add	x1, sp, #32
	mov	x0, x21
	bl	_hdmi_wp_audio_config_dma
	add	x1, sp, #48
	mov	x0, x21
	bl	_hdmi_wp_audio_config_format
	add	x1, sp, #8
	mov	x0, x19
	bl	_hdmi5_core_audio_config
	ldr	x1, [x20]
	mov	x0, x19
	bl	_hdmi5_core_audio_infoframe_cfg
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh38
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdrp	Lloh23, Lloh25
	.loh AdrpLdr	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEC958_AES4_CON_MAX_WORDLEN_24,4,2 ; @IEC958_AES4_CON_MAX_WORDLEN_24
	.comm	_IEC958_AES4_CON_WORDLEN_20_16,4,2 ; @IEC958_AES4_CON_WORDLEN_20_16
	.comm	_IEC958_AES3_CON_FS,4,2         ; @IEC958_AES3_CON_FS
	.comm	_CEA861_AUDIO_INFOFRAME_DB1CC,4,2 ; @CEA861_AUDIO_INFOFRAME_DB1CC
	.comm	_HDMI_AUDIO_LAYOUT_2CH,4,2      ; @HDMI_AUDIO_LAYOUT_2CH
	.comm	_HDMI_AUDIO_LAYOUT_6CH,4,2      ; @HDMI_AUDIO_LAYOUT_6CH
	.comm	_HDMI_AUDIO_LAYOUT_8CH,4,2      ; @HDMI_AUDIO_LAYOUT_8CH
	.comm	_HDMI_AUDIO_TRANSF_DMA,4,2      ; @HDMI_AUDIO_TRANSF_DMA
	.comm	_HDMI_AUDIO_ONEWORD_TWOSAMPLES,4,2 ; @HDMI_AUDIO_ONEWORD_TWOSAMPLES
	.comm	_HDMI_AUDIO_SAMPLE_16BITS,4,2   ; @HDMI_AUDIO_SAMPLE_16BITS
	.comm	_HDMI_AUDIO_JUSTIFY_LEFT,4,2    ; @HDMI_AUDIO_JUSTIFY_LEFT
	.comm	_HDMI_AUDIO_SAMPLE_LEFT_FIRST,8,3 ; @HDMI_AUDIO_SAMPLE_LEFT_FIRST
	.comm	_HDMI_AUDIO_TYPE_LPCM,4,2       ; @HDMI_AUDIO_TYPE_LPCM
	.comm	_HDMI_AUDIO_BLOCK_SIG_STARTEND_ON,4,2 ; @HDMI_AUDIO_BLOCK_SIG_STARTEND_ON
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.hdmi5_audio_config
l_switch.table.hdmi5_audio_config:
	.long	96000                           ; 0x17700
	.long	88200                           ; 0x15888
	.long	48000                           ; 0xbb80
	.long	44100                           ; 0xac44
	.long	32000                           ; 0x7d00
	.long	192000                          ; 0x2ee00
	.long	176400                          ; 0x2b110

.subsections_via_symbols
