	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reqbufs_capture
_reqbufs_capture:                       ## @reqbufs_capture
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_s5p_mfc_clock_on
	cmpq	$0, (%r12)
	je	LBB0_1
## %bb.3:
	movq	8(%r15), %rax
	movq	_QUEUE_FREE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.4:
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	setne	%dil
	callq	_WARN_ON
	movq	(%r12), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mfc_debug
	leaq	28(%r15), %r13
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_vb2_reqbufs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	_QUEUE_BUFS_REQUESTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	movq	(%r12), %rax
	movq	%rax, 16(%r15)
	movl	24(%r14), %edi
	movq	_alloc_codec_buffers@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_s5p_mfc_hw_call
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	callq	_mfc_err
	movq	$0, (%r12)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_vb2_reqbufs
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_QUEUE_FREE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mfc_debug
	leaq	28(%r15), %rdi
	movq	%r12, %rsi
	callq	_vb2_reqbufs
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
LBB0_11:
	xorl	%eax, %eax
	callq	_s5p_mfc_clock_off
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	callq	_mfc_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_13:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_s5p_mfc_clock_off
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.14:
	negl	%r14d
	movl	%r14d, %ebx
LBB0_15:
	leaq	L_.str.4(%rip), %rdi
	callq	_mfc_err
	jmp	LBB0_16
LBB0_2:
	movl	24(%r14), %edi
	movq	_release_codec_buffers@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_s5p_mfc_hw_call
	movq	$0, (%r15)
	jmp	LBB0_10
LBB0_7:
	movq	(%r15), %rax
	xorl	%edi, %edi
	cmpq	16(%r15), %rax
	setne	%dil
	callq	_WARN_ON
	movq	_QUEUE_BUFS_MMAPED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	movq	%r15, %rdi
	callq	_s5p_mfc_ctx_ready
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_set_work_bit_irqsave
LBB0_9:
	movl	24(%r14), %edi
	movq	_try_run@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_s5p_mfc_hw_call
	movq	_S5P_MFC_R2H_CMD_INIT_BUFFERS_RET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_s5p_mfc_wait_for_done_ctx
LBB0_10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_s5p_mfc_clock_off
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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	"Allocating %d buffers for CAPTURE queue\n"

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

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QUEUE_BUFS_MMAPED,8,3          ## @QUEUE_BUFS_MMAPED
	.comm	_try_run,4,2                    ## @try_run
	.comm	_S5P_MFC_R2H_CMD_INIT_BUFFERS_RET,4,2 ## @S5P_MFC_R2H_CMD_INIT_BUFFERS_RET
L_.str.3:                               ## @.str.3
	.asciz	"Buffers have already been requested\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"Failed allocating buffers for CAPTURE queue\n"

	.no_dead_strip	_reqbufs_capture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reqbufs_capture
_reqbufs_capture:                       ; @reqbufs_capture
	.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, x2
	mov	x19, x1
	mov	x20, x0
	bl	_s5p_mfc_clock_on
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x24, _QUEUE_FREE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _QUEUE_FREE@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	mov	x22, x19
	ldr	x8, [x22], #28
	cmp	x8, #0
	cset	w0, ne
	bl	_WARN_ON
	ldr	x8, [x21]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	mov	x0, x22
	mov	x1, x21
	bl	_vb2_reqbufs
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.3:
Lloh4:
	adrp	x8, _QUEUE_BUFS_REQUESTED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _QUEUE_BUFS_REQUESTED@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x9, [x21]
	stp	x8, x9, [x19, #8]
	ldr	w0, [x20, #24]
Lloh7:
	adrp	x8, _alloc_codec_buffers@GOTPAGE
Lloh8:
	ldr	x8, [x8, _alloc_codec_buffers@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_s5p_mfc_hw_call
	cbz	w0, LBB0_11
; %bb.4:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_mfc_err
	str	xzr, [x21]
	mov	x0, x22
	mov	x1, x21
	bl	_vb2_reqbufs
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	ldr	x8, [x24]
	str	x8, [x19, #8]
	bl	_s5p_mfc_clock_off
	cbnz	w20, LBB0_8
	b	LBB0_15
LBB0_5:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	add	x0, x19, #28
	mov	x1, x21
	bl	_vb2_reqbufs
	mov	x23, x0
	cbz	w0, LBB0_10
LBB0_6:
	bl	_s5p_mfc_clock_off
	b	LBB0_9
LBB0_7:
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_mfc_err
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
	bl	_s5p_mfc_clock_off
	cbz	w20, LBB0_15
LBB0_8:
	neg	w23, w20
LBB0_9:
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_mfc_err
	b	LBB0_16
LBB0_10:
	ldr	w0, [x20, #24]
Lloh24:
	adrp	x8, _release_codec_buffers@GOTPAGE
Lloh25:
	ldr	x8, [x8, _release_codec_buffers@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_s5p_mfc_hw_call
	str	xzr, [x19]
	b	LBB0_14
LBB0_11:
	ldr	x8, [x19]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
Lloh27:
	adrp	x8, _QUEUE_BUFS_MMAPED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _QUEUE_BUFS_MMAPED@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_s5p_mfc_ctx_ready
	cbz	x0, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_set_work_bit_irqsave
LBB0_13:
	ldr	w0, [x20, #24]
Lloh30:
	adrp	x8, _try_run@GOTPAGE
Lloh31:
	ldr	x8, [x8, _try_run@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_s5p_mfc_hw_call
Lloh33:
	adrp	x8, _S5P_MFC_R2H_CMD_INIT_BUFFERS_RET@GOTPAGE
Lloh34:
	ldr	x8, [x8, _S5P_MFC_R2H_CMD_INIT_BUFFERS_RET@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_s5p_mfc_wait_for_done_ctx
LBB0_14:
	bl	_s5p_mfc_clock_off
LBB0_15:
	mov	w23, #0
LBB0_16:
	mov	x0, x23
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.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	"Allocating %d buffers for CAPTURE queue\n"

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

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QUEUE_BUFS_MMAPED,8,3          ; @QUEUE_BUFS_MMAPED
	.comm	_try_run,4,2                    ; @try_run
	.comm	_S5P_MFC_R2H_CMD_INIT_BUFFERS_RET,4,2 ; @S5P_MFC_R2H_CMD_INIT_BUFFERS_RET
l_.str.3:                               ; @.str.3
	.asciz	"Buffers have already been requested\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"Failed allocating buffers for CAPTURE queue\n"

	.no_dead_strip	_reqbufs_capture
.subsections_via_symbols
