	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function LagTrackerWrite
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_LagTrackerWrite:                       ## @LagTrackerWrite
	.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
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_am_walsender@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_18
## %bb.1:
	movq	_lag_tracker@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	cmpq	%rdi, (%r10)
	je	LBB0_18
## %bb.2:
	movq	%rdi, (%r10)
	movl	8(%r10), %r8d
	leal	1(%r8), %eax
	movq	_LAG_TRACKER_BUFFER_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	cltd
	idivl	%r9d
	movq	_NUM_SYNC_REP_WAIT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	testl	%r11d, %r11d
	jle	LBB0_3
## %bb.4:
	movq	16(%r10), %r15
	cmpl	$8, %r11d
	jae	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_13
LBB0_6:
	movl	%r11d, %eax
	andl	$-8, %eax
	movd	%edx, %xmm0
	pshufd	$0, %xmm0, %xmm3                ## xmm3 = xmm0[0,0,0,0]
	leaq	-8(%rax), %rcx
	movq	%rcx, %r14
	shrq	$3, %r14
	incq	%r14
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.8:
	movq	%r14, %rcx
	andq	$-2, %rcx
	xorps	%xmm2, %xmm2
	xorl	%ebx, %ebx
	movaps	LCPI0_0(%rip), %xmm5            ## xmm5 = [1,1,1,1]
	xorps	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%r15,%rbx,4), %xmm6
	movdqu	16(%r15,%rbx,4), %xmm7
	movdqu	32(%r15,%rbx,4), %xmm0
	movdqu	48(%r15,%rbx,4), %xmm1
	pcmpeqd	%xmm3, %xmm6
	pcmpeqd	%xmm3, %xmm7
	pcmpeqd	%xmm3, %xmm0
	por	%xmm6, %xmm0
	pcmpeqd	%xmm3, %xmm1
	por	%xmm7, %xmm1
	blendvps	%xmm0, %xmm5, %xmm2
	movdqa	%xmm1, %xmm0
	blendvps	%xmm0, %xmm5, %xmm4
	addq	$16, %rbx
	addq	$-2, %rcx
	jne	LBB0_9
## %bb.10:
	testb	$1, %r14b
	je	LBB0_12
LBB0_11:
	movdqu	(%r15,%rbx,4), %xmm0
	movdqu	16(%r15,%rbx,4), %xmm1
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm3, %xmm1
	movaps	LCPI0_0(%rip), %xmm3            ## xmm3 = [1,1,1,1]
	blendvps	%xmm0, %xmm3, %xmm2
	movdqa	%xmm1, %xmm0
	blendvps	%xmm0, %xmm3, %xmm4
LBB0_12:
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm2, %xmm0
	blendvps	%xmm0, %xmm4, %xmm2
	xorl	%ecx, %ecx
	ptest	%xmm2, %xmm2
	setne	%cl
	cmpq	%r11, %rax
	je	LBB0_15
LBB0_13:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpl	(%r15,%rax,4), %edx
	cmovel	%ebx, %ecx
	incq	%rax
	cmpq	%rax, %r11
	jne	LBB0_14
LBB0_15:
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.16:
	testl	%r8d, %r8d
	cmovgl	%r8d, %r9d
	decl	%r9d
	movl	%r9d, 8(%r10)
	jmp	LBB0_17
LBB0_3:
	movl	%r8d, %r9d
	movl	%edx, %r8d
LBB0_17:
	movq	24(%r10), %rax
	movslq	%r9d, %rcx
	shlq	$4, %rcx
	movq	%rdi, 8(%rax,%rcx)
	movl	%esi, (%rax,%rcx)
	movl	%r8d, 8(%r10)
LBB0_18:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorps	%xmm2, %xmm2
	xorl	%ebx, %ebx
	xorps	%xmm4, %xmm4
	testb	$1, %r14b
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_am_walsender,4,2               ## @am_walsender
	.comm	_lag_tracker,8,3                ## @lag_tracker
	.comm	_LAG_TRACKER_BUFFER_SIZE,4,2    ## @LAG_TRACKER_BUFFER_SIZE
	.comm	_NUM_SYNC_REP_WAIT_MODE,4,2     ## @NUM_SYNC_REP_WAIT_MODE
	.no_dead_strip	_LagTrackerWrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LagTrackerWrite
