	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function videobuf_dma_init_user_locked
_videobuf_dma_init_user_locked:         ## @videobuf_dma_init_user_locked
	.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	%rcx, %r15
	movq	%rdx, %r14
	movq	%rdi, %r13
	movq	_FOLL_FORCE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%esi, (%rdi)
	cmpl	$128, %esi
	je	LBB0_3
## %bb.1:
	cmpl	$129, %esi
	jne	LBB0_4
## %bb.2:
	movq	_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	movq	_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_BUG
LBB0_5:
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rdx
	andq	%r14, %rdx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rdx
	leaq	(%r14,%r15), %rdi
	decq	%rdi
	andq	%rax, %rdi
	shrq	%cl, %rdi
	subq	%rdx, %rdi
	notq	%rax
	andq	%r14, %rax
	movq	%rax, 8(%r13)
	movq	%r15, 16(%r13)
	incq	%rdi
	movq	%rdi, 24(%r13)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_kmalloc_array
	movq	%rax, 32(%r13)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	%r12d, %ecx
	movq	_READ@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	movl	%ebx, %edx
	movl	$0, %ebx
	cmpl	(%rax), %edx
	jne	LBB0_9
## %bb.8:
	movq	_FOLL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	orl	%ecx, %ebx
	movq	24(%r13), %r8
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %r14
	movq	_FOLL_LONGTERM@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	24(%r13), %rsi
	movq	32(%r13), %rcx
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%r8d, %r8d
	callq	_get_user_pages
	movl	%eax, %ebx
	cltq
	cmpq	%rax, 24(%r13)
	je	LBB0_11
## %bb.10:
	xorl	%r12d, %r12d
	testl	%ebx, %ebx
	movl	$0, %ecx
	cmovgl	%ebx, %ecx
	movq	%rcx, 24(%r13)
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%ebx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	testl	%ebx, %ebx
	cmovsl	%ebx, %r12d
	jmp	LBB0_11
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	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	_FOLL_FORCE,4,2                 ## @FOLL_FORCE
	.comm	_READ,4,2                       ## @READ
	.comm	_WRITE,4,2                      ## @WRITE
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_FOLL_WRITE,4,2                 ## @FOLL_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init user [0x%lx+0x%lx => %d pages]\n"

	.comm	_FOLL_LONGTERM,4,2              ## @FOLL_LONGTERM
L_.str.1:                               ## @.str.1
	.asciz	"get_user_pages: err=%d [%d]\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_videobuf_dma_init_user_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function videobuf_dma_init_user_locked
_videobuf_dma_init_user_locked:         ; @videobuf_dma_init_user_locked
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x3
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _FOLL_FORCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FOLL_FORCE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	str	w1, [x0]
	cmp	w1, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w1, #129
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
	b	LBB0_5
LBB0_4:
	bl	_BUG
	mov	w24, #0
LBB0_5:
Lloh9:
	adrp	x23, _PAGE_MASK@GOTPAGE
Lloh10:
	ldr	x23, [x23, _PAGE_MASK@GOTPAGEOFF]
	ldr	x8, [x23]
	and	x9, x8, x20
Lloh11:
	adrp	x10, _PAGE_SHIFT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PAGE_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	lsr	x9, x9, x10
	add	x11, x20, x21
	sub	x11, x11, #1
	and	x11, x8, x11
	lsr	x10, x11, x10
	bic	x8, x20, x8
	stp	x8, x21, [x19, #8]
	sub	x8, x10, x9
	add	x0, x8, #1
	str	x0, [x19, #24]
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kmalloc_array
	str	x0, [x19, #32]
	cbz	x0, LBB0_8
; %bb.6:
Lloh17:
	adrp	x8, _READ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh19:
	adrp	x9, _FOLL_WRITE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FOLL_WRITE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	ldr	w9, [x9]
	cmp	w24, w8
	csel	w8, w9, wzr, eq
	orr	w22, w8, w22
	ldr	x8, [x19, #24]
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	mov	x3, x21
	bl	_dprintk
	ldr	x8, [x23]
	and	x0, x8, x20
Lloh25:
	adrp	x8, _FOLL_LONGTERM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FOLL_LONGTERM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	orr	w2, w22, w8
	ldp	x1, x3, [x19, #24]
	mov	x4, #0
	bl	_get_user_pages
	mov	x20, x0
	mov	w0, #0
	ldr	x8, [x19, #24]
	cmp	x8, w20, sxtw
	b.eq	LBB0_9
; %bb.7:
	cmp	w20, #0
	csel	w3, w20, wzr, gt
	str	x3, [x19, #24]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_dprintk
	cmp	w20, #0
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	csneg	w0, w20, w8, lt
	b	LBB0_9
LBB0_8:
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_FOLL_FORCE,4,2                 ; @FOLL_FORCE
	.comm	_READ,4,2                       ; @READ
	.comm	_WRITE,4,2                      ; @WRITE
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_FOLL_WRITE,4,2                 ; @FOLL_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init user [0x%lx+0x%lx => %d pages]\n"

	.comm	_FOLL_LONGTERM,4,2              ; @FOLL_LONGTERM
l_.str.1:                               ; @.str.1
	.asciz	"get_user_pages: err=%d [%d]\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_videobuf_dma_init_user_locked
.subsections_via_symbols
