	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rso_write_header
_rso_write_header:                      ## @rso_write_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_8
## %bb.1:
	cmpl	$1, 4(%rbx)
	jne	LBB0_5
## %bb.2:
	movq	(%rdi), %r14
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_6
## %bb.3:
	cmpl	$65536, 8(%rbx)                 ## imm = 0x10000
	jb	LBB0_11
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_7
LBB0_5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_7
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_7:
	callq	_av_log
LBB0_8:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	16(%rbx), %rax
	movq	_AV_CODEC_ID_ADPCM_IMA_WAV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	callq	_avpriv_report_missing_feature
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_13:
	movq	%r14, %rdi
	callq	_avio_wb16
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avio_wb16
	movl	8(%rbx), %esi
	movq	%r14, %rdi
	callq	_avio_wb16
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avio_wb16
	movq	%r14, %rdi
	callq	_avio_flush
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RSO only supports mono\n"

	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
L_.str.1:                               ## @.str.1
	.asciz	"muxer does not support non seekable output\n"

L_.str.2:                               ## @.str.2
	.asciz	"Sample rate must be < 65536\n"

	.comm	_AV_CODEC_ID_ADPCM_IMA_WAV,8,3  ## @AV_CODEC_ID_ADPCM_IMA_WAV
L_.str.3:                               ## @.str.3
	.asciz	"ADPCM in RSO"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.no_dead_strip	_rso_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rso_write_header
_rso_write_header:                      ; @rso_write_header
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x20, [x8]
	ldr	w1, [x20]
	cbz	w1, LBB0_8
; %bb.1:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.2:
	ldr	x19, [x0]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
	ldr	w8, [x20, #8]
	cmp	w8, #16, lsl #12                ; =65536
	b.lo	LBB0_11
; %bb.4:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str.2@PAGE
Lloh7:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_7:
	bl	_av_log
LBB0_8:
Lloh18:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x8, [x20, #16]
Lloh20:
	adrp	x9, _AV_CODEC_ID_ADPCM_IMA_WAV@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AV_CODEC_ID_ADPCM_IMA_WAV@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_avpriv_report_missing_feature
Lloh25:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_9
LBB0_13:
	mov	x0, x19
	bl	_avio_wb16
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wb16
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_avio_wb16
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wb16
	mov	x0, x19
	bl	_avio_flush
	mov	w0, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RSO only supports mono\n"

	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
l_.str.1:                               ; @.str.1
	.asciz	"muxer does not support non seekable output\n"

l_.str.2:                               ; @.str.2
	.asciz	"Sample rate must be < 65536\n"

	.comm	_AV_CODEC_ID_ADPCM_IMA_WAV,8,3  ; @AV_CODEC_ID_ADPCM_IMA_WAV
l_.str.3:                               ; @.str.3
	.asciz	"ADPCM in RSO"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.no_dead_strip	_rso_write_header
.subsections_via_symbols
