	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_bgmc_decode                 ## -- Begin function ff_bgmc_decode
	.p2align	4, 0x90
_ff_bgmc_decode:                        ## @ff_bgmc_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r15d
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	32(%rbp), %rdi
	movq	40(%rbp), %rsi
	movl	%ecx, %edx
	callq	_bgmc_lut_getp
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movl	(%r14), %r12d
	movq	16(%rbp), %rcx
	movl	(%rcx), %edi
	movq	24(%rbp), %rcx
	movl	(%rcx), %r14d
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.1:
	movq	_LUT_SIZE@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%esi, %edx
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	imull	(%rcx), %esi
	movl	$1, %r9d
	movl	%r15d, %ecx
	shll	%cl, %r9d
	leaq	(%rax,%rsi,4), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	_HALF@GOTPCREL(%rip), %r13
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	addq	$4, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	-60(%rbp), %r9d                 ## 4-byte Reload
	je	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##     Child Loop BB0_6 Depth 2
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	subl	%edi, %r12d
	incl	%r12d
	movl	%r14d, %eax
	subl	%edi, %eax
	incl	%eax
	movq	_FREQ_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r8d, %ecx
	shll	%cl, %eax
	decl	%eax
	xorl	%edx, %edx
	divl	%r12d
	movl	%r8d, %ecx
	movq	_LUT_BITS@GOTPCREL(%rip), %rdx
	subl	(%rdx), %ecx
	movl	%eax, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %edx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rdx,4), %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movq	_cf_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movq	(%rcx,%rsi,8), %rsi
	cmpl	%eax, (%rsi,%rdx,4)
	jbe	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	%r9d, %edx
	cmpl	%eax, (%rsi,%rdx,4)
	ja	LBB0_3
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %r10d                ## 4-byte Reload
	movl	%r10d, %ecx
	shrl	%cl, %edx
	leal	-1(%rdx), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
                                        ## kill: def $eax killed $eax def $rax
	shll	%cl, %eax
	movl	(%rsi,%rax,4), %r9d
	imull	%r12d, %r9d
	movl	$-1, %eax
	movl	%r8d, %ecx
	shll	%cl, %eax
	addl	%r9d, %eax
	shrl	%cl, %eax
	movl	%r10d, %ecx
	shll	%cl, %edx
	addl	%edi, %eax
	imull	(%rsi,%rdx,4), %r12d
	movl	%r8d, %ecx
	shrl	%cl, %r12d
	addl	%r12d, %edi
	movl	%eax, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=2
	movl	%r12d, %eax
	movl	%edi, %r15d
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=2
	addl	%r15d, %r15d
	leal	(%rax,%rax), %r12d
	incl	%r12d
	movq	%rbx, %rdi
	callq	_get_bits1
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r14,2), %r14d
	movl	%r15d, %edi
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %ecx
	movl	%r12d, %eax
	subl	%ecx, %eax
	jb	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	%edi, %r15d
	subl	%ecx, %r15d
	jae	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_FIRST_QTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%edi, %r15d
	subl	%eax, %r15d
	jb	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_THIRD_QTR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	jae	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=2
	subl	%eax, %r14d
	subl	%eax, %r12d
	movl	%r12d, %eax
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	subl	%ecx, %r14d
	jmp	LBB0_13
LBB0_15:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax)
	movq	16(%rbp), %rax
	movl	%edi, (%rax)
	movq	24(%rbp), %rax
	movl	%r14d, (%rax)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LUT_SIZE,4,2                   ## @LUT_SIZE
	.comm	_FREQ_BITS,4,2                  ## @FREQ_BITS
	.comm	_LUT_BITS,4,2                   ## @LUT_BITS
	.comm	_cf_table,8,3                   ## @cf_table
	.comm	_HALF,4,2                       ## @HALF
	.comm	_FIRST_QTR,4,2                  ## @FIRST_QTR
	.comm	_THIRD_QTR,4,2                  ## @THIRD_QTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_bgmc_decode                 ; -- Begin function ff_bgmc_decode
	.p2align	2
