	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_hda_calc_stream_format     ## -- Begin function snd_hda_calc_stream_format
	.p2align	4, 0x90
_snd_hda_calc_stream_format:            ## @snd_hda_calc_stream_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movl	%edi, %esi
	movq	_rate_bits@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	je	LBB0_4
## %bb.1:
	movl	%r8d, %r14d
	movl	%ecx, %r15d
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, %edx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rax,%rcx,8), %edx
	incq	%rcx
	testl	%edx, %edx
	jne	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rdi
LBB0_5:
	callq	_snd_printdd
	xorl	%ebx, %ebx
LBB0_20:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leal	-9(%rbx), %edx
	cmpl	$-9, %edx
	ja	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	jmp	LBB0_5
LBB0_8:
	movl	%ecx, %ecx
	decl	%ebx
	orl	4(%rax,%rcx,8), %ebx
	movl	%r12d, %edi
	callq	_snd_pcm_format_width
                                        ## kill: def $eax killed $eax def $rax
	addl	$-8, %eax
	roll	$30, %eax
	cmpl	$6, %eax
	ja	LBB0_15
## %bb.9:
	movq	_AC_FMT_BITS_8@GOTPCREL(%rip), %rcx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	jmpq	*%rax
LBB0_10:
	movq	_AC_FMT_BITS_32@GOTPCREL(%rip), %rcx
	cmpl	$31, %r15d
	ja	LBB0_17
## %bb.11:
	movq	_SNDRV_PCM_FORMAT_FLOAT_LE@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_17
## %bb.12:
	cmpl	$24, %r15d
	jb	LBB0_13
## %bb.14:
	movq	_AC_FMT_BITS_24@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_15:
	movl	%r12d, %edi
	callq	_snd_pcm_format_width
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	jmp	LBB0_5
LBB0_16:
	movq	_AC_FMT_BITS_16@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_13:
	movq	_AC_FMT_BITS_20@GOTPCREL(%rip), %rcx
LBB0_17:
	orl	(%rcx), %ebx
	movq	_AC_DIG1_NONAUDIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	testw	%r14w, (%rcx)
	je	LBB0_19
## %bb.18:
	movq	_AC_FMT_TYPE_NON_PCM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_19:
	orl	%eax, %ebx
	jmp	LBB0_20
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_17
	.long	L0_0_set_15
	.long	L0_0_set_16
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_15
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_rate_bits,8,3                  ## @rate_bits
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid rate %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid channels %d\n"

	.comm	_AC_FMT_BITS_8,4,2              ## @AC_FMT_BITS_8
	.comm	_AC_FMT_BITS_16,4,2             ## @AC_FMT_BITS_16
	.comm	_SNDRV_PCM_FORMAT_FLOAT_LE,4,2  ## @SNDRV_PCM_FORMAT_FLOAT_LE
	.comm	_AC_FMT_BITS_32,4,2             ## @AC_FMT_BITS_32
	.comm	_AC_FMT_BITS_24,4,2             ## @AC_FMT_BITS_24
	.comm	_AC_FMT_BITS_20,4,2             ## @AC_FMT_BITS_20
L_.str.2:                               ## @.str.2
	.asciz	"invalid format width %d\n"

	.comm	_AC_DIG1_NONAUDIO,2,1           ## @AC_DIG1_NONAUDIO
	.comm	_AC_FMT_TYPE_NON_PCM,4,2        ## @AC_FMT_TYPE_NON_PCM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_hda_calc_stream_format     ; -- Begin function snd_hda_calc_stream_format
	.p2align	2
_snd_hda_calc_stream_format:            ; @snd_hda_calc_stream_format
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x1, x0
Lloh0:
	adrp	x8, _rate_bits@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rate_bits@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w11, [x8]
	cbz	w11, LBB0_4
; %bb.1:
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x9, #0
	add	x10, x8, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w11, w1
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	ldr	w11, [x10], #8
	cbnz	w11, LBB0_2
