	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wavesynth_decode
_wavesynth_decode:                      ## @wavesynth_decode
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r15
	movq	_WS_MAX_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movl	$0, (%r14)
	cmpl	$12, (%r12)
	jne	LBB0_1
## %bb.2:
	movq	8(%r12), %rdi
	callq	_AV_RL64
	movq	%rax, %r14
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	cmpq	(%r15), %rax
	je	LBB0_4
## %bb.3:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_wavesynth_seek
LBB0_4:
	movq	8(%r12), %rdi
	addq	$8, %rdi
	callq	_AV_RL32
	testl	%eax, %eax
	jle	LBB0_5
## %bb.7:
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, (%rsi)
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_18
## %bb.8:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax), %r12
	movl	(%r13), %edx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	-52(%rbp), %esi                 ## 4-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%r15d
	incq	%r14
	cmpl	%esi, %r15d
	je	LBB0_16
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	shll	$2, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	cmpq	8(%rdi), %r14
	jl	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_wavesynth_enter_intervals
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_wavesynth_synth_sample
	movl	(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movswl	2(%rbx,%rax,4), %ecx
	movl	%ecx, (%r12)
	addq	$4, %r12
	incq	%rax
	movslq	(%r13), %rdx
	cmpq	%rdx, %rax
	jl	LBB0_14
	jmp	LBB0_15
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movslq	-52(%rbp), %rax                 ## 4-byte Folded Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addq	%rax, (%rcx)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
LBB0_17:
	movl	(%rax), %eax
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.6:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WS_MAX_CHANNELS,4,2            ## @WS_MAX_CHANNELS
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_wavesynth_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wavesynth_decode
_wavesynth_decode:                      ; @wavesynth_decode
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x19, x3
	mov	x20, x2
	mov	x26, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x21, [x0, #8]
Lloh3:
	adrp	x8, _WS_MAX_CHANNELS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WS_MAX_CHANNELS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	str	wzr, [x2]
	ldr	w8, [x3]
	cmp	w8, #12
	b.ne	LBB0_12
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_AV_RL64
	mov	x24, x0
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x21
	mov	x1, x24
	bl	_wavesynth_seek
LBB0_3:
	ldr	x8, [x19, #8]
	add	x0, x8, #8
	bl	_AV_RL32
	cmp	w0, #0
	b.le	LBB0_16
; %bb.4:
	mov	x25, x0
	str	w0, [x26]
	mov	x0, x22
	mov	x1, x26
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_14
; %bb.5:
	mov	w27, #0
	ldr	x8, [x26, #8]
	ldr	x26, [x8]
	ldr	w8, [x22]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w27, w27, #1
	add	x24, x24, #1
	cmp	w27, w25
	b.eq	LBB0_13
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	lsl	w2, w8, #2
	mov	x0, x23
	mov	w1, #0
	bl	_memset
	ldr	x8, [x21, #8]
	cmp	x24, x8
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_wavesynth_enter_intervals
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_wavesynth_synth_sample
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x9, #0
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x23, x9, lsl #2
	ldrsh	w8, [x8, #2]
	str	w8, [x26], #4
	add	x9, x9, #1
	ldrsw	x8, [x22]
	cmp	x9, x8
	b.lt	LBB0_11
	b	LBB0_6
LBB0_12:
Lloh8:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x21]
	add	x8, x8, w25, sxtw
	str	x8, [x21]
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x19]
LBB0_14:
	ldur	x8, [x29, #-88]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.15:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldur	x8, [x29, #-88]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_WS_MAX_CHANNELS,4,2            ; @WS_MAX_CHANNELS
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_wavesynth_decode
.subsections_via_symbols