_LagTrackerWrite:                       ; @LagTrackerWrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #16
	.cfi_def_cfa_offset 16
Lloh0:
	adrp	x8, _am_walsender@GOTPAGE
Lloh1:
	ldr	x8, [x8, _am_walsender@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.1:
Lloh3:
	adrp	x8, _lag_tracker@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lag_tracker@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [x8]
	cmp	x9, x0
	b.eq	LBB0_14
; %bb.2:
	str	x0, [x8]
	ldr	w9, [x8, #8]
	add	w10, w9, #1
Lloh6:
	adrp	x11, _LAG_TRACKER_BUFFER_SIZE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _LAG_TRACKER_BUFFER_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	sdiv	w12, w10, w11
	msub	w10, w12, w11, w10
Lloh9:
	adrp	x12, _NUM_SYNC_REP_WAIT_MODE@GOTPAGE
Lloh10:
	ldr	x12, [x12, _NUM_SYNC_REP_WAIT_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	cmp	w12, #1
	b.lt	LBB0_12
; %bb.3:
	ldr	x13, [x8, #16]
	cmp	w12, #16
	b.hs	LBB0_5
; %bb.4:
	mov	x14, #0
	mov	w15, #0
	b	LBB0_8
LBB0_5:
	and	x14, x12, #0xfffffff0
	dup.4s	v1, w10
	add	x15, x13, #32
	movi.2d	v0, #0000000000000000
	movi.4s	v3, #1
	mov	x16, x14
	movi.2d	v5, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v2, #0000000000000000
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q6, q7, [x15, #-32]
	ldp	q16, q17, [x15], #64
	cmeq.4s	v6, v1, v6
	cmeq.4s	v7, v1, v7
	cmeq.4s	v16, v1, v16
	cmeq.4s	v17, v1, v17
	bit.16b	v0, v3, v6
	bit.16b	v5, v3, v7
	bit.16b	v4, v3, v16
	bit.16b	v2, v3, v17
	subs	x16, x16, #16
	b.ne	LBB0_6
; %bb.7:
	cmeq.4s	v1, v0, #0
	bit.16b	v0, v5, v1
	cmeq.4s	v1, v0, #0
	bit.16b	v0, v4, v1
	cmeq.4s	v1, v0, #0
	bit.16b	v0, v2, v1
	cmtst.4s	v0, v0, v0
	xtn.4h	v0, v0
	umov.h	w15, v0[0]
	umov.h	w16, v0[1]
	and	w16, w16, #0x1
	bfi	w15, w16, #1, #1
	umov.h	w16, v0[2]
	and	w16, w16, #0x1
	bfi	w15, w16, #2, #1
	umov.h	w16, v0[3]
	bfi	w15, w16, #3, #29
	tst	w15, #0xf
	cset	w15, ne
	cmp	x14, x12
	b.eq	LBB0_10
LBB0_8:
	add	x13, x13, x14, lsl #2
	sub	x12, x12, x14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x13], #4
	cmp	w10, w14
	csinc	w15, w15, wzr, ne
	subs	x12, x12, #1
	b.ne	LBB0_9
LBB0_10:
	cbz	w15, LBB0_12
; %bb.11:
	cmp	w9, #0
	csel	w10, w9, w11, gt
	sub	w11, w10, #1
	str	w11, [x8, #8]
	b	LBB0_13
LBB0_12:
	mov	x11, x9
	mov	x9, x10
LBB0_13:
	ldr	x10, [x8, #24]
	add	x10, x10, w11, sxtw #4
	str	x0, [x10, #8]
	str	w1, [x10]
	str	w9, [x8, #8]
LBB0_14:
	add	sp, sp, #16
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_am_walsender,4,2               ; @am_walsender
	.comm	_lag_tracker,8,3                ; @lag_tracker
	.comm	_LAG_TRACKER_BUFFER_SIZE,4,2    ; @LAG_TRACKER_BUFFER_SIZE
	.comm	_NUM_SYNC_REP_WAIT_MODE,4,2     ; @NUM_SYNC_REP_WAIT_MODE
	.no_dead_strip	_LagTrackerWrite
.subsections_via_symbols
