	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oxygen_open
_oxygen_open:                           ## @oxygen_open
	.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
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_snd_pcm_substream_chip
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movq	(%r15), %rbx
	movl	%r12d, %r14d
	movq	%r14, 16(%rbx)
	movq	_PCM_B@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_4
## %bb.1:
	cmpq	$0, 56(%r13)
	je	LBB0_4
## %bb.2:
	movq	_CAPTURE_2_FROM_AC97_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 40(%r13)
	je	LBB0_4
## %bb.3:
	movq	_oxygen_ac97_hardware@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_oxygen_hardware@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rax
LBB0_5:
	movups	(%rax), %xmm0
	movups	%xmm0, (%rbx)
	cmpl	$128, %r12d
	je	LBB0_8
## %bb.6:
	cmpl	$129, %r12d
	jne	LBB0_9
## %bb.7:
	movq	_SNDRV_PCM_RATE_32000@GOTPCREL(%rip), %rax
	movq	_SNDRV_PCM_RATE_64000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, (%rbx)
	movl	$44100, 4(%rbx)                 ## imm = 0xAC44
	jmp	LBB0_9
LBB0_8:
	movl	44(%r13), %eax
	movl	%eax, 8(%rbx)
LBB0_9:
	movq	48(%r13), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	*%rax
LBB0_11:
	movq	_SNDRV_PCM_HW_PARAM_PERIOD_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %ecx
	callq	_snd_pcm_hw_constraint_step
	testl	%eax, %eax
	js	LBB0_20
## %bb.12:
	movq	_SNDRV_PCM_HW_PARAM_BUFFER_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %ecx
	callq	_snd_pcm_hw_constraint_step
	testl	%eax, %eax
	js	LBB0_20
## %bb.13:
	movq	_SNDRV_PCM_FMTBIT_S32_LE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%rbx)
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	movl	$24, %ecx
	callq	_snd_pcm_hw_constraint_msbits
	testl	%eax, %eax
	js	LBB0_20
LBB0_15:
	cmpl	$3, 8(%rbx)
	jl	LBB0_17
## %bb.16:
	movq	_SNDRV_PCM_HW_PARAM_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$2, %ecx
	callq	_snd_pcm_hw_constraint_step
	testl	%eax, %eax
	js	LBB0_20
LBB0_17:
	movq	%r15, %rdi
	callq	_snd_pcm_set_sync
	movq	32(%r13), %rax
	movq	%r15, (%rax,%r14,8)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	$1, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	orl	%eax, (%r13)
	movq	_PCM_SPDIF@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_19
## %bb.18:
	movl	20(%r13), %eax
	movl	%eax, 24(%r13)
	movq	_SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	8(%r13), %rcx
	movq	_CONTROL_SPDIF_PCM@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rdx
	movq	8(%rdx), %rcx
	andl	%eax, (%rcx)
	movl	16(%r13), %edi
	movq	_SNDRV_CTL_EVENT_MASK_VALUE@GOTPCREL(%rip), %rax
	movq	_SNDRV_CTL_EVENT_MASK_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_snd_ctl_notify
LBB0_19:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCM_B,4,2                      ## @PCM_B
	.comm	_CAPTURE_2_FROM_AC97_1,4,2      ## @CAPTURE_2_FROM_AC97_1
	.comm	_oxygen_ac97_hardware,16,2      ## @oxygen_ac97_hardware
	.comm	_oxygen_hardware,8,3            ## @oxygen_hardware
	.comm	_SNDRV_PCM_RATE_32000,4,2       ## @SNDRV_PCM_RATE_32000
	.comm	_SNDRV_PCM_RATE_64000,4,2       ## @SNDRV_PCM_RATE_64000
	.comm	_SNDRV_PCM_HW_PARAM_PERIOD_BYTES,4,2 ## @SNDRV_PCM_HW_PARAM_PERIOD_BYTES
	.comm	_SNDRV_PCM_HW_PARAM_BUFFER_BYTES,4,2 ## @SNDRV_PCM_HW_PARAM_BUFFER_BYTES
	.comm	_SNDRV_PCM_FMTBIT_S32_LE,4,2    ## @SNDRV_PCM_FMTBIT_S32_LE
	.comm	_SNDRV_PCM_HW_PARAM_CHANNELS,4,2 ## @SNDRV_PCM_HW_PARAM_CHANNELS
	.comm	_PCM_SPDIF,4,2                  ## @PCM_SPDIF
	.comm	_SNDRV_CTL_ELEM_ACCESS_INACTIVE,4,2 ## @SNDRV_CTL_ELEM_ACCESS_INACTIVE
	.comm	_CONTROL_SPDIF_PCM,8,3          ## @CONTROL_SPDIF_PCM
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ## @SNDRV_CTL_EVENT_MASK_VALUE
	.comm	_SNDRV_CTL_EVENT_MASK_INFO,4,2  ## @SNDRV_CTL_EVENT_MASK_INFO
	.no_dead_strip	_oxygen_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oxygen_open
