	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wasapi_write
_wasapi_write:                          ## @wasapi_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	cmpq	$0, 8(%rdi)
	je	LBB0_9
## %bb.1:
	xorl	%ebx, %ebx
	testq	%r15, %r15
	je	LBB0_8
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r14,%rbx), %rsi
	movq	%r15, %rdx
	subq	%rbx, %rdx
	cmpq	$0, (%r12)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_wasapi_write_ex
	cmpq	$-1, %rax
	jne	LBB0_2
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_wasapi_write_sh
	cmpq	$-1, %rax
	je	LBB0_7
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %rbx
	cmpq	%r15, %rbx
	jb	LBB0_3
	jmp	LBB0_8
LBB0_9:
	cmpq	$0, (%r12)
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wasapi_write_ex                ## TAILCALL
LBB0_7:
	movq	$-1, %rbx
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wasapi_write_sh                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_wasapi_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wasapi_write
_wasapi_write:                          ; @wasapi_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x22, #0
	cbz	x19, LBB0_9
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x1, x20, x22
	sub	x2, x19, x22
	mov	x0, x21
	cbz	x8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_wasapi_write_ex
	cmn	x0, #1
	b.ne	LBB0_5
	b	LBB0_8
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_wasapi_write_sh
	cmn	x0, #1
	b.eq	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x0, x22
	cmp	x22, x19
	b.lo	LBB0_2
	b	LBB0_9
LBB0_6:
	ldr	x8, [x21]
	cbz	x8, LBB0_10
; %bb.7:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wasapi_write_ex
LBB0_8:
	mov	x22, #-1
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wasapi_write_sh
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_wasapi_write
.subsections_via_symbols
