	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mszh_decomp
_mszh_decomp:                           ## @mszh_decomp
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r8
	movl	%esi, %eax
	leaq	1(%rdi), %rsi
	movq	%rsi, -48(%rbp)
	cmpl	$2, %eax
	jl	LBB0_2
## %bb.1:
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.3:
	movl	%ecx, %ecx
	leaq	(%r8,%rcx), %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movslq	%eax, %r12
	addq	%rdi, %r12
	movzbl	(%rdi), %ebx
	leaq	(%r8,%rcx), %rax
	addq	$-32, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$128, %r15d
	movq	%r8, %r14
	movq	%r8, %rax
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	testl	%ebx, %r15d
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movq	%r12, %rbx
	leaq	-48(%rbp), %rdi
	callq	_bytestream_get_le16
	movl	%eax, %r13d
	movl	%eax, %edi
	andl	$2047, %edi                     ## imm = 0x7FF
	movl	%r14d, %esi
	subl	-72(%rbp), %esi                 ## 4-byte Folded Reload
	callq	_FFMIN
	movl	%eax, %r12d
	shrl	$11, %r13d
	leal	4(,%r13,4), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %esi
	subl	%r14d, %esi
	callq	_FFMIN
	movl	%eax, %r13d
	movq	%r14, %rdi
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_av_memcpy_backptr
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy
	addq	$4, %r14
	addq	$4, -48(%rbp)
	cmpl	$2, %r15d
	jb	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	shrl	%r15d
	movq	-48(%rbp), %rsi
	cmpq	%r12, %rsi
	jb	LBB0_21
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %eax
	addq	%rax, %r14
	movq	%rbx, %r12
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	cmpl	$2, %r15d
	jae	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rsi
	movq	%rsi, -48(%rbp)
	movb	(%rax), %al
	testb	%al, %al
	jne	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subq	%r14, %rcx
	cmpq	$32, %rcx
	jl	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	subq	%r14, %rbx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rax
	subq	%rsi, %rax
	cmpq	$32, %rax
	jl	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	%r14, %rdi
	movl	$32, %edx
	callq	_memcpy
	addq	$32, %r14
	movq	-48(%rbp), %rax
	leaq	33(%rax), %rsi
	movq	%rsi, -48(%rbp)
	movzbl	32(%rax), %eax
	testb	%al, %al
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=2
	leaq	-32(%rbx), %rcx
	cmpq	$31, %rbx
	movq	%rcx, %rbx
	jg	LBB0_15
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movzbl	%al, %ebx
	movl	$128, %r15d
	cmpq	%r12, %rsi
	jb	LBB0_21
	jmp	LBB0_22
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$128, %r15d
	xorl	%ebx, %ebx
	cmpq	%r12, %rsi
	jae	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	jb	LBB0_4
LBB0_22:
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_23
LBB0_2:
	movq	%r8, %r14
LBB0_23:
	subl	%r8d, %r14d
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mszh_decomp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mszh_decomp
_mszh_decomp:                           ; @mszh_decomp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x2
	mov	x8, x1
	add	x1, x0, #1
	str	x1, [sp, #8]
	cmp	w8, #2
	b.lt	LBB0_18
; %bb.1:
	cbz	w3, LBB0_18
; %bb.2:
	mov	w9, w3
	add	x23, x19, x9
	add	x24, x0, w8, sxtw
	ldrb	w26, [x0]
	add	x8, x19, x9
	sub	x25, x8, #32
	mov	w27, #128
	mov	x20, x19
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	tst	w27, w26
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #8
	bl	_bytestream_get_le16
	mov	x21, x0
	and	w0, w0, #0x7ff
	sub	w1, w20, w19
	bl	_FFMIN
	mov	x22, x0
	lsr	w8, w21, #9
	and	w8, w8, #0x7ffffc
	add	w0, w8, #4
	sub	w1, w23, w20
	bl	_FFMIN
	mov	x21, x0
	mov	x0, x20
	cbz	w22, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x22
	mov	x2, x21
	bl	_av_memcpy_backptr
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	add	x20, x20, #4
	ldr	x8, [sp, #8]
	add	x8, x8, #4
	str	x8, [sp, #8]
	cmp	w27, #2
	b.lo	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	lsr	w27, w27, #1
	ldr	x1, [sp, #8]
	cmp	x1, x24
	b.lo	LBB0_17
	b	LBB0_19
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w1, #0
	mov	x2, x21
	bl	_memset
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, w21, uxtw
	cmp	w27, #2
	b.hs	LBB0_7
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	add	x1, x8, #1
	str	x1, [sp, #8]
	ldrb	w26, [x8]
	cbnz	w26, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	x8, x23, x20
	cmp	x8, #32
	b.lt	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	x21, x25, x20
LBB0_13:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	x8, x24, x1
	cmp	x8, #32
	b.lt	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	x0, x20
	mov	w2, #32
	bl	_memcpy
	add	x20, x20, #32
	ldr	x8, [sp, #8]
	add	x1, x8, #33
	str	x1, [sp, #8]
	ldrb	w26, [x8, #32]
	cmp	w26, #0
	ccmp	x21, #31, #4, eq
	sub	x21, x21, #32
	b.gt	LBB0_13
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #0
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w27, #128
	cmp	x1, x24
	b.hs	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x20, x23
	b.lo	LBB0_3
	b	LBB0_19
LBB0_18:
	mov	x20, x19
LBB0_19:
	sub	w0, w20, w19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mszh_decomp
.subsections_via_symbols
