	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SNDOpenSLUpdateAudio
_SNDOpenSLUpdateAudio:                  ## @SNDOpenSLUpdateAudio
	.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, %ebx
	shll	$3, %ebx
	movq	_stereodata16@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_currentpos@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	_soundoffset@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	movslq	(%rdx,%rcx,4), %rdx
	shlq	$2, %rdx
	addq	(%rax,%rcx,8), %rdx
	movl	%ebx, %ecx
	sarl	$3, %ecx
	callq	_sdlConvert32uto16s
	movq	(%r12), %rax
	movq	(%r14), %rdi
	addl	(%rax,%rdi,4), %ebx
	movl	%ebx, (%rax,%rdi,4)
	movq	_mbufferSizeInBytes@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_5
## %bb.1:
	movq	_muted@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_4
## %bb.2:
	callq	_push_index
	movq	_bqPlayerBufferQueue@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	movq	(%r15), %rcx
	movq	(%r14), %rdx
	movq	(%rcx,%rdx,8), %rsi
	movq	(%r12), %rcx
	movl	(%rcx,%rdx,4), %edx
	callq	*(%rax)
	movq	_SL_RESULT_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_6
## %bb.3:
	movq	(%r14), %rdi
LBB0_4:
	incl	%edi
	movq	_MAX_BUFFER_CNT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	(%rax), %edi
	cmovll	%edi, %ecx
	movslq	%ecx, %rax
	movq	%rax, (%r14)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_stereodata16,8,3               ## @stereodata16
	.comm	_currentpos,8,3                 ## @currentpos
	.comm	_soundoffset,8,3                ## @soundoffset
	.comm	_mbufferSizeInBytes,4,2         ## @mbufferSizeInBytes
	.comm	_muted,4,2                      ## @muted
	.comm	_bqPlayerBufferQueue,8,3        ## @bqPlayerBufferQueue
	.comm	_SL_RESULT_SUCCESS,8,3          ## @SL_RESULT_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail to Add queue"

	.comm	_MAX_BUFFER_CNT,4,2             ## @MAX_BUFFER_CNT
	.no_dead_strip	_SNDOpenSLUpdateAudio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SNDOpenSLUpdateAudio
_SNDOpenSLUpdateAudio:                  ; @SNDOpenSLUpdateAudio
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x20, _stereodata16@GOTPAGE
Lloh1:
	ldr	x20, [x20, _stereodata16@GOTPAGEOFF]
Lloh2:
	adrp	x19, _currentpos@GOTPAGE
Lloh3:
	ldr	x19, [x19, _currentpos@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
Lloh4:
	adrp	x21, _soundoffset@GOTPAGE
Lloh5:
	ldr	x21, [x21, _soundoffset@GOTPAGEOFF]
	lsl	w22, w2, #3
	ldr	x10, [x21]
	ldrsw	x9, [x10, x9, lsl #2]
	add	x8, x8, x9, lsl #2
	sbfx	w3, w2, #0, #29
	mov	x2, x8
	bl	_sdlConvert32uto16s
	ldr	x8, [x21]
	ldr	x0, [x19]
	lsl	x9, x0, #2
	ldr	w10, [x8, x9]
	add	w10, w10, w22
	str	w10, [x8, x9]
Lloh6:
	adrp	x8, _mbufferSizeInBytes@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mbufferSizeInBytes@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w10, w8
	b.lt	LBB0_5
; %bb.1:
Lloh9:
	adrp	x8, _muted@GOTPAGE
Lloh10:
	ldr	x8, [x8, _muted@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbnz	w8, LBB0_4
; %bb.2:
	bl	_push_index
Lloh12:
	adrp	x8, _bqPlayerBufferQueue@GOTPAGE
Lloh13:
	ldr	x8, [x8, _bqPlayerBufferQueue@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x9, [x20]
	ldr	x10, [x19]
	ldr	x1, [x9, x10, lsl #3]
	ldr	x9, [x21]
	ldr	w2, [x9, x10, lsl #2]
	blr	x8
Lloh15:
	adrp	x8, _SL_RESULT_SUCCESS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SL_RESULT_SUCCESS@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ne	LBB0_6
; %bb.3:
	ldr	x0, [x19]
LBB0_4:
Lloh18:
	adrp	x8, _MAX_BUFFER_CNT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAX_BUFFER_CNT@GOTPAGEOFF]
	add	w9, w0, #1
Lloh20:
	ldr	w8, [x8]
	cmp	w9, w8
	csinc	w8, wzr, w0, ge
	sxtw	x8, w8
	str	x8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_printf
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_stereodata16,8,3               ; @stereodata16
	.comm	_currentpos,8,3                 ; @currentpos
	.comm	_soundoffset,8,3                ; @soundoffset
	.comm	_mbufferSizeInBytes,4,2         ; @mbufferSizeInBytes
	.comm	_muted,4,2                      ; @muted
	.comm	_bqPlayerBufferQueue,8,3        ; @bqPlayerBufferQueue
	.comm	_SL_RESULT_SUCCESS,8,3          ; @SL_RESULT_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail to Add queue"

	.comm	_MAX_BUFFER_CNT,4,2             ; @MAX_BUFFER_CNT
	.no_dead_strip	_SNDOpenSLUpdateAudio
.subsections_via_symbols