_oxygen_open:                           ; @oxygen_open
	.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	x21, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x22, [x21]
	mov	w23, w20
	str	x23, [x22, #16]
Lloh0:
	adrp	x8, _PCM_B@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCM_B@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x19, #40]
Lloh3:
	adrp	x9, _CAPTURE_2_FROM_AC97_1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CAPTURE_2_FROM_AC97_1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _oxygen_ac97_hardware@GOTPAGE
Lloh7:
	ldr	x8, [x8, _oxygen_ac97_hardware@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _oxygen_hardware@GOTPAGE
Lloh9:
	ldr	x8, [x8, _oxygen_hardware@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x8, [x8, x23, lsl #3]
LBB0_5:
	ldr	q0, [x8]
	str	q0, [x22]
	cmp	w20, #128
	b.eq	LBB0_20
; %bb.6:
	cmp	w20, #129
	b.ne	LBB0_8
; %bb.7:
Lloh11:
	adrp	x8, _SNDRV_PCM_RATE_32000@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SNDRV_PCM_RATE_32000@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _SNDRV_PCM_RATE_64000@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SNDRV_PCM_RATE_64000@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x22]
	bic	w8, w9, w8
	mov	w9, #44100
	stp	w8, w9, [x22]
LBB0_8:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_10
LBB0_9:
	mov	x0, x20
	mov	x1, x22
	blr	x8
LBB0_10:
Lloh17:
	adrp	x8, _SNDRV_PCM_HW_PARAM_PERIOD_BYTES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_PERIOD_BYTES@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #0
	mov	w3, #32
	bl	_snd_pcm_hw_constraint_step
	tbnz	w0, #31, LBB0_19
; %bb.11:
Lloh20:
	adrp	x8, _SNDRV_PCM_HW_PARAM_BUFFER_BYTES@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_BUFFER_BYTES@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #0
	mov	w3, #32
	bl	_snd_pcm_hw_constraint_step
	tbnz	w0, #31, LBB0_19
; %bb.12:
	ldr	w8, [x22, #12]
Lloh23:
	adrp	x9, _SNDRV_PCM_FMTBIT_S32_LE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SNDRV_PCM_FMTBIT_S32_LE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #32
	mov	w3, #24
	bl	_snd_pcm_hw_constraint_msbits
	tbnz	w0, #31, LBB0_19
LBB0_14:
	ldr	w8, [x22, #8]
	cmp	w8, #3
	b.lt	LBB0_16
; %bb.15:
Lloh26:
	adrp	x8, _SNDRV_PCM_HW_PARAM_CHANNELS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_CHANNELS@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #0
	mov	w3, #2
	bl	_snd_pcm_hw_constraint_step
	tbnz	w0, #31, LBB0_19
LBB0_16:
	mov	x0, x21
	bl	_snd_pcm_set_sync
	ldr	x8, [x19, #32]
	str	x21, [x8, x23, lsl #3]
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
	mov	w8, #1
	lsl	w8, w8, w20
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh29:
	adrp	x8, _PCM_SPDIF@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PCM_SPDIF@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_18
; %bb.17:
	ldp	w0, w8, [x19, #16]
	str	w8, [x19, #24]
Lloh32:
	adrp	x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh34:
	adrp	x10, _CONTROL_SPDIF_PCM@GOTPAGE
Lloh35:
	ldr	x10, [x10, _CONTROL_SPDIF_PCM@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	ldr	x2, [x9, x10, lsl #3]
Lloh37:
	ldr	w8, [x8]
	ldr	x9, [x2, #8]
	ldr	w10, [x9]
	bic	w8, w10, w8
Lloh38:
	adrp	x10, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh39:
	ldr	x10, [x10, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
	str	w8, [x9]
Lloh40:
	ldr	w8, [x10]
Lloh41:
	adrp	x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGE
Lloh42:
	ldr	x9, [x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_snd_ctl_notify
LBB0_18:
	mov	x0, x21
	bl	_mutex_unlock
	mov	w0, #0
LBB0_19:
	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_20:
	ldr	w8, [x19, #44]
	str	w8, [x22, #8]
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_9
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_PCM_B,4,2                      ; @PCM_B
	.comm	_CAPTURE_2_FROM_AC97_1,4,2      ; @CAPTURE_2_FROM_AC97_1
	.comm	_oxygen_ac97_hardware,16,2      ; @oxygen_ac97_hardware
	.comm	_oxygen_hardware,8,3            ; @oxygen_hardware
	.comm	_SNDRV_PCM_RATE_32000,4,2       ; @SNDRV_PCM_RATE_32000
	.comm	_SNDRV_PCM_RATE_64000,4,2       ; @SNDRV_PCM_RATE_64000
	.comm	_SNDRV_PCM_HW_PARAM_PERIOD_BYTES,4,2 ; @SNDRV_PCM_HW_PARAM_PERIOD_BYTES
	.comm	_SNDRV_PCM_HW_PARAM_BUFFER_BYTES,4,2 ; @SNDRV_PCM_HW_PARAM_BUFFER_BYTES
	.comm	_SNDRV_PCM_FMTBIT_S32_LE,4,2    ; @SNDRV_PCM_FMTBIT_S32_LE
	.comm	_SNDRV_PCM_HW_PARAM_CHANNELS,4,2 ; @SNDRV_PCM_HW_PARAM_CHANNELS
	.comm	_PCM_SPDIF,4,2                  ; @PCM_SPDIF
	.comm	_SNDRV_CTL_ELEM_ACCESS_INACTIVE,4,2 ; @SNDRV_CTL_ELEM_ACCESS_INACTIVE
	.comm	_CONTROL_SPDIF_PCM,8,3          ; @CONTROL_SPDIF_PCM
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ; @SNDRV_CTL_EVENT_MASK_VALUE
	.comm	_SNDRV_CTL_EVENT_MASK_INFO,4,2  ; @SNDRV_CTL_EVENT_MASK_INFO
	.no_dead_strip	_oxygen_open
.subsections_via_symbols
