	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_oxygen_update_spdif_source     ## -- Begin function oxygen_update_spdif_source
	.p2align	4, 0x90
_oxygen_update_spdif_source:            ## @oxygen_update_spdif_source
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_OXYGEN_SPDIF_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_oxygen_read32
	movl	%eax, %r12d
	movq	_OXYGEN_PLAY_ROUTING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_oxygen_read16
	movl	%eax, %r15d
	movl	(%r14), %eax
	movq	_PCM_SPDIF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_3
## %bb.1:
	movq	_OXYGEN_SPDIF_OUT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	orl	%r12d, %eax
	movq	_OXYGEN_PLAY_SPDIF_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%r15d, %ebx
	movq	_OXYGEN_PLAY_SPDIF_SPDIF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_OXYGEN_SPDIF_OUT_RATE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrl	%cl, %r12d
	movq	_OXYGEN_I2S_RATE_MASK@GOTPCREL(%rip), %rcx
	movl	%r12d, %r13d
	andl	(%rcx), %r13d
	movl	%eax, %r12d
	cmpl	%ebx, %r15d
	jne	LBB0_6
	jmp	LBB0_2
LBB0_3:
	movq	_PCM_MULTICH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_9
## %bb.4:
	cmpq	$0, 16(%r14)
	je	LBB0_9
## %bb.5:
	movq	_OXYGEN_PLAY_SPDIF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	%r15d, %ebx
	movq	_OXYGEN_PLAY_SPDIF_MULTICH_01@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_OXYGEN_I2S_MULTICH_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_oxygen_read16
	movl	%eax, %r13d
	movq	_OXYGEN_I2S_RATE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	_OXYGEN_SPDIF_OUT_RATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
	movq	_OXYGEN_SPDIF_OUT_RATE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r13d, %eax
	shll	%cl, %eax
	movq	_OXYGEN_SPDIF_OUT_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	%edx, %r12d
	orl	%eax, %r12d
	cmpl	%ebx, %r15d
	je	LBB0_2
LBB0_6:
	movq	_OXYGEN_SPDIF_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	notl	%edx
	andl	%r12d, %edx
	movq	%r14, %rdi
	callq	_oxygen_write32
	movq	_OXYGEN_PLAY_ROUTING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_oxygen_write16
	movq	_OXYGEN_SPDIF_OUT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r12d, %edx
	jne	LBB0_7
	jmp	LBB0_8
LBB0_9:
	movq	_OXYGEN_SPDIF_OUT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	notl	%eax
	andl	%eax, %r12d
	movq	_OXYGEN_RATE_44100@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_2:
	movq	_OXYGEN_SPDIF_CONTROL@GOTPCREL(%rip), %r15
	testl	%r12d, %edx
	je	LBB0_8
LBB0_7:
	movq	_OXYGEN_SPDIF_OUTPUT_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_oxygen_spdif_rate
	movl	(%r14), %ecx
	movq	_PCM_SPDIF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%esi, %esi
	btl	%edx, %ecx
	setae	%sil
	orl	4(%r14,%rsi,4), %eax
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_oxygen_write32
LBB0_8:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_oxygen_write32                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OXYGEN_SPDIF_CONTROL,4,2       ## @OXYGEN_SPDIF_CONTROL
	.comm	_OXYGEN_PLAY_ROUTING,4,2        ## @OXYGEN_PLAY_ROUTING
	.comm	_PCM_SPDIF,4,2                  ## @PCM_SPDIF
	.comm	_OXYGEN_SPDIF_OUT_ENABLE,4,2    ## @OXYGEN_SPDIF_OUT_ENABLE
	.comm	_OXYGEN_PLAY_SPDIF_MASK,4,2     ## @OXYGEN_PLAY_SPDIF_MASK
	.comm	_OXYGEN_PLAY_SPDIF_SPDIF,4,2    ## @OXYGEN_PLAY_SPDIF_SPDIF
	.comm	_OXYGEN_SPDIF_OUT_RATE_SHIFT,4,2 ## @OXYGEN_SPDIF_OUT_RATE_SHIFT
	.comm	_OXYGEN_I2S_RATE_MASK,4,2       ## @OXYGEN_I2S_RATE_MASK
	.comm	_PCM_MULTICH,4,2                ## @PCM_MULTICH
	.comm	_OXYGEN_PLAY_SPDIF_MULTICH_01,4,2 ## @OXYGEN_PLAY_SPDIF_MULTICH_01
	.comm	_OXYGEN_I2S_MULTICH_FORMAT,4,2  ## @OXYGEN_I2S_MULTICH_FORMAT
	.comm	_OXYGEN_SPDIF_OUT_RATE_MASK,4,2 ## @OXYGEN_SPDIF_OUT_RATE_MASK
	.comm	_OXYGEN_RATE_44100,4,2          ## @OXYGEN_RATE_44100
	.comm	_OXYGEN_SPDIF_OUTPUT_BITS,4,2   ## @OXYGEN_SPDIF_OUTPUT_BITS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_oxygen_update_spdif_source     ; -- Begin function oxygen_update_spdif_source
	.p2align	2
