	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_player_thread
_ogg_player_thread:                     ## @ogg_player_thread
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_oggplayer_queue@GOTPCREL(%rip), %rdi
	callq	_LWP_InitQueue
	leaq	36(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$-1, %esi
	callq	_ov_info
	movq	%rax, 56(%rbx)
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_ASND_Pause
	leaq	64(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	$0, 64(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	movq	_ogg_thread_running@GOTPCREL(%rip), %r13
	movl	$1, (%r13)
	movl	$1, %r15d
	movq	_SND_UNUSED@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_oggplayer_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWP_ThreadSleep
	movl	20(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_18
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rbx), %rax
	movq	48(%rbx), %rcx
	movq	(%rcx,%rax,8), %rsi
	xorl	%edi, %edi
	callq	_ASND_TestPointer
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	callq	_ASND_StatusVoice
	cmpq	(%r12), %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	orb	$64, 20(%rbx)
	cmpl	$0, 16(%rbx)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %r14d
	cmpl	$0, (%r13)
	jne	LBB0_1
	jmp	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rsi
	movq	_READ_SAMPLES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jae	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$3, 20(%rbx)
	movl	24(%rbx), %eax
	testl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	js	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ov_time_seek
	movl	$-1, 24(%rbx)
	movq	(%rbx), %rsi
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rbx), %rax
	movq	48(%rbx), %rcx
	shlq	$2, %rsi
	addq	(%rcx,%rax,8), %rsi
	movq	_MAX_PCMOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_ov_read
	andl	$192, 20(%rbx)
	testq	%rax, %rax
	je	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	js	LBB0_15
## %bb.29:                              ##   in Loop: Header=BB0_1 Depth=1
	shrq	%rax
	addq	%rax, (%rbx)
	jmp	LBB0_17
LBB0_19:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, 20(%rbx)
	jmp	LBB0_20
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_OV_HOLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	testb	$1, 28(%rbx)
	jne	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, 16(%rbx)
	jmp	LBB0_17
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ov_time_seek
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	20(%rbx), %eax
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$1, %eax
	jne	LBB0_26
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %r14d
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_ASND_StatusVoice
	cmpq	(%r12), %rax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	je	LBB0_26
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	56(%rbx), %rax
	cmpl	$2, (%rax)
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_VOICE_STEREO_16BIT@GOTPCREL(%rip), %rcx
	jmp	LBB0_25
LBB0_24:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_VOICE_MONO_16BIT@GOTPCREL(%rip), %rcx
LBB0_25:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rcx), %esi
	movl	4(%rax), %edx
	movq	48(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	(%rax,%rcx,8), %r8
	movl	(%rbx), %r9d
	addl	%r9d, %r9d
	movl	40(%rbx), %eax
	movq	_ogg_add_callback@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	pushq	%r10
	pushq	%rax
	pushq	%rax
	callq	_ASND_SetVoice
	addq	$32, %rsp
	xorb	$1, 8(%rbx)
	movq	$0, (%rbx)
	movl	$0, 20(%rbx)
LBB0_26:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_usleep
	cmpl	$0, 16(%rbx)
	jne	LBB0_7
## %bb.27:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%r13)
	je	LBB0_7
## %bb.28:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	20(%rbx), %r14d
	jmp	LBB0_1
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ov_clear
	movl	$-1, 32(%rbx)
	movq	$0, (%rbx)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_oggplayer_queue,4,2            ## @oggplayer_queue
	.comm	_ogg_thread_running,4,2         ## @ogg_thread_running
	.comm	_SND_UNUSED,8,3                 ## @SND_UNUSED
	.comm	_READ_SAMPLES,8,3               ## @READ_SAMPLES
	.comm	_MAX_PCMOUT,4,2                 ## @MAX_PCMOUT
	.comm	_OV_HOLE,8,3                    ## @OV_HOLE
	.comm	_VOICE_STEREO_16BIT,4,2         ## @VOICE_STEREO_16BIT
	.comm	_ogg_add_callback,4,2           ## @ogg_add_callback
	.comm	_VOICE_MONO_16BIT,4,2           ## @VOICE_MONO_16BIT
	.no_dead_strip	_ogg_player_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_player_thread
_ogg_player_thread:                     ; @ogg_player_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, _oggplayer_queue@GOTPAGE
Lloh1:
	ldr	x20, [x20, _oggplayer_queue@GOTPAGEOFF]
	mov	x0, x20
	bl	_LWP_InitQueue
	add	x21, x19, #36
	mov	x0, x21
	mov	w1, #-1
	bl	_ov_info
	str	x0, [x19, #56]
	mov	w0, #0
	bl	_ASND_Pause
	mov	w8, #0
	mov	x22, x19
	str	xzr, [x22, #64]!
	stp	xzr, xzr, [x19, #8]
	str	xzr, [x19]
Lloh2:
	adrp	x24, _ogg_thread_running@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ogg_thread_running@GOTPAGEOFF]
	mov	w25, #1
	str	w25, [x24]
Lloh4:
	adrp	x26, _READ_SAMPLES@GOTPAGE
Lloh5:
	ldr	x26, [x26, _READ_SAMPLES@GOTPAGEOFF]
Lloh6:
	adrp	x28, _SND_UNUSED@GOTPAGE
Lloh7:
	ldr	x28, [x28, _SND_UNUSED@GOTPAGEOFF]
	mov	w23, #3
	mov	w27, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w8, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x20]
	bl	_LWP_ThreadSleep
	ldr	w8, [x19, #20]
	cbnz	w8, LBB0_19
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #48]
	ldr	x9, [x19, #8]
	ldr	x1, [x8, x9, lsl #3]
	mov	w0, #0
	bl	_ASND_TestPointer
	cbz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #0
	bl	_ASND_StatusVoice
	ldr	x8, [x28]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	w9, w8, [x19, #16]
	orr	w8, w8, #0x40
	str	w8, [x19, #20]
	cbnz	w9, LBB0_28
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w9, [x24]
	mov	w8, #1
	cbnz	w9, LBB0_1
	b	LBB0_28
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.hs	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	str	w23, [x19, #20]
	ldr	w1, [x19, #24]
	tbnz	w1, #31, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	bl	_ov_time_seek
	mov	w8, #-1
	str	w8, [x19, #24]
	ldr	x8, [x19]
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x19, #48]
	ldr	x10, [x19, #8]
	ldr	x9, [x9, x10, lsl #3]
	add	x1, x9, x8, lsl #2
Lloh8:
	adrp	x8, _MAX_PCMOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_PCMOUT@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x3, x22
	bl	_ov_read
	ldr	w8, [x19, #20]
	and	w8, w8, #0xc0
	str	w8, [x19, #20]
	cbz	x0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_1 Depth=1
	tbnz	x0, #63, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19]
	add	x8, x8, x0, lsr #1
	str	x8, [x19]
	b	LBB0_18
LBB0_13:                                ;   in Loop: Header=BB0_1 Depth=1
	str	w25, [x19, #20]
	b	LBB0_20
LBB0_14:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh11:
	adrp	x8, _OV_HOLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OV_HOLE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrb	w8, [x19, #28]
	tbnz	w8, #0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_1 Depth=1
	str	w25, [x19, #16]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	w1, #0
	bl	_ov_time_seek
LBB0_18:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x19, #20]
LBB0_19:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w8, #1
	b.ne	LBB0_25
LBB0_20:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #0
	bl	_ASND_StatusVoice
	ldr	x8, [x28]
	cmp	x0, x8
	ccmp	w27, #0, #0, ne
	mov	w27, #0
	b.eq	LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #56]
	ldr	w9, [x8]
	cmp	w9, #2
	b.ne	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_1 Depth=1
Lloh14:
	adrp	x9, _VOICE_STEREO_16BIT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _VOICE_STEREO_16BIT@GOTPAGEOFF]
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh16:
	adrp	x9, _VOICE_MONO_16BIT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _VOICE_MONO_16BIT@GOTPAGEOFF]
LBB0_24:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x9]
	ldr	w2, [x8, #4]
	ldr	x8, [x19, #48]
	ldr	x9, [x19, #8]
	ldr	x4, [x8, x9, lsl #3]
	ldr	w8, [x19]
	lsl	w5, w8, #1
	ldr	w6, [x19, #40]
Lloh18:
	adrp	x8, _ogg_add_callback@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ogg_add_callback@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	w0, #0
	mov	w3, #0
	mov	x7, x6
	bl	_ASND_SetVoice
	mov	w27, #0
	ldr	x8, [x19, #8]
	eor	x8, x8, #0x1
	stp	xzr, x8, [x19]
	str	wzr, [x19, #20]
LBB0_25:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_usleep
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x24]
	cbz	w8, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x19, #20]
	b	LBB0_1
LBB0_28:
	mov	x0, x21
	bl	_ov_clear
	mov	w8, #-1
	str	w8, [x19, #32]
	str	xzr, [x19]
	mov	x0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_oggplayer_queue,4,2            ; @oggplayer_queue
	.comm	_ogg_thread_running,4,2         ; @ogg_thread_running
	.comm	_SND_UNUSED,8,3                 ; @SND_UNUSED
	.comm	_READ_SAMPLES,8,3               ; @READ_SAMPLES
	.comm	_MAX_PCMOUT,4,2                 ; @MAX_PCMOUT
	.comm	_OV_HOLE,8,3                    ; @OV_HOLE
	.comm	_VOICE_STEREO_16BIT,4,2         ; @VOICE_STEREO_16BIT
	.comm	_ogg_add_callback,4,2           ; @ogg_add_callback
	.comm	_VOICE_MONO_16BIT,4,2           ; @VOICE_MONO_16BIT
	.no_dead_strip	_ogg_player_thread
.subsections_via_symbols
