	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_spdif_bits
_set_spdif_bits:                        ## @set_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	_E3G_SPDIF_FORMAT_CLEAR_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	cmpl	$48000, %edx                    ## imm = 0xBB80
	je	LBB0_6
## %bb.1:
	cmpl	$44100, %edx                    ## imm = 0xAC44
	je	LBB0_4
## %bb.2:
	cmpl	$32000, %edx                    ## imm = 0x7D00
	jne	LBB0_8
## %bb.3:
	movq	_E3G_SPDIF_SAMPLE_RATE0@GOTPCREL(%rip), %rax
	movq	_E3G_SPDIF_SAMPLE_RATE1@GOTPCREL(%rip), %rcx
	orl	(%rax), %esi
	orl	(%rcx), %esi
	jmp	LBB0_8
LBB0_6:
	movq	_E3G_SPDIF_SAMPLE_RATE1@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	cmpq	$0, 8(%rdi)
	je	LBB0_8
## %bb.5:
	movq	_E3G_SPDIF_SAMPLE_RATE0@GOTPCREL(%rip), %rax
LBB0_7:
	orl	(%rax), %esi
LBB0_8:
	xorl	%ecx, %ecx
	cmpq	$0, 8(%rdi)
	movl	$0, %eax
	je	LBB0_10
## %bb.9:
	movq	_E3G_SPDIF_PRO_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	cmpq	$0, (%rdi)
	je	LBB0_12
## %bb.11:
	movq	_E3G_SPDIF_NOT_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_12:
	movq	_E3G_SPDIF_24_BIT@GOTPCREL(%rip), %rdx
	movq	_E3G_SPDIF_TWO_CHANNEL@GOTPCREL(%rip), %rdi
	movq	_E3G_SPDIF_COPY_PERMIT@GOTPCREL(%rip), %r8
	orl	%esi, %eax
	orl	%ecx, %eax
	orl	(%rdx), %eax
	orl	(%rdi), %eax
	orl	(%r8), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E3G_SPDIF_FORMAT_CLEAR_MASK,4,2 ## @E3G_SPDIF_FORMAT_CLEAR_MASK
	.comm	_E3G_SPDIF_SAMPLE_RATE0,4,2     ## @E3G_SPDIF_SAMPLE_RATE0
	.comm	_E3G_SPDIF_SAMPLE_RATE1,4,2     ## @E3G_SPDIF_SAMPLE_RATE1
	.comm	_E3G_SPDIF_PRO_MODE,4,2         ## @E3G_SPDIF_PRO_MODE
	.comm	_E3G_SPDIF_NOT_AUDIO,4,2        ## @E3G_SPDIF_NOT_AUDIO
	.comm	_E3G_SPDIF_24_BIT,4,2           ## @E3G_SPDIF_24_BIT
	.comm	_E3G_SPDIF_TWO_CHANNEL,4,2      ## @E3G_SPDIF_TWO_CHANNEL
	.comm	_E3G_SPDIF_COPY_PERMIT,4,2      ## @E3G_SPDIF_COPY_PERMIT
	.no_dead_strip	_set_spdif_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_spdif_bits
_set_spdif_bits:                        ; @set_spdif_bits
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _E3G_SPDIF_FORMAT_CLEAR_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E3G_SPDIF_FORMAT_CLEAR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w1
	mov	w9, #48000
	cmp	w2, w9
	b.eq	LBB0_4
; %bb.1:
	mov	w9, #44100
	cmp	w2, w9
	b.eq	LBB0_5
; %bb.2:
	mov	w9, #32000
	cmp	w2, w9
	b.ne	LBB0_8
; %bb.3:
Lloh3:
	adrp	x9, _E3G_SPDIF_SAMPLE_RATE0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _E3G_SPDIF_SAMPLE_RATE0@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _E3G_SPDIF_SAMPLE_RATE1@GOTPAGE
Lloh7:
	ldr	x10, [x10, _E3G_SPDIF_SAMPLE_RATE1@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w8, w8, w10
	b	LBB0_8
LBB0_4:
Lloh9:
	adrp	x9, _E3G_SPDIF_SAMPLE_RATE1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _E3G_SPDIF_SAMPLE_RATE1@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	x9, [x0, #8]
	cbz	x9, LBB0_8
; %bb.6:
Lloh11:
	adrp	x9, _E3G_SPDIF_SAMPLE_RATE0@GOTPAGE
Lloh12:
	ldr	x9, [x9, _E3G_SPDIF_SAMPLE_RATE0@GOTPAGEOFF]
LBB0_7:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_8:
Lloh13:
	adrp	x9, _E3G_SPDIF_PRO_MODE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _E3G_SPDIF_PRO_MODE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	ldp	x11, x10, [x0]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
Lloh16:
	adrp	x10, _E3G_SPDIF_NOT_AUDIO@GOTPAGE
Lloh17:
	ldr	x10, [x10, _E3G_SPDIF_NOT_AUDIO@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	cmp	x11, #0
	csel	w10, wzr, w10, eq
Lloh19:
	adrp	x11, _E3G_SPDIF_24_BIT@GOTPAGE
Lloh20:
	ldr	x11, [x11, _E3G_SPDIF_24_BIT@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
Lloh22:
	adrp	x12, _E3G_SPDIF_TWO_CHANNEL@GOTPAGE
Lloh23:
	ldr	x12, [x12, _E3G_SPDIF_TWO_CHANNEL@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
Lloh25:
	adrp	x13, _E3G_SPDIF_COPY_PERMIT@GOTPAGE
Lloh26:
	ldr	x13, [x13, _E3G_SPDIF_COPY_PERMIT@GOTPAGEOFF]
Lloh27:
	ldr	w13, [x13]
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w8, w8, w12
	orr	w0, w8, w13
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_E3G_SPDIF_FORMAT_CLEAR_MASK,4,2 ; @E3G_SPDIF_FORMAT_CLEAR_MASK
	.comm	_E3G_SPDIF_SAMPLE_RATE0,4,2     ; @E3G_SPDIF_SAMPLE_RATE0
	.comm	_E3G_SPDIF_SAMPLE_RATE1,4,2     ; @E3G_SPDIF_SAMPLE_RATE1
	.comm	_E3G_SPDIF_PRO_MODE,4,2         ; @E3G_SPDIF_PRO_MODE
	.comm	_E3G_SPDIF_NOT_AUDIO,4,2        ; @E3G_SPDIF_NOT_AUDIO
	.comm	_E3G_SPDIF_24_BIT,4,2           ; @E3G_SPDIF_24_BIT
	.comm	_E3G_SPDIF_TWO_CHANNEL,4,2      ; @E3G_SPDIF_TWO_CHANNEL
	.comm	_E3G_SPDIF_COPY_PERMIT,4,2      ; @E3G_SPDIF_COPY_PERMIT
	.no_dead_strip	_set_spdif_bits
.subsections_via_symbols
