	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function accum_sum_rescale
_accum_sum_rescale:                     ## @accum_sum_rescale
	.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	%rdi, %rbx
	movl	(%rdi), %r14d
	movl	4(%rdi), %r15d
	movl	(%rsi), %r12d
	cmpl	%r14d, %r12d
	jge	LBB0_1
## %bb.2:
	cmpl	$0, 8(%rbx)
	movl	%r14d, %edi
	movl	%r15d, %eax
	jne	LBB0_4
## %bb.3:
	leal	1(%r14), %edi
	leal	1(%r15), %eax
	jmp	LBB0_4
LBB0_1:
	leal	1(%r12), %edi
	movl	%r15d, %eax
	subl	%r14d, %eax
	addl	%r12d, %eax
	incl	%eax
LBB0_4:
	movl	%edi, %ecx
	notl	%ecx
	addl	%eax, %ecx
	notl	%r12d
	addl	4(%rsi), %r12d
	xorl	%edx, %edx
	subl	%ecx, %r12d
	cmovlel	%edx, %r12d
	addl	%eax, %r12d
	cmpl	%r15d, %r12d
	jne	LBB0_6
## %bb.5:
	cmpl	%r14d, %edi
	je	LBB0_11
LBB0_6:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leal	(,%r12,8), %r13d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_palloc0
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	callq	_palloc0
	movq	%rax, %r13
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	subl	%r14d, %eax
	movslq	%eax, %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14,8), %rdi
	shll	$3, %r15d
	movl	%r15d, %edx
	callq	_memcpy
	movq	16(%rbx), %rdi
	callq	_pfree
	leaq	(,%r14,8), %rdi
	addq	%r13, %rdi
	movq	24(%rbx), %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	24(%rbx), %rdi
	callq	_pfree
LBB0_8:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 16(%rbx)
	movq	%r13, 24(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movl	%r12d, 4(%rbx)
	xorl	%edi, %edi
	cmpq	$0, (%rcx)
	jne	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	cmpq	$0, (%r13)
	sete	%dil
LBB0_10:
	callq	_Assert
	movl	$1, 8(%rbx)
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
LBB0_11:
	movq	8(%rsi), %rax
	cmpq	32(%rbx), %rax
	jle	LBB0_13
## %bb.12:
	movq	%rax, 32(%rbx)
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_accum_sum_rescale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function accum_sum_rescale
_accum_sum_rescale:                     ; @accum_sum_rescale
	.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	x20, x1
	mov	x19, x0
	ldp	w25, w23, [x0]
	ldr	w8, [x1]
	cmp	w8, w25
	b.ge	LBB0_2
; %bb.1:
	ldr	w9, [x19, #8]
	cmp	w9, #0
	cinc	w24, w25, eq
	cinc	w9, w23, eq
	b	LBB0_3
LBB0_2:
	add	w24, w8, #1
	sub	w9, w23, w25
	add	w9, w9, w24
LBB0_3:
	mvn	w10, w24
	add	w10, w9, w10
	ldr	w11, [x20, #4]
	mvn	w8, w8
	add	w8, w11, w8
	subs	w8, w8, w10
	csel	w8, w8, wzr, gt
	add	w26, w8, w9
	cmp	w26, w23
	ccmp	w24, w25, #0, eq
	b.eq	LBB0_10
; %bb.4:
	lsl	w22, w26, #3
	mov	x0, x22
	bl	_palloc0
	mov	x21, x0
	mov	x0, x22
	bl	_palloc0
	mov	x22, x0
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_6
; %bb.5:
	sub	w8, w24, w25
	sbfiz	x25, x8, #3, #32
	add	x0, x21, x25
	lsl	w23, w23, #3
	mov	x2, x23
	bl	_memcpy
	ldr	x0, [x19, #16]
	bl	_pfree
	add	x0, x22, x25
	ldr	x1, [x19, #24]
	mov	x2, x23
	bl	_memcpy
	ldr	x0, [x19, #24]
	bl	_pfree
LBB0_6:
	stp	x21, x22, [x19, #16]
	stp	w24, w26, [x19]
	ldr	x8, [x21]
	cbz	x8, LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w0, eq
LBB0_9:
	bl	_Assert
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_10:
	ldr	x8, [x20, #8]
	ldr	x9, [x19, #32]
	cmp	x8, x9
	b.le	LBB0_12
; %bb.11:
	str	x8, [x19, #32]
LBB0_12:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_accum_sum_rescale
.subsections_via_symbols
