	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_buf_queue
_s5p_mfc_buf_queue:                     ## @s5p_mfc_buf_queue
	.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	%rdi, %r12
	movq	8(%rdi), %rbx
	movl	8(%rbx), %edi
	callq	_fh_to_ctx
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_MFCINST_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.10:
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_vb2_buffer_done
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cleanup_ref_queue              ## TAILCALL
LBB0_1:
	movq	40(%r15), %r14
	movq	(%rbx), %rsi
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_4
## %bb.2:
	movq	32(%r15), %rax
	movq	(%r12), %rcx
	movq	_MFC_BUF_FLAG_USED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	leaq	(%rax,%rcx,8), %r12
	andl	%edx, 4(%rax,%rcx,8)
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rsi
	addq	$28, %rsi
	movq	%r12, %rdi
	callq	_list_add_tail
	incl	24(%r15)
	jmp	LBB0_3
LBB0_4:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_6
## %bb.5:
	movq	16(%r15), %rax
	movq	(%r12), %rcx
	movq	_MFC_BUF_FLAG_USED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	leaq	(%rax,%rcx,8), %r12
	andl	%edx, 4(%rax,%rcx,8)
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rsi
	addq	$12, %rsi
	movq	%r12, %rdi
	callq	_list_add_tail
	incl	8(%r15)
LBB0_3:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
LBB0_7:
	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	(%r14), %edi
	movq	_try_run@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_s5p_mfc_hw_call                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MFCINST_ERROR,8,3              ## @MFCINST_ERROR
	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MFC_BUF_FLAG_USED,4,2          ## @MFC_BUF_FLAG_USED
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported buffer type (%d)\n"

	.comm	_try_run,4,2                    ## @try_run
	.no_dead_strip	_s5p_mfc_buf_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_buf_queue
_s5p_mfc_buf_queue:                     ; @s5p_mfc_buf_queue
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x22, #8]
	bl	_fh_to_ctx
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MFCINST_ERROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MFCINST_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_vb2_buffer_done
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_cleanup_ref_queue
LBB0_2:
	ldr	x20, [x19, #40]
	ldr	x1, [x22]
Lloh6:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19, #32]
	ldr	x9, [x21]
Lloh9:
	adrp	x10, _MFC_BUF_FLAG_USED@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MFC_BUF_FLAG_USED@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	add	x21, x8, x9, lsl #3
	ldr	w8, [x21, #4]
	bic	w8, w8, w10
	str	w8, [x21, #4]
	add	x22, x20, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	add	x1, x19, #28
	mov	x0, x21
	bl	_list_add_tail
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	b	LBB0_6
LBB0_4:
Lloh12:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x19, #16]
	ldr	x9, [x21]
Lloh15:
	adrp	x10, _MFC_BUF_FLAG_USED@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MFC_BUF_FLAG_USED@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	add	x21, x8, x9, lsl #3
	ldr	w8, [x21, #4]
	bic	w8, w8, w10
	str	w8, [x21, #4]
	add	x22, x20, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	add	x1, x19, #12
	mov	x0, x21
	bl	_list_add_tail
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
LBB0_6:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
LBB0_8:
	mov	x0, x19
	bl	_s5p_mfc_ctx_ready
	cbz	x0, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_set_work_bit_irqsave
LBB0_10:
	ldr	w0, [x20]
Lloh20:
	adrp	x8, _try_run@GOTPAGE
Lloh21:
	ldr	x8, [x8, _try_run@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_s5p_mfc_hw_call
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MFCINST_ERROR,8,3              ; @MFCINST_ERROR
	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MFC_BUF_FLAG_USED,4,2          ; @MFC_BUF_FLAG_USED
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported buffer type (%d)\n"

	.comm	_try_run,4,2                    ; @try_run
	.no_dead_strip	_s5p_mfc_buf_queue
.subsections_via_symbols
