	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	$0, -96(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -64(%rbp)
	cmpl	$3, %edi
	jne	LBB0_36
## %bb.1:
	movq	_AVERROR_EXIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	8(%rbx), %rdi
	leaq	-96(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	callq	_open_input_file
	testq	%rax, %rax
	jne	LBB0_24
## %bb.2:
	movq	16(%rbx), %rdi
	movq	-80(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_open_output_file
	testq	%rax, %rax
	jne	LBB0_24
## %bb.3:
	movq	-80(%rbp), %rdi
	movq	-48(%rbp), %rsi
	leaq	-104(%rbp), %rdx
	callq	_init_resampler
	testq	%rax, %rax
	jne	LBB0_24
## %bb.4:
	movq	-48(%rbp), %rsi
	leaq	-64(%rbp), %rdi
	callq	_init_fifo
	testq	%rax, %rax
	jne	LBB0_24
## %bb.5:
	movq	-72(%rbp), %rdi
	callq	_write_output_file_header
	testq	%rax, %rax
	je	LBB0_6
LBB0_24:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:
	callq	_av_audio_fifo_free
LBB0_26:
	leaq	-104(%rbp), %rdi
	callq	_swr_free
	cmpq	$0, -48(%rbp)
	je	LBB0_28
## %bb.27:
	leaq	-48(%rbp), %rdi
	callq	_avcodec_free_context
LBB0_28:
	movq	-72(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_30
## %bb.29:
	callq	_avio_closep
	movq	-72(%rbp), %rdi
	callq	_avformat_free_context
LBB0_30:
	cmpq	$0, -80(%rbp)
	je	LBB0_32
## %bb.31:
	leaq	-80(%rbp), %rdi
	callq	_avcodec_free_context
LBB0_32:
	cmpq	$0, -96(%rbp)
	je	LBB0_35
## %bb.33:
	leaq	-96(%rbp), %rdi
	callq	_avformat_close_input
LBB0_35:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	-52(%rbp), %r14
	leaq	-84(%rbp), %r15
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	movq	-48(%rbp), %rax
	movl	(%rax), %r13d
	movl	$0, -52(%rbp)
LBB0_8:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-64(%rbp), %rdi
	callq	_av_audio_fifo_size
	cmpl	%r13d, %eax
	jge	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	-64(%rbp), %rdi
	movq	-96(%rbp), %rsi
	movq	-80(%rbp), %rdx
	movq	-48(%rbp), %rcx
	movq	-104(%rbp), %r8
	movq	%r14, %r9
	callq	_read_decode_convert_and_store
	testq	%rax, %rax
	jne	LBB0_24
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	cmpl	$0, -52(%rbp)
	je	LBB0_8
	jmp	LBB0_11
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=2
	movq	-64(%rbp), %rdi
	movq	-72(%rbp), %rsi
	movq	-48(%rbp), %rdx
	callq	_load_encode_and_write
	testq	%rax, %rax
	jne	LBB0_24
LBB0_11:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-64(%rbp), %rdi
	callq	_av_audio_fifo_size
	cmpl	%r13d, %eax
	jge	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	xorl	%ebx, %ebx
	cmpl	$0, -52(%rbp)
	je	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	-64(%rbp), %rdi
	callq	_av_audio_fifo_size
	testl	%eax, %eax
	jg	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, -52(%rbp)
	je	LBB0_20
LBB0_16:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$0, -84(%rbp)
	movq	-72(%rbp), %rsi
	movq	-48(%rbp), %rdx
	xorl	%edi, %edi
	movq	%r15, %rcx
	callq	_encode_audio_frame
	testq	%rax, %rax
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=2
	cmpl	$0, -84(%rbp)
	jne	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$4, %ebx
	jmp	LBB0_20
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	$2, %ebx
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.21:
	cmpl	$2, %ebx
	je	LBB0_24
## %bb.22:
	cmpl	$4, %ebx
	jne	LBB0_34
## %bb.23:
	movq	-72(%rbp), %rdi
	callq	_write_output_file_trailer
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovel	%ecx, %r12d
	jmp	LBB0_24
LBB0_34:
	xorl	%r12d, %r12d
	jmp	LBB0_35
LBB0_36:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EXIT,4,2               ## @AVERROR_EXIT
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Usage: %s <input file> <output file>\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	stp	xzr, xzr, [x29, #-32]
	stp	xzr, xzr, [sp, #32]
	stp	xzr, xzr, [sp, #16]
	cmp	w0, #3
	b.ne	LBB0_35
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_EXIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EXIT@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	x0, [x20, #8]
	sub	x1, x29, #24
	add	x2, sp, #40
	bl	_open_input_file
	cbnz	x0, LBB0_6
; %bb.2:
	ldr	x0, [x20, #16]
	ldr	x1, [sp, #40]
	sub	x2, x29, #32
	add	x3, sp, #32
	bl	_open_output_file
	cbnz	x0, LBB0_6
; %bb.3:
	ldp	x1, x0, [sp, #32]
	add	x2, sp, #24
	bl	_init_resampler
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	x1, [sp, #32]
	add	x0, sp, #16
	bl	_init_fifo
	cbnz	x0, LBB0_6
; %bb.5:
	ldur	x0, [x29, #-32]
	bl	_write_output_file_header
	cbz	x0, LBB0_19
LBB0_6:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_av_audio_fifo_free
LBB0_8:
	add	x0, sp, #24
	bl	_swr_free
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_10
; %bb.9:
	add	x0, sp, #32
	bl	_avcodec_free_context
LBB0_10:
	ldur	x0, [x29, #-32]
	cbz	x0, LBB0_12
; %bb.11:
	bl	_avio_closep
	ldur	x0, [x29, #-32]
	bl	_avformat_free_context
LBB0_12:
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_14
; %bb.13:
	add	x0, sp, #40
	bl	_avcodec_free_context
LBB0_14:
	ldur	x8, [x29, #-24]
	cbz	x8, LBB0_16
; %bb.15:
	sub	x0, x29, #24
	bl	_avformat_close_input
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	w8, #2
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	cbnz	w8, LBB0_31
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
                                        ;     Child Loop BB0_24 Depth 2
                                        ;     Child Loop BB0_28 Depth 2
	ldr	x8, [sp, #32]
	ldr	w20, [x8]
	str	wzr, [sp, #12]
LBB0_20:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [sp, #16]
	bl	_av_audio_fifo_size
	cmp	w0, w20
	b.ge	LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	ldp	x0, x4, [sp, #16]
	ldur	x1, [x29, #-24]
	ldp	x3, x2, [sp, #32]
	add	x5, sp, #12
	bl	_read_decode_convert_and_store
	cbnz	x0, LBB0_6
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=2
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_20
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=2
	ldr	x0, [sp, #16]
	ldur	x1, [x29, #-32]
	ldr	x2, [sp, #32]
	bl	_load_encode_and_write
	cbnz	x0, LBB0_6
LBB0_24:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [sp, #16]
	bl	_av_audio_fifo_size
	cmp	w0, w20
	b.ge	LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=2
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_18
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=2
	ldr	x0, [sp, #16]
	bl	_av_audio_fifo_size
	cmp	w0, #1
	b.ge	LBB0_23
; %bb.27:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_18
LBB0_28:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	wzr, [sp, #8]
	ldur	x1, [x29, #-32]
	ldr	x2, [sp, #32]
	add	x3, sp, #8
	mov	x0, #0
	bl	_encode_audio_frame
	cbnz	x0, LBB0_17
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=2
	ldr	w8, [sp, #8]
	cbnz	w8, LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	w8, #4
	b	LBB0_18
LBB0_31:
	cmp	w8, #2
	b.eq	LBB0_6
; %bb.32:
	cmp	w8, #4
	b.ne	LBB0_34
; %bb.33:
	ldur	x0, [x29, #-32]
	bl	_write_output_file_trailer
	cmp	x0, #0
	csel	w19, wzr, w19, eq
	b	LBB0_6
LBB0_34:
	mov	w19, #0
	b	LBB0_16
LBB0_35:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x2, [x20]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EXIT,4,2               ; @AVERROR_EXIT
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Usage: %s <input file> <output file>\n"

.subsections_via_symbols
