	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pulse_read_packet
_pulse_read_packet:                     ## @pulse_read_packet
	.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	%rsi, %r15
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	movq	$0, -48(%rbp)
	movl	8(%rbx), %edi
	callq	_pa_threaded_mainloop_lock
	movq	_unlock_and_fail@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_CHECK_DEAD_GOTO
	leaq	-48(%rbp), %r12
	leaq	-56(%rbp), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%rbx), %edi
	callq	_pa_threaded_mainloop_wait
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_CHECK_DEAD_GOTO
	cmpq	$0, -48(%rbp)
	jne	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%rbx), %edi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_pa_stream_peek
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	(%r14), %edx
	callq	_CHECK_SUCCESS_GOTO
	cmpq	$0, -56(%rbp)
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, -48(%rbp)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	12(%rbx), %edi
	callq	_pa_stream_drop
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	(%r14), %edx
	callq	_CHECK_SUCCESS_GOTO
	cmpq	$0, -48(%rbp)
	je	LBB0_1
LBB0_6:
	movq	-56(%rbp), %rsi
	movq	%r15, %r14
	movq	%r15, %rdi
	callq	_av_new_packet
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	xorl	%eax, %eax
	callq	_av_gettime
	movl	%eax, %r12d
	movl	12(%rbx), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_pa_stream_update_timing_info
	movl	%eax, %edi
	callq	_pa_operation_unref
	movl	12(%rbx), %edi
	leaq	-80(%rbp), %rsi
	leaq	-60(%rbp), %rdx
	callq	_pa_stream_get_latency
	testq	%rax, %rax
	js	LBB0_17
## %bb.9:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_AV_CODEC_ID_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_11
## %bb.10:
	movq	_DEFAULT_CODEC_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_11:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_av_get_bits_per_sample
	sarl	$3, %eax
	movslq	(%rbx), %rdx
	movslq	%eax, %rcx
	imulq	%rdx, %rcx
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_12
## %bb.13:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r15
	cmpq	$0, 24(%rbx)
	je	LBB0_16
LBB0_15:
	movl	-80(%rbp), %eax
	movl	%eax, %esi
	negl	%esi
	cmpl	$0, -60(%rbp)
	cmovnel	%eax, %esi
	addl	%r12d, %esi
	movl	4(%rbx), %edx
	movl	16(%rbx), %edi
	callq	_ff_timefilter_update
	movl	%eax, 4(%r14)
LBB0_16:
	movl	%r15d, 4(%rbx)
	jmp	LBB0_18
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	jmp	LBB0_19
LBB0_17:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
LBB0_18:
	movl	(%r14), %edi
	movq	-48(%rbp), %rsi
	movq	-56(%rbp), %rdx
	callq	_memcpy
	movl	12(%rbx), %edi
	callq	_pa_stream_drop
	xorl	%r14d, %r14d
LBB0_19:
	movl	8(%rbx), %edi
	callq	_pa_threaded_mainloop_unlock
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r15d
	cmpq	$0, 24(%rbx)
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_unlock_and_fail,4,2            ## @unlock_and_fail
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_CODEC_ID_NONE,8,3           ## @AV_CODEC_ID_NONE
	.comm	_DEFAULT_CODEC_ID,4,2           ## @DEFAULT_CODEC_ID
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pa_stream_get_latency() failed\n"

	.no_dead_strip	_pulse_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pulse_read_packet
_pulse_read_packet:                     ; @pulse_read_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	str	xzr, [sp, #16]
	ldr	w0, [x19, #8]
	bl	_pa_threaded_mainloop_lock
Lloh0:
	adrp	x22, _unlock_and_fail@GOTPAGE
Lloh1:
	ldr	x22, [x22, _unlock_and_fail@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_CHECK_DEAD_GOTO
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #8]
	bl	_pa_threaded_mainloop_wait
	ldr	w2, [x22]
	mov	x0, x19
	bl	_CHECK_DEAD_GOTO
	ldr	x8, [sp, #16]
	cbnz	x8, LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #12]
	add	x1, sp, #16
	add	x2, sp, #24
	bl	_pa_stream_peek
	cmp	w0, #0
	cset	w1, eq
	ldr	w2, [x22]
	bl	_CHECK_SUCCESS_GOTO
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp, #16]
	cbnz	x8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #12]
	bl	_pa_stream_drop
	cmp	w0, #0
	cset	w1, eq
	ldr	w2, [x22]
	bl	_CHECK_SUCCESS_GOTO
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_2
LBB0_5:
	ldr	x1, [sp, #24]
	mov	x0, x20
	bl	_av_new_packet
	tbnz	x0, #63, LBB0_10
; %bb.6:
	bl	_av_gettime
	mov	x22, x0
	ldr	w0, [x19, #12]
	mov	x1, #0
	mov	x2, #0
	bl	_pa_stream_update_timing_info
	bl	_pa_operation_unref
	ldr	w0, [x19, #12]
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_pa_stream_get_latency
	tbnz	x0, #63, LBB0_11
; %bb.7:
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _AV_CODEC_ID_NONE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AV_CODEC_ID_NONE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _DEFAULT_CODEC_ID@GOTPAGE
Lloh6:
	ldr	x10, [x10, _DEFAULT_CODEC_ID@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w0, w10, w8, eq
	bl	_av_get_bits_per_sample
                                        ; kill: def $w0 killed $w0 def $x0
	ldrsw	x8, [x19]
	sbfx	x9, x0, #3, #29
	mul	x8, x9, x8
	ldr	x9, [sp, #24]
	ldr	x10, [x19, #24]
	udiv	x21, x9, x8
	cbz	x10, LBB0_9
; %bb.8:
	ldp	w8, w9, [sp, #4]
	cmp	w8, #0
	cneg	w8, w9, eq
	add	w1, w8, w22
	ldr	w0, [x19, #16]
	ldr	w2, [x19, #4]
	bl	_ff_timefilter_update
	str	w0, [x20, #4]
LBB0_9:
	str	w21, [x19, #4]
	b	LBB0_12
LBB0_10:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	b	LBB0_13
LBB0_11:
Lloh11:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
LBB0_12:
	ldr	w0, [x20]
	ldp	x1, x2, [sp, #16]
	bl	_memcpy
	ldr	w0, [x19, #12]
	bl	_pa_stream_drop
	mov	w20, #0
LBB0_13:
	ldr	w0, [x19, #8]
	bl	_pa_threaded_mainloop_unlock
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_unlock_and_fail,4,2            ; @unlock_and_fail
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_CODEC_ID_NONE,8,3           ; @AV_CODEC_ID_NONE
	.comm	_DEFAULT_CODEC_ID,4,2           ; @DEFAULT_CODEC_ID
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pa_stream_get_latency() failed\n"

	.no_dead_strip	_pulse_read_packet
.subsections_via_symbols
