	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mod_stats_update_flip          ## -- Begin function mod_stats_update_flip
	.p2align	4, 0x90
_mod_stats_update_flip:                 ## @mod_stats_update_flip
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rsi, %rbx
	callq	_MOD_STATS_TO_CORE
	movl	(%rax), %esi
	cmpl	4(%rax), %esi
	jae	LBB0_5
## %bb.2:
	movq	%rax, %rcx
	movq	16(%rax), %rdi
	imulq	$56, %rsi, %r8
	movq	%rbx, (%rdi,%r8)
	leal	-1(%rsi), %r9d
	imulq	$56, %r9, %r11
	movq	%rbx, %rax
	subq	(%rdi,%r11), %rax
	shrq	$3, %rax
	movabsq	$2361183241434822607, %r10      ## imm = 0x20C49BA5E353F7CF
	mulq	%r10
	shrq	$4, %rdx
	movq	%rdx, 8(%rdi,%r8)
	cmpl	$10, %esi
	jb	LBB0_4
## %bb.3:
	addl	16(%rdi,%r8), %edx
	addl	8(%rdi,%r11), %edx
	leal	-2(%rsi), %eax
	imulq	$56, %rax, %rax
	addl	8(%rdi,%rax), %edx
	leal	-3(%rsi), %eax
	imulq	$56, %rax, %rax
	addl	8(%rdi,%rax), %edx
	leal	-4(%rsi), %eax
	imulq	$56, %rax, %rax
	addl	8(%rdi,%rax), %edx
	leal	-5(%rsi), %eax
	imulq	$56, %rax, %rax
	addl	8(%rdi,%rax), %edx
	leal	-6(%rsi), %eax
	imulq	$56, %rax, %rax
	addl	8(%rdi,%rax), %edx
	leal	-7(%rsi), %eax
	imulq	$56, %rax, %rax
	addl	8(%rdi,%rax), %edx
	leal	-8(%rsi), %eax
	imulq	$56, %rax, %rax
	addl	8(%rdi,%rax), %edx
	leal	-9(%rsi), %eax
	imulq	$56, %rax, %rax
	addl	8(%rdi,%rax), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$34, %rax
	addl	%edx, %eax
	movl	%eax, 16(%rdi,%r8)
LBB0_4:
	cmpq	$0, 24(%rdi,%r8)
	cmovgq	%rsi, %r9
	imulq	$56, %r9, %rax
	subq	40(%rdi,%rax), %rbx
	shrq	$3, %rbx
	movq	%rbx, %rax
	mulq	%r10
	shrq	$4, %rdx
	movq	%rdx, 32(%rdi,%r8)
	movl	8(%rcx), %eax
	movl	%eax, 48(%rdi,%r8)
	leal	1(%rsi), %edx
	movl	%edx, (%rcx)
	incl	%eax
	movl	%eax, 8(%rcx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mod_stats_update_flip          ; -- Begin function mod_stats_update_flip
	.p2align	2
_mod_stats_update_flip:                 ; @mod_stats_update_flip
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x1
	bl	_MOD_STATS_TO_CORE
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.hs	LBB0_5
; %bb.2:
	ldr	x9, [x0, #16]
	mov	w12, #56
	madd	x14, x8, x12, x9
	str	x19, [x14]
	sub	w10, w8, #1
	umull	x11, w10, w12
	ldr	x11, [x9, x11]
	sub	x11, x19, x11
	lsr	x13, x11, #3
	mov	x11, #63439
	movk	x11, #58195, lsl #16
	movk	x11, #39845, lsl #32
	movk	x11, #8388, lsl #48
	umulh	x13, x13, x11
	lsr	x13, x13, #4
	str	x13, [x14, #8]
	cmp	w8, #10
	b.lo	LBB0_4
; %bb.3:
	madd	x14, x8, x12, x9
	ldr	w15, [x14, #16]
	madd	x16, x10, x12, x9
	ldr	w16, [x16, #8]
	add	w13, w15, w13
	add	w13, w13, w16
	sub	w15, w8, #2
	umaddl	x15, w15, w12, x9
	ldr	w15, [x15, #8]
	sub	w16, w8, #3
	umaddl	x16, w16, w12, x9
	ldr	w16, [x16, #8]
	add	w13, w13, w15
	add	w13, w13, w16
	sub	w15, w8, #4
	umaddl	x15, w15, w12, x9
	ldr	w15, [x15, #8]
	sub	w16, w8, #5
	umaddl	x16, w16, w12, x9
	ldr	w16, [x16, #8]
	add	w13, w13, w15
	add	w13, w13, w16
	sub	w15, w8, #6
	umaddl	x15, w15, w12, x9
	ldr	w15, [x15, #8]
	sub	w16, w8, #7
	umaddl	x16, w16, w12, x9
	ldr	w16, [x16, #8]
	add	w13, w13, w15
	add	w13, w13, w16
	sub	w15, w8, #8
	umaddl	x15, w15, w12, x9
	sub	w16, w8, #9
	umaddl	x12, w16, w12, x9
	ldr	w15, [x15, #8]
	ldr	w12, [x12, #8]
	add	w13, w13, w15
	add	w12, w13, w12
	mov	w13, #26215
	movk	w13, #26214, lsl #16
	smull	x12, w12, w13
	lsr	x13, x12, #63
	asr	x12, x12, #34
	add	w12, w12, w13
	str	w12, [x14, #16]
LBB0_4:
	mov	w12, #56
	madd	x13, x8, x12, x9
	ldr	x14, [x13, #24]
	cmp	x14, #0
	csel	x10, x8, x10, gt
	madd	x9, x10, x12, x9
	ldr	x9, [x9, #40]
	sub	x9, x19, x9
	lsr	x9, x9, #3
	umulh	x9, x9, x11
	lsr	x9, x9, #4
	str	x9, [x13, #32]
	ldr	w9, [x0, #8]
	str	w9, [x13, #48]
	add	w8, w8, #1
	str	w8, [x0]
	add	w8, w9, #1
	str	w8, [x0, #8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
