	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_packet
_read_packet:                           ## @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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movl	4(%r14), %edi
	movq	_ALC_CAPTURE_SAMPLES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rcx
	movl	$4, %edx
	callq	_alcGetIntegerv
	movl	4(%r14), %edi
	leaq	-56(%rbp), %rsi
	callq	_al_get_error
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_7:
	cmpq	$0, 8(%r12)
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_av_packet_unref
LBB0_9:
	movq	-56(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %r12
	leaq	-56(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %esi
	testl	%esi, %esi
	jg	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AVFMT_FLAG_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_av_usleep
	movl	4(%r14), %edi
	movq	_ALC_CAPTURE_SAMPLES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	movq	%r12, %rcx
	callq	_alcGetIntegerv
	movl	4(%r14), %edi
	movq	%r13, %rsi
	callq	_al_get_error
	testl	%eax, %eax
	je	LBB0_2
## %bb.6:
	movl	%eax, %ebx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_11:
	imull	(%r14), %esi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	xorl	%eax, %eax
	callq	_av_gettime
	movl	%eax, 16(%r12)
	movl	4(%r14), %edi
	movq	8(%r12), %rsi
	movl	-44(%rbp), %edx
	callq	_alcCaptureSamples
	movl	4(%r14), %edi
	leaq	-56(%rbp), %rsi
	callq	_al_get_error
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.14:
	movl	(%r12), %ebx
	jmp	LBB0_15
LBB0_4:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_12:
	movl	%eax, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ALC_CAPTURE_SAMPLES,4,2        ## @ALC_CAPTURE_SAMPLES
	.comm	_AVFMT_FLAG_NONBLOCK,4,2        ## @AVFMT_FLAG_NONBLOCK
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: %s\n"

	.no_dead_strip	_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_packet
_read_packet:                           ; @read_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x22, #4]
Lloh0:
	adrp	x23, _ALC_CAPTURE_SAMPLES@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ALC_CAPTURE_SAMPLES@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x3, sp, #4
	mov	w2, #4
	bl	_alcGetIntegerv
	ldr	w0, [x22, #4]
	add	x1, sp, #8
	bl	_al_get_error
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.1:
Lloh2:
	adrp	x24, _AVFMT_FLAG_NONBLOCK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _AVFMT_FLAG_NONBLOCK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #4]
	cmp	w8, #0
	b.gt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1000
	bl	_av_usleep
	ldr	w0, [x22, #4]
	ldr	w1, [x23]
	add	x3, sp, #4
	mov	w2, #4
	bl	_alcGetIntegerv
	ldr	w0, [x22, #4]
	add	x1, sp, #8
	bl	_al_get_error
	cbz	w0, LBB0_2
	b	LBB0_8
LBB0_5:
	ldr	w9, [x22]
	mul	w1, w9, w8
	mov	x0, x20
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_8
; %bb.6:
	bl	_av_gettime
	str	w0, [x20, #16]
	ldr	w0, [x22, #4]
	ldr	x1, [x20, #8]
	ldr	w2, [sp, #4]
	bl	_alcCaptureSamples
	ldr	w0, [x22, #4]
	add	x1, sp, #8
	bl	_al_get_error
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	w21, [x20]
	b	LBB0_13
LBB0_8:
	mov	x21, x0
LBB0_9:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_av_packet_unref
LBB0_11:
	ldr	x3, [sp, #8]
	cbz	x3, LBB0_13
; %bb.12:
Lloh4:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_13:
	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
	add	sp, sp, #80
	ret
LBB0_14:
Lloh9:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ALC_CAPTURE_SAMPLES,4,2        ; @ALC_CAPTURE_SAMPLES
	.comm	_AVFMT_FLAG_NONBLOCK,4,2        ; @AVFMT_FLAG_NONBLOCK
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: %s\n"

	.no_dead_strip	_read_packet
.subsections_via_symbols