LBB0_4:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
LBB0_5:
	bl	_snd_printdd
	mov	w0, #0
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	sub	w10, w20, #9
	cmn	w10, #9
	b.hi	LBB0_9
; %bb.8:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	b	LBB0_5
LBB0_9:
	add	x8, x8, w9, uxtw #3
	ldr	w23, [x8, #4]
	mov	x0, x22
	bl	_snd_pcm_format_width
	sub	w8, w0, #8
	ror	w9, w8, #2
	cmp	w9, #6
	b.hi	LBB0_12
; %bb.10:
Lloh7:
	adrp	x8, _AC_FMT_BITS_8@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AC_FMT_BITS_8@GOTPAGEOFF]
Lloh9:
	adrp	x10, lJTI0_0@PAGE
Lloh10:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_11
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_11:
Lloh11:
	adrp	x8, _SNDRV_PCM_FORMAT_FLOAT_LE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SNDRV_PCM_FORMAT_FLOAT_LE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _AC_FMT_BITS_32@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AC_FMT_BITS_32@GOTPAGEOFF]
Lloh16:
	adrp	x10, _AC_FMT_BITS_20@GOTPAGE
Lloh17:
	ldr	x10, [x10, _AC_FMT_BITS_20@GOTPAGEOFF]
Lloh18:
	adrp	x11, _AC_FMT_BITS_24@GOTPAGE
Lloh19:
	ldr	x11, [x11, _AC_FMT_BITS_24@GOTPAGEOFF]
	cmp	w21, #23
	csel	x10, x11, x10, hi
	cmp	w8, w22
	csel	x8, x9, x10, eq
	cmp	w21, #31
	csel	x8, x9, x8, hi
	b	LBB0_14
LBB0_12:
	mov	x0, x22
	bl	_snd_pcm_format_width
	mov	x1, x0
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_13:
Lloh22:
	adrp	x8, _AC_FMT_BITS_16@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AC_FMT_BITS_16@GOTPAGEOFF]
LBB0_14:
	sub	w9, w20, #1
	orr	w9, w23, w9
	ldr	w8, [x8]
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _AC_DIG1_NONAUDIO@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AC_DIG1_NONAUDIO@GOTPAGEOFF]
	ldrh	w9, [x9]
Lloh26:
	adrp	x10, _AC_FMT_TYPE_NON_PCM@GOTPAGE
Lloh27:
	ldr	x10, [x10, _AC_FMT_TYPE_NON_PCM@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	tst	w9, w19
	csel	w9, wzr, w10, eq
	orr	w0, w8, w9
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_14-LBB0_11)>>2
	.byte	(LBB0_12-LBB0_11)>>2
	.byte	(LBB0_13-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_12-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
                                        ; -- End function
	.comm	_rate_bits,8,3                  ; @rate_bits
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid rate %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid channels %d\n"

	.comm	_AC_FMT_BITS_8,4,2              ; @AC_FMT_BITS_8
	.comm	_AC_FMT_BITS_16,4,2             ; @AC_FMT_BITS_16
	.comm	_SNDRV_PCM_FORMAT_FLOAT_LE,4,2  ; @SNDRV_PCM_FORMAT_FLOAT_LE
	.comm	_AC_FMT_BITS_32,4,2             ; @AC_FMT_BITS_32
	.comm	_AC_FMT_BITS_24,4,2             ; @AC_FMT_BITS_24
	.comm	_AC_FMT_BITS_20,4,2             ; @AC_FMT_BITS_20
l_.str.2:                               ; @.str.2
	.asciz	"invalid format width %d\n"

	.comm	_AC_DIG1_NONAUDIO,2,1           ; @AC_DIG1_NONAUDIO
	.comm	_AC_FMT_TYPE_NON_PCM,4,2        ; @AC_FMT_TYPE_NON_PCM
.subsections_via_symbols
