	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_genwqe_user_vmap               ## -- Begin function genwqe_user_vmap
	.p2align	4, 0x90
_genwqe_user_vmap:                      ## @genwqe_user_vmap
	.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	%rsi, %r15
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	%rcx, %rbx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.4:
	movq	%rdx, %r13
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	%rdx, 16(%r15)
	movq	%rbx, (%r15)
	movq	%rdx, %rdi
	callq	_offset_in_page
	movq	_ULONG_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	subq	%rax, %rcx
	subq	%rsi, %rcx
	cmpq	%rbx, %rcx
	jae	LBB0_5
LBB0_2:
	movq	$0, (%r15)
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	addq	%rbx, %rax
	movq	%rax, %rdi
	callq	_DIV_ROUND_UP
	movl	%eax, 8(%r15)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$12, %esi
	callq	_kcalloc
	movq	%rax, 32(%r15)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movslq	8(%r15), %rsi
	leaq	(%rax,%rsi,4), %rcx
	movq	%rcx, 24(%r15)
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %r13
	movl	40(%r15), %edx
	testl	%edx, %edx
	je	LBB0_9
## %bb.8:
	movq	_FOLL_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_9:
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rax, %rcx
	callq	_get_user_pages_fast
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_15
## %bb.10:
	movl	8(%r15), %edx
	movq	32(%r15), %rsi
	cmpl	%edx, %ebx
	jge	LBB0_12
## %bb.11:
	movl	40(%r15), %edx
	movq	%rsi, %rdi
	movl	%ebx, %esi
	callq	_genwqe_free_user_pages
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movl	$0, 8(%r15)
	movq	$0, 16(%r15)
	movq	$0, (%r15)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_12:
	movq	24(%r15), %rcx
	movq	%r14, %rdi
	callq	_genwqe_map_pages
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movl	%eax, %ebx
	movq	32(%r15), %rdi
	movl	8(%r15), %esi
	movl	40(%r15), %edx
	callq	_genwqe_free_user_pages
LBB0_15:
	leaq	16(%r15), %r14
	movq	32(%r15), %rdi
	callq	_kfree
	movl	$0, 8(%r15)
	movq	$0, (%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	movq	$0, 16(%r14)
	jmp	LBB0_16
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ULONG_MAX,8,3                  ## @ULONG_MAX
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"err: alloc page_list failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_FOLL_WRITE,4,2                 ## @FOLL_WRITE
	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_genwqe_user_vmap               ; -- Begin function genwqe_user_vmap
	.p2align	2
_genwqe_user_vmap:                      ; @genwqe_user_vmap
	.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, x1
	cbz	x2, LBB0_3
; %bb.1:
	mov	x23, x3
	cbz	x3, LBB0_3
; %bb.2:
	mov	x21, x2
	mov	x20, x0
	ldr	x22, [x0]
	mov	x24, x19
	str	x2, [x24, #16]!
	str	x23, [x19]
	mov	x0, x2
	bl	_offset_in_page
Lloh0:
	adrp	x8, _ULONG_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ULONG_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x9]
	add	x9, x0, x1
	sub	x8, x8, x9
	cmp	x8, x23
	b.hs	LBB0_6
LBB0_3:
	str	xzr, [x19]
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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_6:
	add	x0, x0, x23
	bl	_DIV_ROUND_UP
	str	w0, [x19, #8]
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w1, #12
	bl	_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_10
; %bb.7:
	mov	x3, x0
	ldrsw	x1, [x19, #8]
	add	x8, x0, x1, lsl #2
	str	x8, [x19, #24]
Lloh11:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	and	x0, x8, x21
	ldr	w8, [x19, #40]
Lloh14:
	adrp	x9, _FOLL_WRITE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FOLL_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w2, wzr, w9, eq
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_get_user_pages_fast
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.8:
	ldr	w2, [x19, #8]
	ldr	x1, [x19, #32]
	cmp	w21, w2
	b.ge	LBB0_11
; %bb.9:
	ldr	w2, [x19, #40]
	mov	x0, x1
	mov	x1, x21
	bl	_genwqe_free_user_pages
Lloh17:
	adrp	x8, _EFAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_10:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	str	wzr, [x19, #8]
	str	xzr, [x19, #16]
	str	xzr, [x19]
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_11:
	ldr	x3, [x19, #24]
	mov	x0, x20
	bl	_genwqe_map_pages
	mov	x21, x0
	cbz	w0, LBB0_5
; %bb.12:
	ldr	x0, [x19, #32]
	ldr	w1, [x19, #8]
	ldr	w2, [x19, #40]
	bl	_genwqe_free_user_pages
LBB0_13:
	ldr	x0, [x19, #32]
	bl	_kfree
	str	wzr, [x19, #8]
	str	xzr, [x19]
	stp	xzr, xzr, [x24, #8]
	str	xzr, [x24]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ULONG_MAX,8,3                  ; @ULONG_MAX
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"err: alloc page_list failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_FOLL_WRITE,4,2                 ; @FOLL_WRITE
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
