	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rso_read_header
_rso_read_header:                       ## @rso_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_avio_rb16
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_avio_rb16
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_avio_rb16
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_avio_rb16
	movq	_ff_codec_rso_tags@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_ff_codec_get_id
	movl	%eax, %r14d
	movq	_AV_CODEC_ID_ADPCM_IMA_WAV@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_avpriv_report_missing_feature
	jmp	LBB0_2
LBB0_3:
	movl	%r14d, %edi
	callq	_av_get_bits_per_sample
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	shll	$3, %eax
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, (%rdi)
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rdi), %rdx
	movl	%eax, 24(%rdx)
	movl	%r15d, (%rdx)
	movl	%r14d, 4(%rdx)
	movl	$1, 8(%rdx)
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdx)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, 12(%rdx)
	movl	$1, 16(%rdx)
	movl	$64, %esi
	movl	$1, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_avpriv_set_pts_info
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_avpriv_request_sample
LBB0_2:
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_codec_rso_tags,4,2          ## @ff_codec_rso_tags
	.comm	_AV_CODEC_ID_ADPCM_IMA_WAV,4,2  ## @AV_CODEC_ID_ADPCM_IMA_WAV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ADPCM in RSO"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
L_.str.1:                               ## @.str.1
	.asciz	"Unknown bits per sample"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
	.no_dead_strip	_rso_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rso_read_header
_rso_read_header:                       ; @rso_read_header
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	ldr	x23, [x0]
	mov	x0, x23
	bl	_avio_rb16
	mov	x20, x0
	mov	x0, x23
	bl	_avio_rb16
	mov	x22, x0
	mov	x0, x23
	bl	_avio_rb16
	mov	x19, x0
	mov	x0, x23
	bl	_avio_rb16
Lloh0:
	adrp	x8, _ff_codec_rso_tags@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_codec_rso_tags@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_ff_codec_get_id
Lloh3:
	adrp	x8, _AV_CODEC_ID_ADPCM_IMA_WAV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_CODEC_ID_ADPCM_IMA_WAV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_avpriv_report_missing_feature
	b	LBB0_6
LBB0_2:
	mov	x23, x0
	bl	_av_get_bits_per_sample
	cbz	w0, LBB0_5
; %bb.3:
	mov	x24, x0
	mov	x0, x21
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_8
; %bb.4:
	lsl	w8, w22, #3
	udiv	w8, w8, w24
	str	w8, [x0]
Lloh8:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	x9, [x0, #8]
	str	w8, [x9, #24]
	stp	w20, w23, [x9]
Lloh11:
	adrp	x8, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w10, #1
	stp	w10, w19, [x9, #8]
	stp	w10, w8, [x9, #16]
	mov	w1, #64
	mov	w2, #1
	mov	x3, x19
	bl	_avpriv_set_pts_info
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_avpriv_request_sample
LBB0_6:
Lloh16:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_codec_rso_tags,4,2          ; @ff_codec_rso_tags
	.comm	_AV_CODEC_ID_ADPCM_IMA_WAV,4,2  ; @AV_CODEC_ID_ADPCM_IMA_WAV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ADPCM in RSO"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
l_.str.1:                               ; @.str.1
	.asciz	"Unknown bits per sample"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
	.no_dead_strip	_rso_read_header
.subsections_via_symbols
