	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kread_counters                 ## -- Begin function kread_counters
	.p2align	4, 0x90
_kread_counters:                        ## @kread_counters
	.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
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_kvmd_init
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_11
## %bb.1:
	testb	$3, %r12b
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_xo_warnx
	jmp	LBB0_11
LBB0_3:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rbx
	andq	$-4, %rbx
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	callq	_xo_err
LBB0_5:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_kread
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	cmpq	$4, %r12
	jb	LBB0_10
## %bb.8:
	shrq	$2, %r12
	cmpq	$2, %r12
	movl	$1, %r14d
	cmovaeq	%r12, %r14
	xorl	%ebx, %ebx
	movq	_kvmd@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	(%r13,%rbx,4), %esi
	callq	_kvm_counter_u64_fetch
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_9
LBB0_10:
	movq	%r13, %rdi
	callq	_free
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_6:
	movq	%r13, %rdi
	callq	_free
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kread_counters: invalid counter set size"

L_.str.1:                               ## @.str.1
	.asciz	"malloc"

	.comm	_kvmd,4,2                       ## @kvmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kread_counters                 ; -- Begin function kread_counters
	.p2align	2
_kread_counters:                        ; @kread_counters
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	bl	_kvmd_init
	tbnz	x0, #63, LBB0_3
; %bb.1:
	tst	x21, #0x3
	b.eq	LBB0_5
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_xo_warnx
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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_5:
	and	x23, x21, #0xfffffffffffffffc
	mov	x0, x23
	bl	_malloc
	mov	x20, x0
	cbnz	x0, LBB0_7
; %bb.6:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_xo_err
LBB0_7:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	bl	_kread
	tbnz	x0, #63, LBB0_12
; %bb.8:
	cmp	x21, #4
	b.lo	LBB0_11
; %bb.9:
	lsr	x8, x21, #2
	cmp	x8, #1
	csinc	x21, x8, xzr, hi
Lloh4:
	adrp	x22, _kvmd@GOTPAGE
Lloh5:
	ldr	x22, [x22, _kvmd@GOTPAGEOFF]
	mov	x23, x20
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	w1, [x23], #4
	bl	_kvm_counter_u64_fetch
	str	w0, [x19], #4
	subs	x21, x21, #1
	b.ne	LBB0_10
LBB0_11:
	mov	x0, x20
	bl	_free
	mov	w0, #0
	b	LBB0_4
LBB0_12:
	mov	x0, x20
	bl	_free
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kread_counters: invalid counter set size"

l_.str.1:                               ; @.str.1
	.asciz	"malloc"

	.comm	_kvmd,4,2                       ; @kvmd
.subsections_via_symbols
