	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mp_get_code
_mp_get_code:                           ## @mp_get_code
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_get_bits1
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r13), %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %r8d
	cmpl	%r8d, %r13d
	jge	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %r14d
	addl	%r12d, %r14d
	leal	(%r12,%r12), %ecx
	incl	%ecx
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_mp_get_code
	movl	%ebx, %r13d
	movl	%r14d, %r12d
	testl	%eax, %eax
	jns	LBB0_1
	jmp	LBB0_5
LBB0_6:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%rsi), %rax
	movq	_MAX_HUFF_CODES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_7
## %bb.8:
	movq	16(%rsi), %rcx
	movl	%r12d, (%rcx,%rax,8)
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rsi)
	movl	%r13d, 4(%rcx,%rax,8)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_3:
	movl	24(%rdi), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_5
LBB0_7:
	movl	24(%rsi), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
LBB0_5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid code size %d/%d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_MAX_HUFF_CODES,8,3             ## @MAX_HUFF_CODES
L_.str.1:                               ## @.str.1
	.asciz	"too many codes\n"

	.no_dead_strip	_mp_get_code
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mp_get_code
_mp_get_code:                           ; @mp_get_code
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_get_bits1
	cbz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w23, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.ge	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	lsl	w24, w20, #1
	mov	w3, #1
	bfi	w3, w20, #1, #31
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_mp_get_code
	mov	x22, x23
	mov	x20, x24
	tbz	w0, #31, LBB0_1
	b	LBB0_9
LBB0_4:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _MAX_HUFF_CODES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_HUFF_CODES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_7
; %bb.5:
	mov	w0, #0
	ldr	x9, [x19, #16]
	add	x10, x8, #1
	str	x10, [x19, #8]
	add	x8, x9, x8, lsl #3
	stp	w20, w22, [x8]
	b	LBB0_10
LBB0_6:
	ldr	w0, [x19, #24]
Lloh3:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	stp	x23, x8, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #24]
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_8:
	bl	_av_log
LBB0_9:
Lloh13:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid code size %d/%d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_MAX_HUFF_CODES,8,3             ; @MAX_HUFF_CODES
l_.str.1:                               ; @.str.1
	.asciz	"too many codes\n"

	.no_dead_strip	_mp_get_code
.subsections_via_symbols
