	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmf_read_header
_mmf_read_header:                       ## @mmf_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, %r14
	movq	(%rdi), %r13
	movq	8(%rdi), %r12
	movq	%r13, %rdi
	callq	_avio_rl32
	movl	%eax, %ebx
	movl	$77, %edi
	movl	$77, %esi
	movl	$77, %edx
	movl	$68, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	jne	LBB0_20
## %bb.1:
	movl	$4, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_avio_skip
	movq	%r13, %rdi
	callq	_avio_rl32
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_avio_rb32
	movl	%eax, %ebx
	movl	$67, %edi
	movl	$78, %esi
	movl	$84, %edx
	movl	$73, %ecx
	callq	_MKTAG
	cmpl	%eax, %r15d
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$79, %edi
	movl	$80, %esi
	movl	$68, %edx
	movl	$65, %ecx
	callq	_MKTAG
	cmpl	%eax, %r15d
	je	LBB0_2
## %bb.4:
	movl	%r15d, %ebx
	andl	$16777215, %ebx                 ## imm = 0xFFFFFF
	movl	$77, %edi
	movl	$84, %esi
	movl	$82, %edx
	xorl	%ecx, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	jne	LBB0_6
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_17
LBB0_6:
	movl	$65, %edi
	movl	$84, %esi
	movl	$82, %edx
	xorl	%ecx, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	jne	LBB0_16
## %bb.7:
	movq	%r13, %rdi
	callq	_avio_r8
	movq	%r13, %rdi
	callq	_avio_r8
	movq	%r13, %rdi
	callq	_avio_r8
	movl	%eax, %ebx
	movl	%eax, %edi
	andl	$15, %edi
	callq	_mmf_rate
	testl	%eax, %eax
	js	LBB0_18
## %bb.8:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_avio_r8
	movq	%r13, %rdi
	callq	_avio_r8
	movq	%r13, %rdi
	callq	_avio_r8
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_avio_skip
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_avio_rl32
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_avio_rb32
	movl	%eax, %r15d
	movl	$65, %edi
	movl	$116, %esi
	movl	$115, %edx
	movl	$113, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$65, %edi
	movl	$115, %esi
	movl	$112, %edx
	movl	$73, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	je	LBB0_9
## %bb.12:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r12d
	andl	$16777215, %r12d                ## imm = 0xFFFFFF
	movl	$65, %edi
	movl	$119, %esi
	movl	$97, %edx
	xorl	%ecx, %ecx
	callq	_MKTAG
	cmpl	%eax, %r12d
	jne	LBB0_19
## %bb.13:
	movq	%r13, %rdi
	callq	_avio_tell
	movslq	%r15d, %rcx
	addq	%rax, %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_23
## %bb.14:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	(%rax), %rsi
	movl	%edx, 24(%rsi)
	movq	_AV_CODEC_ID_ADPCM_YAMAHA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 20(%rsi)
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rsi)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, %edx
	sarl	$7, %edx
	incl	%edx
	movl	%edx, 4(%rsi)
	cmpl	$128, %edi
	jae	LBB0_24
## %bb.15:
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rdx
	jmp	LBB0_25
LBB0_16:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_17:
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_18:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_20
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_20:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	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
LBB0_24:
	movq	_AV_CH_LAYOUT_STEREO@GOTPCREL(%rip), %rdx
LBB0_25:
	movl	(%rdx), %edx
	movl	%edx, 16(%rsi)
	movl	$4, 8(%rsi)
	movl	%ecx, %edx
	shll	$2, %edx
	movl	%edx, 12(%rsi)
	movq	%rax, %rdi
	movl	$64, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	xorl	%eax, %eax
	jmp	LBB0_22
	.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	"MIDI like format found, unsupported\n"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported SMAF chunk %08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid sample rate\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unexpected SMAF chunk %08x\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_ADPCM_YAMAHA,4,2   ## @AV_CODEC_ID_ADPCM_YAMAHA
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ## @AV_CH_LAYOUT_STEREO
	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
	.no_dead_strip	_mmf_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmf_read_header
_mmf_read_header:                       ; @mmf_read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldp	x20, x25, [x0]
	mov	x0, x20
	bl	_avio_rl32
	mov	x21, x0
	mov	w0, #77
	mov	w1, #77
	mov	w2, #77
	mov	w3, #68
	bl	_MKTAG
	cmp	w21, w0
	b.ne	LBB0_20
