	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_reqbufs
_vidioc_reqbufs:                        ## @vidioc_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	callq	_video_drvdata
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_fh_to_ctx
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	_V4L2_MEMORY_USERPTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_3:
	movq	8(%r15), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.4:
	cmpq	$0, 16(%r15)
	je	LBB0_16
## %bb.5:
	movq	(%r14), %rsi
	movq	_QUEUE_FREE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_17
## %bb.6:
	movq	%r14, %r12
	addq	$28, %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_vb2_reqbufs
	testl	%eax, %eax
	je	LBB0_24
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_29
LBB0_8:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.9:
	cmpq	$0, 16(%r15)
	je	LBB0_18
## %bb.10:
	movq	8(%r14), %rsi
	movq	_QUEUE_FREE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_19
## %bb.11:
	movq	%r12, %rdi
	callq	_IS_MFCV6_PLUS
	testq	%rax, %rax
	je	LBB0_27
## %bb.12:
	movq	16(%r14), %rdx
	movq	16(%r15), %rax
	testq	%rdx, %rdx
	je	LBB0_26
## %bb.13:
	cmpq	%rdx, %rax
	jge	LBB0_26
## %bb.14:
	movq	%rdx, 16(%r15)
	leaq	L_.str.5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mfc_debug
	jmp	LBB0_27