_ff_bgmc_decode:                        ; @ff_bgmc_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, x7
	mov	x20, x6
	mov	x21, x5
	mov	x26, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	ldp	x0, x1, [x29, #16]
	mov	x2, x3
	bl	_bgmc_lut_getp
	stp	x21, x20, [sp, #8]              ; 16-byte Folded Spill
	ldr	w8, [x21]
	ldr	w28, [x20]
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	ldr	w27, [x19]
	str	w24, [sp, #52]                  ; 4-byte Folded Spill
	cbz	w24, LBB0_13
; %bb.1:
	mov	w19, #0
Lloh0:
	adrp	x9, _LUT_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LUT_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w9, w9, w26
	add	x10, x0, w9, uxtw #2
	mov	w9, w26
	stp	x9, x10, [sp, #32]              ; 16-byte Folded Spill
	mov	w9, #1
	str	w22, [sp, #60]                  ; 4-byte Folded Spill
	lsl	w21, w9, w22
Lloh3:
	adrp	x24, _HALF@GOTPAGE
Lloh4:
	ldr	x24, [x24, _HALF@GOTPAGEOFF]
Lloh5:
	adrp	x20, _FIRST_QTR@GOTPAGE
Lloh6:
	ldr	x20, [x20, _FIRST_QTR@GOTPAGEOFF]
Lloh7:
	adrp	x26, _THIRD_QTR@GOTPAGE
Lloh8:
	ldr	x26, [x26, _THIRD_QTR@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [sp, #56]                   ; 4-byte Folded Reload
	str	w9, [x23], #4
	add	w19, w19, #1
	ldr	w9, [sp, #52]                   ; 4-byte Folded Reload
	cmp	w19, w9
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	sub	w8, w8, w28
	add	w9, w8, #1
	sub	w8, w27, w28
	add	w8, w8, #1
Lloh9:
	adrp	x10, _FREQ_BITS@GOTPAGE
Lloh10:
	ldr	x10, [x10, _FREQ_BITS@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	sub	w8, w8, #1
	udiv	w12, w8, w9
Lloh12:
	adrp	x8, _LUT_BITS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LUT_BITS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	sub	w8, w10, w8
	lsr	w8, w12, w8
	ldp	x13, x11, [sp, #32]             ; 16-byte Folded Reload
	ldr	w8, [x11, w8, uxtw #2]
	ldr	w11, [sp, #60]                  ; 4-byte Folded Reload
	lsl	w8, w8, w11
Lloh15:
	adrp	x11, _cf_table@GOTPAGE
Lloh16:
	ldr	x11, [x11, _cf_table@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	ldr	x11, [x11, x13, lsl #3]
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w13, [x11, w8, uxtw #2]
	cmp	w13, w12
	b.ls	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	add	w8, w8, w21
	b	LBB0_4
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w14, [sp, #60]                  ; 4-byte Folded Reload
	lsr	w12, w8, w14
	sub	w8, w12, #1
	str	w8, [sp, #56]                   ; 4-byte Folded Spill
	lsl	w8, w8, w14
	ldr	w8, [x11, w8, uxtw #2]
	mov	w13, #-1
	lsl	w13, w13, w10
	madd	w8, w8, w9, w13
	lsr	w8, w8, w10
	add	w8, w8, w28
	lsl	w12, w12, w14
	ldr	w11, [x11, w12, uxtw #2]
	mul	w9, w11, w9
	lsr	w9, w9, w10
	add	w28, w9, w28
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	sub	w27, w27, w11
	mov	x8, x9
	mov	x28, x10
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	lsl	w28, w28, #1
	mov	w22, #1
	bfi	w22, w8, #1, #31
	mov	x0, x25
	bl	_get_bits1
	add	w27, w0, w27, lsl #1
	mov	x8, x22
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x24]
	subs	w9, w8, w11
	b.lo	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	subs	w10, w28, w11
	b.hs	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w10, [x20]
	ldr	w11, [x26]
	subs	w9, w28, w10
	ccmp	w8, w11, #2, hs
	b.hs	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	sub	w27, w27, w10
	sub	w8, w8, w10
	mov	x28, x9
	b	LBB0_8
LBB0_13:
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w28, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w27, [x8]
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LUT_SIZE,4,2                   ; @LUT_SIZE
	.comm	_FREQ_BITS,4,2                  ; @FREQ_BITS
	.comm	_LUT_BITS,4,2                   ; @LUT_BITS
	.comm	_cf_table,8,3                   ; @cf_table
	.comm	_HALF,4,2                       ; @HALF
	.comm	_FIRST_QTR,4,2                  ; @FIRST_QTR
	.comm	_THIRD_QTR,4,2                  ; @THIRD_QTR
.subsections_via_symbols
