	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsnd_thread
_rsnd_thread:                           ## @rsnd_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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	52(%rdi), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_RSD_CONN_PROTO@GOTPCREL(%rip), %r15
	leaq	L_.str.2(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	28(%rbx), %edi
	callq	_slock_unlock
	movq	%r13, %rdi
	callq	_RSD_DEBUG
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	__TEST_CANCEL
	movl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	12(%rbx), %eax
	imull	8(%rbx), %eax
	imull	16(%rbx), %eax
	cmpl	%eax, 4(%rbx)
	jle	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_rsnd_send_info_query
	movq	%rbx, %rdi
	callq	_rsnd_update_server_info
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	32(%rbx), %edi
	callq	_slock_lock
	movl	60(%rbx), %edi
	callq	_fifo_read_avail
	movslq	52(%rbx), %rcx
	cmpq	%rcx, %rax
	jl	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 40(%rbx)
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %r12
	movl	32(%rbx), %edi
	callq	_slock_unlock
	xorl	%eax, %eax
	callq	__TEST_CANCEL
	movl	32(%rbx), %edi
	callq	_slock_lock
	movl	60(%rbx), %edi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_fifo_read
	movl	32(%rbx), %edi
	callq	_slock_unlock
	movl	56(%rbx), %edi
	movq	%r13, %rsi
	movl	%r14d, %edx
	movl	$1, %ecx
	callq	_rsnd_send_chunk
	cmpl	52(%rbx), %eax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %r13d
	cmpl	$0, 20(%rbx)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	32(%rbx), %edi
	callq	_slock_lock
	xorl	%eax, %eax
	callq	_rsnd_get_time_usec
	movl	%eax, 48(%rbx)
	movl	$1, 20(%rbx)
	movl	32(%rbx), %edi
	callq	_slock_unlock
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	32(%rbx), %edi
	callq	_slock_lock
	addl	%r13d, 4(%rbx)
	movl	32(%rbx), %edi
	callq	_slock_unlock
	movl	24(%rbx), %edi
	callq	_scond_signal
	movq	%r12, %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	32(%rbx), %edi
	callq	_slock_unlock
	cmpq	$0, 40(%rbx)
	je	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	28(%rbx), %edi
	callq	_slock_lock
	movl	24(%rbx), %edi
	callq	_scond_signal
	cmpq	$0, 40(%rbx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_RSD_DEBUG
	movl	24(%rbx), %edi
	movl	28(%rbx), %esi
	callq	_scond_wait
	leaq	L_.str.1(%rip), %rdi
	callq	_RSD_DEBUG
	jmp	LBB0_9
LBB0_15:
	movl	24(%rbx), %edi
	callq	_scond_signal
	jmp	LBB0_16
LBB0_11:
	xorl	%eax, %eax
	callq	__TEST_CANCEL
	movq	%rbx, %rdi
	callq	_rsnd_reset
	movl	24(%rbx), %edi
	callq	_scond_signal
	movl	36(%rbx), %edi
	callq	_sthread_detach
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RSD_CONN_PROTO,4,2             ## @RSD_CONN_PROTO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[RSound] Thread going to sleep.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[RSound] Thread woke up.\n"

L_.str.2:                               ## @.str.2
	.asciz	"[RSound] Thread unlocked cond_mutex.\n"

	.no_dead_strip	_rsnd_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsnd_thread
_rsnd_thread:                           ; @rsnd_thread
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	w20, [x0, #52]
	mov	x9, x20
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
Lloh5:
	adrp	x26, _RSD_CONN_PROTO@GOTPAGE
Lloh6:
	ldr	x26, [x26, _RSD_CONN_PROTO@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str.2@PAGE
Lloh8:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh9:
	adrp	x23, l_.str@PAGE
Lloh10:
	add	x23, x23, l_.str@PAGEOFF
	mov	w27, #1
Lloh11:
	adrp	x24, l_.str.1@PAGE
Lloh12:
	add	x24, x24, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #28]
	bl	_slock_unlock
	mov	x0, x22
	bl	_RSD_DEBUG
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	__TEST_CANCEL
	ldr	w8, [x19]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w8, w9, [x19, #4]
	ldp	w10, w11, [x19, #12]
	mul	w9, w10, w9
	mul	w9, w9, w11
	cmp	w8, w9
	b.le	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_rsnd_send_info_query
	mov	x0, x19
	bl	_rsnd_update_server_info
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #32]
	bl	_slock_lock
	ldr	w0, [x19, #60]
	bl	_fifo_read_avail
	ldrsw	x8, [x19, #52]
	cmp	x0, x8
	b.lt	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #32]
	bl	_slock_unlock
	bl	__TEST_CANCEL
	ldr	w0, [x19, #32]
	bl	_slock_lock
	ldr	w0, [x19, #60]
	mov	x1, x21
	mov	x2, x20
	bl	_fifo_read
	ldr	w0, [x19, #32]
	bl	_slock_unlock
	ldr	w0, [x19, #56]
	mov	x1, x21
	mov	x2, x20
	mov	w3, #1
	bl	_rsnd_send_chunk
	ldr	w8, [x19, #52]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	ldr	w8, [x19, #20]
	cbnz	w8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #32]
	bl	_slock_lock
	bl	_rsnd_get_time_usec
	str	w0, [x19, #48]
	str	w27, [x19, #20]
	ldr	w0, [x19, #32]
	bl	_slock_unlock
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #32]
	bl	_slock_lock
	ldr	w8, [x19, #4]
	add	w8, w8, w25
	str	w8, [x19, #4]
	ldr	w0, [x19, #32]
	bl	_slock_unlock
	ldr	w0, [x19, #24]
	bl	_scond_signal
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #32]
	bl	_slock_unlock
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #28]
	bl	_slock_lock
	ldr	w0, [x19, #24]
	bl	_scond_signal
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_1
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_RSD_DEBUG
	ldp	w0, w1, [x19, #24]
	bl	_scond_wait
	mov	x0, x24
	bl	_RSD_DEBUG
	b	LBB0_1
LBB0_14:
	ldr	w0, [x19, #24]
	bl	_scond_signal
	b	LBB0_16
LBB0_15:
	bl	__TEST_CANCEL
	mov	x0, x19
	bl	_rsnd_reset
	ldr	w0, [x19, #24]
	bl	_scond_signal
	ldr	w0, [x19, #36]
	bl	_sthread_detach
LBB0_16:
	ldur	x8, [x29, #-88]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	sub	sp, x29, #80
	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
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_RSD_CONN_PROTO,4,2             ; @RSD_CONN_PROTO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[RSound] Thread going to sleep.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[RSound] Thread woke up.\n"

l_.str.2:                               ; @.str.2
	.asciz	"[RSound] Thread unlocked cond_mutex.\n"

	.no_dead_strip	_rsnd_thread
.subsections_via_symbols
