	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sndout_sdl_write_nb            ## -- Begin function sndout_sdl_write_nb
	.p2align	4, 0x90
_sndout_sdl_write_nb:                   ## @sndout_sdl_write_nb
	.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
	movq	_buf_r@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_buf_w@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	subl	%eax, %ecx
	addl	$-2, %ecx
	movq	_BUF_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movl	%esi, %ebx
	shrl	$31, %ebx
	addl	%esi, %ebx
	sarl	%ebx
	cmpl	%ecx, %ebx
	cmovgel	%ecx, %ebx
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movslq	%eax, %rdi
	movq	_BUF_LEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %r12
	subq	%rdi, %r12
	movl	%ebx, %r13d
	subl	%r12d, %r13d
	jle	LBB0_2
## %bb.3:
	movq	_buf@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	leal	(%r12,%r12), %edx
	movq	%r14, %rsi
	callq	_memcpy
	leaq	(%r14,%r12,2), %r14
	movl	$0, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movl	%ebx, %r13d
LBB0_4:
	movq	_buf@GOTPCREL(%rip), %rcx
	movslq	%eax, %rdi
	addq	(%rcx), %rdi
	leal	(%r13,%r13), %edx
	movq	%r14, %rsi
	callq	_memcpy
	addl	(%r15), %r13d
	movq	_BUF_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movl	%r13d, (%r15)
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_buf_r,4,2                      ## @buf_r
	.comm	_buf_w,4,2                      ## @buf_w
	.comm	_BUF_MASK,4,2                   ## @BUF_MASK
	.comm	_BUF_LEN,4,2                    ## @BUF_LEN
	.comm	_buf,8,3                        ## @buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sndout_sdl_write_nb            ; -- Begin function sndout_sdl_write_nb
	.p2align	2
_sndout_sdl_write_nb:                   ; @sndout_sdl_write_nb
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _buf_r@GOTPAGE
Lloh1:
	ldr	x8, [x8, _buf_r@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x21, _buf_w@GOTPAGE
Lloh4:
	ldr	x21, [x21, _buf_w@GOTPAGEOFF]
	ldr	w8, [x21]
	sub	w9, w9, w8
	sub	w9, w9, #2
Lloh5:
	adrp	x22, _BUF_MASK@GOTPAGE
Lloh6:
	ldr	x22, [x22, _BUF_MASK@GOTPAGEOFF]
	ldr	w10, [x22]
	and	w9, w9, w10
	cmp	w1, #0
	cinc	w10, w1, lt
	asr	w10, w10, #1
	cmp	w10, w9
	csel	w20, w10, w9, lt
	cbz	w20, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh7:
	adrp	x9, _BUF_LEN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _BUF_LEN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	sub	w25, w9, w8
	subs	w23, w20, w25
Lloh10:
	adrp	x24, _buf@GOTPAGE
Lloh11:
	ldr	x24, [x24, _buf@GOTPAGEOFF]
	b.le	LBB0_3
; %bb.2:
	sxtw	x8, w8
	ldr	x9, [x24]
	add	x0, x9, x8
	lsl	w2, w25, #1
	mov	x1, x19
	bl	_memcpy
	mov	w8, #0
	add	x19, x19, w25, sxtw #1
	str	wzr, [x21]
	b	LBB0_4
LBB0_3:
	mov	x23, x20
LBB0_4:
	ldr	x9, [x24]
	add	x0, x9, w8, sxtw
	lsl	w2, w23, #1
	mov	x1, x19
	bl	_memcpy
	ldr	w8, [x21]
	ldr	w9, [x22]
	add	w8, w8, w23
	and	w8, w8, w9
	str	w8, [x21]
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_buf_r,4,2                      ; @buf_r
	.comm	_buf_w,4,2                      ; @buf_w
	.comm	_BUF_MASK,4,2                   ; @BUF_MASK
	.comm	_BUF_LEN,4,2                    ; @BUF_LEN
	.comm	_buf,8,3                        ; @buf
.subsections_via_symbols
