	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_hdmi_audio_hw_params
_zx_hdmi_audio_hw_params:               ## @zx_hdmi_audio_hw_params
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movl	(%rbx), %edx
	movq	_HDMI_SPDIF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_1
## %bb.3:
	movl	(%r15), %edx
	cmpl	$16, %edx
	je	LBB0_4
## %bb.5:
	cmpl	$24, %edx
	je	LBB0_9
## %bb.6:
	cmpl	$20, %edx
	jne	LBB0_8
## %bb.7:
	movq	_SPDIF_SAMPLE_SIZE_20BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
LBB0_2:
	callq	_DRM_DEV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_4:
	movq	_SPDIF_SAMPLE_SIZE_16BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_SPDIF_SAMPLE_SIZE_24BIT@GOTPCREL(%rip), %rax
LBB0_10:
	leaq	8(%r15), %r14
	movq	_TPI_AUD_CONFIG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_SPDIF_SAMPLE_SIZE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %ecx
	movq	%r12, %rdi
	callq	_hdmi_writeb_mask
	movl	4(%r15), %edi
	callq	_zx_hdmi_audio_get_n
	movl	%eax, %ebx
	movq	_N_SVAL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r12, %rdi
	callq	_hdmi_writeb
	movq	_N_SVAL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bh, %edx
	movq	%r12, %rdi
	callq	_hdmi_writeb
	movq	_N_SVAL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shrl	$16, %ebx
	andl	$15, %ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_hdmi_writeb
	movq	_AUD_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SPDIF_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%ecx, %edx
	callq	_hdmi_writeb_mask
	movq	_AUD_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AUD_IN_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%ecx, %edx
	callq	_hdmi_writeb_mask
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_FSEL_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_zx_hdmi_infoframe_trans
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_SPDIF,4,2                 ## @HDMI_SPDIF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid daifmt %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TPI_AUD_CONFIG,4,2             ## @TPI_AUD_CONFIG
	.comm	_SPDIF_SAMPLE_SIZE_MASK,4,2     ## @SPDIF_SAMPLE_SIZE_MASK
	.comm	_SPDIF_SAMPLE_SIZE_16BIT,4,2    ## @SPDIF_SAMPLE_SIZE_16BIT
	.comm	_SPDIF_SAMPLE_SIZE_20BIT,4,2    ## @SPDIF_SAMPLE_SIZE_20BIT
	.comm	_SPDIF_SAMPLE_SIZE_24BIT,4,2    ## @SPDIF_SAMPLE_SIZE_24BIT
L_.str.1:                               ## @.str.1
	.asciz	"invalid sample width %d\n"

	.comm	_N_SVAL1,4,2                    ## @N_SVAL1
	.comm	_N_SVAL2,4,2                    ## @N_SVAL2
	.comm	_N_SVAL3,4,2                    ## @N_SVAL3
	.comm	_AUD_MODE,4,2                   ## @AUD_MODE
	.comm	_SPDIF_EN,4,2                   ## @SPDIF_EN
	.comm	_AUD_EN,4,2                     ## @AUD_EN
	.comm	_AUD_IN_EN,4,2                  ## @AUD_IN_EN
	.comm	_FSEL_AUDIO,4,2                 ## @FSEL_AUDIO
	.no_dead_strip	_zx_hdmi_audio_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_hdmi_audio_hw_params
_zx_hdmi_audio_hw_params:               ; @zx_hdmi_audio_hw_params
	.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	x21, x3
	mov	x20, x2
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	w2, [x20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ldr	w2, [x9]
	ldr	w3, [x8]
	mov	x0, x19
	bl	_hdmi_writeb_mask
	ldr	w0, [x21, #4]
	bl	_zx_hdmi_audio_get_n
	mov	x21, x0
Lloh20:
	adrp	x8, _N_SVAL1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _N_SVAL1@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	and	w2, w0, #0xff
	mov	x0, x19
	bl	_hdmi_writeb
Lloh23:
	adrp	x8, _N_SVAL2@GOTPAGE
Lloh24:
	ldr	x8, [x8, _N_SVAL2@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ubfx	w2, w21, #8, #8
	mov	x0, x19
	bl	_hdmi_writeb
Lloh26:
	adrp	x8, _N_SVAL3@GOTPAGE
Lloh27:
	ldr	x8, [x8, _N_SVAL3@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ubfx	w2, w21, #16, #4
	mov	x0, x19
	bl	_hdmi_writeb
Lloh29:
	adrp	x8, _AUD_MODE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AUD_MODE@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _SPDIF_EN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SPDIF_EN@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_hdmi_writeb_mask
Lloh35:
	adrp	x8, _AUD_EN@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AUD_EN@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x8, _AUD_IN_EN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AUD_IN_EN@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_hdmi_writeb_mask
	add	x0, sp, #8
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
Lloh41:
	adrp	x8, _FSEL_AUDIO@GOTPAGE
Lloh42:
	ldr	x8, [x8, _FSEL_AUDIO@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_zx_hdmi_infoframe_trans
LBB0_10:
	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
LBB0_11:
	ldr	w0, [x19]
Lloh44:
	adrp	x1, l_.str.1@PAGE
Lloh45:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.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 AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_SPDIF,4,2                 ; @HDMI_SPDIF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid daifmt %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TPI_AUD_CONFIG,4,2             ; @TPI_AUD_CONFIG
	.comm	_SPDIF_SAMPLE_SIZE_MASK,4,2     ; @SPDIF_SAMPLE_SIZE_MASK
	.comm	_SPDIF_SAMPLE_SIZE_16BIT,4,2    ; @SPDIF_SAMPLE_SIZE_16BIT
	.comm	_SPDIF_SAMPLE_SIZE_20BIT,4,2    ; @SPDIF_SAMPLE_SIZE_20BIT
	.comm	_SPDIF_SAMPLE_SIZE_24BIT,4,2    ; @SPDIF_SAMPLE_SIZE_24BIT
l_.str.1:                               ; @.str.1
	.asciz	"invalid sample width %d\n"

	.comm	_N_SVAL1,4,2                    ; @N_SVAL1
	.comm	_N_SVAL2,4,2                    ; @N_SVAL2
	.comm	_N_SVAL3,4,2                    ; @N_SVAL3
	.comm	_AUD_MODE,4,2                   ; @AUD_MODE
	.comm	_SPDIF_EN,4,2                   ; @SPDIF_EN
	.comm	_AUD_EN,4,2                     ; @AUD_EN
	.comm	_AUD_IN_EN,4,2                  ; @AUD_IN_EN
	.comm	_FSEL_AUDIO,4,2                 ; @FSEL_AUDIO
	.no_dead_strip	_zx_hdmi_audio_hw_params
.subsections_via_symbols