; %bb.1:
	mov	w22, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_avio_skip
	mov	x0, x20
	bl	_avio_rl32
	mov	x21, x0
	mov	x0, x20
	bl	_avio_rb32
	mov	x22, x0
	mov	w0, #67
	mov	w1, #78
	mov	w2, #84
	mov	w3, #73
	bl	_MKTAG
	cmp	w21, w0
	b.eq	LBB0_2
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #79
	mov	w1, #80
	mov	w2, #68
	mov	w3, #65
	bl	_MKTAG
	cmp	w21, w0
	b.eq	LBB0_2
; %bb.4:
	and	w22, w21, #0xffffff
	mov	w0, #77
	mov	w1, #84
	mov	w2, #82
	mov	w3, #0
	bl	_MKTAG
	cmp	w22, w0
	b.ne	LBB0_6
; %bb.5:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_16
LBB0_6:
	mov	w0, #65
	mov	w1, #84
	mov	w2, #82
	mov	w3, #0
	bl	_MKTAG
	cmp	w22, w0
	b.ne	LBB0_15
; %bb.7:
	mov	x0, x20
	bl	_avio_r8
	mov	x0, x20
	bl	_avio_r8
	mov	x0, x20
	bl	_avio_r8
	mov	x22, x0
	and	w0, w0, #0xf
	bl	_mmf_rate
	tbnz	w0, #31, LBB0_17
; %bb.8:
	mov	x21, x0
	mov	x0, x20
	bl	_avio_r8
	mov	x0, x20
	bl	_avio_r8
	mov	x0, x20
	bl	_avio_r8
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_avio_skip
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_avio_rl32
	mov	x23, x0
	mov	x0, x20
	bl	_avio_rb32
	mov	x24, x0
	mov	w0, #65
	mov	w1, #116
	mov	w2, #115
	mov	w3, #113
	bl	_MKTAG
	cmp	w23, w0
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #65
	mov	w1, #115
	mov	w2, #112
	mov	w3, #73
	bl	_MKTAG
	cmp	w23, w0
	b.eq	LBB0_9
; %bb.12:
	and	w26, w23, #0xffffff
	mov	w0, #65
	mov	w1, #119
	mov	w2, #97
	mov	w3, #0
	bl	_MKTAG
	cmp	w26, w0
	b.ne	LBB0_18
; %bb.13:
	mov	x0, x20
	bl	_avio_tell
	add	x8, x0, w24, sxtw
	str	x8, [x25]
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_23
; %bb.14:
Lloh5:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	x9, [x0]
Lloh8:
	adrp	x10, _AV_CODEC_ID_ADPCM_YAMAHA@GOTPAGE
Lloh9:
	ldr	x10, [x10, _AV_CODEC_ID_ADPCM_YAMAHA@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #20]
	asr	w8, w22, #7
	add	w8, w8, #1
	stp	w21, w8, [x9]
Lloh11:
	adrp	x8, _AV_CH_LAYOUT_STEREO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_CH_LAYOUT_STEREO@GOTPAGEOFF]
Lloh13:
	adrp	x10, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh14:
	ldr	x10, [x10, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
	cmp	w22, #128
	csel	x8, x10, x8, lo
	ldr	w11, [x8]
	mov	w8, #4
	lsl	w10, w21, #2
	str	w8, [x9, #8]
	stp	w10, w11, [x9, #12]
	mov	w1, #64
	mov	w2, #1
	mov	x3, x21
	bl	_avpriv_set_pts_info
	mov	w0, #0
	b	LBB0_22
LBB0_15:
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	str	x21, [sp]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_av_log
Lloh20:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_21
LBB0_17:
Lloh22:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_18:
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	str	x23, [sp]
Lloh30:
	adrp	x2, l_.str.3@PAGE
Lloh31:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_19:
	mov	x0, x19
	bl	_av_log
LBB0_20:
Lloh32:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_21:
	ldr	w0, [x8]
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_23:
Lloh34:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_AVERROR
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.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	"MIDI like format found, unsupported\n"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported SMAF chunk %08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid sample rate\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unexpected SMAF chunk %08x\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_ADPCM_YAMAHA,4,2   ; @AV_CODEC_ID_ADPCM_YAMAHA
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ; @AV_CH_LAYOUT_STEREO
	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
	.no_dead_strip	_mmf_read_header
.subsections_via_symbols
