	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pulse_write
_pulse_write:                           ## @pulse_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, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpq	$0, 16(%rdi)
	je	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pulse_start
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movl	(%r14), %edi
	callq	_pa_threaded_mainloop_lock
	xorl	%r12d, %r12d
	testq	%r13, %r13
	jne	LBB0_5
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
	movl	8(%r14), %edi
	movq	_PA_SEEK_RELATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r15, %rsi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_pa_stream_write
	leaq	(%r15,%rbx,4), %r15
	subq	%rbx, %r13
	addq	%rbx, %r12
	testq	%r13, %r13
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r14), %edi
	callq	_pa_stream_writable_size
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_MIN
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, 4(%r14)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %edi
	callq	_pa_threaded_mainloop_wait
	testq	%r13, %r13
	jne	LBB0_5
LBB0_9:
	movl	(%r14), %edi
	callq	_pa_threaded_mainloop_unlock
	jmp	LBB0_10
LBB0_2:
	movl	$-1, %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PA_SEEK_RELATIVE,4,2           ## @PA_SEEK_RELATIVE
	.no_dead_strip	_pulse_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pulse_write
_pulse_write:                           ; @pulse_write
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_pulse_start
	cbz	w0, LBB0_9
LBB0_2:
	ldr	w0, [x19]
	bl	_pa_threaded_mainloop_lock
	mov	x22, #0
	cbz	x20, LBB0_8
; %bb.3:
Lloh0:
	adrp	x24, _PA_SEEK_RELATIVE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PA_SEEK_RELATIVE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	ldr	w0, [x19, #8]
	ldr	w5, [x24]
	mov	x1, x21
	mov	x2, x23
	mov	x3, #0
	mov	w4, #0
	bl	_pa_stream_write
	add	x21, x21, x23, lsl #2
	sub	x20, x20, x23
	add	x22, x23, x22
	cbz	x20, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #8]
	bl	_pa_stream_writable_size
	mov	x1, x0
	mov	x0, x20
	bl	_MIN
	cbnz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19]
	bl	_pa_threaded_mainloop_wait
	cbnz	x20, LBB0_5
LBB0_8:
	ldr	w0, [x19]
	bl	_pa_threaded_mainloop_unlock
	b	LBB0_10
LBB0_9:
	mov	w22, #-1
LBB0_10:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PA_SEEK_RELATIVE,4,2           ; @PA_SEEK_RELATIVE
	.no_dead_strip	_pulse_write
.subsections_via_symbols
