	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vx_pcm_capture_update
_vx_pcm_capture_update:                 ## @vx_pcm_capture_update
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdx)
	je	LBB0_19
## %bb.1:
	movq	%rdi, %r15
	movq	_VX_STAT_IS_STALE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_19
## %bb.2:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	(%rsi), %r12
	movl	(%r12), %r13d
	movq	%r12, %rdi
	callq	_snd_pcm_capture_avail
	subl	%eax, %r13d
	jne	LBB0_3
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_frames_to_bytes
	movl	%eax, %ebx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_vx_query_hbuffer_size
	testl	%eax, %eax
	js	LBB0_18
## %bb.4:
	cmpl	%eax, %ebx
	cmovll	%ebx, %eax
	cltq
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	addl	%ecx, %eax
	leal	(%rax,%rax,2), %eax
	movq	_DMA_READ_ALIGN@GOTPCREL(%rip), %rcx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %r13d
	subl	(%rcx), %r13d
	jge	LBB0_5
LBB0_18:
	movq	_IRQ_CONNECT_STREAM_NEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vx_send_rih_nolock             ## TAILCALL
LBB0_5:
	jle	LBB0_13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	movl	4(%r14), %ecx
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	callq	_vx_wait_for_rx_full
	testq	%rax, %rax
	js	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_vx_pcm_read_per_bytes
	leal	-3(%r13), %eax
	cmpl	$3, %r13d
	movl	%eax, %r13d
	jg	LBB0_6
	jmp	LBB0_13
LBB0_9:
	leal	(%rcx,%rcx,2), %ecx
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%edx, %ebx
	subl	%edx, %r13d
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	callq	_vx_pseudo_dma_read
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.10:
	addl	$3, %ebx
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_vx_wait_for_rx_full
	testq	%rax, %rax
	js	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_vx_pcm_read_per_bytes
	addl	$-3, %ebx
	cmpl	$3, %ebx
	jg	LBB0_11
LBB0_13:
	movq	_IRQ_CONNECT_STREAM_NEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vx_send_rih_nolock
	movq	_DMA_READ_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_16
## %bb.14:
	addl	$3, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_vx_pcm_read_per_bytes
	addl	$-3, %ebx
	cmpl	$3, %ebx
	ja	LBB0_15
LBB0_16:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	8(%r14), %eax
	movl	%eax, 8(%r14)
	movl	12(%r14), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_19
## %bb.17:
	cltd
	idivl	%ecx
	movl	%edx, 8(%r14)
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_pcm_period_elapsed         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VX_STAT_IS_STALE,4,2           ## @VX_STAT_IS_STALE
	.comm	_DMA_READ_ALIGN,4,2             ## @DMA_READ_ALIGN
	.comm	_IRQ_CONNECT_STREAM_NEXT,4,2    ## @IRQ_CONNECT_STREAM_NEXT
	.no_dead_strip	_vx_pcm_capture_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vx_pcm_capture_update
_vx_pcm_capture_update:                 ; @vx_pcm_capture_update
	.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
	ldr	w8, [x2, #16]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _VX_STAT_IS_STALE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VX_STAT_IS_STALE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	mov	x20, x2
	mov	x19, x1
	ldr	x22, [x1]
	ldr	w23, [x22]
	mov	x0, x22
	bl	_snd_pcm_capture_avail
	subs	w1, w23, w0
	b.ne	LBB0_4
LBB0_3:
	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_4:
	mov	x0, x22
	bl	_frames_to_bytes
	mov	x23, x0
	mov	x0, x21
	mov	x1, x20
	bl	_vx_query_hbuffer_size
	tbnz	w0, #31, LBB0_6
; %bb.5:
	cmp	w23, w0
	csel	w8, w23, w0, lt
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	add	w23, w8, w8, lsl #1
Lloh3:
	adrp	x24, _DMA_READ_ALIGN@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DMA_READ_ALIGN@GOTPAGEOFF]
	ldr	w8, [x24]
	subs	w25, w23, w8
	b.ge	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _IRQ_CONNECT_STREAM_NEXT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQ_CONNECT_STREAM_NEXT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	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
	b	_vx_send_rih_nolock
LBB0_7:
	cmp	w25, #1
	b.lt	LBB0_15
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w9, w8, [x20]
	sdiv	w10, w9, w8
	msub	w9, w10, w8, w9
	cbz	w9, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_vx_wait_for_rx_full
	tbnz	x0, #63, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_vx_pcm_read_per_bytes
	subs	w25, w25, #3
	b.gt	LBB0_8
	b	LBB0_15
LBB0_11:
	add	w8, w8, w8, lsl #1
	sdiv	w9, w25, w8
	mul	w3, w9, w8
	sub	w25, w25, w3
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_vx_pseudo_dma_read
	cbz	w25, LBB0_15
; %bb.12:
	add	w25, w25, #3
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_vx_wait_for_rx_full
	tbnz	x0, #63, LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_vx_pcm_read_per_bytes
	sub	w25, w25, #3
	cmp	w25, #3
	b.gt	LBB0_13
LBB0_15:
Lloh8:
	adrp	x8, _IRQ_CONNECT_STREAM_NEXT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQ_CONNECT_STREAM_NEXT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_vx_send_rih_nolock
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	add	w24, w8, #3
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_vx_pcm_read_per_bytes
	sub	w24, w24, #3
	cmp	w24, #3
	b.hi	LBB0_17
LBB0_18:
	ldp	w9, w8, [x20, #8]
	add	w9, w9, w23
	cmp	w9, w8
	str	w9, [x20, #8]
	b.lt	LBB0_3
; %bb.19:
	sdiv	w10, w9, w8
	msub	w8, w10, w8, w9
	str	w8, [x20, #8]
	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
	b	_snd_pcm_period_elapsed
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_VX_STAT_IS_STALE,4,2           ; @VX_STAT_IS_STALE
	.comm	_DMA_READ_ALIGN,4,2             ; @DMA_READ_ALIGN
	.comm	_IRQ_CONNECT_STREAM_NEXT,4,2    ; @IRQ_CONNECT_STREAM_NEXT
	.no_dead_strip	_vx_pcm_capture_update
.subsections_via_symbols
