	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vwsnd_audio_do_write
_vwsnd_audio_do_write:                  ## @vwsnd_audio_do_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rsi, %rdx
	movq	%rdi, %r13
	movq	8(%rdi), %rsi
	movq	_FMODE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	(%rdi), %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	leaq	24(%rsi), %r14
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movq	%rdx, %r12
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	callq	_DBGEV
	xorl	%eax, %eax
	movl	$0, %r15d
	testl	%ebx, %ebx
	cmovneq	%r14, %r15
	je	LBB0_1
## %bb.2:
	cmpq	$0, 8(%r15)
	jne	LBB0_4
## %bb.3:
	movq	_FMODE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	andl	(%r13), %eax
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	cmovneq	%rdi, %rsi
	movq	%r15, %rdx
	callq	_pcm_setup
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_20
LBB0_4:
	movq	_VERIFY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rbx
	movq	%r12, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_access_ok
	testl	%eax, %eax
	je	LBB0_17
## %bb.5:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_6
## %bb.7:
	leaq	16(%r15), %r12
	movq	_wait@GOTPCREL(%rip), %r14
	movq	_current@GOTPCREL(%rip), %rax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	(%r14), %edi
	movq	(%rax), %rsi
	callq	_DECLARE_WAITQUEUE
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_add_wait_queue
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_swb_inc_u
	testl	%eax, %eax
	jne	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	jne	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=2
	xorl	%eax, %eax
	callq	_schedule
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_9
	jmp	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %r14d
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_current@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_remove_wait_queue
	movslq	%r14d, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	cmovael	%r14d, %eax
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DBGPV
	movslq	4(%r15), %rdi
	shlq	$2, %rdi
	addq	8(%r15), %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_copy_from_user
	testq	%rax, %rax
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_pcm_output
	movslq	%r14d, %rax
	addq	%rax, %rbx
	addl	%r14d, -44(%rbp)                ## 4-byte Folded Spill
	subq	%rax, -56(%rbp)                 ## 8-byte Folded Spill
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	_current@GOTPCREL(%rip), %rax
	movq	_wait@GOTPCREL(%rip), %r14
	jne	LBB0_8
	jmp	LBB0_19
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_17:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_12:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_current@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_remove_wait_queue
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_6:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_19:
	leaq	L_.str.2(%rip), %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_DBGPV
	movl	%ebx, %eax
	jmp	LBB0_20
LBB0_15:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_current@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_remove_wait_queue
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
LBB0_13:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	cmovnel	%ecx, %eax
LBB0_20:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(file=0x%p, buffer=0x%p, count=%d, ppos=0x%p)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FMODE_READ,4,2                 ## @FMODE_READ
	.comm	_VERIFY_WRITE,4,2               ## @VERIFY_WRITE
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_wait,4,2                       ## @wait
	.comm	_current,8,3                    ## @current
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_DISABLED,4,2                   ## @DISABLED
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_TASK_RUNNING,8,3               ## @TASK_RUNNING
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
L_.str.1:                               ## @.str.1
	.asciz	"nb = %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"returning %d\n"

	.no_dead_strip	_vwsnd_audio_do_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vwsnd_audio_do_write
_vwsnd_audio_do_write:                  ; @vwsnd_audio_do_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x4, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x23, [x0, #8]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _FMODE_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FMODE_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	x10, x23, #24
	ands	w19, w9, w8
	csel	x24, xzr, x10, eq
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_DBGEV
	cbz	w19, LBB0_14
; %bb.1:
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	w8, [x22]
Lloh5:
	adrp	x9, _FMODE_READ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FMODE_READ@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	csel	x1, xzr, x23, eq
	mov	x0, x23
	mov	x2, x24
	bl	_pcm_setup
	tbnz	w0, #31, LBB0_18
LBB0_3:
Lloh8:
	adrp	x8, _VERIFY_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VERIFY_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x20
	bl	_access_ok
	cbz	w0, LBB0_15
; %bb.4:
	mov	w19, #0
	cbz	x20, LBB0_13
; %bb.5:
	add	x28, x24, #16
Lloh11:
	adrp	x26, _wait@GOTPAGE
Lloh12:
	ldr	x26, [x26, _wait@GOTPAGEOFF]
Lloh13:
	adrp	x27, _current@GOTPAGE
Lloh14:
	ldr	x27, [x27, _current@GOTPAGEOFF]
Lloh15:
	adrp	x25, _DISABLED@GOTPAGE
Lloh16:
	ldr	x25, [x25, _DISABLED@GOTPAGEOFF]
	str	x28, [sp, #8]                   ; 8-byte Folded Spill
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w0, [x26]
	ldr	x1, [x27]
	bl	_DECLARE_WAITQUEUE
	mov	x0, x28
	mov	x1, x26
	bl	_add_wait_queue
Lloh17:
	adrp	x26, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh18:
	ldr	x26, [x26, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
LBB0_7:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x24
	mov	w1, #0
	bl	_swb_inc_u
	cbnz	w0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w0, [x26]
	bl	_set_current_state
	ldr	w8, [x24]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w8, [x22, #4]
Lloh19:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	bl	_schedule
	ldr	x0, [x27]
	bl	_signal_pending
	cbz	x0, LBB0_7
	b	LBB0_19
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x28, x0
Lloh22:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	x9, [x27]
	str	x8, [x9]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
Lloh25:
	adrp	x1, _wait@GOTPAGE
Lloh26:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	bl	_remove_wait_queue
	cmp	x20, w28, sxtw
	csel	w28, w20, w28, lo
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x28
	bl	_DBGPV
	ldr	x8, [x24, #8]
	ldrsw	x9, [x24, #4]
	add	x0, x8, x9, lsl #2
	mov	x1, x21
	mov	x2, x28
	bl	_copy_from_user
	cbnz	x0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	mov	w1, #0
	mov	x2, x28
	bl	_pcm_output
	sxtw	x8, w28
	add	x21, x21, x8
	add	w19, w28, w19
	subs	x20, x20, x8
	ldr	x28, [sp, #8]                   ; 8-byte Folded Reload
Lloh29:
	adrp	x26, _wait@GOTPAGE
Lloh30:
	ldr	x26, [x26, _wait@GOTPAGEOFF]
	b.ne	LBB0_6
LBB0_13:
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_DBGPV
	b	LBB0_21
LBB0_14:
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh35:
	adrp	x8, _EFAULT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_21
LBB0_17:
Lloh37:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh38:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	ldr	x9, [x27]
	str	x8, [x9]
Lloh40:
	adrp	x1, _wait@GOTPAGE
Lloh41:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_remove_wait_queue
Lloh42:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_20
LBB0_18:
	mov	x19, x0
	b	LBB0_21
LBB0_19:
Lloh44:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh45:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	ldr	x9, [x27]
	str	x8, [x9]
Lloh47:
	adrp	x1, _wait@GOTPAGE
Lloh48:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_remove_wait_queue
Lloh49:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	cmp	w19, #0
	csneg	w19, w19, w8, ne
LBB0_21:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(file=0x%p, buffer=0x%p, count=%d, ppos=0x%p)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FMODE_READ,4,2                 ; @FMODE_READ
	.comm	_VERIFY_WRITE,4,2               ; @VERIFY_WRITE
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_wait,4,2                       ; @wait
	.comm	_current,8,3                    ; @current
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_DISABLED,4,2                   ; @DISABLED
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_TASK_RUNNING,8,3               ; @TASK_RUNNING
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
l_.str.1:                               ; @.str.1
	.asciz	"nb = %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"returning %d\n"

	.no_dead_strip	_vwsnd_audio_do_write
.subsections_via_symbols
