	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_vm_ioctl_get_dirty_log     ## -- Begin function kvm_vm_ioctl_get_dirty_log
	.p2align	4, 0x90
_kvm_vm_ioctl_get_dirty_log:            ## @kvm_vm_ioctl_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_mutex_lock
	xorl	%ebx, %ebx
	movq	(%r14), %rax
	movq	_KVM_MEMORY_SLOTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_1
## %bb.2:
	movq	16(%r13), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_3
## %bb.4:
	leaq	(%rcx,%rax,8), %r12
	movq	%r12, %rdi
	callq	_kvm_dirty_bitmap_bytes
	movq	%rax, %r15
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_vmalloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.5:
	movq	%rax, %rdi
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %r14
	xorl	%r15d, %r15d
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_memset
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	shrq	$3, %rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r15, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r12), %rcx
	cmpq	$0, (%rcx,%r15,8)
	leaq	1(%r15), %r15
	je	LBB0_6
## %bb.9:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %r12
	movq	16(%r13), %rsi
	movq	%rax, %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	(%r12), %rax
	movq	(%r14), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	incl	8(%r12)
	movq	16(%r13), %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_rcu_assign_pointer
	leaq	8(%r13), %rdi
	callq	_synchronize_srcu_expedited
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %r15
	movq	%rbx, %rdi
	callq	_kfree
	leaq	4(%r13), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	(%r14), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_kvm_mmu_slot_remove_write_access
	movq	%rbx, %rdi
	callq	_spin_unlock
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_3:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_7:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_12:
	movl	8(%r14), %edi
	movq	%r15, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_copy_to_user
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_10:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_15:
	movq	%r15, %rdi
	callq	_vfree
LBB0_16:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %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	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.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_vm_ioctl_get_dirty_log     ; -- Begin function kvm_vm_ioctl_get_dirty_log
	.p2align	2
_kvm_vm_ioctl_get_dirty_log:            ; @kvm_vm_ioctl_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
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
	ldr	x8, [x20]
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_10
; %bb.1:
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	add	x24, x9, x8, lsl #3
	ldr	x8, [x24]
	cbz	x8, LBB0_11
; %bb.2:
	mov	x0, x24
	bl	_kvm_dirty_bitmap_bytes
	mov	x21, x0
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
	bl	_vmalloc
	cbz	x0, LBB0_15
; %bb.3:
	mov	x22, x0
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	mov	x8, #0
	lsr	x9, x21, #3
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x9, x8
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x24]
	ldr	x10, [x10, x8, lsl #3]
	add	x8, x8, #1
	cbz	x10, LBB0_4
; %bb.6:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_14
; %bb.7:
	mov	x24, x0
	ldr	x1, [x19, #16]
	mov	w2, #16
	bl	_memcpy
	ldr	x8, [x24]
	ldr	x9, [x20]
	str	x22, [x8, x9, lsl #3]
	ldr	w8, [x24, #8]
	add	w8, w8, #1
	str	w8, [x24, #8]
	ldr	x23, [x19, #16]
	mov	x0, x23
	mov	x1, x24
	bl	_rcu_assign_pointer
	add	x0, x19, #8
	bl	_synchronize_srcu_expedited
	ldr	x8, [x23]
	ldr	x9, [x20]
	ldr	x22, [x8, x9, lsl #3]
	mov	x0, x23
	bl	_kfree
	add	x23, x19, #4
	mov	x0, x23
	bl	_spin_lock
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_kvm_mmu_slot_remove_write_access
	mov	x0, x23
	bl	_spin_unlock
LBB0_8:
	ldr	w0, [x20, #8]
	mov	x1, x22
	mov	x2, x21
	bl	_copy_to_user
	cbz	x0, LBB0_13
; %bb.9:
Lloh9:
	adrp	x8, _EFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_10:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh14:
	adrp	x8, _ENOENT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_15
LBB0_13:
	mov	w23, #0
LBB0_14:
	mov	x0, x22
	bl	_vfree
LBB0_15:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KVM_MEMORY_SLOTS,8,3           ; @KVM_MEMORY_SLOTS
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