_oxygen_update_spdif_source:            ; @oxygen_update_spdif_source
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x25, _OXYGEN_SPDIF_CONTROL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _OXYGEN_SPDIF_CONTROL@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_oxygen_read32
	mov	x23, x0
Lloh2:
	adrp	x27, _OXYGEN_PLAY_ROUTING@GOTPAGE
Lloh3:
	ldr	x27, [x27, _OXYGEN_PLAY_ROUTING@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x19
	bl	_oxygen_read16
	mov	x21, x0
	ldr	w8, [x19]
Lloh4:
	adrp	x26, _PCM_SPDIF@GOTPAGE
Lloh5:
	ldr	x26, [x26, _PCM_SPDIF@GOTPAGEOFF]
	ldr	w9, [x26]
	lsr	w9, w8, w9
Lloh6:
	adrp	x28, _OXYGEN_SPDIF_OUT_ENABLE@GOTPAGE
Lloh7:
	ldr	x28, [x28, _OXYGEN_SPDIF_OUT_ENABLE@GOTPAGEOFF]
	tbz	w9, #0, LBB0_2
; %bb.1:
	ldr	w8, [x28]
	orr	w20, w8, w23
Lloh8:
	adrp	x9, _OXYGEN_PLAY_SPDIF_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OXYGEN_PLAY_SPDIF_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	bic	w9, w21, w9
Lloh11:
	adrp	x10, _OXYGEN_PLAY_SPDIF_SPDIF@GOTPAGE
Lloh12:
	ldr	x10, [x10, _OXYGEN_PLAY_SPDIF_SPDIF@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w24, w9, w10
Lloh14:
	adrp	x9, _OXYGEN_SPDIF_OUT_RATE_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _OXYGEN_SPDIF_OUT_RATE_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsr	w9, w23, w9
Lloh17:
	adrp	x10, _OXYGEN_I2S_RATE_MASK@GOTPAGE
Lloh18:
	ldr	x10, [x10, _OXYGEN_I2S_RATE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	and	w22, w9, w10
	cmp	w21, w24
	b.ne	LBB0_5
	b	LBB0_6
LBB0_2:
Lloh20:
	adrp	x9, _PCM_MULTICH@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PCM_MULTICH@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	lsr	w8, w8, w9
	tbz	w8, #0, LBB0_9
; %bb.3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.4:
Lloh23:
	adrp	x8, _OXYGEN_PLAY_SPDIF_MASK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _OXYGEN_PLAY_SPDIF_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _OXYGEN_PLAY_SPDIF_MULTICH_01@GOTPAGE
Lloh27:
	ldr	x9, [x9, _OXYGEN_PLAY_SPDIF_MULTICH_01@GOTPAGEOFF]
	bic	w8, w21, w8
Lloh28:
	ldr	w9, [x9]
	orr	w24, w8, w9
Lloh29:
	adrp	x8, _OXYGEN_I2S_MULTICH_FORMAT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _OXYGEN_I2S_MULTICH_FORMAT@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_oxygen_read16
Lloh32:
	adrp	x8, _OXYGEN_I2S_RATE_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _OXYGEN_I2S_RATE_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	and	w22, w8, w0
Lloh35:
	adrp	x8, _OXYGEN_SPDIF_OUT_RATE_MASK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _OXYGEN_SPDIF_OUT_RATE_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _OXYGEN_SPDIF_OUT_RATE_SHIFT@GOTPAGE
Lloh39:
	ldr	x9, [x9, _OXYGEN_SPDIF_OUT_RATE_SHIFT@GOTPAGEOFF]
	bic	w8, w23, w8
Lloh40:
	ldr	w9, [x9]
	lsl	w9, w22, w9
	orr	w9, w9, w8
	ldr	w8, [x28]
	orr	w20, w9, w8
	cmp	w21, w24
	b.eq	LBB0_6
LBB0_5:
	ldr	w1, [x25]
	bic	w2, w20, w8
	mov	x0, x19
	bl	_oxygen_write32
	ldr	w1, [x27]
	mov	x0, x19
	mov	x2, x24
	bl	_oxygen_write16
	ldr	w8, [x28]
LBB0_6:
	tst	w8, w20
	b.eq	LBB0_8
LBB0_7:
Lloh41:
	adrp	x8, _OXYGEN_SPDIF_OUTPUT_BITS@GOTPAGE
Lloh42:
	ldr	x8, [x8, _OXYGEN_SPDIF_OUTPUT_BITS@GOTPAGEOFF]
Lloh43:
	ldr	w21, [x8]
	mov	x0, x22
	bl	_oxygen_spdif_rate
	ldr	w8, [x19]
	ldr	w9, [x26]
	lsr	w8, w8, w9
	tst	w8, #0x1
	mov	w8, #4
	mov	w9, #8
	csel	x8, x9, x8, eq
	ldr	w8, [x19, x8]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x21
	bl	_oxygen_write32
LBB0_8:
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_oxygen_write32
LBB0_9:
	ldr	w8, [x28]
	bic	w20, w23, w8
Lloh44:
	adrp	x9, _OXYGEN_RATE_44100@GOTPAGE
Lloh45:
	ldr	x9, [x9, _OXYGEN_RATE_44100@GOTPAGEOFF]
Lloh46:
	ldr	w22, [x9]
	tst	w8, w20
	b.ne	LBB0_7
	b	LBB0_8
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.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	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_OXYGEN_SPDIF_CONTROL,4,2       ; @OXYGEN_SPDIF_CONTROL
	.comm	_OXYGEN_PLAY_ROUTING,4,2        ; @OXYGEN_PLAY_ROUTING
	.comm	_PCM_SPDIF,4,2                  ; @PCM_SPDIF
	.comm	_OXYGEN_SPDIF_OUT_ENABLE,4,2    ; @OXYGEN_SPDIF_OUT_ENABLE
	.comm	_OXYGEN_PLAY_SPDIF_MASK,4,2     ; @OXYGEN_PLAY_SPDIF_MASK
	.comm	_OXYGEN_PLAY_SPDIF_SPDIF,4,2    ; @OXYGEN_PLAY_SPDIF_SPDIF
	.comm	_OXYGEN_SPDIF_OUT_RATE_SHIFT,4,2 ; @OXYGEN_SPDIF_OUT_RATE_SHIFT
	.comm	_OXYGEN_I2S_RATE_MASK,4,2       ; @OXYGEN_I2S_RATE_MASK
	.comm	_PCM_MULTICH,4,2                ; @PCM_MULTICH
	.comm	_OXYGEN_PLAY_SPDIF_MULTICH_01,4,2 ; @OXYGEN_PLAY_SPDIF_MULTICH_01
	.comm	_OXYGEN_I2S_MULTICH_FORMAT,4,2  ; @OXYGEN_I2S_MULTICH_FORMAT
	.comm	_OXYGEN_SPDIF_OUT_RATE_MASK,4,2 ; @OXYGEN_SPDIF_OUT_RATE_MASK
	.comm	_OXYGEN_RATE_44100,4,2          ; @OXYGEN_RATE_44100
	.comm	_OXYGEN_SPDIF_OUTPUT_BITS,4,2   ; @OXYGEN_SPDIF_OUTPUT_BITS
.subsections_via_symbols
