	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_pcm_capture_forward
_snd_pcm_capture_forward:               ## @snd_pcm_capture_forward
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %r15
	callq	_snd_pcm_stream_lock_irq
	movq	16(%r15), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_8
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:
	movq	%r15, %rdi
	callq	_snd_pcm_capture_avail
	testq	%rax, %rax
	jle	LBB0_10
## %bb.11:
	cmpq	%rbx, %rax
	cmovlq	%rax, %rbx
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	movq	(%rcx), %rdx
	addq	%rbx, %rdx
	xorl	%esi, %esi
	cmpq	%rax, %rdx
	cmovgeq	%rax, %rsi
	subq	%rsi, %rdx
	movq	%rdx, (%rcx)
	jmp	LBB0_12
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_7:
	movq	_ESTRPIPE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	%r14, %rdi
	callq	_snd_pcm_update_hw_ptr
	testl	%eax, %eax
	jns	LBB0_9
LBB0_5:
	movq	_EPIPE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	_EBADFD@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
LBB0_12:
	movq	%r14, %rdi
	callq	_snd_pcm_stream_unlock_irq
LBB0_13:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_EPIPE,8,3                      ## @EPIPE
	.comm	_ESTRPIPE,8,3                   ## @ESTRPIPE
	.comm	_EBADFD,8,3                     ## @EBADFD
	.no_dead_strip	_snd_pcm_capture_forward
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_pcm_capture_forward
_snd_pcm_capture_forward:               ; @snd_pcm_capture_forward
	.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	x21, x1
	cbz	x1, LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0]
	bl	_snd_pcm_stream_lock_irq
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_9
; %bb.2:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	x0, x20
	bl	_snd_pcm_capture_avail
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.4:
	cmp	x0, x21
	csel	x21, x0, x21, lt
	ldp	x9, x8, [x20]
	ldr	x10, [x8]
	add	x10, x10, x21
	cmp	x10, x9
	csel	x9, xzr, x9, lt
	sub	x9, x10, x9
	str	x9, [x8]
	b	LBB0_11
LBB0_5:
	mov	x21, #0
	b	LBB0_11
LBB0_6:
Lloh2:
	adrp	x8, _ESTRPIPE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ESTRPIPE@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_snd_pcm_update_hw_ptr
	tbz	w0, #31, LBB0_3
LBB0_8:
Lloh4:
	adrp	x8, _EPIPE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _EBADFD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBADFD@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	neg	x21, x8
LBB0_11:
	mov	x0, x19
	bl	_snd_pcm_stream_unlock_irq
LBB0_12:
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
                                        ; -- End function
	.comm	_EPIPE,8,3                      ; @EPIPE
	.comm	_ESTRPIPE,8,3                   ; @ESTRPIPE
	.comm	_EBADFD,8,3                     ; @EBADFD
	.no_dead_strip	_snd_pcm_capture_forward
.subsections_via_symbols
