	.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, %rbx
	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), %r13d
	jmp	LBB0_5
LBB0_3:
	movq	_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_5
LBB0_4:
	xorl	%r13d, %r13d
	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(%rbx)
	movq	%r15, 16(%rbx)
	incq	%rdi
	movq	%rdi, 24(%rbx)
	shll	$3, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_kmalloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	24(%rbx), %r8
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	$1, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%rdi), %esi
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %r14
	movl	24(%rbx), %ecx
	movq	_READ@GOTPCREL(%rip), %rax
	xorl	%r8d, %r8d
	cmpl	(%rax), %r13d
	sete	%r8b
	movq	%r14, %rdx
	movl	$1, %r9d
	pushq	$0
	pushq	32(%rbx)
	callq	_get_user_pages
	addq	$16, %rsp
	movl	%eax, %r14d
	cltq
	cmpq	%rax, 24(%rbx)
	je	LBB0_9
## %bb.8:
	xorl	%r12d, %r12d
	testl	%r14d, %r14d
	movl	$0, %ecx
	cmovgl	%r14d, %ecx
	movq	%rcx, 24(%rbx)
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	testl	%r14d, %r14d
	cmovsl	%r14d, %r12d
	jmp	LBB0_9
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init user [0x%lx+0x%lx => %d pages]\n"

	.comm	_current,8,3                    ## @current
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
	str	w1, [x0]
	cmp	w1, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w1, #129
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	b	LBB0_5
LBB0_4:
	bl	_BUG
	mov	w22, #0
LBB0_5:
Lloh6:
	adrp	x23, _PAGE_MASK@GOTPAGE
Lloh7:
	ldr	x23, [x23, _PAGE_MASK@GOTPAGEOFF]
	ldr	x8, [x23]
	and	x9, x8, x20
Lloh8:
	adrp	x10, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PAGE_SHIFT@GOTPAGEOFF]
Lloh10:
	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	x8, x8, #1
	str	x8, [x19, #24]
	lsl	w0, w8, #3
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x8, [x19, #24]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	mov	x3, x21
	bl	_dprintk
Lloh16:
	adrp	x8, _current@GOTPAGE
Lloh17:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh18:
	ldr	x0, [x8]
	ldr	w1, [x0]
	ldr	x8, [x23]
	and	x2, x8, x20
	ldr	w3, [x19, #24]
Lloh19:
	adrp	x8, _READ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w22, w8
	cset	w4, eq
	ldr	x6, [x19, #32]
	mov	w5, #1
	mov	x7, #0
	bl	_get_user_pages
	ldr	x8, [x19, #24]
	cmp	x8, w0, sxtw
	b.ne	LBB0_9
; %bb.7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	x20, x0
	cmp	w0, #0
	csel	w3, w0, wzr, gt
	str	x3, [x19, #24]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	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
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	csneg	w0, w20, w8, lt
LBB0_10:
	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	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init user [0x%lx+0x%lx => %d pages]\n"

	.comm	_current,8,3                    ; @current
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
