	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_get_dirty_log              ## -- Begin function kvm_get_dirty_log
	.p2align	4, 0x90
_kvm_get_dirty_log:                     ## @kvm_get_dirty_log
	.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
	xorl	%r12d, %r12d
	movq	(%rsi), %rax
	movq	_KVM_MEMORY_SLOTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_8
## %bb.1:
	movq	(%rdi), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_9
## %bb.2:
	movq	%rdx, %r14
	movq	%rsi, %r15
	leaq	(%rcx,%rax,8), %r12
	movq	%r12, %rdi
	callq	_kvm_dirty_bitmap_bytes
	movq	%rax, %r13
	shrq	$3, %r13
	movq	(%r12), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rbx
	cmpq	%rcx, %r13
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%rbx), %rcx
	cmpq	$0, (%rsi,%rbx,8)
	je	LBB0_3
LBB0_5:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	subl	(%rcx), %r12d
	movl	8(%r15), %edi
	movq	%rax, %rdx
	callq	_copy_to_user
	testq	%rax, %rax
	movl	$0, %eax
	cmovel	%eax, %r12d
	jne	LBB0_11
## %bb.6:
	cmpq	%rbx, %r13
	je	LBB0_11
## %bb.7:
	movl	$1, (%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %r12d
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KVM_MEMORY_SLOTS,8,3           ## @KVM_MEMORY_SLOTS
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_get_dirty_log              ; -- Begin function kvm_get_dirty_log
	.p2align	2
_kvm_get_dirty_log:                     ; @kvm_get_dirty_log
	.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
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _KVM_MEMORY_SLOTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KVM_MEMORY_SLOTS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_7
; %bb.1:
	ldr	x9, [x0]
	ldr	x9, [x9]
	add	x21, x9, x8, lsl #3
	ldr	x8, [x21]
	cbz	x8, LBB0_8
; %bb.2:
	mov	x19, x2
	mov	x20, x1
	mov	x0, x21
	bl	_kvm_dirty_bitmap_bytes
	mov	x2, x0
	mov	x8, #0
	lsr	x22, x0, #3
	ldr	x1, [x21]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, x8
	cmp	x22, x8
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x1, x21, lsl #3]
	add	x8, x21, #1
	cbz	x9, LBB0_3
LBB0_5:
Lloh3:
	adrp	x8, _EFAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	w0, [x20, #8]
	bl	_copy_to_user
	cmp	x0, #0
	csneg	w0, wzr, w23, eq
	ccmp	x22, x21, #4, eq
	b.eq	LBB0_10
; %bb.6:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_10
LBB0_7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x8, _ENOENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KVM_MEMORY_SLOTS,8,3           ; @KVM_MEMORY_SLOTS
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
