	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rsd_exec                       ## -- Begin function rsd_exec
	.p2align	4, 0x90
_rsd_exec:                              ## @rsd_exec
	.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)
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_retro_assert
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_RSD_DEBUG
	cmpl	$0, 4(%rbx)
	jns	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_RSD_DEBUG
	movq	%rbx, %rdi
	callq	_rsd_start
	testq	%rax, %rax
	js	LBB0_8
LBB0_2:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_RSD_DEBUG
	movq	%rbx, %rdi
	callq	_rsnd_close_ctl
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_10
## %bb.3:
	movl	4(%rbx), %r14d
	leaq	L_.str.4(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_RSD_DEBUG
	movq	%rbx, %rdi
	callq	_rsnd_stop_thread
	movl	4(%rbx), %edi
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_fcntl
	movl	(%rbx), %edi
	callq	_fifo_read_avail
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	movl	(%rbx), %edi
	callq	_fifo_read_avail
	movl	%eax, %r15d
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movl	(%rbx), %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_fifo_read
	movl	%r14d, %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movl	$1, %ecx
	callq	_rsnd_send_chunk
	cmpq	%r12, %rax
	jne	LBB0_7
## %bb.5:
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
LBB0_6:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_RSD_DEBUG
	movq	%rbx, %rdi
	callq	_rsd_free
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_RSD_DEBUG
	movl	%r14d, %edi
	callq	_net_socketclose
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	_RSD_ERR
LBB0_9:
	movl	$-1, %r14d
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[RSound] rsd_exec().\n"

L_.str.1:                               ## @.str.1
	.asciz	"[RSound] Calling rsd_start().\n"

L_.str.2:                               ## @.str.2
	.asciz	"[RSound] rsd_start() failed.\n"

L_.str.3:                               ## @.str.3
	.asciz	"[RSound] Closing ctl.\n"

L_.str.4:                               ## @.str.4
	.asciz	"[RSound] Socket: %d.\n"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.5:                               ## @.str.5
	.asciz	"[RSound] Failed flushing buffer.\n"

L_.str.6:                               ## @.str.6
	.asciz	"[RSound] Returning from rsd_exec().\n"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_NBIO,4,2                    ## @SO_NBIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rsd_exec                       ; -- Begin function rsd_exec
	.p2align	2
_rsd_exec:                              ; @rsd_exec
	.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
	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, #-56]
	cmp	x0, #0
	cset	w0, ne
	bl	_retro_assert
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RSD_DEBUG
	ldr	w8, [x19, #4]
	tbz	w8, #31, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RSD_DEBUG
	mov	x0, x19
	bl	_rsd_start
	tbnz	x0, #63, LBB0_8
LBB0_2:
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_RSD_DEBUG
	mov	x0, x19
	bl	_rsnd_close_ctl
	tbnz	x0, #63, LBB0_9
; %bb.3:
	ldr	w20, [x19, #4]
	str	x20, [sp, #-16]!
Lloh9:
	adrp	x0, l_.str.4@PAGE
Lloh10:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_RSD_DEBUG
	add	sp, sp, #16
	mov	x0, x19
	bl	_rsnd_stop_thread
	ldr	w0, [x19, #4]
Lloh11:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_fcntl
	ldr	w0, [x19]
	bl	_fifo_read_avail
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.4:
	ldr	w0, [x19]
	bl	_fifo_read_avail
	mov	x21, x0
	mov	x24, sp
	mov	w22, w0
	mov	x9, x22
Lloh17:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh18:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	ldr	w0, [x19]
	mov	x1, x23
	mov	x2, x21
	bl	_fifo_read
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	mov	w3, #1
	bl	_rsnd_send_chunk
	cmp	x0, x22
	b.ne	LBB0_7
; %bb.5:
	mov	sp, x24
LBB0_6:
Lloh19:
	adrp	x0, l_.str.6@PAGE
Lloh20:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_RSD_DEBUG
	mov	x0, x19
	bl	_rsd_free
	b	LBB0_10
LBB0_7:
Lloh21:
	adrp	x0, l_.str.5@PAGE
Lloh22:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_RSD_DEBUG
	mov	x0, x20
	bl	_net_socketclose
	mov	w20, #-1
	mov	sp, x24
	b	LBB0_10
LBB0_8:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_RSD_ERR
LBB0_9:
	mov	w20, #-1
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x20
	sub	sp, x29, #48
	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_12:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[RSound] rsd_exec().\n"

l_.str.1:                               ; @.str.1
	.asciz	"[RSound] Calling rsd_start().\n"

l_.str.2:                               ; @.str.2
	.asciz	"[RSound] rsd_start() failed.\n"

l_.str.3:                               ; @.str.3
	.asciz	"[RSound] Closing ctl.\n"

l_.str.4:                               ; @.str.4
	.asciz	"[RSound] Socket: %d.\n"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.5:                               ; @.str.5
	.asciz	"[RSound] Failed flushing buffer.\n"

l_.str.6:                               ; @.str.6
	.asciz	"[RSound] Returning from rsd_exec().\n"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_NBIO,4,2                    ; @SO_NBIO
.subsections_via_symbols
