	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rescale_dec
_rescale_dec:                           ## @rescale_dec
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$3088, %rsp                     ## imm = 0xC10
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	-1056(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	___bzero
	leaq	-3104(%rbp), %rdi
	movl	$2048, %esi                     ## imm = 0x800
	callq	___bzero
	movl	(%r14), %r8d
	leal	-1(%r8), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movl	$1, %edx
	testl	%r8d, %r8d
	cmovlel	%edx, %eax
	movd	%eax, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqa	%xmm0, -1056(%rbp)
	movdqa	%xmm0, -1040(%rbp)
	movdqa	%xmm0, -1024(%rbp)
	movdqa	%xmm0, -1008(%rbp)
	movdqa	%xmm0, -992(%rbp)
	movdqa	%xmm0, -976(%rbp)
	movdqa	%xmm0, -960(%rbp)
	movdqa	%xmm0, -944(%rbp)
	movdqa	%xmm0, -928(%rbp)
	movdqa	%xmm0, -912(%rbp)
	movdqa	%xmm0, -896(%rbp)
	movdqa	%xmm0, -880(%rbp)
	movdqa	%xmm0, -864(%rbp)
	movdqa	%xmm0, -848(%rbp)
	movdqa	%xmm0, -832(%rbp)
	movdqa	%xmm0, -816(%rbp)
	movdqa	%xmm0, -800(%rbp)
	movdqa	%xmm0, -784(%rbp)
	movdqa	%xmm0, -768(%rbp)
	movdqa	%xmm0, -752(%rbp)
	movdqa	%xmm0, -736(%rbp)
	movdqa	%xmm0, -720(%rbp)
	movdqa	%xmm0, -704(%rbp)
	movdqa	%xmm0, -688(%rbp)
	movdqa	%xmm0, -672(%rbp)
	movdqa	%xmm0, -656(%rbp)
	movdqa	%xmm0, -640(%rbp)
	movdqa	%xmm0, -624(%rbp)
	movdqa	%xmm0, -608(%rbp)
	movdqa	%xmm0, -592(%rbp)
	movdqa	%xmm0, -576(%rbp)
	movdqa	%xmm0, -560(%rbp)
	movdqa	%xmm0, -544(%rbp)
	movdqa	%xmm0, -528(%rbp)
	movdqa	%xmm0, -512(%rbp)
	movdqa	%xmm0, -496(%rbp)
	movdqa	%xmm0, -480(%rbp)
	movdqa	%xmm0, -464(%rbp)
	movdqa	%xmm0, -448(%rbp)
	movdqa	%xmm0, -432(%rbp)
	movdqa	%xmm0, -416(%rbp)
	movdqa	%xmm0, -400(%rbp)
	movdqa	%xmm0, -384(%rbp)
	movdqa	%xmm0, -368(%rbp)
	movdqa	%xmm0, -352(%rbp)
	movdqa	%xmm0, -336(%rbp)
	movdqa	%xmm0, -320(%rbp)
	movdqa	%xmm0, -304(%rbp)
	movdqa	%xmm0, -288(%rbp)
	movdqa	%xmm0, -272(%rbp)
	movdqa	%xmm0, -256(%rbp)
	movdqa	%xmm0, -240(%rbp)
	movdqa	%xmm0, -224(%rbp)
	movdqa	%xmm0, -208(%rbp)
	movdqa	%xmm0, -192(%rbp)
	movdqa	%xmm0, -176(%rbp)
	movdqa	%xmm0, -160(%rbp)
	movdqa	%xmm0, -144(%rbp)
	movdqa	%xmm0, -128(%rbp)
	movdqa	%xmm0, -112(%rbp)
	movdqa	%xmm0, -96(%rbp)
	movdqa	%xmm0, -80(%rbp)
	movdqa	%xmm0, -64(%rbp)
	movdqa	%xmm0, -48(%rbp)
	movl	4(%r14), %r9d
	testl	%r9d, %r9d
	jle	LBB0_8
## %bb.1:
	movq	8(%r14), %rbx
	movq	16(%r14), %rdi
	leaq	-1(%r9), %rax
	movl	%r9d, %r10d
	andl	$3, %r10d
	cmpq	$3, %rax
	jae	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movl	%r9d, %r11d
	andl	$-4, %r11d
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rax,4), %esi
	movq	(%rbx,%rax,8), %rdx
	movl	%esi, -1056(%rbp,%rdx,4)
	movl	4(%rdi,%rax,4), %edx
	movq	8(%rbx,%rax,8), %rsi
	movl	%edx, -1056(%rbp,%rsi,4)
	movl	8(%rdi,%rax,4), %edx
	movq	16(%rbx,%rax,8), %rsi
	movl	%edx, -1056(%rbp,%rsi,4)
	movl	12(%rdi,%rax,4), %edx
	movq	24(%rbx,%rax,8), %rsi
	movl	%edx, -1056(%rbp,%rsi,4)
	addq	$4, %rax
	cmpq	%rax, %r11
	jne	LBB0_4
