	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_hda_parse_format         ## -- Begin function tegra_hda_parse_format
	.p2align	4, 0x90
_tegra_hda_parse_format:                ## @tegra_hda_parse_format
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_AC_FMT_TYPE_NON_PCM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%edi, %eax
	sete	%cl
	movl	%ecx, (%rsi)
	movq	_AC_FMT_BASE_44K@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	movl	$48000, %eax                    ## imm = 0xBB80
	movl	$44100, %esi                    ## imm = 0xAC44
	cmovel	%eax, %esi
	movq	_AC_FMT_MULT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	movq	_AC_FMT_MULT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrl	%cl, %eax
	movq	_AC_FMT_DIV_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	%ebx, %edi
	movq	_AC_FMT_DIV_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrl	%cl, %edi
	incl	%eax
	incl	%edi
	xorl	%edx, %edx
	divl	%edi
	imull	%esi, %eax
	movl	%eax, 4(%r14)
	movq	_AC_FMT_BITS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%ebx, %edx
	leal	-128(%rdx), %eax
	cmpl	$5, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.tegra_hda_parse_format(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	jmp	LBB0_3
LBB0_1:
	movq	_AC_FMT_BITS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_WARN
	movl	$8, %eax
LBB0_3:
	movl	%eax, 8(%r14)
	movq	_AC_FMT_CHAN_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_AC_FMT_CHAN_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %ebx
	incl	%ebx
	movl	%ebx, 12(%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC_FMT_TYPE_NON_PCM,4,2        ## @AC_FMT_TYPE_NON_PCM
	.comm	_AC_FMT_BASE_44K,4,2            ## @AC_FMT_BASE_44K
	.comm	_AC_FMT_MULT_MASK,4,2           ## @AC_FMT_MULT_MASK
	.comm	_AC_FMT_MULT_SHIFT,4,2          ## @AC_FMT_MULT_SHIFT
	.comm	_AC_FMT_DIV_MASK,4,2            ## @AC_FMT_DIV_MASK
	.comm	_AC_FMT_DIV_SHIFT,4,2           ## @AC_FMT_DIV_SHIFT
	.comm	_AC_FMT_BITS_MASK,4,2           ## @AC_FMT_BITS_MASK
	.comm	_AC_FMT_BITS_SHIFT,4,2          ## @AC_FMT_BITS_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid number of bits: %#x\n"

	.comm	_AC_FMT_CHAN_MASK,4,2           ## @AC_FMT_CHAN_MASK
	.comm	_AC_FMT_CHAN_SHIFT,4,2          ## @AC_FMT_CHAN_SHIFT
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.tegra_hda_parse_format
l_switch.table.tegra_hda_parse_format:
	.long	8                               ## 0x8
	.long	32                              ## 0x20
	.long	24                              ## 0x18
	.long	20                              ## 0x14
	.long	16                              ## 0x10

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_hda_parse_format         ; -- Begin function tegra_hda_parse_format
	.p2align	2
_tegra_hda_parse_format:                ; @tegra_hda_parse_format
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _AC_FMT_TYPE_NON_PCM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC_FMT_TYPE_NON_PCM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, eq
	str	w8, [x1]
Lloh3:
	adrp	x8, _AC_FMT_BASE_44K@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC_FMT_BASE_44K@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	mov	w8, #44100
	mov	w9, #48000
	csel	w8, w9, w8, eq
Lloh6:
	adrp	x9, _AC_FMT_MULT_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AC_FMT_MULT_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w0
Lloh9:
	adrp	x10, _AC_FMT_MULT_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AC_FMT_MULT_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _AC_FMT_DIV_MASK@GOTPAGE
Lloh13:
	ldr	x11, [x11, _AC_FMT_DIV_MASK@GOTPAGEOFF]
	lsr	w9, w9, w10
Lloh14:
	ldr	w10, [x11]
	and	w10, w10, w0
Lloh15:
	adrp	x11, _AC_FMT_DIV_SHIFT@GOTPAGE
Lloh16:
	ldr	x11, [x11, _AC_FMT_DIV_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	lsr	w10, w10, w11
	add	w9, w9, #1
	add	w10, w10, #1
	udiv	w9, w9, w10
	mul	w8, w8, w9
	str	w8, [x1, #4]
Lloh18:
	adrp	x8, _AC_FMT_BITS_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AC_FMT_BITS_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w9, w8, #128
	cmp	w9, #5
	b.hs	LBB0_2
; %bb.1:
Lloh21:
	adrp	x8, l_switch.table.tegra_hda_parse_format@PAGE
Lloh22:
	add	x8, x8, l_switch.table.tegra_hda_parse_format@PAGEOFF
	ldr	w8, [x8, w9, sxtw #2]
	b	LBB0_3
LBB0_2:
Lloh23:
	adrp	x9, _AC_FMT_BITS_SHIFT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AC_FMT_BITS_SHIFT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	lsr	w2, w8, w9
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
	mov	w8, #8
LBB0_3:
Lloh28:
	adrp	x9, _AC_FMT_CHAN_MASK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _AC_FMT_CHAN_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
Lloh31:
	adrp	x10, _AC_FMT_CHAN_SHIFT@GOTPAGE
Lloh32:
	ldr	x10, [x10, _AC_FMT_CHAN_SHIFT@GOTPAGEOFF]
	and	w9, w9, w20
Lloh33:
	ldr	w10, [x10]
	lsr	w9, w9, w10
	add	w9, w9, #1
	stp	w8, w9, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_AC_FMT_TYPE_NON_PCM,4,2        ; @AC_FMT_TYPE_NON_PCM
	.comm	_AC_FMT_BASE_44K,4,2            ; @AC_FMT_BASE_44K
	.comm	_AC_FMT_MULT_MASK,4,2           ; @AC_FMT_MULT_MASK
	.comm	_AC_FMT_MULT_SHIFT,4,2          ; @AC_FMT_MULT_SHIFT
	.comm	_AC_FMT_DIV_MASK,4,2            ; @AC_FMT_DIV_MASK
	.comm	_AC_FMT_DIV_SHIFT,4,2           ; @AC_FMT_DIV_SHIFT
	.comm	_AC_FMT_BITS_MASK,4,2           ; @AC_FMT_BITS_MASK
	.comm	_AC_FMT_BITS_SHIFT,4,2          ; @AC_FMT_BITS_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid number of bits: %#x\n"

	.comm	_AC_FMT_CHAN_MASK,4,2           ; @AC_FMT_CHAN_MASK
	.comm	_AC_FMT_CHAN_SHIFT,4,2          ; @AC_FMT_CHAN_SHIFT
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.tegra_hda_parse_format
l_switch.table.tegra_hda_parse_format:
	.long	8                               ; 0x8
	.long	32                              ; 0x20
	.long	24                              ; 0x18
	.long	20                              ; 0x14
	.long	16                              ; 0x10

.subsections_via_symbols
