	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function imc_adjust_bit_allocation
LCPI0_0:
	.quad	0xc415af1d78b58c40              ## double -1.0E+20
LCPI0_1:
	.quad	0xbfda8f5c28f5c28f              ## double -0.41499999999999998
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_2:
	.long	0xe0ad78ec                      ## float -1.00000002E+20
LCPI0_3:
	.long	0xc0000000                      ## float -2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_imc_adjust_bit_allocation:             ## @imc_adjust_bit_allocation
	.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	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_BANDS@GOTPCREL(%rip), %r8
	movl	(%r8), %ecx
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.1:
	movq	(%rsi), %r9
	xorl	%edi, %edi
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	cvtsd2ss	%xmm2, %xmm2
	movss	%xmm2, -160(%rbp,%rdi,4)
	incq	%rdi
	cmpq	%rdi, %rcx
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r9,%rdi,4), %ebx
	movapd	%xmm0, %xmm2
	cmpl	$6, %ebx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rsi), %rax
	movl	(%rax,%rdi,4), %eax
	addl	%ebx, %ebx
	subl	%ebx, %eax
	xorps	%xmm2, %xmm2
	cvtsi2sd	%eax, %xmm2
	addsd	%xmm1, %xmm2
	jmp	LBB0_4
LBB0_5:
	testl	%edx, %edx
	jle	LBB0_29
## %bb.6:
	movq	_band_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	xorl	%eax, %eax
	movss	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	movss	LCPI0_3(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	xorl	%r10d, %r10d
	testl	%ecx, %ecx
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_9:
	movl	%ecx, %r11d
	leaq	-1(%r11), %rdi
	movl	%r11d, %r14d
	andl	$3, %r14d
	cmpq	$3, %rdi
	jae	LBB0_11
## %bb.10:
	xorl	%edi, %edi
	movaps	%xmm0, %xmm3
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_8:
	movaps	%xmm0, %xmm4
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_11:
	andl	$-4, %r11d
	xorl	%edi, %edi
	movaps	%xmm0, %xmm3
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movss	-160(%rbp,%rdi,4), %xmm4        ## xmm4 = mem[0],zero,zero,zero
	ucomiss	%xmm3, %xmm4
	cmoval	%edi, %eax
	movss	-156(%rbp,%rdi,4), %xmm5        ## xmm5 = mem[0],zero,zero,zero
	maxss	%xmm3, %xmm4
	ucomiss	%xmm4, %xmm5
	leal	1(%rdi), %ebx
	cmovbel	%eax, %ebx
	maxss	%xmm4, %xmm5
	movss	-152(%rbp,%rdi,4), %xmm4        ## xmm4 = mem[0],zero,zero,zero
	ucomiss	%xmm5, %xmm4
	leal	2(%rdi), %ecx
	cmovbel	%ebx, %ecx
	maxss	%xmm5, %xmm4
	movss	-148(%rbp,%rdi,4), %xmm3        ## xmm3 = mem[0],zero,zero,zero
	ucomiss	%xmm4, %xmm3
	leal	3(%rdi), %eax
	cmovbel	%ecx, %eax
	maxss	%xmm4, %xmm3
	addq	$4, %rdi
	cmpq	%r11, %rdi
	jne	LBB0_12
LBB0_13:
	movaps	%xmm3, %xmm4
	testq	%r14, %r14
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movss	-160(%rbp,%rdi,4), %xmm4        ## xmm4 = mem[0],zero,zero,zero
	ucomiss	%xmm3, %xmm4
	cmoval	%edi, %eax
	maxss	%xmm3, %xmm4
	incq	%rdi
	movaps	%xmm4, %xmm3
	decq	%r14
	jne	LBB0_14
LBB0_15:
	xorps	%xmm3, %xmm3
	cvtss2sd	%xmm4, %xmm3
	ucomisd	%xmm1, %xmm3
	jbe	LBB0_26
## %bb.16:
	movslq	%eax, %r11
	movss	-160(%rbp,%r11,4), %xmm4        ## xmm4 = mem[0],zero,zero,zero
	addss	%xmm2, %xmm4
	movss	%xmm4, -160(%rbp,%r11,4)
	movq	(%rsi), %rcx
	movl	(%rcx,%r11,4), %edi
	incl	%edi
	movl	%edi, (%rcx,%r11,4)
	cmpl	$6, %edi
	jne	LBB0_18
## %bb.17:
	movl	$-525502228, -160(%rbp,%r11,4)  ## imm = 0xE0AD78EC
LBB0_18:
	movslq	(%r9,%r11,4), %rdi
	movl	4(%r9,%r11,4), %r15d
	cmpl	%r15d, %edi
	jge	LBB0_26
## %bb.19:
	cmpl	%edx, %r10d
	jge	LBB0_26
## %bb.20:
	incq	%r11
	movq	24(%rsi), %r14
	incq	%rdi
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -4(%r14,%rdi,4)
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	16(%rsi), %rbx
	movl	-4(%rbx,%rdi,4), %ecx
	cmpl	$5, %ecx
	jg	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	incl	%ecx
	movl	%ecx, -4(%rbx,%rdi,4)
	incl	%r10d
	movl	(%r9,%r11,4), %r15d
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	movslq	%r15d, %rcx
	cmpq	%rcx, %rdi
	jge	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_21 Depth=1
	incq	%rdi
	cmpl	%edx, %r10d
	jl	LBB0_21
	.p2align	4, 0x90
LBB0_26:
	cmpl	%edx, %r10d
	jge	LBB0_29
## %bb.27:
	ucomisd	%xmm3, %xmm1
	jae	LBB0_29
## %bb.28:
	movl	(%r8), %ecx
	testl	%ecx, %ecx
	jg	LBB0_9
	jmp	LBB0_8
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_31
## %bb.30:
	addq	$136, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BANDS,4,2                      ## @BANDS
	.comm	_band_tab,8,3                   ## @band_tab
	.no_dead_strip	_imc_adjust_bit_allocation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imc_adjust_bit_allocation
_imc_adjust_bit_allocation:             ; @imc_adjust_bit_allocation
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
Lloh3:
	adrp	x8, _BANDS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BANDS@GOTPAGEOFF]
	ldr	w15, [x8]
	cmp	w15, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x9, #0
	ldr	x10, [x1]
	lsl	x11, x15, #2
	add	x12, sp, #8
	mov	x13, #49807
	movk	x13, #10485, lsl #16
	movk	x13, #36700, lsl #32
	movk	x13, #49114, lsl #48
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x16, [x1, #8]
	ldr	w16, [x16, x9]
	sub	w14, w16, w14, lsl #1
	scvtf	d0, w14
	fmov	d1, x13
	fadd	d0, d0, d1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	fcvt	s0, d0
	str	s0, [x12, x9]
	add	x9, x9, #4
	cmp	x11, x9
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x10, x9]
	cmp	w14, #6
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x14, #35904
	movk	x14, #30901, lsl #16
	movk	x14, #44829, lsl #32
	movk	x14, #50197, lsl #48
	fmov	d0, x14
	b	LBB0_3
