	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyclic_buffer_add
_cyclic_buffer_add:                     ## @cyclic_buffer_add
	.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
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %ebx
	callq	_cyclic_buffer_cache_store
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movq	_CB@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_c_wptr@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	leaq	(%rax,%rax,2), %rdx
	cmpq	$0, 16(%rcx,%rdx,8)
	je	LBB0_10
## %bb.2:
	movl	%r14d, %edx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_subscriptions@GOTPCREL(%rip), %r13
	movq	16(%r13), %r14
	cmpq	_subscriptions@GOTPCREL(%rip), %r14
	je	LBB0_3
## %bb.4:
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	_st_small_updates@GOTPCREL(%rip), %rbx
	movq	_st_big_updates@GOTPCREL(%rip), %r15
	cmpq	%rax, (%r14)
	jne	LBB0_7
	.p2align	4, 0x90
LBB0_6:
	movq	8(%r14), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_assert
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	movq	$-1, (%r14)
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %r14
	cmpq	%r13, %r14
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r12), %rax
	cmpq	%rax, (%r14)
	je	LBB0_6
	jmp	LBB0_7
LBB0_9:
	movq	_CB@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%r12), %rax
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_10
LBB0_3:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%edx, %r14d
LBB0_10:
	leaq	(%rax,%rax,2), %rax
	movl	%ebx, (%rcx,%rax,8)
	movl	%r15d, 4(%rcx,%rax,8)
	movl	%r14d, 8(%rcx,%rax,8)
	movq	$0, 16(%rcx,%rax,8)
	movq	(%r12), %rax
	incq	%rax
	movq	_WEIGHTS_CYCLIC_BUFFER_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_11
## %bb.12:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_13
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_13:
	movq	%rdx, (%r12)
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CB,8,3                         ## @CB
	.comm	_c_wptr,8,3                     ## @c_wptr
	.comm	_subscriptions,24,3             ## @subscriptions
	.comm	_st_small_updates,8,3           ## @st_small_updates
	.comm	_st_big_updates,8,3             ## @st_big_updates
	.comm	_WEIGHTS_CYCLIC_BUFFER_SIZE,8,3 ## @WEIGHTS_CYCLIC_BUFFER_SIZE
	.no_dead_strip	_cyclic_buffer_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyclic_buffer_add
_cyclic_buffer_add:                     ; @cyclic_buffer_add
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_cyclic_buffer_cache_store
	cbz	w0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x23, _CB@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CB@GOTPAGEOFF]
	ldr	x9, [x23]
Lloh2:
	adrp	x22, _c_wptr@GOTPAGE
Lloh3:
	ldr	x22, [x22, _c_wptr@GOTPAGEOFF]
	ldr	x8, [x22]
	mov	w10, #24
	madd	x10, x8, x10, x9
	ldr	x10, [x10, #16]
Lloh4:
	adrp	x24, _subscriptions@GOTPAGE
Lloh5:
	ldr	x24, [x24, _subscriptions@GOTPAGEOFF]
	ldr	x25, [x24, #16]
	cmp	x10, #0
	ccmp	x25, x24, #4, ne
	b.eq	LBB0_8
; %bb.2:
Lloh6:
	adrp	x26, _st_small_updates@GOTPAGE
Lloh7:
	ldr	x26, [x26, _st_small_updates@GOTPAGEOFF]
Lloh8:
	adrp	x27, _st_big_updates@GOTPAGE
Lloh9:
	ldr	x27, [x27, _st_big_updates@GOTPAGEOFF]
	mov	x28, #-1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [x27]
	stp	x28, x8, [x25]
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x25, [x25, #16]
	cmp	x25, x24
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	b	LBB0_3
LBB0_7:
	ldr	x9, [x23]
	ldr	x8, [x22]
LBB0_8:
	mov	w10, #24
	madd	x8, x8, x10, x9
	stp	w21, w20, [x8]
	str	w19, [x8, #8]
	str	xzr, [x8, #16]
	ldr	x8, [x22]
	add	x8, x8, #1
Lloh10:
	adrp	x9, _WEIGHTS_CYCLIC_BUFFER_SIZE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WEIGHTS_CYCLIC_BUFFER_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x22]
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CB,8,3                         ; @CB
	.comm	_c_wptr,8,3                     ; @c_wptr
	.comm	_subscriptions,24,3             ; @subscriptions
	.comm	_st_small_updates,8,3           ; @st_small_updates
	.comm	_st_big_updates,8,3             ; @st_big_updates
	.comm	_WEIGHTS_CYCLIC_BUFFER_SIZE,8,3 ; @WEIGHTS_CYCLIC_BUFFER_SIZE
	.no_dead_strip	_cyclic_buffer_add
.subsections_via_symbols
