	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kread_string
_kread_string:                          ## @kread_string
	.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
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movl	%ecx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %r12
	movl	%ecx, %r14d
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_kvm_read
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$1, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$0, (%rbx)
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	incq	%r13
	decq	%r14
	jne	LBB0_3
## %bb.9:
	decl	%r15d
	movslq	%r15d, %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_1:
	movq	$-1, %rax
LBB0_10:
	movb	$0, (%rdx,%rax)
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_MEMSTAT_ERROR_KVM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_6:
	movq	_MEMSTAT_ERROR_KVM_SHORTREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MEMSTAT_ERROR_KVM,4,2          ## @MEMSTAT_ERROR_KVM
	.comm	_MEMSTAT_ERROR_KVM_SHORTREAD,4,2 ## @MEMSTAT_ERROR_KVM_SHORTREAD
	.no_dead_strip	_kread_string
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kread_string
_kread_string:                          ; @kread_string
	.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	x19, x2
	subs	w23, w3, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	mov	w24, w3
	mov	x22, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	w3, #1
	bl	_kvm_read
	tbnz	x0, #63, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x0, #1
	b.ne	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x22]
	cbz	w8, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	add	x20, x20, #1
	subs	x24, x24, #1
	b.ne	LBB0_2
; %bb.6:
	sxtw	x8, w23
	b	LBB0_8
LBB0_7:
	mov	x8, #-1
LBB0_8:
	mov	w0, #0
	strb	wzr, [x19, x8]
	b	LBB0_12
LBB0_9:
Lloh0:
	adrp	x8, _MEMSTAT_ERROR_KVM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEMSTAT_ERROR_KVM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_10:
Lloh3:
	adrp	x8, _MEMSTAT_ERROR_KVM_SHORTREAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEMSTAT_ERROR_KVM_SHORTREAD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MEMSTAT_ERROR_KVM,4,2          ; @MEMSTAT_ERROR_KVM
	.comm	_MEMSTAT_ERROR_KVM_SHORTREAD,4,2 ; @MEMSTAT_ERROR_KVM_SHORTREAD
	.no_dead_strip	_kread_string
.subsections_via_symbols