LBB0_6:
	cmp	w2, #1
	b.lt	LBB0_24
; %bb.7:
	mov	w9, #0
	mov	w10, #0
Lloh5:
	adrp	x11, _band_tab@GOTPAGE
Lloh6:
	ldr	x11, [x11, _band_tab@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	add	x12, sp, #8
	mov	x13, #35904
	movk	x13, #30901, lsl #16
	movk	x13, #44829, lsl #32
	movk	x13, #50197, lsl #48
	fmov	s0, #-2.00000000
	mov	w14, #30956
	movk	w14, #57517, lsl #16
	cmp	w15, #1
	b.lt	LBB0_10
LBB0_8:
	mov	x16, #0
	mov	w15, w15
	mov	w17, #30956
	movk	w17, #57517, lsl #16
	fmov	s1, w17
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s2, [x12, x16, lsl #2]
	fcmp	s2, s1
	fcsel	s1, s2, s1, gt
	csel	w9, w16, w9, gt
	add	x16, x16, #1
	cmp	x15, x16
	b.ne	LBB0_9
	b	LBB0_11
LBB0_10:
	mov	w15, #30956
	movk	w15, #57517, lsl #16
	fmov	s1, w15
LBB0_11:
	fcvt	d1, s1
	fmov	d2, x13
	fcmp	d1, d2
	b.le	LBB0_21
; %bb.12:
	sxtw	x16, w9
	sbfiz	x15, x9, #2, #32
	ldr	s2, [x12, x15]
	fadd	s2, s2, s0
	str	s2, [x12, x15]
	ldr	x17, [x1]
	ldr	w0, [x17, x15]
	add	w0, w0, #1
	str	w0, [x17, x15]
	cmp	w0, #6
	b.ne	LBB0_14
; %bb.13:
	str	w14, [x12, x16, lsl #2]
LBB0_14:
	ldrsw	x15, [x11, x16, lsl #2]
	add	x16, x16, #1
	ldr	w17, [x11, x16, lsl #2]
	cmp	w15, w17
	ccmp	w10, w2, #0, lt
	b.ge	LBB0_21
; %bb.15:
	ldr	x0, [x1, #24]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x0, x15, lsl #2]
	cbnz	w3, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x3, [x1, #16]
	ldr	w4, [x3, x15, lsl #2]
	cmp	w4, #5
	b.gt	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w17, w4, #1
	str	w17, [x3, x15, lsl #2]
	add	w10, w10, #1
	ldr	w17, [x11, x16, lsl #2]
LBB0_19:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x15, x15, #1
	cmp	x15, w17, sxtw
	b.ge	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	cmp	w10, w2
	b.lt	LBB0_16
LBB0_21:
	cmp	w10, w2
	b.ge	LBB0_24
; %bb.22:
	fmov	d2, x13
	fcmp	d1, d2
	b.ls	LBB0_24
; %bb.23:
	ldr	w15, [x8]
	cmp	w15, #1
	b.ge	LBB0_8
	b	LBB0_10
LBB0_24:
	ldur	x8, [x29, #-8]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BANDS,4,2                      ; @BANDS
	.comm	_band_tab,8,3                   ; @band_tab
	.no_dead_strip	_imc_adjust_bit_allocation
.subsections_via_symbols