LBB0_5:
	testq	%r10, %r10
	je	LBB0_8
## %bb.6:
	leaq	(%rbx,%rax,8), %rdx
	leaq	(%rdi,%rax,4), %rax
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdi,4), %esi
	movq	(%rdx,%rdi,8), %rbx
	movl	%esi, -1056(%rbp,%rbx,4)
	incq	%rdi
	cmpq	%rdi, %r10
	jne	LBB0_7
LBB0_8:
	xorl	%edx, %edx
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	-1060(%rbp,%rax,4), %esi
	movl	-1056(%rbp,%rax,4), %edi
	movl	%esi, -3112(%rbp,%rax,8)
	movl	%edx, -3108(%rbp,%rax,8)
	addl	%edx, %esi
	movl	%edi, -3104(%rbp,%rax,8)
	movl	%esi, -3100(%rbp,%rax,8)
	addl	%edi, %esi
	addq	$2, %rax
	movl	%esi, %edx
	cmpq	$257, %rax                      ## imm = 0x101
	jne	LBB0_9
## %bb.10:
	testl	%r8d, %r8d
	jle	LBB0_11
## %bb.12:
	movl	%ecx, (%r14)
	addl	$-2, %r8d
	movl	%r8d, %edx
	jmp	LBB0_13
LBB0_11:
	movl	%ecx, %edx
	movl	%r8d, %ecx
LBB0_13:
	movl	$256, %esi                      ## imm = 0x100
	subl	%r9d, %esi
	xorl	%eax, %eax
	testl	%ecx, %ecx
	cmovgl	%edx, %eax
	movl	%eax, %ecx
	shll	%cl, %esi
	movq	16(%r14), %rax
	testl	%r9d, %r9d
	jle	LBB0_16