LBB0_15:
	leaq	L_.str.7(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mfc_err
	jmp	LBB0_21
LBB0_16:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mfc_debug
	movq	%r14, %rdi
	addq	$28, %rdi
	movq	%r15, %rsi
	callq	_vb2_reqbufs
	movl	%eax, %ebx
	movl	(%r12), %edi
	movq	_release_codec_buffers@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_s5p_mfc_hw_call
	movq	_QUEUE_FREE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	jmp	LBB0_23
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_20
LBB0_18:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mfc_debug
	movq	%r14, %rdi
	addq	$24, %rdi
	movq	%r15, %rsi
	callq	_vb2_reqbufs
	movl	%eax, %ebx
	movl	(%r12), %edi
	movq	_release_codec_buffers@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_s5p_mfc_hw_call
	movq	_QUEUE_FREE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_23
LBB0_19:
	leaq	L_.str.4(%rip), %rdi
LBB0_20:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mfc_err
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_22:
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	_QUEUE_BUFS_REQUESTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	32(%r14), %rax
	movl	(%rax), %edi
	movq	_alloc_codec_buffers@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_s5p_mfc_hw_call
	testl	%eax, %eax
	je	LBB0_31
## %bb.25:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mfc_err
	movq	$0, 16(%r15)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_vb2_reqbufs
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_26:
	movq	%rax, 16(%r14)
LBB0_27:
	movq	%r14, %rdi
	addq	$24, %rdi
	movq	%r15, %rsi
	callq	_vb2_reqbufs
	testl	%eax, %eax
	je	LBB0_30
## %bb.28:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rdi
LBB0_29:
	xorl	%eax, %eax
	callq	_mfc_err
	jmp	LBB0_23
LBB0_30:
	movq	_QUEUE_BUFS_REQUESTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_31:
	xorl	%ebx, %ebx
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_V4L2_MEMORY_USERPTR,8,3        ## @V4L2_MEMORY_USERPTR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Freeing buffers\n"

	.comm	_release_codec_buffers,4,2      ## @release_codec_buffers
	.comm	_QUEUE_FREE,8,3                 ## @QUEUE_FREE
L_.str.1:                               ## @.str.1
	.asciz	"invalid capture state: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"error in vb2_reqbufs() for E(D)\n"

	.comm	_QUEUE_BUFS_REQUESTED,8,3       ## @QUEUE_BUFS_REQUESTED
	.comm	_alloc_codec_buffers,4,2        ## @alloc_codec_buffers
L_.str.3:                               ## @.str.3
	.asciz	"Failed to allocate encoding buffers\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
L_.str.4:                               ## @.str.4
	.asciz	"invalid output state: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Minimum %d output buffers needed\n"

L_.str.6:                               ## @.str.6
	.asciz	"error in vb2_reqbufs() for E(S)\n"

L_.str.7:                               ## @.str.7
	.asciz	"invalid buf type\n"

	.no_dead_strip	_vidioc_reqbufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_reqbufs
_vidioc_reqbufs:                        ; @vidioc_reqbufs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x19, x1
	bl	_video_drvdata
	mov	x21, x0
	mov	x0, x19
	bl	_fh_to_ctx
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _V4L2_MEMORY_USERPTR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_MEMORY_USERPTR@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_20
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_14
; %bb.3:
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _QUEUE_FREE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _QUEUE_FREE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.4:
	add	x22, x19, #28
	mov	x0, x22
	mov	x1, x20
	bl	_vb2_reqbufs
	cbz	w0, LBB0_23
; %bb.5:
	mov	x21, x0
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_28
LBB0_6:
Lloh14:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.7:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_16
; %bb.8:
	ldr	x8, [x19, #8]
Lloh17:
	adrp	x9, _QUEUE_FREE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _QUEUE_FREE@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.9:
	mov	x0, x21
	bl	_IS_MFCV6_PLUS
	cbz	x0, LBB0_26
; %bb.10:
	ldr	x8, [x19, #16]
	ldr	x9, [x20, #16]
	cbz	x8, LBB0_25
; %bb.11:
	cmp	x9, x8
	b.ge	LBB0_25
; %bb.12:
	str	x8, [x20, #16]
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	b	LBB0_26
LBB0_13:
Lloh22:
	adrp	x0, l_.str.7@PAGE
Lloh23:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_19
LBB0_14:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	add	x0, x19, #28
	mov	x1, x20
	bl	_vb2_reqbufs
	mov	x20, x0
	ldr	w0, [x21]
Lloh26:
	adrp	x8, _release_codec_buffers@GOTPAGE
Lloh27:
	ldr	x8, [x8, _release_codec_buffers@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_s5p_mfc_hw_call
Lloh29:
	adrp	x8, _QUEUE_FREE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _QUEUE_FREE@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_17
LBB0_15:
	str	x8, [sp]
Lloh32:
	adrp	x0, l_.str.1@PAGE
Lloh33:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_16:
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	add	x0, x19, #24
	mov	x1, x20
	bl	_vb2_reqbufs
	mov	x20, x0
	ldr	w0, [x21]
Lloh36:
	adrp	x8, _release_codec_buffers@GOTPAGE
Lloh37:
	ldr	x8, [x8, _release_codec_buffers@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_s5p_mfc_hw_call
Lloh39:
	adrp	x8, _QUEUE_FREE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _QUEUE_FREE@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_17:
	mov	x0, x20
	b	LBB0_22
LBB0_18:
	str	x8, [sp]
Lloh42:
	adrp	x0, l_.str.4@PAGE
Lloh43:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_19:
	bl	_mfc_err
LBB0_20:
Lloh44:
	adrp	x8, _EINVAL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_22:
	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
	add	sp, sp, #64
	ret
LBB0_23:
Lloh46:
	adrp	x8, _QUEUE_BUFS_REQUESTED@GOTPAGE
Lloh47:
	ldr	x8, [x8, _QUEUE_BUFS_REQUESTED@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	str	x8, [x19]
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
Lloh49:
	adrp	x8, _alloc_codec_buffers@GOTPAGE
Lloh50:
	ldr	x8, [x8, _alloc_codec_buffers@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_s5p_mfc_hw_call
	cbz	w0, LBB0_30
; %bb.24:
Lloh52:
	adrp	x0, l_.str.3@PAGE
Lloh53:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_mfc_err
	str	xzr, [x20, #16]
	mov	x0, x22
	mov	x1, x20
	bl	_vb2_reqbufs
Lloh54:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh55:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_21
LBB0_25:
	str	x9, [x19, #16]
LBB0_26:
	add	x0, x19, #24
	mov	x1, x20
	bl	_vb2_reqbufs
	mov	x21, x0
	cbz	w0, LBB0_29
; %bb.27:
Lloh56:
	adrp	x0, l_.str.6@PAGE
Lloh57:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_28:
	bl	_mfc_err
	mov	x0, x21
	b	LBB0_22
LBB0_29:
Lloh58:
	adrp	x8, _QUEUE_BUFS_REQUESTED@GOTPAGE
Lloh59:
	ldr	x8, [x8, _QUEUE_BUFS_REQUESTED@GOTPAGEOFF]
Lloh60:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	x0, x21
	b	LBB0_22
LBB0_30:
	mov	w21, #0
	mov	w0, #0
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_V4L2_MEMORY_USERPTR,8,3        ; @V4L2_MEMORY_USERPTR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Freeing buffers\n"

	.comm	_release_codec_buffers,4,2      ; @release_codec_buffers
	.comm	_QUEUE_FREE,8,3                 ; @QUEUE_FREE
l_.str.1:                               ; @.str.1
	.asciz	"invalid capture state: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"error in vb2_reqbufs() for E(D)\n"

	.comm	_QUEUE_BUFS_REQUESTED,8,3       ; @QUEUE_BUFS_REQUESTED
	.comm	_alloc_codec_buffers,4,2        ; @alloc_codec_buffers
l_.str.3:                               ; @.str.3
	.asciz	"Failed to allocate encoding buffers\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
l_.str.4:                               ; @.str.4
	.asciz	"invalid output state: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Minimum %d output buffers needed\n"

l_.str.6:                               ; @.str.6
	.asciz	"error in vb2_reqbufs() for E(S)\n"

l_.str.7:                               ; @.str.7
	.asciz	"invalid buf type\n"

	.no_dead_strip	_vidioc_reqbufs
.subsections_via_symbols
