	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_audio_frame
_encode_audio_frame:                    ## @encode_audio_frame
	.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	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	leaq	-44(%rbp), %rdi
	callq	_init_packet
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	_pts@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, 8(%rbx)
	addl	(%rbx), %ecx
	movl	%ecx, (%rax)
LBB0_2:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_avcodec_send_frame
	movq	_AVERROR_EOF@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	cmpl	(%r14), %eax
	jne	LBB0_3
LBB0_12:
	leaq	-44(%rbp), %rdi
	callq	_av_packet_unref
LBB0_13:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	callq	_avcodec_receive_packet
	movl	%eax, %ebx
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	cmpl	%eax, %ebx
	je	LBB0_12
## %bb.6:
	cmpl	(%r14), %ebx
	je	LBB0_12
## %bb.7:
	testl	%ebx, %ebx
	js	LBB0_8
## %bb.9:
	movl	$1, (%r15)
	leaq	-44(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_write_frame
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_12
## %bb.10:
	leaq	L_.str.2(%rip), %r14
	jmp	LBB0_11
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movl	%ebx, %r12d
	jmp	LBB0_13
LBB0_8:
	leaq	L_.str.1(%rip), %r14
	movl	%ebx, %r12d
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_av_err2str
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_fprintf
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_pts,4,2                        ## @pts
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not send packet for encoding (error '%s')\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.1:                               ## @.str.1
	.asciz	"Could not encode frame (error '%s')\n"

L_.str.2:                               ## @.str.2
	.asciz	"Could not write frame (error '%s')\n"

	.no_dead_strip	_encode_audio_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_audio_frame
_encode_audio_frame:                    ; @encode_audio_frame
	.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	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	add	x0, sp, #12
	bl	_init_packet
	cbz	x19, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _pts@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pts@GOTPAGEOFF]
	ldr	w9, [x8]
	str	w9, [x19, #8]
	ldr	w10, [x19]
	add	w9, w9, w10
	str	w9, [x8]
LBB0_2:
	mov	x0, x22
	mov	x1, x19
	bl	_avcodec_send_frame
Lloh2:
	adrp	x23, _AVERROR_EOF@GOTPAGE
Lloh3:
	ldr	x23, [x23, _AVERROR_EOF@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.3:
	mov	x19, x0
	tbnz	w0, #31, LBB0_8
; %bb.4:
	add	x1, sp, #12
	mov	x0, x22
	bl	_avcodec_receive_packet
	mov	x19, x0
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_AVERROR
	ldr	w8, [x23]
	cmp	w19, w0
	ccmp	w19, w8, #4, ne
	b.ne	LBB0_9
LBB0_5:
	mov	w19, #0
LBB0_6:
	add	x0, sp, #12
	bl	_av_packet_unref
LBB0_7:
	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
	add	sp, sp, #80
	ret
LBB0_8:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_av_err2str
	mov	x2, x0
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	b	LBB0_7
LBB0_9:
	tbnz	w19, #31, LBB0_12
; %bb.10:
	mov	w8, #1
	str	w8, [x21]
	add	x1, sp, #12
	mov	x0, x20
	bl	_av_write_frame
	mov	x19, x0
	tbz	w0, #31, LBB0_6
; %bb.11:
Lloh12:
	adrp	x20, l_.str.2@PAGE
Lloh13:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh14:
	adrp	x20, l_.str.1@PAGE
Lloh15:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_13:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_av_err2str
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_fprintf
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_pts,4,2                        ; @pts
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not send packet for encoding (error '%s')\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.1:                               ; @.str.1
	.asciz	"Could not encode frame (error '%s')\n"

l_.str.2:                               ; @.str.2
	.asciz	"Could not write frame (error '%s')\n"

	.no_dead_strip	_encode_audio_frame
.subsections_via_symbols