## %bb.14:
	movq	8(%r14), %r8
	movq	24(%r14), %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rbx,4), %ecx
	movl	%ecx, %edx
	sarl	%edx
	subl	%edx, %ecx
	movl	%ecx, (%rax,%rbx,4)
	addl	%ecx, %esi
	movl	(%r8,%rbx,8), %ecx
	leal	(%rcx,%rcx), %edx
	incl	%edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	addl	%ecx, %ecx
	movslq	%edx, %rdx
	movl	-3104(%rbp,%rdx,4), %edx
	movslq	%ecx, %rcx
	movl	-3104(%rbp,%rcx,4), %ecx
	movl	%ecx, (%rdi,%rbx,8)
	movl	%edx, 4(%rdi,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r9
	jne	LBB0_15
LBB0_16:
	movq	32(%r14), %rcx
	movl	%esi, (%rax,%rcx,4)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$3088, %rsp                     ## imm = 0xC10
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rescale_dec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rescale_dec
_rescale_dec:                           ; @rescale_dec
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #3088
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x20, sp, #2048
	add	x0, sp, #2048
	mov	w1, #1024
	bl	_bzero
	mov	x21, sp
	mov	x0, sp
	mov	w1, #2048
	bl	_bzero
	ldp	w8, w9, [x19]
	sub	w10, w8, #1
	mov	w11, #1
	lsl	w11, w11, w10
	cmp	w8, #0
	csinc	w11, w11, wzr, gt
	dup.4s	v0, w11
	str	q0, [sp, #2048]
	str	q0, [sp, #2064]
	str	q0, [sp, #2080]
	str	q0, [sp, #2096]
	str	q0, [sp, #2112]
	str	q0, [sp, #2128]
	str	q0, [sp, #2144]
	str	q0, [sp, #2160]
	str	q0, [sp, #2176]
	str	q0, [sp, #2192]
	str	q0, [sp, #2208]
	str	q0, [sp, #2224]
	str	q0, [sp, #2240]
	str	q0, [sp, #2256]
	str	q0, [sp, #2272]
	str	q0, [sp, #2288]
	str	q0, [sp, #2304]
	str	q0, [sp, #2320]
	str	q0, [sp, #2336]
	str	q0, [sp, #2352]
	str	q0, [sp, #2368]
	str	q0, [sp, #2384]
	str	q0, [sp, #2400]
	str	q0, [sp, #2416]
	str	q0, [sp, #2432]
	str	q0, [sp, #2448]
	str	q0, [sp, #2464]
	str	q0, [sp, #2480]
	str	q0, [sp, #2496]
	str	q0, [sp, #2512]
	str	q0, [sp, #2528]
	str	q0, [sp, #2544]
	str	q0, [sp, #2560]
	str	q0, [sp, #2576]
	str	q0, [sp, #2592]
	str	q0, [sp, #2608]
	str	q0, [sp, #2624]
	str	q0, [sp, #2640]
	str	q0, [sp, #2656]
	str	q0, [sp, #2672]
	str	q0, [sp, #2688]
	str	q0, [sp, #2704]
	str	q0, [sp, #2720]
	str	q0, [sp, #2736]
	str	q0, [sp, #2752]
	str	q0, [sp, #2768]
	str	q0, [sp, #2784]
	str	q0, [sp, #2800]
	str	q0, [sp, #2816]
	str	q0, [sp, #2832]
	str	q0, [sp, #2848]
	str	q0, [sp, #2864]
	str	q0, [sp, #2880]
	str	q0, [sp, #2896]
	str	q0, [sp, #2912]
	str	q0, [sp, #2928]
	str	q0, [sp, #2944]
	str	q0, [sp, #2960]
	str	q0, [sp, #2976]
	str	q0, [sp, #2992]
	str	q0, [sp, #3008]
	str	q0, [sp, #3024]
	str	q0, [sp, #3040]
	str	q0, [sp, #3056]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.1:
	ldp	x12, x11, [x19, #8]
	cmp	w9, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x13, #0
	b	LBB0_6
LBB0_3:
	and	x13, x9, #0xfffffffc
	add	x14, x12, #16
	add	x15, x11, #8
	add	x16, sp, #2048
	mov	x17, x13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w0, w1, [x15, #-8]
	ldp	w2, w3, [x15], #16
	ldp	x4, x5, [x14, #-16]
	ldp	x6, x7, [x14], #32
	str	w0, [x16, x4, lsl #2]
	str	w1, [x16, x5, lsl #2]
	str	w2, [x16, x6, lsl #2]
	str	w3, [x16, x7, lsl #2]
	subs	x17, x17, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x13, x9
	b.eq	LBB0_8
LBB0_6:
	add	x12, x12, x13, lsl #3
	sub	x14, x9, x13
	add	x15, sp, #2048
	add	x11, x11, x13, lsl #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x11], #4
	ldr	x16, [x12], #8
	str	w13, [x15, x16, lsl #2]
	subs	x14, x14, #1
	b.ne	LBB0_7
LBB0_8:
	mov	x11, #0
	mov	w12, #0
	add	x13, x21, #4
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x20, x11]
	stp	w14, w12, [x13, #-4]
	add	w12, w14, w12
	add	x11, x11, #4
	add	x13, x13, #8
	cmp	x11, #1024
	b.ne	LBB0_9
; %bb.10:
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.11:
	str	w10, [x19]
	sub	w11, w8, #2
	b	LBB0_13
LBB0_12:
	mov	x11, x10
	mov	x10, x8
LBB0_13:
	mov	w8, #256
	sub	w8, w8, w9
	cmp	w10, #0
	csel	w10, w11, wzr, gt
	lsl	w8, w8, w10
	ldr	x10, [x19, #16]
	cmp	w9, #1
	b.lt	LBB0_16
; %bb.14:
	ldr	x11, [x19, #8]
	ldr	x12, [x19, #24]
	mov	x13, sp
	mov	x14, x10
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w15, [x14]
	sub	w15, w15, w15, asr #1
	str	w15, [x14], #4
	ldrsw	x16, [x11], #8
	add	w8, w15, w8
	ldr	d0, [x13, x16, lsl #3]
	str	d0, [x12], #8
	subs	x9, x9, #1
	b.ne	LBB0_15
LBB0_16:
	ldr	x9, [x19, #32]
	str	w8, [x10, x9, lsl #2]
	ldur	x8, [x29, #-40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	add	sp, sp, #3088
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rescale_dec
.subsections_via_symbols
