	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gx_audio_write
_gx_audio_write:                        ## @gx_audio_write
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	cmpq	$4, %rdx
	jae	LBB0_1
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	shrq	$2, %r13
	movq	(%rdi), %rdi
	movq	_CHUNK_FRAMES@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%rbx,4), %r12
	testq	%r13, %r13
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rbx
	subq	%rdi, %rbx
	cmpq	%rbx, %r13
	cmovbq	%r13, %rbx
	movq	8(%r15), %rax
	movq	32(%r15), %rcx
	addq	(%rcx,%rax,8), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_copy_swapped
	movq	(%r15), %rdi
	addq	%rbx, %rdi
	movq	%rdi, (%r15)
	subq	%rbx, %r13
	movq	%rdi, %rax
	subq	(%r14), %rax
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, (%r15)
	movq	8(%r15), %rcx
	incq	%rcx
	movq	_BLOCKS@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	decq	%rdx
	andq	%rcx, %rdx
	movq	%rdx, 8(%r15)
	movq	%rax, %rdi
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_CHUNK_FRAMES,8,3               ## @CHUNK_FRAMES
	.comm	_BLOCKS,4,2                     ## @BLOCKS
	.no_dead_strip	_gx_audio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gx_audio_write
_gx_audio_write:                        ; @gx_audio_write
	.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
	mov	x19, x2
	cmp	x2, #4
	b.hs	LBB0_2
LBB0_1:
	mov	x0, x19
	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
LBB0_2:
	mov	x20, x1
	mov	x21, x0
	lsr	x23, x19, #2
	ldr	x8, [x0]
Lloh0:
	adrp	x24, _CHUNK_FRAMES@GOTPAGE
Lloh1:
	ldr	x24, [x24, _CHUNK_FRAMES@GOTPAGEOFF]
Lloh2:
	adrp	x25, _BLOCKS@GOTPAGE
Lloh3:
	ldr	x25, [x25, _BLOCKS@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, x22, lsl #2
	cbz	x23, LBB0_1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	sub	x9, x9, x8
	cmp	x23, x9
	csel	x22, x23, x9, lo
	ldr	x9, [x21, #8]
	ldr	x10, [x21, #32]
	ldr	x9, [x10, x9, lsl #3]
	add	x0, x9, x8
	mov	x1, x20
	mov	x2, x22
	bl	_copy_swapped
	ldr	x8, [x21]
	add	x8, x8, x22
	str	x8, [x21]
	sub	x23, x23, x22
	ldr	x9, [x24]
	subs	x9, x8, x9
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #8]
	add	x8, x8, #1
	ldrsw	x10, [x25]
	sub	x10, x10, #1
	and	x8, x8, x10
	stp	x9, x8, [x21]
	mov	x8, x9
	b	LBB0_3
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CHUNK_FRAMES,8,3               ; @CHUNK_FRAMES
	.comm	_BLOCKS,4,2                     ; @BLOCKS
	.no_dead_strip	_gx_audio_write
.subsections_via_symbols
