	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_hw_cntrs
_update_hw_cntrs:                       ## @update_hw_cntrs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_min
	movl	%eax, %r15d
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_gpu_read
	movq	%rax, (%r13,%rbx,8)
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	testl	%r15d, %r15d
	jle	LBB0_16
## %bb.4:
	movq	8(%r14), %rcx
	movl	%r15d, %r9d
	xorl	%esi, %esi
	cmpl	$4, %r15d
	jb	LBB0_13
## %bb.5:
	movq	%r12, %rdx
	subq	%rcx, %rdx
	cmpq	$32, %rdx
	jb	LBB0_13
## %bb.6:
	movl	%r9d, %esi
	andl	$-4, %esi
	leaq	-4(%rsi), %rdx
	movq	%rdx, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.8:
	movq	%r8, %rdx
	andq	$-2, %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	(%r13,%rdi,8), %xmm0
	movdqa	16(%r13,%rdi,8), %xmm1
	movdqu	(%rcx,%rdi,8), %xmm2
	psubq	%xmm2, %xmm0
	movdqu	16(%rcx,%rdi,8), %xmm2
	psubq	%xmm2, %xmm1
	movdqu	%xmm0, (%r12,%rdi,8)
	movdqu	%xmm1, 16(%r12,%rdi,8)
	movdqa	32(%r13,%rdi,8), %xmm0
	movdqa	48(%r13,%rdi,8), %xmm1
	movdqu	32(%rcx,%rdi,8), %xmm2
	psubq	%xmm2, %xmm0
	movdqu	48(%rcx,%rdi,8), %xmm2
	psubq	%xmm2, %xmm1
	movdqu	%xmm0, 32(%r12,%rdi,8)
	movdqu	%xmm1, 48(%r12,%rdi,8)
	addq	$8, %rdi
	addq	$-2, %rdx
	jne	LBB0_9
## %bb.10:
	testb	$1, %r8b
	je	LBB0_12
LBB0_11:
	movdqa	(%r13,%rdi,8), %xmm0
	movdqa	16(%r13,%rdi,8), %xmm1
	movdqu	(%rcx,%rdi,8), %xmm2
	psubq	%xmm2, %xmm0
	movdqu	16(%rcx,%rdi,8), %xmm2
	psubq	%xmm2, %xmm1
	movdqu	%xmm0, (%r12,%rdi,8)
	movdqu	%xmm1, 16(%r12,%rdi,8)
LBB0_12:
	cmpq	%r9, %rsi
	je	LBB0_16
LBB0_13:
	movq	%rsi, %rdx
	notq	%rdx
	addq	%r9, %rdx
	movq	%r9, %rdi
	andq	$3, %rdi
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rsi,8), %rbx
	subq	(%rcx,%rsi,8), %rbx
	movq	%rbx, (%r12,%rsi,8)
	incq	%rsi
	decq	%rdi
	jne	LBB0_14
LBB0_15:
	cmpq	$3, %rdx
	jb	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rsi,8), %rdx
	subq	(%rcx,%rsi,8), %rdx
	movq	%rdx, (%r12,%rsi,8)
	movq	8(%r13,%rsi,8), %rdx
	subq	8(%rcx,%rsi,8), %rdx
	movq	%rdx, 8(%r12,%rsi,8)
	movq	16(%r13,%rsi,8), %rdx
	subq	16(%rcx,%rsi,8), %rdx
	movq	%rdx, 16(%r12,%rsi,8)
	movq	24(%r13,%rsi,8), %rdx
	subq	24(%rcx,%rsi,8), %rdx
	movq	%rdx, 24(%r12,%rsi,8)
	addq	$4, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_20
LBB0_16:
	testl	%eax, %eax
	jle	LBB0_18
## %bb.17:
	movq	8(%r14), %rdi
	movl	%eax, %edx
	shlq	$3, %rdx
	movq	%r13, %rsi
	callq	_memcpy
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.19:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%edi, %edi
	testb	$1, %r8b
	jne	LBB0_11
	jmp	LBB0_12
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_update_hw_cntrs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_hw_cntrs
_update_hw_cntrs:                       ; @update_hw_cntrs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x22, x2
	mov	x20, x1
	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, #-56]
	ldr	x0, [x0, #8]
	bl	_ARRAY_SIZE
	mov	w8, w0
	lsl	x8, x8, #3
	mov	x9, x8
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w1, [x19]
	mov	x0, x20
	bl	_min
	mov	x20, x0
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x19
	bl	_gpu_read
	str	x0, [x21, x23, lsl #3]
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.lt	LBB0_2
LBB0_3:
	cmp	w20, #1
	b.lt	LBB0_11
; %bb.4:
	mov	x9, #0
	ldr	x11, [x19, #8]
	mov	w10, w20
	cmp	w20, #8
	b.lo	LBB0_9
; %bb.5:
	sub	x12, x22, x11
	cmp	x12, #64
	b.lo	LBB0_9
; %bb.6:
	and	x9, x10, #0xfffffff8
	add	x12, x22, #32
	add	x13, x21, #32
	add	x14, x11, #32
	mov	x15, x9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x13, #-32]
	ldp	q2, q3, [x13], #64
	ldp	q4, q5, [x14, #-32]
	ldp	q6, q7, [x14], #64
	sub.2d	v0, v0, v4
	sub.2d	v1, v1, v5
	sub.2d	v2, v2, v6
	sub.2d	v3, v3, v7
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	subs	x15, x15, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	x9, x10
	b.eq	LBB0_11
LBB0_9:
	lsl	x13, x9, #3
	add	x12, x22, x13
	add	x11, x11, x13
	add	x13, x21, x13
	sub	x9, x10, x9
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x13], #8
	ldr	x14, [x11], #8
	sub	x10, x10, x14
	str	x10, [x12], #8
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_11:
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.12:
	ldr	x0, [x19, #8]
	mov	w8, w8
	lsl	x2, x8, #3
	mov	x1, x21
	bl	_memcpy
LBB0_13:
	ldur	x8, [x29, #-56]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x20
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_update_hw_cntrs
.subsections_via_symbols
