	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qdm2_parse_subpacket
_qdm2_parse_subpacket:                  ## @qdm2_parse_subpacket
	.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	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %r13d
	movl	4(%rdx), %r14d
	testb	$-128, %r14b
	jne	LBB0_1
## %bb.2:
	leaq	12(%r12), %rax
	movl	8(%r12), %r15d
	jmp	LBB0_3
LBB0_1:
	leaq	8(%r12), %rdi
	callq	_AV_RB16
	movl	%eax, %r15d
	leaq	16(%r12), %rax
	andl	$127, %r14d
LBB0_3:
	subq	%rax, %rbx
	sarq	$2, %rbx
	xorl	%ecx, %ecx
	cmpl	$127, %r14d
	sete	%cl
	addl	%r15d, %ecx
	cmpq	%rcx, %rbx
	jl	LBB0_5
## %bb.4:
	cmpl	$128, %r13d
	jae	LBB0_5
## %bb.6:
	leaq	4(%r12), %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	cmpl	$127, %r14d
	sete	%cl
	leaq	(%rax,%rcx,4), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	subq	%rdx, %rdi
	shrq	$2, %rdi
	addl	%r15d, %edi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rax
	movl	$2048, %esi                     ## imm = 0x800
	subl	(%rax,%r13,4), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_FFMIN
	movl	%eax, %ebx
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movslq	(%rax,%r13,4), %rdi
	shlq	$2, %rdi
	addq	(%rcx,%r13,8), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_memcpy
	movq	(%r14), %rax
	addl	%ebx, (%rax,%r13,4)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rax
	subq	%r12, %rax
	shrq	$2, %rax
	jmp	LBB0_7
LBB0_5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_qdm2_parse_subpacket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qdm2_parse_subpacket
_qdm2_parse_subpacket:                  ; @qdm2_parse_subpacket
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x3
	mov	x19, x2
	mov	x20, x0
	mov	x21, x2
	ldr	w25, [x21, #4]!
	mov	x0, x2
	ldr	w24, [x0], #8
	tbnz	w25, #7, LBB0_2
; %bb.1:
	add	x8, x19, #12
	ldr	w22, [x19, #8]
	b	LBB0_3
LBB0_2:
	bl	_AV_RB16
	mov	x22, x0
	add	x8, x19, #16
	and	w25, w25, #0x7f
LBB0_3:
	sub	x9, x23, x8
	cmp	w25, #127
	cinc	w10, w22, eq
	cmp	x10, x9, asr #2
	b.gt	LBB0_6
; %bb.4:
	cmp	w24, #128
	b.hs	LBB0_6
; %bb.5:
	cmp	w25, #127
	cset	w9, eq
	add	x25, x8, w9, uxtw #2
	sub	x8, x25, x21
	lsr	x8, x8, #2
	add	w0, w22, w8
	ldr	x8, [x20]
	lsl	x26, x24, #2
	ldr	w8, [x8, x26]
	mov	w9, #2048
	sub	w1, w9, w8
	bl	_FFMIN
	mov	x23, x0
	ldp	x9, x8, [x20]
	ldr	x8, [x8, x24, lsl #3]
	ldrsw	x9, [x9, x26]
	add	x0, x8, x9, lsl #2
	mov	x1, x21
	mov	x2, x23
	bl	_memcpy
	ldr	x8, [x20]
	ldr	w9, [x8, x26]
	add	w9, w9, w23
	str	w9, [x8, x26]
	add	x8, x25, w22, uxtw #2
	sub	x8, x8, x19
	lsr	x0, x8, #2
	b	LBB0_7
LBB0_6:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_7:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_qdm2_parse_subpacket
.subsections_via_symbols
