	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_videobuf_reqbufs               ## -- Begin function videobuf_reqbufs
	.p2align	4, 0x90
_videobuf_reqbufs:                      ## @videobuf_reqbufs
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	12(%rsi), %eax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.1:
	movq	_V4L2_MEMORY_USERPTR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.2:
	movq	_V4L2_MEMORY_OVERLAY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_4:
	movq	%r14, %rdi
	callq	_videobuf_queue_lock
	movq	(%r15), %rax
	cmpq	(%r14), %rax
	jne	LBB0_8
## %bb.5:
	cmpq	$0, 24(%r14)
	je	LBB0_12
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
LBB0_7:
	xorl	%ebx, %ebx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_videobuf_queue_unlock
LBB0_11:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	16(%r14), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_16
## %bb.13:
	movl	8(%r15), %eax
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:
	movq	_VIDEO_MAX_FRAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovbl	%eax, %ecx
	movl	%ecx, -36(%rbp)
	movl	$0, -40(%rbp)
	movq	8(%r14), %rax
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%rax)
	movl	-36(%rbp), %ebx
	movl	-40(%rbp), %r12d
	movl	%r12d, %edi
	callq	_PAGE_ALIGN
	imull	%ebx, %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrl	%cl, %eax
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dprintk
	movl	-36(%rbp), %esi
	movl	-40(%rbp), %edx
	movl	12(%r15), %ecx
	movq	%r14, %rdi
	callq	___videobuf_mmap_setup
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.15:
	movl	%ebx, 8(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_16:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_7
LBB0_17:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r14, %rdi
	callq	___videobuf_free
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_18:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MEMORY_MMAP,4,2           ## @V4L2_MEMORY_MMAP
	.comm	_V4L2_MEMORY_USERPTR,4,2        ## @V4L2_MEMORY_USERPTR
	.comm	_V4L2_MEMORY_OVERLAY,4,2        ## @V4L2_MEMORY_OVERLAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reqbufs: memory type invalid\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"reqbufs: queue type invalid\n"

L_.str.2:                               ## @.str.2
	.asciz	"reqbufs: streaming already exists\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.3:                               ## @.str.3
	.asciz	"reqbufs: stream running\n"

L_.str.4:                               ## @.str.4
	.asciz	"reqbufs: count invalid (%d)\n"

	.comm	_VIDEO_MAX_FRAME,4,2            ## @VIDEO_MAX_FRAME
L_.str.5:                               ## @.str.5
	.asciz	"reqbufs: bufs=%d, size=0x%x [%u pages total]\n"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
L_.str.6:                               ## @.str.6
	.asciz	"reqbufs: mmap setup returned %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_videobuf_reqbufs               ; -- Begin function videobuf_reqbufs
	.p2align	2
_videobuf_reqbufs:                      ; @videobuf_reqbufs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	ldr	w8, [x1, #12]
Lloh0:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _V4L2_MEMORY_USERPTR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_MEMORY_USERPTR@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x11, _V4L2_MEMORY_OVERLAY@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V4L2_MEMORY_OVERLAY@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	ccmp	w8, w11, #4, ne
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	bl	_videobuf_queue_lock
	ldr	x8, [x20]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.3:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_4:
	mov	w0, #1
	bl	_dprintk
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_dprintk
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_6:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_dprintk
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x19
	bl	_videobuf_queue_unlock
LBB0_9:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_10:
	add	x0, x19, #16
	bl	_list_empty
	cbz	w0, LBB0_14
; %bb.11:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_15
; %bb.12:
Lloh22:
	adrp	x9, _VIDEO_MAX_FRAME@GOTPAGE
Lloh23:
	ldr	x9, [x9, _VIDEO_MAX_FRAME@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w8, w9, lo
	stp	w8, wzr, [sp, #24]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x1, sp, #24
	add	x2, sp, #28
	mov	x0, x19
	blr	x8
	ldp	w22, w21, [sp, #24]
	mov	x0, x21
	bl	_PAGE_ALIGN
	mul	w8, w0, w22
Lloh25:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	lsr	w8, w8, w9
	stp	x22, x21, [sp]
	str	x8, [sp, #16]
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	ldp	w1, w2, [sp, #24]
	ldr	w3, [x20, #12]
	mov	x0, x19
	bl	___videobuf_mmap_setup
	mov	x21, x0
	tbnz	w0, #31, LBB0_16
; %bb.13:
	str	w21, [x20, #8]
	mov	w21, #0
	b	LBB0_8
LBB0_14:
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_15:
	str	xzr, [sp]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	mov	x0, x19
	bl	___videobuf_free
	mov	x21, x0
	b	LBB0_8
LBB0_16:
	str	x21, [sp]
Lloh34:
	adrp	x1, l_.str.6@PAGE
Lloh35:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,4,2           ; @V4L2_MEMORY_MMAP
	.comm	_V4L2_MEMORY_USERPTR,4,2        ; @V4L2_MEMORY_USERPTR
	.comm	_V4L2_MEMORY_OVERLAY,4,2        ; @V4L2_MEMORY_OVERLAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reqbufs: memory type invalid\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"reqbufs: queue type invalid\n"

l_.str.2:                               ; @.str.2
	.asciz	"reqbufs: streaming already exists\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.3:                               ; @.str.3
	.asciz	"reqbufs: stream running\n"

l_.str.4:                               ; @.str.4
	.asciz	"reqbufs: count invalid (%d)\n"

	.comm	_VIDEO_MAX_FRAME,4,2            ; @VIDEO_MAX_FRAME
l_.str.5:                               ; @.str.5
	.asciz	"reqbufs: bufs=%d, size=0x%x [%u pages total]\n"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
l_.str.6:                               ; @.str.6
	.asciz	"reqbufs: mmap setup returned %d\n"

.subsections_via_symbols
