	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pin_user_pages
_pin_user_pages:                        ## @pin_user_pages
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %eax
	movq	%rsi, %rbx
	subq	%rdi, %rbx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rbx
	movq	_MAX_BUFFERS_PER_COMMAND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	incl	%ebx
	cmpl	%ecx, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	cmovgl	(%r15), %edx
	cmovgel	%ecx, %ebx
	movq	%r9, %r14
	movq	%r8, %rcx
	movl	%edx, (%r9)
	xorl	%edx, %edx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_FOLL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_2:
	movl	%ebx, %esi
	callq	_get_user_pages_fast
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:
	cmpl	%ebx, %eax
	jge	LBB0_6
## %bb.5:
	movl	(%r15), %ecx
	movl	%ecx, (%r14)
	jmp	LBB0_6
LBB0_3:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BUFFERS_PER_COMMAND,4,2    ## @MAX_BUFFERS_PER_COMMAND
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_FOLL_WRITE,4,2                 ## @FOLL_WRITE
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_pin_user_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pin_user_pages
_pin_user_pages:                        ; @pin_user_pages
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x5
Lloh0:
	adrp	x8, _MAX_BUFFERS_PER_COMMAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_BUFFERS_PER_COMMAND@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	x9, x1, x0
Lloh3:
	adrp	x10, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	lsr	x9, x9, x10
	add	w10, w9, #1
Lloh6:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w11, [x21]
	cmp	w10, w8
	csel	w10, w11, w2, gt
	csinc	w20, w8, w9, ge
	str	w10, [x5]
Lloh8:
	adrp	x8, _FOLL_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FOLL_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w3, #0
	csel	w2, w8, wzr, eq
	mov	x1, x20
	mov	x3, x4
	bl	_get_user_pages_fast
	cmp	w0, #0
	b.le	LBB0_3
; %bb.1:
	cmp	w0, w20
	b.ge	LBB0_4
; %bb.2:
	ldr	w8, [x21]
	str	w8, [x19]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _EFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BUFFERS_PER_COMMAND,4,2    ; @MAX_BUFFERS_PER_COMMAND
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_FOLL_WRITE,4,2                 ; @FOLL_WRITE
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_pin_user_pages
.subsections_via_symbols
