	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avr_read_header
_avr_read_header:                       ## @avr_read_header
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r14
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rcx
	movl	%eax, 24(%rcx)
	movl	(%rbx), %edi
	movl	$4, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	movl	$8, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	callq	_avio_rb16
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jne	LBB0_7
## %bb.4:
	movl	$2, %eax
	jmp	LBB0_5
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	movl	$1, %eax
LBB0_5:
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	movl	(%rbx), %edi
	callq	_avio_rb16
	movl	%eax, %r15d
	movq	(%r14), %rax
	movl	%r15d, 4(%rax)
	movl	(%rbx), %edi
	callq	_avio_rb16
	movl	%eax, %r12d
	movl	(%rbx), %edi
	movl	$2, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	movl	$2, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	movl	$1, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	callq	_avio_rb24
	movq	(%r14), %rcx
	movl	%eax, 20(%rcx)
	movl	(%rbx), %edi
	movl	$12, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	movl	$6, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	movl	$20, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	movl	$64, %esi
	callq	_avio_skip
	xorl	%r13d, %r13d
	movl	%r15d, %edi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	callq	_ff_get_pcm_codec_id
	movq	(%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	_AV_CODEC_ID_NONE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_9
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_avpriv_request_sample
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_avpriv_request_sample
LBB0_8:
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_10
LBB0_9:
	movl	(%rcx), %eax
	imull	%r15d, %eax
	leal	7(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$3, %edx
	movl	%edx, 16(%rcx)
	movl	20(%rcx), %ecx
	movq	%r14, %rdi
	movl	$64, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chan %d"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.comm	_AV_CODEC_ID_NONE,8,3           ## @AV_CODEC_ID_NONE
L_.str.1:                               ## @.str.1
	.asciz	"Bps %d and sign %d"

	.no_dead_strip	_avr_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avr_read_header
_avr_read_header:                       ; @avr_read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0]
	str	w8, [x9, #24]
	ldr	w0, [x19]
	mov	w1, #4
	bl	_avio_skip
	ldr	w0, [x19]
	mov	w1, #8
	bl	_avio_skip
	ldr	w0, [x19]
	bl	_avio_rb16
	cbz	w0, LBB0_5
; %bb.2:
	mov	x2, x0
	mov	w8, #65535
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.3:
	mov	w8, #2
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_AVERROR
LBB0_5:
	mov	w8, #1
LBB0_6:
	ldr	x9, [x20]
	str	w8, [x9]
	ldr	w0, [x19]
	bl	_avio_rb16
	mov	x21, x0
	ldr	x8, [x20]
	str	w0, [x8, #4]
	ldr	w0, [x19]
	bl	_avio_rb16
	mov	x22, x0
	ldr	w0, [x19]
	mov	w1, #2
	bl	_avio_skip
	ldr	w0, [x19]
	mov	w1, #2
	bl	_avio_skip
	ldr	w0, [x19]
	mov	w1, #1
	bl	_avio_skip
	ldr	w0, [x19]
	bl	_avio_rb24
	ldr	x8, [x20]
	str	w0, [x8, #20]
	ldr	w0, [x19]
	mov	w1, #12
	bl	_avio_skip
	ldr	w0, [x19]
	mov	w1, #6
	bl	_avio_skip
	ldr	w0, [x19]
	mov	w1, #20
	bl	_avio_skip
	ldr	w0, [x19]
	mov	w1, #64
	bl	_avio_skip
	mov	x0, x21
	mov	w1, #0
	mov	w2, #1
	mov	x3, x22
	bl	_ff_get_pcm_codec_id
	ldr	x8, [x20]
	str	x0, [x8, #8]
Lloh6:
	adrp	x9, _AV_CODEC_ID_NONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AV_CODEC_ID_NONE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x0, x9
	b.ne	LBB0_10
; %bb.7:
	str	x22, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
LBB0_9:
	bl	_avpriv_request_sample
Lloh13:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_10:
	ldr	w9, [x8]
	mul	w9, w9, w21
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #3
	str	w9, [x8, #16]
	ldr	w3, [x8, #20]
	mov	x0, x20
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chan %d"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.comm	_AV_CODEC_ID_NONE,8,3           ; @AV_CODEC_ID_NONE
l_.str.1:                               ; @.str.1
	.asciz	"Bps %d and sign %d"

	.no_dead_strip	_avr_read_header
.subsections_via_symbols
