	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_spdif_bits
_encode_spdif_bits:                     ## @encode_spdif_bits
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %r9
	movl	(%r9), %ecx
	movl	%ecx, %esi
	andl	$3, %esi
	testb	$1, %cl
	jne	LBB0_1
## %bb.11:
	movl	4(%r9), %edi
	movl	%edi, %eax
	andl	$4, %eax
	movq	_IEC958_AES0_CON_EMPHASIS@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	leal	(%rax,%rsi), %r8d
	movq	_IEC958_AES0_CON_EMPHASIS_5015@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	leal	8(%rax,%rsi), %eax
	cmovnel	%r8d, %eax
	andl	$63, %edi
	shll	$4, %edi
	orl	%eax, %edi
	movq	_IEC958_AES3_CON_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	12(%r9), %eax
	shll	$12, %eax
	orl	%edi, %eax
LBB0_12:
	popq	%rbp
	retq
LBB0_1:
	movq	_IEC958_AES0_PRO_EMPHASIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%ecx, %edi
	movq	_IEC958_AES0_PRO_EMPHASIS_5015@GOTPCREL(%rip), %r8
	leal	8(%rsi), %eax
	cmpl	(%r8), %edi
	cmovnel	%esi, %eax
	movl	16(%r9), %edx
	shrl	$3, %edx
	andl	$15, %edx
	cmpl	$11, %edx
	ja	LBB0_12
## %bb.2:
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_7:
	movq	_IEC958_AES0_PRO_FS@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	cmpl	$128, %ecx
	je	LBB0_12
## %bb.8:
	cmpl	$129, %ecx
	jne	LBB0_10
## %bb.9:
	orl	$12288, %eax                    ## imm = 0x3000
	popq	%rbp
	retq
LBB0_3:
	orl	$20480, %eax                    ## imm = 0x5000
	popq	%rbp
	retq
LBB0_4:
	orl	$24576, %eax                    ## imm = 0x6000
	popq	%rbp
	retq
LBB0_5:
	orl	$16384, %eax                    ## imm = 0x4000
	popq	%rbp
	retq
LBB0_6:
	orl	$28672, %eax                    ## imm = 0x7000
	popq	%rbp
	retq
LBB0_10:
	orl	$8192, %eax                     ## imm = 0x2000
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_12
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_5
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_IEC958_AES0_PRO_EMPHASIS,4,2   ## @IEC958_AES0_PRO_EMPHASIS
	.comm	_IEC958_AES0_PRO_EMPHASIS_5015,4,2 ## @IEC958_AES0_PRO_EMPHASIS_5015
	.comm	_IEC958_AES0_PRO_FS,4,2         ## @IEC958_AES0_PRO_FS
	.comm	_IEC958_AES0_CON_EMPHASIS,4,2   ## @IEC958_AES0_CON_EMPHASIS
	.comm	_IEC958_AES0_CON_EMPHASIS_5015,4,2 ## @IEC958_AES0_CON_EMPHASIS_5015
	.comm	_IEC958_AES3_CON_FS,4,2         ## @IEC958_AES3_CON_FS
	.no_dead_strip	_encode_spdif_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_spdif_bits
_encode_spdif_bits:                     ; @encode_spdif_bits
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0]
	ldr	w8, [x9]
	and	w10, w8, #0x3
	tbnz	w8, #0, LBB0_3
; %bb.1:
	ldr	w11, [x9, #4]
	and	w12, w11, #0x4
	orr	w10, w12, w10
Lloh0:
	adrp	x12, _IEC958_AES0_CON_EMPHASIS@GOTPAGE
Lloh1:
	ldr	x12, [x12, _IEC958_AES0_CON_EMPHASIS@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x12]
Lloh3:
	adrp	x13, _IEC958_AES0_CON_EMPHASIS_5015@GOTPAGE
Lloh4:
	ldr	x13, [x13, _IEC958_AES0_CON_EMPHASIS_5015@GOTPAGEOFF]
	and	w8, w12, w8
Lloh5:
	ldr	w12, [x13]
	orr	w13, w10, #0x8
	cmp	w8, w12
	csel	w0, w13, w10, eq
	bfi	w0, w11, #4, #6
	ldr	w8, [x9, #12]
Lloh6:
	adrp	x9, _IEC958_AES3_CON_FS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IEC958_AES3_CON_FS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
	bfi	w0, w8, #12, #20
LBB0_2:
	ret
LBB0_3:
Lloh9:
	adrp	x11, _IEC958_AES0_PRO_EMPHASIS@GOTPAGE
Lloh10:
	ldr	x11, [x11, _IEC958_AES0_PRO_EMPHASIS@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	and	w11, w11, w8
Lloh12:
	adrp	x12, _IEC958_AES0_PRO_EMPHASIS_5015@GOTPAGE
Lloh13:
	ldr	x12, [x12, _IEC958_AES0_PRO_EMPHASIS_5015@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	orr	w13, w10, #0x8
	cmp	w11, w12
	csel	w0, w13, w10, eq
	ldr	w9, [x9, #16]
	ubfx	w9, w9, #3, #4
	cmp	w9, #11
	b.hi	LBB0_2
; %bb.4:
Lloh15:
	adrp	x10, lJTI0_0@PAGE
Lloh16:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_5:
Lloh17:
	adrp	x9, _IEC958_AES0_PRO_FS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IEC958_AES0_PRO_FS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	and	w8, w9, w8
	orr	w9, w0, #0x2000
	orr	w10, w0, #0x3000
	cmp	w8, #129
	csel	w9, w9, w10, ne
	cmp	w8, #128
	csel	w0, w0, w9, eq
	ret
LBB0_6:
	mov	w8, #20480
	orr	w0, w0, w8
	ret
LBB0_7:
	orr	w0, w0, #0x6000
	ret
LBB0_8:
	orr	w0, w0, #0x4000
	ret
LBB0_9:
	orr	w0, w0, #0x7000
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
                                        ; -- End function
	.comm	_IEC958_AES0_PRO_EMPHASIS,4,2   ; @IEC958_AES0_PRO_EMPHASIS
	.comm	_IEC958_AES0_PRO_EMPHASIS_5015,4,2 ; @IEC958_AES0_PRO_EMPHASIS_5015
	.comm	_IEC958_AES0_PRO_FS,4,2         ; @IEC958_AES0_PRO_FS
	.comm	_IEC958_AES0_CON_EMPHASIS,4,2   ; @IEC958_AES0_CON_EMPHASIS
	.comm	_IEC958_AES0_CON_EMPHASIS_5015,4,2 ; @IEC958_AES0_CON_EMPHASIS_5015
	.comm	_IEC958_AES3_CON_FS,4,2         ; @IEC958_AES3_CON_FS
	.no_dead_strip	_encode_spdif_bits
.subsections_via_symbols
